import type { ExecutionWorkspaceMode, IssueExecutionWorkspaceSettings, ProjectExecutionWorkspacePolicy } from "@paperclipai/shared";
type ParsedExecutionWorkspaceMode = Exclude<ExecutionWorkspaceMode, "inherit" | "reuse_existing">;
export declare function parseProjectExecutionWorkspacePolicy(raw: unknown): ProjectExecutionWorkspacePolicy | null;
export declare function gateProjectExecutionWorkspacePolicy(projectPolicy: ProjectExecutionWorkspacePolicy | null, isolatedWorkspacesEnabled: boolean): ProjectExecutionWorkspacePolicy | null;
export declare function parseIssueExecutionWorkspaceSettings(raw: unknown): IssueExecutionWorkspaceSettings | null;
export type ExecutionWorkspaceEnvironmentSource = "workspace" | "issue" | "project" | "agent" | "default";
export type ExecutionWorkspaceEnvironmentConflict = {
    reason: "reused_workspace_environment_mismatch";
    workspaceEnvironmentId: string;
    assigneeIntendedEnvironmentId: string;
    assigneeIntendedSource: Exclude<ExecutionWorkspaceEnvironmentSource, "workspace">;
};
export type ExecutionWorkspaceEnvironmentResolution = {
    environmentId: string;
    source: ExecutionWorkspaceEnvironmentSource;
    conflict: ExecutionWorkspaceEnvironmentConflict | null;
};
export declare function resolveExecutionWorkspaceEnvironmentId(input: {
    projectPolicy: ProjectExecutionWorkspacePolicy | null;
    issueSettings: IssueExecutionWorkspaceSettings | null;
    workspaceConfig: {
        environmentId?: string | null;
    } | null;
    agentDefaultEnvironmentId: string | null;
    defaultEnvironmentId: string;
}): ExecutionWorkspaceEnvironmentResolution;
export declare function defaultIssueExecutionWorkspaceSettingsForProject(projectPolicy: ProjectExecutionWorkspacePolicy | null): IssueExecutionWorkspaceSettings | null;
export declare function issueExecutionWorkspaceModeForPersistedWorkspace(mode: string | null | undefined): IssueExecutionWorkspaceSettings["mode"];
export declare function resolveExecutionWorkspaceMode(input: {
    projectPolicy: ProjectExecutionWorkspacePolicy | null;
    issueSettings: IssueExecutionWorkspaceSettings | null;
    legacyUseProjectWorkspace: boolean | null;
}): ParsedExecutionWorkspaceMode;
export declare function buildExecutionWorkspaceAdapterConfig(input: {
    agentConfig: Record<string, unknown>;
    projectPolicy: ProjectExecutionWorkspacePolicy | null;
    issueSettings: IssueExecutionWorkspaceSettings | null;
    mode: ParsedExecutionWorkspaceMode;
    legacyUseProjectWorkspace: boolean | null;
}): Record<string, unknown>;
export {};
//# sourceMappingURL=execution-workspace-policy.d.ts.map