UNPKG

@code-yeongyu/senpi

Version:

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

36 lines • 2.2 kB
import { type OpenAcceptance } from "./compact-open-admission.ts"; import type { HandoverParkedEntry } from "./host-handover-parked.ts"; import type { RpcCommand, RpcResponse } from "./rpc-types.ts"; import type { OpenRpcSession } from "./session-registry.ts"; import type { RouterContext } from "./session-router-context.ts"; import { type OpenReplyAs } from "./session-router-open-result.ts"; export declare function openWithBarrier(host: RouterContext, command: Extract<RpcCommand, { type: "open_session"; }>, replyAs?: OpenReplyAs): Promise<RpcResponse | undefined>; /** * The successor's reopen of a handoff-parked session: the same open as an `open_session`, with no * requesting connection and nothing to reply to (senpi#3368). Resolves `undefined` on success and * the failure response otherwise, exactly as an open does. A session that was live when its host ended * continues as that host left it (senpi#7020); any other park reopens unattended, holding automatic turns. */ export declare function reopenParked(host: RouterContext, entry: HandoverParkedEntry): Promise<RpcResponse | undefined>; export declare function open(host: RouterContext, command: Extract<RpcCommand, { type: "open_session"; }>, owner?: string, options?: { readonly reply?: boolean; readonly accept?: OpenAcceptance; readonly signal?: AbortSignal; readonly defaults?: boolean; readonly contextOverlay?: HandoverParkedEntry["contextOverlay"]; /** The reply is another command's answer: see `OpenReplyAs`. */ readonly replyAs?: OpenReplyAs; /** An invisible speculative open, published only when its ledger hands it to a caller. */ readonly park?: (opened: OpenRpcSession) => void; /** A successor's reopen of a session that was live on its predecessor; never set from the wire. */ readonly continued?: boolean; /** No connection asked for this open: it counts no attachment (the successor's restore). */ readonly unattached?: boolean; /** When this open first waited for a routed session to change generations (senpi#7098). */ readonly routedSince?: number; }): Promise<RpcResponse | undefined>; //# sourceMappingURL=session-router-open.d.ts.map