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 AppServices services})
dart
CliAcpDelegate.forTest()

Properties ​

PropertyTypeDescription
servicesAppServices getHarness services. Non-null for production delegates; a [CliAcpDelegate.forTest] instance never calls into it.
servicesAppServices getHarness services. Non-null for production delegates; a [CliAcpDelegate.forTest] instance never calls into it.

Methods ​

`void debugInstallSession( ​
String id, {
required AgentCore agent,
required PermissionGate gate,

})`

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) ​

Released under the MIT License.