CliConfig class final

Persisted CLI configuration.

Constructors

CliConfig({String providerKind = 'openai-completions', String modelId = 'openai/gpt-4o-mini', String baseUrl = 'https://openrouter.ai/api/v1', String mode = 'code', String approvalMode = 'yolo', List<String> allowedTools = const [], Map<String, String> promptOverrides = const {}, ModelRolesConfig? modelRoles, TtsrConfig? ttsr, int? contextWindowCap, String? agentLoadMode, List<CustomProviderEntry> customProviders = const [], ModelsConfig? models, McpConfig? mcp, A2aConfig? a2a, ProviderTimeoutsOverride? providerTimeouts, SkillsAccess skillsAccess = SkillsAccess.granted, bool skillsDisableShellExecution = false, MemoryConfig? memory, FabricConfig? fabric, CubeSettings? cube, ToolsConfig? tools, RedactionConfig? redact, SpillsConfig? spills, CompactionEngine? compactionEngine, int? compactionJudgeBudgetSeconds, bool wireDump = false, ImageRegistryConfig? images, String? agentMode, SubagentsConfig subagents = const SubagentsConfig(), WaitingConfig waiting = const WaitingConfig(), JobsConfig jobs = const JobsConfig(), PowerAssertionLevel? powerSleepPrevention, PowerAssertionHold? powerHold, String? tuiTheme, bool tuiClassic = false, StatusLineConfig? statusLine, LinksConfig links = const LinksConfig()})
CliConfig.fromYaml(YamlMap map)
factory

Properties

