@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
29 lines • 1.57 kB
TypeScript
import type { ExtensionContext, InputDispositionEvent, InputEvent } from "../../types.ts";
import type { MonitorAwareGoalContinuation } from "./monitor-continuation.ts";
import type { Goal, GoalStoreRef } from "./types.ts";
type DirectInputLifecycleDependencies = {
readonly monitor: MonitorAwareGoalContinuation;
readonly goalStoreRef: (ctx: ExtensionContext) => GoalStoreRef;
readonly beginAgentGoalAccounting: (goal: Goal) => void;
readonly refreshGoalUi: (ctx: ExtensionContext, goal: Goal) => void;
/**
* One-shot resume fired when the first user message after a suppressed
* flooded load is accepted. The load-time suppression notice tells the user
* to "send a message to resume"; this callback is what keeps that promise.
*/
readonly resumeAfterSuppressedLoad?: (ctx: ExtensionContext, goal: Goal) => Promise<void>;
/** Fired for every accepted direct (non-extension) input, goal or not. */
readonly onAcceptedDirectInput?: () => void;
};
/** Correlates raw input with admission before changing persisted Goal state. */
export declare class GoalDirectInputLifecycle {
#private;
constructor(dependencies: DirectInputLifecycleDependencies);
reset(): void;
/** Arms the one-shot resume for a goal parked by load-time flood suppression. */
armSuppressedLoadResume(): void;
onInput(event: InputEvent, ctx: ExtensionContext): Promise<void>;
onDisposition(event: InputDispositionEvent, ctx: ExtensionContext): Promise<void>;
}
export {};
//# sourceMappingURL=direct-input-lifecycle.d.ts.map