acpd logo

acpd_io

English · 简体中文

Production dart:io transports for acpd.

Features

  • StdioTransport for the current process or an externally managed process.
  • AcpAgent subprocess launch, process-tree cleanup, exit tracking, and bounded stderr tail.
  • AcpAgentConfig command parsing, environment, working directory, JSON, and fluent configuration.
  • Line-delimited JSON framing with recoverable malformed-frame reporting.
  • Optional inbound/outbound line tracing without changing protocol bytes.

Usage

import 'package:acpd/acpd.dart';
import 'package:acpd_io/acpd_io.dart';

final agent = await AcpAgent.start(
  const AcpAgentConfig(
    command: 'my-acp-agent',
    args: ['--stdio'],
  ),
);
final client = ClientRole().connect(agent.transport);

try {
  // Initialize and use the ACP client.
} finally {
  await client.close();
  await agent.close();
}

This package supports Dart VM and native Flutter platforms. It does not support Web.

See the package example/ for a runnable command-line client.

License

Apache License 2.0. See LICENSE.

Libraries

acpd_io
dart:io transport implementations for acpd.