LoadedConfig
This content is not available in your language yet.
loadConfig 顶层产物:合并配置 + 按层保留的 permissions + 装配后的 hooks。 契约的原始 permissions / hooks / mcpServers / policy / workspaceTrust 段 (contract-v0.6/v0.3/v0.4/v0.8)、http 段与 sandbox / update 段在合并前 被逐层抽取(段策略表 section-policy.ts),从不进入合并产物——此处以装配产物顶替同名键 (Omit 隔离两形态)。
Omit<MergedTansrConfig, |"permissions"|"hooks"|"mcpServers"|"policy"|"workspaceTrust"|"http"|"sandbox"|"update">
$schemaVersion
Section titled “$schemaVersion”$schemaVersion: 1;Omit.$schemaVersionaudit?
Section titled “audit?”optional audit?: { dir?: string; enabled?: boolean;};optional dir?: string;enabled?
Section titled “enabled?”optional enabled?: boolean;Omit.auditbudget?
Section titled “budget?”optional budget?: { maxTotalTokens?: number; maxUsd?: number; onExceeded: "block" | "warn";};maxTotalTokens?
Section titled “maxTotalTokens?”optional maxTotalTokens?: number;maxUsd?
Section titled “maxUsd?”optional maxUsd?: number;onExceeded
Section titled “onExceeded”onExceeded: "block" | "warn";Omit.budgetcontext?
Section titled “context?”optional context?: { activeScheme?: string; schemes?: Record<string, { displayName?: string; origin?: string; params?: Record<string, unknown>; parentId?: string; stage?: "test" | "production" | "experimental"; }>;};activeScheme?
Section titled “activeScheme?”optional activeScheme?: string;schemes?
Section titled “schemes?”optional schemes?: Record<string, { displayName?: string; origin?: string; params?: Record<string, unknown>; parentId?: string; stage?: "test" | "production" | "experimental";}>;Omit.contexteffort?
Section titled “effort?”optional effort?: "low" | "medium" | "high" | "max";Omit.effortfallbacks
Section titled “fallbacks”fallbacks: Record<string, string[]>;Omit.fallbackshooks: LoadedHooks;hooks 段分层抽取产物(可直接喂 HookEngineOptions.hooks)
http: LoadedHttpSection;http 段分层抽取产物(user/managed 被尊重,项目层忽略,远程 org 可下发,见 http-section.ts)
locale?
Section titled “locale?”optional locale?: string;Omit.localemcpServers
Section titled “mcpServers”mcpServers: McpServerEntry[];mcpServers 段分层抽取产物(可直接喂 attachMcpTools)
memory
Section titled “memory”memory: LoadedMemorySection;memory 段分层抽取产物(TMEM/1;user/managed 被尊重,项目层忽略,见 memory-section.ts)
model?
Section titled “model?”optional model?: { selected?: string;};selected?
Section titled “selected?”optional selected?: string;Omit.modelmodelAliases
Section titled “modelAliases”modelAliases: { fast?: string; main?: string; reasoning?: string;};optional fast?: string;optional main?: string;reasoning?
Section titled “reasoning?”optional reasoning?: string;Omit.modelAliasesnetwork?
Section titled “network?”optional network?: { twpIdleTimeoutMs?: number;};twpIdleTimeoutMs?
Section titled “twpIdleTimeoutMs?”optional twpIdleTimeoutMs?: number;Omit.networkoutputStyle?
Section titled “outputStyle?”optional outputStyle?: string;Omit.outputStylepermissions
Section titled “permissions”permissions: LoadedPermissions;policy
Section titled “policy”policy: LoadedPolicySection;policy 段分层抽取产物(contract-v0.8;仅 managed 层被尊重,见 managed-sections.ts)
providers
Section titled “providers”providers: Record<string, { auth?: { env: string; }; baseUrl: string; capability?: { background?: boolean; defaultContextWithoutModifier?: number; effectiveContext?: number; hostedTools?: string[]; inputModalities?: { document?: "supported" | "rejected" | "silently_dropped"; image?: "supported" | "rejected" | "silently_dropped"; }; maxContext?: number; maxOutput?: number; modelModifiers?: string[]; promptCaching?: { maxBreakpoints?: number; minCacheableTokens?: number; mode?: "explicit" | "implicit" | "ignored"; ttlSeconds?: number; }; quirks?: { claudeModelNameMapping?: boolean; countTokensEndpoint?: boolean; maxTokensExcludesReasoning?: boolean; minTimeoutMs?: number; modelsEndpoint?: boolean; stopSequences?: "ignored" | "honored" | "misreported_end_turn"; streamUsageLocation?: "message_start" | "message_delta" | "both"; systemRoleInMessages?: boolean; unknownModelFallback?: boolean; }; reasoning?: boolean; sampling?: { temperature?: { clampEpsilon?: number; max?: number; maxExclusive?: boolean; min?: number; minExclusive?: boolean; }; temperatureFixed?: number; temperatureRange?: [number, number]; }; thinking?: { budgetTokens?: "ignored" | "honored"; cannotDisable?: boolean; effortParam?: string; mustEchoBack?: boolean; signatureShape?: "opaque" | "always_empty" | "absent"; toggleValues?: string[]; }; thinkingOptional?: boolean; toolChoice?: boolean; vision?: boolean; }; models: Record<string, string>; pricing?: Record<string, { cachedInputPerMillion?: number; inputPerMillion: number; outputPerMillion: number; peakMultiplier?: number; tiers?: { cachedInputPerMillion?: number; inputPerMillion: number; outputPerMillion: number; upToInputTokens?: number; }[]; }>; protocol: "anthropic" | "openai" | "openai-responses" | "twp";}>;Omit.providerssandbox
Section titled “sandbox”sandbox: LoadedSandboxSection;sandbox 段分层抽取产物(user/managed 被尊重,项目层忽略,env 对 managed 只收紧,见 sandbox-section.ts)
semanticIndex?
Section titled “semanticIndex?”optional semanticIndex?: { branch?: string; repoId?: string; timeoutMs?: number; topK?: number; url?: string;};branch?
Section titled “branch?”optional branch?: string;repoId?
Section titled “repoId?”optional repoId?: string;timeoutMs?
Section titled “timeoutMs?”optional timeoutMs?: number;optional topK?: number;optional url?: string;Omit.semanticIndexstorage?
Section titled “storage?”optional storage?: { autoCheckpointBeforeCompact?: boolean; checkpoints?: { max?: number; maxAgeDays?: number; }; checkpointsDir?: string; segmentation?: { enabled?: boolean; maxBytes?: number; maxRecords?: number; }; sessionsDir?: string;};autoCheckpointBeforeCompact?
Section titled “autoCheckpointBeforeCompact?”optional autoCheckpointBeforeCompact?: boolean;checkpoints?
Section titled “checkpoints?”optional checkpoints?: { max?: number; maxAgeDays?: number;};checkpoints.max?
Section titled “checkpoints.max?”optional max?: number;checkpoints.maxAgeDays?
Section titled “checkpoints.maxAgeDays?”optional maxAgeDays?: number;checkpointsDir?
Section titled “checkpointsDir?”optional checkpointsDir?: string;segmentation?
Section titled “segmentation?”optional segmentation?: { enabled?: boolean; maxBytes?: number; maxRecords?: number;};segmentation.enabled?
Section titled “segmentation.enabled?”optional enabled?: boolean;segmentation.maxBytes?
Section titled “segmentation.maxBytes?”optional maxBytes?: number;segmentation.maxRecords?
Section titled “segmentation.maxRecords?”optional maxRecords?: number;sessionsDir?
Section titled “sessionsDir?”optional sessionsDir?: string;Omit.storagetelemetry
Section titled “telemetry”telemetry: { enabled: boolean;};enabled
Section titled “enabled”enabled: boolean;Omit.telemetryoptional ui?: { theme?: "dark" | "light" | "high-contrast" | "colorblind";};theme?
Section titled “theme?”optional theme?: "dark" | "light" | "high-contrast" | "colorblind";Omit.uiupdate
Section titled “update”update: LoadedUpdateSection;update 段分层抽取产物(user/managed 被尊重,项目层忽略,见 update-section.ts)
usageReporting?
Section titled “usageReporting?”optional usageReporting?: { enabled?: boolean;};enabled?
Section titled “enabled?”optional enabled?: boolean;Omit.usageReportingverify?
Section titled “verify?”optional verify?: { command?: string; timeoutMs?: number;};command?
Section titled “command?”optional command?: string;timeoutMs?
Section titled “timeoutMs?”optional timeoutMs?: number;Omit.verifywindow?
Section titled “window?”optional window?: { byModel?: Record<string, number>;};byModel?
Section titled “byModel?”optional byModel?: Record<string, number>;Omit.windowworkspaceTrust
Section titled “workspaceTrust”workspaceTrust: LoadedWorkspaceTrust;workspaceTrust 段分层抽取产物(contract-v0.8;仅 managed 层被尊重)
Was this page helpful?
Thanks for your feedback.