opencode-claude-max-proxy 1.11.2 → 1.12.1
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 +26 -24
- package/dist/cli-s4sk7eks.js +13102 -0
- package/dist/cli.js +30 -0
- package/dist/server.js +10 -0
- package/package.json +20 -17
- package/bin/claude-proxy-supervisor.sh +0 -62
- package/bin/claude-proxy.ts +0 -33
- package/bin/docker-auth.sh +0 -77
- package/bin/docker-entrypoint.sh +0 -24
- package/bin/oc.sh +0 -62
- package/src/logger.ts +0 -72
- package/src/mcpTools.ts +0 -185
- package/src/plugin/claude-max-headers.ts +0 -52
- package/src/proxy/agentDefs.ts +0 -102
- package/src/proxy/agentMatch.ts +0 -93
- package/src/proxy/passthroughTools.ts +0 -108
- package/src/proxy/server.ts +0 -1172
- package/src/proxy/sessionStore.ts +0 -94
- package/src/proxy/types.ts +0 -13
package/README.md
CHANGED
|
@@ -15,30 +15,22 @@ We avoid that limitation by forwarding tool calls instead of executing them. Whe
|
|
|
15
15
|
From Claude’s perspective, tool usage proceeds normally. From OpenCode’s perspective, it is interacting with the Anthropic API. Execution remains distributed according to the configured agents, allowing different models to handle different roles without being constrained by the SDK.
|
|
16
16
|
|
|
17
17
|
```
|
|
18
|
-
|
|
19
|
-
│
|
|
20
|
-
|
|
21
|
-
│
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
│
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
│
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
│
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
│ │ │ │
|
|
35
|
-
│ │ │ ▼
|
|
36
|
-
│ │ │ ◄────────────
|
|
37
|
-
│ │ │ Resume turn
|
|
38
|
-
│ │ │
|
|
39
|
-
│ │ ◄───────────── │
|
|
40
|
-
│ │ response │
|
|
41
|
-
└──────────┘ └───────────────┘
|
|
18
|
+
OpenCode ──► Proxy (localhost) ──► Claude Max (Agent SDK)
|
|
19
|
+
│
|
|
20
|
+
tool_use response
|
|
21
|
+
│
|
|
22
|
+
Proxy intercepts ◄─────────┘
|
|
23
|
+
(stop turn)
|
|
24
|
+
│
|
|
25
|
+
▼
|
|
26
|
+
OpenCode agent system
|
|
27
|
+
(routes to GPT-5.4, Gemini, etc.)
|
|
28
|
+
│
|
|
29
|
+
▼
|
|
30
|
+
Proxy resumes SDK ──► Claude continues
|
|
31
|
+
│
|
|
32
|
+
▼
|
|
33
|
+
OpenCode ◄── final response
|
|
42
34
|
```
|
|
43
35
|
|
|
44
36
|
## How Passthrough Works
|
|
@@ -54,6 +46,14 @@ The Claude Agent SDK exposes a `PreToolUse` hook that fires before any tool exec
|
|
|
54
46
|
|
|
55
47
|
## Quick Start
|
|
56
48
|
|
|
49
|
+
### One-Liner Install
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
curl -fsSL https://raw.githubusercontent.com/ianjwhite99/opencode-with-claude/main/install.sh | bash
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Installs everything (Claude CLI, OpenCode, proxy) and gives you an `oc` command. See [opencode-with-claude](https://github.com/ianjwhite99/opencode-with-claude) for details.
|
|
56
|
+
|
|
57
57
|
### Prerequisites
|
|
58
58
|
|
|
59
59
|
1. **Claude Max subscription** — [Subscribe here](https://claude.ai/settings/billing)
|
|
@@ -361,3 +361,5 @@ MIT
|
|
|
361
361
|
## Credits
|
|
362
362
|
|
|
363
363
|
Built with the [Claude Agent SDK](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk) by Anthropic.
|
|
364
|
+
|
|
365
|
+
[opencode-with-claude](https://github.com/ianjwhite99/opencode-with-claude) installer by [@ianjwhite99](https://github.com/ianjwhite99). Multimodal support based on work by [@juanferreiramorel](https://github.com/juanferreiramorel). Per-terminal proxy idea by [@calebdw](https://github.com/calebdw). README cleanup by [@skipships](https://github.com/skipships).
|