import { type ValidationResult } from "./schemas.js"; import { type CreateWorkspaceSessionResult } from "./workspace-manager.js"; export declare const RUNTIME_EXECUTOR_SESSION_REGISTRY_REL_PATH = "agent-state/runtime-executor-sessions.json"; export declare const RUNTIME_EXECUTOR_SESSION_SCHEMA_REL_PATH = "agent-state/MODULES/schemas/RUNTIME_EXECUTOR_SESSION_REGISTRY.schema.json"; export declare const RUNTIME_EXECUTOR_SESSION_SCHEMA_NAME = "runtime-executor-session-registry@1.0.0"; export type UnattendedSessionStatus = "starting" | "running" | "completed" | "failed" | "blocked" | "stopped"; export type UnattendedTurnStatus = "completed" | "failed" | "blocked" | "stopped"; export interface UnattendedToolCallRecord { tool_name: string; ok: boolean; summary: string; request_path: string; response_path: string; started_at: string; ended_at: string; output?: unknown; error?: unknown; validation_errors?: string[]; } export interface UnattendedTurnRecord { turn_number: number; task: string; started_at: string; ended_at: string; status: UnattendedTurnStatus; response_status: "continue" | "done" | "blocked" | "failed"; summary: string; prompt_path: string; request_path: string; response_path: string; exit_code: number | null; stdout: string; stderr: string; tool_calls: UnattendedToolCallRecord[]; } export interface UnattendedSessionRecord { session_id: string; status: UnattendedSessionStatus; task: string; current_task: string; runtime_profile_path: string; workspace_session_id: string; workspace_path: string; objective_id?: string; tracker_item_id?: string; command: string; max_turns: number; turn_timeout_ms: number; turn_count: number; created_at: string; updated_at: string; started_at?: string; ended_at?: string; result_summary?: string; last_error?: string; cleanup_error?: string; workspace_cleanup_status: "pending" | "removed" | "archived" | "failed"; turns: UnattendedTurnRecord[]; } export interface UnattendedSessionRegistry { version: 1; updated_at: string; sessions: UnattendedSessionRecord[]; } export interface StartUnattendedSessionInput { session_id?: string; task: string; context?: Record; workspace_name?: string; workspace_path?: string; objective_id?: string; tracker_item_id?: string; max_turns?: number; turn_timeout_ms?: number; auto_cleanup?: boolean; } export interface StartUnattendedSessionResult { ok: boolean; registry_path: string; session?: UnattendedSessionRecord; workspace?: CreateWorkspaceSessionResult["session"]; error?: string; } export interface StopUnattendedSessionResult { ok: boolean; registry_path: string; session?: UnattendedSessionRecord; error?: string; } export interface WaitForUnattendedSessionResult { ok: boolean; timed_out: boolean; registry_path: string; session?: UnattendedSessionRecord; error?: string; } export declare function validateRuntimeExecutorSessionRegistryContent(raw: string): ValidationResult; export declare function listUnattendedSessions(): UnattendedSessionRegistry; export declare function getUnattendedSession(sessionId: string): UnattendedSessionRecord | undefined; export declare function getRuntimeExecutorSessionRegistryPath(): string; export declare function startUnattendedSession(input: StartUnattendedSessionInput): Promise; export declare function waitForUnattendedSession(sessionId: string, timeoutMs?: number): Promise; export declare function stopUnattendedSession(sessionId: string): Promise; //# sourceMappingURL=runtime-executor.d.ts.map