dsh-opencode-go 0.1.17 → 0.1.18

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/README.en.md CHANGED
@@ -86,7 +86,7 @@ To build from source and install a local package:
86
86
  npm ci
87
87
  npm run compile
88
88
  npm pack
89
- dsh plugin --profile web add ./dsh-opencode-go-0.1.17.tgz
89
+ dsh plugin --profile web add ./dsh-opencode-go-0.1.18.tgz
90
90
  ```
91
91
 
92
92
  Source development builds the plugin explicitly with `npm run compile`; `--legacy-peer-deps` is not required. Multi-version DSH compatibility tests use independent environments and are not installed during ordinary installation or builds. For Headless, replace `web` with `headless`.
@@ -172,6 +172,10 @@ If online configuration cannot be loaded, models without usable cached or built-
172
172
 
173
173
  A reasoning-capable model without adjustable reasoning levels (for example, `union-alpha`) remains selectable and usable; it simply has no reasoning-strength control.
174
174
 
175
+ MiMo V2.6 Flash's gateway catalog does not yet list its controls. Based on direct OpenCode Go probes, the plugin offers **Off / Low / Medium / High**: Default omits `reasoning_effort` and preserves gateway-default reasoning; Off sends `none`, and the other levels send their matching values. This rule applies only to the verified model and protocol, not other MiMo models. Low / Medium / High were accepted and returned reasoning content, but are not guaranteed to produce increasing amounts of reasoning.
176
+
177
+ Online effort declarations determine selectable strengths. Toggle or budget declarations produce controls only for established native switch or budget protocols; they do not imply `off` or `high` effort parameters on a generic OpenAI-compatible route. An explicit empty control list does not gain an Off choice just because the model can reason.
178
+
175
179
  A model that does offer adjustable levels also declares a default effort (`high` when the model offers it, otherwise the highest level it offers) whenever its transport would answer an unset effort with an explicit disable (`deepseek`, `zai`, `qwen`, `qwen-chat-template`). DSH uses that default when no level has been chosen, so leaving the control unset still sends a reasoning level instead of turning thinking off. Transports that leave the choice to the provider declare no default and are unchanged, and an explicitly chosen level always wins.
176
180
 
177
181
  If the online configuration is temporarily unavailable, the plugin prefers previously fetched configuration, including disk data from before a restart, and falls back to pi-ai's built-in metadata. If a gateway catalog refresh fails, ongoing requests and Settings retain the last successful list from the current process. A failure from either source shows a warning, its cause, and the last successful checks of the model listing and model configuration separately. An initial gateway failure never invents a model list from cached metadata.
package/README.md CHANGED
@@ -86,7 +86,7 @@ dsh --profile headless --patch ./headless.patch.yml "你好"
86
86
  npm ci
87
87
  npm run compile
88
88
  npm pack
89
- dsh plugin --profile web add ./dsh-opencode-go-0.1.17.tgz
89
+ dsh plugin --profile web add ./dsh-opencode-go-0.1.18.tgz
90
90
  ```
91
91
 
92
92
  源码开发时显式运行 `npm run compile`;普通用户直接安装预编译产物,无需 `--legacy-peer-deps`。多版本 DSH 兼容性测试使用独立环境,不参与普通安装或构建。Headless 用户将 `web` 换成 `headless`。
@@ -172,6 +172,10 @@ DSH 0.1.5 的卸载只影响本次请求;DSH 0.1.6 及以上版本通过宿主
172
172
 
173
173
  模型具有推理能力但没有可调节的推理档位时(如 `union-alpha`),仍可正常选择和使用,只是不显示推理强度选项。
174
174
 
175
+ MiMo V2.6 Flash 的网关目录尚未列出可调节档位,插件按 OpenCode Go 实测提供 **Off / Low / Medium / High**:默认不发送 `reasoning_effort`,保留网关默认思考;Off 发送 `none`,其余发送对应值。仅对这个已验证的型号和协议补充映射,不扩展到其他 MiMo 型号。Low / Medium / High 已验证可正常请求并返回思考内容,但不保证实际思考量随档位递增。
176
+
177
+ 在线目录中的 effort 列表决定可选强度。仅有 toggle 或 budget 声明时,插件只对已有原生开关或预算协议提供相应控件,不为普通 OpenAI 兼容协议猜测 `off` 或 `high` 参数。明确的空控制列表不会因为模型具有推理能力就自动增加 Off。
178
+
175
179
  提供可调节档位的模型,如果其传输协议在未选择档位时会显式关闭思考(`deepseek`、`zai`、`qwen`、`qwen-chat-template`),还会声明一个默认档位(模型支持 `high` 时用 `high`,否则用它提供的最高档位)。用户未选择档位时 DSH 使用该默认值,因此留空也会带上推理档位,而不是关闭思考。由服务商自行决定的协议不声明默认值,行为不变;显式选择的档位始终优先。
176
180
 
177
181
  在线配置暂时不可达时,优先复用之前成功获取的配置(包括重启前的磁盘缓存),以 pi-ai 内置配置作为备用。网关目录刷新失败时,已有请求和设置页均保留本次运行中上次成功获取的列表。任一来源刷新失败,设置页都会显示警告、失败原因,以及模型名单和模型配置各自上次成功检查的时间。首次读取网关失败时,不会仅凭元数据缓存生成模型列表。
@@ -1,5 +1,28 @@
1
1
  # Verification
2
2
 
3
+ ## Release 0.1.18 validation (2026-10-02)
4
+
5
+ The 0.1.18 manifest passed Host/Client type checks, production compilation, all **381 tests in 27 files**, and freshness checks for **33 shipped artifacts** on macOS / Node 24.14.1. Both npm and pnpm 11.7.0 Git installations passed with the new version, without plugin build approval; the plugin retains private pi-ai 0.87.1 and the independent peer retains public pi-ai 0.85.1. The nine-host compatibility checks and live OpenCode Go observations for this reasoning fix are recorded below.
6
+
7
+ ## Issue #28: MiMo reasoning controls (2026-10-02)
8
+
9
+ The metadata reader no longer derives an `off` effort spelling from intrinsic reasoning or creates generic OpenAI effort levels from toggle/budget declarations. Established DeepSeek/Qwen native switches remain supported. An exact `mimo-v2.6-flash` / OpenAI Completions rule supplies **Off, Low, Medium, High** in both online metadata and built-in outage fallbacks. Off maps to `none`; an unset effort suppresses the SDK's implicit Off mapping on a request-local model copy, preserving gateway-default reasoning and the shared picker map. Other MiMo models do not inherit this rule.
10
+
11
+ Direct streaming requests to **OpenCode Go**, using the same TypeScript interval-merging prompt and a 4,096-token output cap, produced the following observations. Counts measure individual responses, not comparative reasoning quality or guaranteed effort ordering.
12
+
13
+ | Wire `reasoning_effort` | HTTP | Reasoning tokens | Finish |
14
+ | --- | ---: | ---: | --- |
15
+ | Omitted | 200 | 122 | stop |
16
+ | `none` | 200 | 0 | stop |
17
+ | `low` | 200 | 626 | stop |
18
+ | `medium` | 200 | 383 | stop |
19
+ | `high` | 200 | 71 | stop |
20
+ | `off` | 400 | — | Invalid request parameters |
21
+
22
+ Two further live calls went through the rebuilt plugin, DSH LLM runtime and actual SDK, using an isolated temporary metadata cache. Default omitted the wire field and returned **14 reasoning tokens**, 74 reasoning characters and 1,605 answer characters. Explicit Off sent `none` and returned **0 reasoning tokens**, no reasoning characters and 902 answer characters. Both returned HTTP 200 and finished with `stop`. This confirms Default remains distinct from Off through the implemented request path; the installed user profile was not changed.
23
+
24
+ Host/Client type checks and production compilation passed. `npm run test:ci` passed **381 tests in 27 files** and freshness checks for all **33 shipped artifacts**. New regressions cover online and outage paths, all four supported choices, rejection of unsupported choices before inference, Default/Off alternation without shared-map mutation, exact-model/protocol boundaries, future advertised `none`, and native controls. `DSH_COMPAT_CONCURRENCY=3 npm run test:compat` passed all **nine isolated installed-host generations**, from 0.1.5-rc.1 through **0.2.0-rc.2**, with 13 reasoning streams per generation plus the existing Host/Client/transcript/profile/bundle checks; total time including cleanup was 88.2 seconds. Other operating systems and a Desktop GUI session were not exercised for this change.
25
+
3
26
  ## Release 0.1.17 validation (2026-09-30)
