/**
 * Devcontainer Template Generator
 *
 * Generates .devcontainer/ configuration for agent isolated execution.
 * Uses a custom Dockerfile with network firewall for security isolation.
 */
import { ExecutionConfig, ExecutorType } from './types.js';
export type MountMode = 'worktree' | 'clone';
export interface DevcontainerOptions {
    agentName: string;
    agentDir: string;
    repoWorktrees?: string[];
    memory?: string;
    cpus?: number;
    timezone?: string;
    /** prlt channel: "npm", "npm:dev", "gh", "gh:dev", "mount", or version like "npm:1.2.3" */
    prltChannel?: string;
    /** Mount mode: 'worktree' needs parent repo mounts + git wrapper, 'clone' is self-contained */
    mountMode?: MountMode;
    /** Git user.name for commit attribution (detected from gh/git config on host) */
    gitUserName?: string;
    /** Git user.email for commit attribution (detected from gh/git config on host) */
    gitUserEmail?: string;
    /** Executor type - determines which CLI tools to install and which API domains to whitelist */
    executor?: ExecutorType;
}
export interface DevcontainerJson {
    name: string;
    build: {
        dockerfile: string;
        args?: Record<string, string>;
    };
    customizations: {
        vscode: {
            extensions: string[];
            settings?: Record<string, unknown>;
        };
    };
    capAdd: string[];
    runArgs: string[];
    remoteUser: string;
    mounts: string[];
    containerEnv?: Record<string, string>;
    workspaceFolder: string;
    postStartCommand: string;
    waitFor: string;
}
/**
 * Generate default devcontainer.json content
 *
 * Uses a custom Dockerfile with firewall for network isolation.
 * Mounts the entire agent workspace directory so all contents (repos, prompt files, etc.)
 * are accessible inside the container at /workspace.
 */
export declare function generateDevcontainerJson(options: DevcontainerOptions, config?: ExecutionConfig): DevcontainerJson;
/**
 * Generate Dockerfile content for the devcontainer.
 * Uses architecture auto-detection for cross-platform compatibility.
 */
export declare function generateDockerfile(options: DevcontainerOptions): string;
/**
 * Generate firewall initialization script.
 * Whitelists only necessary domains for the configured executor.
 * Claude Code requires api.anthropic.com; Codex requires api.openai.com.
 */
export declare function generateFirewallScript(executor?: ExecutorType, extraAllowedDomains?: string[]): string;
/**
 * Generate prlt setup script.
 * Rebuilds better-sqlite3 if prlt is mounted from host (not installed via npm).
 */
export declare function generatePrltSetupScript(): string;
/**
 * Create .devcontainer/ directory structure for an agent
 * Writes devcontainer.json, Dockerfile, and init-firewall.sh
 */
export declare function createDevcontainerConfig(options: DevcontainerOptions, config?: ExecutionConfig): void;
/**
 * Check if agent has devcontainer configuration
 */
export declare function hasDevcontainerConfig(agentDir: string): boolean;
/**
 * Read existing devcontainer.json
 */
export declare function readDevcontainerJson(agentDir: string): DevcontainerJson | null;
/**
 * Update devcontainer.json with new mounts (e.g., when new repo worktrees are added)
 *
 * Note: With the simplified mount strategy (entire agent workspace), this is mainly
 * for backwards compatibility or if someone wants to customize mounts.
 */
export declare function updateDevcontainerMounts(agentDir: string, _repoWorktrees: string[]): void;
/**
 * Get list of repo directories inside the agent workspace.
 * With the full workspace mount, this returns all non-hidden subdirectories
 * (excluding .devcontainer).
 */
export declare function getMountedRepos(agentDir: string): string[];
