dsh-lcx-codex 0.4.3-pre.3 → 0.4.3-pre.4

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.md CHANGED
@@ -20,12 +20,12 @@ LCX Codex 是 [DeepSeek Harness](https://github.com/deepseek-ai/DeepSeek-Harness
20
20
 
21
21
  ## 安装
22
22
 
23
- 本页对应 **`0.4.3-pre.3` 预发布版**,适配 **DSH `0.1.3-alpha.2`**。稳定版仍为 `0.4.2`,使用旧版 DSH `0.1.1-rc.2` 的用户请看[稳定版说明](https://github.com/kk3ya03-star/dsh-lcx-codex/blob/v0.4.2/README.md)。
23
+ 本页对应 **`0.4.3-pre.4` 预发布版**,适配 **DSH `0.1.3-alpha.2`**。稳定版仍为 `0.4.2`,使用旧版 DSH `0.1.1-rc.2` 的用户请看[稳定版说明](https://github.com/kk3ya03-star/dsh-lcx-codex/blob/v0.4.2/README.md)。
24
24
 
25
25
  安装前,请确认 DSH Web 能正常启动,并已配置需要使用的 GPT Responses 或 Grok Responses API 路由。Node.js 要求 `^22.19.0 || >=24.0.0`;Windows 启动出现 `fs-ext` 报错时,先看下方[故障排查](#故障排查)。
26
26
 
27
27
  ```sh
28
- dsh plugin --profile web add dsh-lcx-codex@0.4.3-pre.3
28
+ dsh plugin --profile web add dsh-lcx-codex@0.4.3-pre.4
29
29
  dsh web
30
30
  ```
31
31
 
@@ -124,6 +124,31 @@ DSH `0.1.3-alpha.2` 会在启动时加载 `fs-ext`,即使 Windows 实际不使
124
124
 
125
125
  本版 Windows 实测使用了一个最小 DSH 修正:仅在非 Windows 平台加载 `fs-ext`,保留原有 Win32 会话锁。插件不会自动修改 DSH;未经该修正的 Windows 环境不保证能启动。不要用关闭会话锁来绕过问题。
126
126
 
127
+
128
+ 具体处理方法(仅适用于 `@deepseek-ai/dsh-session-persistence-jsonl@0.1.3-alpha.2`):
129
+
130
+ 1. 先停止正在运行的 DSH,并从错误堆栈找到实际加载的 `@deepseek-ai/dsh-session-persistence-jsonl/lib/index.js`。不要修改其他 Node 安装或其他 DSH 副本。全局安装通常在 `npm root -g` 返回目录中的 DSH 依赖树内;以堆栈的绝对路径为准。
131
+ 2. 检查该包相邻的 `package.json`,确认版本为 `0.1.3-alpha.2`,并把 `lib/index.js` 复制为 `lib/index.js.before-win32-fs-ext.bak`;备份已存在时保留它。
132
+ 3. 用编辑器将下面唯一一行:
133
+
134
+ ```js
135
+ import { flock } from "fs-ext";
136
+ ```
137
+
138
+ 替换为:
139
+
140
+ ```js
141
+ const flock = process.platform === "win32"
142
+ ? undefined
143
+ : (await import("fs-ext")).flock;
144
+ ```
145
+
146
+ 只改模块加载这一处,保留其余代码和 Win32 会话锁。如果版本或原始行不符,请停止套用此修正。
147
+ 4. 保存后重新运行 `dsh web`,新建会话并发送一条消息,确认启动和会话写入正常。此修正不保证解决其他启动错误。
148
+ 5. 恢复时先停止 DSH,再用备份覆盖 `index.js`。重新安装或升级 DSH 可能覆盖此本地修改;不要把这个旧版本修正直接套到新版本。
149
+
150
+ 这是一项用户自行选择的 DSH 本地兼容修正,不是插件安装步骤自动执行的补丁。项目的 Windows 验证使用的正是上述加载方式。
151
+
127
152
  **安装后没有变化?**
128
153
 
129
154
  检查安装和启动是否使用同一个 `web` 配置,并确认对应模型的开关已保存。GPT 主开关与 Grok Web/X 开关彼此独立。
@@ -136,9 +161,11 @@ DSH `0.1.3-alpha.2` 会在启动时加载 `fs-ext`,即使 Windows 实际不使
136
161
 
137
162
  本版使用 DSH `0.1.3-alpha.2`、DSH host Pi `0.85.1` 和插件 Pi `0.85.1`。插件单独声明 Pi 依赖,不替换 DSH 的依赖。
138
163
 
139
- 发布前完整测试为 **237/237 PASS**,strict host/client typecheck 与 4 个 DSH schema 均通过。真实运行覆盖 GPT Hosted/Native V2 回归、DeepSeek 原生 DSH 搜索回归,以及 Grok 4.5/4.6 原生 Web/X Search、Web/X → 本地 `read` → continuation、provider-native replay、完整 DSH 重启后的续聊、Grok 父/子代理 session/cache 隔离。GPT 已验证的父 cache-sharing 策略保持不变。
164
+ 本版两项展示修复已通过流式/非流式和冷恢复回归;以下真实运行覆盖继承自 pre.3,不代表重新执行了全部在线测试。
165
+
166
+ 发布前完整测试为 **243/243 PASS**,strict host/client typecheck 与 4 个 DSH schema 均通过。真实运行覆盖 GPT Hosted/Native V2 回归、DeepSeek 原生 DSH 搜索回归,以及 Grok 4.5/4.6 原生 Web/X Search、Web/X → 本地 `read` → continuation、provider-native replay、完整 DSH 重启后的续聊、Grok 父/子代理 session/cache 隔离。GPT 已验证的父 cache-sharing 策略保持不变。
140
167
 
141
- 仍需保留的预发布限制:Windows DSH `0.1.3-alpha.2` 的 `fs-ext` 启动问题需要文档中的最小 host loading 修正;Alpha 引用及 screenshot 展示、代理/NO_PROXY、更广的并发/取消和后台 continuable subagent 矩阵仍未全面覆盖;Grok OAuth 不支持,citation 渲染仍可能受上游网关格式影响。详细变更见 [v0.4.3-pre.3 发布说明](https://github.com/kk3ya03-star/dsh-lcx-codex/releases/tag/v0.4.3-pre.3)。
168
+ 仍需保留的预发布限制:Windows DSH `0.1.3-alpha.2` 的 `fs-ext` 启动问题需要文档中的最小 host loading 修正;Alpha 引用及 screenshot 展示、代理/NO_PROXY、更广的并发/取消和后台 continuable subagent 矩阵仍未全面覆盖;Grok OAuth 不支持,citation 渲染仍可能受上游网关格式影响。详细变更见 [v0.4.3-pre.4 发布说明](https://github.com/kk3ya03-star/dsh-lcx-codex/releases/tag/v0.4.3-pre.4)。
142
169
 
143
170
  ## 开发与反馈
144
171
 
@@ -272,10 +272,12 @@ function replayForMessage(message, route) {
272
272
  anchors.push(item);
273
273
  blockIndex += 1;
274
274
  }
275
- else if (!(item.type === "reasoning" && (reasoningCounts.get(String(item.id)) ?? 0) > 1)) {
275
+ else if (!(item.type === "reasoning" &&
276
+ (!itemText(item).trim() || (reasoningCounts.get(String(item.id)) ?? 0) > 1))) {
276
277
  return undefined;
277
278
  }
278
279
  }
280
+ // Empty Grok reasoning has no UI block; older histories can still contain it.
279
281
  // Pi can coalesce repeated reasoning IDs in terminal-only gateway responses.
280
282
  // Match every provider-visible DSH block and only the hashed LCX additions.
281
283
  if (anchors.length === 0)
@@ -605,11 +605,7 @@ async function* normalizedResponseEvents(source, meta = {}, options = {}) {
605
605
  observeCitation(annotation);
606
606
  }
607
607
  }
608
- if (item.type === "web_search_call" &&
609
- isObject(item.action) &&
610
- Array.isArray(item.action.sources))
611
- for (const source of item.action.sources)
612
- observeCitation(source);
608
+ // Search candidates are not answer citations. Only output_text annotations qualify.
613
609
  };
614
610
  const isServerToolItem = (value) => isObject(value) && options.serverToolTypes?.has(String(value.type ?? "")) === true;
615
611
  const observeServerTool = (item) => {
@@ -643,10 +639,6 @@ async function* normalizedResponseEvents(source, meta = {}, options = {}) {
643
639
  const index = Number.isInteger(event.output_index)
644
640
  ? Number(event.output_index)
645
641
  : 0;
646
- if ((event.type === "response.output_item.added" ||
647
- event.type === "response.output_item.done") &&
648
- isObject(event.item))
649
- observeCitations(event.item);
650
642
  if (event.type === "response.output_item.done" && isObject(event.item))
651
643
  completedWireItems.set(index, structuredClone(event.item));
652
644
  if ((event.type === "response.output_item.added" ||
@@ -655,6 +647,13 @@ async function* normalizedResponseEvents(source, meta = {}, options = {}) {
655
647
  observeServerTool(event.item);
656
648
  continue;
657
649
  }
650
+ // Grok may send many encrypted reasoning items with no visible summary.
651
+ // Keep them in completedWireItems/nativeOutput, but do not open empty UI blocks.
652
+ if (options.serverToolTypes &&
653
+ (event.type === "response.output_item.added" || event.type === "response.output_item.done") &&
654
+ isObject(event.item) && event.item.type === "reasoning" &&
655
+ !itemText(event.item).trim() && !open.get(index)?.text.trim())
656
+ continue;
658
657
  if (event.type === "response.output_item.added" && isObject(event.item)) {
659
658
  const item = normalizedTerminalItem(event.item, index);
660
659
  open.set(index, { kind: itemKind(item), item, text: itemText(item) });
@@ -684,6 +683,8 @@ async function* normalizedResponseEvents(source, meta = {}, options = {}) {
684
683
  }
685
684
  if (event.type === "response.reasoning_summary_text.delta" ||
686
685
  event.type === "response.reasoning_text.delta") {
686
+ if (options.serverToolTypes && !open.has(index) && !String(event.delta ?? "").trim())
687
+ continue;
687
688
  let record = open.get(index);
688
689
  if (!record) {
689
690
  const item = {
@@ -783,6 +784,8 @@ async function* normalizedResponseEvents(source, meta = {}, options = {}) {
783
784
  }
784
785
  const output = terminalOutput
785
786
  .filter((item) => !isServerToolItem(item))
787
+ .filter((item) => !(options.serverToolTypes && isObject(item) &&
788
+ item.type === "reasoning" && !itemText(item).trim()))
786
789
  .map((item, terminalIndex) => isObject(item)
787
790
  ? normalizedTerminalItem(item, terminalIndex)
788
791
  : item);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-lcx-codex",
3
- "version": "0.4.3-pre.3",
4
- "description": "DSH GPT Responses lifecycle owner with Native V2 compaction/replay and Hosted/Alpha Search capabilities",
3
+ "version": "0.4.3-pre.4",
4
+ "description": "Model-scoped DSH plugin: GPT Responses lifecycle, Native V2 compaction and Hosted/Alpha Search; Grok native Web/X Search",
5
5
  "keywords": [
6
6
  "deepseek-harness",
7
7
  "dsh",
@@ -11,7 +11,10 @@
11
11
  "openai-responses",
12
12
  "sub2api",
13
13
  "newapi",
14
- "compaction"
14
+ "compaction",
15
+ "grok",
16
+ "xai",
17
+ "x-search"
15
18
  ],
16
19
  "repository": {
17
20
  "type": "git",