BREAKING CHANGE(cli): Add persistent process registration (tspm add), alias remove, and change start to use saved process IDs (breaking CLI behavior)

This commit is contained in:
2025-08-29 09:43:54 +00:00
parent 0427d38c7d
commit 4db128edaf
10 changed files with 263 additions and 142 deletions

View File

@@ -200,12 +200,35 @@ export interface HeartbeatResponse {
status: 'healthy' | 'degraded';
}
// Add (register config without starting)
export interface AddRequest {
// Optional id is ignored server-side if present; server assigns sequential id
config: Omit<IProcessConfig, 'id'> & { id?: string };
}
export interface AddResponse {
id: string;
config: IProcessConfig;
}
// Remove (delete config and stop if running)
export interface RemoveRequest {
id: string;
}
export interface RemoveResponse {
success: boolean;
message?: string;
}
// Type mappings for methods
export type IpcMethodMap = {
start: { request: StartRequest; response: StartResponse };
stop: { request: StopRequest; response: StopResponse };
restart: { request: RestartRequest; response: RestartResponse };
delete: { request: DeleteRequest; response: DeleteResponse };
add: { request: AddRequest; response: AddResponse };
remove: { request: RemoveRequest; response: RemoveResponse };
list: { request: ListRequest; response: ListResponse };
describe: { request: DescribeRequest; response: DescribeResponse };
getLogs: { request: GetLogsRequest; response: GetLogsResponse };