export interface ChangeHandlerResult { mode: boolean; /** When set, caller must `editor.setText(replaceText)` to strip the `!`. */ replaceText?: string; /** Whether the next submit (if in shell mode) is marked private. */ pendingPrivate: boolean; } /** Strips `!` (entry), `!!` (entry + private), in-mode `!` (upgrade to private). * Shell mode is sticky — exit only via the Backspace-on-empty intercept; * auto-exit on empty text would fire during pi-tui's pre-emptive onChange("") * inside Editor.submitValue() and misroute the submit. pendingPrivate is * sticky for the same reason. */ export declare function deriveChangeHandlerResult(mode: boolean, pendingPrivate: boolean, text: string): ChangeHandlerResult; export type SubmitAction = { kind: "noop"; } | { kind: "shell"; line: string; private: boolean; } | { kind: "command"; name: string; args: string; } | { kind: "agent"; query: string; }; export declare function classifySubmit(text: string, shellMode: boolean, pendingPrivate: boolean): SubmitAction;