4
27
 
5
28
  After integrating the npm 10 lockfile correction, the 0.1.17 manifest passed Host/Client type checks, all **367 tests in 26 files**, and freshness checks for **32 shipped artifacts** on macOS / Node 24.14.1. Both npm and pnpm 11.7.0 Git installs passed without plugin build approval; the installed package uses private pi-ai 0.87.1 while the independent peer probe keeps public pi-ai 0.85.1. The nine-generation runtime compatibility results below remain applicable: the subsequent integration changes only lockfile metadata, documentation and the package version.
package/lib/index.js CHANGED
@@ -812,6 +812,28 @@ var modelsRemote = {
812
812
  }]
813
813
  };
814
814
 
815
+ // src/reasoning.ts
816
+ var THINKING_LEVELS = ["off", "minimal", "low", "medium", "high", "xhigh", "max"];
817
+ var NATIVE_THINKING_FLAGS = /* @__PURE__ */ new Set(["deepseek", "zai", "qwen", "qwen-chat-template"]);
818
+ function unsupportedThinkingLevels() {
819
+ return Object.fromEntries(THINKING_LEVELS.map((level) => [level, null]));
820
+ }
821
+ function withGatewayReasoning(model) {
822
+ if (model.id !== "mimo-v2.6-flash" || model.api !== "openai-completions" || !model.reasoning) return model;
823
+ return { ...model, thinkingLevelMap: {
824
+ ...unsupportedThinkingLevels(),
825
+ off: "none",
826
+ low: "low",
827
+ medium: "medium",
828
+ high: "high"
829
+ } };
830
+ }
831
+ function withRequestReasoning(model, level) {
832
+ const format = model.compat?.thinkingFormat;
833
+ if (level !== void 0 || model.api !== "openai-completions" || format !== void 0 && format !== "openai" || typeof model.thinkingLevelMap?.off !== "string") return model;
834
+ return { ...model, thinkingLevelMap: { ...model.thinkingLevelMap, off: null } };
835
+ }
836
+
815
837
  // src/model-metadata.ts
816
838
  var MODEL_METADATA_URL = "https://models.dev/api.json";
817
839
  function record(value) {
@@ -831,23 +853,28 @@ function rates(value) {
831
853
  };
832
854
  return { input: rate("input"), output: rate("output"), cacheRead: rate("cache_read"), cacheWrite: rate("cache_write") };
833
855
  }
834
- var LEVELS = ["off", "minimal", "low", "medium", "high", "xhigh", "max"];
835
- function thinkingLevels(metadata, known) {
836
- if (!Array.isArray(metadata.reasoning_options) && known?.thinkingLevelMap !== void 0) return known.thinkingLevelMap;
837
- const map = Object.fromEntries(LEVELS.map((level) => [level, null]));
838
- for (const item of Array.isArray(metadata.reasoning_options) ? metadata.reasoning_options : []) {
839
- const option = record(item);
840
- if (option.type === "toggle" || option.type === "budget_tokens") {
841
- map.off = "off";
842
- map.high = "high";
843
- }
844
- if (option.type !== "effort" || !Array.isArray(option.values)) continue;
856
+ function thinkingLevels(id, api2, metadata, known) {
857
+ if (!Array.isArray(metadata.reasoning_options) && known?.id === id && known.thinkingLevelMap !== void 0) return known.thinkingLevelMap;
858
+ const map = unsupportedThinkingLevels();
859
+ const options = (Array.isArray(metadata.reasoning_options) ? metadata.reasoning_options : []).map(record);
860
+ const efforts = options.filter((option) => option.type === "effort" && Array.isArray(option.values));
861
+ for (const option of efforts) {
845
862
  for (const value of option.values) {
846
863
  const level = value === "none" ? "off" : value;
847
- if (LEVELS.includes(level)) map[level] = String(value);
864
+ if (THINKING_LEVELS.includes(level)) map[level] = String(value);
848
865
  }
849
866
  }
850
- if (known?.reasoning && known.thinkingLevelMap?.off !== null) map.off ??= known.thinkingLevelMap?.off ?? "off";
867
+ const format = known?.compat?.thinkingFormat;
868
+ const native = api2 === "anthropic-messages" || NATIVE_THINKING_FLAGS.has(format ?? "");
869
+ const toggle = options.some((option) => option.type === "toggle");
870
+ const budget = options.some((option) => option.type === "budget_tokens");
871
+ if (native && efforts.length === 0 && (toggle || budget)) map.high = "high";
872
+ const enabled = Object.entries(map).some(([level, wire]) => level !== "off" && typeof wire === "string");
873
+ if (native && (toggle || enabled && known?.reasoning) && known?.thinkingLevelMap?.off !== null && map.off === null) {
874
+ delete map.off;
875
+ } else if (enabled && known?.id === id && known.reasoning && typeof known.thinkingLevelMap?.off === "string") {
876
+ map.off ??= known.thinkingLevelMap.off;
877
+ }
851
878
  return map;
852
879
  }
853
880
  function modelBaseURL(api2, baseURL) {
@@ -898,20 +925,20 @@ function readModelMetadata(body, baseURL, builtin) {
898
925
  return tier.type === "context" && typeof tier.size === "number" && Number.isSafeInteger(tier.size) && tier.size > 0 ? [{ ...rates(item), inputTokensAbove: tier.size }] : [];
899
926
  }).sort((a, b) => a.inputTokensAbove - b.inputTokensAbove);
900
927
  }
901
- models.set(id, {
928
+ models.set(id, withGatewayReasoning({
902
929
  id,
903
930
  name: typeof metadata.name === "string" && metadata.name.length > 0 ? metadata.name : id,
904
931
  provider: "opencode-go",
905
932
  api: api2,
906
933
  baseUrl: modelBaseURL(api2, baseURL),
907
934
  reasoning: metadata.reasoning,
908
- thinkingLevelMap: thinkingLevels(metadata, known),
935
+ thinkingLevelMap: thinkingLevels(id, api2, metadata, known),
909
936
  input: input.includes("image") ? ["text", "image"] : ["text"],
910
937
  contextWindow: positiveInteger(limit.context, "context limit"),
911
938
  maxTokens: positiveInteger(limit.output, "output limit"),
912
939
  cost,
913
940
  compat
914
- });
941
+ }));
915
942
  } catch (error) {
916
943
  errors.set(id, error instanceof Error ? error.message : String(error));
917
944
  }
