export declare const WORKSPACE_SESSION_REGISTRY_REL_PATH = "agent-state/runtime-workspaces.json"; export type WorkspaceSessionStatus = "active" | "archived" | "removed" | "failed"; export type WorkspaceSessionSource = "manual" | "executor" | "test"; export type WorkspaceHookKind = "after_create" | "before_run" | "after_run" | "before_remove"; export type WorkspaceHookStatus = "not_run" | "ok" | "failed"; export interface WorkspaceHookState { status: WorkspaceHookStatus; detail?: string; } export interface WorkspaceHookSummary { after_create: WorkspaceHookState; before_run: WorkspaceHookState; after_run: WorkspaceHookState; before_remove: WorkspaceHookState; } export interface WorkspaceSessionRecord { session_id: string; workspace_path: string; root_path: string; status: WorkspaceSessionStatus; source: WorkspaceSessionSource; objective_id?: string; tracker_item_id?: string; created_at: string; updated_at: string; last_error?: string; hooks: WorkspaceHookSummary; } export interface WorkspaceSessionRegistry { version: 1; updated_at: string; sessions: WorkspaceSessionRecord[]; } export interface WorkspacePathValidationResult { ok: boolean; code: "ok" | "root_path_not_session" | "outside_root" | "symlink_escape" | "root_outside_workspace" | "path_outside_workspace"; reason?: string; root_path: string; target_path: string; canonical_root_path?: string; canonical_target_path?: string; } export interface HookResult { ok: boolean; kind: WorkspaceHookKind; status: WorkspaceHookStatus; command?: string | null; detail?: string; exit_code?: number | null; timed_out?: boolean; } export interface CreateWorkspaceSessionInput { session_id?: string; workspace_name?: string; workspace_path?: string; root?: string; source: WorkspaceSessionSource; objective_id?: string; tracker_item_id?: string; hooks_timeout_ms?: number; } export interface CreateWorkspaceSessionResult { ok: boolean; registry_path: string; session?: WorkspaceSessionRecord; error?: string; validation?: WorkspacePathValidationResult; } export interface RemoveWorkspaceSessionInput { session_id?: string; workspace_path?: string; root?: string; hooks_timeout_ms?: number; } export interface RemoveWorkspaceSessionResult { ok: boolean; registry_path: string; session?: WorkspaceSessionRecord; error?: string; validation?: WorkspacePathValidationResult; } export interface RunWorkspaceSessionHookInput { session_id?: string; workspace_path?: string; kind: WorkspaceHookKind; hooks_timeout_ms?: number; } export interface RunWorkspaceSessionHookResult { ok: boolean; registry_path: string; session?: WorkspaceSessionRecord; hook: HookResult; error?: string; } export declare function resolveRuntimeWorkspaceRoot(rootOverride?: string): string; export declare function getWorkspaceSessionRegistryPath(): string; export declare function listWorkspaceSessions(): WorkspaceSessionRegistry; export declare function validateManagedWorkspacePath(root: string, target: string): WorkspacePathValidationResult; export declare function runWorkspaceHook(kind: WorkspaceHookKind, session: WorkspaceSessionRecord, timeoutMs?: number): HookResult; export declare function createWorkspaceSession(input: CreateWorkspaceSessionInput): CreateWorkspaceSessionResult; export declare function removeWorkspaceSession(input: RemoveWorkspaceSessionInput): RemoveWorkspaceSessionResult; export declare function runWorkspaceSessionHook(input: RunWorkspaceSessionHookInput): RunWorkspaceSessionHookResult; //# sourceMappingURL=workspace-manager.d.ts.map