claude-code-acp 0.3.0__tar.gz → 0.3.2__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: claude-code-acp
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: ACP-compatible agent for Claude Code (Python version)
5
5
  Project-URL: Homepage, https://github.com/yazelin/claude-code-acp-py
6
6
  Project-URL: Repository, https://github.com/yazelin/claude-code-acp-py
@@ -219,6 +219,21 @@ async def main():
219
219
  asyncio.run(main())
220
220
  ```
221
221
 
222
+ ### Connect to Different Agents
223
+
224
+ ```python
225
+ from claude_code_acp import AcpClient
226
+
227
+ # Connect to our Claude ACP server
228
+ claude = AcpClient(command="claude-code-acp")
229
+
230
+ # Connect to Gemini CLI
231
+ gemini = AcpClient(command="gemini", args=["--experimental-acp"])
232
+
233
+ # Connect to TypeScript version
234
+ ts_claude = AcpClient(command="npx", args=["@zed-industries/claude-code-acp"])
235
+ ```
236
+
222
237
  ### AcpClient vs ClaudeClient
223
238
 
224
239
  | Feature | `ClaudeClient` | `AcpClient` |
@@ -228,52 +243,64 @@ asyncio.run(main())
228
243
  | Agents | Claude only | Any ACP-compatible agent |
229
244
  | Use case | Simple Python apps | Multi-agent, testing, flexibility |
230
245
 
246
+ ### Tested Agents
247
+
248
+ | Agent | Command | Status |
249
+ |-------|---------|--------|
250
+ | claude-code-acp (this package) | `claude-code-acp` | ✅ Works |
251
+ | Gemini CLI | `gemini --experimental-acp` | ✅ Works |
252
+ | TypeScript version | `npx @zed-industries/claude-code-acp` | ✅ Compatible |
253
+
231
254
  ---
232
255
 
233
256
  ## Architecture
234
257
 
258
+ This package provides **three ways** to use Claude:
259
+
260
+ ### Method A: Editor via ACP (ClaudeAcpAgent)
261
+
262
+ For Zed, Neovim, and other ACP-compatible editors:
263
+
235
264
  ```
236
- ┌─────────────────────────────────────────────────────────────────────────────┐
237
- Your Application
238
- ├─────────────────────────────────────────────────────────────────────────────┤
239
- │ │
240
- │ ┌─────────────────┐ ┌─────────────────────────────┐ │
241
- │ │ Zed/Neovim │ │ Python Application │ │
242
- │ │ (ACP Client) │ │ │ │
243
- │ └────────┬────────┘ │ client = ClaudeClient() │ │
244
- │ │ │ │ │
245
- │ │ ACP Protocol │ @client.on_text │ │
246
- │ │ (stdio/JSON-RPC) │ async def handle(text): │ │
247
- │ │ │ print(text) │ │
248
- │ ▼ │ │ │
249
- │ ┌────────────────────────────────────────┴─────────────────────────────┐ │
250
- │ │ │ │
251
- │ │ claude-code-acp (This Package) │ │
252
- │ │ │ │
253
- │ │ ┌─────────────────────┐ ┌─────────────────────────────────┐ │ │
254
- │ │ │ ClaudeAcpAgent │ │ ClaudeClient │ │ │
255
- │ │ │ (ACP Server) │ │ (Event-driven wrapper) │ │ │
256
- │ │ └──────────┬──────────┘ └───────────────┬─────────────────┘ │ │
257
- │ │ │ │ │ │
258
- │ │ └────────────────┬────────────────┘ │ │
259
- │ │ │ │ │
260
- │ └───────────────────────────────┼───────────────────────────────────────┘ │
261
- │ │ │
262
- │ ▼ │
263
- │ ┌─────────────────────────────┐ │
264
- │ │ Claude Agent SDK │ │
265
- │ │ (claude-agent-sdk) │ │
266
- │ └──────────────┬──────────────┘ │
267
- │ │ │
268
- │ ▼ │
269
- │ ┌─────────────────────────────┐ │
270
- │ │ Claude CLI │ │
271
- │ │ (Your Claude Subscription) │ │
272
- │ └─────────────────────────────┘ │
273
- │ │
274
- └─────────────────────────────────────────────────────────────────────────────┘
265
+ ┌──────────┐ ACP Protocol ┌─────────────────┐ SDK ┌────────────┐
266
+ Zed │ ────── stdio ───────► ClaudeAcpAgent │ ──────────► │ Claude CLI │
267
+ │ Editor │ │ (ACP Server) │ │ │
268
+ └──────────┘ └─────────────────┘ └────────────┘
275
269
  ```
276
270
 
271
+ ### Method B: Python Direct (ClaudeClient)
272
+
273
+ For Python apps that want simple, direct access to Claude (**no ACP protocol**):
274
+
275
+ ```
276
+ ┌──────────┐ direct call ┌─────────────────┐ SDK ┌────────────┐
277
+ │ Python │ ──── in-process ───► │ ClaudeClient │ ──────────► │ Claude CLI │
278
+ │ App │ │ │ │ │
279
+ └──────────┘ └─────────────────┘ └────────────┘
280
+ ```
281
+
282
+ ### Method C: Python via ACP (AcpClient)
283
+
284
+ For Python apps that want to connect to **any** ACP-compatible agent:
285
+
286
+ ```
287
+ ┌──────────┐ ACP Protocol ┌─────────────────┐
288
+ │ Python │ ────── stdio ───────► │ Any ACP Agent │
289
+ │ App │ │ │
290
+ │ │ │ • claude-code │
291
+ │ AcpClient│ │ • gemini │
292
+ │ │ │ • custom agents │
293
+ └──────────┘ └─────────────────┘
294
+ ```
295
+
296
+ ### Summary
297
+
298
+ | Component | Uses ACP? | Purpose |
299
+ |-----------|-----------|---------|
300
+ | `ClaudeAcpAgent` | Yes (Server) | Let editors connect to Claude |
301
+ | `ClaudeClient` | **No** | Simplest way for Python apps |
302
+ | `AcpClient` | Yes (Client) | Connect to any ACP agent |
303
+
277
304
  ---
278
305
 
279
306
  ## What We Built
@@ -196,6 +196,21 @@ async def main():
196
196
  asyncio.run(main())
197
197
  ```
