mirror of
https://github.com/agentclientprotocol/claude-agent-acp.git
synced 2026-10-29 13:31:58 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
17aad5b7a1 | ||
|
|
dadc7f9f40 |
@@ -1,5 +1,12 @@
|
||||
# Changelog
|
||||
|
||||
## 0.6.10
|
||||
|
||||
- Provide `agentInfo` on initialization response.
|
||||
- Update to @agentclientprotocol/sdk@0.5.1
|
||||
- Fix crash when receiving a hook_response event
|
||||
- Fix for invalid locations when read call has no path
|
||||
|
||||
## 0.6.9
|
||||
|
||||
- Update to @anthropic-ai/claude-agent-sdk@v0.1.26
|
||||
|
||||
110
package-lock.json
generated
110
package-lock.json
generated
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"name": "@zed-industries/claude-code-acp",
|
||||
"version": "0.6.9",
|
||||
"version": "0.6.10",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@zed-industries/claude-code-acp",
|
||||
"version": "0.6.9",
|
||||
"version": "0.6.10",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@agentclientprotocol/sdk": "0.5.0",
|
||||
"@agentclientprotocol/sdk": "0.5.1",
|
||||
"@anthropic-ai/claude-agent-sdk": "0.1.26",
|
||||
"@anthropic-ai/claude-code": "2.0.26",
|
||||
"@modelcontextprotocol/sdk": "1.20.2",
|
||||
@@ -22,27 +22,27 @@
|
||||
"claude-code-acp": "dist/index.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@anthropic-ai/sdk": "^0.67.0",
|
||||
"@anthropic-ai/sdk": "0.67.0",
|
||||
"@types/express": "5.0.4",
|
||||
"@types/minimist": "1.2.5",
|
||||
"@types/node": "24.9.1",
|
||||
"@types/uuid": "10.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "8.46.2",
|
||||
"@typescript-eslint/parser": "8.46.2",
|
||||
"@vitest/ui": "4.0.2",
|
||||
"@vitest/ui": "4.0.3",
|
||||
"eslint": "9.38.0",
|
||||
"eslint-config-prettier": "10.1.8",
|
||||
"globals": "16.4.0",
|
||||
"prettier": "3.6.2",
|
||||
"ts-node": "10.9.2",
|
||||
"typescript": "5.9.3",
|
||||
"vitest": "4.0.2"
|
||||
"vitest": "4.0.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@agentclientprotocol/sdk": {
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@agentclientprotocol/sdk/-/sdk-0.5.0.tgz",
|
||||
"integrity": "sha512-4TJcKRoXzmWu+pr8SkcUJAJaOlIjUzBcseJSQHiqQ9kC1CfSiSKyRrlYvWYT7Zd63KVDWUZ6Juk45Iku9s3Ryg==",
|
||||
"version": "0.5.1",
|
||||
"resolved": "https://registry.npmjs.org/@agentclientprotocol/sdk/-/sdk-0.5.1.tgz",
|
||||
"integrity": "sha512-9bq2TgjhLBSUSC5jE04MEe+Hqw8YePzKghhYZ9QcjOyonY3q2oJfX6GoSO83hURpEnsqEPIrex6VZN3+61fBJg==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"zod": "^3.0.0"
|
||||
@@ -1875,16 +1875,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@vitest/expect": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.0.2.tgz",
|
||||
"integrity": "sha512-izQY+ABWqL2Vyr5+LNo3m16nLLTAzLn8em6i5uxqsrWRhdgzdN5JIHrpFVGBAYRGDAbtwE+yD4Heu8gsBSWTVQ==",
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.0.3.tgz",
|
||||
"integrity": "sha512-v3eSDx/bF25pzar6aEJrrdTXJduEBU3uSGXHslIdGIpJVP8tQQHV6x1ZfzbFQ/bLIomLSbR/2ZCfnaEGkWkiVQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@standard-schema/spec": "^1.0.0",
|
||||
"@types/chai": "^5.2.2",
|
||||
"@vitest/spy": "4.0.2",
|
||||
"@vitest/utils": "4.0.2",
|
||||
"@vitest/spy": "4.0.3",
|
||||
"@vitest/utils": "4.0.3",
|
||||
"chai": "^6.0.1",
|
||||
"tinyrainbow": "^3.0.3"
|
||||
},
|
||||
@@ -1893,13 +1893,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@vitest/mocker": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.0.2.tgz",
|
||||
"integrity": "sha512-oiny+oBSGU9vHMA1DPdO+t1GVidCRuA4lKSG6rbo5SrCiTCGl7bTCyTaUkwxDpUkiSxEVneeXW4LJ4fg3H56dw==",
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.0.3.tgz",
|
||||
"integrity": "sha512-evZcRspIPbbiJEe748zI2BRu94ThCBE+RkjCpVF8yoVYuTV7hMe+4wLF/7K86r8GwJHSmAPnPbZhpXWWrg1qbA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@vitest/spy": "4.0.2",
|
||||
"@vitest/spy": "4.0.3",
|
||||
"estree-walker": "^3.0.3",
|
||||
"magic-string": "^0.30.19"
|
||||
},
|
||||
@@ -1920,9 +1920,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@vitest/pretty-format": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.0.2.tgz",
|
||||
"integrity": "sha512-PhrSiljryCz5nUDhHla5ihXYy2iRCBob+rNqlu34dA+KZIllVR39rUGny5R3kLgDgw3r8GW1ptOo64WbieMkeQ==",
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.0.3.tgz",
|
||||
"integrity": "sha512-N7gly/DRXzxa9w9sbDXwD9QNFYP2hw90LLLGDobPNwiWgyW95GMxsCt29/COIKKh3P7XJICR38PSDePenMBtsw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -1933,13 +1933,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@vitest/runner": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.0.2.tgz",
|
||||
"integrity": "sha512-mPS5T/ZDuO6J5rsQiA76CFmlHtos7dnCvL14I1Oo8SbcjIhJd6kirFmekovfYLRygdF0gJe6SA5asCKIWKw1tw==",
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.0.3.tgz",
|
||||
"integrity": "sha512-1/aK6fPM0lYXWyGKwop2Gbvz1plyTps/HDbIIJXYtJtspHjpXIeB3If07eWpVH4HW7Rmd3Rl+IS/+zEAXrRtXA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@vitest/utils": "4.0.2",
|
||||
"@vitest/utils": "4.0.3",
|
||||
"pathe": "^2.0.3"
|
||||
},
|
||||
"funding": {
|
||||
@@ -1947,13 +1947,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@vitest/snapshot": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.0.2.tgz",
|
||||
"integrity": "sha512-NibujZAh+fTQlpGdP8J2pZcsPg7EPjiLUOUq9In++4p35vc9xIFMkXfQDbBSpijqZPe6i2hEKrUCbKu70/sPzw==",
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.0.3.tgz",
|
||||
"integrity": "sha512-amnYmvZ5MTjNCP1HZmdeczAPLRD6iOm9+2nMRUGxbe/6sQ0Ymur0NnR9LIrWS8JA3wKE71X25D6ya/3LN9YytA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@vitest/pretty-format": "4.0.2",
|
||||
"@vitest/pretty-format": "4.0.3",
|
||||
"magic-string": "^0.30.19",
|
||||
"pathe": "^2.0.3"
|
||||
},
|
||||
@@ -1962,9 +1962,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@vitest/spy": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.0.2.tgz",
|
||||
"integrity": "sha512-KrTWRXFPYrbhD0iUXeoA8BMXl81nvemj5D8sc7NbTlRvCeUWo36JheOWtAUCafcNi0G72ycAdsvWQVSOxy/3TA==",
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.0.3.tgz",
|
||||
"integrity": "sha512-82vVL8Cqz7rbXaNUl35V2G7xeNMAjBdNOVaHbrzznT9BmiCiPOzhf0FhU3eP41nP1bLDm/5wWKZqkG4nyU95DQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
@@ -1972,13 +1972,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@vitest/ui": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-4.0.2.tgz",
|
||||
"integrity": "sha512-GqPobLaUnKxkEJQHxszJ4yTSHCNGysWto6wANoBn/iXWU1juZV5pVjopxu+DkMKU+J6UQqvZ4ZXkcjxzRQS31A==",
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-4.0.3.tgz",
|
||||
"integrity": "sha512-HURRrgGVzz2GQ2Imurp55FA+majHXgCXMzcwtojUZeRsAXyHNgEvxGRJf4QQY4kJeVakiugusGYeUqBgZ/xylg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@vitest/utils": "4.0.2",
|
||||
"@vitest/utils": "4.0.3",
|
||||
"fflate": "^0.8.2",
|
||||
"flatted": "^3.3.3",
|
||||
"pathe": "^2.0.3",
|
||||
@@ -1990,17 +1990,17 @@
|
||||
"url": "https://opencollective.com/vitest"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vitest": "4.0.2"
|
||||
"vitest": "4.0.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@vitest/utils": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.0.2.tgz",
|
||||
"integrity": "sha512-H9jFzZb/5B5Qh7ajPUWMJ8UYGxQ4EQTaNLSm3icXs/oXkzQ1jqfcWDEJ4U3LkFPZOd6QW8M2MYjz32poW+KKqg==",
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.0.3.tgz",
|
||||
"integrity": "sha512-qV6KJkq8W3piW6MDIbGOmn1xhvcW4DuA07alqaQ+vdx7YA49J85pnwnxigZVQFQw3tWnQNRKWwhz5wbP6iv/GQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@vitest/pretty-format": "4.0.2",
|
||||
"@vitest/pretty-format": "4.0.3",
|
||||
"tinyrainbow": "^3.0.3"
|
||||
},
|
||||
"funding": {
|
||||
@@ -4615,19 +4615,19 @@
|
||||
}
|
||||
},
|
||||
"node_modules/vitest": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/vitest/-/vitest-4.0.2.tgz",
|
||||
"integrity": "sha512-SXrA2ZzOPulX479d8W13RqKSmvHb9Bfg71eW7Fbs6ZjUFcCCXyt/OzFCkNyiUE8mFlPHa4ZVUGw0ky+5ndKnrg==",
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/vitest/-/vitest-4.0.3.tgz",
|
||||
"integrity": "sha512-IUSop8jgaT7w0g1yOM/35qVtKjr/8Va4PrjzH1OUb0YH4c3OXB2lCZDkMAB6glA8T5w8S164oJGsbcmAecr4sA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@vitest/expect": "4.0.2",
|
||||
"@vitest/mocker": "4.0.2",
|
||||
"@vitest/pretty-format": "4.0.2",
|
||||
"@vitest/runner": "4.0.2",
|
||||
"@vitest/snapshot": "4.0.2",
|
||||
"@vitest/spy": "4.0.2",
|
||||
"@vitest/utils": "4.0.2",
|
||||
"@vitest/expect": "4.0.3",
|
||||
"@vitest/mocker": "4.0.3",
|
||||
"@vitest/pretty-format": "4.0.3",
|
||||
"@vitest/runner": "4.0.3",
|
||||
"@vitest/snapshot": "4.0.3",
|
||||
"@vitest/spy": "4.0.3",
|
||||
"@vitest/utils": "4.0.3",
|
||||
"debug": "^4.4.3",
|
||||
"es-module-lexer": "^1.7.0",
|
||||
"expect-type": "^1.2.2",
|
||||
@@ -4655,10 +4655,10 @@
|
||||
"@edge-runtime/vm": "*",
|
||||
"@types/debug": "^4.1.12",
|
||||
"@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0",
|
||||
"@vitest/browser-playwright": "4.0.2",
|
||||
"@vitest/browser-preview": "4.0.2",
|
||||
"@vitest/browser-webdriverio": "4.0.2",
|
||||
"@vitest/ui": "4.0.2",
|
||||
"@vitest/browser-playwright": "4.0.3",
|
||||
"@vitest/browser-preview": "4.0.3",
|
||||
"@vitest/browser-webdriverio": "4.0.3",
|
||||
"@vitest/ui": "4.0.3",
|
||||
"happy-dom": "*",
|
||||
"jsdom": "*"
|
||||
},
|
||||
|
||||
10
package.json
10
package.json
@@ -6,7 +6,7 @@
|
||||
"bin": {
|
||||
"claude-code-acp": "./dist/index.js"
|
||||
},
|
||||
"version": "0.6.9",
|
||||
"version": "0.6.10",
|
||||
"description": "An ACP-compatible coding agent powered by the Claude Code SDK (TypeScript)",
|
||||
"main": "dist/index.js",
|
||||
"type": "module",
|
||||
@@ -51,7 +51,7 @@
|
||||
"author": "Zed Industries",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@agentclientprotocol/sdk": "0.5.0",
|
||||
"@agentclientprotocol/sdk": "0.5.1",
|
||||
"@anthropic-ai/claude-agent-sdk": "0.1.26",
|
||||
"@anthropic-ai/claude-code": "2.0.26",
|
||||
"@modelcontextprotocol/sdk": "1.20.2",
|
||||
@@ -61,20 +61,20 @@
|
||||
"uuid": "13.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@anthropic-ai/sdk": "^0.67.0",
|
||||
"@anthropic-ai/sdk": "0.67.0",
|
||||
"@types/express": "5.0.4",
|
||||
"@types/minimist": "1.2.5",
|
||||
"@types/node": "24.9.1",
|
||||
"@types/uuid": "10.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "8.46.2",
|
||||
"@typescript-eslint/parser": "8.46.2",
|
||||
"@vitest/ui": "4.0.2",
|
||||
"@vitest/ui": "4.0.3",
|
||||
"eslint": "9.38.0",
|
||||
"eslint-config-prettier": "10.1.8",
|
||||
"globals": "16.4.0",
|
||||
"prettier": "3.6.2",
|
||||
"ts-node": "10.9.2",
|
||||
"typescript": "5.9.3",
|
||||
"vitest": "4.0.2"
|
||||
"vitest": "4.0.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,6 +55,7 @@ import {
|
||||
} from "./tools.js";
|
||||
import { ContentBlockParam } from "@anthropic-ai/sdk/resources";
|
||||
import { BetaContentBlock, BetaRawContentBlockDelta } from "@anthropic-ai/sdk/resources/beta.mjs";
|
||||
import packageJson from "../package.json" with { type: "json" };
|
||||
|
||||
type Session = {
|
||||
query: Query;
|
||||
@@ -110,7 +111,6 @@ export class ClaudeAcpAgent implements Agent {
|
||||
this.clientCapabilities = request.clientCapabilities;
|
||||
return {
|
||||
protocolVersion: 1,
|
||||
// todo!()
|
||||
agentCapabilities: {
|
||||
promptCapabilities: {
|
||||
image: true,
|
||||
@@ -121,6 +121,11 @@ export class ClaudeAcpAgent implements Agent {
|
||||
sse: true,
|
||||
},
|
||||
},
|
||||
agentInfo: {
|
||||
name: packageJson.name,
|
||||
title: "Claude Code",
|
||||
version: packageJson.version,
|
||||
},
|
||||
authMethods: [
|
||||
{
|
||||
description: "Run `claude /login` in the terminal",
|
||||
|
||||
14
src/tools.ts
14
src/tools.ts
@@ -113,12 +113,14 @@ export function toolInfoFromToolUse(
|
||||
return {
|
||||
title: "Read " + (input.file_path ?? "File") + limit,
|
||||
kind: "read",
|
||||
locations: [
|
||||
{
|
||||
path: input.file_path,
|
||||
line: input.offset ?? 0,
|
||||
},
|
||||
],
|
||||
locations: input.file_path
|
||||
? [
|
||||
{
|
||||
path: input.file_path,
|
||||
line: input.offset ?? 0,
|
||||
},
|
||||
]
|
||||
: [],
|
||||
content: [],
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user