Files
claude-agent-acp/package.json
Andrey Bragin 88da9d800f Add an interactive console ACP simple client example (#936)
## Description
Testing this agent means wiring it into an editor's ACP integration,
which is an overkill when you just want to watch the JSON and reply with
JSON. This adds a second example next to `examples/steering.ts`: a
minimal interactive ACP client that spawns the built agent, prints every
JSON-RPC message in both directions, and turns what you type into
prompts.
```
npm run build
npm run example:simple-client
```

All four ways a client can get a message to this agent are reachable
from the prompt"
  | Input | Wire |
  | --- | --- |
| `<text>` | `session/prompt`; buffered client-side if a turn is running
|
| `!steer <text>` | `_session/steering`, injected into the running turn
|
| `!queue <text>` | `session/prompt` sent mid-turn, so the agent queues
it |
  | `!cancel`, Ctrl-C | `session/cancel` |
  
## Additional options
* `--debug-port=<port>` rebuilds with source maps and starts the agent
under
* `--inspect-brk`, paused, so a debugger can attach and step through
`src/*.ts` —
replacing a hand-written editor run configuration. Teardown cancels any
live
turn, closes the agent's stdin (its clean-exit path), waits, and only
then
closes the connection, so neither side dies of EPIPE and nothing is
orphaned.
2026-08-04 15:10:58 +02:00

87 lines
2.3 KiB
JSON

{
"name": "@agentclientprotocol/claude-agent-acp",
"publishConfig": {
"access": "public"
},
"version": "0.64.2",
"description": "An ACP-compatible coding agent powered by the Claude Agent SDK (TypeScript)",
"main": "dist/lib.js",
"types": "dist/lib.d.ts",
"bin": {
"claude-agent-acp": "dist/index.js"
},
"type": "module",
"exports": {
".": {
"types": "./dist/lib.d.ts",
"import": "./dist/lib.js"
},
"./*": "./*"
},
"files": [
"dist/",
"!dist/tests/",
"README.md",
"LICENSE",
"package.json"
],
"scripts": {
"build": "tsc",
"start": "node dist/index.js",
"dev": "npm run build && npm run start",
"example:simple-client": "node --experimental-strip-types --disable-warning=ExperimentalWarning examples/simple-client.ts",
"lint": "eslint src --ext .ts",
"lint:fix": "eslint src --ext .ts --fix",
"format": "prettier --write .",
"format:check": "prettier --check .",
"check": "npm run lint && npm run format:check",
"test": "vitest",
"test:integration": "RUN_INTEGRATION_TESTS=true vitest run",
"test:run": "vitest run",
"test:coverage": "vitest run --coverage",
"prepublishOnly": "npm run build"
},
"keywords": [
"claude",
"acp",
"agent",
"anthropic",
"typescript",
"sdk",
"code"
],
"homepage": "https://github.com/agentclientprotocol/claude-agent-acp#readme",
"bugs": {
"url": "https://github.com/agentclientprotocol/claude-agent-acp/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/agentclientprotocol/claude-agent-acp.git"
},
"author": "Zed Industries",
"license": "Apache-2.0",
"engines": {
"node": ">=22"
},
"dependencies": {
"@agentclientprotocol/sdk": "1.3.0",
"@anthropic-ai/claude-agent-sdk": "0.3.220",
"zod": "^3.25.0 || ^4.0.0"
},
"devDependencies": {
"@anthropic-ai/sdk": "0.115.0",
"@eslint/js": "10.0.1",
"@tsconfig/node22": "22.0.5",
"@types/node": "26.1.2",
"@typescript-eslint/eslint-plugin": "8.65.0",
"@typescript-eslint/parser": "8.65.0",
"eslint": "10.8.0",
"eslint-config-prettier": "10.1.8",
"globals": "17.8.0",
"prettier": "3.9.6",
"ts-node": "10.9.2",
"typescript": "6.0.3",
"vitest": "4.1.10"
}
}