/** * Interactive task input mode * * Allows users to refine task requirements through conversation with AI * before executing the task. Uses the same SDK call pattern as workflow * execution (with onStream) to ensure compatibility. * * Commands: * /go - Confirm and execute the task * /cancel - Cancel and exit */ import type { AssistantInteractiveMode, Language } from '../../core/models/index.js'; import type { ProviderType } from '../../infra/providers/index.js'; import { type SessionState } from '../../infra/config/index.js'; import { type WorkflowContext, type ConversationMessage, type InteractiveModeAction, type SummaryActionValue } from './interactive-summary.js'; import type { RunSessionContext } from './runSessionReader.js'; import type { ImageAttachmentCleanupOwner, InteractiveImageAttachment } from './imageAttachments.js'; /** Shape of interactive UI text */ export interface InteractiveUIText { intro: string; introGrillMe: string; resume: string; noConversation: string; summarizeFailed: string; continuePrompt: string; proposed: string; actionPrompt: string; actions: { execute: string; createIssue: string; saveTask: string; continue: string; }; cancelled: string; acceptNoAssistant: string; retryNoOrder: string; retryUnavailable: string; pasteImageUnavailable: string; } /** * Format session state for display */ export declare function formatSessionStatus(state: SessionState, lang: 'en' | 'ja'): string; export declare function resolveLanguage(lang?: Language): 'en' | 'ja'; export { DEFAULT_INTERACTIVE_TOOLS } from './interactiveApplication.js'; /** * Build the summary prompt (used as both system prompt and user message). */ export { formatStepPreviews, type ConversationMessage, type WorkflowContext, type TaskHistorySummaryItem, } from './interactive-summary.js'; export declare function buildSummaryPrompt(history: ConversationMessage[], userNote: string, lang: 'en' | 'ja', promptContext?: string, formalSpec?: boolean, formalSpecComments?: boolean): string; export declare function buildSummaryPrompt(history: ConversationMessage[], hasSession: boolean, lang: 'en' | 'ja', noTranscriptNote: string, conversationLabel: string, workflowContext?: WorkflowContext, sourceContext?: string, promptContext?: string, formalSpec?: boolean, formalSpecComments?: boolean): string; /** * Run the interactive task input mode. * * Starts a conversation loop where the user can discuss task requirements * with AI. The conversation continues until: * /go → returns the conversation as a task * /accept → returns the latest assistant response as a task * /cancel → exits without executing * Ctrl+D → exits without executing */ export interface InteractiveModeOptions { /** Actions to exclude from the post-summary action selector. */ excludeActions?: readonly SummaryActionValue[]; /** CLI provider override for assistant mode */ provider?: ProviderType; /** CLI model override for assistant mode */ model?: string; /** Assistant conversation behavior. */ assistantMode?: AssistantInteractiveMode; } export interface InteractiveSeedInput { /** Initial user task text supplied directly from CLI input. */ userMessage?: string; /** Untrusted reference context loaded from PR/Issue sources. */ sourceContext?: string; /** Images already associated with the seeded user input. */ attachments?: InteractiveImageAttachment[]; } export declare function interactiveMode(cwd: string, initialInput?: InteractiveSeedInput, workflowContext?: WorkflowContext, sessionId?: string, runSessionContext?: RunSessionContext, options?: InteractiveModeOptions): Promise; export { type InteractiveModeAction, type InteractiveSummaryUIText, type PostSummaryAction, type SummaryActionLabels, type SummaryActionOption, type SummaryActionValue, selectPostSummaryAction, buildSummaryActionOptions, createPostSummaryActionSelector, selectSummaryAction, formatTaskHistorySummary, normalizeTaskHistorySummary, BASE_SUMMARY_ACTIONS, } from './interactive-summary.js'; export interface InteractiveModeResult extends ImageAttachmentCleanupOwner { /** The action selected by the user */ action: InteractiveModeAction; /** The assembled task text (only meaningful when action is not 'cancel') */ task: string; /** Images pasted during interactive input and referenced by placeholder. */ attachments?: InteractiveImageAttachment[]; /** The command path that produced this result. */ source?: 'go' | 'retry' | 'replay' | 'accept'; } //# sourceMappingURL=interactive.d.ts.map