dsh-agy-link 0.6.5 → 0.6.7

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,35 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.7 (2026-11-08)
4
+
5
+ ### English
6
+
7
+ - **Fix(config): the model context window and output cap are set via env, so a 256K model stops showing as 1M (issue #83).**
8
+ - `contextWindowDefault` / `maxTokensDefault` drive DSH's per-model `context.contextWindow` — and therefore the "context used %" tooltip — but agy's model list carries no window, and neither key was exposed through an env var or the settings UI. A user whose model is really 262 144 tokens could only see the 1 048 576 default.
9
+ - `DSH_AGY_CONTEXT_WINDOW` and `DSH_AGY_MAX_TOKENS` now override them (positive integers only; invalid values fall back), with README rows in 中文 and English.
10
+
11
+ ### 中文
12
+
13
+ - **修复(config):模型上下文窗口与输出上限可用环境变量设置,256K 模型不再显示成 1M(issue #83)。**
14
+ - `contextWindowDefault` / `maxTokensDefault` 决定上报给 DSH 的每模型 `context.contextWindow`(也就是「上下文已用 %」浮层),但 agy 的模型列表不上报窗口,且这两个键此前既没有环境变量也没有设置面板入口——真实窗口是 262144 的用户只能看到 1048576 的默认值。
15
+ - 现支持 `DSH_AGY_CONTEXT_WINDOW` / `DSH_AGY_MAX_TOKENS`(仅接受正整数,非法值回落),并在中英 README 配置表中补充说明。
16
+
17
+ **Full Changelog**: https://github.com/amlyczz/dsh-agy-link/compare/v0.6.6...v0.6.7
18
+
19
+ ## 0.6.6 (2026-11-08)
20
+
21
+ ### English
22
+
23
+ - **Docs: document the DSH 0.2.2 boot failure seen on 0.4.99 and the upgrade path (issue #86).**
24
+ - Users still on 0.4.99 (and earlier) can hit `web boot: 1 entry did not activate` with `locale "es" is already registered` after upgrading to DSH 0.2.2-rc.1: that client called `locale.addLanguage` unconditionally, and the host may have registered `es`/`pt-BR` first. Idempotent registration landed in **0.5.5** (#70/`31c99c1`), so the fix is an upgrade to ≥ 0.5.5; both FAQs now say so, in 中文 and English, together with the disable-plugin workaround.
25
+
26
+ ### 中文
27
+
28
+ - **文档:记录 0.4.99 在 DSH 0.2.2 下的启动失败与升级路径(issue #86)。**
29
+ - 仍在使用 0.4.99(及更早)的用户升级到 DSH 0.2.2-rc.1 后可能遇到 `web boot: 1 entry did not activate` 与 `locale "es" is already registered`:旧客户端无条件调用 `locale.addLanguage`,而宿主可能已先注册 `es`/`pt-BR`。幂等注册已在 **0.5.5**(#70/`31c99c1`)落地,升级到 ≥ 0.5.5 即可;中英 FAQ 均已补充该说明与「临时禁用插件」的兜底。
30
+
31
+ **Full Changelog**: https://github.com/amlyczz/dsh-agy-link/compare/v0.6.5...v0.6.6
32
+
3
33
  ## 0.6.5 (2026-11-07)
4
34
 
5
35
  ### English
package/README.md CHANGED
@@ -162,6 +162,8 @@ dsh plugin --profile web add dsh-agy-link
162
162
  | `hiddenModels` | `DSH_AGY_HIDDEN_MODELS` | `[]` | 在 `/model` 选择器中隐藏的模型 slug 列表(黑名单语义,新模型默认可见;建议直接在设置面板"模型显示"中点选管理) |
163
163
  | `timeoutMs` | `DSH_AGY_TIMEOUT_MS` | `600000` | 单轮活跃看门狗超时(毫秒) |
164
164
  | `longToolIdleMinutes` | `DSH_AGY_LONG_TOOL_IDLE_MINUTES` | `240` | 存在未完成工具步骤(ACTIVE)时的空闲预算(分钟);`0` = 不抬高预算,卡死的工具按 `timeoutMs` 快速失败 |
165
+ | `contextWindowDefault` | `DSH_AGY_CONTEXT_WINDOW` | `1048576` | 上报给 DSH 的模型上下文窗口(token)。agy 的模型列表不上报窗口,所以统一用该值;若你的模型实际是 256K(如部分 Claude/Gemini 配置),设为 `262144` 即可让「上下文已用 %」正确 |
166
+ | `maxTokensDefault` | `DSH_AGY_MAX_TOKENS` | `65536` | 单次输出 token 上限(上报给 DSH) |
165
167
  | `workspaceRoot` | `DSH_AGY_WORKSPACE_ROOT` | 会话 cwd | agy 工作区根目录(默认跟随当前会话工作区) |
166
168
  | `proxyUrl` | `DSH_AGY_PROXY_URL` | 空字符串 | 全局代理 URL;若在控制台中单独配置了代理,优先使用账号独立代理 |
167
169
  | `suppressAgyAutoUpdate` | `DSH_AGY_SUPPRESS_AUTOUPDATE` | Windows `true`,其他平台 `false` | 每次 spawn 前刷新 agy 的更新检查时间戳,阻断 `--bg-updater` 子进程链(Windows 闪窗根因)。关闭后 agy 恢复自动更新检查 |
@@ -212,6 +214,12 @@ dsh plugin --profile web add dsh-agy-link
212
214
 
213
215
  ## ❓ 常见问题排查 (FAQ)
214
216
 
217
+ ### 升级到 DSH 0.2.2 后桌面端启动失败(`web boot: 1 entry did not activate` / `locale "es" is already registered`)?
218
+ **答:这是 0.4.99 及更早版本的兼容性问题,已在 0.5.5 修复(#70 / `31c99c1`),当前 0.6.x 不受影响。**
219
+ - **原因**:0.4.99 的客户端会无条件调用 `locale.addLanguage({ id: 'es' | 'pt-BR' })`。DSH 0.2.2 的宿主 locale 插件可能已先注册这些语言,于是抛出 `locale "es" is already registered`,插件前端条目激活失败并导致整个 web boot 失败(桌面端进不了聊天界面)。
220
+ - **处理**:把 `dsh-agy-link` 升级到 **≥ 0.5.5**(推荐当前 0.6.x)。新版注册前会检查宿主语言目录,仅容忍「已注册 / 已有词典」,卸载时也只清理自己拥有的注册项;宿主已注册 `es`/`pt-BR`(含 `ES`/`pt-br` 大小写变体)都可正常共存。
221
+ - **临时恢复**:若暂时无法升级,禁用该插件即可进入聊天界面。
222
+
215
223
  ### Windows 平台开始对话时为什么会短暂闪一下黑色命令行窗口(黑框)?
216
224
  **答:这是 Windows 系统的控制台分配机制,完全良性,不会影响对话和模型功能。**
217
225
  - **原因分析**:DSH 是基于 Electron 的图形桌面应用(GUI 进程),每次发起对话时,插件需要调用底层命令校验并同步当前账号在 Windows 凭据管理器(Credential Manager)中的 OAuth Token,随后启动 `agy.exe` 控制台子进程建立流式通信。在 Windows 11 下,系统默认终端若被设为「Windows 终端 (Windows Terminal)」,Windows Terminal 会拦截后台控制台子进程的句柄分配并闪现弹窗(这是 Windows Terminal 已知的 OpenConsole 委托拦截机制)。
@@ -387,6 +395,8 @@ dsh plugin --profile web add dsh-agy-link
387
395
  | `hiddenModels` | `DSH_AGY_HIDDEN_MODELS` | `[]` | Model slugs hidden from the `/model` picker (deny-list, newly discovered models stay visible; manage them via the "Model visibility" row in the settings panel) |
388
396
  | `timeoutMs` | `DSH_AGY_TIMEOUT_MS` | `600000` | Activity watchdog timeout in milliseconds |
389
397
  | `longToolIdleMinutes` | `DSH_AGY_LONG_TOOL_IDLE_MINUTES` | `240` | Idle budget while a tool step is ACTIVE (minutes); `0` keeps the normal `timeoutMs` budget so wedged tools fail fast |
398
+ | `contextWindowDefault` | `DSH_AGY_CONTEXT_WINDOW` | `1048576` | Model context window (tokens) reported to DSH. agy's model list carries no window, so this single value is used for every model; if yours is really 256K, set `262144` and the "context used %" becomes correct |
399
+ | `maxTokensDefault` | `DSH_AGY_MAX_TOKENS` | `65536` | Output token cap reported to DSH |
390
400
  | `workspaceRoot` | `DSH_AGY_WORKSPACE_ROOT` | session cwd | Working directory root |
391
401
  | `proxyUrl` | `DSH_AGY_PROXY_URL` | empty string | Global proxy URL; per-account proxies configured in console take precedence |
392
402
  | `suppressAgyAutoUpdate` | `DSH_AGY_SUPPRESS_AUTOUPDATE` | `true` on Windows, `false` elsewhere | Refreshes agy's update-check timestamp before every spawn so its `--bg-updater` child chain (the Windows console-flash root cause) never starts. `false` restores agy's own auto-update checks |
@@ -454,6 +464,12 @@ you explicitly accept unattended tool execution.
454
464
 
455
465
  ## ❓ FAQ & Troubleshooting
456
466
 
467
+ ### Desktop app fails to boot after upgrading to DSH 0.2.2 (`web boot: 1 entry did not activate` / `locale "es" is already registered`)?
468
+ **A: That is a 0.4.99-and-earlier compatibility bug, fixed in 0.5.5 (#70 / `31c99c1`); current 0.6.x is unaffected.**
469
+ - **Cause**: the 0.4.99 client called `locale.addLanguage({ id: 'es' | 'pt-BR' })` unconditionally. DSH 0.2.2's host locale plugin may have registered those languages first, so the call threw `locale "es" is already registered`; the plugin's client entry failed to activate and took the whole web boot down (the desktop app could not reach the chat UI).
470
+ - **Fix**: upgrade `dsh-agy-link` to **≥ 0.5.5** (0.6.x recommended). Registration now inspects the host catalog, tolerates only "already registered / already has locale", and disposing removes only entries the plugin owns; host-registered `es`/`pt-BR` (including `ES`/`pt-br` case variants) coexist fine.
471
+ - **Workaround**: if you cannot upgrade yet, disable the plugin to reach the chat UI.
472
+
457
473
  ### Why does a black command prompt / terminal window briefly flash when starting a conversation on Windows?
458
474
  **A: This is a cosmetic behavior of the Windows Console subsystem and is completely harmless.**
459
475
  - **Root Cause**: DSH is an Electron desktop app (GUI process). Before each conversation turn, the plugin verifies/syncs Google credentials via the Windows Credential Manager and launches the `agy.exe` console child process for streaming. On Windows 11, if the system default terminal is set to "Windows Terminal", Windows Terminal intercepts the background console allocation and momentarily flashes an empty window (a known Windows Terminal OpenConsole delegation behavior).
package/dist/index.js CHANGED
@@ -605,6 +605,14 @@ function resolveConfig(entry, env = process.env, overrides = readOverrides()) {
605
605
  const t = asNum(env.DSH_AGY_LONG_TOOL_IDLE_MINUTES);
606
606
  if (t !== void 0 && t >= 0) cfg.longToolIdleMinutes = t;
607
607
  }
608
+ if (env.DSH_AGY_CONTEXT_WINDOW) {
609
+ const w = asNum(env.DSH_AGY_CONTEXT_WINDOW);
610
+ if (w !== void 0 && w > 0) cfg.contextWindowDefault = Math.floor(w);
611
+ }
612
+ if (env.DSH_AGY_MAX_TOKENS) {
613
+ const m = asNum(env.DSH_AGY_MAX_TOKENS);
614
+ if (m !== void 0 && m > 0) cfg.maxTokensDefault = Math.floor(m);
615
+ }
608
616
  if (env.DSH_AGY_EXTRA_ARGS) cfg.extraArgs = env.DSH_AGY_EXTRA_ARGS.split(/\s+/).filter(Boolean);
609
617
  if (env.DSH_AGY_HIDDEN_MODELS) {
610
618
  const list = asStringArray(env.DSH_AGY_HIDDEN_MODELS.split(","));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-agy-link",
3
- "version": "0.6.5",
3
+ "version": "0.6.7",
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",