@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
22 lines • 1.59 kB
TypeScript
/**
* A handoff away from a host that no layout-2 registration proves (#2701).
*
* After an upgrade the old host is often still serving the very socket the updated client uses, and the
* only evidence of who it is may be a flat pre-layout-2 record - or nothing provable at all. Refusing
* such a host with `unknown_owner` left the client unable to replace it until somebody drained it by
* hand. An IDLE one is replaced instead; one that holds work never is.
*
* - The sessions are counted over a connection that stays open, and counted again over that same
* connection once the successor owns the socket: the recount reaches the old process, and a session
* it accepted in between is seen there.
* - A flat record that proves the process is the only licence to signal it, and the signal is a DRAIN
* (SIGUSR1), sent only when the recount still finds no session. A drain ends no work either way.
* - Without a provable owner nothing is signalled: the old host notices that it lost the public entry
* and drains itself (`host-supersession.ts`). That predecessor is named in one warning line, so an
* old host that outlives the handoff can still be identified.
*/
import type { HostDaemonPaths } from "./host-daemon-paths.ts";
import type { HostProtocolInfo } from "./host-decision.ts";
import type { HandoffHostOptions, HandoffResult } from "./host-handoff.ts";
export declare function handoffUnregisteredHost(options: HandoffHostOptions, paths: HostDaemonPaths, host: HostProtocolInfo): Promise<HandoffResult>;
//# sourceMappingURL=host-handoff-unregistered.d.ts.map