dsh-lcx-codex 0.4.2 → 0.4.3-pre.2
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 +116 -202
- package/cordis.patch.yml +3 -20
- package/lib/client.js +273 -146
- package/lib/compact-v2.js +218 -199
- package/lib/dsh-compat.js +227 -100
- package/lib/dsh-responses.js +445 -277
- package/lib/index.js +851 -757
- package/lib/json-store.js +50 -31
- package/lib/native-checkpoint.js +520 -194
- package/lib/responses-request.js +106 -121
- package/lib/responses-stream.js +972 -443
- package/lib/route.js +229 -355
- package/lib/service-mutex.js +73 -64
- package/lib/token-budget.js +176 -108
- package/lib/transport.js +277 -67
- package/lib/types/client/index.d.ts +6 -0
- package/lib/types/compact-v2.d.ts +104 -0
- package/lib/types/dsh-compat.d.ts +78 -0
- package/lib/types/dsh-responses.d.ts +82 -0
- package/lib/types/index.d.ts +83 -0
- package/lib/types/json-store.d.ts +10 -0
- package/lib/types/native-checkpoint.d.ts +213 -0
- package/lib/types/responses-request.d.ts +58 -0
- package/lib/types/responses-stream.d.ts +51 -0
- package/lib/types/route.d.ts +132 -0
- package/lib/types/service-mutex.d.ts +14 -0
- package/lib/types/token-budget.d.ts +50 -0
- package/lib/types/transport.d.ts +20 -0
- package/lib/types/web-run-output.d.ts +29 -0
- package/lib/types/web-search-alpha.d.ts +286 -0
- package/lib/types/web-search-capability.d.ts +26 -0
- package/lib/types/web-search-hosted.d.ts +246 -0
- package/lib/types/web-search-ref-store.d.ts +22 -0
- package/lib/web-run-output.js +167 -18
- package/lib/web-search-alpha.js +865 -163
- package/lib/web-search-capability.js +55 -65
- package/lib/web-search-hosted.js +210 -32
- package/lib/web-search-ref-store.js +63 -59
- package/package.json +79 -27
- package/ARCHITECTURE.md +0 -117
- package/CHANGELOG.md +0 -224
- package/README_EN.md +0 -277
- package/assets/dsh-lcx-codex-banner.jpg +0 -0
- package/lib/legacy-v3.js +0 -20
- package/lib/responses-replay.js +0 -68
- package/scripts/probe-alpha.mjs +0 -43
- package/scripts/validate-dsh-schema.mjs +0 -31
package/README.md
CHANGED
|
@@ -1,277 +1,191 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[](https://github.com/kk3ya03-star/dsh-lcx-codex/actions/workflows/publish.yml)
|
|
5
|
-

|
|
6
|
-

|
|
7
|
-

|
|
8
|
-

|
|
3
|
+
<img src="https://raw.githubusercontent.com/kk3ya03-star/dsh-lcx-codex/main/assets/dsh-lcx-codex-banner.svg" alt="LCX Codex" width="100%" />
|
|
9
4
|
|
|
10
|
-
|
|
5
|
+
# LCX Codex
|
|
11
6
|
|
|
12
|
-
|
|
7
|
+
**让 DeepSeek Harness 中的 GPT 会话支持原生压缩、联网搜索与连续网页操作。**
|
|
13
8
|
|
|
14
|
-
|
|
9
|
+
[](https://www.npmjs.com/package/dsh-lcx-codex)
|
|
10
|
+
[](#兼容性与限制)
|
|
11
|
+
[](LICENSE)
|
|
15
12
|
|
|
16
|
-
|
|
13
|
+
**简体中文** · [English](README_EN.md) · [版本发布](https://github.com/kk3ya03-star/dsh-lcx-codex/releases) · [问题反馈](https://github.com/kk3ya03-star/dsh-lcx-codex/issues)
|
|
17
14
|
|
|
18
|
-
|
|
15
|
+
</div>
|
|
19
16
|
|
|
20
|
-
|
|
21
|
-
dsh plugin --profile web add dsh-lcx-codex
|
|
22
|
-
dsh web
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
- npm dist-tag:`latest`
|
|
26
|
-
- DSH:`0.1.1-rc.2`
|
|
27
|
-
- Plugin Pi:`0.84.3`
|
|
28
|
-
- Node.js:`^22.19.0 || >=24.0.0`
|
|
29
|
-
|
|
30
|
-
`0.4.2-pre.1` 保留为历史 prerelease;新用户直接安装 `latest` 即可。
|
|
31
|
-
|
|
32
|
-
## 产品约定
|
|
33
|
-
|
|
34
|
-
```text
|
|
35
|
-
LCX OFF
|
|
36
|
-
= 完全使用 DSH 原生 LLM 流程
|
|
37
|
-
|
|
38
|
-
LCX ON
|
|
39
|
-
= 当前 GPT Responses 会话从 ordinary turn 1 开始
|
|
40
|
-
由 LCX 持有最终 Responses request / SSE wire
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
切换 Claude、Gemini、DeepSeek 等非 GPT 模型前先关闭 LCX;模型切换本身不需要重启 DSH。
|
|
44
|
-
|
|
45
|
-
## 为什么需要 LCX
|
|
46
|
-
|
|
47
|
-
DSH 原本已经拥有 Agent、Session、Tools 和 compaction lifecycle。LCX 解决的是 GPT Responses provider-native 路径的最后一层一致性:ordinary、tools、Native Compact、Replay、restart/resume 和 GPT route migration 不再在同一个会话中切换最终 wire owner。
|
|
48
|
-
|
|
49
|
-
```text
|
|
50
|
-
DSH
|
|
51
|
-
Agent / Session / Tools
|
|
52
|
-
│
|
|
53
|
-
llm / stream seam
|
|
54
|
-
│
|
|
55
|
-
┌──────────┴──────────┐
|
|
56
|
-
│ │
|
|
57
|
-
LCX OFF LCX ON
|
|
58
|
-
│ │
|
|
59
|
-
native DSH adapter LCX Responses Core
|
|
60
|
-
│
|
|
61
|
-
ordinary turn 1
|
|
62
|
-
↓
|
|
63
|
-
tools
|
|
64
|
-
↓
|
|
65
|
-
Native V2 Compact
|
|
66
|
-
↓
|
|
67
|
-
Replay
|
|
68
|
-
↓
|
|
69
|
-
Restart / Resume
|
|
70
|
-
↓
|
|
71
|
-
GPT Model Migration
|
|
72
|
-
```
|
|
17
|
+
LCX Codex(`dsh-lcx-codex`)是 [DeepSeek Harness](https://github.com/deepseek-ai/DeepSeek-Harness)(DSH)的社区插件,为已配置好的 **GPT / OpenAI Responses 接口**扩展长会话和搜索能力,适用于兼容的 Sub2API、NewAPI 等通道。
|
|
73
18
|
|
|
74
|
-
|
|
19
|
+
你仍然在 DSH 中选择模型、管理会话和使用工具。开启 LCX 后,从普通对话到工具调用、上下文压缩和压缩后的续聊,都使用同一条 Responses 请求路径。
|
|
75
20
|
|
|
76
|
-
##
|
|
21
|
+
## 它能做什么
|
|
77
22
|
|
|
78
|
-
|
|
23
|
+
| 你需要 | LCX 提供 |
|
|
24
|
+
| --- | --- |
|
|
25
|
+
| **长对话继续进行** | 接近上下文上限时优先使用 Native V2 原生压缩,支持压缩后续聊和重启恢复。 |
|
|
26
|
+
| **在对话中查询网页** | 通过 DSH 原有的 `web_search` 使用 GPT Hosted Search,普通搜索跟随当前 Agent 的 GPT 模型。 |
|
|
27
|
+
| **更细的搜索控制** | 按需启用域名过滤、位置、搜索上下文大小、图片搜索等 Hosted Search 参数。 |
|
|
28
|
+
| **连续查阅网页** | 在支持的接口上使用 Alpha 工具,连续执行搜索、打开、查找、点击等操作。 |
|
|
29
|
+
| **复用提示词缓存** | 在支持的 GPT-5.6 接口上保持稳定的缓存标识,让相同的请求前缀可以被重复利用。 |
|
|
79
30
|
|
|
80
|
-
LCX
|
|
31
|
+
> LCX 面向 GPT / OpenAI Responses。各项扩展能力取决于上游接口支持;能正常对话,不代表该通道同时支持原生压缩、Hosted Search 或 Alpha 网页操作。
|
|
81
32
|
|
|
82
|
-
|
|
33
|
+
## 快速开始
|
|
83
34
|
|
|
84
|
-
###
|
|
35
|
+
### DSH 0.1.3 用户:0.4.3-pre.2 预发布
|
|
85
36
|
|
|
86
|
-
`0.4.2`
|
|
37
|
+
`0.4.3-pre.2` 面向 **DSH `0.1.3-alpha.2` / host 与插件 Pi `0.85.1`**,安装时明确选择预发布:
|
|
87
38
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
- 真实长会话中,稳定 topology 下 warm request 多次观察到接近完整前缀复用。
|
|
93
|
-
|
|
94
|
-
缓存命中由 provider、模型、请求前缀、工具 schema 和会话状态共同决定,不是固定性能承诺。
|
|
95
|
-
|
|
96
|
-
一个已确认的边界:运行中激活 skill 若改变顶层 tool schema,会发生一次 cache reset;新 tool topology 稳定后下一请求即可重新 warm。当前支持 route 会拒绝 content-level `prompt_cache_breakpoint`,而 DSH `0.1.1-rc.2` 也没有可靠的 dynamic-tool provenance,因此 `0.4.2` 保留一次安全 reset,而不靠猜测重写工具历史。
|
|
39
|
+
```sh
|
|
40
|
+
dsh plugin --profile web add dsh-lcx-codex@0.4.3-pre.2
|
|
41
|
+
dsh web
|
|
42
|
+
```
|
|
97
43
|
|
|
98
|
-
|
|
44
|
+
也可使用 `dsh-lcx-codex@prelatest` 跟随预发布通道。稳定通道 `latest` 仍为 `0.4.2`,对应下面的旧版安装说明,不要混用 DSH 版本。
|
|
99
45
|
|
|
100
|
-
|
|
46
|
+
新版只保留 LCX、Hosted Search、高级 Hosted、Alpha 四个开关;`90%` / `95%` 压缩阈值及 `240` 秒搜索超时为固定策略。设置页语言跟随 DSH。旧版 `0.4.2` 插件配置与 v3/v4 压缩检查点不再迁移,请重新配置并新建会话;当前 v5 检查点仍支持重启续聊。
|
|
101
47
|
|
|
102
|
-
|
|
48
|
+
**预发布限制:** Windows 上 DSH `0.1.3-alpha.2` 存在启动时加载 `fs-ext` 的宿主问题。本轮 Windows 实测使用了仅在非 Windows 加载 `fs-ext` 的本地修正,保留原 Win32 会话锁;插件安装不会自动修补 DSH,不能宣称未修正的 Windows 宿主开箱即用。Alpha 网页引用仍可能偶发失效,`screenshot` 尚未验证返回可显示的图片。代理 / `NO_PROXY`、更高并发与取消交错、后台可续聊子代理尚未测全。
|
|
103
49
|
|
|
104
|
-
|
|
105
|
-
0% ─────────────────── 90% ───── 95% ───── 100%
|
|
106
|
-
normal Native emergency hard cap
|
|
107
|
-
V2 DSH prune
|
|
108
|
-
```
|
|
50
|
+
普通对话、缓存、基础 PNG/TXT 附件、Native 压缩与重启续聊、压缩后模型切换、普通搜索与 Hosted 搜图展示、双会话并发、前台子代理缓存已有有界实测;这不是全平台或所有附件格式的完整兼容保证。
|
|
109
51
|
|
|
110
|
-
|
|
111
|
-
- `95%`:允许 DSH emergency tool-result prune;
|
|
112
|
-
- provider-confirmed overflow:继续交给 DSH recovery;
|
|
113
|
-
- manual `/compact`:仍使用 DSH 原生 compaction transaction。
|
|
52
|
+
### 1. 准备环境
|
|
114
53
|
|
|
115
|
-
|
|
54
|
+
- DSH **`0.1.1-rc.2`**,且 Web 界面能够正常使用。
|
|
55
|
+
- Node.js **22.19.0 及以上的 22.x,或 24.0.0 及以上版本**。
|
|
56
|
+
- 已在 DSH 中配置好可正常对话的 **GPT Responses 接口、模型与凭据**。
|
|
116
57
|
|
|
117
|
-
###
|
|
58
|
+
### 2. 安装插件
|
|
118
59
|
|
|
119
|
-
|
|
60
|
+
在运行 DSH 的环境中执行:
|
|
120
61
|
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
→ Replay
|
|
125
|
-
→ Restart DSH
|
|
126
|
-
→ Resume same session
|
|
127
|
-
→ Switch to Sol
|
|
128
|
-
→ Continue
|
|
62
|
+
```sh
|
|
63
|
+
dsh plugin --profile web add dsh-lcx-codex
|
|
64
|
+
dsh web
|
|
129
65
|
```
|
|
130
66
|
|
|
131
|
-
|
|
67
|
+
插件通过 npm 安装,无需克隆仓库或手动下载源码。本 README 对应 **`0.4.2`**;可在 [npm](https://www.npmjs.com/package/dsh-lcx-codex) 查看发布版本,或查看 [v0.4.2 发布说明](https://github.com/kk3ya03-star/dsh-lcx-codex/releases/tag/v0.4.2)。
|
|
132
68
|
|
|
133
|
-
###
|
|
69
|
+
### 3. 启用并保存
|
|
134
70
|
|
|
135
|
-
|
|
71
|
+
1. 打开 DSH Web 的插件设置,展开 **Responses / Codex 能力**。
|
|
72
|
+
2. 勾选 **启用 LCX(接管当前 GPT Responses 会话)**。
|
|
73
|
+
3. 需要联网搜索时,再勾选 **使用 GPT Hosted Search 作为 DSH web_search 后端**。
|
|
74
|
+
4. 保留默认压缩设置,点击 **保存**,使用已配置好的 GPT 模型开始对话。
|
|
136
75
|
|
|
137
|
-
|
|
138
|
-
|---|---|
|
|
139
|
-
| 普通联网搜索 | DSH `web_search` |
|
|
140
|
-
| Hosted Search 高级参数 | `websearch_gpt_advanced` |
|
|
141
|
-
| 连续网页 / PDF 操作 | `websearch_alpha` |
|
|
76
|
+
**LCX 和联网搜索默认关闭,安装后需要手动启用。** 高级搜索和 Alpha 可以在需要时再开。
|
|
142
77
|
|
|
143
|
-
|
|
78
|
+
切换 Claude、Gemini、DeepSeek 等非 GPT 模型前,请先关闭 LCX 并保存。模型切换本身不需要重启 DSH。
|
|
144
79
|
|
|
145
|
-
|
|
146
|
-
search → open → find / click → screenshot
|
|
147
|
-
```
|
|
80
|
+
## 长会话如何继续
|
|
148
81
|
|
|
149
|
-
|
|
82
|
+
LCX 使用上游的 **Native V2 原生压缩**处理长上下文,并将压缩结果接回 DSH 会话,供后续请求继续使用(Replay)。DSH 仍负责压缩时机、会话保存和工具执行。
|
|
150
83
|
|
|
151
|
-
|
|
84
|
+
默认的 Native-first 自动压缩策略为:
|
|
152
85
|
|
|
153
|
-
|
|
86
|
+
| 上下文压力 | 行为 |
|
|
87
|
+
| --- | --- |
|
|
88
|
+
| 低于 `90%` | 正常运行,避免过早裁剪工具结果。 |
|
|
89
|
+
| 达到 `90%`、低于 `95%` | 优先尝试 Native V2 压缩。 |
|
|
90
|
+
| 达到 `95%` | 允许 DSH 紧急裁剪工具结果,并按现有流程处理压缩。 |
|
|
154
91
|
|
|
155
|
-
|
|
156
|
-
DSH 0.1.1-rc.2
|
|
157
|
-
└─ host Pi 0.82.1 ← 不改
|
|
92
|
+
手动 `/compact` 仍通过 DSH 的压缩流程执行。首次建立压缩检查点时,符合条件的可恢复失败可以回退到 DSH 基础压缩;并非所有 Native 失败都会自动回退。
|
|
158
93
|
|
|
159
|
-
|
|
160
|
-
└─ plugin Pi 0.84.3 ← 插件隔离依赖
|
|
161
|
-
```
|
|
94
|
+
原生压缩状态只在兼容的同一会话与接口配置中复用。切换到不兼容的 GPT 模型或通道时,LCX 会改用可迁移的会话历史继续请求。
|
|
162
95
|
|
|
163
|
-
|
|
96
|
+
## 搜索怎么选
|
|
164
97
|
|
|
165
|
-
|
|
98
|
+
日常查询从 `web_search` 开始即可。三种搜索工具的用途和启用条件如下:
|
|
166
99
|
|
|
167
|
-
|
|
100
|
+
| 工具 | 用途 | 启用条件 |
|
|
101
|
+
| --- | --- | --- |
|
|
102
|
+
| `web_search` | 日常联网查询,使用 DSH 原有搜索入口。 | 开启 LCX 和 GPT Hosted Search。 |
|
|
103
|
+
| `websearch_gpt_advanced` | 域名过滤、位置、搜索上下文大小、图片搜索等额外参数。 | 在上述基础上开启高级 Hosted 工具。 |
|
|
104
|
+
| `websearch_alpha` | 连续执行 `search / open / find / click / screenshot` 等操作。 | 开启 Alpha,且当前接口通过能力探测。 |
|
|
168
105
|
|
|
169
|
-
|
|
170
|
-
- DSH `0.1.1-rc.2`
|
|
171
|
-
- DSH 中已有可工作的 GPT Responses route
|
|
172
|
-
- 上游 endpoint 实际支持准备启用的 Hosted Search / Native V2 / Alpha 能力
|
|
106
|
+
Alpha 默认关闭。即使打开开关,也只有当前接口通过能力探测后才会注册工具。
|
|
173
107
|
|
|
174
|
-
###
|
|
108
|
+
### 可以直接让 DSH 搜图吗?
|
|
175
109
|
|
|
176
|
-
|
|
177
|
-
|---|---:|---|
|
|
178
|
-
| Enable LCX | **On** | 接管当前 GPT Responses 会话 |
|
|
179
|
-
| Use GPT Hosted Search | 按需 | 让 DSH `web_search` 使用 GPT Hosted Search |
|
|
180
|
-
| Advanced Hosted Search | Off | 需要高级 Hosted 参数时再开 |
|
|
181
|
-
| Alpha Search | Off | capability probe 通过后再开 |
|
|
182
|
-
| Native-first auto compaction | On | 使用 Native-first pressure coordination |
|
|
183
|
-
| Native threshold | `90%` | 主动 Native V2 阈值 |
|
|
184
|
-
| Emergency DSH prune | `95%` | 紧急 prune 阈值 |
|
|
185
|
-
| Fallback to Basic Compaction | On | Native 首次失败时允许受控回退 |
|
|
186
|
-
| `web_search` timeout | `240s` | 避免较慢 Hosted Search 被过早中断 |
|
|
110
|
+
可以。开启 LCX、GPT Hosted Search 和高级 Hosted 工具后,直接说:
|
|
187
111
|
|
|
188
|
-
|
|
112
|
+
> 搜索金门大桥的照片,选一张直接显示在回复里,并附上图片来源网页。
|
|
189
113
|
|
|
190
|
-
|
|
191
|
-
|---|---|
|
|
192
|
-
| LCX ownership | LCX ON 后第一轮 GPT ordinary request 就进入 LCX Responses path |
|
|
193
|
-
| Prompt Cache | 稳定 warm turn 可出现 provider `cached_tokens` |
|
|
194
|
-
| Hosted Search | 普通入口仍是 DSH `web_search` |
|
|
195
|
-
| Advanced Hosted | 开启后出现 `websearch_gpt_advanced` |
|
|
196
|
-
| Alpha | capability probe 通过后才出现 `websearch_alpha` |
|
|
197
|
-
| Native V2 | Compact 产生 provider-native checkpoint,而不是把 Basic Compaction 伪装成 Native |
|
|
198
|
-
| Replay | Compact 后继续同一 DSH session;restart/resume 仍可续接 |
|
|
114
|
+
通常不需要自己填写 JSON,模型负责选择 `websearch_gpt_advanced` 的图片搜索参数;若只返回文字,可以补充“请使用高级 Hosted 的图片搜索”。是否选择正确参数仍取决于模型,接口也必须支持图片搜索。
|
|
199
115
|
|
|
200
|
-
|
|
116
|
+
工具返回的是现有网页图片的 URL、来源等信息,模型可用 Markdown 将图片显示在 DSH 中。`0.4.3-pre.2` 已实测图片结果解析及界面展示;这是**搜索已有图片,不是生成图片,也不等于模型已经看到了图片像素**。图片链接可能受原站权限或防盗链影响。Alpha 不必开启;Alpha 的网页操作发生在上游搜索服务,不会点击你的本机浏览器或 DSH 界面,其 `screenshot` 也不保证返回照片。
|
|
201
117
|
|
|
202
|
-
|
|
203
|
-
|---|---|
|
|
204
|
-
| **DSH** | Agent loop、Session/history、GenerateOptions、模型/credential、工具执行、AttachmentStore、pressure policy、compaction transaction |
|
|
205
|
-
| **DSH compatibility seam** | 把 DSH message / GenerateOptions 投影到 Pi Context,并把结果桥接回 DSH |
|
|
206
|
-
| **Plugin Pi 0.84.3** | canonical Responses serialization / parser semantics |
|
|
207
|
-
| **LCX** | ON/OFF ownership、最终 Responses body + HTTP/SSE wire、ordinary/compact/replay orchestration、Native opaque state、Search capabilities |
|
|
118
|
+
## 缓存的使用预期
|
|
208
119
|
|
|
209
|
-
|
|
120
|
+
在支持的 GPT-5.6 接口上,LCX 使用 `prompt_cache_options` 并保持稳定的缓存标识。连续对话和工具任务的请求前缀保持一致时,可以复用提示词缓存;实际命中情况由上游决定。
|
|
210
121
|
|
|
211
|
-
|
|
122
|
+
原生压缩会改变历史内容。运行中加载 skill、plugin,或切换会改变工具列表的功能,也可能使缓存需要重新建立。新请求前缀稳定后可以再次复用缓存。
|
|
212
123
|
|
|
213
|
-
|
|
214
|
-
|---|---|---|---|---|
|
|
215
|
-
| `0.4.2` | `0.1.1-rc.2` | `0.82.1` | `0.84.3` | **VERIFIED STABLE** |
|
|
216
|
-
| `0.4.1` | `0.1.1-rc.2` | `0.82.1` | `0.82.1` | historical stable |
|
|
124
|
+
## 设置参考
|
|
217
125
|
|
|
218
|
-
|
|
126
|
+
下表为稳定版 `0.4.2`。`0.4.3-pre.2` 只提供前四项开关,其余为固定内部策略。
|
|
219
127
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
-
|
|
227
|
-
|
|
128
|
+
| 设置 | 默认值 | 建议 |
|
|
129
|
+
| --- | --- | --- |
|
|
130
|
+
| 启用 LCX | 关闭 | 使用 GPT Responses 时开启。 |
|
|
131
|
+
| GPT Hosted Search | 关闭 | 需要联网查询时开启。 |
|
|
132
|
+
| 高级 Hosted 工具 | 关闭 | 需要额外搜索参数时开启。 |
|
|
133
|
+
| Alpha command | 关闭 | 在支持的接口上按需开启。 |
|
|
134
|
+
| Native-first 自动压缩 | 开启 | 保持默认,需先启用 LCX。 |
|
|
135
|
+
| Native 自动压缩阈值 | `90%` | 保持默认。 |
|
|
136
|
+
| DSH 紧急裁剪阈值 | `95%` | 必须高于 Native 阈值。 |
|
|
137
|
+
| Native 失败后回退 DSH basic compaction | 开启 | 保留符合回退条件时的基础压缩能力。 |
|
|
138
|
+
| `web_search` 超时 | `240` 秒 | 搜索较慢时再调整。 |
|
|
228
139
|
|
|
229
140
|
## 常见问题
|
|
230
141
|
|
|
231
|
-
|
|
232
|
-
<summary><strong>为什么切非 GPT 前要关闭 LCX?</strong></summary>
|
|
233
|
-
|
|
234
|
-
LCX ON 是 GPT Responses lifecycle ownership switch,不是通用多模型代理层。非 GPT 模型继续走 DSH 原生 adapter。
|
|
142
|
+
**安装后没有变化?**
|
|
235
143
|
|
|
236
|
-
|
|
144
|
+
确认插件安装到了启动 Web 使用的 `web` 配置中,再检查 LCX 是否已经勾选并保存。联网搜索有单独的开关。
|
|
237
145
|
|
|
238
|
-
|
|
239
|
-
<summary><strong>为什么 web_search 还是同一个工具?</strong></summary>
|
|
146
|
+
**能对话,但搜索或压缩报错?**
|
|
240
147
|
|
|
241
|
-
|
|
148
|
+
检查当前通道是否支持对应能力,以及模型与凭据是否可用。Sub2API、NewAPI 的名称本身不代表其所有通道都支持相同功能。
|
|
242
149
|
|
|
243
|
-
|
|
150
|
+
**需要手动下载安装包吗?**
|
|
244
151
|
|
|
245
|
-
|
|
246
|
-
<summary><strong>为什么 Alpha 有时不出现?</strong></summary>
|
|
152
|
+
常规安装使用上面的 DSH 命令即可。需要留存发布包时,可下载 [v0.4.2 npm 包(.tgz)](https://registry.npmjs.org/dsh-lcx-codex/-/dsh-lcx-codex-0.4.2.tgz)。GitHub 的 **Code → Download ZIP** 提供源码,不能代替插件安装步骤。
|
|
247
153
|
|
|
248
|
-
|
|
154
|
+
## 兼容性与限制
|
|
249
155
|
|
|
250
|
-
|
|
156
|
+
| 组件 | `0.4.2` 对应版本 |
|
|
157
|
+
| --- | --- |
|
|
158
|
+
| DSH | `0.1.1-rc.2` |
|
|
159
|
+
| DSH host Pi | `0.82.1` |
|
|
160
|
+
| 插件 Pi | `0.84.3` |
|
|
161
|
+
| Node.js | `^22.19.0 \|\| >=24.0.0` |
|
|
251
162
|
|
|
252
|
-
|
|
253
|
-
<summary><strong>为什么加载 skill 后有时缓存会重新 warm?</strong></summary>
|
|
163
|
+
插件单独使用 `@earendil-works/pi-ai@0.84.3`,不覆盖 DSH host 的 Pi 依赖。
|
|
254
164
|
|
|
255
|
-
|
|
165
|
+
- DSH `0.1.2-alpha.1` 尚未列入此版本的正式兼容范围。
|
|
166
|
+
- 1.05M 长上下文和 Programmatic Tool Calling 暂不作为正式支持项。
|
|
167
|
+
- 显式 `prompt_cache_breakpoint` 设置未开放。
|
|
168
|
+
- `reasoning.context` 和 `reasoning.mode` 是否可用,取决于 DSH / Pi 是否暴露相应字段。
|
|
256
169
|
|
|
257
|
-
|
|
170
|
+
## 开发与反馈
|
|
258
171
|
|
|
259
|
-
|
|
172
|
+
在仓库中安装依赖并运行检查:
|
|
260
173
|
|
|
261
|
-
```
|
|
174
|
+
```sh
|
|
175
|
+
npm ci --ignore-scripts
|
|
176
|
+
npm ci --prefix scripts/runtime-alpha2 --ignore-scripts
|
|
177
|
+
node scripts/link-dsh-runtime.mjs scripts/runtime-alpha2
|
|
178
|
+
node scripts/check-generated.mjs
|
|
262
179
|
npm run typecheck
|
|
263
180
|
npm test
|
|
264
181
|
npm run test:schema
|
|
265
182
|
npm pack --ignore-scripts
|
|
266
183
|
```
|
|
267
184
|
|
|
268
|
-
|
|
269
|
-
- 版本记录:[CHANGELOG.md](CHANGELOG.md)
|
|
270
|
-
- GitHub Releases:[Releases](https://github.com/kk3ya03-star/dsh-lcx-codex/releases)
|
|
271
|
-
- npm:[`dsh-lcx-codex`](https://www.npmjs.com/package/dsh-lcx-codex)
|
|
185
|
+
[架构说明](ARCHITECTURE.md)介绍请求生命周期、压缩检查点和 Replay 实现;[更新日志](CHANGELOG.md)记录版本变化。
|
|
272
186
|
|
|
273
|
-
|
|
187
|
+
遇到问题可提交 [Issue](https://github.com/kk3ya03-star/dsh-lcx-codex/issues),附上插件、DSH、Node.js 版本、接口类型、复现步骤和已脱敏的报错信息。
|
|
274
188
|
|
|
275
|
-
|
|
189
|
+
## 许可证
|
|
276
190
|
|
|
277
|
-
|
|
191
|
+
[MIT](LICENSE)。本项目是独立社区插件,与 OpenAI、DeepSeek、Sub2API、NewAPI 无隶属或官方背书关系。DeepSeek 名称及鲸鱼标识归其权利人所有。
|
package/cordis.patch.yml
CHANGED
|
@@ -1,25 +1,8 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
# documented purpose=compaction llm/stream override, leaving compaction policy,
|
|
4
|
-
# range selection, pruning, transactions and /compact owned by DSH.
|
|
1
|
+
# GPT Responses lifecycle plugin. Runtime defaults live in the plugin Config;
|
|
2
|
+
# the bundle declares only route capabilities that differ from conservative defaults.
|
|
5
3
|
- insert:
|
|
6
4
|
- id: lcx-codex
|
|
7
5
|
name: dsh-lcx-codex
|
|
8
6
|
config:
|
|
9
|
-
|
|
10
|
-
baseURL: https://api.lcxbot.com/v1
|
|
11
|
-
apiKeyEnv: LCX_API_KEY
|
|
12
|
-
model: gpt-5.6-sol
|
|
7
|
+
supportsLongCacheRetention: true
|
|
13
8
|
supportsExplicitPromptCacheMode: true
|
|
14
|
-
legacyCheckpointPath: !!js dshHomePath('storages/lcx-codex/checkpoints-v3.json')
|
|
15
|
-
alphaCapabilityPath: !!js dshHomePath('storages/lcx-codex/web-alpha-capabilities.json')
|
|
16
|
-
alphaRefPath: !!js dshHomePath('storages/lcx-codex/web-alpha-refs.json')
|
|
17
|
-
webSearchProvider: lcx-responses
|
|
18
|
-
webMaxResults: 8
|
|
19
|
-
timeoutMs: 300000
|
|
20
|
-
maxAttempts: 3
|
|
21
|
-
requestImagePixelBudget: 4194304
|
|
22
|
-
requestImageMaxBytes: 1048576
|
|
23
|
-
webSearchTimeoutMs: 240000
|
|
24
|
-
autoCompactionThresholdPercent: 90
|
|
25
|
-
emergencyPruneThresholdPercent: 95
|