import type { LLMMessage } from '../llm/llm-provider.js'; import type { Message } from '../session/session-jsonl.js'; export type TaskFrameStatus = 'active' | 'paused_resumable' | 'completed' | 'error' | 'aborted'; export type TaskFrameSource = 'user' | 'tool' | 'assistant' | 'compaction' | 'guard' | 'max_turns' | 'error' | 'abort'; export interface TaskFrameToolFinding { toolName: string; summary: string; isError: boolean; at: number; } export interface TaskFrame { schemaVersion: 1; sessionKey: string; runId?: string; goal: string; constraints: string[]; currentStep: string; completedSteps: string[]; pendingSteps: string[]; artifacts: string[]; importantPaths: string[]; toolFindings: TaskFrameToolFinding[]; lastError?: string; nextAction: string; status: TaskFrameStatus; source: TaskFrameSource; updatedAt: number; } export interface TaskFrameLoadResult { frame?: TaskFrame; messages: Message[]; } export interface ContinuationIntent { isContinuation: boolean; isArchiveLookup: boolean; } export declare function isTaskFrameCheckpointMessage(message: Message | LLMMessage): boolean; export declare function splitTaskFrameCheckpointMessages(messages: Message[]): TaskFrameLoadResult; export declare function detectContinuationIntent(userMessage: string): ContinuationIntent; export declare function createOrUpdateTaskFrame(params: { previous?: TaskFrame; sessionKey: string; runId: string; userMessage: string; now?: number; }): TaskFrame; export declare function recordTaskFrameToolStart(frame: TaskFrame, toolName: string, input: Record, now?: number): TaskFrame; export declare function recordTaskFrameToolEnd(frame: TaskFrame, params: { toolName: string; input?: Record; result: string; isError: boolean; aborted?: { by: 'user' | 'timeout'; }; now?: number; }): TaskFrame; export declare function recordTaskFrameCompaction(frame: TaskFrame, params: { summaryChars: number; droppedMessages: number; now?: number; }): TaskFrame; export declare function recordTaskFrameAssistant(frame: TaskFrame, text: string, stopReason: string, now?: number): TaskFrame; export declare function recordTaskFrameStop(frame: TaskFrame, params: { reason: 'max_turns' | 'error' | 'abort'; detail?: string; now?: number; }): TaskFrame; export declare function createTaskFrameCheckpointMessage(frame: TaskFrame): LLMMessage; export declare function buildTaskFrameContext(frame: TaskFrame, intent: ContinuationIntent): string; export declare function stripTaskFrameCheckpointsFromLlmMessages(messages: LLMMessage[]): LLMMessage[]; //# sourceMappingURL=task-frame.d.ts.map