dsh-codex-subscription 2.5.8 → 2.6.0

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 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.5.8
109
+ dsh-codex-subscription@2.6.0
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.0
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.0
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.0
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.0`, 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.5.8
109
+ dsh-codex-subscription@2.6.0
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.0
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.0
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.0
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.0`,然后重启 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
 
@@ -17,6 +17,7 @@
17
17
  "0.1.6-alpha.2",
18
18
  "0.1.7-alpha.1",
19
19
  "0.1.7-alpha.2",
20
- "0.2.1-alpha.1"
20
+ "0.2.1-alpha.1",
21
+ "0.2.1-alpha.2"
21
22
  ]
22
23
  }
package/lib/client.js CHANGED
@@ -896,7 +896,7 @@ window.__ModuleLoader__.load({
896
896
  d: "M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"
897
897
  }));
898
898
  }
899
- const ForwardRef$6 = /*#__PURE__*/ react.forwardRef(ArrowPathIcon);
899
+ const ForwardRef$8 = /*#__PURE__*/ react.forwardRef(ArrowPathIcon);
900
900
  //#endregion
901
901
  //#region node_modules/.pnpm/@heroicons+react@2.2.0_react@18.3.1/node_modules/@heroicons/react/24/outline/esm/ArrowsPointingOutIcon.js
902
902
  function ArrowsPointingOutIcon({ title, titleId, ...props }, svgRef) {
@@ -916,7 +916,27 @@ window.__ModuleLoader__.load({
916
916
  d: "M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"
917
917
  }));
918
918
  }
919
- const ForwardRef$5 = /*#__PURE__*/ react.forwardRef(ArrowsPointingOutIcon);
919
+ const ForwardRef$7 = /*#__PURE__*/ react.forwardRef(ArrowsPointingOutIcon);
920
+ //#endregion
921
+ //#region node_modules/.pnpm/@heroicons+react@2.2.0_react@18.3.1/node_modules/@heroicons/react/24/outline/esm/ChatBubbleLeftEllipsisIcon.js
922
+ function ChatBubbleLeftEllipsisIcon({ title, titleId, ...props }, svgRef) {
923
+ return /*#__PURE__*/ react.createElement("svg", Object.assign({
924
+ xmlns: "http://www.w3.org/2000/svg",
925
+ fill: "none",
926
+ viewBox: "0 0 24 24",
927
+ strokeWidth: 1.5,
928
+ stroke: "currentColor",
929
+ "aria-hidden": "true",
930
+ "data-slot": "icon",
931
+ ref: svgRef,
932
+ "aria-labelledby": titleId
933
+ }, props), title ? /*#__PURE__*/ react.createElement("title", { id: titleId }, title) : null, /*#__PURE__*/ react.createElement("path", {
934
+ strokeLinecap: "round",
935
+ strokeLinejoin: "round",
936
+ d: "M8.625 9.75a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H8.25m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H12m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0h-.375m-13.5 3.01c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.184-4.183a1.14 1.14 0 0 1 .778-.332 48.294 48.294 0 0 0 5.83-.498c1.585-.233 2.708-1.626 2.708-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"
937
+ }));
938
+ }
939
+ const ForwardRef$6 = /*#__PURE__*/ react.forwardRef(ChatBubbleLeftEllipsisIcon);
920
940
  //#endregion
921
941
  //#region node_modules/.pnpm/@heroicons+react@2.2.0_react@18.3.1/node_modules/@heroicons/react/24/outline/esm/ExclamationCircleIcon.js
922
942
  function ExclamationCircleIcon({ title, titleId, ...props }, svgRef) {
@@ -936,7 +956,7 @@ window.__ModuleLoader__.load({
936
956
  d: "M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"
937
957
  }));
938
958
  }
939
- const ForwardRef$4 = /*#__PURE__*/ react.forwardRef(ExclamationCircleIcon);
959
+ const ForwardRef$5 = /*#__PURE__*/ react.forwardRef(ExclamationCircleIcon);
940
960
  //#endregion
941
961
  //#region node_modules/.pnpm/@heroicons+react@2.2.0_react@18.3.1/node_modules/@heroicons/react/24/outline/esm/PaintBrushIcon.js
942
962
  function PaintBrushIcon({ title, titleId, ...props }, svgRef) {
@@ -956,7 +976,27 @@ window.__ModuleLoader__.load({
956
976
  d: "M9.53 16.122a3 3 0 0 0-5.78 1.128 2.25 2.25 0 0 1-2.4 2.245 4.5 4.5 0 0 0 8.4-2.245c0-.399-.078-.78-.22-1.128Zm0 0a15.998 15.998 0 0 0 3.388-1.62m-5.043-.025a15.994 15.994 0 0 1 1.622-3.395m3.42 3.42a15.995 15.995 0 0 0 4.764-4.648l3.876-5.814a1.151 1.151 0 0 0-1.597-1.597L14.146 6.32a15.996 15.996 0 0 0-4.649 4.763m3.42 3.42a6.776 6.776 0 0 0-3.42-3.42"
957
977
  }));
958
978
  }
959
- const ForwardRef$3 = /*#__PURE__*/ react.forwardRef(PaintBrushIcon);
979
+ const ForwardRef$4 = /*#__PURE__*/ react.forwardRef(PaintBrushIcon);
980
+ //#endregion
981
+ //#region node_modules/.pnpm/@heroicons+react@2.2.0_react@18.3.1/node_modules/@heroicons/react/24/outline/esm/PencilIcon.js
982
+ function PencilIcon({ title, titleId, ...props }, svgRef) {
983
+ return /*#__PURE__*/ react.createElement("svg", Object.assign({
984
+ xmlns: "http://www.w3.org/2000/svg",
985
+ fill: "none",
986
+ viewBox: "0 0 24 24",
987
+ strokeWidth: 1.5,
988
+ stroke: "currentColor",
989
+ "aria-hidden": "true",
990
+ "data-slot": "icon",
991
+ ref: svgRef,
992
+ "aria-labelledby": titleId
993
+ }, props), title ? /*#__PURE__*/ react.createElement("title", { id: titleId }, title) : null, /*#__PURE__*/ react.createElement("path", {
994
+ strokeLinecap: "round",
995
+ strokeLinejoin: "round",
996
+ d: "m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"
997
+ }));
998
+ }
999
+ const ForwardRef$3 = /*#__PURE__*/ react.forwardRef(PencilIcon);
960
1000
  //#endregion
961
1001
  //#region node_modules/.pnpm/@heroicons+react@2.2.0_react@18.3.1/node_modules/@heroicons/react/24/outline/esm/PhotoIcon.js
