UNPKG

@code-yeongyu/senpi

Version:

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

19 lines • 1.06 kB
import type { AgentSession } from "../../core/agent-session.ts"; import { RPC_ERROR_INVALID_ARGUMENT, RPC_ERROR_STALE_LEAF } from "./rpc-types.ts"; interface PromptLeafGuard { readonly expectedLeafId?: string; readonly streamingBehavior?: "steer" | "followUp"; } interface PromptLeafRefusal { readonly message: string; readonly errorCode: typeof RPC_ERROR_INVALID_ARGUMENT | typeof RPC_ERROR_STALE_LEAF; } /** * senpi#6922: a prompt naming the leaf it was decided at is refused before admission when the session moved. * Lifecycle bookkeeping after that leaf is not a move (the same rule as the edit commands). A queued delivery runs * later, at a leaf this admission-time check never sees, so it cannot carry the guard; neither can a prompt a live hold * would keep as a notice, which a later turn consumes at another leaf. */ export declare function refusePromptAtMovedLeaf(session: AgentSession, command: PromptLeafGuard, heldAsNotice: boolean): PromptLeafRefusal | undefined; export {}; //# sourceMappingURL=prompt-expected-leaf.d.ts.map