/** * Host-neutral canonical configuration field catalog. * * Describes every FIXED canonical `tmux-pilot.config.yaml` field: its canonical * path pattern, the scope it lives at, input metadata, hardcoded fallback, * resolution chain, replacement semantics, description, and when a saved change * takes effect. The catalog is plain serializable data — it is shipped to the * web console as JSON and drives the schema-coverage test * (`test/config-catalog-coverage.test.ts`) against the loader's accepted-key * inventory (`canonicalKeyInventory` in `config-convert.ts`). * * Dynamic identifiers stay OPEN: role names, harness ids, model ids, provider * ids, and harness-color ids are never closed enums. They appear in path * patterns as ``, ``, `` placeholders. * * This module is core — it imports no pi packages and no harness * implementations. Runtime defaults are imported from the resolvers that own * them rather than duplicated. */ /** Scope a field lives at. Drives console section grouping. */ export type ConfigScopeId = "console" | "execution" | "widget" | "worktree" | "global" | "harness" | "role" | "model"; /** Editor grouping within a scope. */ export type ConfigGroupId = "execution" | "widget" | "worktree" | "routing" | "workspace" | "lifecycle" | "appearance" | "sandbox"; /** One layer of a field's resolution chain, most specific first. */ export type ConfigChainLayer = "model" | "role" | "harness" | "global" | "default"; /** When a saved change becomes observable. Never mutates running agents. */ export type ConfigApplyTiming = "next-spawn" | "next-session" | "next-console-launch"; /** Input metadata. `kind` selects the console's domain editor. */ export type ConfigInput = { kind: "boolean"; } | { kind: "integer"; min?: number; max?: number; unit?: "ms" | "count"; } | { kind: "enum"; options: readonly string[]; } | { kind: "string"; suggest?: "harness" | "provider" | "model"; } | { kind: "key-id"; } | { kind: "path"; } | { kind: "color"; } | { kind: "glyph"; } | { kind: "model-list"; } | { kind: "threshold-list"; } | { kind: "color-map"; } | { kind: "string-list"; item: "path" | "domain" | "env-name"; }; export interface ConfigFieldMeta { /** Canonical path pattern; ``/``/`` are placeholders. */ path: string; scope: ConfigScopeId; group: ConfigGroupId; /** Final path segment. */ key: string; label: string; description: string; input: ConfigInput; /** Hardcoded fallback when no layer sets the field; absent = unset. */ default?: unknown; /** Resolution chain, most specific layer first. */ chain: readonly ConfigChainLayer[]; /** True when an ordered sequence is replaced wholesale, never merged. */ replacement?: boolean; timing: ConfigApplyTiming; /** * Set when the loader ACCEPTS the key at this scope but the runtime ignores * it there. The console shows the explanation and disables the control. */ ignored?: string; } /** Thinking levels understood by the routing layer (harnesses map them on). */ export declare const THINKING_LEVELS: readonly ["off", "minimal", "low", "medium", "high", "xhigh"]; /** Canonical `subagent-widget.placement` values. */ export declare const CANONICAL_PLACEMENTS: readonly ["above-editor", "below-editor"]; /** Canonical `subagent-execution.tmux-server` values. */ export declare const TMUX_SERVER_MODES: readonly ["current-session", "isolated"]; /** Canonical `harness-config-directory.mode` values. */ export declare const CONFIG_DIR_MODES: readonly ["overlay", "replace"]; /** Bars carrying a configurable palette. */ export declare const STYLE_BARS: readonly ["health", "mana", "cast"]; /** Every catalogued canonical field. */ export declare function configFieldCatalog(): readonly ConfigFieldMeta[]; /** Fields at one scope, in catalog order. */ export declare function fieldsForScope(scope: ConfigScopeId): ConfigFieldMeta[]; /** Look a field up by its canonical path pattern. */ export declare function fieldByPath(path: string): ConfigFieldMeta | undefined; /** * Replace ``/``/`` placeholders with concrete ids and * split the result into a canonical path segment array suitable for * `Document.setIn`/`getIn`. */ export declare function resolveCatalogPath(pattern: string, ids?: { role?: string; harness?: string; model?: string; }): string[]; //# sourceMappingURL=config-catalog.d.ts.map