AgentCoreServices class final

The typed platform services a host supplies to wireAgentCore.

Nullable fields are the config/run-conditional ones: null means the facility does not exist this run, which run-narrowing declares as an honest off — the per-tool null gates inside the assembly then agree with the plan by construction.

Constructors

AgentCoreServices({required ExecutionEnv baseEnv, FutureOr<Map<String, String>> sessionEnvVars()?, SandboxServices? sandbox, HashlineSnapshotStore? snapshots, WebSearchConfig? webSearch, SqliteEngine? sqlite, LspToolConfig? lsp, McpManager? mcp, ShellJobRegistry? shellJobsFactory(ExecutionEnv coreEnv)?, ConfigService? configServiceFactory(ExecutionEnv coreEnv)?, PasswordPromptCallback? onPasswordPrompt, MemoryController? memory, void onMemoryChanged()?, ScheduledMessageQueue? scheduledMessages, String? scheduleSenderMailbox()?, AskCallback? onAsk, RequestSecretCallback? onRequestSecret, ObligationClose? obligationsClose, InspectImageConfig? vision, TranscribeAudioConfig? transcribe, MediaToolServices? media, BrowserController? browserController, Future<String> saveBrowserScreenshot(ExecutionEnv coreEnv, Uint8List png)?, List<HostExtension> extensions = const [], MessagingRepository? hubFabric, String? mainMailbox()?, SubagentServices? subagents, Object? extRuntimeFactory, String? sessionRoot, AgentTelemetrySink? telemetry, HostKeyResolver? keyResolver, void onKeySlotDrift(String message)?})
const

Properties

baseEnv → ExecutionEnv
The host's base environment (the CLI's CwdOverrideEnv). Decorated by the builder: sandbox (when wired) → session vars (when provided).
final
browserController → BrowserController?
final
configServiceFactory → ConfigService? Function(ExecutionEnv coreEnv)?
Config tool service factory — same final-env shape.
final
extensions → List<HostExtension>
The host's declared extensions (issue #1079 slice 4 — the HostExtensionApi): named tool contributions with an explicit per-profile matrix (E6). The builder gates them: tool-id collisions rejected at build time with both registrants named (E7), and a profile-off extension hides with its reason surfaced on WiredAgentCore.extensions (E8). See HostExtension.
final
extRuntimeFactory → Object?
final
hashCode → int
The hash code for this object.
no setterinherited
hubFabric → MessagingRepository?
The hub-transport messaging backend. The builder composes the fabric's hub primary over it (slice 3: the fabric itself is builder-owned); null drops the hub transport at run-narrowing, the file layer keeps working.
final
keyResolver → HostKeyResolver?
Host-facing provider-key slot resolution (issue #1322 Gap 2). The host injects its env/store readers; resolveKey then answers which slot the request path WILL use. Null = the host resolves keys its own way (and owns the canonical-vs-pinned drift risk).
final
lsp → LspToolConfig?
final
mainMailbox → String? Function()?
The host's MAIN inbox resolver for the hub primary's mail merge — required whenever the hub transport wires (E1-loud otherwise). The CLI resolves () => _subagentManager.mailboxOf('main') lazily, so the manager may be constructed after the fabric.
final
mcp → McpManager?
final
media → MediaToolServices?
final
memory → MemoryController?
Host-side tool families (the CLI's memory/fabric/ask surface). They move INTO the builder's gated set in later slices; the builder already places them in the canonical order.
final
obligationsClose → ObligationClose?
The obligations-ledger close callback (obligation_mark_done, issue #1380 lifecycle). Null = the host does not maintain the ledger: the tool still registers and answers gracefully in-tool — the same always-registered contract as onAsk.
final
onAsk → AskCallback?
The ask host prompt. Null = headless host: the tool still registers and fails gracefully in-tool (its documented null mode) — it is never dropped from the registry.
final
onKeySlotDrift → void Function(String message)?
Fires when the run's model resolved to a PINNED key slot instead of the canonical one — the same migration hint the CLI prints at boot. Requires keyResolver; called once per WiredAgentCore.buildAgentStack.
final
onMemoryChanged → void Function()?
final
onPasswordPrompt → PasswordPromptCallback?
final
onRequestSecret → RequestSecretCallback?
The request_secret host prompt. Null = headless host: same always-registered graceful-failure contract as onAsk.
final
providedServiceNames → Set<String>
The catalog service names this bundle provides — the run-narrowing input. Names match CapabilitySpec.requiredServices keys exactly.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sandbox → SandboxServices?
final
saveBrowserScreenshot → Future<String> Function(ExecutionEnv coreEnv, Uint8List png)?
The browser screenshot saver. The builder hands it the SAME decorated env every fs-touching tool rides (base → sandbox → session vars, review #1230): a screenshot save clamps through the cube fs policy exactly like generate_image writes to the same tree. One rule — hosts must not close over their raw base env.
final
scheduledMessages → ScheduledMessageQueue?
final
scheduleSenderMailbox → String? Function()?
final
sessionEnvVars → FutureOr<Map<String, String>> Function()?
The live session-var source for SessionVarsExecutionEnv. Null on hosts without session variables.
final
sessionRoot → String?
final
shellJobsFactory → ShellJobRegistry? Function(ExecutionEnv coreEnv)?
Shell job board factory — receives the FINAL decorated env (the jobs' processes must run through the same env the tools use).
final
snapshots → HashlineSnapshotStore?
final
sqlite → SqliteEngine?
final
subagents → SubagentServices?
The subagent/task complex (slice 3). Null = the capability narrows off this run with a named reason; the task/monitoring surface and the fabric/manager/heartbeat never half-wire.
final
telemetry → AgentTelemetrySink?
Lifecycle telemetry for in-process hosts (issue #1322 Gap 3). When present, buildAgentStack attaches the sink to the built agent and wraps the stream function — turn/tool/first-token/provider-status records flow with zero further host code. Null = silent (today's behavior). The interface is pure; the fa.log file sink comes from package:flutter_agent_harness/io.dart.
final
transcribe → TranscribeAudioConfig?
final
vision → InspectImageConfig?
final
webSearch → WebSearchConfig?
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveKey({String? provider, required String baseUrl, String? model, List<String> envNames = const [], String? defaultBaseUrl, String? activeCustomKeyName}) → HostKeyResolution?
The effective key-slot name (and drift hints) for baseUrl — the host-facing ask the CLI kept internal (issue #1322 Gap 2). Null when no keyResolver was supplied.
toString() → String
A string representation of this object.
inherited

Operators

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