/** * Conversation plans shared by every interactive front-end. * * The readline loop, the ACP adapter and the Ink TUI all need the same * per-mode system prompt, tool set, permission mode and prompt transform. * They are built here once so a front-end never re-derives them; only the * front-end-specific parts (how the user is prompted, how output is rendered) * stay in the front-end. */ import type { AssistantInteractiveMode } from '../../core/models/index.js'; import type { FirstStepInfo } from '../../infra/config/index.js'; import type { ProviderType } from '../../infra/providers/index.js'; import type { SessionContext } from './aiCaller.js'; import type { ConversationStrategy } from './conversationLoop.js'; import type { WorkflowContext } from './interactive-summary-types.js'; import { type RunSessionContext } from './runSessionReader.js'; /** * The order `/replay` resubmits and `/retry` offers, or nothing when there is * none. An order file that exists but is empty is nothing to resend, and both * front-ends have to read it the same way — the readline loop and the TUI used * to disagree about the empty string. */ export declare function resolvePreviousOrder(previousOrderContent: string | undefined): string | undefined; export interface InteractiveSystemPromptInput { grillMe: boolean; /** Whether this front-end can hand off a running task with `/tell`. */ enableTellCommand?: boolean; formalSpec?: boolean; formalSpecComments?: boolean; workflowContext?: WorkflowContext; runSessionContext?: RunSessionContext; } export declare function buildInteractiveSystemPrompt(lang: 'en' | 'ja', input: InteractiveSystemPromptInput): string; /** A resolved session plus the strategy every front-end drives it with. */ export interface ConversationPlan { ctx: SessionContext; strategy: ConversationStrategy; } export interface InitialTaskContext { readonly name: string; readonly summary: string; readonly workflow?: string; readonly runSlug: string; } export interface AssistantConversationInput { assistantMode: AssistantInteractiveMode; /** Whether this front-end can hand off a running task with `/tell`. */ enableTellCommand?: boolean; /** Initial values resolved by the front-end before the conversation starts. */ formalSpec: boolean; /** Whether formal notation blocks must include natural-language meaning comments. */ formalSpecComments: boolean; /** Timeout for Quint model checking and Alloy verification stages, in seconds. */ modelCheckTimeoutSeconds: number; /** Resolve the formal-spec setting again when the user resumes another session. */ resolveResumedFormalSpecConfiguration?: () => Promise<{ mode: boolean; comments: boolean; modelCheckTimeoutSeconds: number; }>; workflowContext?: WorkflowContext; runSessionContext?: RunSessionContext; /** Lightweight metadata selected by `takt list`; reports are not loaded. */ initialTaskContext?: InitialTaskContext; /** Run to use as the initial `/tell` choice, never as a forced write target. */ initialReferenceRunSlug?: string; /** Re-read a live run before each provider turn while retaining the session. */ resolveRunSessionContext?: () => RunSessionContext; provider?: ProviderType; model?: string; effort?: string; /** Temporary model/effort errors must remain visible until the user retries. */ disableSessionRetry?: boolean; sessionId?: string; /** Already resolved provider state retained across a TUI-only session rebuild. */ resolvedSessionContext?: SessionContext; } interface ConversationSessionResolution { provider?: ProviderType; model?: string; resolvedSessionContext?: SessionContext; } interface ConversationSessionOverrides extends ConversationSessionResolution { /** Whether this front-end can hand off a running task with `/tell`. */ enableTellCommand?: boolean; /** Resolved timeout for Quint model checking and Alloy verification stages. */ modelCheckTimeoutSeconds: number; effort?: string; disableSessionRetry?: boolean; } export declare function createAssistantConversationPlan(cwd: string, input: AssistantConversationInput): ConversationPlan; export declare function createPersonaConversationPlan(cwd: string, firstStep: FirstStepInfo, overrides: ConversationSessionOverrides): ConversationPlan; export {}; //# sourceMappingURL=conversationPlan.d.ts.map