import type { SandboxBackendRuntime } from "./backend.js";
import type { SandboxFsBridge } from "./fs-bridge.js";
import type { SandboxDockerConfig } from "./types.docker.js";
export type { SandboxDockerConfig } from "./types.docker.js";
export type SandboxToolPolicy = {
    allow?: string[];
    deny?: string[];
};
export type SandboxToolPolicySource = {
    source: "agent" | "global" | "default";
    /**
     * Config key path hint for humans.
     * (Arrays use `agents.list[].…` form.)
     */
    key: string;
};
export type SandboxToolPolicyResolved = {
    allow: string[];
    deny: string[];
    sources: {
        allow: SandboxToolPolicySource;
        deny: SandboxToolPolicySource;
    };
};
export type SandboxWorkspaceAccess = "none" | "ro" | "rw";
export type SandboxBrowserConfig = {
    enabled: boolean;
    image: string;
    containerPrefix: string;
    network: string;
    cdpPort: number;
    cdpSourceRange?: string;
    vncPort: number;
    noVncPort: number;
    headless: boolean;
    enableNoVnc: boolean;
    allowHostControl: boolean;
    autoStart: boolean;
    autoStartTimeoutMs: number;
    binds?: string[];
};
export type SandboxPruneConfig = {
    idleHours: number;
    maxAgeDays: number;
};
export type SandboxScope = "session" | "agent" | "shared";
export type SandboxSshConfig = {
    target?: string;
    command?: string;
    identityFile?: string;
    certificateFile?: string;
    strictHostKeyChecking?: boolean;
};
export type SandboxConfig = {
    mode: "off" | "non-main" | "all";
    backend?: string;
    scope: SandboxScope;
    workspaceAccess: SandboxWorkspaceAccess;
    workspaceRoot: string;
    docker: SandboxDockerConfig;
    browser: SandboxBrowserConfig;
    tools: SandboxToolPolicy;
    prune: SandboxPruneConfig;
};
export type SandboxBrowserContext = {
    bridgeUrl: string;
    noVncUrl?: string;
    containerName: string;
};
export type SandboxContext = {
    enabled: boolean;
    backendId?: string;
    backend?: SandboxBackendRuntime;
    sessionKey: string;
    workspaceDir: string;
    agentWorkspaceDir: string;
    workspaceAccess: SandboxWorkspaceAccess;
    runtimeId?: string;
    runtimeLabel?: string;
    containerName: string;
    containerWorkdir: string;
    docker: SandboxDockerConfig;
    tools: SandboxToolPolicy;
    browserAllowHostControl: boolean;
    browser?: SandboxBrowserContext;
    fsBridge?: SandboxFsBridge;
};
export type SandboxWorkspaceInfo = {
    workspaceDir: string;
    containerWorkdir: string;
};
