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:io Process.
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 null if 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 path as a prompt override file: YAML frontmatter is stripped (so the prompts/** Markdown sources can be copied verbatim as overrides) and the body is trimmed. A missing or unreadable file throws ConfigException prefixed with source — 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 ~ to homeDir and resolves a relative path against baseDir.
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 against baseDir (the CLI passes the agent cwd); the system alias canonicalizes to cli/mode_code. Missing files throw ConfigException.
saveCliConfig(String homeDir, CliConfig config) Future<void>
Saves CliConfig to ~/.fah/config.yaml.