import type { Effort } from "@gajae-code/ai/model-thinking"; import { type EditMode } from "../utils/edit-mode"; import { type AutoroutingLocalIssue, type AutoroutingProvenance, type AutoroutingSetup, type AutoroutingTierMapInput } from "./autorouting-contract"; import type { ModelSelectorValue } from "./model-selector-value"; import { type SkillDiscoverySettings } from "./skill-settings-defaults"; /** Unified settings schema - single source of truth for all settings. * * Each setting is defined once here with: * - Type and default value * - Optional UI metadata (label, description, tab) * * The Settings singleton provides type-safe path-based access: * settings.get("compaction.enabled") // => boolean * settings.set("theme.dark", "red-claw") // sync, saves in background */ export type SettingTab = "appearance" | "model" | "interaction" | "context" | "memory" | "editing" | "tools" | "tasks" | "providers" | "notifications"; /** Tab display metadata - icon is resolved via theme.symbol() */ export type TabMetadata = { label: string; icon: `tab.${string}`; }; /** Ordered list of tabs for UI rendering */ export declare const SETTING_TABS: SettingTab[]; /** Tab display metadata - icon is a symbol key from theme.ts (tab.*) */ export declare const TAB_METADATA: Record; /** Status line segment identifiers */ export type StatusLineSegmentId = "gajae" | "pi" | "model" | "mode" | "path" | "git" | "pr" | "subagents" | "jobs" | "token_in" | "token_out" | "token_total" | "token_rate" | "cost" | "context_pct" | "context_total" | "time_spent" | "time" | "session" | "hostname" | "cache_read" | "cache_write" | "session_name" | "usage"; /** Submenu choice metadata. */ export type SubmenuOption = { value: V; label: string; description?: string; }; interface UiBase { tab: SettingTab; label: string; description: string; /** Condition function name - setting only shown when true */ condition?: string; /** * Persistence owner for settings which must not use the generic immediate * settings-list write path. */ editing?: "notification-atomic"; } interface UiBoolean extends UiBase { } interface UiEnum extends UiBase { /** Submenu options. When omitted, the enum renders as an inline toggle derived from `values`. */ options?: ReadonlyArray>; } interface UiNumber extends UiBase { /** Submenu options. Without options, a numeric setting has no UI representation (intentional hide). */ options?: ReadonlyArray; } interface UiString extends UiBase { /** * Submenu options. * - Array → submenu with these choices. * - "runtime" → submenu populated by the runtime layer (theme registry, etc.). * - Omitted → renders as a free text input. */ options?: ReadonlyArray | "runtime"; } /** Wide ui shape exposed to consumers that walk the schema generically. */ export type AnyUiMetadata = UiBase & { options?: ReadonlyArray | "runtime"; }; /** JSON Schema fragment carried by settings definitions that own nested validation. */ export type JsonSchemaObject = { [key: string]: unknown; type?: string; properties?: Record; additionalProperties?: boolean | JsonSchemaObject; items?: JsonSchemaObject; required?: readonly string[]; pattern?: string; minItems?: number; minLength?: number; uniqueItems?: boolean; minimum?: number; const?: unknown; }; interface BooleanDef { type: "boolean"; default?: boolean; ui?: UiBoolean; } interface StringDef { type: "string"; default: string | undefined; ui?: UiString; } interface NumberDef { type: "number"; default: number; validate?: (value: number) => boolean; ui?: UiNumber; } interface EnumDef { type: "enum"; values: T; default: T[number]; ui?: UiEnum; } interface ArrayDef { type: "array"; default: T[]; items?: { enum: readonly string[]; }; ui?: UiBase; } type RecordValueDef = { type: "model-selector-value"; } | { type: "string-enum"; values: readonly string[]; } | { type: "credential-selector"; }; interface ConstrainedRecordValueDef { type: "autorouting-selector-value"; pattern: string; description: string; } interface ConstrainedRecordDef { type: "constrained-record"; default: T; keys: readonly string[]; valueSchema: ConstrainedRecordValueDef; description?: string; ui?: UiBase; } interface RecordDef { type: "record"; default: Record; valueSchema?: RecordValueDef; ui?: UiBase; } export interface OptionalObjectDef { type: "optional-object"; default: undefined; jsonSchema: JsonSchemaObject; validate: (value: unknown) => AutoroutingLocalIssue[]; _value?: T; } export type SettingDef = BooleanDef | StringDef | NumberDef | EnumDef | ArrayDef | RecordDef | ConstrainedRecordDef | OptionalObjectDef; export interface ModelTagDef { name: string; color?: string; } export interface ModelTagsSettings { [key: string]: ModelTagDef; } export declare const DEFAULT_BASH_INTERCEPTOR_RULES: BashInterceptorRule[]; export declare const SETTINGS_SCHEMA: { readonly lastChangelogVersion: { readonly type: "string"; readonly default: undefined; }; readonly "auth.broker.url": { readonly type: "string"; readonly default: undefined; }; readonly "auth.broker.token": { readonly type: "string"; readonly default: undefined; }; readonly "auth.credentialRankingMode": { readonly type: "enum"; readonly values: readonly ["balanced", "earliest-reset"]; readonly default: "balanced"; readonly ui: { readonly tab: "providers"; readonly label: "Credential Ranking"; readonly description: "Choose balanced distribution or earliest-reset-first OAuth account selection."; }; }; readonly "auth.credentialPins": { readonly type: "record"; readonly default: Record; readonly valueSchema: { readonly type: "credential-selector"; }; }; readonly "auth.credentialPinStoreIdentity": { readonly type: "string"; readonly default: undefined; }; readonly "session.directoryMigration": { readonly type: "enum"; readonly values: readonly ["copy-retain", "disabled"]; readonly default: "copy-retain"; }; readonly "workspaceTree.mode": { readonly type: "enum"; readonly values: readonly ["eager", "lazy"]; readonly default: "eager"; readonly description: "When to scan the workspace tree used by the first prompt."; }; readonly "startup.networkPrewarm": { readonly type: "boolean"; readonly default: true; readonly description: "Preconnect the model host during startup before the first request."; }; readonly "sdk.promptDeadlineMs": { readonly type: "number"; readonly default: 1800000; readonly description: "SDK-owned prompt deadline; ACP has no separate timeout."; readonly validate: (value: number) => boolean; }; readonly "sdk.promptMaxRuntimeMs": { readonly type: "number"; readonly default: 21600000; readonly description: "Hard maximum runtime for an SDK prompt from acceptance, bounding progress-aware renewals."; readonly validate: (value: number) => boolean; }; readonly "notifications.enabled": { readonly type: "boolean"; readonly default: false; }; readonly "notifications.telegram.enabled": { readonly type: "boolean"; }; readonly "notifications.telegram.botToken": { readonly type: "string"; readonly default: undefined; readonly validate: (value: unknown) => value is string; }; readonly "notifications.telegram.chatId": { readonly type: "string"; readonly default: undefined; }; readonly "notifications.telegram.activation": { readonly type: "record"; readonly default: Record; }; readonly "notifications.telegram.btw.enabled": { readonly type: "boolean"; readonly default: true; }; readonly "notifications.telegram.streaming.enabled": { readonly type: "boolean"; readonly default: true; }; readonly "notifications.telegram.sound": { readonly type: "enum"; readonly values: readonly ["all", "important", "none"]; readonly default: "all"; readonly ui: { readonly tab: "notifications"; readonly label: "Telegram Notification Sounds"; readonly description: "Choose which Telegram notifications play a sound."; readonly editing: "notification-atomic"; }; }; readonly "notifications.telegram.rich.enabled": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "notifications"; readonly label: "Telegram Rich Messages"; readonly description: "Format Telegram notifications with rich message content."; readonly editing: "notification-atomic"; }; }; readonly "notifications.telegram.richDraft.enabled": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "notifications"; readonly label: "Telegram Rich Drafts"; readonly description: "Include rich draft updates in Telegram notifications."; readonly editing: "notification-atomic"; }; }; readonly "notifications.telegram.toolActivity.enabled": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "notifications"; readonly label: "Telegram Tool Activity"; readonly description: "Send Telegram updates for tool starts and completions."; readonly editing: "notification-atomic"; }; }; readonly "notifications.telegram.topics.nameTemplate": { readonly type: "string"; readonly default: undefined; }; readonly "notifications.discord.enabled": { readonly type: "boolean"; }; readonly "notifications.discord.botToken": { readonly type: "string"; readonly default: undefined; }; readonly "notifications.discord.applicationId": { readonly type: "string"; readonly default: undefined; }; readonly "notifications.discord.guildId": { readonly type: "string"; readonly default: undefined; }; readonly "notifications.discord.parentChannelId": { readonly type: "string"; readonly default: undefined; }; readonly "notifications.slack.enabled": { readonly type: "boolean"; }; readonly "notifications.slack.botToken": { readonly type: "string"; readonly default: undefined; }; readonly "notifications.slack.appToken": { readonly type: "string"; readonly default: undefined; }; readonly "notifications.slack.workspaceId": { readonly type: "string"; readonly default: undefined; }; readonly "notifications.slack.channelId": { readonly type: "string"; readonly default: undefined; }; readonly "notifications.slack.authorizedUserId": { readonly type: "string"; readonly default: undefined; }; readonly "notifications.redact": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "notifications"; readonly label: "Redact Notification Content"; readonly description: "Redact sensitive content before notifications are delivered."; readonly editing: "notification-atomic"; }; }; readonly "notifications.verbosity": { readonly type: "string"; readonly default: "lean"; readonly validate: (value: string) => value is "lean" | "verbose"; readonly ui: { readonly tab: "notifications"; readonly label: "Notification Verbosity"; readonly description: "Choose concise or detailed notification messages."; readonly options: readonly [{ readonly value: "lean"; readonly label: "Lean"; readonly description: "Send concise notification messages"; }, { readonly value: "verbose"; readonly label: "Verbose"; readonly description: "Send detailed notification messages"; }]; readonly editing: "notification-atomic"; }; }; readonly "notifications.sessionScope": { readonly type: "string"; readonly default: "all"; readonly validate: (value: string) => value is "all" | "primary"; readonly ui: { readonly tab: "notifications"; readonly label: "Notification Session Scope"; readonly description: "Send notifications from all sessions or only the primary session."; readonly options: readonly [{ readonly value: "all"; readonly label: "All Sessions"; readonly description: "Allow eligible sessions"; }, { readonly value: "primary"; readonly label: "Primary Session"; readonly description: "Limit automatic notifications to the primary session"; }]; readonly editing: "notification-atomic"; }; }; readonly "notifications.daemon.idleTimeoutMs": { readonly type: "number"; readonly default: 60000; readonly validate: (value: number) => boolean; }; readonly "notifications.terminalBell": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "interaction"; readonly label: "Terminal Bell"; readonly description: "Emit a BEL character for local terminal notifications. macOS enables this by default unless explicitly disabled. Windows Terminal may keep BEL silent depending on profile/system sound settings; use completion.notifyCommand for a PowerShell Console.Beep workaround."; }; }; readonly "notifications.bellOnComplete": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "interaction"; readonly label: "Bell on Completion"; readonly description: "Ring the terminal bell when an agent turn completes"; }; }; readonly "notifications.bellOnApproval": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "interaction"; readonly label: "Bell on Approval"; readonly description: "Ring the terminal bell when a plan or approval prompt needs attention"; }; }; readonly "notifications.bellOnAsk": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "interaction"; readonly label: "Bell on Ask"; readonly description: "Ring the terminal bell when an ask/user-input prompt needs attention"; }; }; readonly autoResume: { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "interaction"; readonly label: "Auto Resume"; readonly description: "Automatically resume the most recent session in the current directory"; }; }; readonly "power.preventIdleSleep": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "interaction"; readonly label: "Prevent Idle Sleep (macOS)"; readonly description: "caffeinate -i: keep the system awake while a session is open"; }; }; readonly "power.preventSystemSleep": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "interaction"; readonly label: "Prevent System Sleep on AC (macOS)"; readonly description: "caffeinate -s: block all system sleep while on AC power"; }; }; readonly "power.declareUserActive": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "interaction"; readonly label: "Declare User Active (macOS)"; readonly description: "caffeinate -u: keep the display lit and treat the user as active"; }; }; readonly "power.preventDisplaySleep": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "interaction"; readonly label: "Prevent Display Sleep (macOS)"; readonly description: "caffeinate -d: keep the display from idle-sleeping while a session is open"; }; }; readonly shellPath: { readonly type: "string"; readonly default: undefined; }; readonly extensions: { readonly type: "array"; readonly default: string[]; }; readonly "marketplace.autoUpdate": { readonly type: "enum"; readonly values: readonly ["off", "notify", "auto"]; readonly default: "off"; }; readonly enabledModels: { readonly type: "array"; readonly default: string[]; }; readonly disabledProviders: { readonly type: "array"; readonly default: string[]; }; readonly disabledExtensions: { readonly type: "array"; readonly default: string[]; }; readonly modelRoles: { readonly type: "record"; readonly default: Record; readonly valueSchema: { readonly type: "model-selector-value"; }; }; readonly "modelProfile.default": { readonly type: "string"; readonly default: undefined; readonly ui: { readonly tab: "model"; readonly label: "Default Model Profile"; readonly description: "Model profile applied automatically at startup"; readonly options: "runtime"; }; }; readonly "modelProfile.proxyProvider": { readonly type: "string"; readonly default: undefined; readonly ui: { readonly tab: "model"; readonly label: "Proxy Provider"; readonly description: "Configured OpenAI-compatible proxy/gateway provider id (e.g. litellm) used by built-in model presets. Leave unset to keep direct provider endpoints."; }; }; readonly "modelProfile.proxyMode": { readonly type: "enum"; readonly values: readonly ["fallback", "always"]; readonly default: "fallback"; readonly ui: { readonly tab: "model"; readonly label: "Proxy Routing Mode"; readonly description: "fallback routes only selectors whose direct provider lacks credentials; always routes every proxy-routable built-in preset selector through the configured proxy."; readonly options: readonly [{ readonly value: "fallback"; readonly label: "Fallback"; readonly description: "Use the proxy only when direct provider credentials are unavailable"; }, { readonly value: "always"; readonly label: "Always"; readonly description: "Route proxy-routable built-in preset selectors through the proxy"; }]; }; }; readonly "session.resumeModelBehavior": { readonly type: "enum"; readonly values: readonly ["keepSessionModel", "useCurrentDefault", "ask"]; readonly default: "keepSessionModel"; readonly ui: { readonly tab: "model"; readonly label: "Resume Model Behavior"; readonly description: "When resuming a session: keep the model that session last used, switch to the currently configured default model, or ask (TUI only; falls back to keeping the session's model in headless/CLI resume)."; readonly options: readonly [{ readonly value: "keepSessionModel"; readonly label: "Keep session's saved model"; }, { readonly value: "useCurrentDefault"; readonly label: "Use current default model"; }, { readonly value: "ask"; readonly label: "Ask on resume (TUI only)"; }]; }; }; readonly modelTags: { readonly type: "record"; readonly default: ModelTagsSettings; }; readonly modelProviderOrder: { readonly type: "array"; readonly default: string[]; readonly ui: { readonly tab: "providers"; readonly label: "Provider Priority Order"; readonly description: "Ordered provider priority for automatic model resolution. Providers listed earlier win ties; omitted providers fall back to curated ranking. Unavailable saved entries are retained and skipped at runtime."; }; }; readonly cycleOrder: { readonly type: "array"; readonly default: string[]; }; readonly "gjc.deepInterview.ambiguityThreshold": { readonly type: "number"; readonly default: 0.05; readonly validate: (value: number) => boolean; }; readonly "gjc.ralplan.autoHandoff": { readonly type: "enum"; readonly values: readonly ["off", "ultragoal", "autoresearch"]; readonly default: "off"; }; readonly "gjc.ralplan.maxIterations": { readonly type: "number"; readonly default: 5; readonly validate: (value: number) => boolean; }; readonly "gjc.ralplan.maxReviewPassesPerLane": { readonly type: "number"; readonly default: 1; readonly validate: (value: number) => boolean; }; readonly "gjc.ultragoal.nudgeBudget": { readonly type: "number"; readonly default: 10; readonly validate: (value: number) => boolean; }; readonly "ui.language": { readonly type: "enum"; readonly values: readonly ["en", "ko"]; readonly default: "en"; readonly ui: { readonly tab: "appearance"; readonly label: "Language"; readonly description: "Language for human-facing interactive UI text"; readonly options: readonly [{ readonly value: "en"; readonly label: "English"; }, { readonly value: "ko"; readonly label: "Korean (한국어)"; }]; }; }; readonly "theme.dark": { readonly type: "string"; readonly default: "red-claw"; readonly ui: { readonly tab: "appearance"; readonly label: "Dark Theme"; readonly description: "Theme used when terminal has dark background"; readonly options: "runtime"; }; }; readonly "theme.light": { readonly type: "string"; readonly default: "blue-crab"; readonly ui: { readonly tab: "appearance"; readonly label: "Light Theme"; readonly description: "Theme used when terminal has light background"; readonly options: "runtime"; }; }; readonly "theme.watchFiles": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "appearance"; readonly label: "Watch Theme Files"; readonly description: "Reload custom themes when their files change"; }; }; readonly symbolPreset: { readonly type: "enum"; readonly values: readonly ["unicode", "nerd", "ascii"]; readonly default: "unicode"; readonly ui: { readonly tab: "appearance"; readonly label: "Symbol Preset"; readonly description: "Icon/symbol style"; readonly options: readonly [{ readonly value: "unicode"; readonly label: "Unicode"; readonly description: "Standard symbols (default)"; }, { readonly value: "nerd"; readonly label: "Nerd Font"; readonly description: "Requires Nerd Font"; }, { readonly value: "ascii"; readonly label: "ASCII"; readonly description: "Maximum compatibility"; }]; }; }; readonly "syntaxHighlighting.enabled": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "appearance"; readonly label: "Syntax Highlighting"; readonly description: "Highlight code blocks and diffs when rendering"; }; }; readonly colorBlindMode: { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "appearance"; readonly label: "Color-Blind Mode"; readonly description: "Use blue instead of green for diff additions"; }; }; readonly "statusLine.watchGitHead": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "appearance"; readonly label: "Watch Git HEAD"; readonly description: "Refresh status-line git data when HEAD changes"; }; }; readonly "statusLine.preset": { readonly type: "enum"; readonly values: readonly ["default", "default-usage", "minimal", "compact", "full", "nerd", "ascii", "custom"]; readonly default: "default"; readonly ui: { readonly tab: "appearance"; readonly label: "Status Line Preset"; readonly description: "Pre-built status line configurations"; readonly options: readonly [{ readonly value: "default"; readonly label: "Default"; readonly description: "Model, path, git, context, tokens, cost"; }, { readonly value: "default-usage"; readonly label: "Default + Usage"; readonly description: "Default layout with provider usage quota"; }, { readonly value: "minimal"; readonly label: "Minimal"; readonly description: "Path and git only"; }, { readonly value: "compact"; readonly label: "Compact"; readonly description: "Model, git, cost, context"; }, { readonly value: "full"; readonly label: "Full"; readonly description: "All segments including time"; }, { readonly value: "nerd"; readonly label: "Nerd"; readonly description: "Maximum info with Nerd Font icons"; }, { readonly value: "ascii"; readonly label: "ASCII"; readonly description: "No special characters"; }, { readonly value: "custom"; readonly label: "Custom"; readonly description: "User-defined segments"; }]; }; }; readonly "statusLine.separator": { readonly type: "enum"; readonly values: readonly ["powerline", "powerline-thin", "slash", "pipe", "block", "none", "ascii"]; readonly default: "slash"; readonly ui: { readonly tab: "appearance"; readonly label: "Status Line Separator"; readonly description: "Style of separators between segments"; readonly options: readonly [{ readonly value: "powerline"; readonly label: "Powerline"; readonly description: "Solid arrows (Nerd Font)"; }, { readonly value: "powerline-thin"; readonly label: "Thin chevron"; readonly description: "Thin arrows (Nerd Font)"; }, { readonly value: "slash"; readonly label: "Slash"; readonly description: "Forward slashes"; }, { readonly value: "pipe"; readonly label: "Pipe"; readonly description: "Vertical pipes"; }, { readonly value: "block"; readonly label: "Block"; readonly description: "Solid blocks"; }, { readonly value: "none"; readonly label: "None"; readonly description: "Space only"; }, { readonly value: "ascii"; readonly label: "ASCII"; readonly description: "Greater-than signs"; }]; }; }; readonly "statusLine.sessionAccent": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "appearance"; readonly label: "Session Accent"; readonly description: "Use the session name color for the editor border and status line gap"; }; }; readonly "pet.mode": { readonly type: "enum"; readonly values: readonly ["off", "red", "blue", "ouroboros"]; readonly default: "off"; readonly ui: { readonly tab: "appearance"; readonly label: "Gajae Pet"; readonly description: "Animated pet beside the composer (pixel graphics where supported; text cells elsewhere)"; readonly options: readonly [{ readonly value: "off"; readonly label: "Off"; readonly description: "No pet"; }, ...{ value: "blue" | "ouroboros" | "red"; label: string; description: string; }[]]; }; }; readonly "statusLine.maxRows": { readonly type: "number"; readonly default: 1; readonly ui: { readonly tab: "appearance"; readonly label: "Status Line Rows"; readonly description: "Maximum rows for the status line. When greater than 1, overflowing segments wrap onto additional rows instead of being dropped."; readonly options: readonly [{ readonly value: "1"; readonly label: "1 row"; readonly description: "Single line; overflow is truncated (default)"; }, { readonly value: "2"; readonly label: "2 rows"; readonly description: "Wrap overflow onto a second row"; }, { readonly value: "3"; readonly label: "3 rows"; readonly description: "Wrap overflow across up to three rows"; }]; }; }; readonly "tools.artifactSpillThreshold": { readonly type: "number"; readonly default: 50; readonly ui: { readonly tab: "tools"; readonly label: "Artifact spill threshold (KB)"; readonly description: "Tool output above this size is saved as an artifact; tail is kept inline"; readonly options: readonly [{ readonly value: "1"; readonly label: "1 KB"; readonly description: "~250 tokens"; }, { readonly value: "2.5"; readonly label: "2.5 KB"; readonly description: "~625 tokens"; }, { readonly value: "5"; readonly label: "5 KB"; readonly description: "~1.25K tokens"; }, { readonly value: "10"; readonly label: "10 KB"; readonly description: "~2.5K tokens"; }, { readonly value: "20"; readonly label: "20 KB"; readonly description: "~5K tokens"; }, { readonly value: "30"; readonly label: "30 KB"; readonly description: "~7.5K tokens"; }, { readonly value: "50"; readonly label: "50 KB"; readonly description: "Default; ~12.5K tokens"; }, { readonly value: "75"; readonly label: "75 KB"; readonly description: "~19K tokens"; }, { readonly value: "100"; readonly label: "100 KB"; readonly description: "~25K tokens"; }, { readonly value: "200"; readonly label: "200 KB"; readonly description: "~50K tokens"; }, { readonly value: "500"; readonly label: "500 KB"; readonly description: "~125K tokens"; }, { readonly value: "1000"; readonly label: "1 MB"; readonly description: "~250K tokens"; }]; }; }; readonly "tools.preAdmissionArtifactSpill": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "tools"; readonly label: "Pre-admission artifact spill"; readonly description: "Experimental opt-in: save oversized tool results before provider context construction, retaining a UTF-8-safe head, tail, digest, and artifact receipt inline"; }; }; readonly "tools.readArtifactSpillThreshold": { readonly type: "number"; readonly default: 256; readonly ui: { readonly tab: "tools"; readonly label: "Read artifact spill threshold (KB)"; readonly description: "Explicit large reads above this combined size are saved as an artifact with a bounded head-and-tail snippet inline. Bare reads, directories, and converted-document receipts remain inline."; readonly options: readonly [{ readonly value: "0"; readonly label: "Off"; readonly description: "No read-specific spill (backstop only)"; }, { readonly value: "50"; readonly label: "50 KB"; readonly description: "~12.5K tokens"; }, { readonly value: "100"; readonly label: "100 KB"; readonly description: "~25K tokens"; }, { readonly value: "256"; readonly label: "256 KB"; readonly description: "Default; ~64K tokens"; }, { readonly value: "512"; readonly label: "512 KB"; readonly description: "~128K tokens"; }, { readonly value: "1000"; readonly label: "1 MB"; readonly description: "~250K tokens"; }]; }; }; readonly "tools.fileMentionInlineBytes": { readonly type: "number"; readonly default: 10; readonly ui: { readonly tab: "tools"; readonly label: "File-mention inline cap (KB)"; readonly description: "Inline byte cap for auto-read `@path` file mentions, aligned with the 10 KiB bare-read receipt so incidental mentions stay within the same bounded context budget. The full file is still available via the read tool."; readonly options: readonly [{ readonly value: "5"; readonly label: "5 KB"; readonly description: "~1.25K tokens"; }, { readonly value: "10"; readonly label: "10 KB"; readonly description: "Default; ~2.5K tokens"; }, { readonly value: "20"; readonly label: "20 KB"; readonly description: "~5K tokens"; }, { readonly value: "50"; readonly label: "50 KB"; readonly description: "~12.5K tokens (matches bare-read receipt)"; }]; }; }; readonly "tools.artifactTailBytes": { readonly type: "number"; readonly default: 20; readonly ui: { readonly tab: "tools"; readonly label: "Artifact tail size (KB)"; readonly description: "Amount of tail content kept inline when output spills to artifact"; readonly options: readonly [{ readonly value: "1"; readonly label: "1 KB"; readonly description: "~250 tokens"; }, { readonly value: "2.5"; readonly label: "2.5 KB"; readonly description: "~625 tokens"; }, { readonly value: "5"; readonly label: "5 KB"; readonly description: "~1.25K tokens"; }, { readonly value: "10"; readonly label: "10 KB"; readonly description: "~2.5K tokens"; }, { readonly value: "20"; readonly label: "20 KB"; readonly description: "Default; ~5K tokens"; }, { readonly value: "50"; readonly label: "50 KB"; readonly description: "~12.5K tokens"; }, { readonly value: "100"; readonly label: "100 KB"; readonly description: "~25K tokens"; }, { readonly value: "200"; readonly label: "200 KB"; readonly description: "~50K tokens"; }]; }; }; readonly "tools.artifactHeadBytes": { readonly type: "number"; readonly default: 20; readonly ui: { readonly tab: "tools"; readonly label: "Artifact head size (KB)"; readonly description: "Amount of head content kept inline alongside the tail when output spills to artifact (middle elision). 0 disables — keep tail only."; readonly options: readonly [{ readonly value: "0"; readonly label: "0 KB"; readonly description: "Disabled; tail-only truncation"; }, { readonly value: "1"; readonly label: "1 KB"; readonly description: "~250 tokens"; }, { readonly value: "2.5"; readonly label: "2.5 KB"; readonly description: "~625 tokens"; }, { readonly value: "5"; readonly label: "5 KB"; readonly description: "~1.25K tokens"; }, { readonly value: "10"; readonly label: "10 KB"; readonly description: "~2.5K tokens"; }, { readonly value: "20"; readonly label: "20 KB"; readonly description: "Default; ~5K tokens"; }, { readonly value: "50"; readonly label: "50 KB"; readonly description: "~12.5K tokens"; }, { readonly value: "100"; readonly label: "100 KB"; readonly description: "~25K tokens"; }, { readonly value: "200"; readonly label: "200 KB"; readonly description: "~50K tokens"; }]; }; }; readonly "tools.outputMaxColumns": { readonly type: "number"; readonly default: 768; readonly ui: { readonly tab: "tools"; readonly label: "Output column cap"; readonly description: "Per-line byte cap for streaming tool outputs (bash, ssh, python, js eval) and `read`. Lines wider than this are ellipsis-truncated; remaining bytes up to the next newline are dropped. 0 disables."; readonly options: readonly [{ readonly value: "0"; readonly label: "Off"; readonly description: "No per-line cap"; }, { readonly value: "256"; readonly label: "256"; readonly description: "Tight"; }, { readonly value: "512"; readonly label: "512"; }, { readonly value: "768"; readonly label: "768"; readonly description: "Default"; }, { readonly value: "1024"; readonly label: "1024"; }, { readonly value: "2048"; readonly label: "2048"; }, { readonly value: "4096"; readonly label: "4096"; readonly description: "Loose"; }]; }; }; readonly "tools.artifactTailLines": { readonly type: "number"; readonly default: 500; readonly ui: { readonly tab: "tools"; readonly label: "Artifact tail lines"; readonly description: "Maximum lines of tail content kept inline when output spills to artifact"; readonly options: readonly [{ readonly value: "50"; readonly label: "50 lines"; readonly description: "~250 tokens"; }, { readonly value: "100"; readonly label: "100 lines"; readonly description: "~500 tokens"; }, { readonly value: "250"; readonly label: "250 lines"; readonly description: "~1.25K tokens"; }, { readonly value: "500"; readonly label: "500 lines"; readonly description: "Default; ~2.5K tokens"; }, { readonly value: "1000"; readonly label: "1000 lines"; readonly description: "~5K tokens"; }, { readonly value: "2000"; readonly label: "2000 lines"; readonly description: "~10K tokens"; }, { readonly value: "5000"; readonly label: "5000 lines"; readonly description: "~25K tokens"; }]; }; }; readonly "tools.maxInlineResultBytes": { readonly type: "number"; readonly default: 0; readonly ui: { readonly tab: "tools"; readonly label: "Max inline tool-result size (KB)"; readonly description: "Absolute backstop cap on inline tool-result text, enforced after artifact spill for every tool (including read and tools that set their own partial artifact meta). Output above this size is force-saved as an artifact and truncated to head+tail. 0 disables (default; opt-in pending measurement)."; readonly options: readonly [{ readonly value: "0"; readonly label: "Off"; readonly description: "Disabled; no absolute inline cap"; }, { readonly value: "20"; readonly label: "20 KB"; readonly description: "~5K tokens"; }, { readonly value: "30"; readonly label: "30 KB"; readonly description: "~7.5K tokens"; }, { readonly value: "50"; readonly label: "50 KB"; readonly description: "~12.5K tokens"; }, { readonly value: "75"; readonly label: "75 KB"; readonly description: "~19K tokens"; }, { readonly value: "100"; readonly label: "100 KB"; readonly description: "~25K tokens"; }]; }; }; readonly "statusLine.showHookStatus": { readonly type: "boolean"; readonly default: false; }; readonly "statusLine.showSkillHud": { readonly type: "boolean"; readonly default: true; }; readonly "statusLine.showActionHints": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "appearance"; readonly label: "Composer Shortcut Hints"; readonly description: "Show contextual keyboard shortcuts in the composer placeholder"; }; }; readonly "statusLine.leftSegments": { readonly type: "array"; readonly default: StatusLineSegmentId[]; }; readonly "statusLine.rightSegments": { readonly type: "array"; readonly default: StatusLineSegmentId[]; }; readonly "statusLine.segmentOptions": { readonly type: "record"; readonly default: Record; }; readonly "terminal.showImages": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "appearance"; readonly label: "Show Inline Images"; readonly description: "Render images inline in terminal"; readonly condition: "hasImageProtocol"; }; }; readonly "images.autoResize": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "appearance"; readonly label: "Auto-Resize Images"; readonly description: "Resize large images to 2000x2000 max for better model compatibility"; }; }; readonly "images.blockImages": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "appearance"; readonly label: "Block Images"; readonly description: "Prevent images from being sent to LLM providers"; }; }; readonly "tui.maxInlineImageColumns": { readonly type: "number"; readonly default: 100; readonly description: "Maximum width in terminal columns for inline images (default 100). Set to 0 for unlimited (bounded only by terminal width)."; }; readonly "tui.maxInlineImageRows": { readonly type: "number"; readonly default: 20; readonly description: "Maximum height in terminal rows for inline images (default 20). Set to 0 to use only the viewport-based limit (60% of terminal height)."; }; readonly "tui.hyperlinks": { readonly type: "enum"; readonly values: readonly ["off", "auto", "always"]; readonly default: "auto"; readonly ui: { readonly tab: "appearance"; readonly label: "Terminal Hyperlinks"; readonly description: "Wrap file paths in OSC 8 hyperlinks for terminal-native click-to-open (auto: detect support; off: never; always: unconditional)"; }; }; readonly "display.tabWidth": { readonly type: "number"; readonly default: 3; }; readonly "display.shimmer": { readonly type: "enum"; readonly values: readonly ["classic", "kitt", "disabled"]; readonly default: "classic"; readonly ui: { readonly tab: "appearance"; readonly label: "Shimmer"; readonly description: "Animation style for working/loading messages"; readonly options: readonly [{ readonly value: "classic"; readonly label: "Classic"; readonly description: "Soft cosine wave sweeping across the text"; }, { readonly value: "kitt"; readonly label: "KITT Scanner"; readonly description: "Knight Rider 1982 red light bouncing left-right"; }, { readonly value: "disabled"; readonly label: "Disabled"; readonly description: "No animation; static muted text"; }]; }; }; readonly "display.showTokenUsage": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "appearance"; readonly label: "Show Token Usage"; readonly description: "Show per-turn token usage on assistant messages"; }; }; readonly showHardwareCursor: { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "appearance"; readonly label: "Show Hardware Cursor"; readonly description: "Show terminal cursor for IME support"; }; }; readonly clearOnShrink: { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "appearance"; readonly label: "Clear on Shrink"; readonly description: "Clear empty rows when content shrinks (may cause flicker)"; }; }; readonly defaultThinkingLevel: { readonly type: "enum"; readonly values: readonly ["off", ...Effort[]]; readonly default: Effort; readonly ui: { readonly tab: "model"; readonly label: "Thinking Level"; readonly description: "Reasoning depth for thinking-capable models"; readonly options: readonly import("../thinking-metadata").ThinkingLevelMetadata[]; }; }; readonly hideThinkingBlock: { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "model"; readonly label: "Hide Thinking Blocks"; readonly description: "Hide thinking blocks in assistant responses"; }; }; readonly repeatToolDescriptions: { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "model"; readonly label: "Repeat Tool Descriptions"; readonly description: "Render full tool descriptions in the system prompt instead of a tool name list"; }; }; readonly temperature: { readonly type: "number"; readonly default: -1; readonly ui: { readonly tab: "model"; readonly label: "Temperature"; readonly description: "Sampling temperature (0 = deterministic, 1 = creative, -1 = provider default)"; readonly options: readonly [{ readonly value: "-1"; readonly label: "Default"; readonly description: "Use provider default"; }, { readonly value: "0"; readonly label: "0"; readonly description: "Deterministic"; }, { readonly value: "0.2"; readonly label: "0.2"; readonly description: "Focused"; }, { readonly value: "0.5"; readonly label: "0.5"; readonly description: "Balanced"; }, { readonly value: "0.7"; readonly label: "0.7"; readonly description: "Creative"; }, { readonly value: "1"; readonly label: "1"; readonly description: "Maximum variety"; }]; }; }; readonly topP: { readonly type: "number"; readonly default: -1; readonly ui: { readonly tab: "model"; readonly label: "Top P"; readonly description: "Nucleus sampling cutoff (0-1, -1 = provider default)"; readonly options: readonly [{ readonly value: "-1"; readonly label: "Default"; readonly description: "Use provider default"; }, { readonly value: "0.1"; readonly label: "0.1"; readonly description: "Very focused"; }, { readonly value: "0.3"; readonly label: "0.3"; readonly description: "Focused"; }, { readonly value: "0.5"; readonly label: "0.5"; readonly description: "Balanced"; }, { readonly value: "0.9"; readonly label: "0.9"; readonly description: "Broad"; }, { readonly value: "1"; readonly label: "1"; readonly description: "No nucleus filtering"; }]; }; }; readonly topK: { readonly type: "number"; readonly default: -1; readonly ui: { readonly tab: "model"; readonly label: "Top K"; readonly description: "Sample from top-K tokens (-1 = provider default)"; readonly options: readonly [{ readonly value: "-1"; readonly label: "Default"; readonly description: "Use provider default"; }, { readonly value: "1"; readonly label: "1"; readonly description: "Greedy top token"; }, { readonly value: "20"; readonly label: "20"; readonly description: "Focused"; }, { readonly value: "40"; readonly label: "40"; readonly description: "Balanced"; }, { readonly value: "100"; readonly label: "100"; readonly description: "Broad"; }]; }; }; readonly minP: { readonly type: "number"; readonly default: -1; readonly ui: { readonly tab: "model"; readonly label: "Min P"; readonly description: "Minimum probability threshold (0-1, -1 = provider default)"; readonly options: readonly [{ readonly value: "-1"; readonly label: "Default"; readonly description: "Use provider default"; }, { readonly value: "0.01"; readonly label: "0.01"; readonly description: "Very permissive"; }, { readonly value: "0.05"; readonly label: "0.05"; readonly description: "Balanced"; }, { readonly value: "0.1"; readonly label: "0.1"; readonly description: "Strict"; }]; }; }; readonly presencePenalty: { readonly type: "number"; readonly default: -1; readonly ui: { readonly tab: "model"; readonly label: "Presence Penalty"; readonly description: "Penalty for introducing already-present tokens (-1 = provider default)"; readonly options: readonly [{ readonly value: "-1"; readonly label: "Default"; readonly description: "Use provider default"; }, { readonly value: "0"; readonly label: "0"; readonly description: "No penalty"; }, { readonly value: "0.5"; readonly label: "0.5"; readonly description: "Mild novelty"; }, { readonly value: "1"; readonly label: "1"; readonly description: "Encourage novelty"; }, { readonly value: "2"; readonly label: "2"; readonly description: "Strong novelty"; }]; }; }; readonly repetitionPenalty: { readonly type: "number"; readonly default: -1; readonly ui: { readonly tab: "model"; readonly label: "Repetition Penalty"; readonly description: "Penalty for repeated tokens (-1 = provider default)"; readonly options: readonly [{ readonly value: "-1"; readonly label: "Default"; readonly description: "Use provider default"; }, { readonly value: "0.8"; readonly label: "0.8"; readonly description: "Allow repetition"; }, { readonly value: "1"; readonly label: "1"; readonly description: "No penalty"; }, { readonly value: "1.1"; readonly label: "1.1"; readonly description: "Mild penalty"; }, { readonly value: "1.2"; readonly label: "1.2"; readonly description: "Balanced"; }, { readonly value: "1.5"; readonly label: "1.5"; readonly description: "Strong penalty"; }]; }; }; readonly serviceTier: { readonly type: "enum"; readonly values: readonly ["none", "auto", "default", "flex", "scale", "priority", "openai-only", "claude-only"]; readonly default: "none"; readonly ui: { readonly tab: "model"; readonly label: "Service Tier"; readonly description: 'Processing priority hint (none = omit). OpenAI accepts the tier values directly; Anthropic realizes `priority` as `speed: "fast"` on supported Opus models. Scoped values target one family.'; readonly options: readonly [{ readonly value: "none"; readonly label: "None"; readonly description: "Omit service_tier parameter"; }, { readonly value: "auto"; readonly label: "Auto"; readonly description: "Use provider default tier selection (OpenAI)"; }, { readonly value: "default"; readonly label: "Default"; readonly description: "Standard priority processing (OpenAI)"; }, { readonly value: "flex"; readonly label: "Flex"; readonly description: "Flexible capacity tier when available (OpenAI)"; }, { readonly value: "scale"; readonly label: "Scale"; readonly description: "Scale Tier credits when available (OpenAI)"; }, { readonly value: "priority"; readonly label: "Priority"; readonly description: "Priority on every supported provider (OpenAI `service_tier`, Anthropic fast mode)"; }, { readonly value: "openai-only"; readonly label: "Priority (OpenAI only)"; readonly description: "Priority on OpenAI/OpenAI-Codex requests; ignored elsewhere"; }, { readonly value: "claude-only"; readonly label: "Priority (Claude only)"; readonly description: "Anthropic fast mode on direct Claude requests; ignored elsewhere (incl. Bedrock/Vertex)"; }]; }; }; readonly "task.serviceTier": { readonly type: "enum"; readonly values: readonly ["inherit", "none", "auto", "default", "flex", "scale", "priority", "openai-only", "claude-only"]; readonly default: "inherit"; readonly ui: { readonly tab: "tasks"; readonly label: "Subagent Service Tier"; readonly description: 'Service tier applied to task-tool subagents only. "inherit" copies the main session tier; any explicit value overrides it for subagents without touching the main session.'; readonly options: readonly [{ readonly value: "inherit"; readonly label: "Inherit"; readonly description: "Use the main session's service tier (default)"; }, { readonly value: "none"; readonly label: "None"; readonly description: "Omit service_tier for subagents"; }, { readonly value: "auto"; readonly label: "Auto"; readonly description: "Use provider default tier selection (OpenAI)"; }, { readonly value: "default"; readonly label: "Default"; readonly description: "Standard priority processing (OpenAI)"; }, { readonly value: "flex"; readonly label: "Flex"; readonly description: "Flexible capacity tier when available (OpenAI)"; }, { readonly value: "scale"; readonly label: "Scale"; readonly description: "Scale Tier credits when available (OpenAI)"; }, { readonly value: "priority"; readonly label: "Priority"; readonly description: "Priority on every supported provider (OpenAI `service_tier`, Anthropic fast mode)"; }, { readonly value: "openai-only"; readonly label: "Priority (OpenAI only)"; readonly description: "Priority on OpenAI/OpenAI-Codex requests; ignored elsewhere"; }, { readonly value: "claude-only"; readonly label: "Priority (Claude only)"; readonly description: "Anthropic fast mode on direct Claude requests; ignored elsewhere (incl. Bedrock/Vertex)"; }]; }; }; readonly "fallback.maxAttempts": { readonly type: "number"; readonly default: 3; readonly validate: (value: number) => boolean; }; readonly "retry.enabled": { readonly type: "boolean"; readonly default: true; }; readonly "retry.maxRetries": { readonly type: "number"; readonly default: 3; readonly ui: { readonly tab: "model"; readonly label: "Retry Attempts"; readonly description: "Maximum retry attempts on API errors"; readonly options: readonly [{ readonly value: "1"; readonly label: "1 retry"; }, { readonly value: "2"; readonly label: "2 retries"; }, { readonly value: "3"; readonly label: "3 retries"; }, { readonly value: "5"; readonly label: "5 retries"; }, { readonly value: "10"; readonly label: "10 retries"; }]; }; }; readonly "retry.baseDelayMs": { readonly type: "number"; readonly default: 2000; }; readonly "retry.maxDelayMs": { readonly type: "number"; readonly default: number; readonly ui: { readonly tab: "model"; readonly label: "Max Retry Delay"; readonly description: "Maximum wait between retries, in ms. Legacy retries clamp provider Retry-After hints to this value; managed fallback honors typed Retry-After hints even when they exceed it."; }; }; readonly "retry.requestMaxRetries": { readonly type: "number"; readonly default: 5; readonly ui: { readonly tab: "model"; readonly label: "Provider Request Retries"; readonly description: "Maximum provider request retries before a stream is established. Counts retries, not the first attempt. Set to 0 to disable provider request retries."; }; }; readonly "retry.streamMaxRetries": { readonly type: "number"; readonly default: 5; readonly ui: { readonly tab: "model"; readonly label: "Provider Stream Retries"; readonly description: "Maximum provider stream replay retries for replay-safe transient stream failures. Counts retries, not the first attempt. Set to 0 to disable provider stream retries."; }; }; readonly "retry.streamFirstEventTimeoutMs": { readonly type: "number"; readonly default: 100000; readonly validate: (value: number) => boolean; readonly ui: { readonly tab: "model"; readonly label: "First Event Timeout"; readonly description: "Maximum wait for the first provider stream event, in ms. Set to 0 to disable the watchdog."; }; }; readonly "retry.fallbackChains": { readonly type: "record"; readonly default: Record; }; readonly "retry.fallbackRevertPolicy": { readonly type: "enum"; readonly values: readonly ["cooldown-expiry", "never"]; readonly default: "cooldown-expiry"; readonly ui: { readonly tab: "model"; readonly label: "Fallback Revert Policy"; readonly description: "When to return to the primary model after a fallback"; readonly options: readonly [{ readonly value: "cooldown-expiry"; readonly label: "Cooldown expiry"; readonly description: "Return to the primary model after its suppression window ends"; }, { readonly value: "never"; readonly label: "Never"; readonly description: "Stay on the fallback model until manually changed"; }]; }; }; readonly "history.enabled": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "interaction"; readonly label: "History"; readonly description: "Persist and search submitted prompts in local history"; }; }; readonly "mouse.enabled": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "interaction"; readonly label: "Mouse Support"; readonly description: "Enable GJC session scrolling, drag-to-copy text selection, double-click word and triple-click line selection, and overlay row selection with the mouse. Disabled by default to preserve native terminal or tmux scrollback and selection; while enabled, most terminals still reach their own selection with a modifier held (Option on macOS, Shift elsewhere), though that path copies only if the host terminal has its own copy-on-select enabled."; }; }; readonly steeringMode: { readonly type: "enum"; readonly values: readonly ["all", "one-at-a-time"]; readonly default: "one-at-a-time"; readonly ui: { readonly tab: "interaction"; readonly label: "Steering Mode"; readonly description: "How to process queued messages while agent is working"; }; }; readonly followUpMode: { readonly type: "enum"; readonly values: readonly ["all", "one-at-a-time"]; readonly default: "one-at-a-time"; readonly ui: { readonly tab: "interaction"; readonly label: "Follow-Up Mode"; readonly description: "How to drain follow-up messages after a turn completes"; }; }; readonly interruptMode: { readonly type: "enum"; readonly values: readonly ["immediate", "wait"]; readonly default: "immediate"; readonly ui: { readonly tab: "interaction"; readonly label: "Interrupt Mode"; readonly description: "When steering messages interrupt tool execution"; }; }; readonly busyPromptMode: { readonly type: "enum"; readonly values: readonly ["steer", "queue"]; readonly default: "steer"; readonly ui: { readonly tab: "interaction"; readonly label: "Busy Prompt Mode"; readonly description: "What a submitted prompt does while the agent is busy: queue normal chat for the next turn, or steer to interrupt the active turn"; }; }; readonly doubleEscapeAction: { readonly type: "enum"; readonly values: readonly ["branch", "tree", "none"]; readonly default: "tree"; readonly ui: { readonly tab: "interaction"; readonly label: "Double-Escape Action"; readonly description: "Action when pressing Escape twice with empty editor"; }; }; readonly treeFilterMode: { readonly type: "enum"; readonly values: readonly ["default", "no-tools", "user-only", "labeled-only", "all"]; readonly default: "default"; readonly ui: { readonly tab: "interaction"; readonly label: "Session Tree Filter"; readonly description: "Default filter mode when opening the session tree"; }; }; readonly autocompleteMaxVisible: { readonly type: "number"; readonly default: 5; readonly ui: { readonly tab: "interaction"; readonly label: "Autocomplete Items"; readonly description: "Max visible items in autocomplete dropdown (3-20)"; readonly options: readonly [{ readonly value: "3"; readonly label: "3 items"; }, { readonly value: "5"; readonly label: "5 items"; }, { readonly value: "7"; readonly label: "7 items"; }, { readonly value: "10"; readonly label: "10 items"; }, { readonly value: "15"; readonly label: "15 items"; }, { readonly value: "20"; readonly label: "20 items"; }]; }; }; readonly emojiAutocomplete: { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "interaction"; readonly label: "Emoji Autocomplete"; readonly description: "Suggest emojis from `:name:` shortcodes and expand text emoticons like `:D` or `:-)`"; }; }; readonly promptSuggestions: { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "interaction"; readonly label: "Prompt Suggestions"; readonly description: "Predict your likely next prompt after each turn (smol-model call) and show it as ghost text; Tab accepts"; }; }; readonly "startup.quiet": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "interaction"; readonly label: "Quiet Startup"; readonly description: "Skip welcome screen and startup status messages"; }; }; readonly "startup.welcomeBannerMode": { readonly type: "enum"; readonly values: readonly ["auto", "unicode", "square", "ascii"]; readonly default: "auto"; readonly ui: { readonly tab: "interaction"; readonly label: "Welcome Banner Mode"; readonly description: "Logo style for the startup welcome screen"; readonly options: readonly [{ readonly value: "auto"; readonly label: "Auto"; readonly description: "Use the rounded Unicode logo"; }, { readonly value: "unicode"; readonly label: "Unicode"; readonly description: "Force the rounded Unicode logo"; }, { readonly value: "square"; readonly label: "Square Unicode"; readonly description: "Force the square-corner Unicode fallback"; }, { readonly value: "ascii"; readonly label: "ASCII"; readonly description: "Force the ASCII-safe logo"; }]; }; }; readonly "startup.checkUpdate": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "interaction"; readonly label: "Check for Updates"; readonly description: "At interactive startup, notify of newer versions; never install. `gjc update` installs the matching GitHub release binary. Source, linked, and unrecognized installs stay on their original method."; }; }; readonly "startup.updateChannel": { readonly type: "enum"; readonly values: readonly ["stable", "nightly"]; readonly default: "stable"; readonly ui: { readonly tab: "interaction"; readonly label: "Update Channel"; readonly description: "Release channel used by `gjc update` and the startup update check"; readonly options: readonly [{ readonly value: "stable"; readonly label: "Stable"; readonly description: "Track stable GitHub releases"; }, { readonly value: "nightly"; readonly label: "Nightly"; readonly description: "Track nightly GitHub prereleases"; }]; }; }; readonly "starReminder.enabled": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "interaction"; readonly label: "GitHub Star Reminder"; readonly description: "Show the interactive GitHub star reminder when gh is authenticated"; }; }; readonly "crashReport.nudge": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "interaction"; readonly label: "Crash Report Nudge"; readonly description: "At interactive startup, show one rate-limited line when unreported crash signatures exist. Reads local state only; nothing is ever transmitted without the explicit consent flow in `gjc crash report`."; }; }; readonly "crashReport.upstream": { readonly type: "enum"; readonly values: readonly ["off", "sentry"]; readonly default: "off"; readonly ui: { readonly tab: "interaction"; readonly label: "Crash Report Upstream (Global)"; readonly description: "Global-only opt-in to transmit sanitized crash signatures to an aggregation service for cross-install counting. Off sends nothing. Only fields approved by `sanitizeExternalCrashV1` are sent; prompt text, source code, file contents, and credentials are excluded."; }; }; readonly "crashReport.upstreamDsn": { readonly type: "string"; readonly default: ""; readonly ui: { readonly tab: "interaction"; readonly label: "Crash Report Upstream DSN (Global)"; readonly description: "Global-only Sentry DSN for the opted-in upstream; ignored while Crash Report Upstream is off, and no default destination exists. Only fields approved by `sanitizeExternalCrashV1` are sent; prompt text, source code, file contents, and credentials are excluded."; }; }; readonly collapseChangelog: { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "interaction"; readonly label: "Collapse Changelog"; readonly description: "Show condensed changelog after updates"; }; }; readonly "completion.notify": { readonly type: "enum"; readonly values: readonly ["on", "off"]; readonly default: "on"; readonly ui: { readonly tab: "interaction"; readonly label: "Completion Notification"; readonly description: "Notify when the agent completes"; }; }; readonly "completion.notifyCommand": { readonly type: "string"; readonly default: ""; readonly ui: { readonly tab: "interaction"; readonly label: "Completion Notification Command"; readonly description: "Optional user-level shell command to run when an agent turn completes; receives GJC_NOTIFICATION_* environment variables. On Windows, this can call PowerShell [Console]::Beep when terminal BEL is silent."; }; }; readonly "ask.timeout": { readonly type: "number"; readonly default: 0; readonly ui: { readonly tab: "interaction"; readonly label: "Ask Timeout"; readonly description: "Auto-select recommended option after timeout (0 to disable)"; readonly options: readonly [{ readonly value: "0"; readonly label: "Disabled"; }, { readonly value: "15"; readonly label: "15 seconds"; }, { readonly value: "30"; readonly label: "30 seconds"; }, { readonly value: "60"; readonly label: "60 seconds"; }, { readonly value: "120"; readonly label: "120 seconds"; }]; }; }; readonly "ask.notify": { readonly type: "enum"; readonly values: readonly ["on", "off"]; readonly default: "on"; readonly ui: { readonly tab: "interaction"; readonly label: "Ask Notification"; readonly description: "Notify when ask tool is waiting for input"; }; }; readonly "stt.enabled": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "interaction"; readonly label: "Speech-to-Text"; readonly description: "Enable speech-to-text input via microphone"; }; }; readonly "stt.language": { readonly type: "string"; readonly default: "en"; }; readonly "stt.modelName": { readonly type: "enum"; readonly values: readonly ["tiny", "tiny.en", "base", "base.en", "small", "small.en", "medium", "medium.en", "large"]; readonly default: "base.en"; readonly ui: { readonly tab: "interaction"; readonly label: "Speech Model"; readonly description: "Whisper model size (larger = more accurate but slower)"; readonly options: readonly [{ readonly value: "tiny"; readonly label: "tiny"; readonly description: "Multilingual; fastest, lowest accuracy"; }, { readonly value: "tiny.en"; readonly label: "tiny.en"; readonly description: "English-only; fastest"; }, { readonly value: "base"; readonly label: "base"; readonly description: "Multilingual; small and fast"; }, { readonly value: "base.en"; readonly label: "base.en"; readonly description: "English-only; default"; }, { readonly value: "small"; readonly label: "small"; readonly description: "Multilingual; balanced"; }, { readonly value: "small.en"; readonly label: "small.en"; readonly description: "English-only; balanced"; }, { readonly value: "medium"; readonly label: "medium"; readonly description: "Multilingual; accurate but slower"; }, { readonly value: "medium.en"; readonly label: "medium.en"; readonly description: "English-only; accurate but slower"; }, { readonly value: "large"; readonly label: "large"; readonly description: "Multilingual; most accurate"; }]; }; }; readonly "contextPromotion.enabled": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "context"; readonly label: "Auto-Promote Context"; readonly description: "Promote to a larger-context model on context overflow instead of compacting (off by default; opt in to enable)"; }; }; readonly "compaction.enabled": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "context"; readonly label: "Auto-Compact"; readonly description: "Automatically compact context when it gets too large"; }; }; readonly "compaction.strategy": { readonly type: "enum"; readonly values: readonly ["context-full", "handoff", "off"]; readonly default: "context-full"; readonly ui: { readonly tab: "context"; readonly label: "Compaction Strategy"; readonly description: "Choose in-place context-full maintenance, auto-handoff, or disable auto maintenance (off)"; readonly options: readonly [{ readonly value: "context-full"; readonly label: "Context-full"; readonly description: "Summarize in-place and keep the current session"; }, { readonly value: "handoff"; readonly label: "Handoff"; readonly description: "Generate handoff and continue in a new session"; }, { readonly value: "off"; readonly label: "Off"; readonly description: "Disable automatic context maintenance (same behavior as Auto-compact off)"; }]; }; }; readonly "compaction.thresholdPercent": { readonly type: "number"; readonly default: -1; readonly ui: { readonly tab: "context"; readonly label: "Compaction Threshold"; readonly description: "Percent threshold for context maintenance; set to Default to use legacy reserve-based behavior"; readonly options: readonly [{ readonly value: "default"; readonly label: "Default"; readonly description: "Legacy reserve-based threshold"; }, { readonly value: "10"; readonly label: "10%"; readonly description: "Extremely early maintenance"; }, { readonly value: "20"; readonly label: "20%"; readonly description: "Very early maintenance"; }, { readonly value: "30"; readonly label: "30%"; readonly description: "Early maintenance"; }, { readonly value: "40"; readonly label: "40%"; readonly description: "Moderately early maintenance"; }, { readonly value: "50"; readonly label: "50%"; readonly description: "Halfway point"; }, { readonly value: "60"; readonly label: "60%"; readonly description: "Moderate context usage"; }, { readonly value: "70"; readonly label: "70%"; readonly description: "Balanced"; }, { readonly value: "75"; readonly label: "75%"; readonly description: "Slightly aggressive"; }, { readonly value: "80"; readonly label: "80%"; readonly description: "Typical threshold"; }, { readonly value: "85"; readonly label: "85%"; readonly description: "Aggressive context usage"; }, { readonly value: "90"; readonly label: "90%"; readonly description: "Very aggressive"; }, { readonly value: "95"; readonly label: "95%"; readonly description: "Near context limit"; }]; }; }; readonly "compaction.thresholdTokens": { readonly type: "number"; readonly default: -1; readonly ui: { readonly tab: "context"; readonly label: "Compaction Token Limit"; readonly description: "Fixed token limit for context maintenance; overrides percentage if set"; readonly options: readonly [{ readonly value: "default"; readonly label: "Default"; readonly description: "Use percentage-based threshold"; }, { readonly value: "25000"; readonly label: "25K tokens"; readonly description: "Quarter of a 200K window"; }, { readonly value: "50000"; readonly label: "50K tokens"; readonly description: "Half of a 200K window"; }, { readonly value: "100000"; readonly label: "100K tokens"; readonly description: "Half of a 200K window"; }, { readonly value: "150000"; readonly label: "150K tokens"; readonly description: "Three-quarters of a 200K window"; }, { readonly value: "200000"; readonly label: "200K tokens"; readonly description: "Full standard context window"; }, { readonly value: "300000"; readonly label: "300K tokens"; readonly description: "Large context window"; }, { readonly value: "500000"; readonly label: "500K tokens"; readonly description: "Very large context window"; }]; }; }; readonly "compaction.handoffSaveToDisk": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "context"; readonly label: "Save Handoff Docs"; readonly description: "Save auto-triggered handoff documents as session artifacts (resolvable artifact:// URIs); manual /handoff does not save"; }; }; readonly "compaction.handoffPromptExtension": { readonly type: "string"; readonly default: ""; readonly ui: { readonly tab: "context"; readonly label: "Handoff Prompt Extension"; readonly description: "Extra guidance appended to the default handoff-generation prompt for both manual /handoff and auto-handoff. It supplements, and never replaces, the built-in safety- and continuity-critical instructions."; }; }; readonly "compaction.remoteEnabled": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "context"; readonly label: "Remote Compaction"; readonly description: "Use remote compaction endpoints when available instead of local summarization"; }; }; readonly "compaction.reserveTokens": { readonly type: "number"; readonly default: 16384; }; readonly "compaction.keepRecentTokens": { readonly type: "number"; readonly default: 20000; }; readonly "compaction.autoContinue": { readonly type: "boolean"; readonly default: true; }; readonly "compaction.remoteEndpoint": { readonly type: "string"; readonly default: undefined; }; readonly "compaction.maintenancePruningEnabled": { readonly type: "boolean"; readonly default: false; }; readonly "compaction.maintenancePruningMinSavingsTokens": { readonly type: "number"; readonly default: 8000; }; readonly "compaction.idleEnabled": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "context"; readonly label: "Idle Compaction"; readonly description: "Compact context while idle when token count exceeds threshold"; }; }; readonly "compaction.idleThresholdTokens": { readonly type: "number"; readonly default: 200000; readonly ui: { readonly tab: "context"; readonly label: "Idle Compaction Threshold"; readonly description: "Token count above which idle compaction triggers"; readonly options: readonly [{ readonly value: "100000"; readonly label: "100K tokens"; }, { readonly value: "200000"; readonly label: "200K tokens"; }, { readonly value: "300000"; readonly label: "300K tokens"; }, { readonly value: "400000"; readonly label: "400K tokens"; }, { readonly value: "500000"; readonly label: "500K tokens"; }, { readonly value: "600000"; readonly label: "600K tokens"; }, { readonly value: "700000"; readonly label: "700K tokens"; }, { readonly value: "800000"; readonly label: "800K tokens"; }, { readonly value: "900000"; readonly label: "900K tokens"; }]; }; }; readonly "compaction.idleTimeoutSeconds": { readonly type: "number"; readonly default: 300; readonly ui: { readonly tab: "context"; readonly label: "Idle Compaction Delay"; readonly description: "Seconds to wait while idle before compacting"; readonly options: readonly [{ readonly value: "60"; readonly label: "1 minute"; }, { readonly value: "120"; readonly label: "2 minutes"; }, { readonly value: "300"; readonly label: "5 minutes"; }, { readonly value: "600"; readonly label: "10 minutes"; }, { readonly value: "1800"; readonly label: "30 minutes"; }, { readonly value: "3600"; readonly label: "1 hour"; }]; }; }; readonly "branchSummary.enabled": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "context"; readonly label: "Branch Summaries"; readonly description: "Prompt to summarize when leaving a branch"; }; }; readonly "branchSummary.reserveTokens": { readonly type: "number"; readonly default: 16384; }; readonly "memories.enabled": { readonly type: "boolean"; readonly default: false; }; readonly "memories.maxRolloutsPerStartup": { readonly type: "number"; readonly default: 64; }; readonly "memories.maxRolloutAgeDays": { readonly type: "number"; readonly default: 30; }; readonly "memories.minRolloutIdleHours": { readonly type: "number"; readonly default: 12; }; readonly "memories.threadScanLimit": { readonly type: "number"; readonly default: 300; }; readonly "memories.maxRawMemoriesForGlobal": { readonly type: "number"; readonly default: 200; }; readonly "memories.stage1Concurrency": { readonly type: "number"; readonly default: 8; }; readonly "memories.stage1LeaseSeconds": { readonly type: "number"; readonly default: 120; }; readonly "memories.stage1RetryDelaySeconds": { readonly type: "number"; readonly default: 120; }; readonly "memories.phase2LeaseSeconds": { readonly type: "number"; readonly default: 180; }; readonly "memories.phase2RetryDelaySeconds": { readonly type: "number"; readonly default: 180; }; readonly "memories.phase2HeartbeatSeconds": { readonly type: "number"; readonly default: 30; }; readonly "memories.rolloutPayloadPercent": { readonly type: "number"; readonly default: 0.7; }; readonly "memories.phase1InputTokenLimit": { readonly type: "number"; readonly default: 4000; }; readonly "memories.fallbackTokenLimit": { readonly type: "number"; readonly default: 16000; }; readonly "memories.summaryInjectionTokenLimit": { readonly type: "number"; readonly default: 5000; }; readonly "memory.backend": { readonly type: "enum"; readonly values: readonly ["off", "local", "hindsight"]; readonly default: "off"; readonly ui: { readonly tab: "memory"; readonly label: "Memory Backend"; readonly description: "Off, local memory pipeline, or Hindsight remote memory"; readonly options: readonly [{ readonly value: "off"; readonly label: "Off"; readonly description: "No memory subsystem runs"; }, { readonly value: "local"; readonly label: "Local"; readonly description: "Local rollout summarisation pipeline (memory_summary.md)"; }, { readonly value: "hindsight"; readonly label: "Hindsight"; readonly description: "Vectorize Hindsight remote memory service"; }]; }; }; readonly "hindsight.apiUrl": { readonly type: "string"; readonly default: "http://localhost:8888"; readonly ui: { readonly tab: "memory"; readonly label: "Hindsight API URL"; readonly description: "Hindsight server URL (Cloud or self-hosted)"; readonly condition: "hindsightActive"; }; }; readonly "hindsight.apiToken": { readonly type: "string"; readonly default: undefined; }; readonly "hindsight.bankId": { readonly type: "string"; readonly default: undefined; readonly ui: { readonly tab: "memory"; readonly label: "Hindsight Bank ID"; readonly description: "Memory bank identifier (default: project name)"; readonly condition: "hindsightActive"; }; }; readonly "hindsight.bankIdPrefix": { readonly type: "string"; readonly default: undefined; }; readonly "hindsight.scoping": { readonly type: "enum"; readonly values: readonly ["global", "per-project", "per-project-tagged"]; readonly default: "per-project-tagged"; readonly ui: { readonly tab: "memory"; readonly label: "Hindsight Scoping"; readonly description: "global = one shared bank; per-project = isolated bank per cwd; per-project-tagged = shared bank with project tags so global + project memories merge on recall"; readonly options: readonly [{ readonly value: "global"; readonly label: "Global"; readonly description: "One shared bank — every project sees the same memories"; }, { readonly value: "per-project"; readonly label: "Per project"; readonly description: "Isolated bank per cwd basename — projects cannot see each other's memories"; }, { readonly value: "per-project-tagged"; readonly label: "Per project (tagged)"; readonly description: "Shared bank, retains tagged with project:. Recall surfaces project + untagged global memories together"; }]; readonly condition: "hindsightActive"; }; }; readonly "hindsight.bankMission": { readonly type: "string"; readonly default: undefined; }; readonly "hindsight.retainMission": { readonly type: "string"; readonly default: undefined; }; readonly "hindsight.autoRecall": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "memory"; readonly label: "Hindsight Auto Recall"; readonly description: "Recall memories on the first turn of each session"; readonly condition: "hindsightActive"; }; }; readonly "hindsight.autoRetain": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "memory"; readonly label: "Hindsight Auto Retain"; readonly description: "Retain transcript every N turns and at session boundaries"; readonly condition: "hindsightActive"; }; }; readonly "hindsight.retainMode": { readonly type: "enum"; readonly values: readonly ["full-session", "last-turn"]; readonly default: "full-session"; readonly ui: { readonly tab: "memory"; readonly label: "Hindsight Retain Mode"; readonly description: "full-session = upsert one document per session, last-turn = chunked"; readonly options: readonly [{ readonly value: "full-session"; readonly label: "Full session"; readonly description: "Upsert one document per session (recommended)"; }, { readonly value: "last-turn"; readonly label: "Last turn"; readonly description: "Chunked retention sliced by turn boundaries"; }]; readonly condition: "hindsightActive"; }; }; readonly "hindsight.retainEveryNTurns": { readonly type: "number"; readonly default: 3; }; readonly "hindsight.retainOverlapTurns": { readonly type: "number"; readonly default: 2; }; readonly "hindsight.retainContext": { readonly type: "string"; readonly default: "gjc"; }; readonly "hindsight.recallBudget": { readonly type: "enum"; readonly values: readonly ["low", "mid", "high"]; readonly default: "mid"; }; readonly "hindsight.recallMaxTokens": { readonly type: "number"; readonly default: 1024; }; readonly "hindsight.recallContextTurns": { readonly type: "number"; readonly default: 1; }; readonly "hindsight.recallMaxQueryChars": { readonly type: "number"; readonly default: 800; }; readonly "hindsight.recallTypes": { readonly type: "array"; readonly default: string[]; }; readonly "hindsight.debug": { readonly type: "boolean"; readonly default: false; }; readonly "hindsight.mentalModelsEnabled": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "memory"; readonly label: "Hindsight Mental Models"; readonly description: "Read curated reflect summaries (mental models) into developer instructions at boot. Loads existing models on the bank — does not write. Pair with hindsight.mentalModelAutoSeed to also auto-create the built-in seed set."; readonly condition: "hindsightActive"; }; }; readonly "hindsight.mentalModelAutoSeed": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "memory"; readonly label: "Hindsight Mental Model Auto-Seed"; readonly description: "At session start, create any built-in mental models (project-conventions, project-decisions, user-preferences) that do not yet exist on the bank."; readonly condition: "hindsightActive"; }; }; readonly "hindsight.mentalModelRefreshIntervalMs": { readonly type: "number"; readonly default: number; }; readonly "hindsight.mentalModelMaxRenderChars": { readonly type: "number"; readonly default: 16000; }; readonly "ttsr.enabled": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "context"; readonly label: "TTSR"; readonly description: "Time Traveling Stream Rules: interrupt agent when output matches patterns"; }; }; readonly "ttsr.contextMode": { readonly type: "enum"; readonly values: readonly ["discard", "keep"]; readonly default: "discard"; readonly ui: { readonly tab: "context"; readonly label: "TTSR Context Mode"; readonly description: "What to do with partial output when TTSR triggers. 'discard' (recommended) drops the aborted partial turn so it never accumulates in context. 'keep' retains every aborted partial turn, which grows the token footprint each time a rule fires — prefer 'discard' unless you specifically need the partial output."; }; }; readonly "ttsr.interruptMode": { readonly type: "enum"; readonly values: readonly ["never", "prose-only", "tool-only", "always"]; readonly default: "always"; readonly ui: { readonly tab: "context"; readonly label: "TTSR Interrupt Mode"; readonly description: "When to interrupt mid-stream vs inject warning after completion"; readonly options: readonly [{ readonly value: "always"; readonly label: "always"; readonly description: "Interrupt on prose and tool streams"; }, { readonly value: "prose-only"; readonly label: "prose-only"; readonly description: "Interrupt only on reply/thinking matches"; }, { readonly value: "tool-only"; readonly label: "tool-only"; readonly description: "Interrupt only on tool-call argument matches"; }, { readonly value: "never"; readonly label: "never"; readonly description: "Never interrupt; inject warning after completion"; }]; }; }; readonly "ttsr.repeatMode": { readonly type: "enum"; readonly values: readonly ["once", "after-gap"]; readonly default: "once"; readonly ui: { readonly tab: "context"; readonly label: "TTSR Repeat Mode"; readonly description: "How rules can repeat: once per session or after a message gap"; }; }; readonly "ttsr.repeatGap": { readonly type: "number"; readonly default: 10; readonly ui: { readonly tab: "context"; readonly label: "TTSR Repeat Gap"; readonly description: "Messages before a rule can trigger again"; readonly options: readonly [{ readonly value: "5"; readonly label: "5 messages"; }, { readonly value: "10"; readonly label: "10 messages"; }, { readonly value: "15"; readonly label: "15 messages"; }, { readonly value: "20"; readonly label: "20 messages"; }, { readonly value: "30"; readonly label: "30 messages"; }]; }; }; readonly "sessionMemory.mode": { readonly type: "enum"; readonly values: readonly ["off", "shadow", "enabled", "auto"]; readonly default: "auto"; }; readonly "sessionMemory.contextOverflowRecovery": { readonly type: "boolean"; readonly default: true; }; readonly "edit.mode": { readonly type: "enum"; readonly values: import("../utils/edit-mode").EditModeSetting[]; readonly default: import("../utils/edit-mode").EditModeSetting; readonly ui: { readonly tab: "editing"; readonly label: "Edit Mode"; readonly description: "Select the edit tool variant (auto routes by model family; replace, patch, hashline, vim, or apply_patch)"; }; }; readonly "edit.modelVariants": { readonly type: "record"; readonly default: Record; readonly valueSchema: { readonly type: "string-enum"; readonly values: EditMode[]; }; }; readonly "edit.fuzzyMatch": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "editing"; readonly label: "Fuzzy Match"; readonly description: "Accept high-confidence fuzzy matches for whitespace differences"; }; }; readonly "edit.fuzzyThreshold": { readonly type: "number"; readonly default: 0.95; readonly ui: { readonly tab: "editing"; readonly label: "Fuzzy Match Threshold"; readonly description: "Similarity threshold for fuzzy matches"; readonly options: readonly [{ readonly value: "0.85"; readonly label: "0.85"; readonly description: "Lenient"; }, { readonly value: "0.90"; readonly label: "0.90"; readonly description: "Moderate"; }, { readonly value: "0.95"; readonly label: "0.95"; readonly description: "Default"; }, { readonly value: "0.98"; readonly label: "0.98"; readonly description: "Strict"; }]; }; }; readonly "edit.streamingAbort": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "editing"; readonly label: "Abort on Failed Preview"; readonly description: "Abort streaming edit tool calls when patch preview fails"; }; }; readonly "edit.hashlineAutoDropPureInsertDuplicates": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "editing"; readonly label: "Hashline Duplicate Insert Drop"; readonly description: "Drop 2+ pure-insert payload lines that duplicate adjacent file context"; }; }; readonly "edit.blockAutoGenerated": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "editing"; readonly label: "Block Auto-Generated Files"; readonly description: "Prevent editing of files that appear to be auto-generated (protoc, sqlc, swagger, etc.)"; }; }; readonly readLineNumbers: { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "editing"; readonly label: "Line Numbers"; readonly description: "Prepend line numbers to read tool output by default"; }; }; readonly readHashLines: { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "editing"; readonly label: "Hash Lines"; readonly description: "Include line hashes in read output for hashline edit mode (LINE+ID|content)"; }; }; readonly "read.defaultLimit": { readonly type: "number"; readonly default: 300; readonly ui: { readonly tab: "editing"; readonly label: "Default Read Limit"; readonly description: "Default collection/selection limit for read operations; bare local receipts use the separate 50-line / 10 KiB receipt budgets"; readonly options: readonly [{ readonly value: "200"; readonly label: "200 lines"; }, { readonly value: "300"; readonly label: "300 lines"; }, { readonly value: "500"; readonly label: "500 lines"; }, { readonly value: "1000"; readonly label: "1000 lines"; }, { readonly value: "5000"; readonly label: "5000 lines"; }]; }; }; readonly "read.receiptBudgetLines": { readonly type: "number"; readonly default: 50; readonly ui: { readonly tab: "editing"; readonly label: "Read Receipt Line Budget"; readonly description: "Maximum lines included in a bare read receipt before a selector footer is shown"; readonly options: readonly [{ readonly value: "25"; readonly label: "25 lines"; }, { readonly value: "50"; readonly label: "50 lines"; readonly description: "Default"; }, { readonly value: "100"; readonly label: "100 lines"; }, { readonly value: "200"; readonly label: "200 lines"; }]; }; }; readonly "read.receiptBudgetBytes": { readonly type: "number"; readonly default: 10; readonly ui: { readonly tab: "editing"; readonly label: "Read Receipt Byte Budget (KB)"; readonly description: "Maximum UTF-8 body size for a bare read receipt before a selector footer is shown"; readonly options: readonly [{ readonly value: "5"; readonly label: "5 KB"; readonly description: "~1.25K tokens"; }, { readonly value: "10"; readonly label: "10 KB"; readonly description: "Default; ~2.5K tokens"; }, { readonly value: "20"; readonly label: "20 KB"; readonly description: "~5K tokens"; }, { readonly value: "50"; readonly label: "50 KB"; readonly description: "~12.5K tokens"; }]; }; }; readonly "read.truncation": { readonly type: "enum"; readonly values: readonly ["head", "last", "both"]; readonly default: "last"; readonly ui: { readonly tab: "editing"; readonly label: "Read Truncation"; readonly description: "Configured default direction for routes that support directional truncation; bare local and archive reads use this value (factory default: last), while explicit truncation always wins"; readonly options: readonly [{ readonly value: "head"; readonly label: "Head"; readonly description: "Keep the first N lines"; }, { readonly value: "last"; readonly label: "Last"; readonly description: "Keep the last N lines (default)"; }, { readonly value: "both"; readonly label: "Both"; readonly description: "Keep the start and the end, elide the middle"; }]; }; }; readonly "read.summaryMaxBytes": { readonly type: "number"; readonly default: 20; readonly ui: { readonly tab: "editing"; readonly label: "Read Summary Size Budget (KB)"; readonly description: "Maximum UTF-8 size for a structural read summary before additional units are elided"; readonly options: readonly [{ readonly value: "10"; readonly label: "10 KB"; readonly description: "~2.5K tokens"; }, { readonly value: "20"; readonly label: "20 KB"; readonly description: "Default; ~5K tokens"; }, { readonly value: "50"; readonly label: "50 KB"; readonly description: "~12.5K tokens"; }, { readonly value: "100"; readonly label: "100 KB"; readonly description: "~25K tokens"; }]; }; }; readonly "read.summarize.enabled": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "editing"; readonly label: "Read Summaries"; readonly description: "Return structural code summaries when read is called without an explicit selector"; }; }; readonly "read.summarize.prose": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "editing"; readonly label: "Prose Summaries"; readonly description: "Return structural summaries for Markdown and plain text reads"; }; }; readonly "read.summarize.minBodyLines": { readonly type: "number"; readonly default: 4; readonly ui: { readonly tab: "editing"; readonly label: "Read Summary Body Lines"; readonly description: "Minimum multiline body or literal length before read summaries collapse it"; }; }; readonly "read.summarize.minCommentLines": { readonly type: "number"; readonly default: 6; readonly ui: { readonly tab: "editing"; readonly label: "Read Summary Comment Lines"; readonly description: "Minimum multiline block comment length before read summaries collapse it"; }; }; readonly "read.toolResultPreview": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "editing"; readonly label: "Inline Read Previews"; readonly description: "Render read tool results inline in the transcript instead of summary rows"; }; }; readonly "lsp.enabled": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "editing"; readonly label: "LSP"; readonly description: "Enable the lsp tool for language server protocol"; }; }; readonly "lsp.formatOnWrite": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "editing"; readonly label: "Format on Write"; readonly description: "Automatically format code files using LSP after writing"; }; }; readonly "lsp.diagnosticsOnWrite": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "editing"; readonly label: "Diagnostics on Write"; readonly description: "Return LSP diagnostics after writing code files"; }; }; readonly "lsp.diagnosticsOnEdit": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "editing"; readonly label: "Diagnostics on Edit"; readonly description: "Return LSP diagnostics after editing code files"; }; }; readonly "bashInterceptor.enabled": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "editing"; readonly label: "Bash Interceptor"; readonly description: "Block shell commands that have dedicated tools"; }; }; readonly "bashInterceptor.patterns": { readonly type: "array"; readonly default: BashInterceptorRule[]; }; readonly "bash.stripTrailingHeadTail": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "editing"; readonly label: "Strip Trailing head/tail"; readonly description: "Silently drop trailing `| head`/`| tail` pipes from single-line bash commands. Output is already truncated automatically."; }; }; readonly "shellMinimizer.enabled": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "editing"; readonly label: "Shell Minimizer"; readonly description: "Compress verbose shell output (git, npm, cargo, etc.) before returning it to the agent"; }; }; readonly "shellMinimizer.settingsPath": { readonly type: "string"; readonly default: undefined; }; readonly "shellMinimizer.only": { readonly type: "array"; readonly default: string[]; }; readonly "shellMinimizer.except": { readonly type: "array"; readonly default: string[]; }; readonly "shellMinimizer.maxCaptureBytes": { readonly type: "number"; readonly default: number; }; readonly "eval.py": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "editing"; readonly label: "Eval: Python backend"; readonly description: "Allow the eval tool to dispatch to the IPython kernel"; }; }; readonly "eval.js": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "editing"; readonly label: "Eval: JavaScript backend"; readonly description: "Allow the eval tool to dispatch to the in-process JavaScript runtime"; }; }; readonly "python.kernelMode": { readonly type: "enum"; readonly values: readonly ["session", "per-call"]; readonly default: "session"; readonly ui: { readonly tab: "editing"; readonly label: "Python Kernel Mode"; readonly description: "Whether to keep IPython kernel alive across calls"; }; }; readonly "todo.enabled": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "tools"; readonly label: "Todos"; readonly description: "Enable the todo_write tool for task tracking"; }; }; readonly "todo.reminders": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "tools"; readonly label: "Todo Reminders"; readonly description: "Remind agent to complete todos before stopping"; }; }; readonly "todo.reminders.max": { readonly type: "number"; readonly default: 3; readonly ui: { readonly tab: "tools"; readonly label: "Todo Reminder Limit"; readonly description: "Maximum reminders to complete todos before giving up"; readonly options: readonly [{ readonly value: "1"; readonly label: "1 reminder"; }, { readonly value: "2"; readonly label: "2 reminders"; }, { readonly value: "3"; readonly label: "3 reminders"; }, { readonly value: "5"; readonly label: "5 reminders"; }]; }; }; readonly "todo.eager": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "tools"; readonly label: "Create Todos Automatically"; readonly description: "Automatically create a comprehensive todo list after the first message"; }; }; readonly "find.enabled": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "tools"; readonly label: "Find"; readonly description: "Enable the find tool for file searching"; }; }; readonly "search.enabled": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "tools"; readonly label: "Search"; readonly description: "Enable the search tool for content searching"; }; }; readonly "search.contextBefore": { readonly type: "number"; readonly default: 1; readonly ui: { readonly tab: "tools"; readonly label: "Search Context Before"; readonly description: "Lines of context before each search match"; readonly options: readonly [{ readonly value: "0"; readonly label: "0 lines"; }, { readonly value: "1"; readonly label: "1 line"; }, { readonly value: "2"; readonly label: "2 lines"; }, { readonly value: "3"; readonly label: "3 lines"; }, { readonly value: "5"; readonly label: "5 lines"; }]; }; }; readonly "search.contextAfter": { readonly type: "number"; readonly default: 3; readonly ui: { readonly tab: "tools"; readonly label: "Search Context After"; readonly description: "Lines of context after each search match"; readonly options: readonly [{ readonly value: "0"; readonly label: "0 lines"; }, { readonly value: "1"; readonly label: "1 line"; }, { readonly value: "2"; readonly label: "2 lines"; }, { readonly value: "3"; readonly label: "3 lines"; }, { readonly value: "5"; readonly label: "5 lines"; }, { readonly value: "10"; readonly label: "10 lines"; }]; }; }; readonly "astGrep.enabled": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "tools"; readonly label: "AST Grep"; readonly description: "Enable the ast_grep tool for structural AST search"; }; }; readonly "astEdit.enabled": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "tools"; readonly label: "AST Edit"; readonly description: "Enable the ast_edit tool for structural AST rewrites"; }; }; readonly "irc.enabled": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "tools"; readonly label: "IRC"; readonly description: "Enable agent-to-agent IRC messaging via the irc tool"; }; }; readonly "irc.sidebar.enabled": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "tools"; readonly label: "IRC Sidebar"; readonly description: "Enable the IRC message sidebar (opens with the toggle key; starts closed)"; }; }; readonly "renderMermaid.enabled": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "tools"; readonly label: "Render Mermaid"; readonly description: "Enable the render_mermaid tool for Mermaid-to-ASCII rendering"; }; }; readonly "debug.enabled": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "tools"; readonly label: "Debug"; readonly description: "Enable the debug tool for DAP-based debugging"; }; }; readonly "calc.enabled": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "tools"; readonly label: "Calculator"; readonly description: "Enable the calculator tool for basic calculations"; }; }; readonly "recipe.enabled": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "tools"; readonly label: "Recipe"; readonly description: "Enable the recipe tool when a justfile / package.json / Cargo.toml / Makefile / Taskfile is present"; }; }; readonly "checkpoint.enabled": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "tools"; readonly label: "Checkpoint/Rewind"; readonly description: "Enable the checkpoint and rewind tools for context checkpointing"; }; }; readonly "skill.enabled": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "tools"; readonly label: "Skill"; readonly description: "Enable the skill tool so the agent can chain into another available skill on its next turn"; }; }; readonly "fetch.enabled": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "tools"; readonly label: "Read URLs"; readonly description: "Allow the read tool to fetch and process URLs"; }; }; readonly "web.insaneFallback": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "tools"; readonly label: "Insane Search Fallback (Compatibility)"; readonly description: "Compatibility-only preference. Remote renderer fallback stays disabled because it cannot preserve validated per-hop network routing."; }; }; readonly "github.enabled": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "tools"; readonly label: "GitHub CLI"; readonly description: "Enable the github tool (op-based dispatch for repository, issue, pull request, diff, search, checkout, push, and Actions watch workflows)"; }; }; readonly "github.cache.enabled": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "tools"; readonly label: "GitHub view cache"; readonly description: "Cache rendered issue/PR view output in ~/.gjc/cache/github-cache.db so repeated reads are free"; }; }; readonly "github.cache.softTtlSec": { readonly type: "number"; readonly default: 300; readonly ui: { readonly tab: "tools"; readonly label: "GitHub cache soft TTL (seconds)"; readonly description: "Within this window, cached issue/PR view rows are returned directly. Default 5 minutes."; }; }; readonly "github.cache.hardTtlSec": { readonly type: "number"; readonly default: 604800; readonly ui: { readonly tab: "tools"; readonly label: "GitHub cache hard TTL (seconds)"; readonly description: "Past soft TTL but within hard TTL, the tool returns the cached row and refreshes it in the background. Past hard TTL, the row is dropped. Default 7 days."; }; }; readonly "clipboard.transport": { readonly type: "enum"; readonly values: readonly ["auto", "native", "osc52", "ssh"]; readonly default: "auto"; readonly ui: { readonly tab: "tools"; readonly label: "Clipboard Transport"; readonly description: "auto keeps current OSC52+native best-effort behavior. native/osc52 restrict copy to one mechanism. ssh routes text copy/paste through `ssh pbcopy/pbpaste` via argv spawn and never silently falls back to native/OSC52 on failure."; }; }; readonly "clipboard.sshHost": { readonly type: "string"; readonly default: ""; readonly validate: (value: string) => boolean; readonly ui: { readonly tab: "tools"; readonly label: "Clipboard SSH Host"; readonly description: "SSH host alias (from ~/.ssh/config) used when clipboard.transport is ssh. Required in that mode."; }; }; readonly "web_search.enabled": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "tools"; readonly label: "Web Search"; readonly description: "Enable the web_search tool for web searching"; }; }; readonly "web_search.provider": { readonly type: "enum"; readonly values: readonly ["auto", "duckduckgo", "insane", "exa", "brave", "jina", "kimi", "zai", "anthropic", "perplexity", "gemini", "codex", "xai", "tavily", "parallel", "kagi", "synthetic", "searxng"]; readonly default: "auto"; }; readonly "web_search.fallback": { readonly type: "array"; readonly default: string[]; readonly items: { readonly enum: readonly ["duckduckgo", "insane", "exa", "brave", "jina", "kimi", "zai", "anthropic", "perplexity", "gemini", "codex", "xai", "tavily", "parallel", "kagi", "synthetic", "searxng"]; }; readonly ui: { readonly tab: "tools"; readonly label: "Web Search Fallback"; readonly description: "Ordered fallback web search providers after the active model native provider"; }; }; readonly "web_search.timeout": { readonly type: "number"; readonly default: 300; readonly validate: (value: number) => boolean; readonly ui: { readonly tab: "tools"; readonly label: "Web Search Timeout"; readonly description: "Hard timeout in seconds for a single web search request (default 300)"; }; }; readonly "browser.enabled": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "tools"; readonly label: "Browser"; readonly description: "Enable the browser tool (Ulixee Hero)"; }; }; readonly "browser.headless": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "tools"; readonly label: "Headless Browser"; readonly description: "Launch browser in headless mode (disable to show browser UI)"; }; }; readonly "browser.screenshotDir": { readonly type: "string"; readonly default: undefined; readonly ui: { readonly tab: "tools"; readonly label: "Screenshot directory"; readonly description: "Directory to save screenshots. If unset, screenshots go to a temp file. Supports ~. Examples: ~/Downloads, ~/Desktop, /sdcard/Download (Android)"; }; }; readonly "browser.profileReuse": { readonly type: "string"; readonly default: "auto"; readonly validate: (value: string) => value is "auto" | "opt-in"; readonly ui: { readonly tab: "tools"; readonly label: "Profile reuse posture"; readonly description: "'auto' (default): when a usable real Chrome profile is available, the browser tool uses an isolated copy of it (cookies/session/cache) for stronger stealth, warns, and falls back to synthetic. 'opt-in': stay synthetic unless a real profile is explicitly requested."; }; }; readonly "browser.geo.timezone": { readonly type: "string"; readonly default: undefined; readonly ui: { readonly tab: "tools"; readonly label: "Geo timezone override"; readonly description: "Optional IANA timezone (e.g. 'America/New_York') for headless sessions. Default unset preserves the real timezone. Only set this to a value coherent with your egress (e.g. a proxy region); an incoherent timezone increases bot detection."; }; }; readonly "browser.geo.locale": { readonly type: "string"; readonly default: undefined; readonly ui: { readonly tab: "tools"; readonly label: "Geo locale override"; readonly description: "Optional UI locale (e.g. 'en-US') for headless sessions. Default unset preserves the real locale. Only set this coherently with your egress region."; }; }; readonly "browser.gc.enabled": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "tools"; readonly label: "Browser Tab GC"; readonly description: "Automatically reclaim idle, unheld GJC-managed headless/spawned browser tabs."; }; }; readonly "browser.gc.idleMs": { readonly type: "number"; readonly default: 300000; readonly validate: (value: number) => boolean; readonly ui: { readonly tab: "tools"; readonly label: "Browser Tab GC Idle (ms)"; readonly description: "Evict headless/spawned tabs idle longer than this many milliseconds."; }; }; readonly "browser.gc.rssLimitMb": { readonly type: "number"; readonly default: 1536; readonly validate: (value: number) => boolean; readonly ui: { readonly tab: "tools"; readonly label: "Browser Tab GC RSS Limit (MB)"; readonly description: "Parent-process RSS (MB) above which idle tabs are opportunistically evicted LRU."; }; }; readonly "gc.sessions.maxAgeDays": { readonly type: "number"; readonly default: 60; readonly validate: (value: number) => boolean; }; readonly "gc.sessions.maxTotalBytes": { readonly type: "number"; readonly default: 0; readonly validate: (value: number) => boolean; }; readonly "gc.natives.keepVersions": { readonly type: "number"; readonly default: 2; readonly validate: (value: number) => boolean; }; readonly "gc.backups.maxAgeDays": { readonly type: "number"; readonly default: 30; readonly validate: (value: number) => boolean; }; readonly "resourceGc.sweepIntervalMs": { readonly type: "number"; readonly default: 30000; readonly validate: (value: number) => boolean; readonly ui: { readonly tab: "tools"; readonly label: "Resource GC Sweep Interval (ms)"; readonly description: "How often the resource GC sweeps browser tabs and stale screenshot directories."; }; }; readonly "memoryGuard.enabled": { readonly type: "boolean"; readonly default: false; }; readonly "memoryGuard.checkIntervalMs": { readonly type: "number"; readonly default: 30000; readonly validate: (value: number) => boolean; }; readonly "memoryGuard.gcThresholdPercent": { readonly type: "number"; readonly default: 70; readonly validate: (value: number) => boolean; }; readonly "memoryGuard.restartThresholdPercent": { readonly type: "number"; readonly default: 85; readonly validate: (value: number) => boolean; }; readonly "memoryGuard.restartThresholdWindowMs": { readonly type: "number"; readonly default: 90000; readonly validate: (value: number) => boolean; }; readonly "memoryGuard.cooldownMs": { readonly type: "number"; readonly default: 600000; readonly validate: (value: number) => boolean; }; readonly "memoryGuard.parentReserveMb": { readonly type: "number"; readonly default: 1024; readonly validate: (value: number) => boolean; }; readonly "memoryGuard.policyLimitMb": { readonly type: "number"; readonly default: 0; readonly validate: (value: number) => boolean; }; readonly "computer.enabled": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "tools"; readonly label: "Computer"; readonly description: "Enable the macOS computer tool for this session. Off by default."; }; }; readonly "computer.alwaysOn": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "tools"; readonly label: "Computer Always On"; readonly description: "Keep the macOS computer tool callable without per-session enablement."; }; }; readonly "computer.autoScreenshot": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "tools"; readonly label: "Computer Auto Screenshot"; readonly description: "Automatically request bounded screenshots after computer actions when supported."; }; }; readonly "computer.screenshotMaxBytes": { readonly type: "number"; readonly default: 5000000; readonly ui: { readonly tab: "tools"; readonly label: "Computer Screenshot Max Bytes"; readonly description: "Maximum screenshot payload size for computer action results."; }; }; readonly "computer.killSwitchHotkey": { readonly type: "string"; readonly default: "Control+Option+Command+Escape"; readonly ui: { readonly tab: "tools"; readonly label: "Computer Kill Switch Hotkey"; readonly description: "Native stop/suspend hotkey shown to users for computer-use sessions."; }; }; readonly "computer.auditLog.enabled": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "tools"; readonly label: "Computer Audit Log"; readonly description: "Persist audit records for enabled computer-use actions."; }; }; readonly "computer.screenshotGc.enabled": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "tools"; readonly label: "Computer Screenshot GC"; readonly description: "Delete stale computer-use screenshot fallback directories on disk."; }; }; readonly "computer.screenshotGc.staleMs": { readonly type: "number"; readonly default: 43200000; readonly validate: (value: number) => boolean; readonly ui: { readonly tab: "tools"; readonly label: "Computer Screenshot GC Stale Age (ms)"; readonly description: "Remove screenshot fallback directories whose mtime is older than this many milliseconds."; }; }; readonly "computer.screenshotGc.scanIntervalMs": { readonly type: "number"; readonly default: 1800000; readonly validate: (value: number) => boolean; readonly ui: { readonly tab: "tools"; readonly label: "Computer Screenshot GC Scan Interval (ms)"; readonly description: "Minimum interval between os.tmpdir scans for stale screenshot directories."; }; }; readonly "tools.intentTracing": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "tools"; readonly label: "Intent Tracing"; readonly description: "Ask the agent to describe the intent of each tool call before executing it"; }; }; readonly "tools.maxTimeout": { readonly type: "number"; readonly default: 0; readonly ui: { readonly tab: "tools"; readonly label: "Max Tool Timeout"; readonly description: "Maximum timeout in seconds the agent can set for any tool (0 = no limit)"; readonly options: readonly [{ readonly value: "0"; readonly label: "No limit"; }, { readonly value: "30"; readonly label: "30 seconds"; }, { readonly value: "60"; readonly label: "60 seconds"; }, { readonly value: "120"; readonly label: "120 seconds"; }, { readonly value: "300"; readonly label: "5 minutes"; }, { readonly value: "600"; readonly label: "10 minutes"; }]; }; }; readonly "async.enabled": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "tools"; readonly label: "Async Execution"; readonly description: "Enable async bash commands and background task execution"; }; }; readonly "async.maxJobs": { readonly type: "number"; readonly default: 100; }; readonly "async.pollWaitDuration": { readonly type: "enum"; readonly values: readonly ["5s", "10s", "30s", "1m", "5m"]; readonly default: "30s"; readonly ui: { readonly tab: "tools"; readonly label: "Poll Wait Duration"; readonly description: "How long the poll tool waits for background job updates before returning the current state"; readonly options: readonly [{ readonly value: "5s"; readonly label: "5 seconds"; }, { readonly value: "10s"; readonly label: "10 seconds"; }, { readonly value: "30s"; readonly label: "30 seconds"; readonly description: "Default"; }, { readonly value: "1m"; readonly label: "1 minute"; }, { readonly value: "5m"; readonly label: "5 minutes"; }]; }; }; readonly "bash.autoBackground.enabled": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "tools"; readonly label: "Bash Auto-Background"; readonly description: "Automatically background long-running bash commands and deliver the result later"; }; }; readonly "bash.autoBackground.thresholdMs": { readonly type: "number"; readonly default: 60000; }; readonly "tools.discoveryMode": { readonly type: "enum"; readonly values: readonly ["off", "all"]; readonly default: "all"; readonly ui: { readonly tab: "tools"; readonly label: "Tool Discovery"; readonly description: "Hide non-essential built-in tools behind a search tool to save tokens."; }; }; readonly "tools.essentialOverride": { readonly type: "array"; readonly default: string[]; readonly ui: { readonly tab: "tools"; readonly label: "Essential Tools Override"; readonly description: "Override the always-loaded built-in tools (default: read, bash, edit, write, search, find). Leave empty to use defaults."; }; }; readonly "mcp.enableProjectConfig": { readonly type: "boolean"; readonly default: false; }; readonly "mcp.discoveryMode": { readonly type: "boolean"; readonly default: false; }; readonly "mcp.discoveryDefaultServers": { readonly type: "array"; readonly default: string[]; }; readonly "mcp.notifications": { readonly type: "boolean"; readonly default: false; }; readonly "mcp.notificationDebounceMs": { readonly type: "number"; readonly default: 500; }; readonly "mcp.sharedPoolIdleMs": { readonly type: "number"; readonly default: 300000; }; readonly "tasksPane.defaultVisible": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "tasks"; readonly label: "Tasks Pane Visible By Default"; readonly description: "Open the unified tasks pane when the interactive UI starts"; }; }; readonly "plan.enabled": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "tasks"; readonly label: "Plan Mode"; readonly description: "Enable plan mode for read-only exploration and planning before execution"; }; }; readonly "goal.enabled": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "tasks"; readonly label: "Goal Mode"; readonly description: "Enable per-session goal mode and the hidden goal tool"; }; }; readonly "goal.statusInFooter": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "tasks"; readonly label: "Goal Status In Footer"; readonly description: "Show goal usage alongside the goal indicator in the status line"; }; }; readonly "goal.continuationModes": { readonly type: "array"; readonly default: readonly ["interactive"]; readonly ui: { readonly tab: "tasks"; readonly label: "Goal Continuation Modes"; readonly description: "Run modes where active goals may auto-continue between turns"; }; }; readonly "task.isolation.mode": { readonly type: "enum"; readonly values: readonly ["none", "auto", "apfs", "btrfs", "zfs", "reflink", "overlayfs", "projfs", "block-clone", "rcopy"]; readonly default: "none"; readonly ui: { readonly tab: "tasks"; readonly label: "Isolation Mode"; readonly description: 'Isolation backend for subagents. "auto" lets the native PAL pick the best available backend (CoW-aware filesystems, then overlayfs/ProjFS, then a git worktree / recursive-copy fallback).'; readonly options: readonly [{ readonly value: "none"; readonly label: "None"; readonly description: "No isolation"; }, { readonly value: "auto"; readonly label: "Auto"; readonly description: "Let the PAL pick the best available backend"; }, { readonly value: "apfs"; readonly label: "APFS"; readonly description: "macOS clonefile reflink (APFS)"; }, { readonly value: "btrfs"; readonly label: "btrfs"; readonly description: "btrfs subvolume snapshot"; }, { readonly value: "zfs"; readonly label: "ZFS"; readonly description: "ZFS snapshot + clone"; }, { readonly value: "reflink"; readonly label: "Reflink"; readonly description: "Linux FICLONE per-file reflink"; }, { readonly value: "overlayfs"; readonly label: "Overlayfs"; readonly description: "Linux kernel overlay (or fuse-overlayfs fallback)"; }, { readonly value: "projfs"; readonly label: "ProjFS"; readonly description: "Windows Projected File System"; }, { readonly value: "block-clone"; readonly label: "Block clone"; readonly description: "Windows FSCTL_DUPLICATE_EXTENTS_TO_FILE (NTFS/ReFS)"; }, { readonly value: "rcopy"; readonly label: "Recursive copy"; readonly description: "git worktree if available, otherwise recursive copy"; }]; }; }; readonly "task.isolation.merge": { readonly type: "enum"; readonly values: readonly ["patch", "branch"]; readonly default: "patch"; readonly ui: { readonly tab: "tasks"; readonly label: "Isolation Merge Strategy"; readonly description: "How isolated task changes are integrated (patch apply or branch merge)"; readonly options: readonly [{ readonly value: "patch"; readonly label: "Patch"; readonly description: "Combine diffs and git apply"; }, { readonly value: "branch"; readonly label: "Branch"; readonly description: "Commit per task, merge with --no-ff"; }]; }; }; readonly "task.isolation.commits": { readonly type: "enum"; readonly values: readonly ["generic", "ai"]; readonly default: "generic"; readonly ui: { readonly tab: "tasks"; readonly label: "Isolation Commit Style"; readonly description: "Commit message style for nested repo changes (generic or AI-generated)"; readonly options: readonly [{ readonly value: "generic"; readonly label: "Generic"; readonly description: "Static commit message"; }, { readonly value: "ai"; readonly label: "AI"; readonly description: "AI-generated commit message from diff"; }]; }; }; readonly "task.eager": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "tasks"; readonly label: "Prefer Task Delegation"; readonly description: "Encourage the agent to delegate work to subagents unless changes are trivial (on by default when executor/planner run on a different provider than the default role)"; }; }; readonly "task.simple": { readonly type: "enum"; readonly values: readonly ["default", "schema-free", "independent"]; readonly default: "default"; readonly ui: { readonly tab: "tasks"; readonly label: "Task Input Mode"; readonly description: "How much shared structure the task tool accepts (default, schema-free, or independent)"; readonly options: readonly [{ readonly value: "default"; readonly label: "Default"; readonly description: "Shared context and custom task schema are available"; }, { readonly value: "schema-free"; readonly label: "Schema-free"; readonly description: "Shared context stays available, but custom task schema is disabled"; }, { readonly value: "independent"; readonly label: "Independent"; readonly description: "No shared context or custom task schema; each task must stand alone"; }]; }; }; readonly "task.maxConcurrency": { readonly type: "number"; readonly default: 8; readonly ui: { readonly tab: "tasks"; readonly label: "Max Concurrent Tasks"; readonly description: "Safer concurrent limit for subagents; higher fan-out still requires an explicit plan above 4 tasks."; readonly options: readonly [{ readonly value: "0"; readonly label: "Unlimited"; }, { readonly value: "1"; readonly label: "1 task"; }, { readonly value: "2"; readonly label: "2 tasks"; }, { readonly value: "4"; readonly label: "4 tasks"; }, { readonly value: "8"; readonly label: "8 tasks"; }, { readonly value: "16"; readonly label: "16 tasks"; }, { readonly value: "32"; readonly label: "32 tasks"; }, { readonly value: "64"; readonly label: "64 tasks"; }]; }; }; readonly "task.enableLsp": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "tasks"; readonly label: "LSP in Subagents"; readonly description: "Allow subagents spawned via the task tool to use the lsp tool. Off by default to keep subagents cheap; enable when LSP-aware delegation is worth the extra tokens."; }; }; readonly "task.forkContext.enabled": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "tasks"; readonly label: "Fork Context for Subagents"; readonly description: "Allow explicitly opted-in subagents to start from a sanitized snapshot of parent context when both the agent and task item also opt in."; }; }; readonly "task.forkContext.maxMessages": { readonly type: "number"; readonly default: 50; readonly ui: { readonly tab: "tasks"; readonly label: "Fork Context Max Messages"; readonly description: "Maximum parent messages copied into an explicitly opted-in subagent fork-context seed."; }; }; readonly "task.forkContext.maxTokens": { readonly type: "number"; readonly default: 0; readonly ui: { readonly tab: "tasks"; readonly label: "Fork Context Max Tokens"; readonly description: "Approximate token cap for explicit full fork-context seeds. 0 uses 15% of the target model context window, with a 15k fallback when the window is unknown."; }; }; readonly "task.maxRecursionDepth": { readonly type: "number"; readonly default: 2; readonly ui: { readonly tab: "tasks"; readonly label: "Max Task Recursion"; readonly description: "How many levels deep subagents can spawn their own subagents"; readonly options: readonly [{ readonly value: "-1"; readonly label: "Unlimited"; }, { readonly value: "0"; readonly label: "None"; }, { readonly value: "1"; readonly label: "Single"; }, { readonly value: "2"; readonly label: "Double"; }, { readonly value: "3"; readonly label: "Triple"; }]; }; }; readonly "task.maxRuntimeMs": { readonly type: "number"; readonly default: 0; readonly ui: { readonly tab: "tasks"; readonly label: "Max Subagent Runtime"; readonly description: "Hard wall-clock limit per subagent (ms). 0 disables it. Defense-in-depth against provider-side stream hangs that escape the inference-layer watchdog; triggers a normal subagent abort with a 'timed out' reason."; readonly options: readonly [{ readonly value: "0"; readonly label: "Unlimited"; readonly description: "Default"; }, { readonly value: "300000"; readonly label: "5 minutes"; }, { readonly value: "900000"; readonly label: "15 minutes"; }, { readonly value: "1800000"; readonly label: "30 minutes"; }, { readonly value: "3600000"; readonly label: "1 hour"; }]; }; }; readonly "task.disabledAgents": { readonly type: "array"; readonly default: string[]; }; readonly "task.agentModelOverrides": { readonly type: "record"; readonly default: Record; readonly valueSchema: { readonly type: "model-selector-value"; }; }; readonly "task.autorouting.enabled": { readonly type: "boolean"; readonly default: false; }; readonly "task.autorouting.tiers": { readonly type: "constrained-record"; readonly default: AutoroutingTierMapInput; readonly keys: readonly ["fast", "balanced", "strong"]; readonly valueSchema: { readonly type: "autorouting-selector-value"; readonly minLength: 1; readonly maxLength: 256; readonly pattern: "^[^/\\s*?\\[\\x00-\\x1F\\x7F-\\x9F\\u2028\\u2029]+\\/[^\\s*?\\[\\x00-\\x1F\\x7F-\\x9F\\u2028\\u2029]+(?::(?:minimal|low|medium|high|xhigh))?$"; readonly description: "provider/modelId with an optional valid thinking suffix (:minimal|low|medium|high|xhigh), no globs, no bare model ids, no pi/ role aliases."; }; readonly description: "provider/modelId with an optional valid thinking suffix (:minimal|low|medium|high|xhigh), no globs, no bare model ids, no pi/ role aliases."; }; readonly "task.autorouting.setup": OptionalObjectDef; readonly "task.autorouting.provenance": OptionalObjectDef; readonly "tasks.todoClearDelay": { readonly type: "number"; readonly default: 60; readonly ui: { readonly tab: "tasks"; readonly label: "Todo auto-clear delay"; readonly description: "How long to wait before removing completed/abandoned tasks from the list"; readonly options: readonly [{ readonly value: "0"; readonly label: "Instant"; }, { readonly value: "60"; readonly label: "1 minute"; readonly description: "Default"; }, { readonly value: "300"; readonly label: "5 minutes"; }, { readonly value: "900"; readonly label: "15 minutes"; }, { readonly value: "1800"; readonly label: "30 minutes"; }, { readonly value: "3600"; readonly label: "1 hour"; }, { readonly value: "-1"; readonly label: "Never"; }]; }; }; readonly "skills.enabled": { readonly type: "boolean"; readonly default: boolean | undefined; }; readonly "skills.enableSkillCommands": { readonly type: "boolean"; readonly default: boolean | undefined; }; readonly "skills.enableCodexUser": { readonly type: "boolean"; readonly default: boolean | undefined; }; readonly "skills.enableClaudeUser": { readonly type: "boolean"; readonly default: boolean | undefined; }; readonly "skills.enableClaudeProject": { readonly type: "boolean"; readonly default: boolean | undefined; }; readonly "skills.trustProjectSkills": { readonly type: "boolean"; readonly ui: { readonly tab: "customization"; readonly label: "Trust Project Skills"; readonly description: "Load skills from project .gjc/skills, .claude/skills, and .codex/skills. Set to false to ignore project-controlled skills while keeping user skills."; }; }; readonly "skills.trustUserSkills": { readonly type: "boolean"; readonly ui: { readonly tab: "customization"; readonly label: "Trust User Skills"; readonly description: "Load skills from ~/.gjc/agent/skills (and legacy ~/.gjc/skills / /skills). Set to false to ignore user-installed skills while keeping project skills."; }; }; readonly "skills.enablePiUser": { readonly type: "boolean"; readonly ui: { readonly tab: "customization"; readonly label: "Trust User Skills (legacy)"; }; }; readonly "skills.enablePiProject": { readonly type: "boolean"; readonly ui: { readonly tab: "customization"; readonly label: "Trust Project Skills (legacy)"; }; }; readonly "skills.customDirectories": { readonly type: "array"; readonly default: string[] | undefined; }; readonly "skills.ignoredSkills": { readonly type: "array"; readonly default: string[] | undefined; }; readonly "skills.includeSkills": { readonly type: "array"; readonly default: string[] | undefined; }; readonly "commands.enableClaudeUser": { readonly type: "boolean"; readonly default: false; }; readonly "commands.enableClaudeProject": { readonly type: "boolean"; readonly default: false; }; readonly "commands.enableOpencodeUser": { readonly type: "boolean"; readonly default: false; }; readonly "commands.enableOpencodeProject": { readonly type: "boolean"; readonly default: false; }; readonly "secrets.enabled": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "providers"; readonly label: "Hide Secrets"; readonly description: "Obfuscate secrets before sending to AI providers"; }; }; readonly "providers.webSearch": { readonly type: "enum"; readonly values: readonly ["auto", "duckduckgo", "insane", "exa", "brave", "jina", "kimi", "zai", "perplexity", "anthropic", "gemini", "codex", "xai", "tavily", "kagi", "synthetic", "parallel", "searxng"]; readonly default: "auto"; readonly ui: { readonly tab: "providers"; readonly label: "Web Search Provider"; readonly description: "Provider for web search tool"; readonly options: readonly [{ readonly value: "auto"; readonly label: "Auto"; readonly description: "Active model's native search if its creds exist, else keyless DuckDuckGo"; }, { readonly value: "duckduckgo"; readonly label: "DuckDuckGo"; readonly description: "Keyless default — no API key or OAuth required"; }, { readonly value: "insane"; readonly label: "Insane"; readonly description: "Keyless safe public-route fallback inspired by upstream insane-search"; }, { readonly value: "exa"; readonly label: "Exa"; readonly description: "Uses Exa API when EXA_API_KEY is set"; }, { readonly value: "brave"; readonly label: "Brave"; readonly description: "Requires BRAVE_API_KEY"; }, { readonly value: "jina"; readonly label: "Jina"; readonly description: "Requires JINA_API_KEY"; }, { readonly value: "kimi"; readonly label: "Kimi"; readonly description: "Requires MOONSHOT_SEARCH_API_KEY or MOONSHOT_API_KEY"; }, { readonly value: "perplexity"; readonly label: "Perplexity"; readonly description: "Requires PERPLEXITY_COOKIES or PERPLEXITY_API_KEY"; }, { readonly value: "anthropic"; readonly label: "Anthropic"; readonly description: "Claude's native web_search tool (uses Anthropic OAuth or ANTHROPIC_API_KEY)"; }, { readonly value: "codex"; readonly label: "OpenAI"; readonly description: "OpenAI's native web_search (uses ChatGPT OAuth via /login openai-codex)"; }, { readonly value: "xai"; readonly label: "xAI"; readonly description: "xAI Responses web_search/x_search (uses xAI OAuth via /login xai or XAI_API_KEY)"; }, { readonly value: "gemini"; readonly label: "Gemini"; readonly description: "Google Search grounding via Gemini (uses google-gemini-cli or google-antigravity OAuth)"; }, { readonly value: "zai"; readonly label: "Z.AI"; readonly description: "Calls Z.AI webSearchPrime MCP"; }, { readonly value: "tavily"; readonly label: "Tavily"; readonly description: "Requires TAVILY_API_KEY"; }, { readonly value: "kagi"; readonly label: "Kagi"; readonly description: "Requires KAGI_API_KEY and Kagi Search API beta access"; }, { readonly value: "synthetic"; readonly label: "Synthetic"; readonly description: "Requires SYNTHETIC_API_KEY"; }, { readonly value: "parallel"; readonly label: "Parallel"; readonly description: "Requires PARALLEL_API_KEY"; }, { readonly value: "searxng"; readonly label: "SearXNG"; readonly description: "Requires SEARXNG_ENDPOINT or searxng.endpoint"; }]; }; }; readonly "providers.kimiApiFormat": { readonly type: "enum"; readonly values: readonly ["openai", "anthropic"]; readonly default: "anthropic"; readonly ui: { readonly tab: "providers"; readonly label: "Kimi API Format"; readonly description: "API format for Kimi Code provider"; readonly options: readonly [{ readonly value: "openai"; readonly label: "OpenAI"; readonly description: "api.kimi.com"; }, { readonly value: "anthropic"; readonly label: "Anthropic"; readonly description: "api.moonshot.ai"; }]; }; }; readonly "providers.openaiWebsockets": { readonly type: "enum"; readonly values: readonly ["auto", "off", "on"]; readonly default: "auto"; readonly ui: { readonly tab: "providers"; readonly label: "OpenAI WebSockets"; readonly description: "Websocket policy for OpenAI Codex models (auto uses model defaults, on forces, off disables)"; readonly options: readonly [{ readonly value: "auto"; readonly label: "Auto"; readonly description: "Use model/provider default websocket behavior"; }, { readonly value: "off"; readonly label: "Off"; readonly description: "Disable websockets for OpenAI Codex models"; }, { readonly value: "on"; readonly label: "On"; readonly description: "Force websockets for OpenAI Codex models"; }]; }; }; readonly "providers.parallelFetch": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "providers"; readonly label: "Parallel Fetch"; readonly description: "Use Parallel extract API for URL fetching when credentials are available"; }; }; readonly "provider.appendOnlyContext": { readonly type: "enum"; readonly values: readonly ["auto", "on", "off"]; readonly default: "auto"; readonly ui: { readonly tab: "providers"; readonly label: "Append-Only Context"; readonly description: "Cache system prompt + tool specs and keep an append-only message log so provider prefix caches (DeepSeek, Anthropic) hit at maximum rate. Auto enables for DeepSeek."; readonly options: readonly [{ readonly value: "auto"; readonly label: "Auto"; readonly description: "Enable for DeepSeek (recommended)"; }, { readonly value: "on"; readonly label: "On"; readonly description: "Always enable append-only context"; }, { readonly value: "off"; readonly label: "Off"; readonly description: "Disable append-only context"; }]; }; }; readonly "exa.enabled": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "providers"; readonly label: "Exa"; readonly description: "Master toggle for all Exa search tools"; }; }; readonly "exa.enableSearch": { readonly type: "boolean"; readonly default: true; readonly ui: { readonly tab: "providers"; readonly label: "Exa Search"; readonly description: "Basic search, deep search, code search, crawl"; }; }; readonly "exa.enableResearcher": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "providers"; readonly label: "Exa Researcher"; readonly description: "AI-powered deep research tasks"; }; }; readonly "exa.enableWebsets": { readonly type: "boolean"; readonly default: false; readonly ui: { readonly tab: "providers"; readonly label: "Exa Websets"; readonly description: "Webset management and enrichment tools"; }; }; readonly "searxng.endpoint": { readonly type: "string"; readonly default: undefined; readonly ui: { readonly tab: "providers"; readonly label: "SearXNG Endpoint"; readonly description: "Self-hosted search base URL"; }; }; readonly "searxng.token": { readonly type: "string"; readonly default: undefined; }; readonly "searxng.basicUsername": { readonly type: "string"; readonly default: undefined; }; readonly "searxng.basicPassword": { readonly type: "string"; readonly default: undefined; }; readonly "searxng.categories": { readonly type: "string"; readonly default: undefined; }; readonly "searxng.language": { readonly type: "string"; readonly default: undefined; }; readonly "commit.mapReduceEnabled": { readonly type: "boolean"; readonly default: true; }; readonly "commit.mapReduceMinFiles": { readonly type: "number"; readonly default: 4; }; readonly "commit.mapReduceMaxFileTokens": { readonly type: "number"; readonly default: 50000; }; readonly "commit.mapReduceTimeoutMs": { readonly type: "number"; readonly default: 120000; }; readonly "commit.mapReduceMaxConcurrency": { readonly type: "number"; readonly default: 5; }; readonly "commit.changelogMaxDiffChars": { readonly type: "number"; readonly default: 120000; }; readonly "thinkingBudgets.minimal": { readonly type: "number"; readonly default: 1024; }; readonly "thinkingBudgets.low": { readonly type: "number"; readonly default: 2048; }; readonly "thinkingBudgets.medium": { readonly type: "number"; readonly default: 8192; }; readonly "thinkingBudgets.high": { readonly type: "number"; readonly default: 16384; }; readonly "thinkingBudgets.xhigh": { readonly type: "number"; readonly default: 32768; }; readonly "thinkingBudgets.max": { readonly type: "number"; readonly default: 65536; }; }; type Schema = typeof SETTINGS_SCHEMA; /** All valid setting paths */ export type SettingPath = keyof Schema; /** Infer the value type for a setting path */ export type SettingValue

