import type { WorkspaceOption, WorkspaceOptionSource } from './types.js'; import { EXECUTION_ENVIRONMENT_MODES, isExecutionEnvironmentMode, type ExecutionEnvironmentMode } from './execution-environment-mode.js'; export { EXECUTION_ENVIRONMENT_MODES, isExecutionEnvironmentMode }; export type { ExecutionEnvironmentMode }; export interface PreparedExecutionEnvironment { cwd: string; baseCwd: string; mode: ExecutionEnvironmentMode; repoRoot?: string; branch?: string; worktreePath?: string; lockPath?: string; reason?: string; } export declare class ExecutionEnvironmentError extends Error { readonly userMessage: string; constructor(message: string, userMessage?: string); } interface WorkspaceResolverOption { id: string; cwd: string; } export interface ConfiguredWorkspaceOption extends WorkspaceResolverOption { label: string; description?: string; workspaceRootId?: string; workspaceRelativePath?: string; source?: WorkspaceOptionSource; } export interface SessionWorkspaceConfig { workspaceId?: string; model?: string; executionMode?: ExecutionEnvironmentMode; retiredWorkspaceConfig?: boolean; } export declare function normalizeOptionalString(value: unknown): string | undefined; export declare function isEnabledFlag(value: unknown): boolean; export declare function buildConversationEnvironmentKey(conversationId: string, workspaceCwd: string): string; export declare function buildWorkspaceOptionId(workspaceCwd: string): string; export declare function buildConfiguredWorkspaceOptions(primaryCwd: string, configured: string[]): ConfiguredWorkspaceOption[]; export declare function buildPublicWorkspaceOptions(workspaceOptions: Array & Partial>>): WorkspaceOption[]; export declare function readSessionWorkspaceConfig(raw: unknown): SessionWorkspaceConfig | null; export declare function resolveConfiguredWorkspaceCwd(input: { workspaceOptions: WorkspaceResolverOption[]; config: { workspaceId?: string; retiredWorkspaceConfig?: boolean; } | null; defaultCwd: string; }): string; export declare function buildConversationWorktreeSpec(input: { agentId: string; conversationId: string; workspaceCwd: string; }): { branch: string; worktreePath: string; }; export declare function prepareConversationEnvironment(input: { agentId: string; conversationId: string; workspaceCwd: string; allowWorktrees?: boolean; }): PreparedExecutionEnvironment; export declare function releaseConversationEnvironment(environment: Pick): void;