launch static method
Future<AcpAgent>
launch(
- AgentLaunchCommand command, {
- required ProcessExecutor executor,
- AgentClientServices client = const AgentClientServices(),
- AgentInfo clientInfo = const semantic.AgentInfo(name: 'agent_harness', version: agentHarnessVersion),
Implementation
static Future<AcpAgent> launch(
AgentLaunchCommand command, {
required ProcessExecutor executor,
AgentClientServices client = const AgentClientServices(),
semantic.AgentInfo clientInfo = const semantic.AgentInfo(
name: 'agent_harness',
version: agentHarnessVersion,
),
}) async {
try {
final stdioTransport = await StdioAcpTransport.launch(
command: command,
executor: executor,
);
final transport = executor is AcpTransportDecorator
? (executor as AcpTransportDecorator).decorateAcpTransport(
stdioTransport,
)
: stdioTransport;
return await connect(transport, client: client, clientInfo: clientInfo);
} catch (error, stackTrace) {
throwWrappedAcpConnection(error, stackTrace);
}
}