dsh-agy-link 0.4.100 → 0.5.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/CHANGELOG.md CHANGED
@@ -1,5 +1,79 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.0 (2026-11-03)
4
+
5
+ ### English
6
+
7
+ - **Feat(translate): `/tsl` — Gemini rewrites the session output in plain language, pinned under the reply.**
8
+ - One unified entry (`TranslationService`) serves three consumers: the `/tsl` command, an opt-in automatic post-turn hook, and a per-reply "译成人话" action. The model call rides this plugin's own auxiliary adapter route (`purpose:'translation'`), so it uses the same account pool — **a quota-exhausted account is cooled down and the retry lands on the next account automatically** — while staying out of conversation bindings, tools and concurrency slots.
9
+ - Defaults to `gemini-3.8-flash` · `high` (configurable, with a live-catalog fallback chain). Each result is persisted as a `plugin:agy-link/translation` session record and rendered as a labelled **"✨ Gemini translation" card anchored directly under the translated reply**; it survives reloads, keeps the original text behind a toggle, and never enters model-visible history. Historical turns get the same card from a hover action.
10
+ - Auto mode is **off by default** (`autoTranslate`, toggled in Settings → Antigravity, or per session with `/tsl auto on`). It reacts only to new `turn/end` completions, skips turns already produced by the translate model, throttles repeated runs, and never disturbs the agent loop when translation fails.
11
+ - Adapter: `purpose:'translation'` joins the auxiliary channel but keeps the caller's explicit reasoning effort (aux calls would otherwise pin Gemini to `low`) and is exempt from `allowAuxiliary`.
12
+
13
+ - **Client polish, same release.** The settings panel drops the permission-mode row — the permission mode stays `skip` (still overridable by config / `DSH_AGY_MODE`, e.g. headless runs). The reasoning-effort row **stays**, relabelled **Default thinking effort** (`auto` / `low` / `medium` / `high`): it seeds the level DSH's session **model menu** starts on (`defaultEffort` defaults to `high`, mapping 1:1 to agy's levels) while the menu itself can still switch it per model. Auto-warmup and auto-translate toggles use native `[ On | Off ]` segmented capsule button groups matching pool scheduling, cleanly demonstrating that auto-translation is disabled by default.
14
+
15
+ - **Fix(client): closed-loop translation action state machine & DSH event extraction.** The Gemini translation button now transitions cleanly through `idle` (Gemini spark) -> `working` (true circular SVG spinner with rotation animation and click guard) -> `done` (green checkmark, kept while the card exists) / `error` (red retry icon, reverts after 3s), stopping event propagation on click. On the host side, `sessionEvents()` reads real DSH sessions via `session.snapshotEvents()` and `session.ownEvents()`, and `appendRecord()` supports native `session.append()`, eliminating `SESSION_UNAVAILABLE` failures when requesting translations. Unindexed messages fall back gracefully to the latest completed turn.
16
+
17
+ - **Fix(client): the hint actually shows, and the button state survives a remount.** Three follow-ups from dogfooding:
18
+ - **Hover hint**: the native `title` bubble never appeared inside the desktop shell (and DSH's internal `Tooltip` primitive is not exposed to plugin bundles), so the action owns a small CSS tooltip. Root cause of the first attempt rendering as **inline text next to the icon**: `injectStyles()` returned early whenever the style tag already existed, so after a plugin reload the *older* sheet stayed and the newly added hover rules never applied — the tooltip `<span>` was then a plain text node in the action row. The sheet is now self-healing (it rewrites the tag when the content differs), its id is versioned (`…-tsl-css-v2`), and the hint is drawn by `::after` from a `data-tip` attribute instead of a real node, so **a missing stylesheet degrades to "no hint" rather than leaked text**. It grows to the **right** because the action strip hugs the left edge of the reply, where a centred bubble would be clipped by the transcript scroller. Verified in a browser in both states: stylesheet present → dark bubble on hover; stylesheet absent → clean icon row, no stray text.
19
+ - **State persistence**: the chat timeline re-creates the panel when the window regains focus, so component-local state used to snap back to `idle` mid-flight ("the state vanishes when I switch windows"). The state now lives in a module-level map plus an in-flight set, and on every mount the button asks the new `GET /plugins/agy-link/translate/state?session=&message=` whether this reply already owns a durable record — so **a finished translation keeps its ✓ after a window switch, a session switch or a full page reload**, and a request still running is restored as the spinner instead of looking un-translated. A successful run now stays `done` (the card is durable) instead of reverting to `idle` after 2.5s; only an error auto-clears, back to retryable `idle` after 3s.
20
+
21
+ - **Fix(issue #67): a model that refuses `--effort` no longer breaks every turn.** agy 1.4.6 (Windows) rejects the *whole* invocation when `--effort` is passed to a model that does not take one — `invalid model selection (… --effort "medium"): --effort is not supported for model "gemini-3.8-flash"` — and with the fallback catalog active (which advertises `low/medium/high` for the Gemini Flash family as a *guess*) a single `defaultEffort` setting made every request fail. Effort support is now learned from agy itself: the refusal is parsed for the model id, that model is replayed **once without `--effort`** so the turn succeeds (the refusal arrives before any output, so the replay is safe), it is persisted to `~/.dsh/agy-link/effort-unsupported.json` so a restart never asks again, and the model stops advertising `reasoning.efforts` — the session model menu drops its effort row instead of offering levels agy will reject. Visible in `/plugins/agy-link/status` (`effortUnsupported`) and the `/agy doctor` report for support. Invariant: an effort mismatch may cost one extra agy process, never a failed turn. The one-shot path (`agy_ask`) honours the same learned list — it spawns agy directly — and `runAgyOnce` now prefers the result envelope's own error over a bare `agy exited with code 1: `, which is what made that path unable to learn (and hard to diagnose) in the first place.
22
+
23
+ - **Feat(translate): one agy conversation per DSH session (1:1), so the translation persona is sent once.** Translations used to spawn a brand-new, unbound agy call every time and re-send the whole instruction block. Now a translation conversation is bound per DSH session under `<sessionKey>#tsl` (account-scoped like the turn binding, so it never collides with it and inherits the cooldown/re-seed behaviour), running with `--conversation`, `--mode plan` and the **session's own workspace as cwd**. The first message carries the persona: who agy is, **the DSH session id**, that workspace, the absolute path of the session's raw log (`~/.dsh/sessions/*/session-<id>/session.*.jsonl.zstd`) with a `zstd -dc … | jq` recipe, and a bounded digest of the thread — so agy can look the history up itself. Later translations reuse the conversation.
24
+ - Measured on real agy while building this, and it changed the design: in a bound conversation a bare source text — and even a 6-char "把这段讲成人话" cue — produced an **empty answer** or an off-task "I am researching the codebase…", while the short request line answered correctly every time (55 chars, 22s cold; 29 chars, 32s on the bound conversation). So the **persona** goes out once and the **request line stays**: `translateBindConversation=false` restores the old always-self-contained form.
25
+
26
+ - **Fix(client): the hint is a body-level node BELOW the row — DSH's own portal shape.** Going above was the wrong cure: every other hint in the strip (copy, thumbs, branch) shows below, so alignment broke. The real difference is that DSH's tooltip is a portal: it is not a child of the scroller, so it can float over the composer instead of being clipped by it. Ours now matches that: one lazily-created singleton node appended to body, position: fixed, hidden by INLINE styles (so a stale stylesheet can still only mean "no hint", never leaked text), shown on hover/focus with the localized label and positioned BELOW the anchor (+6px, centred, clamped to the viewport; it flips above only at the viewport edge, which the composer cannot trigger). Verified in a browser with the shipped sheet: the layout that showed the bubble half-covered now renders it 6px under the row, fully inside the viewport, floating over the composer exactly like the primitive does.
27
+
28
+ - **Superseded in the same night: the hint briefly went ABOVE the row** (a data-tip-side flip, no longer in the code) to dodge the composer. It broke alignment with every other hint and is replaced by the body-level node above.
29
+
30
+ Anchoring the bubble below the icon was right for matching DSH's own strip, but the affordance lives on the NEWEST reply — the row sits directly above the composer, and the bubble ended up half-hidden behind it. Above is now the default (and the no-script fallback); `placeTip` measures the row against its nearest scrollable ancestor on hover/focus and only flips below when there is less than one bubble of room up there, writing `data-tip-side` for the stylesheet to act on. Verified in a browser replicating the reported layout: the bubble renders above the row, fully inside the transcript, clear of the composer, with the DSH tokens unchanged.
31
+
32
+ - **Fix(client): the reply hint now uses DSH's own tooltip tokens.** The bubble was white-on-light with its own caret and sat above the icon, so it read as a foreign widget next to DSH's dark "有问题的回答" bubble. It now copies the primitive's own bubble verbatim — `--dsw-alias-tooltip-bg` / `--dsw-static-neutral-bluish-00`, 13px/20px, `3px 7px`, `--dsw-radius-sm`, no caret, `.15s` fade-in, below the anchor and centred — so the action strip has exactly one tooltip look. Verified against the shipped primitive: computed background, colour, font-size, line-height, padding, radius and the anchor gap are identical.
33
+
34
+ - **Perf(context): tool payloads no longer crowd out the history digest (80/20).** A digest budget is spent by payloads, not by decisions: in this session's real context-transfer file, **91% of the 691 KB was `Tool result` bodies** (376 records, p90 ≈ 4 KB, max 40 KB) while asks and answers together were under 9%. Tool result lines are now middle-elided to 800 B by default (`elideMiddle`: head + `…[elided NB]…` + tail, so a command's verdict at the end still survives), tunable per call with `toolLineBytes`. Projected on that same file: 691 KB → ~236 KB (−66%) with every user ask, every assistant reply and the head+tail of every tool call retained; `toolLineBytes: 400` would land at ~163 KB (−76%).
35
+
36
+ - **Prompt(translate): one line instead of a style contract.** The six-rule prompt ("结论先行 / 去黑话 / 保留可执行信息 / 输出 Markdown…") made Gemini write a book report — headings, bullet lists, formal register — which is the opposite of "人话". It is now a single sentence asking for the same explanation you would give a colleague out loud, plus the three constraints that actually matter (plain words, keep the meaning, invent nothing). A long source gets one budget hint ("挑重点讲清楚") rather than a format mandate. Live check on a real 7,905-char structured reply: conversational prose in four short paragraphs, no headings, no lists.
37
+
38
+ - **Fix(translate): an empty model answer is now retried instead of failing the turn.** A live failure was diagnosed as agy/Gemini finishing with a clean `stop` and **no visible text at all** after ~25s (no error envelope, no max-tokens cut): the call was reported as a generic `AGY_ERROR`, so the bounded retry — which only covered account/transport failures — never re-asked, and the user just saw a failed translation. The runner now reports this case as its own `EMPTY_RESPONSE` code, includes the finish kind in the message and logs model/effort/duration to the host log, and the code joined the retryable set with a longer (~0.9s) back-off than an account stall. Verified live: the same reply that failed translated fine on a re-run (961 chars, 53s), so the condition is transient rather than prompt-specific.
39
+
40
+ ### 中文
41
+
42
+ - **新增(翻译):`/tsl` —— 用 Gemini 把会话输出改写成大白话,并固定显示在该回复下方。**
43
+ - 统一入口 `TranslationService` 同时服务三个消费者:`/tsl` 命令、可选的"回合结束自动翻译"、以及每条回复上的「译成人话」按钮。模型调用走本插件自己的辅助通道(`purpose:'translation'`),复用同一账号池——**额度耗尽的账号会被冷却,重试自动落到下一个账号**,同时不绑会话、不暴露工具、不占并发槽。
44
+ - 默认 `gemini-3.8-flash` · `high`(可配置,并有目录回退链)。结果以 `plugin:agy-link/translation` 记录持久化,渲染为「✨ Gemini 译文」卡片并**锚定在被翻译回复的正下方**:重载后仍在、可展开对照原文、永不进入模型可见历史。历史回合通过悬浮按钮按需生成同一张卡片。
45
+ - 自动模式**默认关闭**(`autoTranslate`,设置 → Antigravity 开关,或 `/tsl auto on` 按会话覆盖):只响应新的 `turn/end`,跳过翻译模型自己产出的回合,限制重复频率,翻译失败绝不影响 agent 主循环。
46
+ - 适配器:`purpose:'translation'` 纳入辅助通道,但保留调用方显式档位(否则辅助调用会把 Gemini 钉在 `low`),且不受 `allowAuxiliary` 限制。
47
+
48
+ - **同版本内的客户端打磨。** 设置面板移除「权限模式」一行——权限模式固定 `skip`(仍可用配置 / `DSH_AGY_MODE` 覆盖,例如无头运行)。思考强度一行**保留**,改名为「默认思考强度」(`auto` / `low` / `medium` / `high`):它决定 DSH 会话**模型下拉框**的初始档位(`defaultEffort` 默认 `high`,与 agy 的等级一一对应),下拉框本身仍可按模型临时切换。自动预热与自动翻译切换均采用原生分段胶囊按钮组(`[ 开启 | 关闭 ]`),与调度策略视觉统一,明确呈现默认关闭状态(关闭态高亮),杜绝歧义。
49
+
50
+ - **修复(client/host):Gemini 翻译动作状态机闭环与真实 DSH 事件提取。** 翻译按钮状态机完整闭环:`idle`(Gemini 星形图标)→ `working`(**真正的 SVG 旋转 Loading 圆环态**,禁用重复点击并阻止事件冒泡)→ `done`(绿色对勾,卡片存在期间保持)/ `error`(红色重试警告,3 秒后复位),各状态附带专用提示文案。服务端 `sessionEvents()` 深度适配真实 DSH 会话的 `session.snapshotEvents()` / `session.ownEvents()`,`appendRecord()` 支持原生 `session.append()` 持久化通道,根治点击翻译报 `SESSION_UNAVAILABLE` 导致无反应的问题;若特定消息 ID 未能精确定位,自动平滑回退至最新已完结回合。
51
+
52
+ - **修复(client):提示注记真的显示出来了,按钮状态也能跨重挂载存活。** 三条来自实机使用的问题:
53
+ - **悬浮提示**:桌面壳内原生 `title` 气泡从不弹出(DSH 内部 `Tooltip` 基元也未对插件包开放),故动作自绘 CSS 提示。首版之所以把提示**当普通文字渲染在图标旁边**,根因是 `injectStyles()` 只要发现同名 style 标签就已存在便直接返回——插件热重载后旧样式表被保留,新增的 hover 规则从未生效,于是提示 `<span>` 退化成动作条里的一个文本节点。现在样式表会自愈(内容不一致即重写)、id 带版本号(`…-tsl-css-v2`),提示改由 `data-tip` 属性配合 `::after` 绘制、不再存在真实节点,因此**即使样式表缺失也只会"没有提示",绝不会漏出文字**。因为动作条紧贴回复左缘,提示**向右展开**,避免被会话滚动容器裁切。已在浏览器中按"有样式 / 无样式"两种状态验证:有样式 hover 出深色气泡,无样式只剩干净图标行、没有任何多余文字。
54
+ - **状态持久化**:窗口重获焦点时聊天时间线会重建面板,组件内状态曾导致转圈中途被打回 `idle`("切窗口状态就消失了")。现有状态放入模块级 Map + 在途 Set,且每次挂载都会通过新增的 `GET /plugins/agy-link/translate/state?session=&message=` 询问该回复是否已有持久化记录——因此**翻译完成后,切窗口、切会话乃至整页刷新都仍保留 ✓**,仍在跑的请求也会还原成转圈态而不是看起来没翻译过。翻译成功后保持 `done`(卡片本身是持久的),不再 2.5 秒后回退 `idle`;只有失败态会在 3 秒后回到可重试的 `idle`。
55
+
56
+ - **修复(issue #67):模型拒绝 `--effort` 时不再让每一轮都失败。** agy 1.4.6(Windows)在给不支持的模型传 `--effort` 时会**拒绝整次调用**——`invalid model selection (… --effort "medium"): --effort is not supported for model "gemini-3.8-flash"`;而 fallback 目录(把 Gemini Flash 系列的 `low/medium/high` 标成**推测**)一旦生效,用户只要设了 `defaultEffort`,每轮请求都失败。现在档位支持改为**向 agy 学习**:从拒绝文本里解析出模型 id,把这次调用**原样重放一次、只是不带 `--effort`**(拒绝发生在任何输出之前,重放安全),并把该模型写进 `~/.dsh/agy-link/effort-unsupported.json`(重启后不再问);同时**收回能力声明**——该模型不再发布 `reasoning.efforts`,会话模型菜单里的档位行会消失,而不是让用户选到一个必然被拒的档位。可在 `/plugins/agy-link/status` 的 `effortUnsupported` 与 `/agy doctor` 报告里看到(便于支持定位)。不变式:档位不兼容最多多花一个 agy 进程,**绝不让用户的一轮对话失败**。 一次性路径(`agy_ask`,直接 spawn agy)同样遵守这份学习结果;`runAgyOnce` 的失败信息改为优先取 result 信封里的 error,而不再是空洞的 `agy exited with code 1: `——这既是它原先学不到的根因,也顺带让 `agy_ask` 失败可诊断。
57
+
58
+ - **新增(translate):每个 DSH 会话一条 agy 翻译会话(1:1),人格只发一次。** 以前每次翻译都是一次全新的、不绑定会话的 agy 调用,并重发整个指令块。现在翻译会话按 DSH 会话绑定为 `<sessionKey>#tsl`(与轮次会话同级的账号隔离,因此互不干扰,并继承冷却/重新播种机制),以 `--conversation`、`--mode plan` 运行,**工作目录 = 该会话的项目目录**。第一条消息带人格:身份(人话翻译器)、**DSH 会话 id**、该会话工作目录、**原始日志绝对路径**(`~/.dsh/sessions/*/session-<id>/session.*.jsonl.zstd`)与 `zstd -dc … | jq` 读法,以及一段有界摘要——agy 想知道更多可以自己去读。之后的翻译复用这条会话。
59
+ - 实机验证过程中发现了一个改变设计的事实:在已绑定的会话里**只发原文**、甚至只发 6 个字的"把这段讲成人话",agy 会给出**空回答**,或跑偏成"我正在研究代码库…";而带上那一行短请求行,每次都立刻正确输出(冷启动 55 字/22 秒;复用会话 29 字/32 秒)。因此**人格不重发、请求行保留**;设 `translateBindConversation=false` 可回到旧的"每次自带完整指令"形态。
60
+
61
+ - **修复(client):提示气泡改为挂到 body、显示在动作行下方——和 DSH 自己的 portal 同构。** 改成朝上是治错了病:这一栏里其它提示(复制、点赞、分支)都在下方,朝上就破坏了统一;真正的差别在于 DSH 的 tooltip 是 **portal**——它不是滚动容器的子节点,所以能浮在输入区之上,而不是被输入区盖住。现在照此实现:`<body>` 上一个懒创建的单例节点、`position: fixed`,默认由内联样式隐藏(因此样式表过期最多只会“没有提示”,绝不会漏出文字),hover/focus 时写入本地化文案并显示在锚点下方(+6px、水平居中、视口内收边;只有视口底边才会翻到上方,输入区不会触发)。已用浏览器 + 打包后的样式表复现原版式:原先被盖住一半的情形,现在气泡落在行下 6px、完整在视口内、像基元那样浮在输入区之上。
62
+
63
+ - **同一晚被取代的中间方案:气泡曾短暂改为朝上**(`data-tip-side` 翻转,代码中已不存在)以躲开输入区。它破坏了与其它提示的一致性,现由上面的 body 级节点方案取代。
64
+
65
+ 朝下虽然和 DSH 原生动作条一致,但入口就在**最新那条回复**上——动作行紧贴输入框,气泡于是被输入区遮了一半。现在默认朝上(也是脚本没跑到时的兜底);`placeTip` 在 hover/focus 时把动作行与最近的可滚动祖先比较,只有上方不足一个气泡高(32px)才翻到下方,并把结论写进 `data-tip-side` 交给样式表。已用浏览器复现报告中的版式验证:气泡出现在行上方、完整落在会话区域内、不与输入区重叠,DSH 令牌不变。
66
+
67
+ - **修复(client):回复提示气泡改用 DSH 自己的 tooltip 令牌。** 之前是白底浅色 + 自绘小尖角、还挂在图标上方,摆在 DSH 原生的深色「有问题的回答」气泡旁边一眼就是外来控件。现在**逐项对齐基元自身的样式**:`--dsw-alias-tooltip-bg` / `--dsw-static-neutral-bluish-00`、13px/20px、`3px 7px`、`--dsw-radius-sm`、无尖角、`.15s` 淡入,位于锚点正下方并居中——整条动作栏只剩一种提示外观。已对照打包后的基元实测:背景色、文字色、字号、行高、内边距、圆角与锚点间距完全一致。
68
+
69
+ - **性能(context):工具输出不再挤占历史摘要(8:2 原则)。** 摘要预算实际是被"载荷"吃掉的,不是被"决策"吃掉的:本会话真实的 context-transfer 文件里,**691 KB 中有 91% 是 `Tool result` 正文**(376 条,p90≈4 KB,最大 40 KB),而提问+回答加起来不到 9%。现在工具结果行默认做"掐头去尾留两端"的中段省略(`elideMiddle`:头 + `…[elided NB]…` + 尾,命令末尾的结论依然保留),默认 800 B,可用 `toolLineBytes` 按调用调整。按同一份文件测算:691 KB → 约 236 KB(**−66%**),且每条用户提问、每条助手回答、每次工具调用的头尾都保留;若设 `toolLineBytes: 400` 则可到约 163 KB(−76%)。
70
+
71
+ - **提示词(translate):从"风格契约"改成一句话。** 原先六条规则(结论先行 / 去黑话 / 保留可执行信息 / 输出 Markdown…)会让 Gemini 写成一份"工作报告"——标题、分点、书面腔,恰恰不是人话。现在就是一句话:像跟同事随口解释那样讲一遍,外加三条真正必要的约束(说大白话、别改原意、别编)。原文较长时只加一句"挑重点讲清楚",不再规定格式。实机验证:对一条 7,905 字的真实结构化回复,输出是四段短句口语讲解,无标题无列表。
72
+
73
+ - **修复(translate):模型返回空内容时不再直接判失败,而是自动重试。** 实机失败已定位:agy/Gemini 在约 25 秒后以**干净的 `stop` 收尾但一个字的正文都没输出**(既无错误信封,也不是 max-tokens 截断)。旧逻辑把它报成笼统的 `AGY_ERROR`,而重试白名单只覆盖账号/传输类失败,于是**根本不会重问**,用户只看到一次失败的翻译。现在该情形有自己的 `EMPTY_RESPONSE` 码:错误信息带上 finish 类型、host 日志记录 model/effort/耗时,并纳入可重试集,且退避时间(约 0.9 秒)比账号类排队更长。已用实机复现验证:同一条此前失败的回复重跑成功(961 字,53 秒),说明这是**偶发**而非提示词问题。
74
+
75
+ **Full Changelog**: https://github.com/amlyczz/dsh-agy-link/compare/v0.4.100...v0.5.0
76
+
3
77
  ## 0.4.100 (2026-11-02)
4
78
 
5
79
  ### English
package/README.md CHANGED
@@ -144,9 +144,9 @@ dsh plugin --profile web add dsh-agy-link
144
144
  | --- | --- | --- | --- |
145
145
  | `enabled` | `DSH_AGY_ENABLED` | `true` | 插件主开关 |
146
146
  | `agyBin` | `DSH_AGY_BIN` | 自动探测 | 显式指定 `agy` 二进制路径 |
147
- | `permissionMode` | `DSH_AGY_MODE` | `skip` | 权限模式:`skip`(无人值守执行)/ `plan` / `accept-edits` |
147
+ | `permissionMode` | `DSH_AGY_MODE` | `skip` | 权限模式:`skip`(无人值守执行)/ `plan` / `accept-edits`。设置面板已不再提供切换,默认固定 `skip`;`plan` / `accept-edits` 仍可用配置或 `DSH_AGY_MODE` 覆盖(例如无头运行) |
148
148
  | `defaultModel` | `DSH_AGY_DEFAULT_MODEL` | `(agy 默认)` | 默认模型 slug |
149
- | `defaultEffort` | `DSH_AGY_DEFAULT_EFFORT` | `(模型默认)` | 思考预算:`low` / `medium` / `high` |
149
+ | `defaultEffort` | `DSH_AGY_DEFAULT_EFFORT` | `high` | 思考预算:`low` / `medium` / `high`(`auto` = 各模型自身默认)。设置面板「默认思考强度」可直接切换;它只是会话**模型下拉框**的初始档位,仍可在该下拉框里按模型覆盖(与 agy 的等级一一对应) |
150
150
  | `hiddenModels` | `DSH_AGY_HIDDEN_MODELS` | `[]` | 在 `/model` 选择器中隐藏的模型 slug 列表(黑名单语义,新模型默认可见;建议直接在设置面板"模型显示"中点选管理) |
151
151
  | `timeoutMs` | `DSH_AGY_TIMEOUT_MS` | `600000` | 单轮活跃看门狗超时(毫秒) |
152
152
  | `longToolIdleMinutes` | `DSH_AGY_LONG_TOOL_IDLE_MINUTES` | `240` | 存在未完成工具步骤(ACTIVE)时的空闲预算(分钟);`0` = 不抬高预算,卡死的工具按 `timeoutMs` 快速失败 |
@@ -281,6 +281,7 @@ Have multiple Google Antigravity / Gemini accounts? **dsh-agy-link makes multi-a
281
281
  | 🖼 **Multimodal Images** | Stages images to local storage and passes safe absolute paths via `--add-dir` |
282
282
  | 🤝 **`agy_ask` Delegation** | Allows other DSH models to delegate subtasks to Antigravity models |
283
283
  | ⌨️ **`/agy` Commands** | Full command suite: `status`, `pool`, `auth`, `models`, `mode`, `effort`, `workspace`, `goal`, `session`, `enable-account`, `disable-account`, `clear`, `doctor`, `help` |
284
+ | 🗣 **`/tsl` Plain-Language Translation** | Gemini rewrites the agent's final answer in plain language and the card is pinned under that reply (persisted in the session, labelled "Gemini translation", original text preserved); `/tsl auto on` translates every new turn |
284
285
 
285
286
  ---
286
287
 
@@ -324,9 +325,9 @@ dsh plugin --profile web add dsh-agy-link
324
325
  | --- | --- | --- | --- |
325
326
  | `enabled` | `DSH_AGY_ENABLED` | `true` | Master switch |
326
327
  | `agyBin` | `DSH_AGY_BIN` | auto-detected | Path to `agy` binary |
327
- | `permissionMode` | `DSH_AGY_MODE` | `skip` | `skip` (unattended execution) / `plan` / `accept-edits` |
328
+ | `permissionMode` | `DSH_AGY_MODE` | `skip` | `skip` (unattended execution) / `plan` / `accept-edits`. The settings panel no longer switches this; it stays `skip` by default, and `plan` / `accept-edits` remain available through config or `DSH_AGY_MODE` (e.g. headless runs) |
328
329
  | `defaultModel` | `DSH_AGY_DEFAULT_MODEL` | `(agy default)` | Default model slug |
329
- | `defaultEffort` | `DSH_AGY_DEFAULT_EFFORT` | `(model default)` | Thinking budget: `low` / `medium` / `high` |
330
+ | `defaultEffort` | `DSH_AGY_DEFAULT_EFFORT` | `high` | Thinking budget: `low` / `medium` / `high` (`auto` = each model keeps its own default). Switchable from the settings panel row **Default thinking effort**; it only seeds the session **model menu** and can still be overridden per model there (levels map 1:1 to agy) |
330
331
  | `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) |
331
332
  | `timeoutMs` | `DSH_AGY_TIMEOUT_MS` | `600000` | Activity watchdog timeout in milliseconds |
332
333
  | `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 |
@@ -334,6 +335,43 @@ dsh plugin --profile web add dsh-agy-link
334
335
  | `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 |
335
336
  | `autoWarmup` | `DSH_AGY_AUTO_WARMUP` | `false` | Opt-in 7-day weekly quota warmup: sends a minimal probe when the weekly window has reset or is cold, activating the 7-day timer. Scans every 5 minutes; this path talks directly to Google's internal endpoints, so assess the risk-control tradeoff yourself |
336
337
  | `warmupModels` | `DSH_AGY_WARMUP_MODELS` | `gemini-3.8-flash,claude-sonnet-4-6` | Model list used for warmup probes (comma-separated); an empty list disables automatic warmup |
338
+ | `autoTranslate` | `DSH_AGY_AUTO_TRANSLATE` | `false` | Auto plain-language translation after every completed turn (card under the reply). Per-session override: `/tsl auto on\|off` |
339
+ | `translateModel` | `DSH_AGY_TRANSLATE_MODEL` | `gemini-3.8-flash` | Model used by `/tsl` and auto mode; falls back through the live catalog when absent |
340
+ | `translateEffort` | `DSH_AGY_TRANSLATE_EFFORT` | `high` | Reasoning effort for effort-capable translate models |
341
+ | `translateTargetLanguage` | `DSH_AGY_TRANSLATE_LANG` | `中文(简体)` | Target language wording in the translator prompt |
342
+ | `translateBindConversation` | — | `true` | Keep ONE agy conversation per DSH session for translations: the persona (who it is, the DSH session id, that session's workspace, the path of its raw log and how to read it, plus a digest) is sent once; later translations reuse it and send only the short request line |
343
+
344
+ ---
345
+
346
+ ## 🗣 Plain-language translation (`/tsl`)
347
+
348
+ Not every model writes plainly. `/tsl` sends the current session's output to a
349
+ Gemini model (default `gemini-3.8-flash` · `high`) and gets a "human language"
350
+ rewrite back.
351
+
352
+ ```
353
+ /tsl # translate the last completed turn
354
+ /tsl 3 # translate turn 3
355
+ /tsl --full # include the turn's intermediate narration
356
+ /tsl --text 任意文本… # translate arbitrary text (no card)
357
+ /tsl --model claude-sonnet-5-5 --effort medium
358
+ /tsl --print # also echo the body in the command result
359
+ /tsl auto on|off|status # per-session auto mode
360
+ ```
361
+
362
+ - The result is stored as a durable `plugin:agy-link/translation` session
363
+ record and rendered as a **"Gemini translation" card pinned directly under the
364
+ reply it translates** — it survives reloads and never enters the model-visible
365
+ history.
366
+ - Every reply also gets a hover action **"译成人话"** so historical turns can be
367
+ translated on demand.
368
+ - The translation call rides this plugin's own auxiliary adapter route, so it
369
+ uses the same account pool: **when an account is out of quota it is cooled
370
+ down and the request retries on the next account automatically** (watch
371
+ `/agy pool` for the switch).
372
+ - Translation is strictly opt-in (`autoTranslate: false` by default) because it
373
+ spends quota per turn. Toggle it in **Settings → Antigravity**, or per session
374
+ with `/tsl auto on`.
337
375
 
338
376
  ---
339
377