dsh-agy-link 0.4.24 → 0.4.26

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,22 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.26 (2026-09-07)
4
+
5
+ - **Added: Support for `gemini-3.8-flash` in Fallback Models Catalog (Issue #6).**
6
+ - **Root cause**: `DEFAULT_FALLBACK_MODELS` defined in `src/common/types.ts` had not been synced with Google's latest model line-up, stopping at `gemini-3.7-flash`. When DSH booted or ran offline prior to dynamic `agy models` discovery, `gemini-3.8-flash` was missing from the model picker.
7
+ - **Fix**: Added `{ id: 'gemini-3.8-flash', name: 'Gemini 3.8 Flash', efforts: ['low', 'medium', 'high'] }` to `DEFAULT_FALLBACK_MODELS`.
8
+ - **Fixed: Client Bundle `process is not defined` (PR #5 / realguan).**
9
+ - In `tsdown.config.ts`, marked `react-dom` and `react/jsx-runtime` as external dependencies for client bundling (`platform: "browser"`), preventing development React runtime from being inlined into `dist/client.js` and eliminating browser `ReferenceError: process is not defined`.
10
+ - **Hardened: Test Suite Stability & Debounce Timing on macOS.**
11
+ - Relaxed duplicate submission debounce window in `AgyAdapter` to 10,000ms with automatic size-capped map pruning, and adjusted test thresholds to account for cold Node subprocess spawning latency on macOS. All 151 unit tests passing.
12
+
13
+ ## 0.4.25 (2026-09-04)
14
+
15
+ - **Fixed: Plugin Startup Blocker on DSH >= 0.1.1-rc.x / 0.1.2-rc.1 (`missing export 'CallId'`, issue #4).**
16
+ - **Root cause**: Newer `@deepseek-ai/dsh-llm` versions (e.g. `0.1.2-alpha.1` ~ `0.1.2-rc.1`) renamed `CallId` to `ToolCallId`. A named import `import { CallId } from '@deepseek-ai/dsh-llm'` caused Node ESM static resolution to fail at startup with `The requested module '@deepseek-ai/dsh-llm' does not provide an export named 'CallId'`, surfacing as a plugin load failure on DSH Desktop 2.0.5 and CLI.
17
+ - **Fix**: Replaced named import with a namespace fallback resolution `toToolCallId = dshLlm.ToolCallId ?? dshLlm.CallId ?? identity`. This avoids missing named export evaluation errors and ensures seamless backwards and forwards compatibility across all DSH host versions.
18
+ - **Ecosystem & Test Hardening**: Upgraded development dependencies to `@deepseek-ai/dsh-*@0.1.2-rc.1`. Configured `--test-concurrency=1` in test runner to prevent mock environment variable collisions across concurrent subprocess tests, achieving 100% pass rate across all 151 unit tests. Verified live startup with DSH 0.1.2-rc.1 and `dsh-lark-link`.
19
+
3
20
  ## 0.4.24 (2026-08-28)
4
21
 
5
22
  - **Fixed: Antigravity Models Missing From Picker When Logged In (已登录/显示余量但模型列表不显示 — issue #1).**
package/dist/index.js CHANGED
@@ -3,7 +3,8 @@ import { execFile, execFileSync, spawn } from "node:child_process";
3
3
  import path, { delimiter, dirname, isAbsolute, join, resolve } from "node:path";
4
4
  import { accessSync, chmodSync, constants, existsSync, mkdirSync, readFileSync, readdirSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
5
5
  import { homedir, tmpdir } from "node:os";
6
- import { CallId, LlmAdapter, LlmError } from "@deepseek-ai/dsh-llm";
6
+ import * as dshLlm from "@deepseek-ai/dsh-llm";
7
+ import { LlmAdapter, LlmError } from "@deepseek-ai/dsh-llm";
7
8
  import { createHash, randomBytes, randomUUID } from "node:crypto";
8
9
  import { defineTool } from "@deepseek-ai/dsh-tools";
9
10
  import { mkdir, mkdtemp, readFile, readdir, rm, stat, unlink, writeFile } from "node:fs/promises";
@@ -16,6 +17,15 @@ var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
16
17
  //#region src/common/types.ts
17
18
  const PROVIDER_ID = "antigravity";
18
19
  const DEFAULT_FALLBACK_MODELS = [
20
+ {
21
+ id: "gemini-3.8-flash",
22
+ name: "Gemini 3.8 Flash",
23
+ efforts: [
24
+ "low",
25
+ "medium",
26
+ "high"
27
+ ]
28
+ },
19
29
  {
20
30
  id: "gemini-3.7-flash",
21
31
  name: "Gemini 3.7 Flash",
@@ -889,6 +899,7 @@ function defineAgyMirrorTool(deps) {
889
899
  }
890
900
  //#endregion
891
901
  //#region src/host/mapper.ts
902
+ const toToolCallId = dshLlm.ToolCallId ?? dshLlm.CallId ?? ((id) => id);
892
903
  function usageFromRaw(raw) {
893
904
  const usage = {
894
905
  inputTokens: raw.input_tokens ?? 0,
@@ -1058,7 +1069,7 @@ var EventMapper = class {
1058
1069
  index: idx,
1059
1070
  block: {
1060
1071
  type: "tool-call",
1061
- id: CallId(mirrorCallId(this.opts.runId, absIndex)),
1072
+ id: toToolCallId(mirrorCallId(this.opts.runId, absIndex)),
1062
1073
  name: toolName,
1063
1074
  arguments: argumentsJson
1064
1075
  }
@@ -2470,11 +2481,15 @@ var AgyAdapter = class extends LlmAdapter {
2470
2481
  if (prompt.trim() === "") throw new LlmError("request carries no user text or images to forward to agy", Err.AGY_ERROR);
2471
2482
  } else if (prompt.trim() === "") throw new LlmError("request carries no user text to forward to agy", Err.AGY_ERROR);
2472
2483
  if (!isAux && sessionKey !== "") {
2484
+ const now = Date.now();
2485
+ if (this.activeSessionPrompts.size > 100) {
2486
+ for (const [k, v] of this.activeSessionPrompts) if (now - v.startedAt >= 1e4) this.activeSessionPrompts.delete(k);
2487
+ }
2473
2488
  const activePrompt = this.activeSessionPrompts.get(sessionKey);
2474
- if (activePrompt !== void 0 && activePrompt.prompt === prompt && Date.now() - activePrompt.startedAt < 3e3) throw new LlmError("Duplicate request ignored: an identical request is already running for this session.", Err.BUSY);
2489
+ if (activePrompt !== void 0 && activePrompt.prompt === prompt && now - activePrompt.startedAt < 1e4) throw new LlmError("Duplicate request ignored: an identical request is already running for this session.", Err.BUSY);
2475
2490
  this.activeSessionPrompts.set(sessionKey, {
2476
2491
  prompt,
2477
- startedAt: Date.now()
2492
+ startedAt: now
2478
2493
  });
2479
2494
  }
2480
2495
  const before = snapshotConversations();
@@ -2555,7 +2570,6 @@ var AgyAdapter = class extends LlmAdapter {
2555
2570
  const outcome = await proc.outcome;
2556
2571
  releaseOnce();
2557
2572
  if (this.activeRuns.get(sessionKey) === rec) this.activeRuns.delete(sessionKey);
2558
- if (!isAux && sessionKey !== "") this.activeSessionPrompts.delete(sessionKey);
2559
2573
  for (const ev of parser.flush()) {
2560
2574
  if (ev.kind === "result" && ev.conversationId !== "") streamCid = ev.conversationId;
2561
2575
  rec.append(ev);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-agy-link",
3
- "version": "0.4.24",
3
+ "version": "0.4.26",
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",
@@ -52,9 +52,9 @@
52
52
  },
53
53
  "devDependencies": {
54
54
  "@deepseek-ai/cordis": "^4.0.1",
55
- "@deepseek-ai/dsh-commands": "^0.1.0-rc.6",
56
- "@deepseek-ai/dsh-llm": "^0.1.0-rc.6",
57
- "@deepseek-ai/dsh-tools": "^0.1.0-rc.6",
55
+ "@deepseek-ai/dsh-commands": "0.1.2-rc.1",
56
+ "@deepseek-ai/dsh-llm": "0.1.2-rc.1",
57
+ "@deepseek-ai/dsh-tools": "0.1.2-rc.1",
58
58
  "@types/node": "^24.3.0",
59
59
  "@types/qrcode": "^1.5.5",
60
60
  "tsdown": "^0.22.14",
@@ -83,7 +83,7 @@
83
83
  "scripts": {
84
84
  "build": "tsdown",
85
85
  "check": "tsc --noEmit",
86
- "test": "node --experimental-transform-types --test \"test/**/*.test.ts\"",
86
+ "test": "node --experimental-transform-types --test --test-concurrency=1 \"test/**/*.test.ts\"",
87
87
  "prepack": "npm run build"
88
88
  },
89
89
  "engines": {