198
198
 
199
+ ### Connect to Different Agents
200
+
201
+ ```python
202
+ from claude_code_acp import AcpClient
203
+
204
+ # Connect to our Claude ACP server
205
+ claude = AcpClient(command="claude-code-acp")
206
+
207
+ # Connect to Gemini CLI
208
+ gemini = AcpClient(command="gemini", args=["--experimental-acp"])
209
+
210
+ # Connect to TypeScript version
211
+ ts_claude = AcpClient(command="npx", args=["@zed-industries/claude-code-acp"])
212
+ ```
213
+
199
214
  ### AcpClient vs ClaudeClient
200
215
 
201
216
  | Feature | `ClaudeClient` | `AcpClient` |
@@ -205,52 +220,64 @@ asyncio.run(main())
205
220
  | Agents | Claude only | Any ACP-compatible agent |
206
221
  | Use case | Simple Python apps | Multi-agent, testing, flexibility |
207
222
 
223
+ ### Tested Agents
224
+
225
+ | Agent | Command | Status |
226
+ |-------|---------|--------|
227
+ | claude-code-acp (this package) | `claude-code-acp` | ✅ Works |
228
+ | Gemini CLI | `gemini --experimental-acp` | ✅ Works |
229
+ | TypeScript version | `npx @zed-industries/claude-code-acp` | ✅ Compatible |
230
+
208
231
  ---
209
232
 
210
233
  ## Architecture
211
234
 
