export interface CodexComposerInputState { viewport: string; cursor: { x: number; y: number; }; } export type CodexComposerState = 'empty' | 'draft' | 'unknown'; /** * Infer whether the cursor is inside a non-empty Codex composer. * * Codex leaves the cursor immediately after the `› ` marker while its empty * placeholder is visible. A real single-line draft moves the cursor to the * right; a multi-line draft moves it below the marker row. This lets botmux * distinguish the placeholder from user-authored text without depending on * the placeholder copy, color, or locale. * * KNOWN LIMITATION (fail-open, accepted): the signal is cursor position alone. * A single-line draft whose cursor the user moved back to the very start * (`cursor.x` at the empty-composer column) is indistinguishable from an empty * composer and reports 'empty' — the Lark message would still be appended. A * truly fail-closed detector would need composer content evidence (ANSI style * runs / a stronger Codex state probe), not just the cursor. This guard only * covers the common case where the cursor is still at/after the draft it typed. */ export declare function detectCodexComposerState(input: CodexComposerInputState | null | undefined): CodexComposerState; //# sourceMappingURL=codex-composer-state.d.ts.map