headroom-opencode 0.41.0 → 0.43.0
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 +20 -1
- package/dist/chunk-PY2FZKSF.js +20410 -0
- package/dist/chunk-PY2FZKSF.js.map +1 -0
- package/dist/{entry.opencode-C0sNp2fs.d.ts → entry.opencode-D1DnDHay.d.ts} +2 -1
- package/dist/entry.opencode.d.ts +1 -1
- package/dist/entry.opencode.js +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1 -1
- package/package.json +8 -4
- package/dist/chunk-XS6Z2EJR.js +0 -13078
- package/dist/chunk-XS6Z2EJR.js.map +0 -1
package/README.md
CHANGED
|
@@ -11,6 +11,25 @@ OpenCode integration helpers for Headroom. The package supports two integration
|
|
|
11
11
|
npm install headroom-opencode
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
+
## Building from source
|
|
15
|
+
|
|
16
|
+
Tsup 9 requires Node.js `^22.18.0 || ^24.11.0 || >=26.0.0`. The current locked
|
|
17
|
+
graph also includes ini 7, which requires `^22.22.2 || ^24.15.0 || >=26.0.0`.
|
|
18
|
+
These are development-install requirements; the published plugin and its host
|
|
19
|
+
retain their own runtime requirements. Node.js 24.22.2 is a verified choice
|
|
20
|
+
for this dependency graph. From `plugins/opencode`, run:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm ci
|
|
24
|
+
npm test
|
|
25
|
+
npm run typecheck
|
|
26
|
+
npm run build
|
|
27
|
+
npm run build:standalone
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
For a reproducible real OpenCode 2.x → proxy → local SSE upstream check, see
|
|
31
|
+
[the transport runtime proof](RUNTIME_PROOF.md). It records the tested scope and limitations.
|
|
32
|
+
|
|
14
33
|
## Provider Config Helpers
|
|
15
34
|
|
|
16
35
|
Use these helpers when you need to generate OpenCode config that routes a `headroom` provider through a running Headroom proxy.
|
|
@@ -57,7 +76,7 @@ The default export is `{ id: "headroom", server, setup }`. OpenCode 1.x calls `s
|
|
|
57
76
|
|
|
58
77
|
On 2.x, setup returns a cleanup that releases the transport, so hot reloads do not stack interceptors.
|
|
59
78
|
|
|
60
|
-
OpenCode 2.x keeps its own reference to `fetch` from before plugins load, so patching `fetch` alone does not catch its model traffic.
|
|
79
|
+
OpenCode 2.x keeps its own reference to `fetch` from before plugins load, so patching `fetch` alone does not catch its model traffic. For models with a resolved `baseURL`, the plugin also rewrites OpenAI chat-completions, Responses, and Anthropic Messages traffic so that it points at the proxy — including GitHub Copilot's Claude models. Anthropic Messages base URLs with a path prefix (for example a gateway rooted at `/api/...`) stay on their own base URL, because the proxy's Messages route ignores the original-path header and cannot preserve that prefix. Headers name the real upstream and request path, as the transport does, and authentication settings are retained. Local, excluded, and unsupported-protocol models are left alone. `headroom wrap opencode` routes native Anthropic and OpenAI through the proxy separately, via their `baseURL`.
|
|
61
80
|
|
|
62
81
|
To keep a provider off the proxy, list its host. An entry matches the host and all of its subdomains, and `.example.com` / `*.example.com` are accepted as spellings of `example.com`:
|
|
63
82
|
|