= Schema[P] extends { type: "boolean"; default: boolean; } ? boolean : Schema[P] extends { type: "boolean"; } ? boolean | undefined : Schema[P] extends { type: "string"; } ? string | undefined : Schema[P] extends { type: "number"; } ? number : Schema[P] extends { type: "enum"; values: infer V; } ? V extends readonly string[] ? V[number] : never : Schema[P] extends { type: "array"; default: infer D; } ? D : Schema[P] extends { type: "record"; default: infer D; } ? D : Schema[P] extends { type: "constrained-record"; default: infer D; } ? D : Schema[P] extends OptionalObjectDef ? D | undefined : never; /** Get the default value for a setting path */ export declare function getDefault

(path: P): SettingValue

; /** Check if a path has UI metadata (should appear in settings panel) */ export declare function hasUi(path: SettingPath): boolean; /** Get UI metadata for a path (undefined if no UI) */ export declare function getUi(path: SettingPath): AnyUiMetadata | undefined; /** Get all paths for a specific tab */ export declare function getPathsForTab(tab: SettingTab): SettingPath[]; /** Get the type of a setting */ export declare function getType(path: SettingPath): SettingDef["type"]; /** Get enum values for an enum setting */ export declare function getEnumValues(path: SettingPath): readonly string[] | undefined; export { CONFIG_SCHEMA_VERSION } from "./config-schema-version"; export type SettingsSchemaIssue = { path: string; kind: "unknown" | "invalid" | "coerced" | "pending-migration"; detail: string; }; export type SettingsSchemaReport = { issues: SettingsSchemaIssue[]; valid: boolean; }; /** * Validate an external (SDK `config.patch`) path/value set against the * settings schema before any durable write. Dotted sub-paths of record * settings (e.g. `modelRoles.default`) are validated against the record's * value schema. Returns the offending entries so the caller can reject the * whole patch without durable side effects. */ export declare function validateSettingPatch(patch: Record): Array<{ path: string; detail: string; }>; /** Coerce supported scalar legacy values and report unknown or invalid settings without dropping them. */ export declare function reconcileSettingsSchema(raw: Record): { settings: Record; report: SettingsSchemaReport; }; /** Status line preset - derived from schema */ export type StatusLinePreset = SettingValue<"statusLine.preset">; /** Status line separator style - derived from schema */ export type StatusLineSeparatorStyle = SettingValue<"statusLine.separator">; /** Tree selector filter mode - derived from schema */ export type TreeFilterMode = SettingValue<"treeFilterMode">; export interface CompactionSettings { enabled: boolean; strategy: "context-full" | "handoff" | "off"; thresholdPercent: number; thresholdTokens: number; reserveTokens: number; keepRecentTokens: number; handoffSaveToDisk: boolean; handoffPromptExtension: string; autoContinue: boolean; remoteEnabled: boolean; remoteEndpoint: string | undefined; maintenancePruningEnabled: boolean; maintenancePruningMinSavingsTokens: number; idleEnabled: boolean; idleThresholdTokens: number; idleTimeoutSeconds: number; } export interface ContextPromotionSettings { enabled: boolean; } export interface RetrySettings { enabled: boolean; maxRetries: number; baseDelayMs: number; maxDelayMs: number; requestMaxRetries: number; streamMaxRetries: number; streamFirstEventTimeoutMs: number; } export interface MemoriesSettings { enabled: boolean; maxRolloutsPerStartup: number; maxRolloutAgeDays: number; minRolloutIdleHours: number; threadScanLimit: number; maxRawMemoriesForGlobal: number; stage1Concurrency: number; stage1LeaseSeconds: number; stage1RetryDelaySeconds: number; phase2LeaseSeconds: number; phase2RetryDelaySeconds: number; phase2HeartbeatSeconds: number; rolloutPayloadPercent: number; fallbackTokenLimit: number; summaryInjectionTokenLimit: number; } export interface TodoCompletionSettings { enabled: boolean; maxReminders: number; } export interface BranchSummarySettings { enabled: boolean; reserveTokens: number; } export interface SkillsSettings extends SkillDiscoverySettings { disabledExtensions?: string[]; } export interface CommitSettings { mapReduceEnabled: boolean; mapReduceMinFiles: number; mapReduceMaxFileTokens: number; mapReduceTimeoutMs: number; mapReduceMaxConcurrency: number; changelogMaxDiffChars: number; } export interface TtsrSettings { enabled: boolean; contextMode: "discard" | "keep"; interruptMode: "never" | "prose-only" | "tool-only" | "always"; repeatMode: "once" | "after-gap"; repeatGap: number; } export interface ExaSettings { enabled: boolean; enableSearch: boolean; enableResearcher: boolean; enableWebsets: boolean; } export interface StatusLineSettings { preset: StatusLinePreset; separator: StatusLineSeparatorStyle; maxRows: number; showHookStatus: boolean; showSkillHud: boolean; showActionHints: boolean; leftSegments: StatusLineSegmentId[]; rightSegments: StatusLineSegmentId[]; segmentOptions: Record; } export interface ThinkingBudgetsSettings { minimal: number; low: number; medium: number; high: number; xhigh: number; max: number; } export interface SttSettings { enabled: boolean; language: string | undefined; modelName: string; whisperPath: string | undefined; modelPath: string | undefined; } export interface BashInterceptorRule { pattern: string; flags?: string; tool: string; message: string; allowSubcommands?: string[]; } export interface ShellMinimizerSettings { enabled: boolean; settingsPath: string | undefined; only: string[]; except: string[]; maxCaptureBytes: number; } export interface SessionMemorySettings { mode: "off" | "shadow" | "enabled" | "auto"; contextOverflowRecovery: boolean; } export interface MemoryGuardSettings { enabled: boolean; checkIntervalMs: number; gcThresholdPercent: number; restartThresholdPercent: number; restartThresholdWindowMs: number; cooldownMs: number; parentReserveMb: number; policyLimitMb: number; } export interface NotificationsSettings { enabled: boolean; telegram: { enabled?: boolean; botToken: string | undefined; chatId: string | undefined; sound: "all" | "important" | "none"; btw: { enabled: boolean; }; rich: { enabled: boolean; }; richDraft: { enabled: boolean; }; toolActivity: { enabled: boolean; }; streaming: { enabled: boolean; }; topics: { nameTemplate: string | undefined; }; }; discord: { enabled?: boolean; botToken: string | undefined; applicationId: string | undefined; guildId: string | undefined; parentChannelId: string | undefined; }; slack: { enabled?: boolean; botToken: string | undefined; appToken: string | undefined; workspaceId: string | undefined; channelId: string | undefined; authorizedUserId: string | undefined; }; redact: boolean; verbosity: "lean" | "verbose"; sessionScope: "all" | "primary"; daemon: { idleTimeoutMs: number; }; } /** Map group prefix -> typed settings interface */ export interface GroupTypeMap { compaction: CompactionSettings; contextPromotion: ContextPromotionSettings; retry: RetrySettings; memories: MemoriesSettings; branchSummary: BranchSummarySettings; skills: SkillsSettings; commit: CommitSettings; ttsr: TtsrSettings; exa: ExaSettings; statusLine: StatusLineSettings; thinkingBudgets: ThinkingBudgetsSettings; stt: SttSettings; memoryGuard: MemoryGuardSettings; sessionMemory: SessionMemorySettings; modelRoles: Record; modelTags: ModelTagsSettings; cycleOrder: string[]; shellMinimizer: ShellMinimizerSettings; notifications: NotificationsSettings; } export type GroupPrefix = keyof GroupTypeMap;