dsh-codex-subscription 2.5.9 → 2.6.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/README.en.md +12 -5
- package/README.md +12 -5
- package/compatibility.json +2 -1
- package/lib/client.js +157 -6
- package/lib/index.js +159 -25
- package/package.json +18 -18
package/README.en.md
CHANGED
|
@@ -106,7 +106,7 @@ This plugin supports the latest DeepSeek Harness release recorded in its package
|
|
|
106
106
|
2. Paste this package name, with its version, into the **Package name or address** field:
|
|
107
107
|
|
|
108
108
|
```text
|
|
109
|
-
dsh-codex-subscription@2.
|
|
109
|
+
dsh-codex-subscription@2.6.1
|
|
110
110
|
```
|
|
111
111
|
|
|
112
112
|
3. Click **Install** and wait for completion. Follow the page instructions; save your work before restarting if requested.
|
|
@@ -118,7 +118,7 @@ Why the version is included: DSH's plugin page only installs versions that are a
|
|
|
118
118
|
<summary>Terminal installation (with an existing dsh command)</summary>
|
|
119
119
|
|
|
120
120
|
```sh
|
|
121
|
-
dsh plugin --profile web add dsh-codex-subscription
|
|
121
|
+
dsh plugin --profile web add dsh-codex-subscription@2.6.1
|
|
122
122
|
```
|
|
123
123
|
|
|
124
124
|
Follow the restart instructions, then sign in under **Settings → Codex**. Both the Plugins page and the terminal use DSH's installation management.
|
|
@@ -131,7 +131,7 @@ Follow the restart instructions, then sign in under **Settings → Codex**. Both
|
|
|
131
131
|
After signing in and selecting a Codex model in Web, install the same plugin in the Headless profile:
|
|
132
132
|
|
|
133
133
|
```sh
|
|
134
|
-
dsh plugin --profile headless add dsh-codex-subscription
|
|
134
|
+
dsh plugin --profile headless add dsh-codex-subscription@2.6.1
|
|
135
135
|
dsh --profile headless "Reply with only the word: ok"
|
|
136
136
|
```
|
|
137
137
|
|
|
@@ -266,7 +266,7 @@ Find this plugin on the DSH **Plugins** page and use its update or uninstall act
|
|
|
266
266
|
<summary>Terminal commands</summary>
|
|
267
267
|
|
|
268
268
|
```sh
|
|
269
|
-
dsh plugin --profile web update dsh-codex-subscription
|
|
269
|
+
dsh plugin --profile web update dsh-codex-subscription@2.6.1
|
|
270
270
|
```
|
|
271
271
|
|
|
272
272
|
Run only when you want to uninstall:
|
|
@@ -282,7 +282,14 @@ dsh plugin --profile web remove dsh-codex-subscription
|
|
|
282
282
|
<details>
|
|
283
283
|
<summary>DSH 0.2.0-rc.2 reports the plugin as incompatible?</summary>
|
|
284
284
|
|
|
285
|
-
DSH 0.2.0-rc.2 did not exist when any release before 2.2.10 was published, and a published package's compatibility declaration cannot be changed. Install 2.2.10 or later (a bare package name can resolve to an older release during the first 24 hours, so enter `dsh-codex-subscription@2.2.10`) from the **Plugins** page, or run `dsh plugin --profile web update dsh-codex-subscription`, then restart DSH.
|
|
285
|
+
DSH 0.2.0-rc.2 did not exist when any release before 2.2.10 was published, and a published package's compatibility declaration cannot be changed. Install 2.2.10 or later (a bare package name can resolve to an older release during the first 24 hours, so enter `dsh-codex-subscription@2.2.10`) from the **Plugins** page, or run `dsh plugin --profile web update dsh-codex-subscription@2.6.1`, then restart DSH.
|
|
286
|
+
|
|
287
|
+
</details>
|
|
288
|
+
|
|
289
|
+
<details>
|
|
290
|
+
<summary>How does this relate to the official Codex bundle (dsh-hooks-codex) in the plugin list?</summary>
|
|
291
|
+
|
|
292
|
+
They are unrelated and can be installed together. The official Codex / Claude Code bundles let DSH run Codex or Claude Code style hooks configs (scripts that run before and after tool calls). This plugin signs in with your ChatGPT subscription and provides Codex models, quota, search, images and phone remote control.
|
|
286
293
|
|
|
287
294
|
</details>
|
|
288
295
|
|
package/README.md
CHANGED
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
2. 在 **包名或地址** 输入框中粘贴下面的包名(已带版本号):
|
|
107
107
|
|
|
108
108
|
```text
|
|
109
|
-
dsh-codex-subscription@2.
|
|
109
|
+
dsh-codex-subscription@2.6.1
|
|
110
110
|
```
|
|
111
111
|
|
|
112
112
|
3. 点击 **安装**,等待安装完成;按页面提示操作,需要重启时先保存工作。
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
<summary>终端安装(已能运行 dsh 命令)</summary>
|
|
119
119
|
|
|
120
120
|
```sh
|
|
121
|
-
dsh plugin --profile web add dsh-codex-subscription
|
|
121
|
+
dsh plugin --profile web add dsh-codex-subscription@2.6.1
|
|
122
122
|
```
|
|
123
123
|
|
|
124
124
|
安装完成后按提示重启 DSH,再到 **设置 → Codex 订阅** 登录。插件页面和终端均由 DSH 管理安装。
|
|
@@ -131,7 +131,7 @@ dsh plugin --profile web add dsh-codex-subscription
|
|
|
131
131
|
先在 Web 中完成登录并选择一次 Codex 模型,再把同一个插件安装到 Headless profile:
|
|
132
132
|
|
|
133
133
|
```sh
|
|
134
|
-
dsh plugin --profile headless add dsh-codex-subscription
|
|
134
|
+
dsh plugin --profile headless add dsh-codex-subscription@2.6.1
|
|
135
135
|
dsh --profile headless "只回复:ok"
|
|
136
136
|
```
|
|
137
137
|
|
|
@@ -295,7 +295,7 @@ DSH 实机设置截图。
|
|
|
295
295
|
<summary>终端方式</summary>
|
|
296
296
|
|
|
297
297
|
```sh
|
|
298
|
-
dsh plugin --profile web update dsh-codex-subscription
|
|
298
|
+
dsh plugin --profile web update dsh-codex-subscription@2.6.1
|
|
299
299
|
```
|
|
300
300
|
|
|
301
301
|
仅在需要卸载时运行:
|
|
@@ -311,7 +311,14 @@ dsh plugin --profile web remove dsh-codex-subscription
|
|
|
311
311
|
<details>
|
|
312
312
|
<summary>DSH 0.2.0-rc.2 提示插件不兼容?</summary>
|
|
313
313
|
|
|
314
|
-
2.2.10 之前的所有版本发布时 DSH 0.2.0-rc.2 还不存在,其兼容声明无法事后修改。请安装 2.2.10 或更高版本(只填包名时,发布满 24 小时前可能装到旧版,请直接填 `dsh-codex-subscription@2.2.10`):在 **插件** 页面更新,或运行 `dsh plugin --profile web update dsh-codex-subscription`,然后重启 DSH。
|
|
314
|
+
2.2.10 之前的所有版本发布时 DSH 0.2.0-rc.2 还不存在,其兼容声明无法事后修改。请安装 2.2.10 或更高版本(只填包名时,发布满 24 小时前可能装到旧版,请直接填 `dsh-codex-subscription@2.2.10`):在 **插件** 页面更新,或运行 `dsh plugin --profile web update dsh-codex-subscription@2.6.1`,然后重启 DSH。
|
|
315
|
+
|
|
316
|
+
</details>
|
|
317
|
+
|
|
318
|
+
<details>
|
|
319
|
+
<summary>和官方插件列表里的 Codex 组合包(dsh-hooks-codex)是什么关系?</summary>
|
|
320
|
+
|
|
321
|
+
没有关系,可以同时安装。官方的 Codex / Claude Code 组合包让 DSH 运行 Codex 或 Claude Code 格式的 hooks 配置(工具调用前后自动执行的脚本);本插件负责用 ChatGPT 订阅登录、使用 Codex 模型、查看额度、搜索、生图和手机远程控制。
|
|
315
322
|
|
|
316
323
|
</details>
|
|
317
324
|
|
package/compatibility.json
CHANGED
package/lib/client.js
CHANGED
|
@@ -5676,6 +5676,19 @@ window.__ModuleLoader__.load({
|
|
|
5676
5676
|
inputImageDetail_low: "低",
|
|
5677
5677
|
inputImageDetail_high: "高",
|
|
5678
5678
|
inputImageDetail_original: "原图",
|
|
5679
|
+
reasoningSummary: "推理摘要",
|
|
5680
|
+
reasoningSummaryHint: "让模型在会话的“思考”部分给出推理摘要。自动由模型决定;简洁更短;详细更完整;关闭则不要摘要。",
|
|
5681
|
+
retryPolicy: "请求重试",
|
|
5682
|
+
retryPolicyHint: "请求因网络或服务端错误失败时的自动重试次数。默认沿用 DSH 的标准重试;无限会一直重试直到成功或手动停止。",
|
|
5683
|
+
retryPolicy_default: "默认",
|
|
5684
|
+
retryPolicy_off: "不重试",
|
|
5685
|
+
retryPolicy_10: "10 次",
|
|
5686
|
+
retryPolicy_20: "20 次",
|
|
5687
|
+
retryPolicy_unlimited: "无限",
|
|
5688
|
+
reasoningSummary_auto: "自动",
|
|
5689
|
+
reasoningSummary_concise: "简洁",
|
|
5690
|
+
reasoningSummary_detailed: "详细",
|
|
5691
|
+
reasoningSummary_none: "关闭",
|
|
5679
5692
|
subagentBackendTitle: "独立子任务",
|
|
5680
5693
|
subagentBackend_dsh: "DSH",
|
|
5681
5694
|
subagentBackend_codex: "Codex",
|
|
@@ -6263,6 +6276,19 @@ window.__ModuleLoader__.load({
|
|
|
6263
6276
|
inputImageDetail_low: "Low",
|
|
6264
6277
|
inputImageDetail_high: "High",
|
|
6265
6278
|
inputImageDetail_original: "Original",
|
|
6279
|
+
reasoningSummary: "Reasoning summary",
|
|
6280
|
+
reasoningSummaryHint: "Shows a summary of the reasoning in the Thinking section of the conversation. Auto lets the model decide; concise is shorter; detailed is fuller; off asks for none.",
|
|
6281
|
+
retryPolicy: "Request retries",
|
|
6282
|
+
retryPolicyHint: "How many times a request is retried after a network or server error. Default keeps the standard DSH retries; Unlimited keeps retrying until it succeeds or you stop it.",
|
|
6283
|
+
retryPolicy_default: "Default",
|
|
6284
|
+
retryPolicy_off: "No retries",
|
|
6285
|
+
retryPolicy_10: "10",
|
|
6286
|
+
retryPolicy_20: "20",
|
|
6287
|
+
retryPolicy_unlimited: "Unlimited",
|
|
6288
|
+
reasoningSummary_auto: "Auto",
|
|
6289
|
+
reasoningSummary_concise: "Concise",
|
|
6290
|
+
reasoningSummary_detailed: "Detailed",
|
|
6291
|
+
reasoningSummary_none: "Off",
|
|
6266
6292
|
subagentBackendTitle: "Independent subtasks",
|
|
6267
6293
|
subagentBackend_dsh: "DSH",
|
|
6268
6294
|
subagentBackend_codex: "Codex",
|
|
@@ -8368,6 +8394,23 @@ window.__ModuleLoader__.load({
|
|
|
8368
8394
|
const OUTPUT_VERBOSITY_MEDIUM = "medium";
|
|
8369
8395
|
const OUTPUT_VERBOSITY_HIGH = "high";
|
|
8370
8396
|
const DEFAULT_OUTPUT_VERBOSITY = OUTPUT_VERBOSITY_DEFAULT;
|
|
8397
|
+
const REASONING_SUMMARY_FIELD = "reasoningSummary";
|
|
8398
|
+
const REASONING_SUMMARIES = Object.freeze([
|
|
8399
|
+
"auto",
|
|
8400
|
+
"concise",
|
|
8401
|
+
"detailed",
|
|
8402
|
+
"none"
|
|
8403
|
+
]);
|
|
8404
|
+
const DEFAULT_REASONING_SUMMARY = "auto";
|
|
8405
|
+
const RETRY_POLICY_FIELD = "retryPolicy";
|
|
8406
|
+
const RETRY_POLICIES = Object.freeze([
|
|
8407
|
+
"default",
|
|
8408
|
+
"off",
|
|
8409
|
+
"10",
|
|
8410
|
+
"20",
|
|
8411
|
+
"unlimited"
|
|
8412
|
+
]);
|
|
8413
|
+
const DEFAULT_RETRY_POLICY = "default";
|
|
8371
8414
|
const INPUT_IMAGE_DETAIL_FIELD = "inputImageDetail";
|
|
8372
8415
|
const INPUT_IMAGE_DETAILS = Object.freeze([
|
|
8373
8416
|
"low",
|
|
@@ -8427,6 +8470,8 @@ window.__ModuleLoader__.load({
|
|
|
8427
8470
|
"medium",
|
|
8428
8471
|
"high"
|
|
8429
8472
|
].includes(value) ? value : DEFAULT_OUTPUT_VERBOSITY;
|
|
8473
|
+
const normalizeReasoningSummary = (value) => REASONING_SUMMARIES.includes(value) ? value : DEFAULT_REASONING_SUMMARY;
|
|
8474
|
+
const normalizeRetryPolicy = (value) => RETRY_POLICIES.includes(value) ? value : DEFAULT_RETRY_POLICY;
|
|
8430
8475
|
const normalizeInputImageDetail = (value) => INPUT_IMAGE_DETAILS.includes(value) ? value : DEFAULT_INPUT_IMAGE_DETAIL;
|
|
8431
8476
|
const normalizeStreamIdleTimeoutMinutes = (value) => STREAM_IDLE_TIMEOUT_MINUTES.includes(value) ? value : 10;
|
|
8432
8477
|
const normalizeSpeedMode = (value) => [
|
|
@@ -8507,6 +8552,8 @@ window.__ModuleLoader__.load({
|
|
|
8507
8552
|
speedMode: normalizeSpeedMode(value?.[SPEED_MODE_FIELD]),
|
|
8508
8553
|
outputVerbosity: normalizeOutputVerbosity(value?.[OUTPUT_VERBOSITY_FIELD]),
|
|
8509
8554
|
inputImageDetail: normalizeInputImageDetail(value?.[INPUT_IMAGE_DETAIL_FIELD]),
|
|
8555
|
+
reasoningSummary: normalizeReasoningSummary(value?.[REASONING_SUMMARY_FIELD]),
|
|
8556
|
+
retryPolicy: normalizeRetryPolicy(value?.[RETRY_POLICY_FIELD]),
|
|
8510
8557
|
streamIdleTimeoutMinutes: normalizeStreamIdleTimeoutMinutes(value?.[STREAM_IDLE_TIMEOUT_MINUTES_FIELD]),
|
|
8511
8558
|
contextMode: normalizeContextMode(value?.[CONTEXT_MODE_FIELD]),
|
|
8512
8559
|
customContextWindow: normalizeCustomContextWindow(value?.[CUSTOM_CONTEXT_WINDOW_FIELD]),
|
|
@@ -8566,6 +8613,8 @@ window.__ModuleLoader__.load({
|
|
|
8566
8613
|
[SPEED_MODE_FIELD]: normalizeSpeedMode(value?.[SPEED_MODE_FIELD]),
|
|
8567
8614
|
[OUTPUT_VERBOSITY_FIELD]: normalizeOutputVerbosity(value?.[OUTPUT_VERBOSITY_FIELD]),
|
|
8568
8615
|
[INPUT_IMAGE_DETAIL_FIELD]: normalizeInputImageDetail(value?.[INPUT_IMAGE_DETAIL_FIELD]),
|
|
8616
|
+
[REASONING_SUMMARY_FIELD]: normalizeReasoningSummary(value?.[REASONING_SUMMARY_FIELD]),
|
|
8617
|
+
[RETRY_POLICY_FIELD]: normalizeRetryPolicy(value?.[RETRY_POLICY_FIELD]),
|
|
8569
8618
|
[STREAM_IDLE_TIMEOUT_MINUTES_FIELD]: normalizeStreamIdleTimeoutMinutes(value?.[STREAM_IDLE_TIMEOUT_MINUTES_FIELD]),
|
|
8570
8619
|
[CONTEXT_MODE_FIELD]: normalizeContextMode(value?.[CONTEXT_MODE_FIELD]),
|
|
8571
8620
|
[CUSTOM_CONTEXT_WINDOW_FIELD]: normalizeCustomContextWindow(value?.[CUSTOM_CONTEXT_WINDOW_FIELD]),
|
|
@@ -8995,7 +9044,6 @@ window.__ModuleLoader__.load({
|
|
|
8995
9044
|
const NS = "settings.codexSubscription";
|
|
8996
9045
|
const SUPPORT_ISSUE_URL = "https://github.com/WSL043/dsh-codex-subscription/issues/new?template=install-problem.yml";
|
|
8997
9046
|
const QUICK_QUOTA_REFRESH_EVENT = "dsh-codex-subscription:refresh-quick-quota";
|
|
8998
|
-
const QUICK_QUOTA_REFRESH_MS = 6e4;
|
|
8999
9047
|
const accountStatusErrorText = (error, t) => {
|
|
9000
9048
|
const key = {
|
|
9001
9049
|
"credential-unavailable": "accountCredentialUnavailable",
|
|
@@ -9091,7 +9139,7 @@ window.__ModuleLoader__.load({
|
|
|
9091
9139
|
}
|
|
9092
9140
|
//#endregion
|
|
9093
9141
|
//#region src/version.js
|
|
9094
|
-
const PACKAGE_VERSION = "2.
|
|
9142
|
+
const PACKAGE_VERSION = "2.6.1";
|
|
9095
9143
|
//#endregion
|
|
9096
9144
|
//#region src/client-recovery.js
|
|
9097
9145
|
async function recoveryCall(rpc, endpoint, payload = {}, timeoutMs = 1e4) {
|
|
@@ -9119,6 +9167,21 @@ window.__ModuleLoader__.load({
|
|
|
9119
9167
|
};
|
|
9120
9168
|
}
|
|
9121
9169
|
//#endregion
|
|
9170
|
+
//#region src/quota-cadence.js
|
|
9171
|
+
/** Milliseconds until the next quota read, from the highest used percentage of the windows that matter. */
|
|
9172
|
+
function quotaRefreshMs(percent) {
|
|
9173
|
+
if (!Number.isFinite(percent)) return 6e4;
|
|
9174
|
+
if (percent >= 99) return 5e3;
|
|
9175
|
+
if (percent >= 90) return 15e3;
|
|
9176
|
+
if (percent >= 75) return 3e4;
|
|
9177
|
+
return 6e4;
|
|
9178
|
+
}
|
|
9179
|
+
/** Highest used percentage among windows (objects with usedPercent), or undefined when there are none. */
|
|
9180
|
+
function highestUsed(windows) {
|
|
9181
|
+
const values = (Array.isArray(windows) ? windows : []).map((window) => window?.usedPercent).filter(Number.isFinite);
|
|
9182
|
+
return values.length === 0 ? void 0 : Math.max(...values);
|
|
9183
|
+
}
|
|
9184
|
+
//#endregion
|
|
9122
9185
|
//#region src/client-quota.jsx
|
|
9123
9186
|
function useQuickQuota(rpc, enabled, model) {
|
|
9124
9187
|
const [quota, setQuota] = (0, react.useState)();
|
|
@@ -9130,6 +9193,8 @@ window.__ModuleLoader__.load({
|
|
|
9130
9193
|
setQuota(void 0);
|
|
9131
9194
|
let live = true;
|
|
9132
9195
|
let loading = false;
|
|
9196
|
+
let timer;
|
|
9197
|
+
let latest;
|
|
9133
9198
|
const load = async () => {
|
|
9134
9199
|
if (loading) return;
|
|
9135
9200
|
loading = true;
|
|
@@ -9141,25 +9206,31 @@ window.__ModuleLoader__.load({
|
|
|
9141
9206
|
return;
|
|
9142
9207
|
}
|
|
9143
9208
|
const usage = await recoveryCall(rpc, "usage", { force: false });
|
|
9144
|
-
|
|
9209
|
+
const windows = selectModelQuotaWindows(usage, model)?.map((window) => ({
|
|
9145
9210
|
...window,
|
|
9146
9211
|
fetchedAt: usage.fetchedAt
|
|
9147
|
-
}))
|
|
9212
|
+
}));
|
|
9213
|
+
latest = windows;
|
|
9214
|
+
if (live) setQuota(windows);
|
|
9148
9215
|
} catch {
|
|
9216
|
+
latest = void 0;
|
|
9149
9217
|
if (live) setQuota(void 0);
|
|
9150
9218
|
} finally {
|
|
9151
9219
|
loading = false;
|
|
9220
|
+
if (live) {
|
|
9221
|
+
window.clearTimeout(timer);
|
|
9222
|
+
timer = window.setTimeout(refresh, quotaRefreshMs(highestUsed(latest)));
|
|
9223
|
+
}
|
|
9152
9224
|
}
|
|
9153
9225
|
};
|
|
9154
9226
|
const refresh = () => {
|
|
9155
9227
|
load();
|
|
9156
9228
|
};
|
|
9157
9229
|
load();
|
|
9158
|
-
const timer = window.setInterval(refresh, QUICK_QUOTA_REFRESH_MS);
|
|
9159
9230
|
window.addEventListener(QUICK_QUOTA_REFRESH_EVENT, refresh);
|
|
9160
9231
|
return () => {
|
|
9161
9232
|
live = false;
|
|
9162
|
-
window.
|
|
9233
|
+
window.clearTimeout(timer);
|
|
9163
9234
|
window.removeEventListener(QUICK_QUOTA_REFRESH_EVENT, refresh);
|
|
9164
9235
|
};
|
|
9165
9236
|
}, [
|
|
@@ -10404,6 +10475,76 @@ window.__ModuleLoader__.load({
|
|
|
10404
10475
|
})]
|
|
10405
10476
|
});
|
|
10406
10477
|
}
|
|
10478
|
+
function ReasoningSummaryPreference({ preference, t }) {
|
|
10479
|
+
const snapshot = usePreferenceSnapshot(preference);
|
|
10480
|
+
const writable = snapshot.status === "ready" && snapshot.writable === true;
|
|
10481
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
10482
|
+
className: "codexSubscriptionPreference",
|
|
10483
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
10484
|
+
className: "codexSubscriptionPreferenceCopy",
|
|
10485
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
10486
|
+
className: "codexSubscriptionPreferenceLabel",
|
|
10487
|
+
children: t("reasoningSummary")
|
|
10488
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
10489
|
+
className: "codexSubscriptionPreferenceHint",
|
|
10490
|
+
children: t("reasoningSummaryHint")
|
|
10491
|
+
})]
|
|
10492
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
10493
|
+
className: "codexSubscriptionQuotaModes",
|
|
10494
|
+
"data-saving": snapshot.saving || void 0,
|
|
10495
|
+
"aria-busy": snapshot.saving || void 0,
|
|
10496
|
+
role: "radiogroup",
|
|
10497
|
+
"aria-label": t("reasoningSummary"),
|
|
10498
|
+
children: REASONING_SUMMARIES.map((value) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
10499
|
+
className: "codexSubscriptionQuotaMode",
|
|
10500
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
10501
|
+
type: "radio",
|
|
10502
|
+
name: "codex-reasoning-summary",
|
|
10503
|
+
checked: snapshot.reasoningSummary === value,
|
|
10504
|
+
disabled: !writable,
|
|
10505
|
+
onChange: () => {
|
|
10506
|
+
preference.set({ [REASONING_SUMMARY_FIELD]: value });
|
|
10507
|
+
}
|
|
10508
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t(`reasoningSummary_${value}`) })]
|
|
10509
|
+
}, value))
|
|
10510
|
+
})]
|
|
10511
|
+
});
|
|
10512
|
+
}
|
|
10513
|
+
function RetryPolicyPreference({ preference, t }) {
|
|
10514
|
+
const snapshot = usePreferenceSnapshot(preference);
|
|
10515
|
+
const writable = snapshot.status === "ready" && snapshot.writable === true;
|
|
10516
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
10517
|
+
className: "codexSubscriptionPreference",
|
|
10518
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
10519
|
+
className: "codexSubscriptionPreferenceCopy",
|
|
10520
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
10521
|
+
className: "codexSubscriptionPreferenceLabel",
|
|
10522
|
+
children: t("retryPolicy")
|
|
10523
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
10524
|
+
className: "codexSubscriptionPreferenceHint",
|
|
10525
|
+
children: t("retryPolicyHint")
|
|
10526
|
+
})]
|
|
10527
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
10528
|
+
className: "codexSubscriptionQuotaModes",
|
|
10529
|
+
"data-saving": snapshot.saving || void 0,
|
|
10530
|
+
"aria-busy": snapshot.saving || void 0,
|
|
10531
|
+
role: "radiogroup",
|
|
10532
|
+
"aria-label": t("retryPolicy"),
|
|
10533
|
+
children: RETRY_POLICIES.map((value) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
10534
|
+
className: "codexSubscriptionQuotaMode",
|
|
10535
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
10536
|
+
type: "radio",
|
|
10537
|
+
name: "codex-retry-policy",
|
|
10538
|
+
checked: snapshot.retryPolicy === value,
|
|
10539
|
+
disabled: !writable,
|
|
10540
|
+
onChange: () => {
|
|
10541
|
+
preference.set({ [RETRY_POLICY_FIELD]: value });
|
|
10542
|
+
}
|
|
10543
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t(`retryPolicy_${value}`) })]
|
|
10544
|
+
}, value))
|
|
10545
|
+
})]
|
|
10546
|
+
});
|
|
10547
|
+
}
|
|
10407
10548
|
function StreamIdleTimeoutPreference({ preference, t }) {
|
|
10408
10549
|
const snapshot = usePreferenceSnapshot(preference);
|
|
10409
10550
|
const writable = snapshot.status === "ready" && snapshot.writable === true;
|
|
@@ -10707,6 +10848,16 @@ window.__ModuleLoader__.load({
|
|
|
10707
10848
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(InputImageDetailPreference, {
|
|
10708
10849
|
preference,
|
|
10709
10850
|
t
|
|
10851
|
+
}),
|
|
10852
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "codexSubscriptionDivider" }),
|
|
10853
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ReasoningSummaryPreference, {
|
|
10854
|
+
preference,
|
|
10855
|
+
t
|
|
10856
|
+
}),
|
|
10857
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "codexSubscriptionDivider" }),
|
|
10858
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(RetryPolicyPreference, {
|
|
10859
|
+
preference,
|
|
10860
|
+
t
|
|
10710
10861
|
})
|
|
10711
10862
|
]
|
|
10712
10863
|
}),
|
package/lib/index.js
CHANGED
|
@@ -14,7 +14,8 @@ import { constants, readFileSync } from "node:fs";
|
|
|
14
14
|
import { dirname, join, resolve } from "node:path";
|
|
15
15
|
import { pathToFileURL } from "node:url";
|
|
16
16
|
import { defineTool } from "@deepseek-ai/dsh-tools";
|
|
17
|
-
import
|
|
17
|
+
import * as dshLlm from "@deepseek-ai/dsh-llm";
|
|
18
|
+
import { createUserMessage } from "@deepseek-ai/dsh-llm";
|
|
18
19
|
import * as dshCredentials from "@deepseek-ai/dsh-credentials";
|
|
19
20
|
import { dshHomePath, resolveDshHome } from "@deepseek-ai/dsh-home-paths";
|
|
20
21
|
import { PiAiAdapter } from "@deepseek-ai/dsh-llm-pi-ai";
|
|
@@ -296,6 +297,23 @@ const OUTPUT_VERBOSITY_DEFAULT = "default";
|
|
|
296
297
|
const OUTPUT_VERBOSITY_MEDIUM = "medium";
|
|
297
298
|
const OUTPUT_VERBOSITY_HIGH = "high";
|
|
298
299
|
const DEFAULT_OUTPUT_VERBOSITY = OUTPUT_VERBOSITY_DEFAULT;
|
|
300
|
+
const REASONING_SUMMARY_FIELD = "reasoningSummary";
|
|
301
|
+
const REASONING_SUMMARIES = Object.freeze([
|
|
302
|
+
"auto",
|
|
303
|
+
"concise",
|
|
304
|
+
"detailed",
|
|
305
|
+
"none"
|
|
306
|
+
]);
|
|
307
|
+
const DEFAULT_REASONING_SUMMARY = "auto";
|
|
308
|
+
const RETRY_POLICY_FIELD = "retryPolicy";
|
|
309
|
+
const RETRY_POLICIES = Object.freeze([
|
|
310
|
+
"default",
|
|
311
|
+
"off",
|
|
312
|
+
"10",
|
|
313
|
+
"20",
|
|
314
|
+
"unlimited"
|
|
315
|
+
]);
|
|
316
|
+
const DEFAULT_RETRY_POLICY = "default";
|
|
299
317
|
const INPUT_IMAGE_DETAIL_FIELD = "inputImageDetail";
|
|
300
318
|
const INPUT_IMAGE_DETAILS = Object.freeze([
|
|
301
319
|
"low",
|
|
@@ -350,6 +368,8 @@ const normalizeOutputVerbosity = (value) => [
|
|
|
350
368
|
"medium",
|
|
351
369
|
"high"
|
|
352
370
|
].includes(value) ? value : DEFAULT_OUTPUT_VERBOSITY;
|
|
371
|
+
const normalizeReasoningSummary = (value) => REASONING_SUMMARIES.includes(value) ? value : DEFAULT_REASONING_SUMMARY;
|
|
372
|
+
const normalizeRetryPolicy = (value) => RETRY_POLICIES.includes(value) ? value : DEFAULT_RETRY_POLICY;
|
|
353
373
|
const normalizeInputImageDetail = (value) => INPUT_IMAGE_DETAILS.includes(value) ? value : DEFAULT_INPUT_IMAGE_DETAIL;
|
|
354
374
|
const normalizeStreamIdleTimeoutMinutes = (value) => STREAM_IDLE_TIMEOUT_MINUTES.includes(value) ? value : 10;
|
|
355
375
|
const normalizeContextMode = (value) => [
|
|
@@ -471,6 +491,16 @@ const PREFERENCE_FIELDS = Object.freeze({
|
|
|
471
491
|
default: DEFAULT_OUTPUT_VERBOSITY,
|
|
472
492
|
error: "Invalid output verbosity preference"
|
|
473
493
|
},
|
|
494
|
+
[REASONING_SUMMARY_FIELD]: {
|
|
495
|
+
choices: REASONING_SUMMARIES,
|
|
496
|
+
default: DEFAULT_REASONING_SUMMARY,
|
|
497
|
+
error: "Invalid reasoning summary preference"
|
|
498
|
+
},
|
|
499
|
+
[RETRY_POLICY_FIELD]: {
|
|
500
|
+
choices: RETRY_POLICIES,
|
|
501
|
+
default: DEFAULT_RETRY_POLICY,
|
|
502
|
+
error: "Invalid retry policy preference"
|
|
503
|
+
},
|
|
474
504
|
[INPUT_IMAGE_DETAIL_FIELD]: {
|
|
475
505
|
choices: INPUT_IMAGE_DETAILS,
|
|
476
506
|
default: DEFAULT_INPUT_IMAGE_DETAIL,
|
|
@@ -1292,7 +1322,8 @@ const SUPPORTED_RUNTIME_VERSIONS = Object.freeze([
|
|
|
1292
1322
|
"0.1.7-rc.2",
|
|
1293
1323
|
"0.2.0-rc.1",
|
|
1294
1324
|
"0.2.0-rc.2",
|
|
1295
|
-
"0.2.1-alpha.1"
|
|
1325
|
+
"0.2.1-alpha.1",
|
|
1326
|
+
"0.2.1-alpha.2"
|
|
1296
1327
|
]);
|
|
1297
1328
|
const require = createRequire(import.meta.url);
|
|
1298
1329
|
const execute = promisify(execFile);
|
|
@@ -2049,7 +2080,7 @@ function inheritedOriginalImageRef(session, assetId) {
|
|
|
2049
2080
|
}
|
|
2050
2081
|
//#endregion
|
|
2051
2082
|
//#region src/version.js
|
|
2052
|
-
const PACKAGE_VERSION = "2.
|
|
2083
|
+
const PACKAGE_VERSION = "2.6.1";
|
|
2053
2084
|
const USER_AGENT = `dsh-codex-subscription/${PACKAGE_VERSION}`;
|
|
2054
2085
|
//#endregion
|
|
2055
2086
|
//#region src/codex-images.js
|
|
@@ -2222,7 +2253,7 @@ async function readSessionImage(attachmentId, attachments, signal, messages) {
|
|
|
2222
2253
|
};
|
|
2223
2254
|
}
|
|
2224
2255
|
async function editImages(values, attachments, signal, messages) {
|
|
2225
|
-
if (!Array.isArray(values) || values.length === 0 || values.length > MAX_REFERENCE_IMAGES) throw new Error(`referenceImages must contain between 1 and ${MAX_REFERENCE_IMAGES} images`);
|
|
2256
|
+
if (!Array.isArray(values) || values.length === 0 || values.length > MAX_REFERENCE_IMAGES) throw new Error(`referenceImages must contain between 1 and ${MAX_REFERENCE_IMAGES} images; omit it to generate a new image`);
|
|
2226
2257
|
const available = messages === void 0 ? void 0 : sessionImageReferences(messages);
|
|
2227
2258
|
const references = values.map((value) => {
|
|
2228
2259
|
const id = normalizeAttachmentId(value?.attachmentId);
|
|
@@ -2247,7 +2278,7 @@ function imageContent(value) {
|
|
|
2247
2278
|
const label = typeof value.size === "string" && value.size.length > 0 ? `Generated a ${value.size} image.` : "Generated an image.";
|
|
2248
2279
|
return [{
|
|
2249
2280
|
type: "text",
|
|
2250
|
-
text: value.localPath === void 0 ? label : `${label}\nOriginal PNG saved on the DSH host at: ${JSON.stringify(value.localPath)}. Read this file or copy it to the workspace with a .png extension; this host path is not a browser URL.`
|
|
2281
|
+
text: value.localPath === void 0 ? label : `${label}\nOriginal PNG saved on the DSH host at: ${JSON.stringify(value.localPath)}. Read this file or copy it to the workspace with a .png extension; this host path is not a browser URL. The image is already shown to the user, so do not embed it again; copy it rather than move it, and leave the original in place unless the user asks you to delete it.`
|
|
2251
2282
|
}, {
|
|
2252
2283
|
type: "image",
|
|
2253
2284
|
attachment: imageReference(value.image)
|
|
@@ -2351,6 +2382,41 @@ function imageOutputSchema() {
|
|
|
2351
2382
|
}
|
|
2352
2383
|
};
|
|
2353
2384
|
}
|
|
2385
|
+
const SUPPORT_ID = /^[A-Za-z0-9._-]{1,80}$/u;
|
|
2386
|
+
/** The request id Codex returns for an image call, kept on failures so a report can be traced. */
|
|
2387
|
+
function supportId(response) {
|
|
2388
|
+
const id = response.headers?.get?.("x-codex-imagegen-request-id");
|
|
2389
|
+
return typeof id === "string" && SUPPORT_ID.test(id) ? ` (request ${id})` : "";
|
|
2390
|
+
}
|
|
2391
|
+
/** What a 429 from the image endpoint says: when the limit resets, when the response tells us. */
|
|
2392
|
+
async function limitMessage(response, now = Date.now()) {
|
|
2393
|
+
const fallback = "Codex image generation quota is unavailable";
|
|
2394
|
+
let error;
|
|
2395
|
+
try {
|
|
2396
|
+
error = JSON.parse(await readTextWithin(response, 16 * 1024))?.error;
|
|
2397
|
+
} catch {
|
|
2398
|
+
return fallback;
|
|
2399
|
+
}
|
|
2400
|
+
if (!record$4(error)) return fallback;
|
|
2401
|
+
const at = Number.isSafeInteger(error.resets_at) && error.resets_at > 0 ? error.resets_at * 1e3 : Number.isSafeInteger(error.resets_in_seconds) && error.resets_in_seconds > 0 ? now + error.resets_in_seconds * 1e3 : void 0;
|
|
2402
|
+
if (at === void 0) return fallback;
|
|
2403
|
+
const minutes = Math.max(1, Math.ceil((at - now) / 6e4));
|
|
2404
|
+
return `Codex image generation limit reached; it resets in about ${minutes >= 120 ? `${Math.round(minutes / 60)} hours` : `${minutes} minutes`}`;
|
|
2405
|
+
}
|
|
2406
|
+
async function readTextWithin(response, maximumBytes) {
|
|
2407
|
+
if (response.body === null || response.body === void 0) return "";
|
|
2408
|
+
const reader = response.body.getReader();
|
|
2409
|
+
const chunks = [];
|
|
2410
|
+
let bytes = 0;
|
|
2411
|
+
while (bytes < maximumBytes) {
|
|
2412
|
+
const { done, value } = await reader.read();
|
|
2413
|
+
if (done) break;
|
|
2414
|
+
bytes += value.byteLength;
|
|
2415
|
+
chunks.push(value);
|
|
2416
|
+
}
|
|
2417
|
+
await reader.cancel().catch(() => {});
|
|
2418
|
+
return Buffer.concat(chunks.map((chunk) => Buffer.from(chunk))).toString("utf8").slice(0, maximumBytes);
|
|
2419
|
+
}
|
|
2354
2420
|
function responseMetadata(value) {
|
|
2355
2421
|
const data = Array.isArray(value?.data) ? value.data[0] : void 0;
|
|
2356
2422
|
const encoded = record$4(data) ? data.b64_json : void 0;
|
|
@@ -2468,6 +2534,10 @@ function createCodexImageTool(options) {
|
|
|
2468
2534
|
timeoutMs: 300 * 1e3,
|
|
2469
2535
|
isConcurrencySafe: () => false,
|
|
2470
2536
|
async execute(args, exec) {
|
|
2537
|
+
if (Array.isArray(args.referenceImages) && args.referenceImages.length === 0) {
|
|
2538
|
+
const { referenceImages: _empty, ...rest } = args;
|
|
2539
|
+
args = rest;
|
|
2540
|
+
}
|
|
2471
2541
|
assertImageOperation(options.getFeatures?.(), args.referenceImages !== void 0);
|
|
2472
2542
|
const defaults = readImageDefaults(options.getFeatures?.());
|
|
2473
2543
|
args = {
|
|
@@ -2516,8 +2586,9 @@ function createCodexImageTool(options) {
|
|
|
2516
2586
|
}
|
|
2517
2587
|
if (!response.ok) {
|
|
2518
2588
|
if (response.status === 401 || response.status === 403) throw new Error("ChatGPT sign-in needs to be renewed");
|
|
2519
|
-
|
|
2520
|
-
throw new Error(
|
|
2589
|
+
const requestId = supportId(response);
|
|
2590
|
+
if (response.status === 429) throw new Error(`${await limitMessage(response)}${requestId}`);
|
|
2591
|
+
throw new Error(`Codex image ${editing ? "edit" : "generation"} failed (HTTP ${response.status})${requestId}`);
|
|
2521
2592
|
}
|
|
2522
2593
|
const metadata = responseMetadata(await readJsonWithin(response, encodedLimit(maximumBytes) + RESPONSE_ENVELOPE_BYTES));
|
|
2523
2594
|
const data = decodeCodexPng(metadata.encoded, maximumBytes);
|
|
@@ -2677,6 +2748,21 @@ function createSketchAgentTool(bridge, attachments, getSessionMessages = () => [
|
|
|
2677
2748
|
});
|
|
2678
2749
|
}
|
|
2679
2750
|
//#endregion
|
|
2751
|
+
//#region src/retry-policy.js
|
|
2752
|
+
/** @param {string} choice a RETRY_POLICIES value @param {Function | undefined} resolve DSH's resolveRetryPolicy */
|
|
2753
|
+
function retryPolicyFor(choice, resolve) {
|
|
2754
|
+
if (choice === "default" || typeof resolve !== "function") return void 0;
|
|
2755
|
+
try {
|
|
2756
|
+
if (choice === "unlimited") return resolve({ mode: "always" }, "codex-subscription retryPolicy");
|
|
2757
|
+
return resolve({
|
|
2758
|
+
mode: "normal",
|
|
2759
|
+
maxRetries: choice === "off" ? 0 : Number(choice)
|
|
2760
|
+
}, "codex-subscription retryPolicy");
|
|
2761
|
+
} catch {
|
|
2762
|
+
return;
|
|
2763
|
+
}
|
|
2764
|
+
}
|
|
2765
|
+
//#endregion
|
|
2680
2766
|
//#region src/account-vault.js
|
|
2681
2767
|
const VERSION = 1;
|
|
2682
2768
|
const DEFAULT_LABEL = "Account 1";
|
|
@@ -3561,6 +3647,18 @@ function normalizeTransportEvent(event, signal) {
|
|
|
3561
3647
|
const FAST_SERVICE_TIER = "priority";
|
|
3562
3648
|
const ULTRAFAST_SERVICE_TIER = "ultrafast";
|
|
3563
3649
|
/** Apply the chosen detail to user and tool-result images after the provider assembles the request. */
|
|
3650
|
+
const withoutUserAgent = (headers) => headers && typeof headers === "object" ? Object.fromEntries(Object.entries(headers).filter(([name]) => name.toLowerCase() !== "user-agent")) : headers;
|
|
3651
|
+
function withReasoningSummary(payload, summary) {
|
|
3652
|
+
if (summary === "auto" || payload?.reasoning === void 0 || payload.reasoning === null) return payload;
|
|
3653
|
+
const { summary: _previous, ...rest } = payload.reasoning;
|
|
3654
|
+
return {
|
|
3655
|
+
...payload,
|
|
3656
|
+
reasoning: summary === "none" ? rest : {
|
|
3657
|
+
...rest,
|
|
3658
|
+
summary
|
|
3659
|
+
}
|
|
3660
|
+
};
|
|
3661
|
+
}
|
|
3564
3662
|
function withInputImageDetail(payload, detail) {
|
|
3565
3663
|
if (!Array.isArray(payload.input)) return payload;
|
|
3566
3664
|
let changed = false;
|
|
@@ -3614,7 +3712,7 @@ function isDshAutoReview(context) {
|
|
|
3614
3712
|
* persistence, headers, transport, and model behavior remain owned by the
|
|
3615
3713
|
* original provider.
|
|
3616
3714
|
*/
|
|
3617
|
-
function openaiCodexSubscriptionProvider({ resolveSpeedMode = () => void 0, resolveOutputVerbosity = () => OUTPUT_VERBOSITY_DEFAULT, resolveInputImageDetail = () => void 0, resolveContextMode = () => void 0, resolveCustomContextWindow = () => void 0, resolveReviewModel = () => REVIEW_MODEL_SESSION, catalog, connection, compaction, runNetwork = (_area, operation) => operation() } = {}) {
|
|
3715
|
+
function openaiCodexSubscriptionProvider({ resolveSpeedMode = () => void 0, resolveOutputVerbosity = () => OUTPUT_VERBOSITY_DEFAULT, resolveInputImageDetail = () => void 0, resolveReasoningSummary = () => void 0, resolveContextMode = () => void 0, resolveCustomContextWindow = () => void 0, resolveReviewModel = () => REVIEW_MODEL_SESSION, catalog, connection, compaction, runNetwork = (_area, operation) => operation() } = {}) {
|
|
3618
3716
|
const provider = createOpenAICodexProvider();
|
|
3619
3717
|
const requestToken = Object.freeze({
|
|
3620
3718
|
name: "DSH-managed Codex OAuth request token",
|
|
@@ -3636,9 +3734,11 @@ function openaiCodexSubscriptionProvider({ resolveSpeedMode = () => void 0, reso
|
|
|
3636
3734
|
const speedMode = resolveSpeedMode();
|
|
3637
3735
|
const serviceTier = speedMode === "ultrafast" && metadata?.supportsUltrafast === true ? ULTRAFAST_SERVICE_TIER : speedMode === "fast" && (metadata?.supportsFast ?? supportsCodexFastMode(model?.id)) ? FAST_SERVICE_TIER : void 0;
|
|
3638
3736
|
const inputImageDetail = normalizeInputImageDetail(resolveInputImageDetail());
|
|
3737
|
+
const reasoningSummary = normalizeReasoningSummary(resolveReasoningSummary());
|
|
3639
3738
|
const { temperature: _temperature, onPayload, ...rest } = options;
|
|
3640
3739
|
return {
|
|
3641
3740
|
...rest,
|
|
3741
|
+
...rest.headers === void 0 ? {} : { headers: withoutUserAgent(rest.headers) },
|
|
3642
3742
|
...textVerbosity === void 0 ? {} : { textVerbosity },
|
|
3643
3743
|
...serviceTier === void 0 ? {} : { serviceTier },
|
|
3644
3744
|
async onPayload(payload, requestModel) {
|
|
@@ -3653,7 +3753,7 @@ function openaiCodexSubscriptionProvider({ resolveSpeedMode = () => void 0, reso
|
|
|
3653
3753
|
const managed = compaction?.preparePayload(preferred, model?.contextWindow) ?? preferred;
|
|
3654
3754
|
const next = await onPayload?.(managed, requestModel);
|
|
3655
3755
|
const detailed = inputImageDetail === "auto" ? next ?? managed : withInputImageDetail(next ?? managed, inputImageDetail);
|
|
3656
|
-
const { temperature: _dropped, ...accepted } = detailed;
|
|
3756
|
+
const { temperature: _dropped, ...accepted } = withReasoningSummary(detailed, reasoningSummary);
|
|
3657
3757
|
return {
|
|
3658
3758
|
...accepted,
|
|
3659
3759
|
...textVerbosity === void 0 ? {} : { text: {
|
|
@@ -3700,6 +3800,7 @@ function openaiCodexSubscriptionProvider({ resolveSpeedMode = () => void 0, reso
|
|
|
3700
3800
|
const { temperature: _temperature, onPayload, ...rest } = options;
|
|
3701
3801
|
return {
|
|
3702
3802
|
...rest,
|
|
3803
|
+
...rest.headers === void 0 ? {} : { headers: withoutUserAgent(rest.headers) },
|
|
3703
3804
|
async onPayload(payload, requestModel) {
|
|
3704
3805
|
const { temperature: _dropped, service_tier: _tier, text: _text, ...accepted } = await onPayload?.(payload, requestModel) ?? payload;
|
|
3705
3806
|
return {
|
|
@@ -3790,7 +3891,8 @@ function openaiCodexSubscriptionProvider({ resolveSpeedMode = () => void 0, reso
|
|
|
3790
3891
|
Object.freeze([
|
|
3791
3892
|
"0.82.1",
|
|
3792
3893
|
"0.85.1",
|
|
3793
|
-
"0.87.1"
|
|
3894
|
+
"0.87.1",
|
|
3895
|
+
"1.1.0"
|
|
3794
3896
|
]);
|
|
3795
3897
|
//#endregion
|
|
3796
3898
|
//#region src/model-catalog.js
|
|
@@ -4941,21 +5043,35 @@ function creditExpiry({ planType, balance, apiExpiresAt }, now = Date.now()) {
|
|
|
4941
5043
|
};
|
|
4942
5044
|
}
|
|
4943
5045
|
//#endregion
|
|
5046
|
+
//#region src/quota-cadence.js
|
|
5047
|
+
/** Milliseconds until the next quota read, from the highest used percentage of the windows that matter. */
|
|
5048
|
+
function quotaRefreshMs(percent) {
|
|
5049
|
+
if (!Number.isFinite(percent)) return 6e4;
|
|
5050
|
+
if (percent >= 99) return 5e3;
|
|
5051
|
+
if (percent >= 90) return 15e3;
|
|
5052
|
+
if (percent >= 75) return 3e4;
|
|
5053
|
+
return 6e4;
|
|
5054
|
+
}
|
|
5055
|
+
/** Highest used percentage among windows (objects with usedPercent), or undefined when there are none. */
|
|
5056
|
+
function highestUsed(windows) {
|
|
5057
|
+
const values = (Array.isArray(windows) ? windows : []).map((window) => window?.usedPercent).filter(Number.isFinite);
|
|
5058
|
+
return values.length === 0 ? void 0 : Math.max(...values);
|
|
5059
|
+
}
|
|
5060
|
+
//#endregion
|
|
4944
5061
|
//#region src/usage.js
|
|
4945
5062
|
const CODEX_USAGE_URL = "https://chatgpt.com/backend-api/wham/usage";
|
|
4946
|
-
const DEFAULT_TTL_MS = 6e4;
|
|
4947
5063
|
const DEFAULT_TIMEOUT_MS$1 = 15e3;
|
|
4948
5064
|
const DEFAULT_FAILURE_TTL_MS = 5e3;
|
|
4949
5065
|
const DEFAULT_MAX_RETRY_AFTER_MS = 5 * 6e4;
|
|
4950
5066
|
const record$1 = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
|
|
4951
|
-
function windowOf(value) {
|
|
5067
|
+
function windowOf(value, nowSeconds) {
|
|
4952
5068
|
if (value === void 0 || value === null) return void 0;
|
|
4953
5069
|
if (!record$1(value)) throw new Error("Codex returned a malformed rate-limit window");
|
|
4954
5070
|
const used = value.used_percent;
|
|
4955
5071
|
const seconds = value.limit_window_seconds;
|
|
4956
5072
|
if (!Number.isFinite(used) || used < 0 || used > 100) throw new Error("Codex returned an invalid used percentage");
|
|
4957
5073
|
if (!Number.isInteger(seconds) || seconds <= 0) throw new Error("Codex returned an invalid window duration");
|
|
4958
|
-
const resetsAt = epochSeconds(value.reset_at, "rate-limit reset time");
|
|
5074
|
+
const resetsAt = epochSeconds(value.reset_at, "rate-limit reset time") ?? (Number.isInteger(value.reset_after_seconds) && value.reset_after_seconds > 0 && Number.isFinite(nowSeconds) ? nowSeconds + value.reset_after_seconds : void 0);
|
|
4959
5075
|
return {
|
|
4960
5076
|
usedPercent: used,
|
|
4961
5077
|
remainingPercent: 100 - used,
|
|
@@ -4963,10 +5079,10 @@ function windowOf(value) {
|
|
|
4963
5079
|
...resetsAt === void 0 ? {} : { resetsAt }
|
|
4964
5080
|
};
|
|
4965
5081
|
}
|
|
4966
|
-
function limitOf(id, name, value) {
|
|
5082
|
+
function limitOf(id, name, value, nowSeconds) {
|
|
4967
5083
|
if (value === void 0 || value === null) return void 0;
|
|
4968
5084
|
if (!record$1(value)) throw new Error("Codex returned malformed rate-limit details");
|
|
4969
|
-
const windows = [windowOf(value.primary_window), windowOf(value.secondary_window)].filter(Boolean);
|
|
5085
|
+
const windows = [windowOf(value.primary_window, nowSeconds), windowOf(value.secondary_window, nowSeconds)].filter(Boolean);
|
|
4970
5086
|
return windows.length === 0 ? void 0 : {
|
|
4971
5087
|
id,
|
|
4972
5088
|
...name ? { name } : {},
|
|
@@ -5066,7 +5182,8 @@ function resetCreditsOf(value) {
|
|
|
5066
5182
|
};
|
|
5067
5183
|
}
|
|
5068
5184
|
/** Reduce the provider payload to a browser-safe quota projection. */
|
|
5069
|
-
function parseCodexUsage(value) {
|
|
5185
|
+
function parseCodexUsage(value, nowMs = Date.now()) {
|
|
5186
|
+
const nowSeconds = Math.floor(nowMs / 1e3);
|
|
5070
5187
|
if (!record$1(value)) throw new Error("Codex returned a malformed usage response");
|
|
5071
5188
|
const rateLimits = [];
|
|
5072
5189
|
const seenLimitIds = /* @__PURE__ */ new Set();
|
|
@@ -5075,21 +5192,27 @@ function parseCodexUsage(value) {
|
|
|
5075
5192
|
seenLimitIds.add(limit.id);
|
|
5076
5193
|
rateLimits.push(limit);
|
|
5077
5194
|
};
|
|
5078
|
-
addLimit(limitOf("codex", "Codex", value.rate_limit));
|
|
5195
|
+
addLimit(limitOf("codex", "Codex", value.rate_limit, nowSeconds));
|
|
5079
5196
|
if (value.additional_rate_limits !== void 0 && value.additional_rate_limits !== null && !Array.isArray(value.additional_rate_limits)) throw new Error("Codex returned malformed additional rate limits");
|
|
5080
5197
|
for (const entry of value.additional_rate_limits ?? []) {
|
|
5081
5198
|
if (!record$1(entry) || typeof entry.metered_feature !== "string" || entry.metered_feature.length === 0) throw new Error("Codex returned a malformed additional rate limit");
|
|
5082
5199
|
if (entry.limit_name !== void 0 && entry.limit_name !== null && typeof entry.limit_name !== "string") throw new Error("Codex returned an invalid additional rate-limit name");
|
|
5083
|
-
addLimit(limitOf(entry.metered_feature, entry.limit_name || void 0, entry.rate_limit));
|
|
5200
|
+
addLimit(limitOf(entry.metered_feature, entry.limit_name || void 0, entry.rate_limit, nowSeconds));
|
|
5084
5201
|
}
|
|
5085
|
-
addLimit(limitOf("code_review", "Code review", value.code_review_rate_limit));
|
|
5202
|
+
addLimit(limitOf("code_review", "Code review", value.code_review_rate_limit, nowSeconds));
|
|
5086
5203
|
const chatPass = chatPassOf(value.chatpass);
|
|
5087
5204
|
const credits = creditsOf(value.credits, typeof value.plan_type === "string" ? value.plan_type : void 0);
|
|
5088
5205
|
const individualLimit = individualOf(value.spend_control);
|
|
5089
5206
|
const spendControlReached = spendControlReachedOf(value.spend_control);
|
|
5090
5207
|
const resetCredits = resetCreditsOf(value.rate_limit_reset_credits);
|
|
5208
|
+
const planType = typeof value.plan_type === "string" && /^[a-z][a-z_]{0,31}$/u.test(value.plan_type) ? value.plan_type : void 0;
|
|
5209
|
+
const reached = value.rate_limit_reached_type;
|
|
5210
|
+
const reachedRaw = typeof reached === "string" ? reached : record$1(reached) ? reached.type : void 0;
|
|
5211
|
+
const rateLimitReachedType = typeof reachedRaw === "string" && /^[a-z][a-z_]{0,63}$/u.test(reachedRaw) ? reachedRaw : void 0;
|
|
5091
5212
|
return {
|
|
5092
5213
|
rateLimits,
|
|
5214
|
+
...rateLimitReachedType === void 0 ? {} : { rateLimitReachedType },
|
|
5215
|
+
...planType === void 0 ? {} : { planType },
|
|
5093
5216
|
...chatPass === void 0 ? {} : { chatPass },
|
|
5094
5217
|
...credits === void 0 ? {} : { credits },
|
|
5095
5218
|
...individualLimit === void 0 ? {} : { individualLimit },
|
|
@@ -5120,7 +5243,7 @@ function createCodexUsageReader(options) {
|
|
|
5120
5243
|
const readCredential = options.readCredential;
|
|
5121
5244
|
const fetchUsage = options.fetch ?? fetch;
|
|
5122
5245
|
const now = options.now ?? Date.now;
|
|
5123
|
-
const
|
|
5246
|
+
const ttlFor = (value) => options.ttlMs ?? quotaRefreshMs(highestUsed(value?.rateLimits?.find((limit) => limit.id === "codex")?.windows));
|
|
5124
5247
|
const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS$1;
|
|
5125
5248
|
const failureTtlMs = options.failureTtlMs ?? DEFAULT_FAILURE_TTL_MS;
|
|
5126
5249
|
const maxRetryAfterMs = options.maxRetryAfterMs ?? DEFAULT_MAX_RETRY_AFTER_MS;
|
|
@@ -5155,14 +5278,14 @@ function createCodexUsageReader(options) {
|
|
|
5155
5278
|
throw new Error("ChatGPT returned an unreadable usage response");
|
|
5156
5279
|
}
|
|
5157
5280
|
return {
|
|
5158
|
-
...parseCodexUsage(value),
|
|
5281
|
+
...parseCodexUsage(value, now()),
|
|
5159
5282
|
fetchedAt: now()
|
|
5160
5283
|
};
|
|
5161
5284
|
};
|
|
5162
5285
|
return Object.freeze({
|
|
5163
5286
|
read({ force = false, signal } = {}) {
|
|
5164
5287
|
if (failed !== void 0 && now() < failed.retryAt) return Promise.reject(new Error(failed.message));
|
|
5165
|
-
if (!force && cached !== void 0 && now() - cached.fetchedAt <
|
|
5288
|
+
if (!force && cached !== void 0 && now() - cached.fetchedAt < ttlFor(cached)) return Promise.resolve(structuredClone(cached));
|
|
5166
5289
|
if (inFlight !== void 0) return inFlight.then(structuredClone);
|
|
5167
5290
|
const currentGeneration = generation;
|
|
5168
5291
|
const current = load(signal).then((value) => {
|
|
@@ -5246,6 +5369,7 @@ function createWakeSignal() {
|
|
|
5246
5369
|
};
|
|
5247
5370
|
}
|
|
5248
5371
|
function shortResetDelay(usage, nowMs, maxWaitMs, resetMarginMs) {
|
|
5372
|
+
if (typeof usage?.rateLimitReachedType === "string" && /^(?:workspace_|.*credits_depleted)/u.test(usage.rateLimitReachedType)) return void 0;
|
|
5249
5373
|
let latestDelayMs;
|
|
5250
5374
|
for (const limit of usage?.rateLimits ?? []) {
|
|
5251
5375
|
if (limit?.id !== "codex") continue;
|
|
@@ -6383,6 +6507,7 @@ function apply(ctx, config = {}) {
|
|
|
6383
6507
|
resolveSpeedMode: () => settings.get()[SPEED_MODE_FIELD],
|
|
6384
6508
|
resolveOutputVerbosity: () => normalizeOutputVerbosity(settings.get()[OUTPUT_VERBOSITY_FIELD]),
|
|
6385
6509
|
resolveInputImageDetail: () => settings.get()[INPUT_IMAGE_DETAIL_FIELD],
|
|
6510
|
+
resolveReasoningSummary: () => settings.get()[REASONING_SUMMARY_FIELD],
|
|
6386
6511
|
resolveContextMode: () => normalizeContextMode(settings.get()[CONTEXT_MODE_FIELD]),
|
|
6387
6512
|
resolveCustomContextWindow: (modelKey) => {
|
|
6388
6513
|
const overrides = readCapabilitySettings(settings.get())[CUSTOM_CONTEXT_OVERRIDES_FIELD];
|
|
@@ -6413,6 +6538,8 @@ function apply(ctx, config = {}) {
|
|
|
6413
6538
|
[SPEED_MODE_FIELD]: settings.get()[SPEED_MODE_FIELD],
|
|
6414
6539
|
[OUTPUT_VERBOSITY_FIELD]: normalizeOutputVerbosity(settings.get()[OUTPUT_VERBOSITY_FIELD]),
|
|
6415
6540
|
[INPUT_IMAGE_DETAIL_FIELD]: normalizeInputImageDetail(settings.get()[INPUT_IMAGE_DETAIL_FIELD]),
|
|
6541
|
+
[REASONING_SUMMARY_FIELD]: normalizeReasoningSummary(settings.get()[REASONING_SUMMARY_FIELD]),
|
|
6542
|
+
[RETRY_POLICY_FIELD]: normalizeRetryPolicy(settings.get()[RETRY_POLICY_FIELD]),
|
|
6416
6543
|
[STREAM_IDLE_TIMEOUT_MINUTES_FIELD]: normalizeStreamIdleTimeoutMinutes(settings.get()[STREAM_IDLE_TIMEOUT_MINUTES_FIELD]),
|
|
6417
6544
|
[CONTEXT_MODE_FIELD]: normalizeContextMode(settings.get()[CONTEXT_MODE_FIELD]),
|
|
6418
6545
|
[CUSTOM_CONTEXT_WINDOW_FIELD]: normalizeCustomContextWindow(settings.get()[CUSTOM_CONTEXT_WINDOW_FIELD]),
|
|
@@ -6453,14 +6580,20 @@ function apply(ctx, config = {}) {
|
|
|
6453
6580
|
cacheRetention: "short",
|
|
6454
6581
|
transport: "sse"
|
|
6455
6582
|
});
|
|
6583
|
+
const retryProfile = (choice) => {
|
|
6584
|
+
const retryPolicy = retryPolicyFor(choice, dshLlm.resolveRetryPolicy);
|
|
6585
|
+
return retryPolicy === void 0 ? {} : { retryPolicy };
|
|
6586
|
+
};
|
|
6456
6587
|
let profileKey;
|
|
6457
6588
|
let profileSnapshot;
|
|
6458
6589
|
const profiles = () => {
|
|
6459
6590
|
const preferences = settings.get();
|
|
6460
6591
|
const streamIdleTimeoutMinutes = normalizeStreamIdleTimeoutMinutes(preferences[STREAM_IDLE_TIMEOUT_MINUTES_FIELD]);
|
|
6592
|
+
const retryChoice = normalizeRetryPolicy(preferences[RETRY_POLICY_FIELD]);
|
|
6461
6593
|
const key = JSON.stringify([
|
|
6462
6594
|
modelCatalog.revision(),
|
|
6463
6595
|
streamIdleTimeoutMinutes,
|
|
6596
|
+
retryChoice,
|
|
6464
6597
|
normalizeContextMode(preferences[CONTEXT_MODE_FIELD]),
|
|
6465
6598
|
preferences[CUSTOM_CONTEXT_OVERRIDES_FIELD],
|
|
6466
6599
|
...Object.values(CUSTOM_CONTEXT_MODEL_FIELDS).map((field) => preferences[field])
|
|
@@ -6469,7 +6602,8 @@ function apply(ctx, config = {}) {
|
|
|
6469
6602
|
profileKey = key;
|
|
6470
6603
|
profileSnapshot = /* @__PURE__ */ new Map([[PROVIDER, Object.freeze({
|
|
6471
6604
|
...profile,
|
|
6472
|
-
streamIdleTimeoutMs: streamIdleTimeoutMinutes * 60 * 1e3
|
|
6605
|
+
streamIdleTimeoutMs: streamIdleTimeoutMinutes * 60 * 1e3,
|
|
6606
|
+
...retryProfile(retryChoice)
|
|
6473
6607
|
})]]);
|
|
6474
6608
|
}
|
|
6475
6609
|
return profileSnapshot;
|
|
@@ -6549,9 +6683,9 @@ function apply(ctx, config = {}) {
|
|
|
6549
6683
|
try {
|
|
6550
6684
|
resolved = await resolveAuth();
|
|
6551
6685
|
} catch {
|
|
6552
|
-
throw new LlmError("ChatGPT subscription authorization failed", "AUTH_FAILED");
|
|
6686
|
+
throw new dshLlm.LlmError("ChatGPT subscription authorization failed", "AUTH_FAILED");
|
|
6553
6687
|
}
|
|
6554
|
-
if (typeof resolved?.auth.apiKey !== "string" || resolved.auth.apiKey.length === 0) throw new LlmError("ChatGPT subscription is not signed in", "MISSING_CREDENTIAL");
|
|
6688
|
+
if (typeof resolved?.auth.apiKey !== "string" || resolved.auth.apiKey.length === 0) throw new dshLlm.LlmError("ChatGPT subscription is not signed in", "MISSING_CREDENTIAL");
|
|
6555
6689
|
return resolved.auth.apiKey;
|
|
6556
6690
|
},
|
|
6557
6691
|
auth: adapterAuth,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-codex-subscription",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.1",
|
|
4
4
|
"description": "Use ChatGPT and Codex subscriptions in DeepSeek Harness with OAuth, quota, safe resets, web search, images, and Fast mode",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -77,26 +77,26 @@
|
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
79
|
"@deepseek-ai/cordis": "4.0.1 || 4.0.2 || 4.0.3 || 4.0.4 || 4.0.5-alpha.1",
|
|
80
|
-
"@deepseek-ai/dsh-api-remotes": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.6-alpha.1 || 0.1.6-alpha.2 || 0.1.7-alpha.1 || 0.1.7-alpha.2 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1",
|
|
81
|
-
"@deepseek-ai/dsh-client-connection": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.6-alpha.1 || 0.1.6-alpha.2 || 0.1.7-alpha.1 || 0.1.7-alpha.2 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1",
|
|
82
|
-
"@deepseek-ai/dsh-client-locale": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.6-alpha.1 || 0.1.6-alpha.2 || 0.1.7-alpha.1 || 0.1.7-alpha.2 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1",
|
|
83
|
-
"@deepseek-ai/dsh-client-ui-conversation": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.6-alpha.1 || 0.1.6-alpha.2 || 0.1.7-alpha.1 || 0.1.7-alpha.2 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1",
|
|
84
|
-
"@deepseek-ai/dsh-client-ui-model-selection": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.6-alpha.1 || 0.1.6-alpha.2 || 0.1.7-alpha.1 || 0.1.7-alpha.2 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1",
|
|
85
|
-
"@deepseek-ai/dsh-client-ui-primitives": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.6-alpha.1 || 0.1.6-alpha.2 || 0.1.7-alpha.1 || 0.1.7-alpha.2 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1",
|
|
86
|
-
"@deepseek-ai/dsh-client-ui-settings": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.6-alpha.1 || 0.1.6-alpha.2 || 0.1.7-alpha.1 || 0.1.7-alpha.2 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1",
|
|
87
|
-
"@deepseek-ai/dsh-client-ui-slots": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.6-alpha.1 || 0.1.6-alpha.2 || 0.1.7-alpha.1 || 0.1.7-alpha.2 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1",
|
|
88
|
-
"@deepseek-ai/dsh-client-ui-tool": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.6-alpha.1 || 0.1.6-alpha.2 || 0.1.7-alpha.1 || 0.1.7-alpha.2 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1",
|
|
89
|
-
"@deepseek-ai/dsh-credentials": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.6-alpha.1 || 0.1.6-alpha.2 || 0.1.7-alpha.1 || 0.1.7-alpha.2 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1",
|
|
90
|
-
"@deepseek-ai/dsh-llm": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.6-alpha.1 || 0.1.6-alpha.2 || 0.1.7-alpha.1 || 0.1.7-alpha.2 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1",
|
|
91
|
-
"@deepseek-ai/dsh-llm-pi-ai": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.6-alpha.1 || 0.1.6-alpha.2 || 0.1.7-alpha.1 || 0.1.7-alpha.2 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1",
|
|
92
|
-
"@deepseek-ai/dsh-settings": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.6-alpha.1 || 0.1.6-alpha.2 || 0.1.7-alpha.1 || 0.1.7-alpha.2 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1",
|
|
93
|
-
"@deepseek-ai/dsh-tools": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.6-alpha.1 || 0.1.6-alpha.2 || 0.1.7-alpha.1 || 0.1.7-alpha.2 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1",
|
|
94
|
-
"@deepseek-ai/dsh-web": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.6-alpha.1 || 0.1.6-alpha.2 || 0.1.7-alpha.1 || 0.1.7-alpha.2 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1",
|
|
80
|
+
"@deepseek-ai/dsh-api-remotes": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.6-alpha.1 || 0.1.6-alpha.2 || 0.1.7-alpha.1 || 0.1.7-alpha.2 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2",
|
|
81
|
+
"@deepseek-ai/dsh-client-connection": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.6-alpha.1 || 0.1.6-alpha.2 || 0.1.7-alpha.1 || 0.1.7-alpha.2 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2",
|
|
82
|
+
"@deepseek-ai/dsh-client-locale": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.6-alpha.1 || 0.1.6-alpha.2 || 0.1.7-alpha.1 || 0.1.7-alpha.2 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2",
|
|
83
|
+
"@deepseek-ai/dsh-client-ui-conversation": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.6-alpha.1 || 0.1.6-alpha.2 || 0.1.7-alpha.1 || 0.1.7-alpha.2 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2",
|
|
84
|
+
"@deepseek-ai/dsh-client-ui-model-selection": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.6-alpha.1 || 0.1.6-alpha.2 || 0.1.7-alpha.1 || 0.1.7-alpha.2 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2",
|
|
85
|
+
"@deepseek-ai/dsh-client-ui-primitives": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.6-alpha.1 || 0.1.6-alpha.2 || 0.1.7-alpha.1 || 0.1.7-alpha.2 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2",
|
|
86
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.6-alpha.1 || 0.1.6-alpha.2 || 0.1.7-alpha.1 || 0.1.7-alpha.2 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2",
|
|
87
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.6-alpha.1 || 0.1.6-alpha.2 || 0.1.7-alpha.1 || 0.1.7-alpha.2 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2",
|
|
88
|
+
"@deepseek-ai/dsh-client-ui-tool": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.6-alpha.1 || 0.1.6-alpha.2 || 0.1.7-alpha.1 || 0.1.7-alpha.2 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2",
|
|
89
|
+
"@deepseek-ai/dsh-credentials": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.6-alpha.1 || 0.1.6-alpha.2 || 0.1.7-alpha.1 || 0.1.7-alpha.2 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2",
|
|
90
|
+
"@deepseek-ai/dsh-llm": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.6-alpha.1 || 0.1.6-alpha.2 || 0.1.7-alpha.1 || 0.1.7-alpha.2 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2",
|
|
91
|
+
"@deepseek-ai/dsh-llm-pi-ai": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.6-alpha.1 || 0.1.6-alpha.2 || 0.1.7-alpha.1 || 0.1.7-alpha.2 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2",
|
|
92
|
+
"@deepseek-ai/dsh-settings": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.6-alpha.1 || 0.1.6-alpha.2 || 0.1.7-alpha.1 || 0.1.7-alpha.2 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2",
|
|
93
|
+
"@deepseek-ai/dsh-tools": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.6-alpha.1 || 0.1.6-alpha.2 || 0.1.7-alpha.1 || 0.1.7-alpha.2 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2",
|
|
94
|
+
"@deepseek-ai/dsh-web": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.6-alpha.1 || 0.1.6-alpha.2 || 0.1.7-alpha.1 || 0.1.7-alpha.2 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2",
|
|
95
95
|
"@deepseek-ai/schemastery": "3.18.1 || ^3.18.2",
|
|
96
|
-
"@earendil-works/pi-ai": "0.82.1 || 0.85.1 || 0.87.1",
|
|
96
|
+
"@earendil-works/pi-ai": "0.82.1 || 0.85.1 || 0.87.1 || 1.1.0",
|
|
97
97
|
"react": "^18.2.0",
|
|
98
98
|
"react-dom": "^18.2.0",
|
|
99
|
-
"@deepseek-ai/dsh-subagent-codex": "0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1"
|
|
99
|
+
"@deepseek-ai/dsh-subagent-codex": "0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
102
|
"@deepseek-ai/cordis": "4.0.4",
|