opencode-qoder-bridge 0.1.11 → 0.1.12
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/CHANGELOG.md +223 -223
- package/LICENSE +21 -21
- package/README.md +331 -331
- package/RELEASING.md +62 -62
- package/SECURITY.md +25 -25
- package/THIRD_PARTY_NOTICES.md +18 -18
- package/bin/statusline.mjs +66 -66
- package/bin/usage.mjs +36 -36
- package/dist/language-model.d.ts.map +1 -1
- package/dist/language-model.js +13 -0
- package/dist/language-model.js.map +1 -1
- package/dist/sdk-control.d.ts.map +1 -1
- package/dist/sdk-control.js +13 -0
- package/dist/sdk-control.js.map +1 -1
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +117 -117
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project are documented here. The format follows
|
|
4
|
-
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and releases use
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. The format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and releases use
|
|
5
5
|
[Semantic Versioning](https://semver.org/).
|
|
6
6
|
|
|
7
7
|
## [0.1.11] - 2026-09-01
|
|
@@ -26,225 +26,225 @@ All notable changes to this project are documented here. The format follows
|
|
|
26
26
|
### Changed
|
|
27
27
|
|
|
28
28
|
- The bridge package version is `0.1.11`.
|
|
29
|
-
|
|
30
|
-
## [0.1.10] - 2026-08-30
|
|
31
|
-
|
|
32
|
-
### Changed
|
|
33
|
-
|
|
34
|
-
- Model discovery now completes a bounded live Qoder catalog lookup during
|
|
35
|
-
plugin startup, so newly available account models are registered
|
|
36
|
-
automatically without a manual model list or cache warm-up restart.
|
|
37
|
-
- Discovery uses the SDK's bundled Worker runtime first, falls back to an
|
|
38
|
-
installed CLI automatically when needed, scopes caches by deployment and
|
|
39
|
-
credential context, and ignores empty or late responses that could otherwise
|
|
40
|
-
replace a known-good catalog.
|
|
41
|
-
|
|
42
|
-
## [0.1.9] - 2026-08-30
|
|
43
|
-
|
|
44
|
-
### Added
|
|
45
|
-
|
|
46
|
-
- Updated `@qoder-ai/qoder-agent-sdk` to `1.0.30` (paired with `qodercli` 1.1.35).
|
|
47
|
-
- **Plan Mode Integration**: Added `planMode?: boolean` provider option to run in planning mode independently from tool permissions. Registered new `/qoder_plan_mode` tool.
|
|
48
|
-
- **Outbound Proxy Routing**: Added `proxy?: string` provider option for direct qodercli HTTP/HTTPS/SOCKS5 proxy routing without mutating environment variables, with automatic fallback to `HTTPS_PROXY` / `HTTP_PROXY`.
|
|
49
|
-
- **Skill Evolution**: Added `evolution?: EvolutionOptions` provider option to enable autonomous turn-completion skill analysis and recommendations.
|
|
50
|
-
- **Dynamic Live Model Catalog Updates**: Ingests real-time `available_models_update` stream events to synchronize model availability and persistent cache without restarting OpenCode.
|
|
51
|
-
- **Artifacts Tracking**: Ingests `artifacts_update` events during chat turns and surfaces artifact change metadata in `providerMetadata.qoder.artifacts`.
|
|
52
|
-
- **Sessions Tool**: Added `qoder_sessions` tool using SDK's `listSessions()` to inspect recent sessions, titles, and git branches.
|
|
53
|
-
|
|
54
|
-
### Fixed
|
|
55
|
-
|
|
56
|
-
- **Runtime Package Boundary**: Moved the runtime-used `@opencode-ai/plugin`
|
|
57
|
-
helper into production dependencies and verified root/provider imports from a
|
|
58
|
-
dev-omitted packed install.
|
|
59
|
-
- **Workspace-Aware Session Safety**: Scoped persisted session mappings by
|
|
60
|
-
workspace, serialized same-key turns, delayed mapping writes until a
|
|
61
|
-
successful turn, and added bounded cross-process state locking.
|
|
62
|
-
- **Catalog, Usage, and Stream Hardening**: Made live model snapshots
|
|
63
|
-
authoritative, bounded discovery/usage requests, closed abort and duplicate
|
|
64
|
-
event races, sanitized malformed SDK usage/metadata, and surfaced typed
|
|
65
|
-
authentication/result failures.
|
|
66
|
-
- **Persistent State and Input Bounds**: Hardened atomic state/config writes,
|
|
67
|
-
model/session cache validation, prompt/image limits, MCP URL/command input,
|
|
68
|
-
and finite cost/statusline accounting.
|
|
69
|
-
- **Unknown Model Transparency**: Unknown requested model IDs are now forwarded
|
|
70
|
-
unchanged to Qoder while the default catalog entry is used only for prompt
|
|
71
|
-
sizing metadata; the bridge no longer silently selects `auto`.
|
|
72
|
-
- **Ephemeral Session Privacy**: Explicitly disables SDK transcript persistence
|
|
73
|
-
for non-persistent turns and auxiliary usage/model discovery queries.
|
|
74
|
-
- **Stream and Boundary Hardening**: Added bounded turn timeouts, abort-aware
|
|
75
|
-
generation failures, bounded query cleanup, malformed-stream rejection,
|
|
76
|
-
replay UUID guards, tool ownership deny rules, diagnostic redaction, and
|
|
77
|
-
stricter MCP URL/command validation.
|
|
78
|
-
- **Release Artifact Safety**: Added a `prepack` rebuild hook, executable usage
|
|
79
|
-
CLI permissions, and a public `./errors` export for the typed error API.
|
|
80
|
-
- **Session Store Concurrency Race Condition**: Added an async mutex queue (`withLock`) to serialize concurrent `ensureQoderSession` and `deleteQoderSession` operations, preventing dropped session records under parallel turns.
|
|
81
|
-
- **Tool Continuation History Trimming**: Fixed a critical bug in `trimToBudget` where the active user prompt was dropped during continuation turns with large assistant/tool outputs, preventing prompts from falling back to `"Hello"`.
|
|
82
|
-
- **Data URL Parsing Hardening**: Added bounded-length and round-trip base64 validation with early rejection of oversized image attachments, preventing avoidable CPU and memory pressure from malformed multi-megabyte inputs.
|
|
83
|
-
- **Stream Controller Abort Safety & Listener Cleanup**: Added `safeEnqueue` and `safeClose` to prevent uncaught `Invalid state: Controller is already closed` exceptions when streams are aborted or cancelled, and cleaned up `abortSignal` event listeners in `language-model.ts` and `sdk-session.ts` to prevent memory leaks on shared signals.
|
|
84
|
-
- **`doGenerate` Provider Metadata**: Fixed `doGenerate` discarding `providerMetadata` (`totalCostUSD`, `contextUsageRatio`, `planMode`, `artifacts`), ensuring parity with `doStream`.
|
|
85
|
-
- **Coalesced Model Cache Writes**: Implemented a coalesced cache write queue in `models.ts` to prevent simultaneous file write contention and eliminate orphaned `.tmp` files under rapid streaming catalog updates.
|
|
86
|
-
- **Atomic File Cleanup & All-Session Reset**: Added `try...finally` temporary file unlinking in `session-store.ts` and `models.ts` to guarantee zero dangling `.tmp` files, and exported `clearAllSessions()` to support full session resets.
|
|
87
|
-
- **Tool Schema & Error Boundaries**: Upgraded plugin tools with `tool()` and `tool.schema` from `@opencode-ai/plugin`, added `key` (and `"all"`) to `qoder_session_reset`, added `dir` and `limit` filtering to `qoder_sessions`, and wrapped tool executions in error boundaries.
|
|
88
|
-
- **Tool Normalization & Path Aliases**: Added `execute_command`, `executecommand`, `run_command`, and `runcommand` mapping to `bash`, added `cmd` alias for command, and added `path` alias for `filePath` across read, write, edit, delete, view, and apply_diff.
|
|
89
|
-
- **MCP Bridge Argument Flexibility**: Converted numeric and boolean arguments in `mcp-bridge` stdio configs without dropping the argument list.
|
|
90
|
-
- **Prompt Serialization Hardening**: Added non-image file attachment serialization in `prompt-builder` so attached text files are preserved, and safely guarded missing `toolCallId` / `toolName`.
|
|
91
|
-
- **TUI & CLI Hardening**: Guarded `latest.model?.providerID` in `tui.ts` against undefined model objects, guarded against non-finite costs (`NaN`) in sidebar and statusline, and trimmed PAT whitespace in `hasQoderPAT()`.
|
|
92
|
-
- **Stress Test Suite**: Added `test/stress.test.mjs` verifying concurrency, massive conversations (1,000 messages), stream aborts, and prototype pollution protection.
|
|
93
|
-
- **CI-Safe Live Stress Coverage**: Made the Qoder-backed stream-abort stress probe opt-in with `QODER_STRESS_E2E=1`, keeping the normal test suite credential-free while preserving live stress coverage when explicitly enabled.
|
|
94
|
-
|
|
95
|
-
## [0.1.8] - 2026-08-26
|
|
96
|
-
|
|
97
|
-
### Fixed
|
|
98
|
-
|
|
99
|
-
- Allow authenticated sessions to use the Qoder Agent SDK's bundled Worker
|
|
100
|
-
runtime when a separately installed `qodercli` executable is unavailable.
|
|
101
|
-
- Updated authentication and usage guidance to distinguish missing credentials
|
|
102
|
-
from an optional local CLI installation.
|
|
103
|
-
|
|
104
|
-
## [0.1.5] - 2026-08-22
|
|
105
|
-
|
|
106
|
-
### Fixed
|
|
107
|
-
|
|
108
|
-
- Model discovery now requests the live catalog (`fetchStrategy: "live"`).
|
|
109
|
-
The previous `"cache"` strategy could serve an empty or stale subset of the
|
|
110
|
-
account's models, which is why not all available Qoder models were detected.
|
|
111
|
-
The CLI re-queries the server on every refresh and falls back to its local
|
|
112
|
-
cache only when the server returns nothing.
|
|
113
|
-
|
|
114
|
-
### Added
|
|
115
|
-
|
|
116
|
-
- `QODER_SCENE` set in the host environment is forwarded to the catalog
|
|
117
|
-
discovery session, and a new provider option `env` passes arbitrary
|
|
118
|
-
environment variables to the qodercli child process for chat turns.
|
|
119
|
-
- Debug logging for discovery: usable/total entry counts and discovered model
|
|
120
|
-
IDs are emitted under `QODER_BRIDGE_DEBUG=1`.
|
|
121
|
-
- Documentation for model discovery behavior and scene filtering in the
|
|
122
|
-
README troubleshooting section.
|
|
123
|
-
|
|
124
|
-
### Changed
|
|
125
|
-
|
|
126
|
-
- Catalog selection drops only disabled or malformed entries; BYOK and
|
|
127
|
-
tagged entries are kept so the bridge never hides a model the server
|
|
128
|
-
actually serves.
|
|
129
|
-
|
|
130
|
-
## [0.1.4] - 2026-08-22
|
|
131
|
-
|
|
132
|
-
### Fixed
|
|
133
|
-
|
|
134
|
-
- Removed an accidental self-dependency (`opencode-qoder-bridge`) from
|
|
135
|
-
`dependencies`, which made npm install a nested copy of the package into
|
|
136
|
-
itself.
|
|
137
|
-
- Provider metadata on stream finish is no longer double-nested; consumers now
|
|
138
|
-
read `providerMetadata.qoder.totalCostUSD`, `contextUsageRatio`, and
|
|
139
|
-
`usageEstimated` at the documented path.
|
|
140
|
-
- `doGenerate` no longer drops tool-call content parts, so non-streaming
|
|
141
|
-
callers receive tool invocations.
|
|
142
|
-
- History trimming in the prompt builder serializes each message once instead
|
|
143
|
-
of re-serializing the whole prompt per dropped turn (O(n²) → O(n)).
|
|
144
|
-
- The usage ledger flushes synchronously on process exit, so the most recent
|
|
145
|
-
turns are no longer lost when opencode shuts down inside the debounce window.
|
|
146
|
-
|
|
147
|
-
### Added
|
|
148
|
-
|
|
149
|
-
- Typed error hierarchy exported from `dist/errors.js`: `QoderBridgeError`
|
|
150
|
-
base with a stable `code`, plus `QoderCliNotFoundError`,
|
|
151
|
-
`QoderAuthError`, `QoderSessionError`, `QoderSdkResultError`, and
|
|
152
|
-
`UnsupportedCapabilityError`.
|
|
153
|
-
- Opt-in debug logging via `QODER_BRIDGE_DEBUG=1` covering model fallbacks,
|
|
154
|
-
stream aborts, background catalog refreshes, and ledger/session-store I/O
|
|
155
|
-
failures that were previously swallowed silently.
|
|
156
|
-
- Authorization failures now explain what is missing (CLI vs personal access
|
|
157
|
-
token) instead of returning an unlabeled failure.
|
|
158
|
-
- `QODER_BRIDGE_STATE_DIR` and `XDG_CONFIG_HOME` are now honored consistently
|
|
159
|
-
by every state file, including `usage.json`, `sessions.json`,
|
|
160
|
-
`models.json`, and the statusline binary (previously only the session store).
|
|
161
|
-
- Diagnostics section in the README.
|
|
162
|
-
|
|
163
|
-
### Changed
|
|
164
|
-
|
|
165
|
-
- Model catalog fetches de-duplicate concurrent refreshes into a single SDK
|
|
166
|
-
session.
|
|
167
|
-
- The `models.json` cache is written atomically with mode 0600 instead of a
|
|
168
|
-
direct partial-write-prone write.
|
|
169
|
-
- Unknown model IDs previously fell back to the default model with a debug log
|
|
170
|
-
entry; current releases preserve the requested ID and let Qoder report model
|
|
171
|
-
availability explicitly.
|
|
172
|
-
|
|
173
|
-
## [0.1.3] - 2026-08-20
|
|
174
|
-
|
|
175
|
-
### Changed
|
|
176
|
-
|
|
177
|
-
- Refreshed the fallback model catalog and quota reporting behavior.
|
|
178
|
-
- Removed the experimental model-backed quota command; account usage remains
|
|
179
|
-
available through the `qoder_usage` tool.
|
|
180
|
-
- Documentation updates for models and quota handling.
|
|
181
|
-
|
|
182
|
-
## [0.1.2] - 2026-08-20
|
|
183
|
-
|
|
184
|
-
### Security
|
|
185
|
-
|
|
186
|
-
- Changed the default Qoder permission mode from `bypassPermissions` to the
|
|
187
|
-
SDK's safer `default` mode.
|
|
188
|
-
- Updated transitive MCP, URL, and glob dependencies; `npm audit` is clean.
|
|
189
|
-
- Added atomic, mode-restricted persistent session storage.
|
|
190
|
-
|
|
191
|
-
### Added
|
|
192
|
-
|
|
193
|
-
- Opt-in Qoder session persistence and resume support.
|
|
194
|
-
- `qoder_session_reset` for clearing a configured persisted session.
|
|
195
|
-
- Authenticated opt-in end-to-end testing with `QODER_E2E=1`.
|
|
196
|
-
- Deterministic session-store and SDK option-policy tests.
|
|
197
|
-
- Direct `QODER_PERSONAL_ACCESS_TOKEN` authentication with CLI fallback.
|
|
198
|
-
- Cached, background-refreshed model discovery and `/qoder-models` inspection.
|
|
199
|
-
|
|
200
|
-
## [0.1.1] - 2026-07-25
|
|
201
|
-
|
|
202
|
-
### Security
|
|
203
|
-
|
|
204
|
-
- Removed OpenTUI and Solid from the production dependency graph. The optional
|
|
205
|
-
sidebar now uses the renderer versions supplied by its OpenCode host, which
|
|
206
|
-
prevents OpenTUI's vulnerable build-only Babel and glob packages from being
|
|
207
|
-
installed with this package.
|
|
208
|
-
- Pinned patched Babel, glob, minimatch, brace-expansion, and Hono releases for
|
|
209
|
-
repository development and direct root installations.
|
|
210
|
-
- Added a zero-tolerance `npm audit` command to the prepublish verification
|
|
211
|
-
gate.
|
|
212
|
-
|
|
213
|
-
The official Qoder Agent SDK still declares MCP SDK `^1.27.1`. npm does not
|
|
214
|
-
propagate a dependency package's overrides into a consuming application's
|
|
215
|
-
installation, so a downstream audit can continue to report the MCP SDK's
|
|
216
|
-
Windows-only Hono server advisory until Qoder updates that dependency. This
|
|
217
|
-
bridge does not start or expose the affected Hono HTTP server; MCP connections
|
|
218
|
-
are passed to the Qoder CLI. The Hono 2 override used in this repository was
|
|
219
|
-
also verified with an in-process MCP transport.
|
|
220
|
-
|
|
221
|
-
### Changed
|
|
222
|
-
|
|
223
|
-
- Moved the type-only AI SDK and OpenCode plugin packages out of production
|
|
224
|
-
dependencies and made the host-provided TUI runtime optional peers.
|
|
225
|
-
- Raised the Node.js requirement to 22.18 because the patched Babel toolchain
|
|
226
|
-
no longer supports older Node releases.
|
|
227
|
-
- Refreshed model context limits from the live Qoder SDK catalog.
|
|
228
|
-
|
|
229
|
-
## [0.1.0] - 2026-07-25
|
|
230
|
-
|
|
231
|
-
### Added
|
|
232
|
-
|
|
233
|
-
- Initial public release.
|
|
234
|
-
- Dynamic Qoder model discovery through the official Agent SDK.
|
|
235
|
-
- AI SDK v3 streaming, reasoning, image input, and tool-call translation.
|
|
236
|
-
- OpenCode MCP bridging for stdio, HTTP, SSE, and in-process SDK servers.
|
|
237
|
-
- Live quota reporting, local usage and cost tracking, CLI commands, and the
|
|
238
|
-
OpenCode TUI sidebar.
|
|
239
|
-
- Automated tests, CI, security policy, and trusted-publishing workflow.
|
|
240
|
-
|
|
241
|
-
[0.1.1]: https://github.com/naoufalelbani/opencode-qoder-bridge/compare/v0.1.0...v0.1.1
|
|
242
|
-
[0.1.0]: https://github.com/naoufalelbani/opencode-qoder-bridge/releases/tag/v0.1.0
|
|
243
|
-
[0.1.2]: https://github.com/naoufalelbani/opencode-qoder-bridge/compare/v0.1.1...v0.1.2
|
|
244
|
-
[0.1.3]: https://github.com/naoufalelbani/opencode-qoder-bridge/compare/v0.1.2...v0.1.3
|
|
245
|
-
[0.1.4]: https://github.com/naoufalelbani/opencode-qoder-bridge/compare/v0.1.3...v0.1.4
|
|
246
|
-
[0.1.5]: https://github.com/naoufalelbani/opencode-qoder-bridge/compare/v0.1.4...v0.1.5
|
|
247
|
-
[0.1.8]: https://github.com/naoufalelbani/opencode-qoder-bridge/compare/v0.1.7...v0.1.8
|
|
29
|
+
|
|
30
|
+
## [0.1.10] - 2026-08-30
|
|
31
|
+
|
|
32
|
+
### Changed
|
|
33
|
+
|
|
34
|
+
- Model discovery now completes a bounded live Qoder catalog lookup during
|
|
35
|
+
plugin startup, so newly available account models are registered
|
|
36
|
+
automatically without a manual model list or cache warm-up restart.
|
|
37
|
+
- Discovery uses the SDK's bundled Worker runtime first, falls back to an
|
|
38
|
+
installed CLI automatically when needed, scopes caches by deployment and
|
|
39
|
+
credential context, and ignores empty or late responses that could otherwise
|
|
40
|
+
replace a known-good catalog.
|
|
41
|
+
|
|
42
|
+
## [0.1.9] - 2026-08-30
|
|
43
|
+
|
|
44
|
+
### Added
|
|
45
|
+
|
|
46
|
+
- Updated `@qoder-ai/qoder-agent-sdk` to `1.0.30` (paired with `qodercli` 1.1.35).
|
|
47
|
+
- **Plan Mode Integration**: Added `planMode?: boolean` provider option to run in planning mode independently from tool permissions. Registered new `/qoder_plan_mode` tool.
|
|
48
|
+
- **Outbound Proxy Routing**: Added `proxy?: string` provider option for direct qodercli HTTP/HTTPS/SOCKS5 proxy routing without mutating environment variables, with automatic fallback to `HTTPS_PROXY` / `HTTP_PROXY`.
|
|
49
|
+
- **Skill Evolution**: Added `evolution?: EvolutionOptions` provider option to enable autonomous turn-completion skill analysis and recommendations.
|
|
50
|
+
- **Dynamic Live Model Catalog Updates**: Ingests real-time `available_models_update` stream events to synchronize model availability and persistent cache without restarting OpenCode.
|
|
51
|
+
- **Artifacts Tracking**: Ingests `artifacts_update` events during chat turns and surfaces artifact change metadata in `providerMetadata.qoder.artifacts`.
|
|
52
|
+
- **Sessions Tool**: Added `qoder_sessions` tool using SDK's `listSessions()` to inspect recent sessions, titles, and git branches.
|
|
53
|
+
|
|
54
|
+
### Fixed
|
|
55
|
+
|
|
56
|
+
- **Runtime Package Boundary**: Moved the runtime-used `@opencode-ai/plugin`
|
|
57
|
+
helper into production dependencies and verified root/provider imports from a
|
|
58
|
+
dev-omitted packed install.
|
|
59
|
+
- **Workspace-Aware Session Safety**: Scoped persisted session mappings by
|
|
60
|
+
workspace, serialized same-key turns, delayed mapping writes until a
|
|
61
|
+
successful turn, and added bounded cross-process state locking.
|
|
62
|
+
- **Catalog, Usage, and Stream Hardening**: Made live model snapshots
|
|
63
|
+
authoritative, bounded discovery/usage requests, closed abort and duplicate
|
|
64
|
+
event races, sanitized malformed SDK usage/metadata, and surfaced typed
|
|
65
|
+
authentication/result failures.
|
|
66
|
+
- **Persistent State and Input Bounds**: Hardened atomic state/config writes,
|
|
67
|
+
model/session cache validation, prompt/image limits, MCP URL/command input,
|
|
68
|
+
and finite cost/statusline accounting.
|
|
69
|
+
- **Unknown Model Transparency**: Unknown requested model IDs are now forwarded
|
|
70
|
+
unchanged to Qoder while the default catalog entry is used only for prompt
|
|
71
|
+
sizing metadata; the bridge no longer silently selects `auto`.
|
|
72
|
+
- **Ephemeral Session Privacy**: Explicitly disables SDK transcript persistence
|
|
73
|
+
for non-persistent turns and auxiliary usage/model discovery queries.
|
|
74
|
+
- **Stream and Boundary Hardening**: Added bounded turn timeouts, abort-aware
|
|
75
|
+
generation failures, bounded query cleanup, malformed-stream rejection,
|
|
76
|
+
replay UUID guards, tool ownership deny rules, diagnostic redaction, and
|
|
77
|
+
stricter MCP URL/command validation.
|
|
78
|
+
- **Release Artifact Safety**: Added a `prepack` rebuild hook, executable usage
|
|
79
|
+
CLI permissions, and a public `./errors` export for the typed error API.
|
|
80
|
+
- **Session Store Concurrency Race Condition**: Added an async mutex queue (`withLock`) to serialize concurrent `ensureQoderSession` and `deleteQoderSession` operations, preventing dropped session records under parallel turns.
|
|
81
|
+
- **Tool Continuation History Trimming**: Fixed a critical bug in `trimToBudget` where the active user prompt was dropped during continuation turns with large assistant/tool outputs, preventing prompts from falling back to `"Hello"`.
|
|
82
|
+
- **Data URL Parsing Hardening**: Added bounded-length and round-trip base64 validation with early rejection of oversized image attachments, preventing avoidable CPU and memory pressure from malformed multi-megabyte inputs.
|
|
83
|
+
- **Stream Controller Abort Safety & Listener Cleanup**: Added `safeEnqueue` and `safeClose` to prevent uncaught `Invalid state: Controller is already closed` exceptions when streams are aborted or cancelled, and cleaned up `abortSignal` event listeners in `language-model.ts` and `sdk-session.ts` to prevent memory leaks on shared signals.
|
|
84
|
+
- **`doGenerate` Provider Metadata**: Fixed `doGenerate` discarding `providerMetadata` (`totalCostUSD`, `contextUsageRatio`, `planMode`, `artifacts`), ensuring parity with `doStream`.
|
|
85
|
+
- **Coalesced Model Cache Writes**: Implemented a coalesced cache write queue in `models.ts` to prevent simultaneous file write contention and eliminate orphaned `.tmp` files under rapid streaming catalog updates.
|
|
86
|
+
- **Atomic File Cleanup & All-Session Reset**: Added `try...finally` temporary file unlinking in `session-store.ts` and `models.ts` to guarantee zero dangling `.tmp` files, and exported `clearAllSessions()` to support full session resets.
|
|
87
|
+
- **Tool Schema & Error Boundaries**: Upgraded plugin tools with `tool()` and `tool.schema` from `@opencode-ai/plugin`, added `key` (and `"all"`) to `qoder_session_reset`, added `dir` and `limit` filtering to `qoder_sessions`, and wrapped tool executions in error boundaries.
|
|
88
|
+
- **Tool Normalization & Path Aliases**: Added `execute_command`, `executecommand`, `run_command`, and `runcommand` mapping to `bash`, added `cmd` alias for command, and added `path` alias for `filePath` across read, write, edit, delete, view, and apply_diff.
|
|
89
|
+
- **MCP Bridge Argument Flexibility**: Converted numeric and boolean arguments in `mcp-bridge` stdio configs without dropping the argument list.
|
|
90
|
+
- **Prompt Serialization Hardening**: Added non-image file attachment serialization in `prompt-builder` so attached text files are preserved, and safely guarded missing `toolCallId` / `toolName`.
|
|
91
|
+
- **TUI & CLI Hardening**: Guarded `latest.model?.providerID` in `tui.ts` against undefined model objects, guarded against non-finite costs (`NaN`) in sidebar and statusline, and trimmed PAT whitespace in `hasQoderPAT()`.
|
|
92
|
+
- **Stress Test Suite**: Added `test/stress.test.mjs` verifying concurrency, massive conversations (1,000 messages), stream aborts, and prototype pollution protection.
|
|
93
|
+
- **CI-Safe Live Stress Coverage**: Made the Qoder-backed stream-abort stress probe opt-in with `QODER_STRESS_E2E=1`, keeping the normal test suite credential-free while preserving live stress coverage when explicitly enabled.
|
|
94
|
+
|
|
95
|
+
## [0.1.8] - 2026-08-26
|
|
96
|
+
|
|
97
|
+
### Fixed
|
|
98
|
+
|
|
99
|
+
- Allow authenticated sessions to use the Qoder Agent SDK's bundled Worker
|
|
100
|
+
runtime when a separately installed `qodercli` executable is unavailable.
|
|
101
|
+
- Updated authentication and usage guidance to distinguish missing credentials
|
|
102
|
+
from an optional local CLI installation.
|
|
103
|
+
|
|
104
|
+
## [0.1.5] - 2026-08-22
|
|
105
|
+
|
|
106
|
+
### Fixed
|
|
107
|
+
|
|
108
|
+
- Model discovery now requests the live catalog (`fetchStrategy: "live"`).
|
|
109
|
+
The previous `"cache"` strategy could serve an empty or stale subset of the
|
|
110
|
+
account's models, which is why not all available Qoder models were detected.
|
|
111
|
+
The CLI re-queries the server on every refresh and falls back to its local
|
|
112
|
+
cache only when the server returns nothing.
|
|
113
|
+
|
|
114
|
+
### Added
|
|
115
|
+
|
|
116
|
+
- `QODER_SCENE` set in the host environment is forwarded to the catalog
|
|
117
|
+
discovery session, and a new provider option `env` passes arbitrary
|
|
118
|
+
environment variables to the qodercli child process for chat turns.
|
|
119
|
+
- Debug logging for discovery: usable/total entry counts and discovered model
|
|
120
|
+
IDs are emitted under `QODER_BRIDGE_DEBUG=1`.
|
|
121
|
+
- Documentation for model discovery behavior and scene filtering in the
|
|
122
|
+
README troubleshooting section.
|
|
123
|
+
|
|
124
|
+
### Changed
|
|
125
|
+
|
|
126
|
+
- Catalog selection drops only disabled or malformed entries; BYOK and
|
|
127
|
+
tagged entries are kept so the bridge never hides a model the server
|
|
128
|
+
actually serves.
|
|
129
|
+
|
|
130
|
+
## [0.1.4] - 2026-08-22
|
|
131
|
+
|
|
132
|
+
### Fixed
|
|
133
|
+
|
|
134
|
+
- Removed an accidental self-dependency (`opencode-qoder-bridge`) from
|
|
135
|
+
`dependencies`, which made npm install a nested copy of the package into
|
|
136
|
+
itself.
|
|
137
|
+
- Provider metadata on stream finish is no longer double-nested; consumers now
|
|
138
|
+
read `providerMetadata.qoder.totalCostUSD`, `contextUsageRatio`, and
|
|
139
|
+
`usageEstimated` at the documented path.
|
|
140
|
+
- `doGenerate` no longer drops tool-call content parts, so non-streaming
|
|
141
|
+
callers receive tool invocations.
|
|
142
|
+
- History trimming in the prompt builder serializes each message once instead
|
|
143
|
+
of re-serializing the whole prompt per dropped turn (O(n²) → O(n)).
|
|
144
|
+
- The usage ledger flushes synchronously on process exit, so the most recent
|
|
145
|
+
turns are no longer lost when opencode shuts down inside the debounce window.
|
|
146
|
+
|
|
147
|
+
### Added
|
|
148
|
+
|
|
149
|
+
- Typed error hierarchy exported from `dist/errors.js`: `QoderBridgeError`
|
|
150
|
+
base with a stable `code`, plus `QoderCliNotFoundError`,
|
|
151
|
+
`QoderAuthError`, `QoderSessionError`, `QoderSdkResultError`, and
|
|
152
|
+
`UnsupportedCapabilityError`.
|
|
153
|
+
- Opt-in debug logging via `QODER_BRIDGE_DEBUG=1` covering model fallbacks,
|
|
154
|
+
stream aborts, background catalog refreshes, and ledger/session-store I/O
|
|
155
|
+
failures that were previously swallowed silently.
|
|
156
|
+
- Authorization failures now explain what is missing (CLI vs personal access
|
|
157
|
+
token) instead of returning an unlabeled failure.
|
|
158
|
+
- `QODER_BRIDGE_STATE_DIR` and `XDG_CONFIG_HOME` are now honored consistently
|
|
159
|
+
by every state file, including `usage.json`, `sessions.json`,
|
|
160
|
+
`models.json`, and the statusline binary (previously only the session store).
|
|
161
|
+
- Diagnostics section in the README.
|
|
162
|
+
|
|
163
|
+
### Changed
|
|
164
|
+
|
|
165
|
+
- Model catalog fetches de-duplicate concurrent refreshes into a single SDK
|
|
166
|
+
session.
|
|
167
|
+
- The `models.json` cache is written atomically with mode 0600 instead of a
|
|
168
|
+
direct partial-write-prone write.
|
|
169
|
+
- Unknown model IDs previously fell back to the default model with a debug log
|
|
170
|
+
entry; current releases preserve the requested ID and let Qoder report model
|
|
171
|
+
availability explicitly.
|
|
172
|
+
|
|
173
|
+
## [0.1.3] - 2026-08-20
|
|
174
|
+
|
|
175
|
+
### Changed
|
|
176
|
+
|
|
177
|
+
- Refreshed the fallback model catalog and quota reporting behavior.
|
|
178
|
+
- Removed the experimental model-backed quota command; account usage remains
|
|
179
|
+
available through the `qoder_usage` tool.
|
|
180
|
+
- Documentation updates for models and quota handling.
|
|
181
|
+
|
|
182
|
+
## [0.1.2] - 2026-08-20
|
|
183
|
+
|
|
184
|
+
### Security
|
|
185
|
+
|
|
186
|
+
- Changed the default Qoder permission mode from `bypassPermissions` to the
|
|
187
|
+
SDK's safer `default` mode.
|
|
188
|
+
- Updated transitive MCP, URL, and glob dependencies; `npm audit` is clean.
|
|
189
|
+
- Added atomic, mode-restricted persistent session storage.
|
|
190
|
+
|
|
191
|
+
### Added
|
|
192
|
+
|
|
193
|
+
- Opt-in Qoder session persistence and resume support.
|
|
194
|
+
- `qoder_session_reset` for clearing a configured persisted session.
|
|
195
|
+
- Authenticated opt-in end-to-end testing with `QODER_E2E=1`.
|
|
196
|
+
- Deterministic session-store and SDK option-policy tests.
|
|
197
|
+
- Direct `QODER_PERSONAL_ACCESS_TOKEN` authentication with CLI fallback.
|
|
198
|
+
- Cached, background-refreshed model discovery and `/qoder-models` inspection.
|
|
199
|
+
|
|
200
|
+
## [0.1.1] - 2026-07-25
|
|
201
|
+
|
|
202
|
+
### Security
|
|
203
|
+
|
|
204
|
+
- Removed OpenTUI and Solid from the production dependency graph. The optional
|
|
205
|
+
sidebar now uses the renderer versions supplied by its OpenCode host, which
|
|
206
|
+
prevents OpenTUI's vulnerable build-only Babel and glob packages from being
|
|
207
|
+
installed with this package.
|
|
208
|
+
- Pinned patched Babel, glob, minimatch, brace-expansion, and Hono releases for
|
|
209
|
+
repository development and direct root installations.
|
|
210
|
+
- Added a zero-tolerance `npm audit` command to the prepublish verification
|
|
211
|
+
gate.
|
|
212
|
+
|
|
213
|
+
The official Qoder Agent SDK still declares MCP SDK `^1.27.1`. npm does not
|
|
214
|
+
propagate a dependency package's overrides into a consuming application's
|
|
215
|
+
installation, so a downstream audit can continue to report the MCP SDK's
|
|
216
|
+
Windows-only Hono server advisory until Qoder updates that dependency. This
|
|
217
|
+
bridge does not start or expose the affected Hono HTTP server; MCP connections
|
|
218
|
+
are passed to the Qoder CLI. The Hono 2 override used in this repository was
|
|
219
|
+
also verified with an in-process MCP transport.
|
|
220
|
+
|
|
221
|
+
### Changed
|
|
222
|
+
|
|
223
|
+
- Moved the type-only AI SDK and OpenCode plugin packages out of production
|
|
224
|
+
dependencies and made the host-provided TUI runtime optional peers.
|
|
225
|
+
- Raised the Node.js requirement to 22.18 because the patched Babel toolchain
|
|
226
|
+
no longer supports older Node releases.
|
|
227
|
+
- Refreshed model context limits from the live Qoder SDK catalog.
|
|
228
|
+
|
|
229
|
+
## [0.1.0] - 2026-07-25
|
|
230
|
+
|
|
231
|
+
### Added
|
|
232
|
+
|
|
233
|
+
- Initial public release.
|
|
234
|
+
- Dynamic Qoder model discovery through the official Agent SDK.
|
|
235
|
+
- AI SDK v3 streaming, reasoning, image input, and tool-call translation.
|
|
236
|
+
- OpenCode MCP bridging for stdio, HTTP, SSE, and in-process SDK servers.
|
|
237
|
+
- Live quota reporting, local usage and cost tracking, CLI commands, and the
|
|
238
|
+
OpenCode TUI sidebar.
|
|
239
|
+
- Automated tests, CI, security policy, and trusted-publishing workflow.
|
|
240
|
+
|
|
241
|
+
[0.1.1]: https://github.com/naoufalelbani/opencode-qoder-bridge/compare/v0.1.0...v0.1.1
|
|
242
|
+
[0.1.0]: https://github.com/naoufalelbani/opencode-qoder-bridge/releases/tag/v0.1.0
|
|
243
|
+
[0.1.2]: https://github.com/naoufalelbani/opencode-qoder-bridge/compare/v0.1.1...v0.1.2
|
|
244
|
+
[0.1.3]: https://github.com/naoufalelbani/opencode-qoder-bridge/compare/v0.1.2...v0.1.3
|
|
245
|
+
[0.1.4]: https://github.com/naoufalelbani/opencode-qoder-bridge/compare/v0.1.3...v0.1.4
|
|
246
|
+
[0.1.5]: https://github.com/naoufalelbani/opencode-qoder-bridge/compare/v0.1.4...v0.1.5
|
|
247
|
+
[0.1.8]: https://github.com/naoufalelbani/opencode-qoder-bridge/compare/v0.1.7...v0.1.8
|
|
248
248
|
[0.1.9]: https://github.com/naoufalelbani/opencode-qoder-bridge/compare/v0.1.8...v0.1.9
|
|
249
249
|
[0.1.10]: https://github.com/naoufalelbani/opencode-qoder-bridge/compare/v0.1.9...v0.1.10
|
|
250
250
|
[0.1.11]: https://github.com/naoufalelbani/opencode-qoder-bridge/compare/v0.1.10...v0.1.11
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 opencode-qoder-bridge contributors
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 opencode-qoder-bridge contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|