diff --git a/src/types.ts b/src/types.ts index eca8ef3..14bba7b 100644 --- a/src/types.ts +++ b/src/types.ts @@ -35,6 +35,49 @@ export interface OutputLog { line: string; } +// Phase 2: Rich prompt system interfaces +// Represents the structured data format for interactive prompts from Claude Code + +export interface PromptOption { + label: string; + value: string; + description?: string; +} + +export interface PermissionPrompt { + prompt_type: "permission"; + tool_name: string; + tool_input: Record; + options: PromptOption[]; + allows_tab_instructions: boolean; + selected_option: number; +} + +export interface QuestionItem { + question: string; + header?: string; + options: PromptOption[]; + multi_select: boolean; + allows_other: boolean; +} + +export interface QuestionPrompt { + prompt_type: "question"; + questions: QuestionItem[]; +} + +export interface ExitPlanPrompt { + prompt_type: "exit_plan"; + options: PromptOption[]; +} + +export type PromptData = PermissionPrompt | QuestionPrompt | ExitPlanPrompt | null; + +export type AnswerResponse = + | { type: "option"; value: string } + | { type: "text"; value: string } + | { type: "tab_instructions"; selected_option: number; instruction: string }; + // WebSocket messages (CLI <-> Server) export type ClientMessage =