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 explicitdefault). Resolved against the flag/env tiers by the executable viaresolveHarnessMode.final -
allowedTools
→ List<
String> -
Tools the user always-allowed (via
/allowor an "approve always" prompt answer), persisted across runs.final - approvalMode → String
-
Approval mode label (
always-ask,write,yolo,autopilot— the pre-renameunattendedspelling still parses); parsed withapprovalModeFromLabelfromlib/src/approval/.final - baseUrl → String
-
final
- compactionEngine → CompactionEngine?
-
Optional
compaction:section — the compaction engine selector (issue #148):classic(lossy prefix summary) orstructured(hide → checkpoint + expand).nullmeans 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.nullkeeps 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-runtotalBudget(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--cubenor--cube-configis passed. Parsed strictly;nullmeans the section is absent.final -
customProviders
→ List<
CustomProviderEntry> -
Saved custom providers (
customProviders:yaml section), shown first in the/providerpicker and appended to by the/provider customwizard. 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 inagent_directory. Parsed strictly.final - hashCode → int
-
The hash code for this object.
no setterinherited
- images → ImageRegistryConfig?
-
registrykill switch +maxPerRequestcap.nullkeeps 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) andlogRetentionDays(log GC, default 3; 0 keeps all).final - links → LinksConfig
-
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.nulldisables 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/memorylayout.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).nullkeeps 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.nullmeans the section is absent.final - powerHold → PowerAssertionHold?
-
Sleep-assertion hold lifecycle (
power.hold, #326):nullmeans absent — the host resolves theper-rundefault (acquire at run start, release at settle);sessionis 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'spower.sleepPrevention).nullmeans the section is absent; the host resolves theidledefault, 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 aPromptOverridesviaresolvePromptOverrides(file reads live inlib/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.dartpublishes it to providerTimeoutsOverride at startup.final - redact → RedactionConfig?
-
Optional
redact:section — layered secret redaction.nullmeans 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 theskills.accessyaml key. SkillsAccess.granted is the default — discovery is opt-out so migrating users get their existing skills with zero setup;askmakes 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 (theskills.disableShellExecutionyaml key).final - spills → SpillsConfig?
-
Optional
spills:section (issue #678) — automatic tool-result spilling thresholds. Tolerant parse;nullmeans 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;nullmeans 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).nulldisables 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-jobsceiling (waitCeilingMinutes, default 30).final - wireDump → bool
-
Optional
trajectory:section (issue #385) —wireDump: trueopts the raw outbound request payloads into the session ledger as redacted, cappedtrajectory_wire_dumprecords. 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
entriesas 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