235
+ This package provides **three ways** to use Claude:
236
+
237
+ ### Method A: Editor via ACP (ClaudeAcpAgent)
238
+
239
+ For Zed, Neovim, and other ACP-compatible editors:
240
+
212
241
  ```
213
- ┌─────────────────────────────────────────────────────────────────────────────┐
214
- Your Application
215
- ├─────────────────────────────────────────────────────────────────────────────┤
216
- │ │
217
- │ ┌─────────────────┐ ┌─────────────────────────────┐ │
218
- │ │ Zed/Neovim │ │ Python Application │ │
219
- │ │ (ACP Client) │ │ │ │
220
- │ └────────┬────────┘ │ client = ClaudeClient() │ │
221
- │ │ │ │ │
222
- │ │ ACP Protocol │ @client.on_text │ │
223
- │ │ (stdio/JSON-RPC) │ async def handle(text): │ │
224
- │ │ │ print(text) │ │
225
- │ ▼ │ │ │
226
- │ ┌────────────────────────────────────────┴─────────────────────────────┐ │
227
- │ │ │ │
228
- │ │ claude-code-acp (This Package) │ │
229
- │ │ │ │
230
- │ │ ┌─────────────────────┐ ┌─────────────────────────────────┐ │ │
231
- │ │ │ ClaudeAcpAgent │ │ ClaudeClient │ │ │
232
- │ │ │ (ACP Server) │ │ (Event-driven wrapper) │ │ │
233
- │ │ └──────────┬──────────┘ └───────────────┬─────────────────┘ │ │
234
- │ │ │ │ │ │
235
- │ │ └────────────────┬────────────────┘ │ │
236
- │ │ │ │ │
237
- │ └───────────────────────────────┼───────────────────────────────────────┘ │
238
- │ │ │
239
- │ ▼ │
240
- │ ┌─────────────────────────────┐ │
241
- │ │ Claude Agent SDK │ │
242
- │ │ (claude-agent-sdk) │ │
243
- │ └──────────────┬──────────────┘ │
244
- │ │ │
245
- │ ▼ │
246
- │ ┌─────────────────────────────┐ │
247
- │ │ Claude CLI │ │
248
- │ │ (Your Claude Subscription) │ │
249
- │ └─────────────────────────────┘ │
250
- │ │
251
- └─────────────────────────────────────────────────────────────────────────────┘
242
+ ┌──────────┐ ACP Protocol ┌─────────────────┐ SDK ┌────────────┐
243
+ Zed │ ────── stdio ───────► ClaudeAcpAgent │ ──────────► │ Claude CLI │
244
+ │ Editor │ │ (ACP Server) │ │ │
245
+ └──────────┘ └─────────────────┘ └────────────┘
252
246
  ```
253
247
 
248
+ ### Method B: Python Direct (ClaudeClient)
249
+
250
+ For Python apps that want simple, direct access to Claude (**no ACP protocol**):
251
+
252
+ ```
253
+ ┌──────────┐ direct call ┌─────────────────┐ SDK ┌────────────┐
254
+ │ Python │ ──── in-process ───► │ ClaudeClient │ ──────────► │ Claude CLI │
255
+ │ App │ │ │ │ │
256
+ └──────────┘ └─────────────────┘ └────────────┘
257
+ ```
258
+
259
+ ### Method C: Python via ACP (AcpClient)
260
+
261
+ For Python apps that want to connect to **any** ACP-compatible agent:
262
+
263
+ ```
264
+ ┌──────────┐ ACP Protocol ┌─────────────────┐
265
+ │ Python │ ────── stdio ───────► │ Any ACP Agent │
266
+ │ App │ │ │
267
+ │ │ │ • claude-code │
268
+ │ AcpClient│ │ • gemini │
269
+ │ │ │ • custom agents │
270
+ └──────────┘ └─────────────────┘
271
+ ```
272
+
273
+ ### Summary
274
+
275
+ | Component | Uses ACP? | Purpose |
276
+ |-----------|-----------|---------|
277
+ | `ClaudeAcpAgent` | Yes (Server) | Let editors connect to Claude |
278
+ | `ClaudeClient` | **No** | Simplest way for Python apps |
279
+ | `AcpClient` | Yes (Client) | Connect to any ACP agent |
280
+
254
281
  ---
255
282
 
256
283
  ## What We Built
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "claude-code-acp"
3
- version = "0.3.0"
3
+ version = "0.3.2"
4
4
  description = "ACP-compatible agent for Claude Code (Python version)"
5
5
  authors = [
6
6
  { name = "yazelin" },
@@ -11,7 +11,7 @@ from .agent import ClaudeAcpAgent
11
11
  from .client import ClaudeClient, ClaudeEvents
12
12
  from .acp_client import AcpClient, AcpClientEvents
13
13
 
14
- __version__ = "0.2.0"
14
+ __version__ = "0.3.2"
15
15
 
16
16
  __all__ = [
17
17
  "ClaudeAcpAgent",
@@ -156,7 +156,7 @@ wheels = [
156
156
 
157
157
  [[package]]
158
158
  name = "claude-code-acp"
159
- version = "0.2.0"
159
+ version = "0.3.0"
160
160
  source = { editable = "." }
161
161
  dependencies = [
162
162
  { name = "agent-client-protocol" },
File without changes