io library
dart:io-backed execution environment for VM, desktop, and mobile.
Separate entry point so the core library (flutter_agent_harness.dart)
stays pure Dart and web-compilable. Import this only from platform code
that is allowed to touch dart:io.
Classes
- CliConfig
- Persisted CLI configuration.
- IoLspTransport
- An LspTransport over a spawned process's stdio.
- LocalExecutionEnv
- Local ExecutionEnv: LocalFileSystem plus LocalShell.
- LocalFileSystem
-
Local-disk FileSystem backed by
dart:io. - LocalShell
-
Minimal local shell backed by
dart:ioProcess. - Sqlite3Engine
-
A SqliteEngine opening databases through
package:sqlite3(FFI).
Constants
-
headlessTextExtensions
→ const Set<
String> - File extensions whose content is inlined as the headless prompt body.
Functions
-
homeDirectory(
) → String? -
Returns the user's home directory, or
nullif it cannot be determined. -
ioLspTransportFactory(
LspServerConfig config, String cwd) → Future< LspTransport> -
The process-capable LspTransportFactory for CLI/desktop hosts: spawns
config.command config.args...in the workspace root. -
loadCliConfig(
String homeDir) → CliConfig -
Loads CliConfig from
~/.fah/config.yaml. -
loadPromptFile(
String path, {required String homeDir, required String baseDir, required String source}) → String -
Reads
pathas a prompt override file: YAML frontmatter is stripped (so theprompts/**Markdown sources can be copied verbatim as overrides) and the body is trimmed. A missing or unreadable file throws ConfigException prefixed withsource— never a silent fallback. -
loadPromptOverrideSource(
String value, {required String homeDir, required String baseDir, required String source}) → String - Resolves one raw override value: a file path per looksLikePromptFilePath (read via loadPromptFile), anything else is inline text (trimmed).
-
looksLikePromptFilePath(
String value) → bool -
Whether a raw
prompts:value names a file rather than inline text: an absolute path, a~/home-relative path, a.//../relative path, or anything ending in a Markdown/text extension (.md,.markdown,.txt). -
resolveHeadlessPrompt(
{String? prompt, List< String> positionals = const []}) → String? - Resolves the headless prompt from parsed CLI arguments.
-
resolvePromptFilePath(
String path, {required String homeDir, required String baseDir}) → String -
Expands a leading
~tohomeDirand resolves a relative path againstbaseDir. -
resolvePromptOverrides(
Map< String, String> raw, {required String homeDir, required String baseDir}) → PromptOverrides -
Resolves the validated raw
prompts:map (see parsePromptOverrideMap) into a PromptOverrides. Relative file paths resolve againstbaseDir(the CLI passes the agent cwd); thesystemalias canonicalizes tocli/mode_code. Missing files throw ConfigException. -
saveCliConfig(
String homeDir, CliConfig config) → Future< void> -
Saves CliConfig to
~/.fah/config.yaml.