@@ -1124,11 +1151,11 @@ function waitForSnapshot(pending, signal) {
1124
1151
  });
1125
1152
  }
1126
1153
  function builtinModels(baseURL) {
1127
- return new Map(getBuiltinModels(SDK_PROVIDER_ID).map((model) => [model.id, {
1154
+ return new Map(getBuiltinModels(SDK_PROVIDER_ID).map((model) => [model.id, withGatewayReasoning({
1128
1155
  ...model,
1129
1156
  provider: SDK_PROVIDER_ID,
1130
1157
  baseUrl: modelBaseURL(model.api, baseURL)
1131
- }]));
1158
+ })]));
1132
1159
  }
1133
1160
  function readLiveModelIds(body) {
1134
1161
  const data = body?.data;
@@ -1478,7 +1505,6 @@ function assertBaseURL(raw) {
1478
1505
  }
1479
1506
 
1480
1507
  // src/adapter.ts
1481
- var DISABLES_THINKING_WHEN_UNSET = /* @__PURE__ */ new Set(["deepseek", "zai", "qwen", "qwen-chat-template"]);
1482
1508
  function withModelLimit(model, limits) {
1483
1509
  const limit = limits[model.id];
1484
1510
  if (limit == null) return model;
@@ -1558,7 +1584,7 @@ var OpencodeGoAdapter = class extends LlmAdapter {
1558
1584
  const levels = model.reasoning ? getSupportedThinkingLevels(model) : [];
1559
1585
  if (levels.length > 0) {
1560
1586
  const format = model.compat?.thinkingFormat;
1561
- const fallback = format !== void 0 && DISABLES_THINKING_WHEN_UNSET.has(format) ? levels.includes("high") ? "high" : levels.findLast((level) => level !== "off") : void 0;
1587
+ const fallback = format !== void 0 && NATIVE_THINKING_FLAGS.has(format) ? levels.includes("high") ? "high" : levels.findLast((level) => level !== "off") : void 0;
1562
1588
  reasoning.reasoning = {
1563
1589
  efforts: levels.map((level) => ({
1564
1590
  id: ReasoningEffortId(level),
@@ -1643,7 +1669,7 @@ var OpencodeGoAdapter = class extends LlmAdapter {
1643
1669
  };
1644
1670
  }
1645
1671
  const context = imageRequest === void 0 ? toPiContext(options, void 0, this.options.onReplayDegrade) : await toPiContext({ ...options, signal: watchdog.signal }, imageRequest, this.options.onReplayDegrade);
1646
- const events = snapshot.provider.streamSimple(model, normalizeContext(context), {
1672
+ const events = snapshot.provider.streamSimple(withRequestReasoning(model, reasoning), normalizeContext(context), {
1647
1673
  apiKey,
1648
1674
  ...reasoning === void 0 || reasoning === "off" ? {} : { reasoning },
1649
1675
  ...options.temperature === void 0 ? {} : { temperature: options.temperature },
@@ -0,0 +1,10 @@
1
+ /** Gateway reasoning controls shared by live metadata, fallbacks and requests. */
2
+ import type { Api, Model, ModelThinkingLevel, ThinkingLevelMap } from 'opencode-go-pi-ai';
3
+ export declare const THINKING_LEVELS: readonly ModelThinkingLevel[];
4
+ /** Formats that explicitly disable thinking when no SDK effort is supplied. */
5
+ export declare const NATIVE_THINKING_FLAGS: ReadonlySet<string>;
6
+ export declare function unsupportedThinkingLevels(): ThinkingLevelMap;
7
+ /** Exact model/protocol rules verified against OpenCode Go, never inherited by a family. */
8
+ export declare function withGatewayReasoning(model: Model<Api>): Model<Api>;
9
+ /** An unset OpenAI effort preserves the provider default; explicit Off retains its wire value. */
10
+ export declare function withRequestReasoning(model: Model<Api>, level: ModelThinkingLevel | undefined): Model<Api>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-opencode-go",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "description": "OpenCode Go model provider and settings UI for DeepSeek Harness",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,191 +0,0 @@
1
- # 8 个 fork 的改进与吸收建议
2
-
3
- 检查日期:2026-09-25。基线为本项目 `main` / `origin/main` 的 `8590c5752189658b60240b729666f814f12b27ff`(0.1.12);已通过 GitHub API 确认远端也是同一提交。检查范围是 GitHub 返回的 8 个公开 fork、全部 14 个公开分支,并结合 PR 状态、实际 diff 和当前实现判断。此次只增加研究记录,没有合并 fork、修改产品代码或发布包。[上游基线](https://github.com/Duskriver/dsh-opencode-go/commit/8590c5752189658b60240b729666f814f12b27ff) · [fork 列表 API](https://api.github.com/repos/Duskriver/dsh-opencode-go/forks?per_page=100)
4
-
5
- ## 结论
6
-
7
- 建议优先吸收两个独立小改动,另保留一个低优先级边界修复:
8
-
9
- 1. **Guojing6:为 models.dev 设置独立下载超时。** 网关列表继续 10 秒,约 5 MB 的元数据快照允许更长下载时间。其 `7f699a4` 只改一个文件,可干净应用到当前 main;仍应补慢响应和超时回退测试,并评估 60 秒等待对模型选择器的影响。
10
- 2. **vjcspy:PR #11 的历史输入校验。** 预先拒绝目前无法表达的 developer 消息、工具增删块和延迟加载工具;补丁小、没有依赖升级,已通过本次隔离类型检查和定向测试。没有已知线上触发来源,属于预防性加固。
11
- 3. **x6nux:宿主降级后处理新版图片卸载标记。** 本次用合成历史在真实 0.1.5-rc.1 LLM 模块上复现当前转换函数崩溃,fork 同输入通过。适合只移植能力判断,并补回归测试;没有验证真实用户会话从新版降级的完整迁移流程。
12
-
13
- 不建议整体合入 Guojing6 的兼容分支或 vjcspy 的 develop。前者将大量核心能力改为宽泛回退,后者包含发布安装脚本问题;两者的依赖和历史表示改造远大于目前已经支持 rc.1/rc.2 所需的改动。
14
-
15
- ## 每个 fork 做了什么
16
-
17
- 下表的“独有提交”按 `main..fork` 计算。它不等于“尚缺功能”:nam278 的功能通过整合提交进入主线,因此原始提交仍显示独有。
18
-
19
- | Fork | 分支和独有提交 | 主要改进 | 当前判断 |
20
- | --- | --- | --- | --- |
21
- | [liujwcn](https://github.com/liujwcn/dsh-opencode-go) | `main`:1 | 声明 DSH 0.1.7-rc.1 支持,增加独立宿主 fixture 与兼容测试 | 当前 0.1.12 已覆盖,并进一步支持 rc.2,不必再合 |
22
- | [Guojing6](https://github.com/Guojing6/dsh-opencode-go) | `main`:0;`feat/dsh-0.1.7-rc1-host-drift`:3 | rc.1 开发依赖、宿主 API 回退、旧工具结果转换、Windows 沙箱构建/测试调整、自包含 headless smoke、元数据 60 秒超时 | 建议单独吸收超时改动;其余按具体需求拆分 |
23
- | [RaulLazaro](https://github.com/RaulLazaro/dsh-opencode-go) | `main` / `fix/default-reasoning-effort`:均 0 | 对不传档位就关闭思考的协议设置默认推理档位 | PR #6 已合,并修正最高档位选择,不必再合 |
24
- | [xwxYa](https://github.com/xwxYa/dsh-opencode-go) | `main` / `fix/handle-undecoded-compressed-json`:均 0 | 处理缺失编码响应头的压缩 JSON,并限制读取/解压大小 | PR #5 已合;后来演进为请求 `identity` 的实现,不应恢复旧解压逻辑 |
25
- | [OHeroJ](https://github.com/OHeroJ/dsh-opencode-go) | `main`:0 | 仅保留较早上游快照 | 没有独有改进 |
26
- | [nam278](https://github.com/nam278/dsh-opencode-go) | `main` / `feat/model-limits-ui`:同一独有提交 | 按模型覆盖上下文和输出容量,设置页搜索、重置、保存/放弃 | 已通过 `9d5cea7` 整合并修复边界问题,不必重复引入 |
27
- | [x6nux](https://github.com/x6nux/dsh-opencode-go) | `main`:1 | 0.1.5/0.1.6 图片卸载兼容、同时传像素预算和目标尺寸、处理降级历史标记 | 前两项已有等价能力;降级标记处理仍值得单独借鉴 |
28
- | [vjcspy](https://github.com/vjcspy/dsh-opencode-go) | `master`:0;`develop`:6;`feat/history-guards`:1 | rc.1 开发基线与测试改造、历史转换及 3 类不支持输入校验 | 建议 PR #11;不整体合 develop |
29
-
30
- ## Guojing6:最有实际收益的是慢网络超时修复
31
-
32
- 特性分支相对当前 main 独有 `4dec86b`、`da9f044`、`7f699a4` 三个提交,共改 30 个文件,1183 行新增、520 行删除;默认 `main` 没有独有提交。这个分支以 `f65a04b` 为基线,尚未包含本项目最后的 rc.2 支持和用量进度条修复。[完整分支比较](https://github.com/Duskriver/dsh-opencode-go/compare/8590c5752189658b60240b729666f814f12b27ff...Guojing6:7f699a4e5b91792fe5e72951a1229639a775bf2f)
33
-
34
- ### 建议单独吸收:元数据下载超时
35
-
36
- 当前 `src/catalog.ts` 的 `/models` 和 `models.dev/api.json` 都使用 10 秒完整请求期限。当前 JSON 请求还明确使用 `accept-encoding: identity`,元数据体积明显大于网关 ID 列表。fork 新增 `MODEL_METADATA_FETCH_TIMEOUT_MS = 60_000`,只用于元数据请求,保留网关 10 秒期限。作者报告代理冷连接下载用时 13.7 秒;这是作者测量,本次未在其网络环境复测。[独立提交](https://github.com/Guojing6/dsh-opencode-go/commit/7f699a4e5b91792fe5e72951a1229639a775bf2f) · [当前目录实现](https://github.com/Duskriver/dsh-opencode-go/blob/8590c5752189658b60240b729666f814f12b27ff/src/catalog.ts) · [当前 identity 请求实现](https://github.com/Duskriver/dsh-opencode-go/blob/8590c5752189658b60240b729666f814f12b27ff/src/json-response.ts)
37
-
38
- 本次 `git apply --check` 验证该提交补丁可直接应用到当前 main,无需引入 `host.ts` 或升级依赖。移植时需要覆盖:元数据慢于 10 秒但快于新期限、超时复用已缓存元数据、首次失败仅用已有备用配置、网关仍按 10 秒失败。代码用 `Promise.allSettled` 等待两个请求,目录刷新和需要新快照的请求可能因此最多等待约 60 秒;不能只考虑下载成功率。[当前 snapshot/build 流程](https://github.com/Duskriver/dsh-opencode-go/blob/8590c5752189658b60240b729666f814f12b27ff/src/catalog.ts#L115)
39
-
40
- ### 可以借鉴,但不整体搬入
41
-
42
- - **Headless smoke 自动安装 tarball、通过 Node 启动 CLI**:在新建 `DSH_HOME` 中先安装插件,使验证脚本的前置条件更明确,也有助于避开 Windows `.bin` 启动差异。移植时保留本项目对 `standalone-ok` 输出的断言;fork 切换继承 stdio 后删除了该断言。[提交 da9f044](https://github.com/Guojing6/dsh-opencode-go/commit/da9f044) · [fork 脚本](https://github.com/Guojing6/dsh-opencode-go/blob/7f699a4e5b91792fe5e72951a1229639a775bf2f/scripts/headless-smoke.mjs#L34)
43
- - **Windows 沙箱构建/测试适配**:改用 esbuild CLI、复制 shadow 源码树并重写 CSS import、Vitest threads、继承子进程 stdio。它解决的是作者环境下的 spawn EPERM;本次没有 Windows 环境验证。增加的构建维护成本和移除输出断言的代价,暂不值得随功能补丁一并引入。[构建脚本](https://github.com/Guojing6/dsh-opencode-go/blob/7f699a4e5b91792fe5e72951a1229639a775bf2f/scripts/build.mjs) · [宿主测试](https://github.com/Guojing6/dsh-opencode-go/blob/7f699a4e5b91792fe5e72951a1229639a775bf2f/tests/host-compatibility.spec.ts)
44
- - **统一 `host.ts` 回退**:namespace 读取适用于已知跨版本导出差异,但这里扩展到了错误类、凭据、图片、远程服务及超时机制。例如缺少 `idleWatchdog` 时直接透传 iterator,流式空闲期限失效;缺少 LlmAdapter 时 apply 记录日志后直接返回。当前已验证的 8 代宿主不需要这些假设性降级,不建议整体采用。[host.ts](https://github.com/Guojing6/dsh-opencode-go/blob/7f699a4e5b91792fe5e72951a1229639a775bf2f/src/host.ts#L246) · [apply](https://github.com/Guojing6/dsh-opencode-go/blob/7f699a4e5b91792fe5e72951a1229639a775bf2f/src/index.ts)
45
- - **旧 nested tool-result 图片兼容**:新增递归图片检查和已卸载图片投影,但 adapter 的图片入口仍调用宿主的 `contentHasImage`,现代宿主仅扫描顶层;仅修改 context 无法使整条请求链路完整支持旧形状。应先确认宿主会否传入这种混合历史,再统一能力检查、预算计算及转换测试。[fork context](https://github.com/Guojing6/dsh-opencode-go/blob/7f699a4e5b91792fe5e72951a1229639a775bf2f/src/conversion/context.ts) · [fork adapter](https://github.com/Guojing6/dsh-opencode-go/blob/7f699a4e5b91792fe5e72951a1229639a775bf2f/src/adapter.ts)
46
-
47
- ## x6nux:大部分已覆盖,但降级历史边界仍有价值
48
-
49
- `0d6e9af` 的主要改动是通过宿主能力选择图片卸载协议,并同时给附件服务传递 `maxPixels/maxBytes` 和 `width/height`。本项目已经通过 `bd3ba1f` 与 `1785150` 实现相应兼容,而且现实现保留了图片准备前的估算投影与准备后的精确投影,不宜换回整个旧模块。[fork 提交](https://github.com/x6nux/dsh-opencode-go/commit/0d6e9af74bc654358197f5f5dd323a2e8c7b39ed) · [主线图片兼容提交](https://github.com/Duskriver/dsh-opencode-go/commit/178515041e6ade11cf8e292f6880171c2d46adfb) · [当前投影模块](https://github.com/Duskriver/dsh-opencode-go/blob/8590c5752189658b60240b729666f814f12b27ff/src/conversion/image-offload.ts)
50
-
51
- 尚有差异的是 `isOffloaded()`:fork 只有在宿主具备新版 surface offload API 时才把 `offloaded: true` 当作已卸载;0.1.5 不理解这个标记,仍需按自己的请求预算准备图片。当前 `collectImageRefs` 不分宿主跳过所有带标记图片,旧宿主后续访问 requestImages 中缺失的图片版本时会出错。[fork 能力判断](https://github.com/x6nux/dsh-opencode-go/blob/0d6e9af74bc654358197f5f5dd323a2e8c7b39ed/src/conversion/host-image-offload.ts#L72) · [当前 collectImageRefs](https://github.com/Duskriver/dsh-opencode-go/blob/8590c5752189658b60240b729666f814f12b27ff/src/conversion/context.ts#L106)
52
-
53
- 本次把两份 context 分别编译到临时目录,使用实际 `dsh-llm-v015-rc1` / `dsh-attachment-v015-rc1` 模块、模拟附件读取服务和同一合成输入进行对照:
54
-
55
- ```text
56
- 输入:user.content = [{ type: 'image', attachment: 1 字节图片引用, offloaded: true }]
57
- 图片请求预算:100 bytes
58
- main:读取附件 0 次;TypeError: Cannot read properties of undefined (reading 'bytes')
59
- x6nux:读取附件 1 次;转换成功,输出 1 个 image 块
60
- ```
61
-
62
- 这是转换层复现,没有通过真实 CLI 打开降级会话,也没有真实模型请求。因此建议低优先级移植这个能力判断,并明确降级时是按旧宿主规则重发图片还是统一转成占位文本;不要把 fork 的 mock 测试或本次合成测试等同于完整跨版本数据迁移验证。
63
-
64
- ## vjcspy/dsh-opencode-go
65
-
66
- 检查日期:2026-09-25。比较基线为本项目当前提交 `8590c5752189658b60240b729666f814f12b27ff`(0.1.12)。本节检查了该 fork 的全部 3 个公开分支、实际代码差异、PR #10 / #11 及官方 DSH 参考实现;没有修改本项目生产代码,没有安装或执行 `develop` 的生命周期脚本。
67
-
68
- ### 分支范围与结论
69
-
70
- | 分支 | 固定提交 SHA | 相对本项目基线 | 结论 |
71
- | --- | --- | --- | --- |
72
- | `master` | `8590c5752189658b60240b729666f814f12b27ff` | 完全相同 | 无新增内容 |
73
- | `feat/history-guards` | `57646f55c57b7291b783ccf80f47acf6bc64e39b` | 领先 1、落后 0;2 文件,+71 / -6 | **建议吸收**;对应开放的 PR #11,是独立、低风险的输入校验补丁 |
74
- | `develop` | `3f5e0550a1c5cdfedcac88445a20a4d5de9cc373` | 领先 6、落后 0;23 文件,+930 / -1224 | **不建议整分支合入**;主要是开发依赖升级适配,混入安装回归与未完成的旧图片历史兼容 |
75
-
76
- 来源:[公开分支](https://github.com/vjcspy/dsh-opencode-go/branches)、[guards 固定比较](https://github.com/vjcspy/dsh-opencode-go/compare/8590c5752189658b60240b729666f814f12b27ff...57646f55c57b7291b783ccf80f47acf6bc64e39b)、[develop 固定比较](https://github.com/vjcspy/dsh-opencode-go/compare/8590c5752189658b60240b729666f814f12b27ff...3f5e0550a1c5cdfedcac88445a20a4d5de9cc373)。以上数量由 GitHub Compare API 与本地 Git 交叉核对。
77
-
78
- ### 建议吸收:历史与工具声明的三项保护
79
-
80
- PR #11 的提交直接以本项目当前 HEAD 为父提交,不需要先迁移 `develop`,也不更改依赖、锁文件、已支持宿主范围或持久化格式。可以直接 cherry-pick `57646f55c57b7291b783ccf80f47acf6bc64e39b`,再按本项目流程验证合入。检查时 PR 为 open,GitHub 报告 `mergeable: true`、`mergeable_state: clean`。本次仅评估,没有合并、关闭或评论该 PR。[PR #11](https://github.com/Duskriver/dsh-opencode-go/pull/11)
81
-
82
- 实际改变如下:
83
-
84
- | 输入 | 现有代码行为 | 补丁行为及收益 |
85
- | --- | --- | --- |
86
- | 历史中出现 `developer` 角色 | 未识别的角色会落入普通用户消息分支,可能丢失角色语义 | 转换时抛出 `LlmError`,错误码 `UNSUPPORTED_CONTENT`,避免把不支持的高优先级历史按普通用户文本发送 |
87
- | 顶层内容块为 `tool-addition` / `tool-removal` | 不属于已支持的内容词汇,可能被转换忽略 | 明确拒绝,避免工具状态变更被悄悄丢掉 |
88
- | 工具声明含 `deferLoading: true` | `toolsOf()` 仅抽取 name / description / parameters,延迟加载标志会丢失 | 明确拒绝,避免把延迟工具当作普通工具发送 |
89
-
90
- 以上前后行为来自实际转换代码。不能笼统称作“原来一定会得到 provider 的 malformed request”:有些输入会得到可发送但语义错误或内容缺失的请求,这也是该补丁值得吸收的原因。[当前转换实现](https://github.com/Duskriver/dsh-opencode-go/blob/8590c5752189658b60240b729666f814f12b27ff/src/conversion/context.ts)、[补丁实现](https://github.com/vjcspy/dsh-opencode-go/blob/57646f55c57b7291b783ccf80f47acf6bc64e39b/src/conversion/context.ts#L51-L66)
91
-
92
- 两个历史 guard 放在现有图片角色校验之前,并由同步、异步转换路径共同调用。工具 guard 放在 `toolsOf()`,不依赖历史是否非空。三个错误与 DSH 官方 `dsh-v0.1.7-rc.2` 的参考 pi-ai adapter 一致;该标签固定到 `477b4f420553e8a52c2fbccc464d7561b239c443`,已读取实际源码核实。因为本项目开发类型仍是 `dsh-llm@0.1.6-alpha.1`,使用结构类型收窄是保留旧版本编译支持的适配手段。[fork 工具 guard](https://github.com/vjcspy/dsh-opencode-go/blob/57646f55c57b7291b783ccf80f47acf6bc64e39b/src/conversion/context.ts#L143-L155)、[官方历史 guard](https://github.com/deepseek-ai/deepseek-harness/blob/477b4f420553e8a52c2fbccc464d7561b239c443/packages/llm/llm-pi-ai/src/context.ts#L49-L66)、[官方工具 guard](https://github.com/deepseek-ai/deepseek-harness/blob/477b4f420553e8a52c2fbccc464d7561b239c443/packages/llm/llm-pi-ai/src/context.ts#L129-L143)
93
-
94
- 安全与兼容性判断:补丁只读取输入、抛出错误,不写历史、附件、设置或凭据,也没有新增网络端点。正常支持的消息仍使用原有转换路径;传入这三类原本不支持的输入会由“尝试转换”变成“明确失败”,属于预期的收紧行为。PR 作者明确表示目前没有已知生产来源,这一点应按作者声明理解,本次没有独立证明所有外部插件均不可能生成它们。因此优先级是预防性加固,不应宣传为已复现的线上事故修复。[PR 的范围说明](https://github.com/Duskriver/dsh-opencode-go/pull/11)
95
-
96
- 一个非阻塞细节:异步路径的 `deferLoading` 校验仍在最后构造 envelope 时执行,可能先读取图片附件;它保证生成请求前失败,但不是所有图片工作前都失败。此顺序来自共享的 `piContext()` / `toolsOf()` 调用,且与官方实现一致。若将来要求“无效工具声明绝不读取附件”,应单独提前做 options 校验。[异步路径](https://github.com/vjcspy/dsh-opencode-go/blob/57646f55c57b7291b783ccf80f47acf6bc64e39b/src/conversion/context.ts#L325-L405)
97
-
98
- ### 已执行的 PR #11 验证
99
-
100
- 在独立 `/tmp` Git worktree 中使用当前项目已经安装的依赖,显式运行可信的 Vitest 和 TypeScript CLI;没有运行 fork 的 `npm install`、`postinstall` 或 `pretest`。环境:macOS arm64、Node `v24.14.1`、Vitest `4.1.11`。
101
-
102
- | 检查 | 本次实际结果 |
103
- | --- | --- |
104
- | 基线 `8590c575…` 的 `tests/conversion-context.spec.ts` | 22 / 22 通过 |
105
- | guards 提交 `57646f55…` 的同一测试文件 | 25 / 25 通过 |
106
- | guards 提交的 Host `tsc -p tsconfig.host.json --noEmit` | 通过 |
107
- | guards 提交的 Client `tsc -p tsconfig.client.json --noEmit` | 通过 |
108
-
109
- 新增 3 个测试分别覆盖 developer、tool-addition、deferLoading,并各检查同步与异步两条入口;同步侧还断言 `LlmError` 类型,两个入口均断言错误码与完整信息。尚未单独覆盖 `tool-removal`、空 history 配合 deferred tools、`deferLoading: false` 的正常路径,可以在吸收时补上边界用例;它们不是当前发现的实现错误。[新增测试](https://github.com/vjcspy/dsh-opencode-go/blob/57646f55c57b7291b783ccf80f47acf6bc64e39b/tests/conversion-context.spec.ts#L571-L625)
110
-
111
- “304 tests / build 通过”是 PR 作者提供的验证声明,本子任务没有将其冒充为本次完整验证;本次直接执行的范围见上表。主项目整体检查结果应在总报告中另列。
112
-
113
- ### develop 的 6 个提交究竟增加了什么
114
-
115
- | 固定提交 | 改动与价值 | 吸收建议 |
116
- | --- | --- | --- |
117
- | [`bbef5f458b5785166ddd81aff39ce1ad5100d337`](https://github.com/vjcspy/dsh-opencode-go/commit/bbef5f458b5785166ddd81aff39ce1ad5100d337) | 开发依赖迁移到 DSH rc.1;运行时 `dsh-brand` 升到 rc.1、Schemastery 升到 3.18.4;新增 `.npmrc` 与 fixture symlink `postinstall` | 暂不迁移;并非仅 devDependency 变化,且引入下述发布包安装问题 |
118
- | [`50c788830508f9552ab853496ba6745eb1f33ffe`](https://github.com/vjcspy/dsh-opencode-go/commit/50c788830508f9552ab853496ba6745eb1f33ffe) | 适配 rc.1 类型:`RequestMessage`、settings / client 的结构访问、图标 Medium 兜底;中间版本同时删除旧 settings 和 nested tool-result 路径 | 不能单独挑这个提交;后续两次 fix 正是在恢复这次删除的向后兼容 |
119
- | [`455de34af4c9448f2b823db889e5e42ed5a7a321`](https://github.com/vjcspy/dsh-opencode-go/commit/455de34af4c9448f2b823db889e5e42ed5a7a321) | 用 `SettingsCompat` 结构类型恢复 0.1.5 / 0.1.6 `installSection` | 本项目原本就有 fallback,主要是 fork 的类型适配与回归修复 |
120
- | [`10bf28b85972f3b8893743ad8bcfe85b1f94ab15`](https://github.com/vjcspy/dsh-opencode-go/commit/10bf28b85972f3b8893743ad8bcfe85b1f94ab15) | 结构方式恢复旧 nested tool-result;增加深层图片检测、nested offloaded image 文本替换和 3 个 guard | guard 选用 PR #11 的独立版本;不要原样搬入其余图片逻辑 |
121
- | [`873ee67f4b4b0e8b7ac46572fd951db653b41d18`](https://github.com/vjcspy/dsh-opencode-go/commit/873ee67f4b4b0e8b7ac46572fd951db653b41d18) | 动态配置测试改走新版 entry form,增加 settings fallback 定向测试,改消息 source fixture,固定测试 `NODE_ENV` | 可提取少量独立测试;不宜把旧 settings 文件验证整体替换掉 |
122
- | [`3f5e0550a1c5cdfedcac88445a20a4d5de9cc373`](https://github.com/vjcspy/dsh-opencode-go/commit/3f5e0550a1c5cdfedcac88445a20a4d5de9cc373) | 私有 fork 版本名改为 `0.1.12-vjcspy.1` | 无上游产品价值,不吸收 |
123
-
124
- 需要纠正“develop 才新增 rc.1 / rc.2 兼容”这一印象:当前基线已经支持新的独立 `tool` role、`configForms`、`configure` 优先 / `installSection` fallback 和 Regular / 14 图标兼容;peer 范围与八代宿主矩阵也已包含 rc.1 / rc.2。develop 中许多结构 cast 与 `RequestMessage` 类型替换,目的是用新开发依赖重新编译原有跨版本行为,不是当前用户缺失的新能力。关闭的 [PR #10](https://github.com/Duskriver/dsh-opencode-go/pull/10) 也不应重复当成待移植的新特性。[当前 settings 实现](https://github.com/Duskriver/dsh-opencode-go/blob/8590c5752189658b60240b729666f814f12b27ff/src/index.ts#L206-L240)、[当前客户端入口](https://github.com/Duskriver/dsh-opencode-go/blob/8590c5752189658b60240b729666f814f12b27ff/src/client/index.ts#L43-L84)、[当前验证记录](https://github.com/Duskriver/dsh-opencode-go/blob/8590c5752189658b60240b729666f814f12b27ff/docs/verification.md)
125
-
126
- ### develop 的两个主要问题
127
-
128
- **1. 发布包增加了会引用缺失文件的 postinstall。**
129
-
130
- 已验证事实:`package.json` 第 61 行增加 `postinstall: node scripts/materialize-fixture-links.mjs`,但 `files` 白名单第 32–38 行只包含 `lib`、patch、notices、docs、examples;`scripts` 与 `tests/hosts` 均不在包内。对固定 develop 提交执行 `npm pack --dry-run --json --ignore-scripts --workspaces=false`,确认打包清单没有该脚本与 tests 目录。这个 dry-run 未构建,所以也没有生成 lib;这里只用它核实受白名单控制的脚本/测试文件缺失,不把未构建的 lib 当作缺陷。[manifest](https://github.com/vjcspy/dsh-opencode-go/blob/3f5e0550a1c5cdfedcac88445a20a4d5de9cc373/package.json#L32-L62)
131
-
132
- 由此可以确定:按当前清单发布后,在执行生命周期脚本的普通 npm 安装中,该 postinstall 会引用不存在的文件,预期报 `MODULE_NOT_FOUND`。本次没有执行消费者安装,因此具体错误是基于文件清单与 Node 入口语义的推断,并非抓取到的安装日志。即使仅补发脚本仍不完整:脚本无条件 `readdirSync(tests/hosts)`,发布包没有此目录时又会失败;它本质上只服务开发 fixture,应留在显式开发准备步骤,或至少同时解决发布环境跳过逻辑。[脚本入口及目录遍历](https://github.com/vjcspy/dsh-opencode-go/blob/3f5e0550a1c5cdfedcac88445a20a4d5de9cc373/scripts/materialize-fixture-links.mjs#L23-L35)
133
-
134
- **2. 新增旧 nested 图片支持只补了 context,入口选择和总预算仍不一致。**
135
-
136
- 已验证的代码事实:develop 在 context 内新增 `contentHasImageDeep()`,递归收集图片并处理 nested offloaded image;但 `src/adapter.ts` 没有任何变更,仍使用宿主的 `contentHasImage()` 决定图片模型校验和是否选择异步图片转换。官方 rc.2 的这个函数仅检查顶层;其 `requiredImageOffload()` / `projectOffloadedImages()` 也只遍历顶层。develop 的 `image-offload.ts` 只换了类型,仍把原始结构传给宿主 API。[deep 检测](https://github.com/vjcspy/dsh-opencode-go/blob/3f5e0550a1c5cdfedcac88445a20a4d5de9cc373/src/conversion/context.ts#L60-L75)、[adapter 分支选择](https://github.com/vjcspy/dsh-opencode-go/blob/3f5e0550a1c5cdfedcac88445a20a4d5de9cc373/src/adapter.ts#L269-L300)、[官方顶层检测](https://github.com/deepseek-ai/deepseek-harness/blob/477b4f420553e8a52c2fbccc464d7561b239c443/packages/llm/llm/src/content.ts#L126-L128)、[官方图片遍历与预算](https://github.com/deepseek-ai/deepseek-harness/blob/477b4f420553e8a52c2fbccc464d7561b239c443/packages/llm/llm/src/content.ts#L216-L333)
137
-
138
- 据上述控制流推导,在 rc.1 / rc.2 宿主接受原始旧嵌套历史的前提下:
139
-
140
- - 若所有图片都在旧 `tool-result` 块内部,adapter 判定没有图片,进入同步转换;新增 deep 检测随后报“需要附件服务”,即使实际上已配置服务也无法重放。它从静默丢图变成明确拒绝有价值,但不能称为完成了兼容。
141
- - 若还有一张顶层图片触发异步路径,context 会读出并发送嵌套图片,但宿主的总量检查漏计嵌套图片,因此可能超过 `maxRequestImageBytes`。已有 offloaded 标记的嵌套图片可由新增分支替换为文本,但这不解决未 offload 图片的预算问题。[同步拒绝](https://github.com/vjcspy/dsh-opencode-go/blob/3f5e0550a1c5cdfedcac88445a20a4d5de9cc373/src/conversion/context.ts#L257-L265)、[嵌套图片转换](https://github.com/vjcspy/dsh-opencode-go/blob/3f5e0550a1c5cdfedcac88445a20a4d5de9cc373/src/conversion/context.ts#L115-L152)、[图片预算桥接](https://github.com/vjcspy/dsh-opencode-go/blob/3f5e0550a1c5cdfedcac88445a20a4d5de9cc373/src/conversion/image-offload.ts#L25-L47)
142
-
143
- 这两个情形是静态控制流推断,本次未运行完整 develop,也未证明当前生产宿主会把这种历史原样交给插件。develop 自己的提交说明亦称相关 nested 分支在已发布宿主上不可达。若以后确需迁移旧历史,应明确规范化策略,覆盖 adapter 入口、tool 配对、图片预算、offload 协议和不可变历史,而不是只移植深层 helper。新增 legacy 测试仅验证同步文本 tool-result,没有覆盖上述混合图片场景。[develop 新增测试](https://github.com/vjcspy/dsh-opencode-go/blob/3f5e0550a1c5cdfedcac88445a20a4d5de9cc373/tests/conversion-context.spec.ts#L573-L618)
144
-
145
- ### develop 中值得单独借鉴的内容
146
-
147
- - **优先借鉴 settings fallback 的定向回归测试。** `tests/settings-compat.spec.ts` 检查旧服务注册、source / onChange 驱动路由、新服务优先 configure 三点,能防止以后升级开发类型时误删旧分支。上游无需为这些测试一起迁移依赖或改生产逻辑;迁入时补足 Context dispose,并保持现有真实宿主矩阵。[测试文件](https://github.com/vjcspy/dsh-opencode-go/blob/3f5e0550a1c5cdfedcac88445a20a4d5de9cc373/tests/settings-compat.spec.ts)
148
- - **新版 profile fixture 可以作为新增覆盖,不应替代旧文件存储测试。** develop 通过真实 Loader / Settings 加一个内存 config editor 验证 entry form 更新,思路合理;但它替换了现有旧 FileSettings 测试,且删掉“非法 baseURL 拒绝后 settings.yaml 原文仍为空”的磁盘断言。内存 fixture 无法证明持久化文件没有被改写。当前上游另有 profile compatibility fixture,新增前应先查重。[fixture](https://github.com/vjcspy/dsh-opencode-go/blob/3f5e0550a1c5cdfedcac88445a20a4d5de9cc373/tests/support/profile-fixture.ts)、[动态配置测试改动](https://github.com/vjcspy/dsh-opencode-go/commit/873ee67f4b4b0e8b7ac46572fd951db653b41d18)
149
- - **`NODE_ENV=test` 可按实际问题选择吸收。** 无条件在 Vitest 配置内设置 test 环境,是开发测试的稳定性调整,不改变发布运行时;fork 注释声称修复 production shell 影响 Vite 解析的问题,本次没有复现该场景,不能据此认定当前环境必需。[Vitest 配置](https://github.com/vjcspy/dsh-opencode-go/blob/3f5e0550a1c5cdfedcac88445a20a4d5de9cc373/vitest.config.ts#L1-L8)
150
- - **图标第三重 Medium fallback 当前收益很小。** 基线已有 Regular → 14,rc.2 包同时导出 Regular 与 Medium,所以现有目标宿主不需要走第三重兜底;develop 直接引用 `IconChevronDownOutlineMedium` 的类型也是为升级开发依赖服务,不能将这段源码机械复制回旧类型基线。[fork 图标适配](https://github.com/vjcspy/dsh-opencode-go/blob/3f5e0550a1c5cdfedcac88445a20a4d5de9cc373/src/client/Section.tsx#L22-L29)
151
-
152
- 最终建议:先吸收 PR #11 的单提交保护;单独提取 settings fallback 回归测试作为后续小改动;保留目前经过多代宿主验证的依赖与运行时适配。develop 的整套依赖迁移、postinstall、版本名和不完整图片历史兼容均不直接合入。
153
-
154
-
155
- ## 已经吸收或已被当前实现覆盖的工作
156
-
157
- - **liujwcn / PR #10**:`f3acbb8` 增加 rc.1 engine/peer 范围、fixture 和测试。PR 已关闭但没有 merge commit;应按当前代码覆盖情况判断。本项目 `8590c57` 已覆盖 rc.1,还增加 rc.2 和真实 Web/Headless bundle admission 测试,因此没有缺少的 rc.1 功能。[PR #10](https://github.com/Duskriver/dsh-opencode-go/pull/10) · [当前宿主矩阵](https://github.com/Duskriver/dsh-opencode-go/blob/8590c5752189658b60240b729666f814f12b27ff/tests/host-compatibility.spec.ts)
158
- - **RaulLazaro / PR #6**:对 deepseek、zai、qwen、qwen-chat-template 设置默认 effort,优先 high,否则最高非 off 档位。提交 `f4c919f` 已在 main 历史中;主线合并时还修正原代码回退选成最低档位的问题。当前的默认与显式档位验证已经覆盖各代宿主。[PR #6](https://github.com/Duskriver/dsh-opencode-go/pull/6) · [修正提交](https://github.com/Duskriver/dsh-opencode-go/commit/c371872) · [当前 adapter](https://github.com/Duskriver/dsh-opencode-go/blob/8590c5752189658b60240b729666f814f12b27ff/src/adapter.ts#L196)
159
- - **xwxYa / PR #5**:针对响应头缺失而收到原始 gzip/br/deflate 字节时 JSON 解析失败,加入安全读取/解压路径。PR 已合,分支 tip `13c3436` 是 main 祖先。当前主线改为显式请求 `accept-encoding: identity`,共享有大小上限的 JSON reader,并处理瞬时连接重置;旧手动解压猜测逻辑已被移除,不应再次搬回。[PR #5](https://github.com/Duskriver/dsh-opencode-go/pull/5) · [当前 JSON reader](https://github.com/Duskriver/dsh-opencode-go/blob/8590c5752189658b60240b729666f814f12b27ff/src/json-response.ts) · [主线验证记录](https://github.com/Duskriver/dsh-opencode-go/blob/8590c5752189658b60240b729666f814f12b27ff/docs/verification.md)
160
- - **nam278 / PR #3**:模型容量覆盖、搜索和重置 UI、保存/放弃流程已通过 `9d5cea7` 整合并保留贡献者署名。整合实现进一步限制显式输出预算、保留原始目录值和缓存、支持继承配置的 null 重置、避免异步混用配置;再 cherry-pick 原始版本会重复或削弱已有行为。[PR #3 关闭说明](https://github.com/Duskriver/dsh-opencode-go/pull/3#issuecomment-5774872925) · [整合提交](https://github.com/Duskriver/dsh-opencode-go/commit/9d5cea7f287e636283123b5abad1889fe6ec0797) · [容量回归测试](https://github.com/Duskriver/dsh-opencode-go/blob/8590c5752189658b60240b729666f814f12b27ff/tests/model-limits.spec.ts)
161
- - **OHeroJ**:唯一公开分支 `main` 指向 `acefef5`,是当前 main 的祖先,独有提交 0,落后 22 个提交;没有额外实现可吸收。[固定快照](https://github.com/OHeroJ/dsh-opencode-go/tree/acefef59422bde84b1b2cedc58680d86e262613e)
162
-
163
- ## 本次验证与范围
164
-
165
- - GitHub API 列出 8 个 fork / 14 个分支;在隔离 Git 仓库比较固定提交的祖先关系、独有提交和 diff,未更改当前仓库 remotes 或分支。
166
- - 当前 main 实际执行 `npm test`:Host/Client 类型检查、构建成功,**22 个测试文件、301 个测试通过**。仍有宿主 UI 包缺少 source map 的已有警告。
167
- - PR #11 在临时副本执行定向测试:基线 **22/22**,补丁后 **25/25**;Host/Client `tsc --noEmit` 均通过。未声称此次重跑了该 PR 的完整 304 项套件。
168
- - Guojing6 的 `7f699a4` 通过 `git apply --check`;本次没有复测作者代理网络的 13.7 秒下载,也未执行该 fork 的完整测试套件。
169
- - x6nux 的降级图片标记差异已做转换层运行对照;没有验证真实历史文件迁移、Windows UI 或付费模型请求。
170
-
171
- ## 分支快照清单
172
-
173
- 所有 ahead/behind 均相对固定上游 `8590c5752189658b60240b729666f814f12b27ff`,ahead 是 fork 独有提交数。
174
-
175
- | 仓库 | 分支 | Tip | ahead / behind |
176
- | --- | --- | --- | --- |
177
- | liujwcn | main | `f3acbb8f736809e1bd8e751bf03bb77972a71d4c` | 1 / 1 |
178
- | Guojing6 | main | `f65a04bd8b8e38e4edb1ff7474b3ad946ed3b271` | 0 / 1 |
179
- | Guojing6 | feat/dsh-0.1.7-rc1-host-drift | `7f699a4e5b91792fe5e72951a1229639a775bf2f` | 3 / 1 |
180
- | RaulLazaro | main | `7c2c6364b175deb0a58b22bdb5cea9887545a571` | 0 / 7 |
181
- | RaulLazaro | fix/default-reasoning-effort | `f4c919f60577213cf472e0ad556ba05d5f895863` | 0 / 6 |
182
- | xwxYa | main | `6bbe0b3f1df95506376cdda6577db91bd7e18e80` | 0 / 12 |
183
- | xwxYa | fix/handle-undecoded-compressed-json | `13c343641000b5e4a41e213db17fc8ce6d0585ce` | 0 / 8 |
184
- | OHeroJ | main | `acefef59422bde84b1b2cedc58680d86e262613e` | 0 / 22 |
185
- | nam278 | main | `293f01941c3fcde4e3cb3fced87a38f9c813e622` | 1 / 22 |
186
- | nam278 | feat/model-limits-ui | `293f01941c3fcde4e3cb3fced87a38f9c813e622` | 1 / 22 |
187
- | x6nux | main | `0d6e9af74bc654358197f5f5dd323a2e8c7b39ed` | 1 / 26 |
188
- | vjcspy | master | `8590c5752189658b60240b729666f814f12b27ff` | 0 / 0 |
189
- | vjcspy | develop | `3f5e0550a1c5cdfedcac88445a20a4d5de9cc373` | 6 / 0 |
190
- | vjcspy | feat/history-guards | `57646f55c57b7291b783ccf80f47acf6bc64e39b` | 1 / 0 |
191
-