/** * The interactive terminal app's command-line provider: parses `--resume`, * `--continue`, `--session`, `--mode`, `--theme`, `--image`, an optional * initial prompt, and `--help`, then * publishes {@link TUI_STARTUP_SERVICE} for the runner to consume lazily. * Follows the headless bundle's startup shape (a commander action publishing * a service through {@link parseCmdline}). * * Semantics: * - `--resume ` — continue the persisted session whose id or unique * id-prefix matches; the TUI replays its transcript and appends to the same * durable log. * - `--continue` / `-c` — resume the most recently modified persisted session * whose project directory matches the current working directory. * - `--session ` — create a new session under an explicit identity (the * id must not exist yet). * - `--theme ` — the color palette; auto follows the * terminal (dark fallback until OSC-11 detection lands). * - no flags — a fresh session with a minted id. * * @module @deepseek-ai/dsh-tui/startup */ import type { Context } from '@deepseek-ai/cordis'; import { type ThemeName } from './theme.ts'; /** Stable Cordis plugin name. */ export declare const name = "tui-startup"; /** Services required before the invocation can be resolved. */ export declare const inject: string[]; /** How the runner obtains its session identity. */ export type TuiStartup = ({ readonly kind: 'fresh'; readonly mode?: string; } & TuiStartupInput) | ({ readonly kind: 'named'; readonly sessionId: string; readonly mode?: string; } & TuiStartupInput) | ({ readonly kind: 'resume'; readonly sessionId: string; } & TuiStartupInput) | ({ readonly kind: 'latest'; } & TuiStartupInput); interface TuiStartupInput { readonly theme?: ThemeName; readonly prompt?: string; readonly images?: readonly string[]; } export interface TuiStartupOptions { readonly resume?: string; readonly continue?: boolean; readonly session?: string; readonly mode?: string; readonly theme?: ThemeName; readonly prompt?: string; readonly images?: readonly string[]; } /** Pure option policy shared by Commander and tests. */ export declare function resolveTuiStartup(options: TuiStartupOptions): TuiStartup; /** * Parse the invocation and publish the startup service. Mutual exclusions are * usage errors rejected from the action before anything is provided. * @param ctx - plugin context carrying the command line and exit request. */ export declare function apply(ctx: Context): void; export {};