@eddyskywalker/dsh-chatgpt-subscription 0.1.9 → 0.1.11
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 +11 -1
- package/README.md +17 -7
- package/lib/client.js +442 -28
- package/lib/client.js.map +1 -1
- package/lib/index.js +720 -248
- package/lib/types/client/CodexComposerQuota.d.ts +13 -0
- package/lib/types/client/CodexComposerQuota.d.ts.map +1 -0
- package/lib/types/client/CodexImageToolView.d.ts +10 -0
- package/lib/types/client/CodexImageToolView.d.ts.map +1 -0
- package/lib/types/client/CodexSubscriptionSection.d.ts.map +1 -1
- package/lib/types/client/api.d.ts +2 -1
- package/lib/types/client/api.d.ts.map +1 -1
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/locales.d.ts +57 -3
- package/lib/types/client/locales.d.ts.map +1 -1
- package/lib/types/client/quota.d.ts +9 -0
- package/lib/types/client/quota.d.ts.map +1 -0
- package/lib/types/client/styles.d.ts.map +1 -1
- package/lib/types/compat.d.ts +7 -0
- package/lib/types/compat.d.ts.map +1 -1
- package/lib/types/host/codex-images.d.ts +9 -0
- package/lib/types/host/codex-images.d.ts.map +1 -0
- package/lib/types/host/codex-search.d.ts +11 -0
- package/lib/types/host/codex-search.d.ts.map +1 -0
- package/lib/types/host/model-catalog.d.ts.map +1 -1
- package/lib/types/host/preferences.d.ts +12 -0
- package/lib/types/host/preferences.d.ts.map +1 -0
- package/lib/types/host/responses-mapper.d.ts +1 -2
- package/lib/types/host/responses-mapper.d.ts.map +1 -1
- package/lib/types/host/routes.d.ts +2 -1
- package/lib/types/host/routes.d.ts.map +1 -1
- package/lib/types/host/search-provider-switcher.d.ts +15 -0
- package/lib/types/host/search-provider-switcher.d.ts.map +1 -0
- package/lib/types/host/usage-service.d.ts +2 -1
- package/lib/types/host/usage-service.d.ts.map +1 -1
- package/lib/types/index.d.ts +3 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/shared/contracts.d.ts +40 -3
- package/lib/types/shared/contracts.d.ts.map +1 -1
- package/lib/types/shared/model-catalog.d.ts +81 -0
- package/lib/types/shared/model-catalog.d.ts.map +1 -0
- package/lib/types/shared/preferences.d.ts +7 -0
- package/lib/types/shared/preferences.d.ts.map +1 -0
- package/package.json +21 -2
- package/lib/types/host/subagent-report-scheduling-compat.d.ts +0 -21
- package/lib/types/host/subagent-report-scheduling-compat.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.1.
|
|
3
|
+
## 0.1.11 - 2026-08-18
|
|
4
|
+
|
|
5
|
+
- 移除临时子代理报告去重兼容模块:按照标记 `DSH_COMPAT_REMOVE(subagent-report-settlement-dedup)` 安全移除 `subagent-report-scheduling-compat` 模块、相关测试及插件中的 `agents` 依赖注入与挂钩清理逻辑。
|
|
6
|
+
- 扩展 Codex usage 解析,支持 `additional_rate_limits`、Credits、月度消费控制与 reset credits,并在设置页展示。
|
|
7
|
+
- 新增 ChatGPT 订阅侧 Codex 搜索 provider,可在设置页切换 DSH 默认搜索或 `codex-subscription` 搜索来源。
|
|
8
|
+
- 新增 `codex_image_generate` 图片生成工具,使用 Codex 图片 endpoint 生成 PNG 并保存为 DSH 图片附件,同时提供会话内工具结果渲染。
|
|
9
|
+
- 新增 composer 快捷用量徽标开关;当前会话选择 `codex-chatgpt` 模型时,可显示最紧张限额窗口的剩余额度。
|
|
10
|
+
- 统一模型目录显示名与 Codex App 风格:`5.6 Sol`、`5.6 Terra`、`5.6 Luna`、`5.5`、`5.4`、`5.4 Mini`、`5.3 Codex Spark`,并为 Spark 避免发送不兼容的 `reasoning.summary`。
|
|
11
|
+
|
|
12
|
+
## 0.1.10 - 2026-08-17
|
|
4
13
|
|
|
5
14
|
- 移除临时 Bash Prompt 兼容模块:由于上游 DSH `0.1.0-rc.7` 已经原生修复持久化 Bash 提示符不匹配与重置问题,现按照标记 `DSH_COMPAT_REMOVE(persistent-bash-prompt-mismatch)` 安全移除全部相关兼容代码与测试。保留子代理报告去重兼容模块 `DSH_COMPAT_REMOVE(subagent-report-settlement-dedup)`。
|
|
15
|
+
- 增强 Responses Mapper 对 DSH `0.1.0-rc.7` 中新版规范 `ReplayEnvelope` 嵌套结构(`response.outputItems`)的兼容解构支持。
|
|
6
16
|
|
|
7
17
|
## 0.1.8 - 2026-08-17
|
|
8
18
|
|
package/README.md
CHANGED
|
@@ -31,17 +31,27 @@
|
|
|
31
31
|
- 固定 Codex Responses 地址,支持流式文本、reasoning summary、图片输入与工具调用/结果;
|
|
32
32
|
- 原样转发 DSH 暴露的工具 schema;命令工具兼容 `pwsh` / `powershell`、`bash`、`sh` 与 `shell`,并按 PowerShell、Bash 或 POSIX sh 注入对应说明;
|
|
33
33
|
- 429/5xx 由 DSH retry policy 接管;401 只强制刷新并重试一次,支持 `AbortSignal`;
|
|
34
|
-
- Codex
|
|
35
|
-
-
|
|
34
|
+
- Codex、Code review 及上游返回的额外窗口额度,支持 Credits、月度消费控制与 reset credits 展示;60 秒缓存、15 秒上游节流并遵守 `Retry-After`;
|
|
35
|
+
- 提供 ChatGPT 订阅侧 Codex 搜索 provider,可在设置页切换 DSH 默认搜索或 Codex 订阅搜索;
|
|
36
|
+
- 新增 `codex_image_generate` 工具,生成图片后通过 DSH 附件系统保存并在会话中渲染;
|
|
37
|
+
- 可选 composer 快捷用量徽标,按当前 `codex-chatgpt` 模型显示最紧张窗口的剩余额度。
|
|
36
38
|
|
|
37
39
|
**设置页**
|
|
38
40
|
|
|
39
|
-
- 展示账号(脱敏 email、套餐、账号 ID
|
|
41
|
+
- 展示账号(脱敏 email、套餐、账号 ID 后四位)、连接状态、额度与订阅增强功能开关;
|
|
40
42
|
- 可访问的进度条、窄窗口/200% 缩放布局、深浅主题与 reduced-motion。
|
|
41
43
|
|
|
42
44
|
## 模型目录
|
|
43
45
|
|
|
44
|
-
|
|
46
|
+
| 显示名 | 模型 slug |
|
|
47
|
+
| --- | --- |
|
|
48
|
+
| 5.6 Sol | `gpt-5.6-sol` |
|
|
49
|
+
| 5.6 Terra | `gpt-5.6-terra` |
|
|
50
|
+
| 5.6 Luna | `gpt-5.6-luna` |
|
|
51
|
+
| 5.5 | `gpt-5.5` |
|
|
52
|
+
| 5.4 | `gpt-5.4` |
|
|
53
|
+
| 5.4 Mini | `gpt-5.4-mini` |
|
|
54
|
+
| 5.3 Codex Spark | `gpt-5.3-codex-spark` |
|
|
45
55
|
|
|
46
56
|
> 目录只用于展示;账号实际可用的模型由 ChatGPT 套餐、workspace 策略与上游兼容状态决定。
|
|
47
57
|
|
|
@@ -113,7 +123,7 @@ DSH 模型选择器应显示 **“Codex(ChatGPT 订阅)”**。
|
|
|
113
123
|
|
|
114
124
|
- OAuth 回调固定为 `http://localhost:1455/auth/callback`,登录任务五分钟超时,同一时刻只允许一个;
|
|
115
125
|
- OAuth token 只发送到 `https://auth.openai.com/oauth/token`;
|
|
116
|
-
-
|
|
126
|
+
- 模型、图片、搜索与额度地址分别固定为 `https://chatgpt.com/backend-api/codex/responses`、`https://chatgpt.com/backend-api/codex/images/generations`、`https://chatgpt.com/backend-api/codex/alpha/search` 和 `https://chatgpt.com/backend-api/wham/usage`,没有 endpoint override;
|
|
117
127
|
- Windows token bundle 使用 CurrentUser DPAPI;明文只经过 Host 内存和 PowerShell stdin/stdout;
|
|
118
128
|
- Linux token bundle 原子写入当前用户私有文件并在读取时校验普通文件、所有者与 `0600` 权限,同时拒绝符号链接;该文件没有应用层加密,同 UID 进程、root、备份和磁盘快照仍可读取;
|
|
119
129
|
- 两个平台的 token 都不会进入浏览器、`settings.yaml` 或日志;
|
|
@@ -134,6 +144,7 @@ DSH 模型选择器应显示 **“Codex(ChatGPT 订阅)”**。
|
|
|
134
144
|
| POST | `/token/refresh` | 刷新 token |
|
|
135
145
|
| POST | `/quota/refresh` | 刷新额度 |
|
|
136
146
|
| POST | `/connection/test` | 测试连接 |
|
|
147
|
+
| POST | `/preferences/update` | 更新搜索来源和 composer 快捷用量偏好 |
|
|
137
148
|
|
|
138
149
|
状态响应只包含脱敏 email、套餐、账号 ID 后四位、token 到期时间和额度 DTO。
|
|
139
150
|
|
|
@@ -159,5 +170,4 @@ npm pack --dry-run
|
|
|
159
170
|
| 模型不可用 | 检查 ChatGPT 套餐、workspace 权限与当前模型可用性 |
|
|
160
171
|
| DPAPI 读取失败 | 确认 DSH 以创建凭据时的同一 Windows 用户运行;必要时清理凭据后重新登录 |
|
|
161
172
|
| Linux 凭据存储不可用 | 确认凭据属于当前用户且权限为 `0600`,父目录权限为 `0700`;修复权限或注销后重新登录 |
|
|
162
|
-
| Linux 上工具调用语法错误 | 确认 DSH 暴露的是 `bash`、`sh` 或 `shell`,并使用相应的 Bash/POSIX 语法与 `/` 路径 |
|
|
163
|
-
| 父 Agent 已收到子代理结果,但相同报告仍显示为排队消息 | 本插件为 DSH `0.1.0-rc.6` 提供临时 report/settlement 精确去重;升级或重载插件并新建会话后验证。若未来 DSH 已原生修复,可移除所有 `DSH_COMPAT_REMOVE(subagent-report-settlement-dedup)` 标记代码 |
|
|
173
|
+
| Linux 上工具调用语法错误 | 确认 DSH 暴露的是 `bash`、`sh` 或 `shell`,并使用相应的 Bash/POSIX 语法与 `/` 路径 |
|