import type { FabricRisk } from "./protocol.js"; import { type FabricThinking } from "./thinking.js"; type FabricApprovalMode = "allow" | "ask" | "deny"; export type FabricSubagentTransport = "auto" | "process" | "tmux" | "screen" | "localterm" | "herdr"; export type FabricAgentRunner = "pi" | "claude"; export type FabricUiWidgetMode = "auto" | "always" | "hidden"; export type FabricResultFormat = "auto" | "yaml" | "json" | "text"; export type FabricExecutorRuntime = "quickjs" | "node-process"; type FabricCompactionEngine = "pi" | "fabric"; type FabricActorScope = "project" | "session"; interface FabricExecutorConfig { runtime: FabricExecutorRuntime; timeoutMs: number; memoryLimitBytes: number; maxOutputChars: number; maxNestedResultChars: number; resultFormat: FabricResultFormat; } export interface FabricApprovalConfig { read: FabricApprovalMode; write: FabricApprovalMode; execute: FabricApprovalMode; network: FabricApprovalMode; agent: FabricApprovalMode; } export interface FabricMcpConfig { enabled: boolean; configPath?: string; disableOAuth: boolean; allowDynamicServers: boolean; callTimeoutMs: number; } interface FabricClaudeRunnerConfig { binary: string; model?: string; } export interface FabricSubagentConfig { enabled: boolean; runner: FabricAgentRunner; transport: FabricSubagentTransport; model?: string; claude: FabricClaudeRunnerConfig; thinking: FabricThinking; maxConcurrent: number; maxPerExecution: number; maxDepth: number; timeoutMs: number; extensions: boolean; defaultTools: string[]; retainRuns: boolean; notifyOnComplete: boolean; budgetUsd: number; maxTokensPerChild: number; } export interface FabricToolCaptureConfig { enabled: boolean; hideFromModel: boolean; keepVisible: string[]; defaultRisk: FabricRisk; risks: Record; } export type FabricSchemaMode = "off" | "audit" | "enforce"; export interface FabricSchemaTrustedCommand { command: string; args: string[]; shell: boolean; timeoutMs: number; } export interface FabricSchemaConfig { mode: FabricSchemaMode; certificateTtlMs: number; maxFiles: number; maxBytes: number; trustedCommands: Record; } interface FabricUiConfig { enabled: boolean; widget: FabricUiWidgetMode; maxRows: number; refreshMs: number; eventHistory: number; haltOnEscape: boolean; showNestedToolCalls: boolean; nestedToolDebounceMs: number; } interface FabricCompactionConfig { engine: FabricCompactionEngine; targetContextRatio: number; } export interface FabricMeshConfig { enabled: boolean; root?: string; actorScope: FabricActorScope; maxEventBytes: number; maxReadEvents: number; actorPollMs: number; actorQueueLimit: number; eventContextChars: number; actorContextEntries: number; } export interface FabricMemoryConfig { enabled: boolean; indexDir?: string; maxSessions: number; maxEntryChars: number; indexThinking: boolean; indexToolOutput: boolean; hotSessions?: number; digestTerms?: number; maxColdVocabularyBytes?: number; maxColdCacheBytes?: number; maxSyncSessions?: number; maxSyncSourceBytes?: number; maxCacheCleanupFiles?: number; regexMaxPatternBytes?: number; regexMaxHaystackTerms?: number; regexMaxHaystackBytes?: number; regexTimeoutMs?: number; } export interface FabricConfig { fullCodeMode: boolean; executor: FabricExecutorConfig; approvals: FabricApprovalConfig; mcp: FabricMcpConfig; subagents: FabricSubagentConfig; capture: FabricToolCaptureConfig; ui: FabricUiConfig; compaction: FabricCompactionConfig; mesh: FabricMeshConfig; memory: FabricMemoryConfig; schema: FabricSchemaConfig; } export declare const MIN_SUBAGENT_TIMEOUT_MS = 1000; export declare const MAX_SUBAGENT_TIMEOUT_MS: number; export declare const QUICKJS_MAX_MEMORY_LIMIT_BYTES = 4294967295; export declare const MAX_EXECUTOR_MEMORY_LIMIT_BYTES: number; export declare const maxExecutorMemoryLimitBytes: (runtime: FabricExecutorRuntime) => number; export declare const DEFAULT_FABRIC_CONFIG: FabricConfig; export declare const normalizeFabricConfig: (input: Record) => FabricConfig; export declare const effectiveToolCaptureConfig: (config: Pick & Partial>) => FabricToolCaptureConfig; export declare const loadFabricConfig: (options: { cwd: string; agentDir: string; projectTrusted: boolean; }) => FabricConfig; export declare const saveFabricConfig: (options: { cwd: string; agentDir: string; projectTrusted: boolean; }, partial: Record) => { scope: "global" | "project"; path: string; }; export {}; //# sourceMappingURL=config.d.ts.map