import { type InputBuilder } from '@wrongstack/core/agent'; import type { Director } from '@wrongstack/core/coordination'; import type { AttachmentStore, ContentBlock } from '@wrongstack/core/types'; import type { Action, State } from './app-reducer.js'; import { emptyMemoryContextMonitor } from './memory-context-monitor.js'; import type { MutableCell } from './shared-types.js'; import { type TokenPreviewStore } from './token-previews.js'; import type { SubmitCapabilities } from './tui-host-capabilities.js'; export interface SubmitControllerHost { readonly capabilities: SubmitCapabilities; readonly state: State; readonly live: { readonly mouseMode: boolean; /** Mouse tracking released to the terminal (`/mouse native`). */ readonly nativeMouse: boolean; readonly model: string; readonly provider: string; readonly maxContext: number | undefined; readonly yolo: boolean; readonly autonomy: 'off' | 'suggest' | 'auto' | 'eternal' | 'eternal-parallel'; readonly modeLabel: string | undefined; setMouseMode(value: boolean): void; setNativeMouse(value: boolean): void; setModel(value: string): void; setProvider(value: string): void; setMaxContext(value: number): void; setYolo(value: boolean): void; setAutonomy(value: 'off' | 'suggest' | 'auto' | 'eternal' | 'eternal-parallel'): void; setModeLabel(value: string): void; setToolCount(value: number): void; }; readonly refs: { readonly state: MutableCell; readonly interrupts: MutableCell; readonly autoSubmitStreak: MutableCell; readonly autoSubmitCapWarned: MutableCell; readonly autoSubmitLoopGuard: MutableCell<{ reset(): void; }>; readonly tokenPreviews: MutableCell; readonly attachments: AttachmentStore; readonly builder: MutableCell; readonly sessionGeneration: MutableCell; readonly eternalLoop: MutableCell<() => Promise>; readonly parallelLoop: MutableCell<() => Promise>; readonly enhanceEnabled: MutableCell; readonly enhanceOriginal: MutableCell; readonly enhanceAbort: MutableCell; readonly enhanceCancelled: MutableCell; readonly nextStepsTimer: MutableCell | undefined>; readonly midRunSendPicker: MutableCell; /** Managed-history scroll surface; null until ScrollableHistory mounts. */ readonly historyScroll: MutableCell; }; readonly actions: { dispatch(action: Action): void; clearDraft(): void; setDraft(buffer: string, cursor: number): void; pasteClipboardImage(): Promise; openPromptPicker(): Promise; refreshGoalSummary(): void; exit(): void; runBlocks(blocks: ContentBlock[]): Promise; liveDirector(): Director | null; setMemoryContextMonitor(value: ReturnType): void; runSteerSequence(direction: string): { preamble: string; }; setEnhanceStartedAt(value: number | null): void; setEnhanceDuration(value: number | null): void; setRefineProvider(value: string | null): void; setRefineModel(value: string | null): void; /** Called after /clear dispatches clearHistory — app.tsx uses this to * reset mutable refs that the reducer cannot reach (paste accumulator, * next-steps auto-submit, prompt-usage store, enhance abort). */ onAfterClear?(): void; }; } export declare function createSubmitController(host: SubmitControllerHost): (overrideRaw?: string) => Promise; //# sourceMappingURL=submit-controller.d.ts.map