@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
30 lines • 1.5 kB
TypeScript
import type { EngineTurnHold } from "./engine-turn-hold.ts";
import type { CustomMessage } from "./messages.ts";
/** Input owns one release even when a command dispatches another prompt or a human steers mid-turn. */
export declare class EngineTurnInput {
private pending;
private readonly hold;
constructor(hold: EngineTurnHold);
get hasPending(): boolean;
/**
* A release that ends a user Stop (senpi#3811) consumes its notices only when the delivering turn settles, so a
* newer Stop during that turn keeps them held for the next release.
*/
begin(options?: {
readonly consumeAtSettlement?: boolean;
}): void;
messages(): CustomMessage[];
admit(queued: boolean, enqueue: (message: CustomMessage) => void): void;
/**
* The one settle point, called once the session is quiescent (no prompt in flight, no run active):
* an admitted release finishes; one no input admitted (handled, no-op, thrown, cancelled, refused,
* an answer without a follow-on) is given back with custody intact.
*/
/** A newer Stop turned the input into held input: the released holds come back and nothing was admitted. */
reject(): void;
/** `newerStop`: a Stop landed after this release began, so notices kept for settlement stay held. */
settle(release: (sources: Record<string, number>) => Promise<void>, options?: {
readonly newerStop?: boolean;
}): Promise<void>;
}
//# sourceMappingURL=engine-turn-input.d.ts.map