fix(cli): Use server-side start-by-id flow for starting processes

This commit is contained in:
2025-08-29 21:10:01 +00:00
parent 611b756670
commit dfe0677cab
6 changed files with 72 additions and 9 deletions

View File

@@ -66,6 +66,17 @@ export interface StartResponse {
status: 'online' | 'stopped' | 'errored';
}
// Start by id (server resolves config)
export interface StartByIdRequest {
id: string;
}
export interface StartByIdResponse {
processId: string;
pid?: number;
status: 'online' | 'stopped' | 'errored';
}
// Stop command
export interface StopRequest {
id: string;
@@ -191,6 +202,7 @@ export interface DaemonStatusResponse {
processCount: number;
memoryUsage?: number;
cpuUsage?: number;
version?: string;
}
// Daemon shutdown command
@@ -238,6 +250,7 @@ export interface RemoveResponse {
// Type mappings for methods
export type IpcMethodMap = {
start: { request: StartRequest; response: StartResponse };
startById: { request: StartByIdRequest; response: StartByIdResponse };
stop: { request: StopRequest; response: StopResponse };
restart: { request: RestartRequest; response: RestartResponse };
delete: { request: DeleteRequest; response: DeleteResponse };