UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

25 lines • 1.38 kB
/** * Undoing a refused handoff (senpi#4602 split this out of `host-successor.ts`): the successor is killed, its * generation is released once it has exited, and the boot `settings.json` it overwrote is put back byte for byte. */ import type { ChildProcess } from "node:child_process"; import { type HostDaemonPaths } from "./host-daemon-paths.ts"; /** * Undoes what a refused handoff left: kills the successor, releases its generation once it has exited * (a successor that never got a pid never ran, so its directory goes at once; one that outlives the wait * keeps its record until pruning finds it dead), and puts the boot settings back as they were. A * successor that was never spawned leaves only the boot settings to undo. A cleanup that fails is * answered, not thrown: the handoff still refused, and the caller is told why * the endpoint may not be as it was. */ export declare function abandonSuccessor(context: { /** Undefined when the successor was never spawned: nothing to kill or release. */ child: ChildProcess | undefined; exited: Promise<void> | undefined; paths: HostDaemonPaths; instanceId: string; bootSettings: string | undefined; /** Why the successor is being killed: the stop intent and the record name it. */ reason: string; }): Promise<string | undefined>; //# sourceMappingURL=host-successor-abandon.d.ts.map