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, List<CustomProviderEntry> customProviders = const [], ModelsConfig? models, McpConfig? mcp, A2aConfig? a2a, ProviderTimeoutsOverride? providerTimeouts, SkillsAccess skillsAccess = SkillsAccess.granted, bool skillsDisableShellExecution = false})
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
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, unattended); parsed with approvalModeFromLabel from lib/src/approval/.
final
baseUrl String
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
hashCode int
The hash code for this object.
no setterinherited
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
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
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
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
ttsr TtsrConfig?
Optional TTSR stream rules (ttsr: yaml section). null disables stream-rule monitoring.
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

Operators

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