UNPKG

@code-yeongyu/senpi

Version:

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

24 lines • 1.48 kB
import type { StoreValue } from "@earendil-works/pi-agent-core/conformance"; import type { LoopWakeRoute } from "../extensions/runner.ts"; /** * What a hand's late work did, as the loop's session does it: a custom message, a user message, a session entry * (`pi.appendEntry`, for example a Stop hook's stop state), or a UI notice. */ export type HandWakeSource = "message" | "user_message" | "entry" | "notice"; /** One late effect of a hand's work, for the hand's wake outbox; its scope is the runtime's own. */ export interface HandWake { readonly source: HandWakeSource; readonly payload: StoreValue; } /** * The loop-side effects of a hand runtime's late work (brain/hand split H3), each turned into a wake for the brain that * owns the scope: exactly the arguments a local session's `sendMessage`, `sendUserMessage`, `appendEntry` and * `ui.notify` would have received, plus the loop session's id when a loop-hook call on that session started the work. */ export declare function loopWakeRoute(offer: (wake: HandWake) => void, sessionId?: string): LoopWakeRoute; /** * Where a loop-hook call's effects go once the call ended: its runtime's wake outbox, or, on a runtime without one, * nowhere, and `dropped` reports each one so it is never lost silently. */ export declare function lateLoopRoute(wake: ((wake: HandWake) => void) | undefined, dropped: (error: string) => void): (sessionId: string) => LoopWakeRoute; //# sourceMappingURL=hand-wake-route.d.ts.map