Skip to content

CliAcpDelegate

Category: Acp

Source: cli_acp_delegate.dart

CLI wiring for the ACP server: a [AcpServerDelegate] that creates a per-session [AgentCore] + tool registry through the harness's [ServiceLocator], runs prompts, and routes permission decisions through the harness's [PermissionGate].

One CLI process can host multiple ACP sessions concurrently — each gets its own AgentCore + tool registry but shares the [GlueConfig] / [Observability] / [SkillRuntime] from the locator's startup work.

Classes

CliAcpDelegate

Constructor

dart
CliAcpDelegate({required this.services})

Properties

PropertyTypeDescription
servicesAppServices
agentAgentCore
gatePermissionGate
activeControllerStreamController<AgentEvent>?

Methods

Future<String> createSession(SessionNewParams params)
`Stream<AgentEvent> prompt({
required String sessionId,
required String userMessage,
required Future&lt;bool&gt; Function(ToolCall call) requestPermission,
List&lt;ContentPart&gt; userContentParts = const [],

})`

UsageReport usageSummary(String sessionId)
void cancelPrompt(String sessionId)
Future&lt;void&gt; closeSession(String sessionId)

Released under the MIT License.