sharedSettingMetadata top-level constant

Map<SharedSetting, _SettingMeta> const sharedSettingMetadata

Metadata for each SharedSetting: what to search for in each platform's source tree. The parity test greps the cliRef pattern inside lib/src/cli/ (recursively) and the appRef pattern inside flutter_app/lib/ (recursively). A non-null pattern that is absent from the target tree fails the test.

Implementation

const sharedSettingMetadata = <SharedSetting, _SettingMeta>{
  SharedSetting.approvalMode: _SettingMeta(
    cliRef: 'approvalMode',
    appRef: 'ApprovalModeStore',
    yamlKeys: ['approvalMode'],
    description:
        'Tool-approval mode (always-ask / write / yolo / autopilot; '
        'legacy alias: unattended).',
  ),
  SharedSetting.modelDefault: _SettingMeta(
    cliRef: 'providerKind',
    appRef: 'DefaultChatModelSection',
    yamlKeys: ['provider', 'model', 'baseUrl'],
    description: 'The default chat model.',
  ),
  SharedSetting.modelSmol: _SettingMeta(
    cliRef: 'smolModelRole',
    appRef: 'TaskModelsStore',
    yamlKeys: ['roles'],
    description: 'Fast/cheap model for compaction and subagents.',
  ),
  SharedSetting.mediaSlots: _SettingMeta(
    cliRef: 'mediaModelSlotIds',
    appRef: 'MediaSlot.all',
    yamlKeys: ['models'],
    description: 'Per-modality media model overrides.',
  ),
  SharedSetting.customProviders: _SettingMeta(
    cliRef: 'CustomProviderEntry',
    appRef: 'ProviderRegistry',
    yamlKeys: ['customProviders'],
    description: 'Saved custom provider endpoints.',
  ),
  SharedSetting.apiKeys: _SettingMeta(
    cliRef: 'SecureKeyCache',
    appRef: 'SessionKeysStore',
    yamlKeys: [],
    // apiKeys covers NO yaml key: keys live in env vars / the platform
    // secure store (E1 — secrets never ride the yaml config). Classified
    // as a SharedSetting because both surfaces edit the same store.
    description: 'API key store.',
  ),
  SharedSetting.mcpServers: _SettingMeta(
    cliRef: 'McpConfig',
    appRef: null, // exempted — not yet supported in the app.
    yamlKeys: ['mcp'],
    description: 'External MCP tool servers.',
  ),
  SharedSetting.ttsrRules: _SettingMeta(
    cliRef: 'TtsrConfig',
    // The app applies the yaml rules at boot (issue #1078 AC3): the
    // CLI's controller/manager pair over the app agent. No editor yet —
    // the section stays file-driven on the app.
    appRef: 'attachAppConfigTtsr',
    yamlKeys: ['ttsr'],
    description: 'Time-traveling stream rules.',
  ),
  SharedSetting.promptOverrides: _SettingMeta(
    cliRef: 'promptOverrides',
    appRef: null, // app does not expose prompt overrides — CLI-only.
    yamlKeys: ['prompts'],
    description: 'Prompt template overrides.',
  ),
  SharedSetting.skillsAccess: _SettingMeta(
    cliRef: 'skillsAccess',
    appRef: 'SkillsAccessStore',
    yamlKeys: ['skills'],
    description: 'Consent for reading third-party skill roots.',
  ),
  SharedSetting.skillsToggles: _SettingMeta(
    cliRef: 'skillToggles',
    appRef: 'SkillsTogglesStore',
    // The per-skill toggles are ENTRIES inside the `skills:` section — no
    // top-level key of their own (see nonYamlSettings).
    yamlKeys: [],
    description: 'Per-skill enable/disable toggles (issue #1151).',
  ),
  SharedSetting.cubeSandbox: _SettingMeta(
    cliRef: '/cube',
    appRef: null, // exempted — sandbox profiles are CLI-only (see above).
    yamlKeys: ['cube'],
    description: 'fa_cube sandbox profiles.',
  ),
  SharedSetting.dapHub: _SettingMeta(
    cliRef: 'config.plugins',
    appRef: 'DapHubSection',
    yamlKeys: [],
    // The hub connection is NOT a ~/.fah/config.yaml key: it lives in
    // ~/.dap/config.json + the .fah/packages.yaml plugin opt-out (E4-style
    // section entry covering the whole connection).
    description: 'DAP/1 hub connection (URL, agent name, channels).',
  ),
  SharedSetting.tools: _SettingMeta(
    cliRef: '/tools',
    appRef: 'ToolsAvailabilityStore',
    yamlKeys: ['tools', 'allowedTools'],
    description:
        'Capability-gated tool availability (hide unavailable/disabled '
        'tools).',
  ),
  SharedSetting.compactionEngine: _SettingMeta(
    cliRef: 'compactionEngine',
    // #295 named the app surface `CompactionSection` (the richer loader
    // symbol `loadAppCompactionEngine` also exists; the section is the
    // settings-parity surface this registry tracks).
    appRef: 'CompactionSection',
    yamlKeys: ['compaction'],
    description:
        'Compaction engine (structured default | classic rollback, #287).',
  ),
  SharedSetting.providersQueue: _SettingMeta(
    cliRef: 'providersQueue',
    // The app settings surface is the queue editor section (the richer
    // loader symbol resolveAppProviderQueue also exists).
    appRef: 'ProviderQueueSection',
    yamlKeys: ['providersQueue'],
    description:
        'Main-model provider queue (ordered failover chain, #418); the '
        'FA_PROVIDERS_QUEUE env scope is read-only on every surface.',
  ),
  SharedSetting.agentMode: _SettingMeta(
    cliRef: '_openModePicker',
    appRef: null, // exempted — modes are CLI-only (see above).
    yamlKeys: ['mode'],
    description: 'Agent mode preset (code / ask / plan …).',
  ),
  SharedSetting.memoryStores: _SettingMeta(
    cliRef: 'startMemoryStoresFlow',
    appRef: null, // exempted — host paths, CLI-only (see above).
    yamlKeys: ['memory'],
    description: 'Long-term memory store locations.',
  ),
  SharedSetting.spillHooks: _SettingMeta(
    cliRef: 'attachSpillWiring',
    appRef: null, // exempted — hook chain lives in the CLI host (see above).
    yamlKeys: ['spills'],
    description: 'Automatic tool-result spilling wiring (issue #678).',
  ),
  SharedSetting.tuiTheme: _SettingMeta(
    cliRef: 'tuiTheme',
    appRef: null, // exempted — terminal theming, CLI-only (see above).
    yamlKeys: ['tui'],
    description: 'TUI palette (tui.theme + user themes, issue #279).',
  ),
  SharedSetting.redactionPolicy: _SettingMeta(
    cliRef: 'startRedactionFlow',
    // The app's settings surface is the live toggle (issue #1078
    // AC4/E3); the richer loader symbols live in the app config loader.
    appRef: 'RedactionSection',
    yamlKeys: ['redact'],
    description: 'Redaction pipeline policy (issue #391).',
  ),
  SharedSetting.imageRegistry: _SettingMeta(
    cliRef: 'startImagesFlow',
    appRef: null, // exempted — request-build global lives in the CLI host.
    yamlKeys: ['images'],
    description: 'Image registry kill switch + per-request cap (issue #395).',
  ),
  SharedSetting.sleepPrevention: _SettingMeta(
    cliRef: 'startPowerFlow',
    appRef: null, // exempted — assertion lifecycle lives in the CLI host.
    yamlKeys: ['power'],
    description: 'Sleep-prevention level + hold lifecycle (issue #397).',
  ),
  SharedSetting.contextWindowCap: _SettingMeta(
    cliRef: 'startContextCapFlow',
    appRef: null, // exempted — CLI agent loop only (see above).
    yamlKeys: ['agent'],
    description: 'Owner-side context cap (issue #394).',
  ),
  SharedSetting.loadMode: _SettingMeta(
    cliRef: 'startLoadModeFlow',
    // The app pins the preset at agent build (issue #1078 AC2/E4).
    appRef: 'AgentLoadMode',
    // The load mode is the `agent.mode` LEAF of the agent: section: the
    // top-level `agent` key stays owned by contextWindowCap above (the
    // completeness gate's single-owner rule) — this entry owns the
    // interactive surface (the settings-hub flow + /settings line), so
    // it carries no yaml key of its own (see nonYamlSettings).
    yamlKeys: [],
    description: 'Tool-load preset: default | pi | omp (issue #680).',
  ),
  SharedSetting.resiliencePolicy: _SettingMeta(
    cliRef: 'startResilienceFlow',
    // The app publishes the same process-wide override (issue #1078
    // AC5); the retry policy rides the app's roles resolver (AC1).
    appRef: 'providerTimeoutsOverride',
    yamlKeys: ['providerTimeouts', 'retry'],
    description: 'Provider failure resilience (issue #393).',
  ),
  SharedSetting.harnessMode: _SettingMeta(
    cliRef: 'startHarnessModeFlow',
    appRef: null, // exempted — CLI REPL benchmark boot only (see above).
    yamlKeys: [], // rides `agent:` — single-owned by contextWindowCap.
    description: 'Harness benchmark mode preset (issue #679).',
  ),
  SharedSetting.autoUpdate: _SettingMeta(
    cliRef: 'startAutoUpdateFlow',
    appRef: null, // exempted — the CLI re-execs itself; the app cannot.
    yamlKeys: ['auto_update'],
    description: 'Self-update policy: notify | on | off (issue #1377).',
  ),
};