feat(cli/daemon/processmonitor): Add flexible target resolution and search command; improve restart/backoff and error handling

This commit is contained in:
2025-08-30 16:55:10 +00:00
parent 22a43204d4
commit ebc20a9232
17 changed files with 327 additions and 109 deletions

View File

@@ -240,14 +240,6 @@ export interface AddResponse {
}
// Remove (delete config and stop if running)
export interface RemoveRequest {
id: ProcessId;
}
export interface RemoveResponse {
success: boolean;
message?: string;
}
// Update (modify existing config)
export interface UpdateRequest {
@@ -260,6 +252,16 @@ export interface UpdateResponse {
config: IProcessConfig;
}
// Resolve a user-provided target (id:n or name:foo or numeric string) to a ProcessId
export interface ResolveTargetRequest {
target: string;
}
export interface ResolveTargetResponse {
id: ProcessId;
name?: string;
}
// Type mappings for methods
export type IpcMethodMap = {
start: { request: StartRequest; response: StartResponse };
@@ -269,7 +271,6 @@ export type IpcMethodMap = {
delete: { request: DeleteRequest; response: DeleteResponse };
add: { request: AddRequest; response: AddResponse };
update: { request: UpdateRequest; response: UpdateResponse };
remove: { request: RemoveRequest; response: RemoveResponse };
list: { request: ListRequest; response: ListResponse };
describe: { request: DescribeRequest; response: DescribeResponse };
getLogs: { request: GetLogsRequest; response: GetLogsResponse };
@@ -286,6 +287,7 @@ export type IpcMethodMap = {
response: DaemonShutdownResponse;
};
heartbeat: { request: HeartbeatRequest; response: HeartbeatResponse };
resolveTarget: { request: ResolveTargetRequest; response: ResolveTargetResponse };
};
// Helper type to extract request type for a method