UNPKG

@code-yeongyu/senpi

Version:

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

31 lines • 1.86 kB
/** * The engine side of the supervisor's private hop (senpi#3795): the stdin-delivered key and lifetime descriptor * from the bootstrap, and how each accepted connection is admitted. Split out of multi-session-host.ts. */ import type { Socket } from "node:net"; import type { Duplex } from "node:stream"; import type { LaunchProofSource } from "./delegated-connection.ts"; import { type HostWatchdogConfig } from "./host-watchdog.ts"; /** * The supervisor binding, read once per process. The watch variables are removed as they are read (senpi#3815 review * L4), so no tool, shell or nested host this host starts inherits a binding to a supervisor that is not its own. */ export declare function hostWatchdogBinding(): HostWatchdogConfig | undefined; export interface InternalHostTransport { readonly watchdogConfig: HostWatchdogConfig | undefined; /** * Authenticates and seals (POSIX key), authenticates (Windows secret), filters (public), or accepts as is, naming * how the accepted connection proves the launch key (senpi#5632): the supervisor's hop carries its filter's proof * in band, the Windows secret is the proof, the public filter delivers it in band, a plain socket has none. */ admit(socket: Socket, accept: (socket?: Duplex, launchProof?: LaunchProofSource) => void): void; /** Publishes the public endpoint's key record after listening; a failure is logged and `onFailure` ends the host. */ publish(onFailure: () => Promise<void>): Promise<void>; dispose(): Promise<void>; } export declare function internalHostTransport(configured: HostWatchdogConfig | undefined, secret: Uint8Array | undefined, endpoint?: { readonly agentDir: string; readonly socket: string; readonly log: (message: string) => void; }): InternalHostTransport; //# sourceMappingURL=host-internal-transport.d.ts.map