a2a → A2aConfig?
Optional A2A remote agents config (a2a: yaml section). Parsed strictly; ${NAME} tokens resolve from the environment.
final
agentLoadMode → String?
Tool-load preset from agent.mode (default|pi|omp, issue #680): the curated essential set that boots into the schema; everything else stays discoverable. null = default mode (no preset, byte-identical behavior).
final
agentMode → String?
The parsed harness mode preset (agent.mode, issue #679): 'pi' or null (absent or explicit default). Resolved against the flag/env tiers by the executable via resolveHarnessMode.
final
allowedTools → List<String>
Tools the user always-allowed (via /allow or an "approve always" prompt answer), persisted across runs.
final
approvalMode → String
Approval mode label (always-ask, write, yolo, autopilot — the pre-rename unattended spelling still parses); parsed with approvalModeFromLabel from lib/src/approval/.
final
baseUrl → String
final
compactionEngine → CompactionEngine?
Optional compaction: section — the compaction engine selector (issue #148): classic (lossy prefix summary) or structured (hide → checkpoint + expand). null means the section is absent; the effective engine resolves global < project < runtime.
final
compactionJudgeBudgetSeconds → int?
Optional compaction.judgeBudgetSeconds (issue #541) — the per-call judge/summarizer budget in seconds. null keeps the 300s default; the knob exists so owners of giant marathon sessions can give a slow judge room without touching code. NOTE: the knob scales only the per-attempt budget — the whole-run totalBudget (default 15 min) is NOT scaled, so values above 300s shorten the retry ladder (the total is exhausted after fewer full-timeout attempts).
final
contextWindowCap → int?
Owner-side effective context override from the agent: section (contextWindowCap, issues #273/#729): sets the EFFECTIVE context window everywhere it is consumed (compaction thresholds, ctx meter/footer, the loop guard) — clamped down below the catalog window, raised above it to the served truth. null = uncapped (the raw model window).
final
cube → CubeSettings?
Optional cube: section — the default fa_cube sandbox profile applied at startup when neither --cube nor --cube-config is passed. Parsed strictly; null means the section is absent.
final
customProviders → List<CustomProviderEntry>
Saved custom providers (customProviders: yaml section), shown first in the /provider picker and appended to by the /provider custom wizard. Parsed strictly: a malformed entry throws ConfigException.
final
fabric → FabricConfig?
Optional fabric: section — the host's discovery announcements for the agent messaging fabric (issue #27 phase 2): capabilities peers see in agent_directory. Parsed strictly.
final
hashCode → int
The hash code for this object.
no setterinherited
images → ImageRegistryConfig?
registry kill switch + maxPerRequest cap. null keeps the defaults (registry on, defaultMaxImagesPerRequest).
final
jobs → JobsConfig
The jobs: section (issue #478): boot-maintenance knobs for the cross-run shell-job state — staleHours (manifest age belt, default 24) and logRetentionDays (log GC, default 3; 0 keeps all).
final
The links: section (issue #691): the single source of truth for product/store links — the app banners, the CLI (fa config get links.…) and the site generator all resolve the same values.
final
mcp → McpConfig?
Optional MCP servers config (mcp: yaml section). Parsed strictly: a schema error throws ConfigException. null disables MCP. Managed by editing the config file only (no CLI commands yet).
final
memory → MemoryConfig?
Optional memory: section — long-term memory storage path overrides (git-backed project memory). Null = the historical .fah/memory layout.
final
mode → String
final
modelId → String
final
modelRoles → ModelRolesConfig?
Optional model roles: role → fallback chains, path-scoped overrides, and the retry policy (roles: / modelOverrides: / retry: yaml sections). null keeps the legacy single provider/model behavior.
final
models → ModelsConfig?
Optional models config (models: yaml section): per-slot media model overrides (managed by /models set//models remove) and named custom model definitions (/model <name> targets). Parsed strictly: a schema error throws ConfigException. null means the section is absent.
final
powerHold → PowerAssertionHold?
Sleep-assertion hold lifecycle (power.hold, #326): null means absent — the host resolves the per-run default (acquire at run start, release at settle); session is the explicit hold-the-whole- session opt-in.
final
powerSleepPrevention → PowerAssertionLevel?
Sleep-prevention level from the power: section (power.sleepPrevention, issue #325 — after oh-my-pi's power.sleepPrevention). null means the section is absent; the host resolves the idle default, keeping "not configured" and "explicitly off" distinct.
final
promptOverrides → Map<String, String>
Raw prompt overrides from the prompts: yaml section: prompt name → file path or inline text (validated by parsePromptOverrideMap). The executable resolves it into a PromptOverrides via resolvePromptOverrides (file reads live in lib/io.dart); an empty map keeps the built-in prompts.
final
providerKind → String
final
providerTimeouts → ProviderTimeoutsOverride?
Optional provider watchdog overrides (providerTimeouts: yaml section, connectTimeoutMs/streamIdleTimeoutMs). Parsed strictly. bin/fah.dart publishes it to providerTimeoutsOverride at startup.
final
redact → RedactionConfig?
Optional redact: section — layered secret redaction. null means the section is absent (redaction still runs with default config; the pipeline assembly happens in the host startup, see buildRedactionPipeline).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
skillsAccess → SkillsAccess
Consent to read third-party skill/agent directories (.claude/.github/.codex + their ~/ mirrors), from the skills.access yaml key. SkillsAccess.granted is the default — discovery is opt-out so migrating users get their existing skills with zero setup; ask makes the interactive REPL prompt once at startup.
final
skillsDisableShellExecution → bool
When true, Claude-style !cmd`` / ```! shell injections in skill bodies render as a disabled placeholder instead of executing (the skills.disableShellExecution yaml key).
final
spills → SpillsConfig?
Optional spills: section (issue #678) — automatic tool-result spilling thresholds. Tolerant parse; null means the section is absent (the project scope reads live via loadProjectSpillsConfig and wins wholesale, like the other project sections).
final
statusLine → StatusLineConfig?
The statusLine section (tui.statusLine, issue #805): preset or custom segment groups + separator + options. null = the default preset. Consumed by TuiStatusLine via resolveStatusLineSpec.
final
subagents → SubagentsConfig
The subagents: section (issue #383): heartbeat cadence (heartbeatMinutes, 0 = off) and stall threshold (stallMinutes, 0 = flags off) for background-subagent status digests.
final
tools → ToolsConfig?
Optional tools: section — capability-gated tool availability for the GLOBAL scope. Parsed strictly; null means the section is absent. The project scope reads live via loadProjectToolsConfig and the runtime scope arrives as --tools/FA_TOOLS; scopes stay separate for the deepest-wins resolution.
final
ttsr → TtsrConfig?
Optional TTSR stream rules (ttsr: yaml section). null disables stream-rule monitoring.
final
tuiClassic → bool
The classic-chrome kill switch (tui.classic, issue #805): when set, S3's composer renders the legacy _statusLine() footer byte-identically instead of the omp status bar. Parsed here so the key validates strictly; consumed by the S3 rendering concern.
final
tuiTheme → String?
Persisted TUI theme name (tui.theme): a built-in key or a user theme file stem from ~/.fah/themes/<name>.json. null = default theme; an unknown name warns at boot and keeps the default.
final
waiting → WaitingConfig
The waiting: section (issue #450): visible-waiting heartbeat cadence (waitHeartbeatMinutes, 0 = off) and the --wait-for-jobs ceiling (waitCeilingMinutes, default 30).
final
wireDump → bool
Optional trajectory: section (issue #385) — wireDump: true opts the raw outbound request payloads into the session ledger as redacted, capped trajectory_wire_dump records. Default false: payloads are never persisted unconditionally.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
toYaml() → String
withCustomProviders(List<CustomProviderEntry> entries) → CliConfig
Returns a copy with entries as the custom-providers list; every other field carries over. saveCliConfig uses it for its merge-before-write union (issue #221) — keep this field list in sync with the constructor when a section is added.

Operators

operator ==(Object other) → bool
The equality operator.
inherited