A Node.js implementation of a CLI/REPL client that interacts with the Coma agent via the Agent Client Protocol (ACP). It provides a real-time interactive terminal environment with full markdown-rendered streaming output, command logs, tool execution updates, and permission request handling.
- Agent Client Protocol (ACP): Fully implements connection establishment, protocol handshake negotiation, session creation, and prompt execution using the
@agentclientprotocol/sdk. - Interactive REPL: A CLI loop that lets you prompt the Coma agent and receive streaming thoughts and messages.
- Rich Terminal Markdown Renderer: Dynamically parses and styles streamed markdown content as it arrives.
- Custom visual decorations for headers (
█,■,▲,○). - Styled list bullet points and numbers.
- Blockquotes, bold, italics, inline code.
- Border-boxed code blocks with syntax language identifiers.
- Real-time text wrapping and line-oriented rendering.
- Custom visual decorations for headers (
- Process Spawning: Automatically spawns the Coma agent (
comaexecutable in--acpmode) from parent or adjacent folders. - Tool Execution Tracking: Visual representations for when the agent triggers tool calls and receives tool call updates.
test_client.js: Core entry point that manages the lifecycle of the Coma child process, ACP ndjson connection streams, initialization, and the REPL.markdown_renderer.js: Custom terminal-based streamed Markdown parser and ANSI text styler.
- Node.js (v18 or higher recommended, module support enabled)
- The Coma agent executable compiled and located at
../coma/zig-out/bin/coma(or configure the path intest_client.js).
- Clone or copy this repository.
- Install the package dependencies:
npm install
Start the client by running:
node test_client.js- Enter any message to prompt the agent.
- Type
exitto cleanly terminate the ACP session and exit the process.
This project is licensed under the Apache License 2.0. See the LICENSE file for details.