dsh-agy-link 0.4.21 → 0.4.22

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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.22 (2026-08-27)
4
+
5
+ - **Fixed: `registration.adapter.prepareCall is not a function` on new DSH hosts (本轮运行失败 UNKNOWN).**
6
+ - **Field report**: after upgrading the DSH host (manjh's source checkout), every turn failed immediately with `registration.adapter.prepareCall is not a function` — category UNKNOWN in the GUI, no reply at all.
7
+ - **Root cause (interface drift)**: dsh-llm >= 0.1.1-rc.2 added `LlmAdapter.prepareCall(provider, model, signal)` and `LlmRuntime.prepareCall()` now calls `registration.adapter.prepareCall(...)` **unconditionally** (both the prepared-call path and the direct `adapterStream` path). The plugin's devDependency pinned `@deepseek-ai/dsh-llm ^0.1.0-rc.6` (base class without `prepareCall`); when the plugin's adapter class resolved an older dsh-llm copy than the host runtime, `registration.adapter.prepareCall` was `undefined` and every turn threw a bare TypeError.
8
+ - **Fix**: `AgyAdapter` now implements `prepareCall` explicitly, returning `{ model: await this.resolveModel(...), stream: options => this.stream(options) }` — the exact one-generation capability-bound handle the new runtime expects (same shape as the base default, but present regardless of which dsh-llm copy the plugin resolves). Backward compatible: runtimes < 0.1.1-rc.2 never call it. The method is declared structurally (no `override` / new-type import) so the plugin keeps typechecking against dsh-llm `^0.1.0-rc.6` and the repo's `npm ci` peer resolution stays intact; the runtime contract matches the 0.1.1-rc.2 `PreparedAdapterCall` shape.
9
+ - Regression test pins the contract end-to-end: `prepareCall` returns resolved model metadata (id/provider/defaultMaxTokens) plus a stream that runs a full fake turn.
10
+
3
11
  ## 0.4.21 (2026-08-27)
4
12
 
5
13
  - **Fixed: Silent `agy exited with code 1` Hid the Real Cause (发送消息无回复、只见 exit 1).**
package/dist/index.js CHANGED
@@ -2127,6 +2127,25 @@ var AgyAdapter = class extends LlmAdapter {
2127
2127
  }
2128
2128
  return resolved;
2129
2129
  }
2130
+ /**
2131
+ * Bind exact model metadata and dispatch to ONE adapter generation.
2132
+ * Required by dsh-llm >= 0.1.1-rc.2: LlmRuntime.prepareCall calls
2133
+ * registration.adapter.prepareCall(provider, model, signal) unconditionally,
2134
+ * so an adapter compiled against the old base class (no prepareCall) crashed
2135
+ * with "registration.adapter.prepareCall is not a function" on new hosts.
2136
+ * Implemented explicitly here so both old and new runtimes work: the old
2137
+ * runtime never calls it, the new runtime gets the capability-bound handle.
2138
+ * Declared without `override`/imported types on purpose: the plugin still
2139
+ * typechecks against dsh-llm ^0.1.0-rc.6 (no prepareCall in the base), while
2140
+ * the runtime contract matches the 0.1.1-rc.2 PreparedAdapterCall shape
2141
+ * { model: LlmResolvedModelInfo; stream(options): AsyncIterable<StreamChunk> }.
2142
+ */
2143
+ async prepareCall(provider, model, signal) {
2144
+ return {
2145
+ model: await this.resolveModel(provider, model, signal),
2146
+ stream: (options) => this.stream(options)
2147
+ };
2148
+ }
2130
2149
  /** Build the agy argv for one call. Exported for tests. */
2131
2150
  buildArgs(opts) {
2132
2151
  const args = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-agy-link",
3
- "version": "0.4.21",
3
+ "version": "0.4.22",
4
4
  "description": "Google Antigravity (agy CLI) models for DeepSeek Harness — stream Gemini/Claude/GPT-OSS subscriptions into DSH with thinking, tool activity, token usage and in-GUI Google OAuth login.",
5
5
  "type": "module",
6
6
  "license": "MIT",