962
1002
  function PhotoIcon({ title, titleId, ...props }, svgRef) {
@@ -1268,7 +1308,7 @@ window.__ModuleLoader__.load({
1268
1308
  showOutput ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1269
1309
  className: "codexImageToolRow",
1270
1310
  children: [
1271
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(!settled ? ForwardRef$6 : failed ? ForwardRef$4 : ForwardRef$2, {
1311
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(!settled ? ForwardRef$8 : failed ? ForwardRef$5 : ForwardRef$2, {
1272
1312
  className: "codexImageToolIcon",
1273
1313
  "aria-hidden": "true"
1274
1314
  }),
@@ -5434,7 +5474,7 @@ window.__ModuleLoader__.load({
5434
5474
  const IconCopyOutline16 = _deepseek_ai_dsh_client_ui_primitives.IconCopyOutline16 ?? _deepseek_ai_dsh_client_ui_primitives.IconCopyOutlineRegular;
5435
5475
  const IconDownloadOutline16 = _deepseek_ai_dsh_client_ui_primitives.IconDownloadOutline16 ?? _deepseek_ai_dsh_client_ui_primitives.IconDownloadOutlineRegular;
5436
5476
  const IconEditOutline16 = _deepseek_ai_dsh_client_ui_primitives.IconEditOutline16 ?? _deepseek_ai_dsh_client_ui_primitives.IconEditOutlineRegular;
5437
- const IconFullscreenOutline16 = _deepseek_ai_dsh_client_ui_primitives.IconFullscreenOutline16 ?? _deepseek_ai_dsh_client_ui_primitives.IconFullscreenOutlineRegular;
5477
+ _deepseek_ai_dsh_client_ui_primitives.IconFullscreenOutline16 ?? _deepseek_ai_dsh_client_ui_primitives.IconFullscreenOutlineRegular;
5438
5478
  //#endregion
5439
5479
  //#region src/image-workspace.jsx
5440
5480
  function ImageWorkspace(props) {
@@ -5636,6 +5676,12 @@ window.__ModuleLoader__.load({
5636
5676
  inputImageDetail_low: "低",
5637
5677
  inputImageDetail_high: "高",
5638
5678
  inputImageDetail_original: "原图",
5679
+ reasoningSummary: "推理摘要",
5680
+ reasoningSummaryHint: "让模型在会话的“思考”部分给出推理摘要。自动由模型决定;简洁更短;详细更完整;关闭则不要摘要。",
5681
+ reasoningSummary_auto: "自动",
5682
+ reasoningSummary_concise: "简洁",
5683
+ reasoningSummary_detailed: "详细",
5684
+ reasoningSummary_none: "关闭",
5639
5685
  subagentBackendTitle: "独立子任务",
5640
5686
  subagentBackend_dsh: "DSH",
5641
5687
  subagentBackend_codex: "Codex",
@@ -5767,7 +5813,7 @@ window.__ModuleLoader__.load({
5767
5813
  imageEntryPoints_on: "显示",
5768
5814
  imageEntryPoints_off: "隐藏",
5769
5815
  imageBrowsing: "图片浏览",
5770
- imageBrowsingHint: "预览粘贴图片与会话图片,标注后回到输入框编辑。",
5816
+ imageBrowsingHint: "预览粘贴图片与会话图片,可标注、移除背景、擦除、调整大小。",
5771
5817
  imageBrowsing_on: "增强",
5772
5818
  imageBrowsing_off: "DSH 默认",
5773
5819
  imageGroupMixed: "保留原设置",
@@ -5987,7 +6033,7 @@ window.__ModuleLoader__.load({
5987
6033
  resetAcknowledgeRequired: "请先确认已了解这次操作可能消耗重置次数。",
5988
6034
  resetAccountChanged: "登录账号已变更,请重新开始。",
5989
6035
  resetUncertain: "服务端返回结果不确定。请再次确认,插件会复用同一个请求,不会另外发起一次重置。",
5990
- creditsNote: "额外 Credits、消费上限、重置次数分别显示。",
6036
+ creditsNote: "下方的额外 Credits 和额度重置与套餐额度分开计算。",
5991
6037
  creditsExpires: "预计 {date} 到期,还剩 {days} 天",
5992
6038
  creditsExpiredToday: "今天 {date} 到期",
5993
6039
  creditsExpiryEstimate: "(估计:官方公布的 Pro 200 补偿 Credits 到期日,接口未返回,以 ChatGPT 使用情况页为准)",
@@ -6066,7 +6112,7 @@ window.__ModuleLoader__.load({
6066
6112
  modelMenuAria: "模型、推理等级、速度与输出详略",
6067
6113
  modelLabel: "模型",
6068
6114
  effortLabel: "推理等级",
6069
- providerDefault: "Default",
6115
+ providerDefault: "默认",
6070
6116
  selectModel: "选择模型",
6071
6117
  modelsLoading: "正在读取模型…",
6072
6118
  modelsEmpty: "没有可用模型;请先登录,并确认网络可用。",
@@ -6223,6 +6269,12 @@ window.__ModuleLoader__.load({
6223
6269
  inputImageDetail_low: "Low",
6224
6270
  inputImageDetail_high: "High",
6225
6271
  inputImageDetail_original: "Original",
6272
+ reasoningSummary: "Reasoning summary",
6273
+ 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.",
6274
+ reasoningSummary_auto: "Auto",
6275
+ reasoningSummary_concise: "Concise",
6276
+ reasoningSummary_detailed: "Detailed",
6277
+ reasoningSummary_none: "Off",
6226
6278
  subagentBackendTitle: "Independent subtasks",
6227
6279
  subagentBackend_dsh: "DSH",
6228
6280
  subagentBackend_codex: "Codex",
@@ -6354,7 +6406,7 @@ window.__ModuleLoader__.load({
6354
6406
  imageEntryPoints_on: "Show",
6355
6407
  imageEntryPoints_off: "Hide",
6356
6408
  imageBrowsing: "Image browsing",
6357
- imageBrowsingHint: "Preview pasted and conversation images, annotate and return to the composer.",
6409
+ imageBrowsingHint: "Preview pasted and conversation images; annotate, remove the background, erase or resize.",
6358
6410
  imageBrowsing_on: "Enhanced",
6359
6411
  imageBrowsing_off: "DSH default",
6360
6412
  imageGroupMixed: "Keep existing",
@@ -6574,7 +6626,7 @@ window.__ModuleLoader__.load({
6574
6626
  resetAcknowledgeRequired: "Confirm that you understand this may consume a reset.",
6575
6627
  resetAccountChanged: "The signed-in account changed. Start again.",
6576
6628
  resetUncertain: "The server result is uncertain. Confirm again to check the same request; the plugin will not start a separate reset.",
6577
- creditsNote: "Extra Credits, spending caps, and resets are separate items.",
6629
+ creditsNote: "Extra Credits and quota resets below are counted separately from the plan quota.",
6578
6630
  creditsExpires: "Expires {date} ({days} days left)",
6579
6631
  creditsExpiredToday: "Expires today ({date})",
6580
6632
  creditsExpiryEstimate: "(Estimate: the published expiry of the Pro 200 compensation Credits; the API does not report it, so check ChatGPT usage settings)",
@@ -6788,7 +6840,7 @@ window.__ModuleLoader__.load({
6788
6840
  .codexSubscriptionRecover{display:flex;align-items:center;justify-content:space-between;gap:12px}
6789
6841
  .codexSubscriptionRecover .codexSubscriptionError{flex:1}
6790
6842
  .codexSubscriptionRecover button{flex:0 0 auto}
6791
- .codexSubscriptionDiagnostics{color:var(--dsw-alias-label-secondary)}
6843
+ .codexSubscriptionDiagnostics{color:var(--dsw-alias-label-secondary)}.codexSubscriptionDiagnostics h3{color:var(--dsw-alias-label-primary)}
6792
6844
  .codexSubscriptionDiagnostics ul{margin:0;padding-left:18px;font-size:13px;line-height:20px}
6793
6845
  .codexSubscriptionDiagnostics li+li{margin-top:6px}
6794
6846
  .codexSubscriptionDiagnostics li strong{font-weight:600;color:var(--dsw-alias-label-primary)}
@@ -7111,12 +7163,12 @@ window.__ModuleLoader__.load({
7111
7163
  .dcsiv-nav{position:absolute;top:50%;z-index:4;width:42px;height:42px;padding:0;transform:translateY(-50%);background:rgba(48,49,53,.82);box-shadow:0 8px 24px rgba(0,0,0,.28);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}.dcsiv-prev{left:6px}.dcsiv-next{right:6px}.dcsiv-counter{position:absolute;bottom:8px;left:50%;padding:5px 10px;border-radius:999px;background:rgba(38,39,43,.86);color:rgba(255,255,255,.72);font-size:11px;transform:translateX(-50%);backdrop-filter:blur(16px)}
7112
7164
  .dcsiv-hint{display:none}
7113
7165
  .dcsiv-mask{position:absolute;inset:0;width:100%;height:100%;border-radius:12px;cursor:crosshair;touch-action:none}
7114
- .dcsiv-tool-icon{width:16px;height:16px;flex:none}.dcsiv-menu{position:fixed;z-index:12;display:flex;flex-direction:column;min-width:150px;padding:6px;border:1px solid rgba(255,255,255,.12);border-radius:12px;background:rgba(32,33,37,.97);box-shadow:0 12px 32px rgba(0,0,0,.4)}.dcsiv-menu button{height:32px;padding:0 10px;border:0;border-radius:8px;background:none;color:rgba(255,255,255,.9);font:inherit;font-size:13px;text-align:left;cursor:pointer}.dcsiv-menu button:hover,.dcsiv-menu button:focus-visible{background:rgba(255,255,255,.1)}
7115
- .dcsiv-erase-bar{position:absolute;left:50%;top:22px;z-index:7;display:flex;align-items:center;gap:10px;padding:6px 8px 6px 14px;transform:translateX(-50%);border:1px solid rgba(255,255,255,.1);border-radius:999px;background:rgba(38,39,43,.92);color:rgba(255,255,255,.86);font-size:12px;white-space:nowrap}.dcsiv-erase-bar label{display:inline-flex;align-items:center;gap:6px}.dcsiv-erase-bar input{width:90px}.dcsiv-primary{background:#fff!important;color:#111!important}
7166
+ .dcsiv-tool-icon{width:16px;height:16px;flex:none}.dcsiv-icon-button,.dcsiv-download[data-compact="true"]{width:34px;padding:0!important;justify-content:center}.dcsiv-zoom{min-width:52px;font-variant-numeric:tabular-nums}.dcsiv-divider{width:1px;height:18px;margin:0 4px;background:rgba(255,255,255,.14)}.dcsiv-menu{position:fixed;z-index:12;display:flex;flex-direction:column;min-width:150px;padding:6px;border:1px solid rgba(255,255,255,.12);border-radius:12px;background:rgba(32,33,37,.97);box-shadow:0 12px 32px rgba(0,0,0,.4)}.dcsiv-menu button{height:32px;padding:0 10px;border:0;border-radius:8px;background:none;color:rgba(255,255,255,.9);font:inherit;font-size:13px;text-align:left;cursor:pointer}.dcsiv-menu button:hover,.dcsiv-menu button:focus-visible{outline:none;background:rgba(255,255,255,.1)}
7167
+ .dcsiv-erase-bar{position:absolute;left:50%;top:22px;z-index:7;display:flex;align-items:center;gap:10px;padding:6px 8px 6px 14px;transform:translateX(-50%);border:1px solid rgba(255,255,255,.1);border-radius:999px;background:rgba(38,39,43,.92);color:rgba(255,255,255,.86);font-size:12px;white-space:nowrap}.dcsiv-erase-bar label{display:inline-flex;align-items:center;gap:6px}.dcsiv-erase-bar input{width:90px}.dcsiv-primary{background:#fff!important;color:#111!important}.dcsiv-primary[data-state="failed"]{color:#c62828!important}.dcsiv-brush-cursor{position:fixed;z-index:9;pointer-events:none;border:1.5px solid #fff;border-radius:50%;corner-shape:round;box-shadow:0 0 0 1px rgba(0,0,0,.45),inset 0 0 0 1px rgba(0,0,0,.25);transform:translate(-50%,-50%)}@media(pointer:fine){.dcsiv-mask{cursor:none}}.dcsiv-button[data-state="pending"] .dcsiv-tool-icon{animation:dcsiv-pulse 1s ease-in-out infinite}.dcsiv-button[data-state="failed"]{color:#ff8a80!important}@keyframes dcsiv-pulse{50%{opacity:.3}}
7116
7168
  .dcsiv-copy-notes{position:absolute;right:20px;bottom:22px;z-index:6;display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 11px;border:1px solid rgba(255,255,255,.1);border-radius:999px;background:rgba(38,39,43,.86);color:rgba(255,255,255,.82);font:inherit;font-size:12px;cursor:pointer;backdrop-filter:blur(16px)}
7117
7169
  .dcsiv-edit-short{display:none}
7118
7170
  @media(max-width:760px){.dcsiv-actions{flex-wrap:wrap;justify-content:center}.dcsiv-edit-short{display:inline;white-space:normal;max-width:min(280px,calc(100vw - 80px))}.dcsiv-edit-action{height:auto;min-height:32px}.dcsiv-close-floating{top:12px;right:12px;width:40px;height:40px}.dcsiv-workspace{padding:60px 12px 68px}.dcsiv-image{max-width:calc(100vw - 24px);max-height:calc(100vh - 136px)}.dcsiv-topbar{bottom:12px;max-width:calc(100vw - 24px)}.dcsiv-button{padding:0 8px}.dcsiv-button span.dcsiv-label{display:none}.dcsiv-inline-note{width:min(260px,calc(100vw - 40px))}.dcsiv-copy-notes{display:none}}
7119
- @media(prefers-reduced-motion:reduce){.dcsiv-surface{transition:none}}
7171
+ @media(prefers-reduced-motion:reduce){.dcsiv-surface{transition:none}.dcsiv-tool-icon{animation:none!important}}
7120
7172
  `;
7121
7173
  //#endregion
7122
7174
  //#region src/subscription-image-transform.js
@@ -7298,8 +7350,10 @@ window.__ModuleLoader__.load({
7298
7350
  //#region src/subscription-image-viewer.jsx
7299
7351
  const TOOL_ICONS = {
7300
7352
  "remove-background": ForwardRef$1,
7301
- erase: ForwardRef$3,
7302
- resize: ForwardRef$5
7353
+ erase: ForwardRef$4,
7354
+ resize: ForwardRef$7,
7355
+ sketch: ForwardRef$3,
7356
+ annotate: ForwardRef$6
7303
7357
  };
7304
7358
  const ToolIcon = ({ id }) => {
7305
7359
  const Icon = TOOL_ICONS[id];
@@ -7322,12 +7376,41 @@ window.__ModuleLoader__.load({
7322
7376
  const [state, setState] = (0, react.useState)("idle");
7323
7377
  const [menu, setMenu] = (0, react.useState)();
7324
7378
  const active = (0, react.useRef)(true);
7379
+ const menuRef = (0, react.useRef)(null);
7380
+ const menuButtonRef = (0, react.useRef)(null);
7325
7381
  (0, react.useEffect)(() => {
7326
7382
  active.current = true;
7327
7383
  return () => {
7328
7384
  active.current = false;
7329
7385
  };
7330
7386
  }, []);
7387
+ (0, react.useEffect)(() => {
7388
+ if (menu === void 0) return void 0;
7389
+ menuRef.current?.querySelector("[role=\"menuitem\"]")?.focus();
7390
+ const onKeyDown = (event) => {
7391
+ const items = [...menuRef.current?.querySelectorAll("[role=\"menuitem\"]") ?? []];
7392
+ if (event.key === "Escape") {
7393
+ event.preventDefault();
7394
+ event.stopPropagation();
7395
+ setMenu(void 0);
7396
+ menuButtonRef.current?.focus();
7397
+ } else if ((event.key === "ArrowDown" || event.key === "ArrowUp") && items.length > 0) {
7398
+ event.preventDefault();
7399
+ event.stopPropagation();
7400
+ const step = event.key === "ArrowDown" ? 1 : -1;
7401
+ items[(items.indexOf(document.activeElement) + step + items.length) % items.length].focus();
7402
+ } else if (event.key === "Tab") setMenu(void 0);
7403
+ };
7404
+ const onPointerDown = (event) => {
7405
+ if (!menuRef.current?.contains(event.target) && !menuButtonRef.current?.contains(event.target)) setMenu(void 0);
7406
+ };
7407
+ window.addEventListener("keydown", onKeyDown, true);
7408
+ window.addEventListener("pointerdown", onPointerDown, true);
7409
+ return () => {
7410
+ window.removeEventListener("keydown", onKeyDown, true);
7411
+ window.removeEventListener("pointerdown", onPointerDown, true);
7412
+ };
7413
+ }, [menu]);
7331
7414
  const invoke = async (extra = {}) => {
7332
7415
  if (state === "pending") return;
7333
7416
  setState("pending");
@@ -7346,32 +7429,42 @@ window.__ModuleLoader__.load({
7346
7429
  }
7347
7430
  };
7348
7431
  const label = state === "pending" ? action.pendingLabel : state === "failed" ? action.errorLabel : action.label;
7349
- if (action.kind === "mask") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
7432
+ if (action.kind === "mask") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
7350
7433
  type: "button",
7351
- className: "dcsiv-button",
7434
+ className: "dcsiv-button dcsiv-icon-button",
7435
+ title: action.label,
7436
+ "aria-label": action.label,
7352
7437
  onClick: () => onStartMask(action),
7353
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolIcon, { id: action.id }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
7354
- className: "dcsiv-label",
7355
- children: action.label
7356
- })]
7438
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolIcon, { id: action.id })
7357
7439
  });
7358
- if (action.kind === "tool") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
7440
+ if (action.kind === "tool") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
7359
7441
  type: "button",
7360
- className: "dcsiv-button",
7442
+ className: "dcsiv-button dcsiv-icon-button",
7443
+ title: label,
7444
+ "aria-label": label,
7445
+ "data-state": state,
7361
7446
  disabled: state === "pending",
7362
7447
  onClick: () => {
7363
7448
  invoke();
7364
7449
  },
7365
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolIcon, { id: action.id }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
7366
- className: "dcsiv-label",
7367
- children: label
7368
- })]
7450
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolIcon, { id: action.id })
7451
+ });
7452
+ if (action.id === "sketch" && state === "idle") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
7453
+ type: "button",
7454
+ className: "dcsiv-button dcsiv-icon-button",
7455
+ title: action.label,
7456
+ "aria-label": action.label,
7457
+ onClick: () => {
7458
+ invoke();
7459
+ },
7460
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolIcon, { id: "sketch" })
7369
7461
  });
7370
- if (action.kind === "choice") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
7462
+ if (action.kind === "choice") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
7463
+ ref: menuButtonRef,
7371
7464
  type: "button",
7372
- className: "dcsiv-button",
7373
7465
  "aria-haspopup": "menu",
7374
7466
  "aria-expanded": menu !== void 0,
7467
+ "data-state": state,
7375
7468
  disabled: state === "pending",
7376
7469
  onClick: (event) => {
7377
7470
  const box = event.currentTarget.getBoundingClientRect();
@@ -7384,13 +7477,15 @@ window.__ModuleLoader__.load({
7384
7477
  }
7385
7478
  } : void 0);
7386
7479
  },
7387
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolIcon, { id: action.id }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
7388
- className: "dcsiv-label",
7389
- children: label
7390
- })]
7480
+ className: "dcsiv-button dcsiv-icon-button",
7481
+ title: label,
7482
+ "aria-label": label,
7483
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolIcon, { id: action.id })
7391
7484
  }), menu ? (0, react_dom.createPortal)(/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
7485
+ ref: menuRef,
7392
7486
  className: "dcsiv-menu",
7393
7487
  role: "menu",
7488
+ "aria-label": action.label,
7394
7489
  style: menu.style,
7395
7490
  children: action.options.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
7396
7491
  type: "button",
@@ -7462,10 +7557,13 @@ window.__ModuleLoader__.load({
7462
7557
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
7463
7558
  type: "button",
7464
7559
  className: "dcsiv-download",
7560
+ "data-compact": state === "idle",
7561
+ title: label,
7562
+ "aria-label": label,
7465
7563
  onClick: () => {
7466
7564
  invoke();
7467
7565
  },
7468
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconDownloadOutline16, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
7566
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconDownloadOutline16, {}), state === "idle" ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
7469
7567
  className: "dcsiv-label",
7470
7568
  children: state === "pending" ? `${label} ${progress}% · ${t("cancel")}` : label
7471
7569
  })]
@@ -7492,6 +7590,16 @@ window.__ModuleLoader__.load({
7492
7590
  const [strokes, setStrokes] = (0, react.useState)([]);
7493
7591
  const [brush, setBrush] = (0, react.useState)(.05);
7494
7592
  const [sending, setSending] = (0, react.useState)(false);
7593
+ const [sendFailed, setSendFailed] = (0, react.useState)(false);
7594
+ const [brushCursor, setBrushCursor] = (0, react.useState)();
7595
+ const eraseRef = (0, react.useRef)({
7596
+ erasing: void 0,
7597
+ sending: false
7598
+ });
7599
+ eraseRef.current = {
7600
+ erasing,
7601
+ sending
7602
+ };
7495
7603
  const drawingRef = (0, react.useRef)(false);
7496
7604
  const maskRef = (0, react.useRef)(null);
7497
7605
  const rootRef = (0, react.useRef)(null);
@@ -7523,6 +7631,28 @@ window.__ModuleLoader__.load({
7523
7631
  document.body.style.overflow = "hidden";
7524
7632
  rootRef.current?.focus();
7525
7633
  const onKeyDown = (event) => {
7634
+ if (eraseRef.current.erasing !== void 0) {
7635
+ const key = event.key.toLowerCase();
7636
+ if (event.key === "Escape") {
7637
+ event.preventDefault();
7638
+ if (!eraseRef.current.sending) {
7639
+ setErasing(void 0);
7640
+ setStrokes([]);
7641
+ }
7642
+ return;
7643
+ }
7644
+ if ((event.ctrlKey || event.metaKey) && key === "z") {
7645
+ event.preventDefault();
7646
+ if (!eraseRef.current.sending) setStrokes((current) => current.slice(0, -1));
7647
+ return;
7648
+ }
7649
+ if (event.key === "[" || event.key === "]") {
7650
+ event.preventDefault();
7651
+ setBrush((value) => Math.round(clamp(value + (event.key === "]" ? .01 : -.01), .01, .15) * 100) / 100);
7652
+ return;
7653
+ }
7654
+ if (event.key === "ArrowLeft" || event.key === "ArrowRight") return;
7655
+ }
7526
7656
  if (event.key === "Escape") {
7527
7657
  event.preventDefault();
7528
7658
  if (event.target instanceof Element && event.target.closest(".dcsiv-inline-note") !== null) {
@@ -7621,6 +7751,12 @@ window.__ModuleLoader__.load({
7621
7751
  }]);
7622
7752
  },
7623
7753
  onPointerMove: (event) => {
7754
+ const bounds = maskRef.current?.getBoundingClientRect();
7755
+ if (bounds !== void 0) setBrushCursor({
7756
+ left: event.clientX,
7757
+ top: event.clientY,
7758
+ span: Math.min(bounds.width, bounds.height) / transformRef.current.zoom
7759
+ });
7624
7760
  if (!drawingRef.current) return;
7625
7761
  const point = strokePoint(event);
7626
7762
  if (point === void 0) return;
@@ -7634,18 +7770,24 @@ window.__ModuleLoader__.load({
7634
7770
  },
7635
7771
  onPointerCancel: () => {
7636
7772
  drawingRef.current = false;
7773
+ },
7774
+ onPointerLeave: () => {
7775
+ setBrushCursor(void 0);
7637
7776
  }
7638
7777
  };
7639
7778
  const startMask = (action) => {
7640
7779
  resetGesture();
7641
7780
  setAnnotating(false);
7642
7781
  setStrokes([]);
7782
+ setSendFailed(false);
7783
+ setBrushCursor(void 0);
7643
7784
  setErasing(action);
7644
7785
  };
7645
7786
  const sendMask = async () => {
7646
7787
  const image = imageRef.current;
7647
7788
  if (!erasing || strokes.length === 0 || image === null || sending) return;
7648
7789
  setSending(true);
7790
+ setSendFailed(false);
7649
7791
  try {
7650
7792
  const canvas = document.createElement("canvas");
7651
7793
  canvas.width = image.naturalWidth;
@@ -7661,6 +7803,8 @@ window.__ModuleLoader__.load({
7661
7803
  setErasing(void 0);
7662
7804
  setStrokes([]);
7663
7805
  if (erasing.closeOnSuccess) service.close();
7806
+ } catch {
7807
+ setSendFailed(true);
7664
7808
  } finally {
7665
7809
  setSending(false);
7666
7810
  }
@@ -7726,18 +7870,19 @@ window.__ModuleLoader__.load({
7726
7870
  children: [
7727
7871
  request.annotations ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
7728
7872
  type: "button",
7729
- className: "dcsiv-button",
7873
+ className: annotating ? "dcsiv-button" : "dcsiv-button dcsiv-icon-button",
7730
7874
  "data-active": annotating,
7875
+ title: annotating ? t("imageAnnotateCancel") : t("imageAnnotate"),
7731
7876
  "aria-label": annotating ? t("imageAnnotateCancel") : t("imageAnnotate"),
7732
7877
  "aria-pressed": annotating,
7733
7878
  onClick: () => {
7734
7879
  resetGesture();
7735
7880
  setAnnotating((value) => !value);
7736
7881
  },
7737
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconEditOutline16, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
7882
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolIcon, { id: "annotate" }), annotating ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
7738
7883
  className: "dcsiv-label",
7739
- children: annotating ? t("imageAnnotateCancel") : t("imageAnnotate")
7740
- })]
7884
+ children: t("imageAnnotateCancel")
7885
+ }) : null]
7741
7886
  }) : null,
7742
7887
  annotations.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
7743
7888
  type: "button",
@@ -7759,32 +7904,27 @@ window.__ModuleLoader__.load({
7759
7904
  }) : null,
7760
7905
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
7761
7906
  type: "button",
7762
- className: "dcsiv-button",
7763
- "aria-label": t("imageFit"),
7764
- onClick: fit,
7765
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconFullscreenOutline16, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
7766
- className: "dcsiv-label",
7767
- children: t("imageFit")
7768
- })]
7769
- }),
7770
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
7771
- type: "button",
7772
- className: "dcsiv-button",
7773
- onClick: actual,
7774
- children: t("imageActual")
7775
- }),
7776
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
7777
- className: "dcsiv-zoom",
7907
+ className: "dcsiv-button dcsiv-zoom",
7908
+ title: transform.zoom === 1 ? t("imageActual") : t("imageFit"),
7909
+ "aria-label": transform.zoom === 1 ? t("imageActual") : t("imageFit"),
7910
+ onClick: () => {
7911
+ if (transform.zoom === 1) actual();
7912
+ else fit();
7913
+ },
7778
7914
  children: [Math.round(transform.zoom * pixelScale * 100), "%"]
7779
7915
  }),
7780
- item.download === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("a", {
7916
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
7917
+ className: "dcsiv-divider",
7918
+ "aria-hidden": "true"
7919
+ }),
7920
+ item.download === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
7781
7921
  className: "dcsiv-download",
7922
+ "data-compact": "true",
7782
7923
  href: item.src,
7783
7924
  download: downloadName(item.name),
7784
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconDownloadOutline16, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
7785
- className: "dcsiv-label",
7786
- children: t("imageDownload")
7787
- })]
7925
+ title: t("imageDownload"),
7926
+ "aria-label": t("imageDownload"),
7927
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconDownloadOutline16, {})
7788
7928
  }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ViewerDownload, {
7789
7929
  download: item.download,
7790
7930
  item,
@@ -7982,14 +8122,25 @@ window.__ModuleLoader__.load({
7982
8122
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
7983
8123
  type: "button",
7984
8124
  className: "dcsiv-button dcsiv-primary",
8125
+ "data-state": sendFailed ? "failed" : void 0,
7985
8126
  disabled: strokes.length === 0 || sending,
7986
8127
  onClick: () => {
7987
8128
  sendMask();
7988
8129
  },
7989
- children: sending ? t("imageEditPreparing") : t("imageSend")
8130
+ children: sending ? t("imageEditPreparing") : sendFailed ? t("imageEditFailed") : t("imageSend")
7990
8131
  })
7991
8132
  ]
7992
8133
  }) : null,
8134
+ erasing && brushCursor ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
8135
+ className: "dcsiv-brush-cursor",
8136
+ "aria-hidden": "true",
8137
+ style: {
8138
+ left: brushCursor.left,
8139
+ top: brushCursor.top,
8140
+ width: brush * brushCursor.span,
8141
+ height: brush * brushCursor.span
8142
+ }
8143
+ }) : null,
7993
8144
  annotations.some((annotation) => annotation.note.trim() !== "") ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
7994
8145
  type: "button",
7995
8146
  className: "dcsiv-copy-notes",
@@ -8229,6 +8380,14 @@ window.__ModuleLoader__.load({
8229
8380
  const OUTPUT_VERBOSITY_MEDIUM = "medium";
8230
8381
  const OUTPUT_VERBOSITY_HIGH = "high";
8231
8382
  const DEFAULT_OUTPUT_VERBOSITY = OUTPUT_VERBOSITY_DEFAULT;
8383
+ const REASONING_SUMMARY_FIELD = "reasoningSummary";
8384
+ const REASONING_SUMMARIES = Object.freeze([
8385
+ "auto",
8386
+ "concise",
8387
+ "detailed",
8388
+ "none"
8389
+ ]);
8390
+ const DEFAULT_REASONING_SUMMARY = "auto";
8232
8391
  const INPUT_IMAGE_DETAIL_FIELD = "inputImageDetail";
8233
8392
  const INPUT_IMAGE_DETAILS = Object.freeze([
8234
8393
  "low",
@@ -8288,6 +8447,7 @@ window.__ModuleLoader__.load({
8288
8447
  "medium",
8289
8448
  "high"
8290
8449
  ].includes(value) ? value : DEFAULT_OUTPUT_VERBOSITY;
8450
+ const normalizeReasoningSummary = (value) => REASONING_SUMMARIES.includes(value) ? value : DEFAULT_REASONING_SUMMARY;
8291
8451
  const normalizeInputImageDetail = (value) => INPUT_IMAGE_DETAILS.includes(value) ? value : DEFAULT_INPUT_IMAGE_DETAIL;
8292
8452
  const normalizeStreamIdleTimeoutMinutes = (value) => STREAM_IDLE_TIMEOUT_MINUTES.includes(value) ? value : 10;
8293
8453
  const normalizeSpeedMode = (value) => [
@@ -8368,6 +8528,7 @@ window.__ModuleLoader__.load({
8368
8528
  speedMode: normalizeSpeedMode(value?.[SPEED_MODE_FIELD]),
8369
8529
  outputVerbosity: normalizeOutputVerbosity(value?.[OUTPUT_VERBOSITY_FIELD]),
8370
8530
  inputImageDetail: normalizeInputImageDetail(value?.[INPUT_IMAGE_DETAIL_FIELD]),
8531
+ reasoningSummary: normalizeReasoningSummary(value?.[REASONING_SUMMARY_FIELD]),
8371
8532
  streamIdleTimeoutMinutes: normalizeStreamIdleTimeoutMinutes(value?.[STREAM_IDLE_TIMEOUT_MINUTES_FIELD]),
8372
8533
  contextMode: normalizeContextMode(value?.[CONTEXT_MODE_FIELD]),
8373
8534
  customContextWindow: normalizeCustomContextWindow(value?.[CUSTOM_CONTEXT_WINDOW_FIELD]),
@@ -8427,6 +8588,7 @@ window.__ModuleLoader__.load({
8427
8588
  [SPEED_MODE_FIELD]: normalizeSpeedMode(value?.[SPEED_MODE_FIELD]),
8428
8589
  [OUTPUT_VERBOSITY_FIELD]: normalizeOutputVerbosity(value?.[OUTPUT_VERBOSITY_FIELD]),
8429
8590
  [INPUT_IMAGE_DETAIL_FIELD]: normalizeInputImageDetail(value?.[INPUT_IMAGE_DETAIL_FIELD]),
8591
+ [REASONING_SUMMARY_FIELD]: normalizeReasoningSummary(value?.[REASONING_SUMMARY_FIELD]),
8430
8592
  [STREAM_IDLE_TIMEOUT_MINUTES_FIELD]: normalizeStreamIdleTimeoutMinutes(value?.[STREAM_IDLE_TIMEOUT_MINUTES_FIELD]),
8431
8593
  [CONTEXT_MODE_FIELD]: normalizeContextMode(value?.[CONTEXT_MODE_FIELD]),
8432
8594
  [CUSTOM_CONTEXT_WINDOW_FIELD]: normalizeCustomContextWindow(value?.[CUSTOM_CONTEXT_WINDOW_FIELD]),
@@ -8856,7 +9018,6 @@ window.__ModuleLoader__.load({
8856
9018
  const NS = "settings.codexSubscription";
8857
9019
  const SUPPORT_ISSUE_URL = "https://github.com/WSL043/dsh-codex-subscription/issues/new?template=install-problem.yml";
8858
9020
  const QUICK_QUOTA_REFRESH_EVENT = "dsh-codex-subscription:refresh-quick-quota";
8859
- const QUICK_QUOTA_REFRESH_MS = 6e4;
8860
9021
  const accountStatusErrorText = (error, t) => {
8861
9022
  const key = {
8862
9023
  "credential-unavailable": "accountCredentialUnavailable",
@@ -8952,7 +9113,7 @@ window.__ModuleLoader__.load({
8952
9113
  }
8953
9114
  //#endregion
8954
9115
  //#region src/version.js
8955
- const PACKAGE_VERSION = "2.5.8";
9116
+ const PACKAGE_VERSION = "2.6.0";
8956
9117
  //#endregion
8957
9118
  //#region src/client-recovery.js
8958
9119
  async function recoveryCall(rpc, endpoint, payload = {}, timeoutMs = 1e4) {
@@ -8980,6 +9141,21 @@ window.__ModuleLoader__.load({
8980
9141
  };
8981
9142
  }
8982
9143
  //#endregion
9144
+ //#region src/quota-cadence.js
9145
+ /** Milliseconds until the next quota read, from the highest used percentage of the windows that matter. */
9146
+ function quotaRefreshMs(percent) {
9147
+ if (!Number.isFinite(percent)) return 6e4;
9148
+ if (percent >= 99) return 5e3;
9149
+ if (percent >= 90) return 15e3;
9150
+ if (percent >= 75) return 3e4;
9151
+ return 6e4;
9152
+ }
9153
+ /** Highest used percentage among windows (objects with usedPercent), or undefined when there are none. */
9154
+ function highestUsed(windows) {
9155
+ const values = (Array.isArray(windows) ? windows : []).map((window) => window?.usedPercent).filter(Number.isFinite);
9156
+ return values.length === 0 ? void 0 : Math.max(...values);
9157
+ }
9158
+ //#endregion
8983
9159
  //#region src/client-quota.jsx
8984
9160
  function useQuickQuota(rpc, enabled, model) {
8985
9161
  const [quota, setQuota] = (0, react.useState)();
@@ -8991,6 +9167,8 @@ window.__ModuleLoader__.load({
8991
9167
  setQuota(void 0);
8992
9168
  let live = true;
8993
9169
  let loading = false;
9170
+ let timer;
9171
+ let latest;
8994
9172
  const load = async () => {
8995
9173
  if (loading) return;
8996
9174
  loading = true;
@@ -9002,25 +9180,31 @@ window.__ModuleLoader__.load({
9002
9180
  return;
9003
9181
  }
9004
9182
  const usage = await recoveryCall(rpc, "usage", { force: false });
9005
- if (live) setQuota(selectModelQuotaWindows(usage, model)?.map((window) => ({
9183
+ const windows = selectModelQuotaWindows(usage, model)?.map((window) => ({
9006
9184
  ...window,
9007
9185
  fetchedAt: usage.fetchedAt
9008
- })));
9186
+ }));
9187
+ latest = windows;
9188
+ if (live) setQuota(windows);
9009
9189
  } catch {
9190
+ latest = void 0;
9010
9191
  if (live) setQuota(void 0);
9011
9192
  } finally {
9012
9193
  loading = false;
9194
+ if (live) {
9195
+ window.clearTimeout(timer);
9196
+ timer = window.setTimeout(refresh, quotaRefreshMs(highestUsed(latest)));
9197
+ }
9013
9198
  }
9014
9199
  };
9015
9200
  const refresh = () => {
9016
9201
  load();
9017
9202
  };
9018
9203
  load();
9019
- const timer = window.setInterval(refresh, QUICK_QUOTA_REFRESH_MS);
9020
9204
  window.addEventListener(QUICK_QUOTA_REFRESH_EVENT, refresh);
9021
9205
  return () => {
9022
9206
  live = false;
9023
- window.clearInterval(timer);
9207
+ window.clearTimeout(timer);
9024
9208
  window.removeEventListener(QUICK_QUOTA_REFRESH_EVENT, refresh);
9025
9209
  };
9026
9210
  }, [
@@ -10265,6 +10449,41 @@ window.__ModuleLoader__.load({
10265
10449
  })]
10266
10450
  });
10267
10451
  }
10452
+ function ReasoningSummaryPreference({ preference, t }) {
10453
+ const snapshot = usePreferenceSnapshot(preference);
10454
+ const writable = snapshot.status === "ready" && snapshot.writable === true;
10455
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
10456
+ className: "codexSubscriptionPreference",
10457
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
10458
+ className: "codexSubscriptionPreferenceCopy",
10459
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
10460
+ className: "codexSubscriptionPreferenceLabel",
10461
+ children: t("reasoningSummary")
10462
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
10463
+ className: "codexSubscriptionPreferenceHint",
10464
+ children: t("reasoningSummaryHint")
10465
+ })]
10466
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
10467
+ className: "codexSubscriptionQuotaModes",
10468
+ "data-saving": snapshot.saving || void 0,
10469
+ "aria-busy": snapshot.saving || void 0,
10470
+ role: "radiogroup",
10471
+ "aria-label": t("reasoningSummary"),
10472
+ children: REASONING_SUMMARIES.map((value) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
10473
+ className: "codexSubscriptionQuotaMode",
10474
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
10475
+ type: "radio",
10476
+ name: "codex-reasoning-summary",
10477
+ checked: snapshot.reasoningSummary === value,
10478
+ disabled: !writable,
10479
+ onChange: () => {
10480
+ preference.set({ [REASONING_SUMMARY_FIELD]: value });
10481
+ }
10482
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t(`reasoningSummary_${value}`) })]
10483
+ }, value))
10484
+ })]
10485
+ });
10486
+ }
10268
10487
  function StreamIdleTimeoutPreference({ preference, t }) {
10269
10488
  const snapshot = usePreferenceSnapshot(preference);
10270
10489
  const writable = snapshot.status === "ready" && snapshot.writable === true;
@@ -10568,6 +10787,11 @@ window.__ModuleLoader__.load({
10568
10787
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InputImageDetailPreference, {
10569
10788
  preference,
10570
10789
  t
10790
+ }),
10791
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "codexSubscriptionDivider" }),
10792
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ReasoningSummaryPreference, {
10793
+ preference,
10794
+ t
10571
10795
  })
10572
10796
  ]
10573
10797
  }),
@@ -11631,6 +11855,7 @@ window.__ModuleLoader__.load({
11631
11855
  //#endregion
11632
11856
  //#region src/client-usage.jsx
11633
11857
  const count = (value) => Number(value).toLocaleString();
11858
+ const creditAmount = (value) => Number.isFinite(Number(value)) && String(value).trim() !== "" ? Number(value).toLocaleString(void 0, { maximumFractionDigits: 2 }) : value;
11634
11859
  function CreditExpiry({ credits, t }) {
11635
11860
  const date = validDate(credits.expiresAt);
11636
11861
  if (date === void 0 || credits.unlimited) return null;
@@ -12033,7 +12258,7 @@ window.__ModuleLoader__.load({
12033
12258
  children: [
12034
12259
  visibleUsage?.credits ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
12035
12260
  className: "codexSubscriptionCreditBalance",
12036
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("creditsBalance") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: visibleUsage.credits.unlimited ? t("unlimited") : `${visibleUsage.credits.balance ?? t("unavailable")} ${t("creditsUnit")}` })]
12261
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("creditsBalance") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: visibleUsage.credits.unlimited ? t("unlimited") : visibleUsage.credits.balance == null ? t("unavailable") : `${creditAmount(visibleUsage.credits.balance)} ${t("creditsUnit")}` })]
12037
12262
  }) : null,
12038
12263
  visibleUsage?.credits ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CreditExpiry, {
12039
12264
  credits: visibleUsage.credits,
package/lib/index.js CHANGED
@@ -296,6 +296,14 @@ const OUTPUT_VERBOSITY_DEFAULT = "default";
296
296
  const OUTPUT_VERBOSITY_MEDIUM = "medium";
297
297
  const OUTPUT_VERBOSITY_HIGH = "high";
298
298
  const DEFAULT_OUTPUT_VERBOSITY = OUTPUT_VERBOSITY_DEFAULT;
299
+ const REASONING_SUMMARY_FIELD = "reasoningSummary";
300
+ const REASONING_SUMMARIES = Object.freeze([
301
+ "auto",
302
+ "concise",
303
+ "detailed",
304
+ "none"
305
+ ]);
306
+ const DEFAULT_REASONING_SUMMARY = "auto";
299
307
  const INPUT_IMAGE_DETAIL_FIELD = "inputImageDetail";
300
308
  const INPUT_IMAGE_DETAILS = Object.freeze([
301
309
  "low",
@@ -350,6 +358,7 @@ const normalizeOutputVerbosity = (value) => [
350
358
  "medium",
351
359
  "high"
352
360
  ].includes(value) ? value : DEFAULT_OUTPUT_VERBOSITY;
361
+ const normalizeReasoningSummary = (value) => REASONING_SUMMARIES.includes(value) ? value : DEFAULT_REASONING_SUMMARY;
353
362
  const normalizeInputImageDetail = (value) => INPUT_IMAGE_DETAILS.includes(value) ? value : DEFAULT_INPUT_IMAGE_DETAIL;
354
363
  const normalizeStreamIdleTimeoutMinutes = (value) => STREAM_IDLE_TIMEOUT_MINUTES.includes(value) ? value : 10;
355
364
  const normalizeContextMode = (value) => [
@@ -471,6 +480,11 @@ const PREFERENCE_FIELDS = Object.freeze({
471
480
  default: DEFAULT_OUTPUT_VERBOSITY,
472
481
  error: "Invalid output verbosity preference"
473
482
  },
483
+ [REASONING_SUMMARY_FIELD]: {
484
+ choices: REASONING_SUMMARIES,
485
+ default: DEFAULT_REASONING_SUMMARY,
486
+ error: "Invalid reasoning summary preference"
487
+ },
474
488
  [INPUT_IMAGE_DETAIL_FIELD]: {
475
489
  choices: INPUT_IMAGE_DETAILS,
476
490
  default: DEFAULT_INPUT_IMAGE_DETAIL,
@@ -1292,7 +1306,8 @@ const SUPPORTED_RUNTIME_VERSIONS = Object.freeze([
1292
1306
  "0.1.7-rc.2",
1293
1307
  "0.2.0-rc.1",
1294
1308
  "0.2.0-rc.2",
1295
- "0.2.1-alpha.1"
1309
+ "0.2.1-alpha.1",
1310
+ "0.2.1-alpha.2"
1296
1311
  ]);
1297
1312
  const require = createRequire(import.meta.url);
1298
1313
  const execute = promisify(execFile);
@@ -2049,7 +2064,7 @@ function inheritedOriginalImageRef(session, assetId) {
2049
2064
  }
2050
2065
  //#endregion
2051
2066
  //#region src/version.js
2052
- const PACKAGE_VERSION = "2.5.8";
2067
+ const PACKAGE_VERSION = "2.6.0";
2053
2068
  const USER_AGENT = `dsh-codex-subscription/${PACKAGE_VERSION}`;
2054
2069
  //#endregion
2055
2070
  //#region src/codex-images.js
@@ -2222,7 +2237,7 @@ async function readSessionImage(attachmentId, attachments, signal, messages) {
2222
2237
  };
2223
2238
  }
2224
2239
  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`);
2240
+ 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
2241
  const available = messages === void 0 ? void 0 : sessionImageReferences(messages);
2227
2242
  const references = values.map((value) => {
2228
2243
  const id = normalizeAttachmentId(value?.attachmentId);
@@ -2247,7 +2262,7 @@ function imageContent(value) {
2247
2262
  const label = typeof value.size === "string" && value.size.length > 0 ? `Generated a ${value.size} image.` : "Generated an image.";
2248
2263
  return [{
2249
2264
  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.`
2265
+ 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
2266
  }, {
2252
2267
  type: "image",
2253
2268
  attachment: imageReference(value.image)
@@ -2351,6 +2366,41 @@ function imageOutputSchema() {
2351
2366
  }
2352
2367
  };
2353
2368
  }
2369
+ const SUPPORT_ID = /^[A-Za-z0-9._-]{1,80}$/u;
2370
+ /** The request id Codex returns for an image call, kept on failures so a report can be traced. */
2371
+ function supportId(response) {
2372
+ const id = response.headers?.get?.("x-codex-imagegen-request-id");
2373
+ return typeof id === "string" && SUPPORT_ID.test(id) ? ` (request ${id})` : "";
2374
+ }
2375
+ /** What a 429 from the image endpoint says: when the limit resets, when the response tells us. */
2376
+ async function limitMessage(response, now = Date.now()) {
2377
+ const fallback = "Codex image generation quota is unavailable";
2378
+ let error;
2379
+ try {
2380
+ error = JSON.parse(await readTextWithin(response, 16 * 1024))?.error;
2381
+ } catch {
2382
+ return fallback;
2383
+ }
2384
+ if (!record$4(error)) return fallback;
2385
+ 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;
2386
+ if (at === void 0) return fallback;
2387
+ const minutes = Math.max(1, Math.ceil((at - now) / 6e4));
2388
+ return `Codex image generation limit reached; it resets in about ${minutes >= 120 ? `${Math.round(minutes / 60)} hours` : `${minutes} minutes`}`;
2389
+ }
2390
+ async function readTextWithin(response, maximumBytes) {
2391
+ if (response.body === null || response.body === void 0) return "";
2392
+ const reader = response.body.getReader();
2393
+ const chunks = [];
2394
+ let bytes = 0;
2395
+ while (bytes < maximumBytes) {
2396
+ const { done, value } = await reader.read();
2397
+ if (done) break;
2398
+ bytes += value.byteLength;
2399
+ chunks.push(value);
2400
+ }
2401
+ await reader.cancel().catch(() => {});
2402
+ return Buffer.concat(chunks.map((chunk) => Buffer.from(chunk))).toString("utf8").slice(0, maximumBytes);
2403
+ }
2354
2404
  function responseMetadata(value) {
2355
2405
  const data = Array.isArray(value?.data) ? value.data[0] : void 0;
2356
2406
  const encoded = record$4(data) ? data.b64_json : void 0;
@@ -2468,6 +2518,10 @@ function createCodexImageTool(options) {
2468
2518
  timeoutMs: 300 * 1e3,
2469
2519
  isConcurrencySafe: () => false,
2470
2520
  async execute(args, exec) {
2521
+ if (Array.isArray(args.referenceImages) && args.referenceImages.length === 0) {
2522
+ const { referenceImages: _empty, ...rest } = args;
2523
+ args = rest;
2524
+ }
2471
2525
  assertImageOperation(options.getFeatures?.(), args.referenceImages !== void 0);
2472
2526
  const defaults = readImageDefaults(options.getFeatures?.());
2473
2527
  args = {
@@ -2516,8 +2570,9 @@ function createCodexImageTool(options) {
2516
2570
  }
2517
2571
  if (!response.ok) {
2518
2572
  if (response.status === 401 || response.status === 403) throw new Error("ChatGPT sign-in needs to be renewed");
2519
- if (response.status === 429) throw new Error("Codex image generation quota is unavailable");
2520
- throw new Error(`Codex image ${editing ? "edit" : "generation"} failed (HTTP ${response.status})`);
2573
+ const requestId = supportId(response);
2574
+ if (response.status === 429) throw new Error(`${await limitMessage(response)}${requestId}`);
2575
+ throw new Error(`Codex image ${editing ? "edit" : "generation"} failed (HTTP ${response.status})${requestId}`);
2521
2576
  }
2522
2577
  const metadata = responseMetadata(await readJsonWithin(response, encodedLimit(maximumBytes) + RESPONSE_ENVELOPE_BYTES));
2523
2578
  const data = decodeCodexPng(metadata.encoded, maximumBytes);
@@ -3561,6 +3616,18 @@ function normalizeTransportEvent(event, signal) {
3561
3616
  const FAST_SERVICE_TIER = "priority";
3562
3617
  const ULTRAFAST_SERVICE_TIER = "ultrafast";
3563
3618
  /** Apply the chosen detail to user and tool-result images after the provider assembles the request. */
3619
+ const withoutUserAgent = (headers) => headers && typeof headers === "object" ? Object.fromEntries(Object.entries(headers).filter(([name]) => name.toLowerCase() !== "user-agent")) : headers;
3620
+ function withReasoningSummary(payload, summary) {
3621
+ if (summary === "auto" || payload?.reasoning === void 0 || payload.reasoning === null) return payload;
3622
+ const { summary: _previous, ...rest } = payload.reasoning;
3623
+ return {
3624
+ ...payload,
3625
+ reasoning: summary === "none" ? rest : {
3626
+ ...rest,
3627
+ summary
3628
+ }
3629
+ };
3630
+ }
3564
3631
  function withInputImageDetail(payload, detail) {
3565
3632
  if (!Array.isArray(payload.input)) return payload;
3566
3633
  let changed = false;
@@ -3614,7 +3681,7 @@ function isDshAutoReview(context) {
3614
3681
  * persistence, headers, transport, and model behavior remain owned by the
3615
3682
  * original provider.
3616
3683
  */
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() } = {}) {
3684
+ 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
3685
  const provider = createOpenAICodexProvider();
3619
3686
  const requestToken = Object.freeze({
3620
3687
  name: "DSH-managed Codex OAuth request token",
@@ -3636,9 +3703,11 @@ function openaiCodexSubscriptionProvider({ resolveSpeedMode = () => void 0, reso
3636
3703
  const speedMode = resolveSpeedMode();
3637
3704
  const serviceTier = speedMode === "ultrafast" && metadata?.supportsUltrafast === true ? ULTRAFAST_SERVICE_TIER : speedMode === "fast" && (metadata?.supportsFast ?? supportsCodexFastMode(model?.id)) ? FAST_SERVICE_TIER : void 0;
3638
3705
  const inputImageDetail = normalizeInputImageDetail(resolveInputImageDetail());
3706
+ const reasoningSummary = normalizeReasoningSummary(resolveReasoningSummary());
3639
3707
  const { temperature: _temperature, onPayload, ...rest } = options;
3640
3708
  return {
3641
3709
  ...rest,
3710
+ ...rest.headers === void 0 ? {} : { headers: withoutUserAgent(rest.headers) },
3642
3711
  ...textVerbosity === void 0 ? {} : { textVerbosity },
3643
3712
  ...serviceTier === void 0 ? {} : { serviceTier },
3644
3713
  async onPayload(payload, requestModel) {
@@ -3653,7 +3722,7 @@ function openaiCodexSubscriptionProvider({ resolveSpeedMode = () => void 0, reso
3653
3722
  const managed = compaction?.preparePayload(preferred, model?.contextWindow) ?? preferred;
3654
3723
  const next = await onPayload?.(managed, requestModel);
3655
3724
  const detailed = inputImageDetail === "auto" ? next ?? managed : withInputImageDetail(next ?? managed, inputImageDetail);
3656
- const { temperature: _dropped, ...accepted } = detailed;
3725
+ const { temperature: _dropped, ...accepted } = withReasoningSummary(detailed, reasoningSummary);
3657
3726
  return {
3658
3727
  ...accepted,
3659
3728
  ...textVerbosity === void 0 ? {} : { text: {
@@ -3700,6 +3769,7 @@ function openaiCodexSubscriptionProvider({ resolveSpeedMode = () => void 0, reso
3700
3769
  const { temperature: _temperature, onPayload, ...rest } = options;
3701
3770
  return {
3702
3771
  ...rest,
3772
+ ...rest.headers === void 0 ? {} : { headers: withoutUserAgent(rest.headers) },
3703
3773
  async onPayload(payload, requestModel) {
3704
3774
  const { temperature: _dropped, service_tier: _tier, text: _text, ...accepted } = await onPayload?.(payload, requestModel) ?? payload;
3705
3775
  return {
@@ -3790,7 +3860,8 @@ function openaiCodexSubscriptionProvider({ resolveSpeedMode = () => void 0, reso
3790
3860
  Object.freeze([
3791
3861
  "0.82.1",
3792
3862
  "0.85.1",
3793
- "0.87.1"
3863
+ "0.87.1",
3864
+ "1.1.0"
3794
3865
  ]);
3795
3866
  //#endregion
3796
3867
  //#region src/model-catalog.js
@@ -4941,21 +5012,35 @@ function creditExpiry({ planType, balance, apiExpiresAt }, now = Date.now()) {
4941
5012
  };
4942
5013
  }
4943
5014
  //#endregion
5015
+ //#region src/quota-cadence.js
5016
+ /** Milliseconds until the next quota read, from the highest used percentage of the windows that matter. */
5017
+ function quotaRefreshMs(percent) {
5018
+ if (!Number.isFinite(percent)) return 6e4;
5019
+ if (percent >= 99) return 5e3;
5020
+ if (percent >= 90) return 15e3;
5021
+ if (percent >= 75) return 3e4;
5022
+ return 6e4;
5023
+ }
5024
+ /** Highest used percentage among windows (objects with usedPercent), or undefined when there are none. */
5025
+ function highestUsed(windows) {
5026
+ const values = (Array.isArray(windows) ? windows : []).map((window) => window?.usedPercent).filter(Number.isFinite);
5027
+ return values.length === 0 ? void 0 : Math.max(...values);
5028
+ }
5029
+ //#endregion
4944
5030
  //#region src/usage.js
4945
5031
  const CODEX_USAGE_URL = "https://chatgpt.com/backend-api/wham/usage";
4946
- const DEFAULT_TTL_MS = 6e4;
4947
5032
  const DEFAULT_TIMEOUT_MS$1 = 15e3;
4948
5033
  const DEFAULT_FAILURE_TTL_MS = 5e3;
4949
5034
  const DEFAULT_MAX_RETRY_AFTER_MS = 5 * 6e4;
4950
5035
  const record$1 = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
4951
- function windowOf(value) {
5036
+ function windowOf(value, nowSeconds) {
4952
5037
  if (value === void 0 || value === null) return void 0;
4953
5038
  if (!record$1(value)) throw new Error("Codex returned a malformed rate-limit window");
4954
5039
  const used = value.used_percent;
4955
5040
  const seconds = value.limit_window_seconds;
4956
5041
  if (!Number.isFinite(used) || used < 0 || used > 100) throw new Error("Codex returned an invalid used percentage");
4957
5042
  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");
5043
+ 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
5044
  return {
4960
5045
  usedPercent: used,
4961
5046
  remainingPercent: 100 - used,
@@ -4963,10 +5048,10 @@ function windowOf(value) {
4963
5048
  ...resetsAt === void 0 ? {} : { resetsAt }
4964
5049
  };
4965
5050
  }
4966
- function limitOf(id, name, value) {
5051
+ function limitOf(id, name, value, nowSeconds) {
4967
5052
  if (value === void 0 || value === null) return void 0;
4968
5053
  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);
5054
+ const windows = [windowOf(value.primary_window, nowSeconds), windowOf(value.secondary_window, nowSeconds)].filter(Boolean);
4970
5055
  return windows.length === 0 ? void 0 : {
4971
5056
  id,
4972
5057
  ...name ? { name } : {},
@@ -5066,7 +5151,8 @@ function resetCreditsOf(value) {
5066
5151
  };
5067
5152
  }
5068
5153
  /** Reduce the provider payload to a browser-safe quota projection. */
5069
- function parseCodexUsage(value) {
5154
+ function parseCodexUsage(value, nowMs = Date.now()) {
5155
+ const nowSeconds = Math.floor(nowMs / 1e3);
5070
5156
  if (!record$1(value)) throw new Error("Codex returned a malformed usage response");
5071
5157
  const rateLimits = [];
5072
5158
  const seenLimitIds = /* @__PURE__ */ new Set();
@@ -5075,21 +5161,27 @@ function parseCodexUsage(value) {
5075
5161
  seenLimitIds.add(limit.id);
5076
5162
  rateLimits.push(limit);
5077
5163
  };
5078
- addLimit(limitOf("codex", "Codex", value.rate_limit));
5164
+ addLimit(limitOf("codex", "Codex", value.rate_limit, nowSeconds));
5079
5165
  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
5166
  for (const entry of value.additional_rate_limits ?? []) {
5081
5167
  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
5168
  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));
5169
+ addLimit(limitOf(entry.metered_feature, entry.limit_name || void 0, entry.rate_limit, nowSeconds));
5084
5170
  }
5085
- addLimit(limitOf("code_review", "Code review", value.code_review_rate_limit));
5171
+ addLimit(limitOf("code_review", "Code review", value.code_review_rate_limit, nowSeconds));
5086
5172
  const chatPass = chatPassOf(value.chatpass);
5087
5173
  const credits = creditsOf(value.credits, typeof value.plan_type === "string" ? value.plan_type : void 0);
5088
5174
  const individualLimit = individualOf(value.spend_control);
5089
5175
  const spendControlReached = spendControlReachedOf(value.spend_control);
5090
5176
  const resetCredits = resetCreditsOf(value.rate_limit_reset_credits);
5177
+ const planType = typeof value.plan_type === "string" && /^[a-z][a-z_]{0,31}$/u.test(value.plan_type) ? value.plan_type : void 0;
5178
+ const reached = value.rate_limit_reached_type;
5179
+ const reachedRaw = typeof reached === "string" ? reached : record$1(reached) ? reached.type : void 0;
5180
+ const rateLimitReachedType = typeof reachedRaw === "string" && /^[a-z][a-z_]{0,63}$/u.test(reachedRaw) ? reachedRaw : void 0;
5091
5181
  return {
5092
5182
  rateLimits,
5183
+ ...rateLimitReachedType === void 0 ? {} : { rateLimitReachedType },
5184
+ ...planType === void 0 ? {} : { planType },
5093
5185
  ...chatPass === void 0 ? {} : { chatPass },
5094
5186
  ...credits === void 0 ? {} : { credits },
5095
5187
  ...individualLimit === void 0 ? {} : { individualLimit },
@@ -5120,7 +5212,7 @@ function createCodexUsageReader(options) {
5120
5212
  const readCredential = options.readCredential;
5121
5213
  const fetchUsage = options.fetch ?? fetch;
5122
5214
  const now = options.now ?? Date.now;
5123
- const ttlMs = options.ttlMs ?? DEFAULT_TTL_MS;
5215
+ const ttlFor = (value) => options.ttlMs ?? quotaRefreshMs(highestUsed(value?.rateLimits?.find((limit) => limit.id === "codex")?.windows));
5124
5216
  const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS$1;
5125
5217
  const failureTtlMs = options.failureTtlMs ?? DEFAULT_FAILURE_TTL_MS;
5126
5218
  const maxRetryAfterMs = options.maxRetryAfterMs ?? DEFAULT_MAX_RETRY_AFTER_MS;
@@ -5155,14 +5247,14 @@ function createCodexUsageReader(options) {
5155
5247
  throw new Error("ChatGPT returned an unreadable usage response");
5156
5248
  }
5157
5249
  return {
5158
- ...parseCodexUsage(value),
5250
+ ...parseCodexUsage(value, now()),
5159
5251
  fetchedAt: now()
5160
5252
  };
5161
5253
  };
5162
5254
  return Object.freeze({
5163
5255
  read({ force = false, signal } = {}) {
5164
5256
  if (failed !== void 0 && now() < failed.retryAt) return Promise.reject(new Error(failed.message));
5165
- if (!force && cached !== void 0 && now() - cached.fetchedAt < ttlMs) return Promise.resolve(structuredClone(cached));
5257
+ if (!force && cached !== void 0 && now() - cached.fetchedAt < ttlFor(cached)) return Promise.resolve(structuredClone(cached));
5166
5258
  if (inFlight !== void 0) return inFlight.then(structuredClone);
5167
5259
  const currentGeneration = generation;
5168
5260
  const current = load(signal).then((value) => {
@@ -5246,6 +5338,7 @@ function createWakeSignal() {
5246
5338
  };
5247
5339
  }
5248
5340
  function shortResetDelay(usage, nowMs, maxWaitMs, resetMarginMs) {
5341
+ if (typeof usage?.rateLimitReachedType === "string" && /^(?:workspace_|.*credits_depleted)/u.test(usage.rateLimitReachedType)) return void 0;
5249
5342
  let latestDelayMs;
5250
5343
  for (const limit of usage?.rateLimits ?? []) {
5251
5344
  if (limit?.id !== "codex") continue;
@@ -6383,6 +6476,7 @@ function apply(ctx, config = {}) {
6383
6476
  resolveSpeedMode: () => settings.get()[SPEED_MODE_FIELD],
6384
6477
  resolveOutputVerbosity: () => normalizeOutputVerbosity(settings.get()[OUTPUT_VERBOSITY_FIELD]),
6385
6478
  resolveInputImageDetail: () => settings.get()[INPUT_IMAGE_DETAIL_FIELD],
6479
+ resolveReasoningSummary: () => settings.get()[REASONING_SUMMARY_FIELD],
6386
6480
  resolveContextMode: () => normalizeContextMode(settings.get()[CONTEXT_MODE_FIELD]),
6387
6481
  resolveCustomContextWindow: (modelKey) => {
6388
6482
  const overrides = readCapabilitySettings(settings.get())[CUSTOM_CONTEXT_OVERRIDES_FIELD];
@@ -6413,6 +6507,7 @@ function apply(ctx, config = {}) {
6413
6507
  [SPEED_MODE_FIELD]: settings.get()[SPEED_MODE_FIELD],
6414
6508
  [OUTPUT_VERBOSITY_FIELD]: normalizeOutputVerbosity(settings.get()[OUTPUT_VERBOSITY_FIELD]),
6415
6509
  [INPUT_IMAGE_DETAIL_FIELD]: normalizeInputImageDetail(settings.get()[INPUT_IMAGE_DETAIL_FIELD]),
6510
+ [REASONING_SUMMARY_FIELD]: normalizeReasoningSummary(settings.get()[REASONING_SUMMARY_FIELD]),
6416
6511
  [STREAM_IDLE_TIMEOUT_MINUTES_FIELD]: normalizeStreamIdleTimeoutMinutes(settings.get()[STREAM_IDLE_TIMEOUT_MINUTES_FIELD]),
6417
6512
  [CONTEXT_MODE_FIELD]: normalizeContextMode(settings.get()[CONTEXT_MODE_FIELD]),
6418
6513
  [CUSTOM_CONTEXT_WINDOW_FIELD]: normalizeCustomContextWindow(settings.get()[CUSTOM_CONTEXT_WINDOW_FIELD]),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-codex-subscription",
3
- "version": "2.5.8",
3
+ "version": "2.6.0",
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",