@finityno/claude-code-acp 0.13.2 → 0.13.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -18
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
# ACP adapter for Claude Code
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/@finityno/claude-code-acp)
|
|
4
|
+
|
|
5
|
+
> **Fork of [@zed-industries/claude-code-acp](https://github.com/zed-industries/claude-code-acp)**
|
|
6
|
+
>
|
|
7
|
+
> This fork adds support for **subagent (Task tool) tracking** and will soon include **AskUserQuestion tool** support.
|
|
4
8
|
|
|
5
9
|
Use [Claude Code](https://www.anthropic.com/claude-code) from [ACP-compatible](https://agentclientprotocol.com) clients such as [Zed](https://zed.dev)!
|
|
6
10
|
|
|
7
|
-
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm i @finityno/claude-code-acp
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Or install globally:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm i -g @finityno/claude-code-acp
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Features
|
|
24
|
+
|
|
25
|
+
This adapter implements an ACP agent using the official [Claude Agent SDK](https://platform.claude.com/docs/en/agent-sdk/overview):
|
|
8
26
|
|
|
9
27
|
- Context @-mentions
|
|
10
28
|
- Images
|
|
@@ -15,36 +33,52 @@ This tool implements an ACP agent by using the official [Claude Agent SDK](https
|
|
|
15
33
|
- Interactive (and background) terminals
|
|
16
34
|
- Custom [Slash commands](https://docs.anthropic.com/en/docs/claude-code/slash-commands)
|
|
17
35
|
- Client MCP servers
|
|
36
|
+
- **Subagent tracking** (Task tool lifecycle events)
|
|
18
37
|
|
|
19
|
-
|
|
38
|
+
## Subagent Tracking
|
|
20
39
|
|
|
21
|
-
|
|
40
|
+
Track Task tool (subagent) lifecycle events:
|
|
22
41
|
|
|
23
|
-
|
|
42
|
+
```typescript
|
|
43
|
+
import { ClaudeAcpAgent } from "@finityno/claude-code-acp";
|
|
24
44
|
|
|
25
|
-
|
|
45
|
+
const agent = new ClaudeAcpAgent(client);
|
|
46
|
+
const tracker = agent.subagentTracker;
|
|
26
47
|
|
|
27
|
-
|
|
48
|
+
// Listen for subagent events
|
|
49
|
+
tracker.addEventListener("subagent_started", (subagent) => {
|
|
50
|
+
console.log(`Started: ${subagent.description} (${subagent.subagentType})`);
|
|
51
|
+
});
|
|
28
52
|
|
|
29
|
-
|
|
53
|
+
tracker.addEventListener("subagent_completed", (subagent) => {
|
|
54
|
+
console.log(`Completed: ${subagent.id}`);
|
|
55
|
+
});
|
|
30
56
|
|
|
31
|
-
|
|
57
|
+
tracker.addEventListener("subagent_failed", (subagent) => {
|
|
58
|
+
console.error(`Failed: ${subagent.error}`);
|
|
59
|
+
});
|
|
32
60
|
|
|
33
|
-
|
|
61
|
+
// Query subagents
|
|
62
|
+
tracker.getRunningSubagents(); // Currently active
|
|
63
|
+
tracker.getSessionSubagents(sessionId); // By session
|
|
64
|
+
tracker.getStats(); // Counts & avg duration
|
|
65
|
+
```
|
|
34
66
|
|
|
35
|
-
|
|
67
|
+
See [docs/subagent-tracking.md](docs/subagent-tracking.md) for full API documentation.
|
|
36
68
|
|
|
37
|
-
|
|
69
|
+
## Usage
|
|
38
70
|
|
|
39
|
-
|
|
71
|
+
### With Zed
|
|
40
72
|
|
|
41
|
-
|
|
42
|
-
npm install -g @zed-industries/claude-code-acp
|
|
43
|
-
```
|
|
73
|
+
The latest version of Zed can use this adapter out of the box. Open the Agent Panel and click "New Claude Code Thread" from the `+` button menu.
|
|
44
74
|
|
|
45
|
-
|
|
75
|
+
Read the docs on [External Agent](https://zed.dev/docs/ai/external-agents) support.
|
|
46
76
|
|
|
47
|
-
|
|
77
|
+
### Other Clients
|
|
78
|
+
|
|
79
|
+
Use with any [ACP compatible client](https://agentclientprotocol.com/overview/clients):
|
|
80
|
+
|
|
81
|
+
```bash
|
|
48
82
|
ANTHROPIC_API_KEY=sk-... claude-code-acp
|
|
49
83
|
```
|
|
50
84
|
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.13.
|
|
6
|
+
"version": "0.13.4",
|
|
7
7
|
"description": "An ACP-compatible coding agent powered by the Claude Code SDK (TypeScript)",
|
|
8
8
|
"main": "dist/lib.js",
|
|
9
9
|
"types": "dist/lib.d.ts",
|
|
@@ -49,15 +49,15 @@
|
|
|
49
49
|
"sdk",
|
|
50
50
|
"code"
|
|
51
51
|
],
|
|
52
|
-
"homepage": "https://github.com/
|
|
52
|
+
"homepage": "https://github.com/Finityno/claude-code-acp#readme",
|
|
53
53
|
"bugs": {
|
|
54
|
-
"url": "https://github.com/
|
|
54
|
+
"url": "https://github.com/Finityno/claude-code-acp/issues"
|
|
55
55
|
},
|
|
56
56
|
"repository": {
|
|
57
57
|
"type": "git",
|
|
58
|
-
"url": "git+https://github.com/
|
|
58
|
+
"url": "git+https://github.com/Finityno/claude-code-acp.git"
|
|
59
59
|
},
|
|
60
|
-
"author": "
|
|
60
|
+
"author": "Finityno",
|
|
61
61
|
"license": "Apache-2.0",
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@agentclientprotocol/sdk": "0.13.0",
|