UNPKG

@code-yeongyu/senpi

Version:

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

30 lines • 1.85 kB
import type { AgentSession } from "../../core/agent-session.ts"; import type { QuestionRequest, QuestionResponse, SessionControlDrainResult } from "../../core/extensions/types.ts"; import type { ControlAttachments } from "./session-control-attach.ts"; import type { ControlFeed } from "./session-control-feed.ts"; import { type ControlCommand, type ControlConnection } from "./session-control-server.ts"; import { type TuiSessionControls } from "./session-control-session-commands.ts"; export interface TuiControlSurface extends TuiSessionControls { /** Input the user submitted that the runtime has not taken yet: it holds admission, so no delivery overtakes it. */ submissionInFlight(): boolean; /** Text or attachments in the composer: reported to clients, never a hold on a delivery (senpi#7043). */ hasDraft(): boolean; blockingQuestion(): boolean; pendingQuestionIds(): readonly string[]; pendingQuestion(requestId: string): Pick<QuestionRequest, "questions"> | undefined; answerQuestion(requestId: string, response: QuestionResponse): boolean; notice(line: string): void; /** A graceful close ended the session (oh-my-openagent#14313): the terminal exits as a person's quit would. */ closeSession(): void; } export interface ControlCommandContext { readonly instanceId: string; readonly session: AgentSession; readonly surface: TuiControlSurface; readonly feed: ControlFeed; readonly wake: (deliveryIds?: readonly string[]) => Promise<SessionControlDrainResult>; readonly attachments: ControlAttachments; } export declare const TUI_CONTROL_CAPABILITY = "tui_control"; export declare function runControlCommand(context: ControlCommandContext, connection: ControlConnection, command: ControlCommand): Promise<object | null>; //# sourceMappingURL=session-control-commands.d.ts.map