UNPKG

@code-yeongyu/senpi

Version:

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

32 lines • 1.26 kB
import type { HandSelection, HandSession } from "../headless/hand-selection.ts"; import type { RpcCommand, RpcResponse } from "./rpc-types.ts"; /** A command's session: the hand-facing half plus the durable id that `hand_selection` entries are keyed by. */ type CommandSession = HandSession & { readonly sessionId: string; }; /** The only parts of the router context these two commands read, so a test can hand them a registry that is closing one. */ type HandSelectionHost = { readonly registry: { peek(handle: string): { readonly runtime?: { readonly session?: CommandSession; }; } | undefined; getForCommand(handle: string, command: string): { readonly runtime?: { readonly session?: CommandSession; }; }; }; readonly defaults: { readonly handSelection?: HandSelection; }; }; export declare function answerListHands(host: HandSelectionHost, command: Extract<RpcCommand, { type: "list_hands"; }>): RpcResponse; export declare function answerSelectHand(host: HandSelectionHost, command: Extract<RpcCommand, { type: "select_hand"; }>): RpcResponse; export {}; //# sourceMappingURL=hand-selection-commands.d.ts.map