dsh-lcx-codex 0.4.0 → 0.4.1

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,31 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.1 - 2026-08-25
4
+
5
+ ### Stable promotion
6
+
7
+ - Promote the fully QA-passed `0.4.1-pre.1` runtime to stable `0.4.1` with **zero functional/runtime code changes**.
8
+ - Make Alpha stateful continuation/fail-closed fixes, DSH compatibility-seam isolation, typed protocol hardening, conservative token budgeting, and the installed Settings lifecycle fix part of the default stable line.
9
+ - Publish stable `0.4.1` to npm dist-tag `latest`; the prior `prelatest=0.4.1-pre.1` remains historical prerelease state.
10
+
11
+ ### Validation basis
12
+
13
+ - `0.4.1-pre.1` passed Installed Candidate + Cross-feature QA before publication.
14
+ - Public promotion preserved runtime/source parity with the frozen prerelease candidate.
15
+ - Stable promotion requires package/version, typecheck, tests, schema, package/import boundary and zero-runtime-diff checks before publication.
16
+
17
+ ## 0.4.1-pre.1 - 2026-08-25
18
+
19
+ ### Released prerelease
20
+
21
+ - Published as `dsh-lcx-codex@0.4.1-pre.1` on npm dist-tag `prelatest`; stable `latest` remained `0.4.0` at prerelease publication time.
22
+ - Integrates the accepted Alpha stateful continuation and fail-closed capability work from #20, #21, and #22.
23
+ - Includes accepted compatibility seam isolation (#24), typed protocol-core hardening (#25), unified conservative token budgeting (#26), and the installed-plugin settings lifecycle fix (#36).
24
+ - Passed installed-candidate and cross-feature QA before publication, including ordinary/Advanced Hosted Search, Native compaction/replay, restart/resume, model continuation, fork isolation, and fail-closed Alpha behavior where unsupported.
25
+ - Public promotion preserved source/runtime parity with the frozen private candidate; package, schema, typecheck, import, install-chain, and publication gates passed.
26
+ - Post-release registry installation and Loader/client/settings-chain verification passed. The final provider-gated ordinary `web_search` recheck was not covered because the temporary authorized upstream credential returned HTTP 401; this was recorded as an external-auth verification gap rather than a package/source/runtime defect.
27
+ - Superseded as the recommended release by stable `0.4.1` after zero-functional-change promotion.
28
+
3
29
  ## 0.4.0 - 2026-08-23
4
30
 
5
31
  ### Stable promotion
@@ -76,6 +102,7 @@
76
102
  - Restore the Alpha capability/ref-store interfaces consumed by `lib/index.js`; the rc.8 release package could pass its unit tests but fail immediately at module import with missing `AlphaCapabilityStore` / `AlphaRefStore` exports.
77
103
  - Add package-entry import regression coverage so CI fails when the server entry point and internal module exports drift out of sync.
78
104
  - Restore Native-first pressure coordination for isolated agent presets using DSH 0.1.1-rc.2's public `agentPresets.serviceFor(agent, name)` resolver. Preset-local `compaction` / `toolResultPruner` services are not visible through ordinary host or `agent.ctx` lookup; the plugin now addresses the actual per-Agent instances before applying the 90% Native / 95% emergency policy. A root service-lifecycle hook remains for non-preset deployments.
105
+
79
106
  ## 0.4.0-rc.8
80
107
 
81
108
  - Rebase the plugin on DSH `0.1.1-rc.2`; older DSH releases are no longer a supported runtime target.
@@ -88,7 +115,7 @@
88
115
 
89
116
  ### Fixed
90
117
 
91
- - Ordinary DSH `web_search` now follows the active Agent `provider/model` instead of always using the plugin fallback GPT model. A Luna conversation now searches with Luna; a Sol conversation searches with Sol.
118
+ - Ordinary DSH `web_search` now follows the active Agent `provider/model` instead of always using the plugin fallback GPT model. A Luna conversation now searches with Luna; a Sol conversation now searches with Sol.
92
119
  - Added an AsyncLocalStorage route bridge at the DSH `tools/execute` boundary so the provider-only `ctx.web.search()` seam can receive Agent route context without changing the model-visible `web_search` schema.
93
120
  - Hosted Search now uses a separate stable `dsh-lcx-search:<route hash>` `prompt_cache_key`, avoiding intentional cache-key sharing with Native conversation replay.
94
121
  - The settings UI now labels the configured Responses endpoint/model as **fallback** values, matching their actual rc.7 role.
@@ -117,7 +144,7 @@
117
144
 
118
145
  - Adds a bounded conversation-fidelity layer after real DSH testing showed assistant-only facts could be lost by opaque Native V2 compaction.
119
146
  - New `lcx-native-compaction-v5` checkpoints retain selected user/developer/system messages plus user-visible assistant final answers before the opaque compaction item.
120
- - Keeps explicit retained history within an estimated 64k-token ceiling; defaults reserve at most 24k for assistant answers and cap one retained answer at about 3k tokens.
147
+ - Keeps explicit retained history within an estimated 64k-token ceiling; defaults reserve at most 24k for assistant answers and cap one retained assistant answer at about 3k tokens.
121
148
  - Does not copy reasoning, tool calls/results, raw search payloads, or telemetry into the fidelity prefix.
122
149
  - Repairs rc.3/rc.4 v4 checkpoints from append-only `shadowedSeqs`, including assistant-visible answers when the original DSH events still exist.
123
150
  - Stores only the single opaque compaction output item, ignoring unrelated terminal output items from nonstandard proxies.
package/README.md CHANGED
@@ -1,270 +1,225 @@
1
1
  <div align="center">
2
2
 
3
- <img src="https://raw.githubusercontent.com/kk3ya03-star/dsh-lcx-codex/main/assets/dsh-lcx-codex-banner.jpg" alt="DSH-LCX-CODEX" width="100%" />
3
+ <img src="assets/dsh-lcx-codex-banner.png" alt="dsh-lcx-codex — 为 DSH 增加 GPT Hosted Search、Codex 风格网页操作与 Native V2 Compaction" width="100%" />
4
4
 
5
- # DSH-LCX-CODEX
6
-
7
- **给 DeepSeek Harness 补上 GPT Responses / Codex 原生能力。**
8
-
9
- [![npm](https://img.shields.io/npm/v/dsh-lcx-codex?color=1677ff&label=npm)](https://www.npmjs.com/package/dsh-lcx-codex)
10
- ![Node](https://img.shields.io/badge/Node-%3E%3D20-1677ff)
5
+ [![npm](https://img.shields.io/npm/v/dsh-lcx-codex?color=1677ff&label=npm%20latest)](https://www.npmjs.com/package/dsh-lcx-codex)
6
+ [![CI](https://github.com/kk3ya03-star/dsh-lcx-codex/actions/workflows/publish.yml/badge.svg)](https://github.com/kk3ya03-star/dsh-lcx-codex/actions/workflows/publish.yml)
11
7
  ![DSH](https://img.shields.io/badge/DSH-0.1.1--rc.2-4ea8ff)
12
- ![License](https://img.shields.io/badge/license-MIT-1677ff)
8
+ ![Node](https://img.shields.io/badge/Node-%3E%3D20-2f855a)
9
+ ![License](https://img.shields.io/badge/license-MIT-6b7280)
13
10
 
14
- **简体中文** · [English](README_EN.md)
11
+ **简体中文** · [English](README_EN.md) · [Architecture](ARCHITECTURE.md) · [Changelog](CHANGELOG.md)
15
12
 
16
13
  </div>
17
14
 
18
- ---
19
-
20
- `dsh-lcx-codex` 是一个社区维护的 DSH 插件,面向已经通过 `llm-pi-ai / openai-responses` 接入的 GPT 路由。它尽量复用 DSH 自己的 Agent、Web、Session 和 Compaction 架构,只在缺少 OpenAI/Codex 原生语义的地方补能力。
21
-
22
- > `LCX` 只是项目名称。本项目不隶属于 OpenAI、DeepSeek、Sub2API 或 NewAPI。
23
-
24
- - **最新版 DSH 图片管线**:Native V2 直接复用 `readImageRequest()` 和当前路由图片预算,避免压缩请求与普通 GPT 请求使用不同的图片版本。
25
-
26
- ## 核心能力
27
-
28
- | 能力 | 说明 | 默认 |
29
- |---|---|---:|
30
- | **DSH 原生 `web_search` → GPT Hosted Search** | 不新增重复的普通搜索工具;rc.7+ 自动跟随当前 Agent 的 GPT Responses 模型 | 可开启 |
31
- | **Advanced Hosted Search** | 域名过滤、location、search context、图片搜索等 OpenAI Hosted 参数 | 关闭 |
32
- | **Alpha Search** | `search/open/find/click/screenshot` 等 Codex/Alpha 风格命令;能力探针通过后才注册 | 关闭 |
33
- | **Native Remote Compaction V2** | 通过 Responses `compaction_trigger` 获取 provider-native opaque checkpoint | 可开启 |
34
- | **Conversation fidelity retention** | 显式保留 bounded user / assistant 可见事实,避免只记得“问过什么”却忘记“答了什么” | 内置 |
35
- | **Session-native checkpoint** | checkpoint 存在 DSH append-only session log,不再以 sidecar 作为新会话真相源 | 内置 |
36
- | **Native-first 自动压缩** | 90% 主动 Native V2,95% emergency 才允许 DSH prune;阈值可调 | 可开启 |
37
- | **长搜索超时** | DSH `web_search` 外层 timeout 默认提升到 240 秒,可调 30–600 秒 | 内置 |
15
+ > **DSH 仍然是 host。LCX 只补齐 GPT Responses 路径缺失的原生能力,不修改 DSH 核心,也不替换 Agent / Session / Web / Compaction。**
38
16
 
39
- ## rc.8:面向 DSH 0.1.1-rc.2
17
+ ## 当前稳定版
40
18
 
41
- rc.8 直接面向 **DSH 0.1.1-rc.2**。普通 `web_search` 继续跟随当前 Agent 模型,同时 Native V2 的图片输入改用新版 DSH `readImageRequest()` 管线,不再直接读取 attachment master bytes。
19
+ `0.4.1` 是当前稳定版,也是此前完成完整 Installed Candidate / Cross-feature QA `0.4.1-pre.1` **zero-functional-change stable promotion**。
42
20
 
43
- 搜索路由仍通过 **DSH `tools/execute` → SearchProvider** 运行时上下文传递:
44
-
45
- ```text
46
- Agent: lcx / gpt-5.6-luna
47
-
48
- └─ DSH web_search
49
-
50
- └─ Hosted Search: lcx / gpt-5.6-luna
51
-
52
- Agent: lcx / gpt-5.6-sol
53
-
54
- └─ DSH web_search
55
-
56
- └─ Hosted Search: lcx / gpt-5.6-sol
21
+ ```powershell
22
+ dsh plugin --profile web add dsh-lcx-codex
23
+ dsh web
57
24
  ```
58
25
 
59
- 这不会修改模型看到的 `web_search` schema。
26
+ npm `latest` 指向 `0.4.1`。历史 `prelatest=0.4.1-pre.1` 与稳定版使用相同的已验收 runtime 基线;新用户直接使用 `latest` 即可。
60
27
 
61
- 没有 Agent 上下文时,才使用设置页里的 **回退 Responses 地址 / 回退 GPT 模型**。
28
+ ## 它解决什么
62
29
 
63
- ### Search 与会话缓存隔离
30
+ 如果你的 DSH 已经有一个可工作的 GPT `openai-responses` route,`dsh-lcx-codex` 会在保持 DSH 原有入口和生命周期的前提下补齐 Responses 能力。
64
31
 
65
- Hosted Search 是一笔独立 Responses 请求,不等于主会话推理。rc.8 继续给搜索使用独立 cache namespace:
32
+ | 场景 | DSH 原有入口 | LCX 增强后 |
33
+ |---|---|---|
34
+ | 普通联网搜索 | DSH `web_search` | **仍然使用同一个 `web_search`**,由 LCX SearchProvider 映射到当前 GPT Hosted Search |
35
+ | Hosted Search 高级参数 | 普通搜索入口保持简洁 | 按需增加 `websearch_gpt_advanced`,提供域名过滤、近似位置、search context、图片搜索等 |
36
+ | 连续网页 / PDF 浏览 | DSH 继续拥有 Web 生命周期 | 按需增加 Codex / Alpha Web Actions:`search → open → find/click → screenshot` |
37
+ | 长会话压缩 | DSH 继续负责 pressure、事务与 recovery | 在现有 compaction seam 上优先请求 Responses Native V2 checkpoint |
66
38
 
67
- ```text
68
- 主会话 replay: dsh-lcx:<route hash>
69
- Hosted Search: dsh-lcx-search:<route hash>
70
- ```
39
+ **目标不是再造一套 Agent,而是让 DSH 的 GPT route 用上它本来就应该拥有的原生能力。**
40
+
41
+ ## 三大能力
71
42
 
72
- 因此搜索不会故意与 Native replay 共用同一个 `prompt_cache_key`。NewAPI 后台仍可能看到搜索请求夹在主会话请求之间;它们是不同请求,搜索行本身 cache 较低并不代表 DSH session 被截断。
43
+ ### 1. GPT Hosted Search:普通搜索不换入口
73
44
 
74
- ## Native V2 Compaction
45
+ 启用后,模型看到的普通搜索工具依然是 DSH 原生 `web_search`。LCX 替换的是 SearchProvider 路径,而不是再注册一个重复的普通搜索工具。
75
46
 
76
- DSH 本身已经负责:
47
+ 需要更细控制时,再单独启用 `websearch_gpt_advanced`。
77
48
 
78
- - token pressure;
79
- - compactable range selection;
80
- - tool-result pruning;
81
- - durable session transaction;
82
- - `/compact`;
83
- - context-overflow recovery。
49
+ ### 2. Codex 风格 Web Actions
84
50
 
85
- 本插件不再造第二套 compaction engine,而是在 DSH 的 `purpose: 'compaction'` LLM seam 上执行 Native V2
51
+ `websearch_alpha` 面向连续浏览和结构化 Web action
86
52
 
87
53
  ```text
88
- DSH compaction transaction
89
-
90
- └─ purpose=compaction
91
-
92
- └─ POST /responses
93
- x-codex-beta-features: remote_compaction_v2
94
- input: [...history, { type: "compaction_trigger" }]
54
+ search open → find / click → screenshot
95
55
  ```
96
56
 
97
- Native 成功:不再额外运行 basic summary。
98
-
99
- Native 失败且开启 fallback:才回到 DSH basic compaction。
57
+ 它默认关闭,并且只有当前 endpoint / provider / model / schema 通过 capability probe 后才注册。未知部署采用 **fail-closed**,不会被误报成“支持 Alpha”。
100
58
 
101
- ## 为什么压缩后还能记住模型自己说过的话
59
+ `0.4.1` 已包含此前 prerelease 验收通过的 URL/stateful continuation 和 capability fail-closed 修复。
102
60
 
103
- 单纯依赖 provider-native opaque compaction 是有损的。真实长会话测试发现,低显著性的 assistant-only 事实可能被压掉,例如:
61
+ ### 3. Native V2 Compaction
104
62
 
105
- - 模型随机生成的项目代号;
106
- - 搜索后模型给出的具体姓名;
107
- - 只在 assistant 最终回答里出现的数字。
63
+ LCX 不创建第二套 compaction engine。DSH 仍然拥有 pressure、compactable range、`/compact`、durable session transaction、tool-result pruning 与 overflow recovery;LCX 只在已有 compaction LLM seam 上请求 Responses Native V2。
108
64
 
109
- 因此当前 checkpoint 使用:
65
+ 默认自动策略:
110
66
 
111
67
  ```text
112
- bounded client-visible history
113
- + bounded assistant-visible answers
114
- + opaque Native V2 compaction item
68
+ 0% ─────────────────── 90% ───── 95% ───── 100%
69
+ normal Native emergency hard cap
70
+ V2 DSH prune
115
71
  ```
116
72
 
117
- 默认总 explicit retention 预算约 `64k` estimated tokens,其中 assistant-visible answer 最多预留约 `24k`,单条默认最多约 `3k`。不把 reasoning、巨大 tool result、完整搜索正文和运行 telemetry 全塞回来。
118
-
119
- 目标不是“逐字无损”,而是:**删过程,保事实。**
120
-
121
- ## 自动压缩策略
73
+ - **90%**:优先尝试 Native V2。
74
+ - **95%**:才允许 emergency DSH prune。
75
+ - provider-confirmed context overflow:继续使用 DSH 原有恢复逻辑。
76
+ - 手动 `/compact`:继续使用 DSH 原生会话事务。
122
77
 
123
- rc.8 延续 rc.6 Native-first pressure policy:
78
+ 同一 source session 可以继续复用自己的 Native checkpoint;fork 或模型/route migration 不会跨 session 发送 parent opaque state,而是走 portable migration;重启后从 DSH session log 恢复。
124
79
 
125
- ```text
126
- 0% ─────────────────── 90% ───── 95% ───── 100%
127
- 正常使用 Native emergency hard cap
128
- V2 DSH prune
129
- ```
80
+ ## 0.4.1 相比 0.4.0
130
81
 
131
- 默认:
82
+ `0.4.1` 将此前 `0.4.1-pre.1` 的已验收改动正式提升到 stable:
132
83
 
133
- - `< 90%`:不让 DSH 原来的 80% pressure prune 提前改写历史;
134
- - `90%–95%`:优先 Native V2;
135
- - `>= 95%`:允许 DSH replay-safe tool-result pruner 救场;
136
- - provider 明确返回 context overflow:仍保留 DSH 原生 recovery
137
- - 手动 `/compact`:不受阈值影响。
84
+ - Alpha URL/stateful continuation capability fail-closed 修复;
85
+ - DSH compatibility seam 收敛;
86
+ - route / Native V2 / checkpoint typed protocol core;
87
+ - Native retention portable migration 的统一保守 token budgeting
88
+ - 正式安装态 settings namespace / configuration card lifecycle 修复;
89
+ - Installed Candidate + Cross-feature QA。
138
90
 
139
- 阈值可在插件设置页调整。
91
+ 该 stable promotion 不引入新的 runtime 行为。
140
92
 
141
- ## 关于“缓存突然断了”
93
+ ## 30 秒开始使用
142
94
 
143
- 需要区分两件事:
95
+ ### 1. 安装
144
96
 
145
- ```text
146
- cacheRead = 0
147
-
148
- 会话历史被删除
97
+ ```powershell
98
+ dsh plugin --profile web add dsh-lcx-codex
99
+ dsh web
149
100
  ```
150
101
 
151
- 在真实 NewAPI 日志里,出现过:
102
+ 需要固定版本时:
152
103
 
153
- ```text
154
- 某轮:155k uncached / cacheRead 0
155
- 下一轮:~1k new input / ~155k cacheRead
104
+ ```powershell
105
+ dsh plugin --profile web add dsh-lcx-codex@0.4.1
156
106
  ```
157
107
 
158
- 这说明上一轮只是 provider prompt-cache miss / eviction,完整上下文仍被重新发送,并没有发生 session compaction surface replacement。
159
-
160
- 真正会主动改变历史前缀的主要情况是:
161
-
162
- 1. `/compact` / 自动 Native compaction;
163
- 2. emergency tool-result pruning;
164
- 3. 换模型 / provider / baseURL;
165
- 4. DSH 自己发生其他 surface replacement。
166
-
167
- DSH 重启、长时间 idle、上游 cache TTL/eviction 也可能造成某一轮重新建 cache;插件无法保证第三方网关永不 evict KV cache。
108
+ 升级时请使用 DSH 官方 plugin remove/add 路径;不要为了“清理”删除用户 session 或 `$DSH_HOME/storages/lcx-codex/`。
168
109
 
169
- ## 搜索分层
110
+ ### 2. 在 DSH Settings 启用
170
111
 
171
- ### 1. 普通搜索:`web_search`
112
+ 第一次使用建议从最小配置开始:
172
113
 
173
- 推荐默认使用。rc.8 会跟随当前 Agent GPT Responses route。
114
+ | 设置 | 建议 |
115
+ |---|---:|
116
+ | Enable plugin | **On** |
117
+ | Use GPT Hosted Search | 需要 GPT Hosted Search 时 **On** |
118
+ | Advanced Hosted Search | **Off**,需要高级参数再开 |
119
+ | Alpha Search | **Off**,确认当前 route 支持后再开 |
120
+ | Native V2 remote compaction | 上游实际支持 Native V2 时 **On** |
121
+ | Native-first auto compaction | 使用 Native V2 时 **On** |
174
122
 
175
- ### 2. 高级 Hosted:`websearch_gpt_advanced`
123
+ **前提条件**
176
124
 
177
- 仅在需要这些参数时开启:
178
-
179
- - allowed / blocked domains;
180
- - approximate user location;
181
- - `search_context_size`;
182
- - image search;
183
- - external web access;
184
- - return token budget。
185
-
186
- 开启/关闭额外工具会改变 tool catalog,因此默认关闭以保持主会话 request schema 稳定。
125
+ - Node.js `>=20`
126
+ - DSH 中已有可工作的 GPT `openai-responses` route
127
+ - 上游 endpoint 实际支持你准备启用的 Hosted Search / Native V2 / Alpha 能力
187
128
 
188
- ### 3. Alpha:`websearch_alpha`
129
+ ### 3. 确认它真的生效
189
130
 
190
- 面向 stateful Codex/Alpha 风格搜索:`search/open/find/click/screenshot` 等。只有 capability probe 与当前 endpoint/provider/model/schema 匹配后才注册。
131
+ | 能力 | 应看到什么 |
132
+ |---|---|
133
+ | GPT Hosted Search | 普通工具入口仍是 DSH `web_search`,实际请求走当前 GPT Responses route |
134
+ | Advanced Hosted | 启用后出现 `websearch_gpt_advanced` |
135
+ | Alpha Web Actions | 只有 capability probe 通过时才出现 `websearch_alpha` |
136
+ | Native V2 | compact 时出现 provider-native checkpoint 路径;普通 Basic Compaction 不会被伪装成 Native V2 成功 |
191
137
 
192
- ## 安装
138
+ ## 搜索工具怎么选
193
139
 
194
- ### npm
140
+ | 你要做什么 | 使用入口 | 适合场景 |
141
+ |---|---|---|
142
+ | 普通联网搜索 | DSH `web_search` | 找资料、查网页、一般检索 |
143
+ | 控制 Hosted Search 参数 | `websearch_gpt_advanced` | 域名 allow/block、近似位置、search context、图片搜索等 |
144
+ | 连续浏览网页或 PDF | `websearch_alpha` | `search/open/find/click/screenshot` 与结构化 Web actions |
195
145
 
196
- 稳定版:
146
+ ## 它如何接入 DSH
197
147
 
198
- ```powershell
199
- dsh plugin --profile web add dsh-lcx-codex
148
+ ```text
149
+ DSH Agent / Session / Web
150
+ ├─ web_search ──────────> LCX SearchProvider ──> GPT Hosted Search
151
+ ├─ Advanced / Alpha ────> LCX Web tools ───────> GPT Web actions
152
+ └─ compact / replay ────> LCX Native bridge ───> Responses Native V2
200
153
  ```
201
154
 
202
- 预发布版(当前 rc.8):
155
+ **DSH 是 host,LCX 是兼容扩展层。** 插件优先复用当前 DSH route 的 `baseURL`、credential reference、headers、模型与 retry policy,而不是维护第二套账号配置。
203
156
 
204
- ```powershell
205
- dsh plugin --profile web add dsh-lcx-codex@next
206
- ```
157
+ checkpoint、canonical replay、Pi serializer、cache identity、fork safety 与 pressure coordination 等实现细节见 [ARCHITECTURE.md](ARCHITECTURE.md)。
207
158
 
208
- ### 本地 RC
159
+ ## 兼容性
209
160
 
210
- ```powershell
211
- dsh plugin --profile web remove dsh-lcx-codex
212
- dsh plugin --profile web add .\dsh-lcx-codex-0.4.0.tgz
213
- dsh web
214
- ```
161
+ 当前正式稳定组合:
215
162
 
216
- 不要为了升级删除 `$DSH_HOME/storages/lcx-codex/` 或旧 session。v3 sidecar 仍作为只读旧会话兼容层。
163
+ | Plugin | DSH | DSH host Pi | Plugin Pi | 状态 |
164
+ |---|---|---|---|---|
165
+ | `0.4.1` | `0.1.1-rc.2` | `0.82.1` | `0.82.1` | **VERIFIED STABLE** |
217
166
 
218
- ## 推荐设置
167
+ `0.4.1` 的 runtime 来自完整 QA 通过的 `0.4.1-pre.1`,stable promotion 本身保持 zero-functional-change。新的 DSH 版本**不会自动视为兼容**;项目会先检查受影响 seam,再按风险运行对应测试。
219
168
 
220
- ```text
221
- Enable plugin ✅
222
- Use GPT Hosted Search ✅
223
- Advanced Hosted Search ❌
224
- Alpha Search ❌
225
-
226
- Native V2 remote compaction ✅
227
- Native-first auto compaction ✅
228
- Native threshold 90%
229
- Emergency DSH prune 95%
230
- web_search timeout 240s
231
- ```
169
+ <details>
170
+ <summary><strong>完整推荐设置</strong></summary>
232
171
 
233
- 调试 Native 时可以先关闭 fallback;稳定使用时是否开启 fallback 由你决定。
172
+ | 设置 | 推荐值 | 说明 |
173
+ |---|---:|---|
174
+ | Enable plugin | On | 启用插件 |
175
+ | Use GPT Hosted Search | 按需 | 让 DSH `web_search` 走 GPT Hosted Search |
176
+ | Advanced Hosted Search | Off | 需要高级 Hosted 参数时再开 |
177
+ | Alpha Search | Off | capability 验证后再开 |
178
+ | Native V2 remote compaction | On* | *上游 route 实际支持 Native V2 时 |
179
+ | Native-first auto compaction | On | 启用自动 pressure 策略 |
180
+ | Native threshold | 90% | 90% 开始优先 Native V2 |
181
+ | Emergency DSH prune | 95% | 95% 才允许 emergency prune |
182
+ | `web_search` timeout | 240 s | 避免长搜索被过早终止 |
234
183
 
235
- ## 部署要求
184
+ 主要配置字段:`remoteCompaction`、`autoCompaction`、`fallbackToBasicCompaction`、`autoCompactionThresholdPercent`、`emergencyPruneThresholdPercent`、`webSearchTimeoutSeconds`、`advancedHostedSearch`、`alphaSearch`。
236
185
 
237
- - Node.js `>=20`
238
- - DSH `0.1.1-rc.2`
239
- - DSH 中已经能正常使用的 GPT `openai-responses` route
240
- - upstream 实际支持你启用的 Hosted Search / Native V2 / Alpha 能力
186
+ </details>
241
187
 
242
- 典型路径:
188
+ <details>
189
+ <summary><strong>常见情况</strong></summary>
243
190
 
244
- ```text
245
- DSH llm-pi-ai/openai-responses → Sub2API
246
- DSH → llm-pi-ai/openai-responses → NewAPI → upstream
247
- ```
191
+ **`web_search` 没走 GPT Hosted Search**
192
+ 确认插件和 Hosted Search 已启用,并且当前 Agent 能解析到兼容的 GPT `openai-responses` route。
248
193
 
249
- 插件优先复用 DSH route 的 `baseURL`、credential reference、headers 和 retry policy。
194
+ **`websearch_alpha` 没出现**
195
+ 这是预期的 fail-closed 行为。Alpha 必须对当前 route/schema 完成可信 capability probe 后才注册。
250
196
 
251
- ## 发布通道
197
+ **Native V2 没有生效**
198
+ 确认当前 GPT Responses endpoint 实际支持 `remote_compaction_v2`。插件不会把普通 Basic Compaction 假装成 Native V2 成功。
252
199
 
253
- - npm stable:正式稳定版本
254
- - npm `next`:`0.4.0-rc.*` 预发布测试版本
200
+ **安装成功但配置卡不可见**
201
+ 确认安装的是 `0.4.1` 或更高版本,并重启/刷新 DSH Web;`0.4.1` 已包含正式安装态 settings lifecycle 修复。
255
202
 
256
- GitHub tag 与 `package.json` version 必须一致;Trusted Publishing workflow 会先跑测试再发布。
203
+ </details>
257
204
 
258
- ## 开发
205
+ <details>
206
+ <summary><strong>开发</strong></summary>
259
207
 
260
208
  ```bash
209
+ npm run typecheck
261
210
  npm test
262
211
  npm run test:schema
263
212
  npm pack --ignore-scripts
264
213
  ```
265
214
 
266
- 关键设计说明见 [ARCHITECTURE.md](ARCHITECTURE.md),完整版本记录见 [CHANGELOG.md](CHANGELOG.md)。
215
+ - 设计与协议细节:[ARCHITECTURE.md](ARCHITECTURE.md)
216
+ - 版本变化:[CHANGELOG.md](CHANGELOG.md)
217
+ - npm:[`dsh-lcx-codex`](https://www.npmjs.com/package/dsh-lcx-codex)
218
+
219
+ </details>
267
220
 
268
221
  ## License
269
222
 
270
223
  MIT
224
+
225
+ > `LCX` 只是项目名称。本项目是社区项目,不隶属于 OpenAI、DeepSeek、Sub2API 或 NewAPI。