export interface AgentConfig {
    task_list_id?: string;
    tasks_dir?: string;
}
export interface TaskPrefixConfig {
    prefix: string;
    start_from?: number;
}
export interface CompletionGuardConfig {
    enabled?: boolean;
    min_work_seconds?: number;
    max_completions_per_window?: number;
    window_minutes?: number;
    cooldown_seconds?: number;
}
export interface WorkflowStateConfig {
    name: string;
    canonical_status: "pending" | "in_progress" | "completed" | "failed" | "cancelled";
    aliases?: string[];
    description?: string;
    transitions?: string[];
    terminal?: boolean;
    color?: string;
}
export interface LocalWorkflowStatesConfig {
    states: WorkflowStateConfig[];
}
export interface ProjectOverrideConfig {
    completion_guard?: CompletionGuardConfig;
    extension_sources?: string[];
    workflow_states?: LocalWorkflowStatesConfig;
}
export type WorkspacePermissionPreset = "restricted" | "readonly" | "standard" | "trusted";
export type RunnerSandboxNetworkPolicy = "none" | "local" | "full";
export interface WorkspaceTrustProfile {
    root: string;
    trusted: boolean;
    preset: WorkspacePermissionPreset;
    command_allowlist: string[];
    command_denylist: string[];
    tool_permissions: string[];
    write_scopes: string[];
    env_redactions: string[];
    require_prompt_for_unsafe: boolean;
    created_at?: string;
    updated_at?: string;
}
export interface RunnerSandboxProfile {
    name: string;
    root: string;
    command_allowlist: string[];
    command_denylist: string[];
    cwd_boundary: string;
    write_scopes: string[];
    env_allowlist: string[];
    env_redactions: string[];
    network_policy: RunnerSandboxNetworkPolicy;
    require_approval: boolean;
    audit_evidence: boolean;
    created_at?: string;
    updated_at?: string;
}
export interface AgentRunAdapterConfig {
    name: string;
    command: string;
    sandbox?: string;
    cwd?: string;
    env?: Record<string, string>;
    created_at?: string;
    updated_at?: string;
}
export interface ReviewRoutingRuleConfig {
    name: string;
    enabled: boolean;
    queue: string;
    reviewers: string[];
    tags: string[];
    priorities: Array<"low" | "medium" | "high" | "critical">;
    project_id: string | null;
    created_at?: string;
    updated_at?: string;
}
export type LocalRoadmapStatus = "planned" | "active" | "completed" | "archived";
export type LocalMilestoneStatus = "planned" | "active" | "completed" | "blocked" | "archived";
export interface LocalMilestoneConfig {
    id: string;
    roadmap_id: string;
    title: string;
    description: string | null;
    due_at: string | null;
    status: LocalMilestoneStatus;
    owner: string | null;
    agent_id: string | null;
    task_ids: string[];
    plan_ids: string[];
    run_ids: string[];
    release: string | null;
    tags: string[];
    created_at: string;
    updated_at: string;
}
export interface LocalReleaseGroupConfig {
    name: string;
    version: string | null;
    roadmap_id: string;
    status: LocalMilestoneStatus;
    milestone_ids: string[];
    task_ids: string[];
    plan_ids: string[];
    run_ids: string[];
    notes: string | null;
    created_at: string;
    updated_at: string;
}
export interface LocalRoadmapConfig {
    id: string;
    name: string;
    description: string | null;
    project_id: string | null;
    status: LocalRoadmapStatus;
    owner: string | null;
    agent_id: string | null;
    release: string | null;
    milestone_ids: string[];
    created_at: string;
    updated_at: string;
}
export interface LocalRoadmapStoreConfig {
    roadmaps: Record<string, LocalRoadmapConfig>;
    milestones: Record<string, LocalMilestoneConfig>;
    releases: Record<string, LocalReleaseGroupConfig>;
}
export interface LocalCapacityProfileConfig {
    id: string;
    agent_id: string;
    project_id: string | null;
    minutes_per_day: number;
    working_days: number[];
    effective_from: string | null;
    created_at: string;
    updated_at: string;
}
export interface LocalCapacityStoreConfig {
    profiles: Record<string, LocalCapacityProfileConfig>;
}
export interface LocalAuditLedgerCheckpointConfig {
    id: string;
    name: string;
    project_id: string | null;
    task_id: string | null;
    run_id: string | null;
    agent_id: string | null;
    note: string | null;
    entry_count: number;
    root_hash: string;
    first_entry_hash: string | null;
    last_entry_hash: string | null;
    source_counts: Record<string, number>;
    created_at: string;
}
export interface LocalAuditLedgerStoreConfig {
    checkpoints: Record<string, LocalAuditLedgerCheckpointConfig>;
}
export type VerificationProviderKind = "command" | "testbox" | "ci_log" | "browser" | "script";
export interface VerificationProviderRetryConfig {
    attempts?: number;
    backoff_ms?: number;
}
export interface VerificationProviderConfig {
    name: string;
    kind: VerificationProviderKind;
    command?: string;
    cwd?: string;
    env?: Record<string, string>;
    capabilities?: string[];
    retry?: VerificationProviderRetryConfig;
    timeout_ms?: number;
    created_at?: string;
    updated_at?: string;
}
export type LocalExtensionInstallStatus = "trusted" | "needs_review" | "incompatible";
export interface LocalExtensionManifest {
    schema_version?: number;
    name: string;
    version: string;
    description?: string;
    compatibility?: {
        todos?: string;
    };
    permissions?: string[];
    commands?: Array<{
        name: string;
        command?: string;
        description?: string;
        permissions?: string[];
        write_paths?: string[];
        env?: string[];
        network?: boolean;
    }>;
    mcp_tools?: Array<{
        name: string;
        description?: string;
        permissions?: string[];
    }>;
    templates?: Array<{
        name: string;
        kind?: string;
        description?: string;
        path?: string;
        content?: string;
        variables?: string[];
        permissions?: string[];
    }>;
    renderers?: Array<{
        name: string;
        target: string;
        description?: string;
        command?: string;
        template?: string;
        permissions?: string[];
        write_paths?: string[];
        env?: string[];
        network?: boolean;
    }>;
    hooks?: string[];
    checksum?: string;
    signature?: string;
    public_key?: string;
}
export interface LocalExtensionRecord {
    name: string;
    version: string;
    source: string;
    source_type: "manifest" | "directory" | "bundle";
    manifest: LocalExtensionManifest;
    checksum: string;
    signature_verified: boolean;
    trusted: boolean;
    status: LocalExtensionInstallStatus;
    warnings: string[];
    diagnostics?: Record<string, unknown>;
    installed_at: string;
    updated_at?: string;
}
export interface PolicyPackConfig {
    name: string;
    version: number;
    root: string;
    required_commands: string[];
    prohibited_commands: string[];
    prohibited_paths: string[];
    required_statuses: string[];
    require_passed_verification: boolean;
    require_commit: boolean;
    require_pull_request: boolean;
    require_approval: boolean;
    require_run: boolean;
    require_artifact: boolean;
    evidence_min_count: number;
    branch_pattern?: string;
    created_at?: string;
    updated_at?: string;
}
export type LocalEventHookTarget = "stdout" | "file" | "socket" | "script";
export interface LocalEventHookRetryConfig {
    attempts?: number;
    backoff_ms?: number;
}
export interface LocalEventHookConfig {
    name: string;
    enabled: boolean;
    events: string[];
    target: LocalEventHookTarget;
    file_path?: string;
    socket_path?: string;
    command?: string;
    cwd?: string;
    sandbox?: string;
    env?: Record<string, string>;
    retry?: LocalEventHookRetryConfig;
    created_at?: string;
    updated_at?: string;
}
export type TerminalNotificationSeverity = "info" | "warning" | "critical";
export type TerminalNotificationFormat = "line" | "json";
export interface TerminalNotificationQuietHoursConfig {
    start: string;
    end: string;
    timezone?: "utc" | "local";
}
export interface TerminalNotificationRuleConfig {
    name: string;
    enabled: boolean;
    events: string[];
    min_severity: TerminalNotificationSeverity;
    format: TerminalNotificationFormat;
    bell: boolean;
    task_statuses?: string[];
    priorities?: string[];
    agent_ids?: string[];
    project_ids?: string[];
    contains?: string[];
    quiet_hours?: TerminalNotificationQuietHoursConfig;
    created_at?: string;
    updated_at?: string;
}
export type LocalEncryptionAlgorithm = "aes-256-gcm";
export type LocalEncryptionKdf = "scrypt";
export interface LocalEncryptionProfileConfig {
    name: string;
    algorithm: LocalEncryptionAlgorithm;
    kdf: LocalEncryptionKdf;
    key_env: string;
    salt: string;
    description?: string;
    created_at?: string;
    updated_at?: string;
}
export interface SecretSafetyConfig {
    /** Additional local regex patterns to redact from comments, evidence, and exports. */
    redaction_patterns?: string[];
    /** Additional metadata/object key names whose values should be fully redacted. */
    redaction_keys?: string[];
}
export interface WatchRulePattern {
    name?: string;
    project_path?: string;
    events?: string[];
    enabled?: boolean;
    quiet?: boolean;
    bell?: boolean;
    desktop_notify?: boolean;
    hook_command?: string;
}
export interface TodosConfig {
    /** Local HTTP server URL used by SDK clients. Defaults to http://localhost:19427. */
    apiUrl?: string;
    /** API key for the local HTTP server when local API keys are enabled. */
    apiKey?: string;
    sync_agents?: string[] | string;
    task_list_id?: string;
    agent_tasks_dir?: string;
    agents?: Record<string, AgentConfig>;
    task_prefix?: TaskPrefixConfig;
    completion_guard?: CompletionGuardConfig;
    project_overrides?: Record<string, ProjectOverrideConfig>;
    /** Global pool of allowed agent names. Used when no project-specific pool matches. */
    agent_pool?: string[];
    /** Per-project agent name pools, keyed by working directory path prefix. */
    project_pools?: Record<string, string[]>;
    /** Local workspace trust profiles, keyed by absolute project root. */
    workspace_trust?: Record<string, WorkspaceTrustProfile>;
    /** Local runner sandbox profiles, keyed by profile name. */
    runner_sandboxes?: Record<string, RunnerSandboxProfile>;
    /** Local agent run adapters, keyed by adapter name. */
    agent_run_adapters?: Record<string, AgentRunAdapterConfig>;
    /** Local review routing rules for queue and reviewer defaults. */
    review_routing_rules?: Record<string, ReviewRoutingRuleConfig>;
    /** Local roadmap, milestone, and release grouping state. */
    local_roadmaps?: LocalRoadmapStoreConfig;
    /** Local planning capacity profiles, keyed by stable profile id. */
    local_capacity?: LocalCapacityStoreConfig;
    /** Optional tamper-evident local audit ledger checkpoints. */
    local_audit_ledgers?: LocalAuditLedgerStoreConfig;
    /** Optional local verification provider adapters, keyed by provider name. */
    verification_providers?: Record<string, VerificationProviderConfig>;
    /** Local extension registry entries, keyed by extension name. */
    extension_registry?: Record<string, LocalExtensionRecord>;
    /** Local extension manifest, directory, or bundle sources to discover. */
    extension_sources?: string[];
    /** Local custom workflow states mapped onto canonical task statuses. */
    workflow_states?: LocalWorkflowStatesConfig;
    /** Local policy packs for task done gates, keyed by pack name. */
    policy_packs?: Record<string, PolicyPackConfig>;
    /** Local event hooks and automation triggers, keyed by hook name. */
    local_event_hooks?: Record<string, LocalEventHookConfig>;
    /** Local terminal notification watch rules, keyed by rule name. */
    terminal_notification_rules?: Record<string, TerminalNotificationRuleConfig>;
    /** Local encryption profiles. Profiles store key references and nonsecret KDF salt only. */
    encryption_profiles?: Record<string, LocalEncryptionProfileConfig>;
    /** Local secret safety settings for offline redaction and export scanning. */
    secret_safety?: SecretSafetyConfig;
}
export declare function getConfigPath(): string;
export declare function resetConfig(): void;
export declare function loadConfig(): TodosConfig;
export declare function saveConfig(config: TodosConfig): TodosConfig;
export declare function updateConfig(patch: Partial<TodosConfig>): TodosConfig;
export declare function normalizeApiUrl(value: string | null | undefined): string | null;
export interface LocalApiConfig {
    apiUrl: string | null;
    apiKey: string | null;
    source: {
        apiUrl: "TODOS_URL" | "config" | "none";
        apiKey: "TODOS_API_KEY" | "config" | "none";
    };
}
export declare function getLocalApiConfig(env?: NodeJS.ProcessEnv): LocalApiConfig;
export declare function getSyncAgentsFromConfig(): string[] | null;
export declare function getAgentTaskListId(agent: string): string | null;
export declare function getAgentTasksDir(agent: string): string | null;
export declare function getTaskPrefixConfig(): TaskPrefixConfig | null;
/**
 * Get the agent name pool for a given working directory.
 * Checks project_pools for the longest matching path prefix, then falls back
 * to agent_pool. Returns null if no pool is configured (no name restriction).
 */
export declare function getAgentPoolForProject(workingDir?: string): string[] | null;
export declare function getCompletionGuardConfig(projectPath?: string | null): Required<CompletionGuardConfig>;
//# sourceMappingURL=config.d.ts.map