dsh-codex-community 0.0.1 → 0.0.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/CHANGELOG.md +48 -0
- package/README.en.md +12 -10
- package/README.md +12 -10
- package/THIRD_PARTY_NOTICES.md +2 -0
- package/dist/client/index.js +487 -49
- package/dist/host/index.mjs +3 -0
- package/dist/internal/authorization-bridge.mjs +12 -0
- package/dist/internal/codex-account-usage.mjs +509 -0
- package/dist/internal/codex-model-capabilities.mjs +90 -0
- package/dist/internal/codex-pi-provider.mjs +30 -3
- package/dist/internal/codex-provider-runtime.mjs +27 -1
- package/dist/internal/codex-route-adapter.mjs +36 -3
- package/dist/internal/session-preference-bridge.mjs +150 -0
- package/docs/architecture.en.md +20 -11
- package/docs/architecture.md +20 -11
- package/docs/compatibility.en.md +13 -12
- package/docs/compatibility.md +13 -12
- package/docs/configuration.en.md +23 -1
- package/docs/configuration.md +23 -1
- package/docs/releases/v0.0.1.md +0 -2
- package/docs/releases/v0.0.2.acceptance.json +160 -0
- package/docs/releases/v0.0.2.md +56 -0
- package/docs/releasing.en.md +1 -1
- package/docs/releasing.md +1 -1
- package/docs/troubleshooting.en.md +19 -3
- package/docs/troubleshooting.md +19 -3
- package/package.json +11 -1
- package/types/client.d.ts +59 -0
package/docs/configuration.en.md
CHANGED
|
@@ -52,10 +52,32 @@ models:
|
|
|
52
52
|
|
|
53
53
|
Model IDs and capabilities follow the pinned runtime catalog. Check the catalog discovered by the settings page before editing; do not infer that an example ID is always available.
|
|
54
54
|
|
|
55
|
+
## Model capabilities and reasoning levels
|
|
56
|
+
|
|
57
|
+
The settings page gets model names, context windows, and maximum outputs from the currently installed provider catalog; it is not a dynamic account model directory. The conversation model selector uses model-specific reasoning levels and defaults verified against the first-party Codex model catalog instead of inferring them from pi-ai's generic effort vocabulary:
|
|
58
|
+
|
|
59
|
+
| Model | Selectable reasoning efforts | Default |
|
|
60
|
+
| --- | --- | --- |
|
|
61
|
+
| GPT-5.3 Codex Spark | Low, Medium, High, Xhigh | High |
|
|
62
|
+
| GPT-5.4, GPT-5.4 mini, GPT-5.5 | Low, Medium, High, Xhigh | Medium |
|
|
63
|
+
| GPT-5.6 Luna | Low, Medium, High, Xhigh, Max | Medium |
|
|
64
|
+
| GPT-5.6 Sol | Low, Medium, High, Xhigh, Max | Low |
|
|
65
|
+
| GPT-5.6 Terra | Low, Medium, High, Xhigh, Max | Medium |
|
|
66
|
+
|
|
67
|
+
The selector no longer shows generic `Default`, `Off`, or `Minimal` entries that are not subscription-Codex catalog efforts. `Ultra` in the Codex product catalog also enables proactive task delegation; it is not a plain reasoning effort that a model Provider can implement by sending one wire value. This plugin does not yet own Harness Agent orchestration, so it does not disguise `Ultra` as `Max` or another wire value. A future unverified model remains usable with its server default but receives no inferred effort controls.
|
|
68
|
+
|
|
69
|
+
If an older conversation still stores `Off` or `Minimal`, a **Repair old reasoning level** action appears beside the composer. Merely opening the conversation never rewrites the selection. Clicking the action switches to that model's current default. It uses the same persistence semantics as the Harness model selector, so the model also becomes the default for future conversations.
|
|
70
|
+
|
|
71
|
+
## Per-session Fast preference
|
|
72
|
+
|
|
73
|
+
The lightning button to the left of the conversation model selector and `/codex set fast on|off` update the same current-session preference. On GPT-5.4, GPT-5.5, GPT-5.6 Luna, Sol, and Terra, enabling it uses the official Fast priority service tier starting with the next request; disabling it restores standard speed starting with the next request. Fast targets 1.5× speed and consumes more usage. GPT-5.3 Codex Spark and GPT-5.4 mini never receive the Fast service tier.
|
|
74
|
+
|
|
75
|
+
Fast state belongs only to the current session in the current process and returns to off after a process restart. Transport preferences are likewise not persisted. An in-flight request is not changed by a toggle, and a failed Fast request is not automatically replayed on a lower tier.
|
|
76
|
+
|
|
55
77
|
## Validation and activation
|
|
56
78
|
|
|
57
79
|
- An omitted or `null` Boolean, enum, timeout, or image limit receives its default. `models: null` does not select the default catalog; omit `models` instead.
|
|
58
80
|
- Type mismatches, unknown enum values, ordinary numbers outside the allowed ranges, fractional image limits, and unknown or duplicate model IDs are rejected during plugin load or settings save. A rejected update does not replace the last valid configuration.
|
|
59
81
|
- Use only the finite JSON/YAML numbers listed above. `NaN`, infinity, and undocumented fields are outside the supported configuration interface.
|
|
60
82
|
- A configuration update takes effect on the next adapter operation. An operation already in progress continues with the immutable configuration snapshot it captured at start.
|
|
61
|
-
-
|
|
83
|
+
- Fast and transport preferences are temporary state for the current session in the current process, not bundle configuration keys. `/codex` can change them, and the lightning button to the left of the model selector can also toggle Fast.
|
package/docs/configuration.md
CHANGED
|
@@ -52,10 +52,32 @@ models:
|
|
|
52
52
|
|
|
53
53
|
模型 ID 与能力随锁定的运行时目录变化。修改前请以设置页面发现的目录为准,不要从示例推断某个 ID 一定可用。
|
|
54
54
|
|
|
55
|
+
## 模型能力与推理档位
|
|
56
|
+
|
|
57
|
+
设置页展示的模型名称、上下文窗口和最大输出来自当前安装的 provider catalog,不是账号动态模型目录。会话模型选择器的推理档位和默认值按 Codex 一方模型目录逐模型核验,不沿用 pi-ai 的通用推理档位推断。当前映射如下:
|
|
58
|
+
|
|
59
|
+
| 模型 | 可选推理档位 | 默认值 |
|
|
60
|
+
| --- | --- | --- |
|
|
61
|
+
| GPT-5.3 Codex Spark | Low、Medium、High、Xhigh | High |
|
|
62
|
+
| GPT-5.4、GPT-5.4 mini、GPT-5.5 | Low、Medium、High、Xhigh | Medium |
|
|
63
|
+
| GPT-5.6 Luna | Low、Medium、High、Xhigh、Max | Medium |
|
|
64
|
+
| GPT-5.6 Sol | Low、Medium、High、Xhigh、Max | Low |
|
|
65
|
+
| GPT-5.6 Terra | Low、Medium、High、Xhigh、Max | Medium |
|
|
66
|
+
|
|
67
|
+
选择器不再显示并非订阅 Codex 目录档位的 `Default`、`Off` 或 `Minimal`。Codex 产品目录中的 `Ultra` 还会开启主动任务委派,并不是可由模型 Provider 单独发送的普通推理档位;本插件尚未接管 Harness 的 Agent 编排,因此不会把 `Ultra` 伪装成 `Max` 或任意 wire value。未来新增但尚未核验的模型仍可使用服务端默认推理行为,但不会得到插件推断出来的档位按钮。
|
|
68
|
+
|
|
69
|
+
如果旧会话仍保存了 `Off` 或 `Minimal`,输入框旁会显示“修复旧推理档位”。插件不会在打开会话时静默改写选择;只有点击该按钮后,才会切换到该模型当前默认档位。该操作沿用 Harness 模型选择器的保存语义,因此也会把该模型保存为未来新会话的默认模型。
|
|
70
|
+
|
|
71
|
+
## 会话 Fast 偏好
|
|
72
|
+
|
|
73
|
+
会话模型选择器左侧的闪电按钮与 `/codex set fast on|off` 修改同一份当前会话偏好。GPT-5.4、GPT-5.5、GPT-5.6 Luna、Sol 和 Terra 开启后,从下一次请求起使用官方 Fast 的 priority service tier;关闭后,从下一次请求起恢复默认速度。Fast 目标速度为 1.5 倍,并会消耗更多额度。GPT-5.3 Codex Spark 与 GPT-5.4 mini 不会发送 Fast service tier。
|
|
74
|
+
|
|
75
|
+
Fast 状态只保存在当前进程的当前会话中;进程重启后恢复关闭。传输偏好同样不持久化。正在进行的请求不会因切换而改变,也不会因 Fast 失败自动降级重放。
|
|
76
|
+
|
|
55
77
|
## 校验与生效
|
|
56
78
|
|
|
57
79
|
- 省略或写成 `null` 的布尔值、枚举、超时和图片限制会回填各自默认值;`models: null` 不表示默认目录,应省略 `models`。
|
|
58
80
|
- 类型错误、未知枚举、超出范围的普通数值、图片限制的小数,以及模型的未知或重复 ID 会在插件加载或设置保存时被拒绝;被拒绝的更新不会替换最后一次有效配置。
|
|
59
81
|
- 只应使用上表列出的有限 JSON/YAML 数值。`NaN`、无穷值和未列出的字段不属于受支持的配置接口。
|
|
60
82
|
- 配置更新从下一次适配器操作生效;正在进行的操作继续使用启动时捕获的不可变配置快照。
|
|
61
|
-
- `/codex`
|
|
83
|
+
- Fast 与传输偏好是当前进程、当前会话的临时状态,不是 bundle 配置键;既可通过 `/codex` 修改,也可通过模型选择器左侧的闪电按钮切换 Fast。
|
package/docs/releases/v0.0.1.md
CHANGED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 3,
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"releaseStatus": "approved",
|
|
5
|
+
"testedCommit": "6352b80a3ac89be2b534e617408692f81543978d",
|
|
6
|
+
"approvedBy": "yoshino-xiao7",
|
|
7
|
+
"approvedAt": "2026-08-29T08:47:11Z",
|
|
8
|
+
"approvalEvidenceUrl": "https://github.com/yoshino-xiao7/dsh-codex/actions/runs/33243698807",
|
|
9
|
+
"platforms": {
|
|
10
|
+
"linux": {
|
|
11
|
+
"status": "passed",
|
|
12
|
+
"testedAt": "2026-08-29T08:40:45Z",
|
|
13
|
+
"runner": "GitHub Actions 1000001504",
|
|
14
|
+
"nodeVersion": "24.19.0",
|
|
15
|
+
"dshVersion": "0.1.1-rc.2",
|
|
16
|
+
"profileSmoke": "passed",
|
|
17
|
+
"evidenceUrl": "https://github.com/yoshino-xiao7/dsh-codex/actions/runs/33243698807/job/99077322656"
|
|
18
|
+
},
|
|
19
|
+
"macos": {
|
|
20
|
+
"status": "passed",
|
|
21
|
+
"testedAt": "2026-08-29T08:41:12Z",
|
|
22
|
+
"runner": "GitHub Actions 1000001507",
|
|
23
|
+
"nodeVersion": "24.18.0",
|
|
24
|
+
"dshVersion": "0.1.1-rc.2",
|
|
25
|
+
"profileSmoke": "passed",
|
|
26
|
+
"evidenceUrl": "https://github.com/yoshino-xiao7/dsh-codex/actions/runs/33243698807/job/99077322728"
|
|
27
|
+
},
|
|
28
|
+
"windows": {
|
|
29
|
+
"status": "passed",
|
|
30
|
+
"testedAt": "2026-08-29T08:44:00Z",
|
|
31
|
+
"runner": "GitHub Actions 1000001506",
|
|
32
|
+
"nodeVersion": "24.19.0",
|
|
33
|
+
"dshVersion": "0.1.1-rc.2",
|
|
34
|
+
"profileSmoke": "passed",
|
|
35
|
+
"evidenceUrl": "https://github.com/yoshino-xiao7/dsh-codex/actions/runs/33243698807/job/99077322719"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"liveAcceptance": {
|
|
39
|
+
"oauthWebSignIn": {
|
|
40
|
+
"status": "pending",
|
|
41
|
+
"testedAt": "TBD",
|
|
42
|
+
"evidenceUrl": "TBD",
|
|
43
|
+
"assertions": {
|
|
44
|
+
"flowStartedFromSettings": false,
|
|
45
|
+
"credentialConfigured": false,
|
|
46
|
+
"postSignInRequestSucceeded": false
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"modelCatalog": {
|
|
50
|
+
"status": "pending",
|
|
51
|
+
"testedAt": "TBD",
|
|
52
|
+
"evidenceUrl": "TBD",
|
|
53
|
+
"assertions": {
|
|
54
|
+
"settingsCatalogVisible": false,
|
|
55
|
+
"conversationModelSelectable": false
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"textStream": {
|
|
59
|
+
"status": "pending",
|
|
60
|
+
"testedAt": "TBD",
|
|
61
|
+
"evidenceUrl": "TBD",
|
|
62
|
+
"assertions": {
|
|
63
|
+
"nonEmptyTextDelta": false,
|
|
64
|
+
"terminalStopObserved": false
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"reasoningStream": {
|
|
68
|
+
"status": "pending",
|
|
69
|
+
"testedAt": "TBD",
|
|
70
|
+
"evidenceUrl": "TBD",
|
|
71
|
+
"assertions": {
|
|
72
|
+
"reasoningBlockObserved": false,
|
|
73
|
+
"terminalStopObserved": false
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"terminalUsage": {
|
|
77
|
+
"status": "pending",
|
|
78
|
+
"testedAt": "TBD",
|
|
79
|
+
"evidenceUrl": "TBD",
|
|
80
|
+
"assertions": {
|
|
81
|
+
"inputTokensObserved": false,
|
|
82
|
+
"outputTokensObserved": false
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"toolRoundTrip": {
|
|
86
|
+
"status": "pending",
|
|
87
|
+
"testedAt": "TBD",
|
|
88
|
+
"evidenceUrl": "TBD",
|
|
89
|
+
"assertions": {
|
|
90
|
+
"toolCallObserved": false,
|
|
91
|
+
"toolExecuted": false,
|
|
92
|
+
"toolResultReturned": false,
|
|
93
|
+
"followUpSucceeded": false
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"replayContinuity": {
|
|
97
|
+
"status": "pending",
|
|
98
|
+
"testedAt": "TBD",
|
|
99
|
+
"evidenceUrl": "TBD",
|
|
100
|
+
"assertions": {
|
|
101
|
+
"firstTurnSucceeded": false,
|
|
102
|
+
"secondTurnUsedPriorContext": false,
|
|
103
|
+
"secondTurnSucceeded": false
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"imageMaxPixels": {
|
|
107
|
+
"status": "pending",
|
|
108
|
+
"testedAt": "TBD",
|
|
109
|
+
"evidenceUrl": "TBD",
|
|
110
|
+
"assertions": {
|
|
111
|
+
"nativeImageAccepted": false,
|
|
112
|
+
"maxPixels4194304Projected": false,
|
|
113
|
+
"requestSucceeded": false
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"transportAuto": {
|
|
117
|
+
"status": "pending",
|
|
118
|
+
"testedAt": "TBD",
|
|
119
|
+
"evidenceUrl": "TBD",
|
|
120
|
+
"assertions": {
|
|
121
|
+
"requestSucceeded": false
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"transportSse": {
|
|
125
|
+
"status": "pending",
|
|
126
|
+
"testedAt": "TBD",
|
|
127
|
+
"evidenceUrl": "TBD",
|
|
128
|
+
"assertions": {
|
|
129
|
+
"requestSucceeded": false
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"transportWebsocket": {
|
|
133
|
+
"status": "pending",
|
|
134
|
+
"testedAt": "TBD",
|
|
135
|
+
"evidenceUrl": "TBD",
|
|
136
|
+
"assertions": {
|
|
137
|
+
"requestSucceeded": false
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"transportWebsocketCached": {
|
|
141
|
+
"status": "pending",
|
|
142
|
+
"testedAt": "TBD",
|
|
143
|
+
"evidenceUrl": "TBD",
|
|
144
|
+
"assertions": {
|
|
145
|
+
"firstTurnSucceeded": false,
|
|
146
|
+
"secondTurnSucceeded": false
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"fastPriority": {
|
|
150
|
+
"status": "pending",
|
|
151
|
+
"testedAt": "TBD",
|
|
152
|
+
"evidenceUrl": "TBD",
|
|
153
|
+
"assertions": {
|
|
154
|
+
"priorityRequested": false,
|
|
155
|
+
"requestSucceeded": false,
|
|
156
|
+
"noAutomaticDowngrade": false
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
> 发布日期 / Release date:2026-08-29
|
|
2
|
+
> 验收提交 / Accepted commit:6352b80a3ac89be2b534e617408692f81543978d
|
|
3
|
+
> npm:`dsh-codex-community@0.0.2`
|
|
4
|
+
> 发布方式 / Publication:npm `latest` + 正式 GitHub Release / full GitHub Release
|
|
5
|
+
> 平台验收 / Platform acceptance:3/3
|
|
6
|
+
> 发布后真实账号验证 / Post-release live validation:0/13
|
|
7
|
+
|
|
8
|
+
## 中文
|
|
9
|
+
|
|
10
|
+
### 变更
|
|
11
|
+
|
|
12
|
+
- 设置页在每次进入和手动刷新时读取真实的五小时与每周额度;读取失败时保留最近一次安全读数,或降级为请求观测/未知状态,不把失败显示为零余额,也不向 Web 页面暴露 OAuth 凭据或原始响应。
|
|
13
|
+
- 模型选择器左侧新增当前会话闪电按钮,与 `/codex set fast on|off` 共用状态;GPT-5.4、GPT-5.5 和 GPT-5.6 系列可从下一次请求起使用官方 Fast 1.5 倍速,进程重启后恢复关闭。
|
|
14
|
+
- 模型设置页改用安装的 provider catalog,并以逐模型核验的默认推理档位和 Low 至 Max 能力生成选择器;不展示通用 `Default`、`Off`、`Minimal`,也不把需要主动任务委派的 `Ultra` 伪装成普通 Provider 档位。
|
|
15
|
+
- 模型卡片将上下文和最大输出显示为 `272K`、`128K` 一类紧凑标签;保存了 `Off` 或 `Minimal` 的旧会话只在用户明确点击修复按钮后切换到当前模型默认档位。
|
|
16
|
+
|
|
17
|
+
### 兼容性
|
|
18
|
+
|
|
19
|
+
- 精确支持 DeepSeek Harness `0.1.1-rc.2` 与 Node.js `>=22.19.0 <25`;不承诺兼容其他 DSH 预发布版本。
|
|
20
|
+
- Linux、macOS 和 Windows 的 0.0.2 CI/profile smoke 已达到 `3/3`;候选提交、精确 Node 版本与作业链接记录在验收记录中,并已获得维护者批准。
|
|
21
|
+
- 额度窗口已在本机 DSH 设置页验证;真实 OAuth、对话、图片、transport 和 Fast 网络验收仍为 `0/13 pending`,发布后按验收记录逐项补齐。
|
|
22
|
+
- 本版本不提供图片生成或编辑。
|
|
23
|
+
|
|
24
|
+
### 验收记录
|
|
25
|
+
|
|
26
|
+
- [`v0.0.2.acceptance.json`](v0.0.2.acceptance.json)
|
|
27
|
+
|
|
28
|
+
### 制品校验
|
|
29
|
+
|
|
30
|
+
- SHA-256:同名 `.sha256` 附件,发布前与 `.tgz` 重新计算比对
|
|
31
|
+
- SRI:同名 `.sri` 附件;发布后与 Registry `dist.integrity` 逐字符比对
|
|
32
|
+
|
|
33
|
+
## English
|
|
34
|
+
|
|
35
|
+
### Changes
|
|
36
|
+
|
|
37
|
+
- The settings page reads the real five-hour and weekly usage limits whenever it opens or is refreshed manually. A failure retains the latest safe reading or falls back to request observation/an unknown state instead of showing zero remaining usage; OAuth credentials and raw responses never reach the Web page.
|
|
38
|
+
- A current-session lightning button to the left of the model selector shares state with `/codex set fast on|off`. GPT-5.4, GPT-5.5, and the GPT-5.6 family can use official Fast at 1.5× starting with the next request, and a process restart restores off.
|
|
39
|
+
- The model settings page follows the installed provider catalog and builds the picker from model-specific verified defaults and efforts from Low through Max. Generic `Default`, `Off`, and `Minimal` entries are hidden, and agent-level `Ultra` is not disguised as a plain Provider effort.
|
|
40
|
+
- Model cards format context and maximum output as compact labels such as `272K` and `128K`. Older conversations that saved `Off` or `Minimal` switch to the current model default only after the user explicitly clicks the repair action.
|
|
41
|
+
|
|
42
|
+
### Compatibility
|
|
43
|
+
|
|
44
|
+
- Exact support targets DeepSeek Harness `0.1.1-rc.2` and Node.js `>=22.19.0 <25`; other DSH prereleases are not claimed compatible.
|
|
45
|
+
- Linux, macOS, and Windows CI/profile smoke for 0.0.2 reached `3/3`; the accepted commit, exact Node versions, and job links are recorded in the acceptance record, with maintainer approval.
|
|
46
|
+
- Usage windows were verified in the local DSH settings page. Live OAuth, conversation, image, transport, and Fast network acceptance remains `0/13 pending` and will be completed item by item in the acceptance record after publication.
|
|
47
|
+
- This release does not provide image generation or editing.
|
|
48
|
+
|
|
49
|
+
### Acceptance record
|
|
50
|
+
|
|
51
|
+
- [`v0.0.2.acceptance.json`](v0.0.2.acceptance.json)
|
|
52
|
+
|
|
53
|
+
### Artifact verification
|
|
54
|
+
|
|
55
|
+
- SHA-256: the matching `.sha256` asset, recomputed against the `.tgz` before publication
|
|
56
|
+
- SRI: the matching `.sri` asset, compared character for character with Registry `dist.integrity` after publication
|
package/docs/releasing.en.md
CHANGED
|
@@ -253,7 +253,7 @@ npm allows Trusted Publisher configuration only for a package that **already exi
|
|
|
253
253
|
```
|
|
254
254
|
|
|
255
255
|
4. approve the `npm-release` environment. The workflow injects this secret into `npm publish` only when it must create the absent `0.0.1`, and generates provenance on a GitHub-hosted runner;
|
|
256
|
-
5. once the package exists, open its **Settings → Trusted Publisher** and enter:
|
|
256
|
+
5. once the package exists, open its **Settings → Trusted Publisher** and enter: Provider `GitHub Actions`, Organization or user `yoshino-xiao7`, Repository `dsh-codex`, Workflow filename `release.yml`, Environment name `npm-release`, and select only `npm publish` under Allowed actions;
|
|
257
257
|
6. revoke the npm token and delete the GitHub environment secret:
|
|
258
258
|
|
|
259
259
|
```sh
|
package/docs/releasing.md
CHANGED
|
@@ -253,7 +253,7 @@ npm 只允许给**已经存在**的包配置 Trusted Publisher,因此新包第
|
|
|
253
253
|
```
|
|
254
254
|
|
|
255
255
|
4. 审批 `npm-release` environment。工作流只在实际需要写入不存在的 `0.0.1` 时把该 secret 注入 `npm publish`,并在 GitHub 托管 runner 上生成 provenance;
|
|
256
|
-
5. npm 包出现后,在包的 **Settings → Trusted Publisher** 中填写:Provider `GitHub Actions`、
|
|
256
|
+
5. npm 包出现后,在包的 **Settings → Trusted Publisher** 中填写:Provider `GitHub Actions`、Organization or user `yoshino-xiao7`、Repository `dsh-codex`、Workflow filename `release.yml`、Environment name `npm-release`,并在 Allowed actions 中只选择 `npm publish`;
|
|
257
257
|
6. 撤销 npm token,并删除 GitHub environment secret:
|
|
258
258
|
|
|
259
259
|
```sh
|
|
@@ -23,17 +23,33 @@ This is an exhausted account usage window, not a transient request-rate limit. T
|
|
|
23
23
|
- preserves already visible safe text when possible;
|
|
24
24
|
- does not claim that another transport or repeated requests can bypass account quota.
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
Whenever the settings page opens or Refresh is clicked manually, the Host requests the real five-hour and weekly usage windows. `/codex-usage` remains a sanitized recent-request observation and provides a safe fallback when the live read is unavailable. A reset from a failure must pass strict format and bounded-horizon checks; otherwise an exhausted observation returns to “unknown” after a bounded interval.
|
|
27
27
|
|
|
28
28
|
Wait for reset, use another model/plan available to the account, or follow the options shown by the ChatGPT account surface. Never attach account screenshots, tokens, or the complete raw response to an issue.
|
|
29
29
|
|
|
30
|
+
## The five-hour or weekly limit does not refresh
|
|
31
|
+
|
|
32
|
+
The settings page reads usage through the Web-backend compatibility endpoint used by the official Codex client. A valid login does not prevent network, authentication, or endpoint-schema changes from making one refresh fail. The page never renders that failure as `0%` remaining and does not erase the latest verified reading. Without a reading to retain, it shows only recent-request observation or “unknown.”
|
|
33
|
+
|
|
34
|
+
Confirm the sign-in state, then try one manual refresh. If it still fails, check network access to ChatGPT/Codex services and the system clock, then sign in again. A report should contain only plugin and DSH versions, the time of failure, and a sanitized error category—never a token, account ID, request headers, or the raw usage response.
|
|
35
|
+
|
|
30
36
|
## `QUOTA_OR_RATE_LIMIT`
|
|
31
37
|
|
|
32
38
|
pi-ai may return only a generalized ChatGPT usage-limit message after discarding the original 429 body/code. The plugin cannot reliably distinguish account quota from transient rate limiting in that case, so it does not label the failure `QUOTA`, update quota observations, or retry automatically when no output exists. If safe plain text already exists, only that partial text is preserved; if a tool call appeared, the stream fails closed. Check the account surface or retry manually later instead of cycling transports.
|
|
33
39
|
|
|
34
40
|
## Fast is unavailable
|
|
35
41
|
|
|
36
|
-
|
|
42
|
+
First confirm that GPT-5.4, GPT-5.5, GPT-5.6 Luna, Sol, or Terra is selected. The lightning button is unavailable for GPT-5.3 Codex Spark, GPT-5.4 mini, and unknown models; those models never receive the Fast service tier. Click the lightning button to the left of the model selector, or run `/codex status` and `/codex set fast on|off`, to inspect and change the current-session state. The toggle applies to the next request and returns to off after a process restart.
|
|
43
|
+
|
|
44
|
+
Fast uses the official priority service tier, targets 1.5× speed, and consumes more usage. The plugin does not replay a failed request automatically on a lower tier. After disabling Fast, the user decides whether to send the request again.
|
|
45
|
+
|
|
46
|
+
## Models or reasoning levels differ from expectations
|
|
47
|
+
|
|
48
|
+
The settings page shows the installed provider catalog rather than a dynamic account model directory. The reasoning picker uses model-specific subscription-Codex levels and defaults verified by the plugin. It does not show `Default`, `Off`, or `Minimal`. All three GPT-5.6 models expose efforts through `Max`; Codex-client `Ultra` also enables proactive task delegation, and this Provider does not yet implement the matching Harness Agent orchestration, so it does not show an identically named but incomplete mode. Unknown models receive no inferred efforts.
|
|
49
|
+
|
|
50
|
+
If an older conversation saved `Off` or `Minimal`, click **Repair old reasoning level** beside the composer. The page does not migrate it automatically. The action selects the model's current default and, like a manual model-selector change, also saves that model as the default for future conversations.
|
|
51
|
+
|
|
52
|
+
Reopen settings, confirm that the target model is enabled, and check the exact installed plugin version. Do not infer capabilities from an old screenshot or model name. If the catalog and selector disagree, report sanitized model IDs and version information without OAuth credentials.
|
|
37
53
|
|
|
38
54
|
## A response stops halfway
|
|
39
55
|
|
|
@@ -44,4 +60,4 @@ Run `/codex status` to confirm whether Fast is enabled for the current session.
|
|
|
44
60
|
|
|
45
61
|
## Signed in but unavailable
|
|
46
62
|
|
|
47
|
-
First confirm the sign-in state under **Settings → Codex
|
|
63
|
+
First confirm the sign-in state under **Settings → OpenAI Codex**, ensure the target model is enabled on that same page, and then choose it from the `dsh-codex` provider group in the conversation model selector. A ChatGPT OAuth bearer is not an OpenAI Platform API key. If refresh fails, sign out on that settings page and sign in again. Removing the package does not automatically erase the grant.
|
package/docs/troubleshooting.md
CHANGED
|
@@ -23,17 +23,33 @@
|
|
|
23
23
|
- 在安全情况下保存已经显示的纯文本;
|
|
24
24
|
- 不承诺通过换 transport 或重复请求绕过账户额度。
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
设置页每次进入以及手动点击“刷新”时,会由 Host 请求真实的五小时与每周使用窗口。`/codex-usage` 仍是最近请求产生的脱敏观测,用于实时读取不可用时的安全降级。failure 中的 reset 必须通过严格格式和有限时距校验,否则耗尽观测会在有限时间后回到“未知”。
|
|
27
27
|
|
|
28
28
|
请等待重置、使用账户允许的其他模型/方案,或按 ChatGPT 账户页面提供的选项处理。不要在 Issue 中提交账户截图、token 或完整原始响应。
|
|
29
29
|
|
|
30
|
+
## 五小时或每周额度无法刷新
|
|
31
|
+
|
|
32
|
+
设置页通过官方 Codex 客户端使用的 Web 后端兼容接口读取额度,因此登录有效但网络、鉴权或接口结构变化仍可能让本次刷新失败。页面不会把失败显示成剩余 `0%`,也不会清空最近一次已验证读数;没有可保留读数时,只会显示最近请求观测或“未知”。
|
|
33
|
+
|
|
34
|
+
先确认登录状态,再手动刷新一次。如果仍失败,请检查到 ChatGPT/Codex 服务的网络访问和系统时间,然后重新登录。报告问题时只提供插件版本、DSH 版本、发生时间和脱敏错误类别;不要提交 token、account ID、请求头或 usage 原始响应。
|
|
35
|
+
|
|
30
36
|
## `QUOTA_OR_RATE_LIMIT`
|
|
31
37
|
|
|
32
38
|
pi-ai 可能只返回通用的 ChatGPT usage-limit 文案,而不再提供原始 429 body/code。此时插件无法可靠区分账户配额与瞬时限流,因此不会把它写成 `QUOTA`、不会更新额度观测,也不会在无输出时自动重试。若已经产生安全纯文本,插件只保存该 partial;若已经出现工具调用,则失败关闭。请由用户确认账户页面或稍后手动重试,不要循环切换 transport。
|
|
33
39
|
|
|
34
40
|
## Fast 不可用
|
|
35
41
|
|
|
36
|
-
|
|
42
|
+
先确认当前选择的是 GPT-5.4、GPT-5.5、GPT-5.6 Luna、Sol 或 Terra;闪电按钮在 GPT-5.3 Codex Spark、GPT-5.4 mini 和未知模型上不可用,也不会发送 Fast service tier。点击模型选择器左侧的闪电按钮,或运行 `/codex status` 与 `/codex set fast on|off` 检查和修改当前会话状态。切换从下一次请求生效;进程重启后恢复关闭。
|
|
43
|
+
|
|
44
|
+
Fast 使用官方 priority service tier,目标速度为 1.5 倍并消耗更多额度。插件不会把失败请求自动降级重放;关闭 Fast 后,需要由用户决定是否重新发送请求。
|
|
45
|
+
|
|
46
|
+
## 模型或推理档位与预期不同
|
|
47
|
+
|
|
48
|
+
设置页显示当前安装的 provider catalog,不是账号动态模型目录;推理选择器使用插件逐模型核验的订阅 Codex 档位与默认值。当前不会显示 `Default`、`Off` 或 `Minimal`。GPT-5.6 三款显示到 `Max`;Codex 客户端中的 `Ultra` 还会开启主动任务委派,本 Provider 尚未实现对应的 Harness Agent 编排,所以不会显示一个只有名字相同、行为却不完整的 `Ultra`。未知模型不会获得推断档位。
|
|
49
|
+
|
|
50
|
+
旧会话若保存了 `Off` 或 `Minimal`,请点击输入框旁的“修复旧推理档位”。页面不会自动迁移;点击后会改用该模型当前默认档位,并像手动使用模型选择器一样,把该模型保存为未来新会话的默认模型。
|
|
51
|
+
|
|
52
|
+
请先重新进入设置页并确认已启用目标模型,再检查当前安装的精确插件版本。不要根据旧截图或模型名称猜测能力;若 catalog 与选择器不一致,请提交脱敏后的模型 ID 和版本信息,不要附 OAuth 凭据。
|
|
37
53
|
|
|
38
54
|
## 回复到一半中断
|
|
39
55
|
|
|
@@ -44,4 +60,4 @@ pi-ai 可能只返回通用的 ChatGPT usage-limit 文案,而不再提供原
|
|
|
44
60
|
|
|
45
61
|
## 登录后仍不可用
|
|
46
62
|
|
|
47
|
-
先在 **设置 → Codex
|
|
63
|
+
先在 **设置 → OpenAI Codex** 确认登录状态,并在同一页面确认目标模型已启用,再从会话模型选择器的 `dsh-codex` provider 组中选用。不要把 ChatGPT OAuth bearer 当成 OpenAI Platform API key。若 refresh 失败,先在该设置页退出再重新登录;卸载包不会自动删除 grant。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-codex-community",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "DeepSeek Harness Codex 社区接入 / Community Codex integration for DeepSeek Harness",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -48,6 +48,8 @@
|
|
|
48
48
|
"inject": [
|
|
49
49
|
"@deepseek-ai/dsh-client-connection",
|
|
50
50
|
"@deepseek-ai/dsh-client-runtime",
|
|
51
|
+
"@deepseek-ai/dsh-client-ui-conversation",
|
|
52
|
+
"@deepseek-ai/dsh-client-ui-model-selection",
|
|
51
53
|
"@deepseek-ai/dsh-client-ui-settings",
|
|
52
54
|
"@deepseek-ai/dsh-client-locale"
|
|
53
55
|
],
|
|
@@ -94,6 +96,8 @@
|
|
|
94
96
|
"@deepseek-ai/dsh-client-connection": "0.1.1-rc.2",
|
|
95
97
|
"@deepseek-ai/dsh-client-locale": "0.1.1-rc.2",
|
|
96
98
|
"@deepseek-ai/dsh-client-runtime": "0.1.1-rc.2",
|
|
99
|
+
"@deepseek-ai/dsh-client-ui-conversation": "0.1.1-rc.2",
|
|
100
|
+
"@deepseek-ai/dsh-client-ui-model-selection": "0.1.1-rc.2",
|
|
97
101
|
"@deepseek-ai/dsh-client-ui-settings": "0.1.1-rc.2",
|
|
98
102
|
"@deepseek-ai/dsh-commands": "0.1.1-rc.2",
|
|
99
103
|
"@deepseek-ai/dsh-credentials": "0.1.1-rc.2",
|
|
@@ -112,6 +116,12 @@
|
|
|
112
116
|
"@deepseek-ai/dsh-client-runtime": {
|
|
113
117
|
"optional": true
|
|
114
118
|
},
|
|
119
|
+
"@deepseek-ai/dsh-client-ui-conversation": {
|
|
120
|
+
"optional": true
|
|
121
|
+
},
|
|
122
|
+
"@deepseek-ai/dsh-client-ui-model-selection": {
|
|
123
|
+
"optional": true
|
|
124
|
+
},
|
|
115
125
|
"@deepseek-ai/dsh-client-ui-settings": {
|
|
116
126
|
"optional": true
|
|
117
127
|
},
|
package/types/client.d.ts
CHANGED
|
@@ -47,6 +47,25 @@ export interface AuthorizationStatus {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
export interface CodexUsageWindow {
|
|
51
|
+
usedPercent: number
|
|
52
|
+
windowDurationMins: number
|
|
53
|
+
resetsAt: number
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface CodexUsageRateLimit {
|
|
57
|
+
limitId: string
|
|
58
|
+
limitName?: string
|
|
59
|
+
primary?: CodexUsageWindow
|
|
60
|
+
secondary?: CodexUsageWindow
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface CodexAccountUsage {
|
|
64
|
+
observedAt: number
|
|
65
|
+
planType?: string
|
|
66
|
+
rateLimits: readonly CodexUsageRateLimit[]
|
|
67
|
+
}
|
|
68
|
+
|
|
50
69
|
export interface AuthorizationClient {
|
|
51
70
|
describe(signal?: AbortSignal): Promise<AuthorizationStatus>
|
|
52
71
|
watch(attemptId: string, after: number, signal?: AbortSignal): Promise<{
|
|
@@ -63,11 +82,41 @@ export interface AuthorizationClient {
|
|
|
63
82
|
reason?: "commit-in-progress"
|
|
64
83
|
}>
|
|
65
84
|
logout(): Promise<{ signedOut: boolean }>
|
|
85
|
+
usage(signal?: AbortSignal): Promise<CodexAccountUsage>
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface CodexSessionPreference {
|
|
89
|
+
fast: boolean
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface SessionPreferenceClient {
|
|
93
|
+
get(signal?: AbortSignal): Promise<CodexSessionPreference>
|
|
94
|
+
setFast(fast: boolean, signal?: AbortSignal): Promise<CodexSessionPreference>
|
|
66
95
|
}
|
|
67
96
|
|
|
97
|
+
export interface SessionPreferenceClientFactory {
|
|
98
|
+
forSession(sessionId: string): SessionPreferenceClient
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export interface CodexCurrentModel {
|
|
102
|
+
provider: string
|
|
103
|
+
model: string
|
|
104
|
+
reasoningEffort?: string
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export interface CodexModelDirectoryState {
|
|
108
|
+
current?: CodexCurrentModel | null
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export type UseCodexModelDirectory = <Selected>(
|
|
112
|
+
selector: (state: CodexModelDirectoryState) => Selected,
|
|
113
|
+
) => Selected
|
|
114
|
+
|
|
68
115
|
export interface CodexModelCatalogEntry {
|
|
69
116
|
id: string
|
|
70
117
|
name?: string
|
|
118
|
+
contextWindow?: number
|
|
119
|
+
maxTokens?: number
|
|
71
120
|
}
|
|
72
121
|
|
|
73
122
|
export interface CodexModelEnablementSnapshot {
|
|
@@ -131,6 +180,9 @@ export interface RpcConnection {
|
|
|
131
180
|
}
|
|
132
181
|
|
|
133
182
|
export declare function createAuthorizationClient(connection: RpcConnection): AuthorizationClient
|
|
183
|
+
export declare function createSessionPreferenceClient(
|
|
184
|
+
connection: RpcConnection,
|
|
185
|
+
): SessionPreferenceClientFactory
|
|
134
186
|
export declare function createModelEnablementClient(
|
|
135
187
|
connection: unknown,
|
|
136
188
|
settingsFace?: SettingsDescribeFace,
|
|
@@ -148,6 +200,13 @@ export declare function AuthorizationSettings(props: {
|
|
|
148
200
|
client: AuthorizationClient
|
|
149
201
|
t(key: string): string
|
|
150
202
|
}): unknown
|
|
203
|
+
export declare function CodexFastToggle(props: {
|
|
204
|
+
session?: { removed?: boolean }
|
|
205
|
+
useModelDirectory: UseCodexModelDirectory
|
|
206
|
+
preferenceClient: SessionPreferenceClient
|
|
207
|
+
selectModel?(selection: CodexCurrentModel): Promise<void> | void
|
|
208
|
+
t(key: string): string
|
|
209
|
+
}): unknown
|
|
151
210
|
export declare function ModelEnablementSettings(props: {
|
|
152
211
|
client: ModelEnablementClient
|
|
153
212
|
t(key: string): string
|