@eddyskywalker/dsh-chatgpt-subscription 0.36.2 → 0.37.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/CHANGELOG.md +39 -0
- package/README.md +23 -3
- package/lib/client.js +340 -47
- package/lib/client.js.map +1 -1
- package/lib/index.js +3043 -40
- package/lib/types/client/common/ComposerQuotaBadge.d.ts +7 -0
- package/lib/types/client/common/ComposerQuotaBadge.d.ts.map +1 -1
- package/lib/types/client/locales-ru/opendesign.d.ts.map +1 -1
- package/lib/types/client/locales-ru/progress-updates.d.ts.map +1 -1
- package/lib/types/client/locales.d.ts +4 -4
- package/lib/types/client/opendesign/OpenDesignComposerQuota.d.ts +6 -0
- package/lib/types/client/opendesign/OpenDesignComposerQuota.d.ts.map +1 -1
- package/lib/types/client/opendesign/OpenDesignSection.d.ts.map +1 -1
- package/lib/types/client/opendesign/locales.d.ts +54 -0
- package/lib/types/client/opendesign/locales.d.ts.map +1 -1
- package/lib/types/client/opendesign/styles.d.ts +5 -0
- package/lib/types/client/opendesign/styles.d.ts.map +1 -1
- package/lib/types/client/progress-updates/locales.d.ts +17 -2
- package/lib/types/client/progress-updates/locales.d.ts.map +1 -1
- package/lib/types/client/progress-updates/settings-binding.d.ts +13 -3
- package/lib/types/client/progress-updates/settings-binding.d.ts.map +1 -1
- package/lib/types/client/progress-updates/settings-section.d.ts +5 -5
- package/lib/types/client/progress-updates/settings-section.d.ts.map +1 -1
- package/lib/types/client/progress-updates/styles.d.ts.map +1 -1
- package/lib/types/host/opendesign/client.d.ts +103 -0
- package/lib/types/host/opendesign/client.d.ts.map +1 -1
- package/lib/types/host/opendesign/routes.d.ts.map +1 -1
- package/lib/types/host/opendesign/types.d.ts +31 -0
- package/lib/types/host/opendesign/types.d.ts.map +1 -1
- package/lib/types/host/progress-updates/index.d.ts +5 -0
- package/lib/types/host/progress-updates/index.d.ts.map +1 -1
- package/lib/types/host/progress-updates/prompt.d.ts +37 -3
- package/lib/types/host/progress-updates/prompt.d.ts.map +1 -1
- package/lib/types/host/progress-updates/tool.d.ts.map +1 -1
- package/lib/types/host/proxy-manager.d.ts +63 -1
- package/lib/types/host/proxy-manager.d.ts.map +1 -1
- package/lib/types/host/widget-board/line-contracts.d.ts +192 -0
- package/lib/types/host/widget-board/line-contracts.d.ts.map +1 -0
- package/lib/types/host/widget-board/line-quota.d.ts +284 -0
- package/lib/types/host/widget-board/line-quota.d.ts.map +1 -0
- package/lib/types/host/widget-board/line-registry.d.ts +402 -0
- package/lib/types/host/widget-board/line-registry.d.ts.map +1 -0
- package/lib/types/host/widget-board/provider.d.ts +140 -0
- package/lib/types/host/widget-board/provider.d.ts.map +1 -0
- package/lib/types/index.d.ts +10 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/shared/opendesign-contracts.d.ts +47 -0
- package/lib/types/shared/opendesign-contracts.d.ts.map +1 -1
- package/package.json +2 -1
- package/widgets/line-flip/index.html +58 -0
- package/widgets/line-flip/main.js +1102 -0
- package/widgets/line-flip/style.css +729 -0
- package/widgets/line-flip/widget.json +555 -0
|
@@ -6,6 +6,13 @@ export interface ComposerQuotaFacts {
|
|
|
6
6
|
/** What the hover and the screen reader say. */
|
|
7
7
|
tooltip: string;
|
|
8
8
|
level: 'normal' | 'warning' | 'danger';
|
|
9
|
+
/**
|
|
10
|
+
* The remaining share (0–100) to draw beside the number, for a line whose
|
|
11
|
+
* status states one. It is optional on purpose: most lines report only a
|
|
12
|
+
* number, and the badge then renders exactly the markup it always did — the
|
|
13
|
+
* bar exists for the lines that can state a remaining share, not as a default.
|
|
14
|
+
*/
|
|
15
|
+
percent?: number | null;
|
|
9
16
|
}
|
|
10
17
|
/** The shared grading: 5% or less is critical, 20% or less warns. */
|
|
11
18
|
export declare function quotaLevel(remainingPercent: number): ComposerQuotaFacts['level'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComposerQuotaBadge.d.ts","sourceRoot":"","sources":["../../../../src/client/common/ComposerQuotaBadge.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAA;AAC5F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAGhD,MAAM,WAAW,kBAAkB;IACjC,qDAAqD;IACrD,IAAI,EAAE,MAAM,CAAA;IACZ,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"ComposerQuotaBadge.d.ts","sourceRoot":"","sources":["../../../../src/client/common/ComposerQuotaBadge.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAA;AAC5F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAGhD,MAAM,WAAW,kBAAkB;IACjC,qDAAqD;IACrD,IAAI,EAAE,MAAM,CAAA;IACZ,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAA;IACtC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACxB;AAED,qEAAqE;AACrE,wBAAgB,UAAU,CAAC,gBAAgB,EAAE,MAAM,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAEhF;AAED,MAAM,WAAW,uBAAuB,CAAC,MAAM,SAAS;IAAE,aAAa,EAAE,OAAO,CAAA;CAAE;IAChF,SAAS,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAA;IAC7C,kBAAkB,IAAI,IAAI,CAAA;IAC1B,sEAAsE;IACtE,UAAU,EAAE,MAAM,CAAA;IAClB,kEAAkE;IAClE,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IAC7C;;;;;;OAMG;IACH,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,kBAAkB,GAAG,IAAI,CAAA;IAC1F,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAA;CACd;AAED,wBAAgB,kBAAkB,CAAC,MAAM,SAAS;IAAE,aAAa,EAAE,OAAO,CAAA;CAAE,EAC1E,KAAK,EAAE,uBAAuB,CAAC,MAAM,CAAC,GACrC,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CA4E1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"opendesign.d.ts","sourceRoot":"","sources":["../../../../src/client/locales-ru/opendesign.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAGnE,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"opendesign.d.ts","sourceRoot":"","sources":["../../../../src/client/locales-ru/opendesign.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAGnE,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAkH1D,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress-updates.d.ts","sourceRoot":"","sources":["../../../../src/client/locales-ru/progress-updates.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAA;AAE9E,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,wBAAwB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"progress-updates.d.ts","sourceRoot":"","sources":["../../../../src/client/locales-ru/progress-updates.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAA;AAE9E,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,wBAAwB,EAAE,MAAM,CAkC/D,CAAA"}
|
|
@@ -28,7 +28,7 @@ export declare const zh: {
|
|
|
28
28
|
readonly modelsHint: "勾选后模型才会显示在对话页的模型选择列表中;全部取消勾选或关闭上方开关可在列表中隐藏该供应商。";
|
|
29
29
|
readonly proxySettings: "网络代理";
|
|
30
30
|
readonly proxyMode: "代理模式";
|
|
31
|
-
readonly proxyModeHint: "
|
|
31
|
+
readonly proxyModeHint: "本插件的全部供应线路共用这一份代理设置,登录、令牌续期、模型目录与配额读取同样经过它;支持自动读取系统代理,修改后对后续请求生效。";
|
|
32
32
|
readonly proxyModeAuto: "系统代理(自动检测)";
|
|
33
33
|
readonly proxyModeCustom: "自定义代理";
|
|
34
34
|
readonly proxyModeDirect: "直连(禁用代理)";
|
|
@@ -39,7 +39,7 @@ export declare const zh: {
|
|
|
39
39
|
readonly proxyDetected: "检测到系统代理";
|
|
40
40
|
readonly proxyDetectedEffective: "(已自动生效)";
|
|
41
41
|
readonly proxyNoneDetected: "未检测到系统代理,将使用直连";
|
|
42
|
-
readonly proxyDirectHint: "
|
|
42
|
+
readonly proxyDirectHint: "本插件的全部请求将直接连接,不经过任何代理服务器。";
|
|
43
43
|
readonly enhancements: "增强功能";
|
|
44
44
|
readonly fastMode: "快速模式(1.5x 速度)";
|
|
45
45
|
readonly fastModeHint: "提升 Token 生成速度至约 1.5 倍;将以约 2x–2.5x 速度消耗 Codex 订阅额度。";
|
|
@@ -235,7 +235,7 @@ export declare const dictionaries: {
|
|
|
235
235
|
readonly modelsHint: "勾选后模型才会显示在对话页的模型选择列表中;全部取消勾选或关闭上方开关可在列表中隐藏该供应商。";
|
|
236
236
|
readonly proxySettings: "网络代理";
|
|
237
237
|
readonly proxyMode: "代理模式";
|
|
238
|
-
readonly proxyModeHint: "
|
|
238
|
+
readonly proxyModeHint: "本插件的全部供应线路共用这一份代理设置,登录、令牌续期、模型目录与配额读取同样经过它;支持自动读取系统代理,修改后对后续请求生效。";
|
|
239
239
|
readonly proxyModeAuto: "系统代理(自动检测)";
|
|
240
240
|
readonly proxyModeCustom: "自定义代理";
|
|
241
241
|
readonly proxyModeDirect: "直连(禁用代理)";
|
|
@@ -246,7 +246,7 @@ export declare const dictionaries: {
|
|
|
246
246
|
readonly proxyDetected: "检测到系统代理";
|
|
247
247
|
readonly proxyDetectedEffective: "(已自动生效)";
|
|
248
248
|
readonly proxyNoneDetected: "未检测到系统代理,将使用直连";
|
|
249
|
-
readonly proxyDirectHint: "
|
|
249
|
+
readonly proxyDirectHint: "本插件的全部请求将直接连接,不经过任何代理服务器。";
|
|
250
250
|
readonly enhancements: "增强功能";
|
|
251
251
|
readonly fastMode: "快速模式(1.5x 速度)";
|
|
252
252
|
readonly fastModeHint: "提升 Token 生成速度至约 1.5 倍;将以约 2x–2.5x 速度消耗 Codex 订阅额度。";
|
|
@@ -13,6 +13,12 @@ export interface OpenDesignComposerQuotaProps {
|
|
|
13
13
|
* at all; the badge shows the primary (else first) readable account's latest
|
|
14
14
|
* balance and never triggers a read of its own — a poll must not fan out one
|
|
15
15
|
* upstream call per account. A pasted-key-only pool renders nothing.
|
|
16
|
+
*
|
|
17
|
+
* The Design Plan endpoint also states the tier's allowance windows, each with
|
|
18
|
+
* its own grant and what is left of it, so the badge shows the remaining share
|
|
19
|
+
* of the narrowest window and draws it as a thin bar. A reading without a
|
|
20
|
+
* measurable window keeps the bare balance, which is what every other line
|
|
21
|
+
* renders.
|
|
16
22
|
*/
|
|
17
23
|
export declare function OpenDesignComposerQuota(props: OpenDesignComposerQuotaProps): React.JSX.Element;
|
|
18
24
|
/** The line's own number picker, exported so a test can pin the rule. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenDesignComposerQuota.d.ts","sourceRoot":"","sources":["../../../../src/client/opendesign/OpenDesignComposerQuota.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAA;AAC5F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,
|
|
1
|
+
{"version":3,"file":"OpenDesignComposerQuota.d.ts","sourceRoot":"","sources":["../../../../src/client/opendesign/OpenDesignComposerQuota.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAA;AAC5F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,EAAkC,KAAK,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAC1G,OAAO,KAAK,EAA2B,mBAAmB,EAAE,MAAM,sCAAsC,CAAA;AAMxG,MAAM,WAAW,4BAA4B;IAC3C,SAAS,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAA;IAC7C,kBAAkB,IAAI,IAAI,CAAA;CAC3B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,4BAA4B,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAS9F;AAuDD,yEAAyE;AACzE,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,mBAAmB,GAAG,IAAI,EAClC,QAAQ,CAAC,EAAE,MAAM,GAChB,kBAAkB,GAAG,IAAI,CAkC3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenDesignSection.d.ts","sourceRoot":"","sources":["../../../../src/client/opendesign/OpenDesignSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"OpenDesignSection.d.ts","sourceRoot":"","sources":["../../../../src/client/opendesign/OpenDesignSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAA;AAqBhF,UAAU,KAAK;IACb,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;CAChC;AA4QD;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAAC,YAAY,CA0mBlE"}
|
|
@@ -90,6 +90,15 @@ export declare const zh: {
|
|
|
90
90
|
readonly usageTotalConsumed: "累计消耗 ${amount}";
|
|
91
91
|
readonly usageUsageCount: "计费请求 {count} 次";
|
|
92
92
|
readonly usagePlanUnknown: "已读取额度,但上游未返回套餐档位。";
|
|
93
|
+
readonly usageWindowsTitle: "Design Plan 额度窗口";
|
|
94
|
+
readonly usageWindowUsed: "已用 {used}%";
|
|
95
|
+
readonly usageWindowRemaining: "剩余 {remaining}%";
|
|
96
|
+
readonly usageWindowResetsAt: "{time} 重置";
|
|
97
|
+
readonly usageWindowsUnavailable: "额度窗口读取失败或该工作区未配置";
|
|
98
|
+
readonly usageWindowsConsoleOnly: "额度窗口仅在 OpenDesign 控制台可见:该端点不接受插件凭证";
|
|
99
|
+
readonly usageWindowDays: "{count} 天";
|
|
100
|
+
readonly usageWindowHours: "{count} 小时";
|
|
101
|
+
readonly usageWindowMinutes: "{count} 分钟";
|
|
93
102
|
readonly limitKey: "凭据存储在系统加密凭据库中,界面从不显示 Key 本身。";
|
|
94
103
|
readonly limitGateway: "请求由 OpenDesign 网关服务,实际上游由网关决定。";
|
|
95
104
|
readonly limitRoute: "模型路由按 provider id 抢占:若已有其他插件占用 opendesign,本卡仍可配置,但请求由对方服务。";
|
|
@@ -214,6 +223,15 @@ export declare const en: {
|
|
|
214
223
|
readonly usageTotalConsumed: "Consumed in total ${amount}";
|
|
215
224
|
readonly usageUsageCount: "Billed requests: {count}";
|
|
216
225
|
readonly usagePlanUnknown: "Credits were read, but the upstream named no plan tier.";
|
|
226
|
+
readonly usageWindowsTitle: "Design Plan allowance windows";
|
|
227
|
+
readonly usageWindowUsed: "{used}% used";
|
|
228
|
+
readonly usageWindowRemaining: "{remaining}% remaining";
|
|
229
|
+
readonly usageWindowResetsAt: "Resets {time}";
|
|
230
|
+
readonly usageWindowsUnavailable: "Allowance windows could not be read, or this workspace has none configured";
|
|
231
|
+
readonly usageWindowsConsoleOnly: "Allowance windows are only visible in the OpenDesign console: the endpoint refuses plugin credentials";
|
|
232
|
+
readonly usageWindowDays: "days: {count}";
|
|
233
|
+
readonly usageWindowHours: "hours: {count}";
|
|
234
|
+
readonly usageWindowMinutes: "minutes: {count}";
|
|
217
235
|
readonly limitKey: "API keys live in the OS credential store; the card never shows the key itself.";
|
|
218
236
|
readonly limitGateway: "Requests are served by the OpenDesign gateway, which chooses the actual upstream.";
|
|
219
237
|
readonly limitRoute: "The route is claimed by provider id: if another plugin already serves opendesign, this card still configures the line but that provider answers the requests.";
|
|
@@ -339,6 +357,15 @@ export declare const dictionaries: {
|
|
|
339
357
|
readonly usageTotalConsumed: "累计消耗 ${amount}";
|
|
340
358
|
readonly usageUsageCount: "计费请求 {count} 次";
|
|
341
359
|
readonly usagePlanUnknown: "已读取额度,但上游未返回套餐档位。";
|
|
360
|
+
readonly usageWindowsTitle: "Design Plan 额度窗口";
|
|
361
|
+
readonly usageWindowUsed: "已用 {used}%";
|
|
362
|
+
readonly usageWindowRemaining: "剩余 {remaining}%";
|
|
363
|
+
readonly usageWindowResetsAt: "{time} 重置";
|
|
364
|
+
readonly usageWindowsUnavailable: "额度窗口读取失败或该工作区未配置";
|
|
365
|
+
readonly usageWindowsConsoleOnly: "额度窗口仅在 OpenDesign 控制台可见:该端点不接受插件凭证";
|
|
366
|
+
readonly usageWindowDays: "{count} 天";
|
|
367
|
+
readonly usageWindowHours: "{count} 小时";
|
|
368
|
+
readonly usageWindowMinutes: "{count} 分钟";
|
|
342
369
|
readonly limitKey: "凭据存储在系统加密凭据库中,界面从不显示 Key 本身。";
|
|
343
370
|
readonly limitGateway: "请求由 OpenDesign 网关服务,实际上游由网关决定。";
|
|
344
371
|
readonly limitRoute: "模型路由按 provider id 抢占:若已有其他插件占用 opendesign,本卡仍可配置,但请求由对方服务。";
|
|
@@ -463,6 +490,15 @@ export declare const dictionaries: {
|
|
|
463
490
|
readonly usageTotalConsumed: "累计消耗 ${amount}";
|
|
464
491
|
readonly usageUsageCount: "计费请求 {count} 次";
|
|
465
492
|
readonly usagePlanUnknown: "已读取额度,但上游未返回套餐档位。";
|
|
493
|
+
readonly usageWindowsTitle: "Design Plan 额度窗口";
|
|
494
|
+
readonly usageWindowUsed: "已用 {used}%";
|
|
495
|
+
readonly usageWindowRemaining: "剩余 {remaining}%";
|
|
496
|
+
readonly usageWindowResetsAt: "{time} 重置";
|
|
497
|
+
readonly usageWindowsUnavailable: "额度窗口读取失败或该工作区未配置";
|
|
498
|
+
readonly usageWindowsConsoleOnly: "额度窗口仅在 OpenDesign 控制台可见:该端点不接受插件凭证";
|
|
499
|
+
readonly usageWindowDays: "{count} 天";
|
|
500
|
+
readonly usageWindowHours: "{count} 小时";
|
|
501
|
+
readonly usageWindowMinutes: "{count} 分钟";
|
|
466
502
|
readonly limitKey: "凭据存储在系统加密凭据库中,界面从不显示 Key 本身。";
|
|
467
503
|
readonly limitGateway: "请求由 OpenDesign 网关服务,实际上游由网关决定。";
|
|
468
504
|
readonly limitRoute: "模型路由按 provider id 抢占:若已有其他插件占用 opendesign,本卡仍可配置,但请求由对方服务。";
|
|
@@ -587,6 +623,15 @@ export declare const dictionaries: {
|
|
|
587
623
|
readonly usageTotalConsumed: "Consumed in total ${amount}";
|
|
588
624
|
readonly usageUsageCount: "Billed requests: {count}";
|
|
589
625
|
readonly usagePlanUnknown: "Credits were read, but the upstream named no plan tier.";
|
|
626
|
+
readonly usageWindowsTitle: "Design Plan allowance windows";
|
|
627
|
+
readonly usageWindowUsed: "{used}% used";
|
|
628
|
+
readonly usageWindowRemaining: "{remaining}% remaining";
|
|
629
|
+
readonly usageWindowResetsAt: "Resets {time}";
|
|
630
|
+
readonly usageWindowsUnavailable: "Allowance windows could not be read, or this workspace has none configured";
|
|
631
|
+
readonly usageWindowsConsoleOnly: "Allowance windows are only visible in the OpenDesign console: the endpoint refuses plugin credentials";
|
|
632
|
+
readonly usageWindowDays: "days: {count}";
|
|
633
|
+
readonly usageWindowHours: "hours: {count}";
|
|
634
|
+
readonly usageWindowMinutes: "minutes: {count}";
|
|
590
635
|
readonly limitKey: "API keys live in the OS credential store; the card never shows the key itself.";
|
|
591
636
|
readonly limitGateway: "Requests are served by the OpenDesign gateway, which chooses the actual upstream.";
|
|
592
637
|
readonly limitRoute: "The route is claimed by provider id: if another plugin already serves opendesign, this card still configures the line but that provider answers the requests.";
|
|
@@ -711,6 +756,15 @@ export declare const dictionaries: {
|
|
|
711
756
|
readonly usageTotalConsumed: "Consumed in total ${amount}";
|
|
712
757
|
readonly usageUsageCount: "Billed requests: {count}";
|
|
713
758
|
readonly usagePlanUnknown: "Credits were read, but the upstream named no plan tier.";
|
|
759
|
+
readonly usageWindowsTitle: "Design Plan allowance windows";
|
|
760
|
+
readonly usageWindowUsed: "{used}% used";
|
|
761
|
+
readonly usageWindowRemaining: "{remaining}% remaining";
|
|
762
|
+
readonly usageWindowResetsAt: "Resets {time}";
|
|
763
|
+
readonly usageWindowsUnavailable: "Allowance windows could not be read, or this workspace has none configured";
|
|
764
|
+
readonly usageWindowsConsoleOnly: "Allowance windows are only visible in the OpenDesign console: the endpoint refuses plugin credentials";
|
|
765
|
+
readonly usageWindowDays: "days: {count}";
|
|
766
|
+
readonly usageWindowHours: "hours: {count}";
|
|
767
|
+
readonly usageWindowMinutes: "minutes: {count}";
|
|
714
768
|
readonly limitKey: "API keys live in the OS credential store; the card never shows the key itself.";
|
|
715
769
|
readonly limitGateway: "Requests are served by the OpenDesign gateway, which chooses the actual upstream.";
|
|
716
770
|
readonly limitRoute: "The route is claimed by provider id: if another plugin already serves opendesign, this card still configures the line but that provider answers the requests.";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../src/client/opendesign/locales.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,mBAAmB,CA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,MAAM,mBAAmB,GAAG,MAAM,OAAO,EAAE,CAAA"}
|
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
* controls, which the shared `.dsha-*` vocabulary has no expression for.
|
|
4
4
|
* Everything else on the tab reuses the shared card.
|
|
5
5
|
*
|
|
6
|
+
* The composer meter is the one shared-markup rule kept here: every line feeds
|
|
7
|
+
* the shared badge differently, and this line is the only one that hands it a
|
|
8
|
+
* remaining share to draw, so the rule lives beside the card that produces the
|
|
9
|
+
* figure instead of being repeated in every line's sheet.
|
|
10
|
+
*
|
|
6
11
|
* `.dshod-input` mirrors the input styling another line declares under an
|
|
7
12
|
* unprefixed name on purpose: that class is that line's own, and a prefix of
|
|
8
13
|
* ours keeps this card's look from drifting with someone else's sheet.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/client/opendesign/styles.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/client/opendesign/styles.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CA4C9C"}
|
|
@@ -40,6 +40,11 @@ export declare const zh: {
|
|
|
40
40
|
readonly settingsEnabledNote: "让 agent 在对话中发布进展更新";
|
|
41
41
|
readonly settingsThresholdName: "催促阈值";
|
|
42
42
|
readonly settingsThresholdNote: "连续这么多轮没有进展时,提醒 agent 汇报一次";
|
|
43
|
+
readonly settingsLanguageName: "输出语言";
|
|
44
|
+
readonly settingsLanguageNote: "进展更新的标题与正文用哪种语言写";
|
|
45
|
+
readonly settingsLanguageAuto: "自动(跟随对话)";
|
|
46
|
+
readonly settingsLanguageZh: "中文";
|
|
47
|
+
readonly settingsLanguageEn: "English";
|
|
43
48
|
readonly settingsPanelName: "进展面板";
|
|
44
49
|
readonly settingsPanelNote: "在右侧栏查看本次会话的全部进展";
|
|
45
50
|
readonly settingsUnavailable: "这项设置当前不可修改(宿主没有开放配置表单)";
|
|
@@ -76,6 +81,11 @@ export declare const dictionaries: {
|
|
|
76
81
|
readonly settingsEnabledNote: "让 agent 在对话中发布进展更新";
|
|
77
82
|
readonly settingsThresholdName: "催促阈值";
|
|
78
83
|
readonly settingsThresholdNote: "连续这么多轮没有进展时,提醒 agent 汇报一次";
|
|
84
|
+
readonly settingsLanguageName: "输出语言";
|
|
85
|
+
readonly settingsLanguageNote: "进展更新的标题与正文用哪种语言写";
|
|
86
|
+
readonly settingsLanguageAuto: "自动(跟随对话)";
|
|
87
|
+
readonly settingsLanguageZh: "中文";
|
|
88
|
+
readonly settingsLanguageEn: "English";
|
|
79
89
|
readonly settingsPanelName: "进展面板";
|
|
80
90
|
readonly settingsPanelNote: "在右侧栏查看本次会话的全部进展";
|
|
81
91
|
readonly settingsUnavailable: "这项设置当前不可修改(宿主没有开放配置表单)";
|
|
@@ -108,13 +118,18 @@ export declare const dictionaries: {
|
|
|
108
118
|
readonly settingsEnabledNote: "让 agent 在对话中发布进展更新";
|
|
109
119
|
readonly settingsThresholdName: "催促阈值";
|
|
110
120
|
readonly settingsThresholdNote: "连续这么多轮没有进展时,提醒 agent 汇报一次";
|
|
121
|
+
readonly settingsLanguageName: "输出语言";
|
|
122
|
+
readonly settingsLanguageNote: "进展更新的标题与正文用哪种语言写";
|
|
123
|
+
readonly settingsLanguageAuto: "自动(跟随对话)";
|
|
124
|
+
readonly settingsLanguageZh: "中文";
|
|
125
|
+
readonly settingsLanguageEn: "English";
|
|
111
126
|
readonly settingsPanelName: "进展面板";
|
|
112
127
|
readonly settingsPanelNote: "在右侧栏查看本次会话的全部进展";
|
|
113
128
|
readonly settingsUnavailable: "这项设置当前不可修改(宿主没有开放配置表单)";
|
|
114
129
|
readonly settingsSaveFailed: "保存失败,请稍后再试";
|
|
115
130
|
};
|
|
116
|
-
en: Record<"navTitle" | "progressTitle" | "progressGuideNote" | "markdownCopy" | "markdownCopied" | "markdownFootnotes" | "progressLatest" | "progressCount" | "progressExpand" | "progressCollapse" | "progressEmptyTitle" | "progressEmptyHint" | "rowPending" | "rowRunning" | "rowDone" | "rowError" | "rowExpand" | "rowCollapse" | "settingsHint" | "settingsOpen" | "settingsEnabledName" | "settingsEnabledNote" | "settingsThresholdName" | "settingsThresholdNote" | "settingsPanelName" | "settingsPanelNote" | "settingsUnavailable" | "settingsSaveFailed", string>;
|
|
117
|
-
'en-US': Record<"navTitle" | "progressTitle" | "progressGuideNote" | "markdownCopy" | "markdownCopied" | "markdownFootnotes" | "progressLatest" | "progressCount" | "progressExpand" | "progressCollapse" | "progressEmptyTitle" | "progressEmptyHint" | "rowPending" | "rowRunning" | "rowDone" | "rowError" | "rowExpand" | "rowCollapse" | "settingsHint" | "settingsOpen" | "settingsEnabledName" | "settingsEnabledNote" | "settingsThresholdName" | "settingsThresholdNote" | "settingsPanelName" | "settingsPanelNote" | "settingsUnavailable" | "settingsSaveFailed", string>;
|
|
131
|
+
en: Record<"navTitle" | "progressTitle" | "progressGuideNote" | "markdownCopy" | "markdownCopied" | "markdownFootnotes" | "progressLatest" | "progressCount" | "progressExpand" | "progressCollapse" | "progressEmptyTitle" | "progressEmptyHint" | "rowPending" | "rowRunning" | "rowDone" | "rowError" | "rowExpand" | "rowCollapse" | "settingsHint" | "settingsOpen" | "settingsEnabledName" | "settingsEnabledNote" | "settingsThresholdName" | "settingsThresholdNote" | "settingsLanguageName" | "settingsLanguageNote" | "settingsLanguageAuto" | "settingsLanguageZh" | "settingsLanguageEn" | "settingsPanelName" | "settingsPanelNote" | "settingsUnavailable" | "settingsSaveFailed", string>;
|
|
132
|
+
'en-US': Record<"navTitle" | "progressTitle" | "progressGuideNote" | "markdownCopy" | "markdownCopied" | "markdownFootnotes" | "progressLatest" | "progressCount" | "progressExpand" | "progressCollapse" | "progressEmptyTitle" | "progressEmptyHint" | "rowPending" | "rowRunning" | "rowDone" | "rowError" | "rowExpand" | "rowCollapse" | "settingsHint" | "settingsOpen" | "settingsEnabledName" | "settingsEnabledNote" | "settingsThresholdName" | "settingsThresholdNote" | "settingsLanguageName" | "settingsLanguageNote" | "settingsLanguageAuto" | "settingsLanguageZh" | "settingsLanguageEn" | "settingsPanelName" | "settingsPanelNote" | "settingsUnavailable" | "settingsSaveFailed", string>;
|
|
118
133
|
};
|
|
119
134
|
/** 本命名空间的字典键联合,供类型化 `t` 座位使用。 */
|
|
120
135
|
export type ProgressUpdatesLocaleKey = keyof typeof zh;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../src/client/progress-updates/locales.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,EAAG,sBAA+B,CAAA;AAElE;;;;;;GAMG;AACH,eAAO,MAAM,EAAE;IACb,4BAA4B;;;IAG5B,4BAA4B
|
|
1
|
+
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../src/client/progress-updates/locales.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,EAAG,sBAA+B,CAAA;AAElE;;;;;;GAMG;AACH,eAAO,MAAM,EAAE;IACb,4BAA4B;;;IAG5B,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCpB,CAAA;AAEV,wBAAwB;AACxB,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,wBAAwB,EAAE,MAAM,CAkCvD,CAAA;AAED,qCAAqC;AACrC,eAAO,MAAM,YAAY;;QA3EvB,4BAA4B;;;QAG5B,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAH5B,4BAA4B;;;QAG5B,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6E7B,CAAA;AAED,iCAAiC;AACjC,MAAM,MAAM,wBAAwB,GAAG,MAAM,OAAO,EAAE,CAAA;AAEtD,OAAO,QAAQ,kCAAkC,CAAC;IAChD,UAAU,kBAAkB;QAC1B,mBAAmB;QACnB,sBAAsB,EAAE,wBAAwB,CAAA;KACjD;CACF"}
|
|
@@ -35,9 +35,19 @@ export interface ProgressUpdatesSettingsValues {
|
|
|
35
35
|
progressUpdates?: boolean;
|
|
36
36
|
/** 催促阈值:连续多少轮无进展就提醒一次。 */
|
|
37
37
|
progressUpdatesNudgeThreshold?: number;
|
|
38
|
+
/**
|
|
39
|
+
* 输出语言:auto 跟随对话、zh 中文、en 英文。
|
|
40
|
+
*
|
|
41
|
+
* 这里手写这三个字面量而不是从宿主侧 import 类型:浏览器半边是另一个运行时
|
|
42
|
+
* 的独立 bundle,把宿主模块拉进来只为拿一个联合类型不值得。两边的取值必须
|
|
43
|
+
* 逐字一致(宿主 Config schema 里的枚举就是这三个)。
|
|
44
|
+
*/
|
|
45
|
+
progressUpdatesLanguage?: 'auto' | 'zh' | 'en';
|
|
38
46
|
}
|
|
39
|
-
/**
|
|
40
|
-
export type
|
|
47
|
+
/** 输出语言的三种取值,供界面侧声明变量类型。 */
|
|
48
|
+
export type ProgressUpdatesLanguage = NonNullable<ProgressUpdatesSettingsValues['progressUpdatesLanguage']>;
|
|
49
|
+
/** 表单可写的那三个字段名(联合类型,写错名字编译期就报)。 */
|
|
50
|
+
export type ProgressUpdatesField = 'progressUpdates' | 'progressUpdatesNudgeThreshold' | 'progressUpdatesLanguage';
|
|
41
51
|
/**
|
|
42
52
|
* 候选条目 id,按可能性从高到低。
|
|
43
53
|
*
|
|
@@ -53,7 +63,7 @@ export interface ProgressSettingsForm {
|
|
|
53
63
|
/** 订阅快照变化。 */
|
|
54
64
|
subscribe(listener: () => void): () => void;
|
|
55
65
|
/** 写一个根字段;返回宿主是否接受。 */
|
|
56
|
-
set(field: ProgressUpdatesField, value: boolean | number): Promise<boolean>;
|
|
66
|
+
set(field: ProgressUpdatesField, value: boolean | number | string): Promise<boolean>;
|
|
57
67
|
/** 释放镜像订阅与内部表单订阅(插件卸载时调用)。 */
|
|
58
68
|
dispose(): void;
|
|
59
69
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-binding.d.ts","sourceRoot":"","sources":["../../../../src/client/progress-updates/settings-binding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAc,kBAAkB,EAAE,MAAM,4CAA4C,CAAA;AAEhG;;;;;GAKG;AACH,MAAM,WAAW,6BAA6B;IAC5C,WAAW;IACX,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,0BAA0B;IAC1B,6BAA6B,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"settings-binding.d.ts","sourceRoot":"","sources":["../../../../src/client/progress-updates/settings-binding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAc,kBAAkB,EAAE,MAAM,4CAA4C,CAAA;AAEhG;;;;;GAKG;AACH,MAAM,WAAW,6BAA6B;IAC5C,WAAW;IACX,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,0BAA0B;IAC1B,6BAA6B,CAAC,EAAE,MAAM,CAAA;IACtC;;;;;;OAMG;IACH,uBAAuB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;CAC/C;AAED,4BAA4B;AAC5B,MAAM,MAAM,uBAAuB,GAAG,WAAW,CAAC,6BAA6B,CAAC,yBAAyB,CAAC,CAAC,CAAA;AAE3G,mCAAmC;AACnC,MAAM,MAAM,oBAAoB,GAC5B,iBAAiB,GACjB,+BAA+B,GAC/B,yBAAyB,CAAA;AAE7B;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,EAAE,SAAS,MAAM,EAIxD,CAAA;AAED,6BAA6B;AAC7B,MAAM,WAAW,oBAAoB;IACnC,8CAA8C;IAC9C,WAAW,IAAI,kBAAkB,CAAC,6BAA6B,CAAC,CAAA;IAChE,cAAc;IACd,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAA;IAC3C,uBAAuB;IACvB,GAAG,CAAC,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IACpF,8BAA8B;IAC9B,OAAO,IAAI,IAAI,CAAA;CAChB;AAgED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,GAAG,EAAE;IAAE,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,GAAG,oBAAoB,GAAG,SAAS,CA4FhH"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 设置页里的「进展更新」分区:一句说明 +
|
|
2
|
+
* 设置页里的「进展更新」分区:一句说明 + 四行卡片(开关 / 催促阈值 / 输出语言 / 进展面板)。
|
|
3
3
|
*
|
|
4
4
|
* ## 视觉来源
|
|
5
5
|
*
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
*
|
|
10
10
|
* ## 单级,没有二级页面
|
|
11
11
|
*
|
|
12
|
-
*
|
|
12
|
+
* 四行都停在当前页:开关、数字输入和语言下拉直接写设置,最后一行是「打开」按钮 + chevron,
|
|
13
13
|
* 点它按 kind 打开右侧栏的进展面板,然后把设置弹层收起来——面板在设置弹层底下,
|
|
14
14
|
* 不关掉的话用户还是看不见它。
|
|
15
15
|
*
|
|
16
16
|
* ## 数据
|
|
17
17
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
18
|
+
* 开关、阈值与输出语言经 {@link ProgressSettingsForm} 读写(见 `./settings-binding.ts`):写入
|
|
19
|
+
* 走宿主共享设置表单,三条字段在宿主 `Config` schema 里都是 `volatile()`,保存即
|
|
20
20
|
* 生效,不需要重启插件行。表单通道缺席(没有设置服务的部署)时控件渲染成禁用态,
|
|
21
21
|
* 并在说明行写明原因——宁可不给点,也不做一个存不住的假开关。
|
|
22
22
|
*
|
|
@@ -49,7 +49,7 @@ export declare const NUDGE_THRESHOLD_MAX = 50;
|
|
|
49
49
|
/** 宿主 schema 里的默认阈值(`NUDGE_THRESHOLD`,两处同一个数)。 */
|
|
50
50
|
export declare const NUDGE_THRESHOLD_DEFAULT = 8;
|
|
51
51
|
/**
|
|
52
|
-
*
|
|
52
|
+
* 进展更新的设置分区:四行卡片。
|
|
53
53
|
* @param props - 壳的关闭回调、注入的打开动作与表单、文案座位。
|
|
54
54
|
* @returns 设置页里的这一页。
|
|
55
55
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-section.d.ts","sourceRoot":"","sources":["../../../../src/client/progress-updates/settings-section.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAA6C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjF,OAAO,EAAqB,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AACtE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"settings-section.d.ts","sourceRoot":"","sources":["../../../../src/client/progress-updates/settings-section.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAA6C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjF,OAAO,EAAqB,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AACtE,OAAO,KAAK,EACV,oBAAoB,EAIrB,MAAM,uBAAuB,CAAA;AAE9B,iCAAiC;AACjC,MAAM,WAAW,+BAA+B;IAC9C,iCAAiC;IACjC,SAAS,EAAE,MAAM,IAAI,CAAA;IACrB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,oBAAoB,CAAA;CAChC;AAED,6BAA6B;AAC7B,MAAM,WAAW,kBAAkB;IACjC,wBAAwB;IACxB,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB;AAED,6CAA6C;AAC7C,MAAM,MAAM,4BAA4B,GAAG,+BAA+B,GAAG,kBAAkB,GAAG,QAAQ,CAAA;AAE1G,8CAA8C;AAC9C,eAAO,MAAM,mBAAmB,IAAI,CAAA;AACpC,YAAY;AACZ,eAAO,MAAM,mBAAmB,KAAK,CAAA;AACrC,kDAAkD;AAClD,eAAO,MAAM,uBAAuB,IAAI,CAAA;AAyHxC;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,4BAA4B,GAAG,SAAS,CA0L7F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/client/progress-updates/styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAIH,iCAAiC;AACjC,eAAO,MAAM,UAAU,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/client/progress-updates/styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAIH,iCAAiC;AACjC,eAAO,MAAM,UAAU,qBAAqB,CAAA;AAkC5C;;;GAGG;AACH,wBAAgB,4BAA4B,IAAI,MAAM,IAAI,CAEzD"}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* @module dsh-chatgpt-subscription/opendesign-client
|
|
14
14
|
*/
|
|
15
15
|
import { type OpenDesignDiscoveredModel } from './types.ts';
|
|
16
|
+
import type { OpenDesignCodingPlanDto } from '../../shared/opendesign-contracts.ts';
|
|
16
17
|
export interface OpenDesignHttpResult {
|
|
17
18
|
status: number;
|
|
18
19
|
ok: boolean;
|
|
@@ -198,4 +199,106 @@ export declare function fetchBillingSummary({ fetchFn, controlKey, apiBase, sign
|
|
|
198
199
|
signal?: AbortSignal;
|
|
199
200
|
timeoutMs?: number;
|
|
200
201
|
}): Promise<OpenDesignBillingRead>;
|
|
202
|
+
/**
|
|
203
|
+
* The Design Plan's two DTOs are DEFINED beside this line's other wire contracts
|
|
204
|
+
* (src/shared/opendesign-contracts.ts) and re-exported here.
|
|
205
|
+
*
|
|
206
|
+
* The card in the browser reads the same objects, so the declaration has to live
|
|
207
|
+
* where both halves of the plugin can reach it. A `import type` from the shared
|
|
208
|
+
* file back into the host would point the client's type-check program at host
|
|
209
|
+
* sources; re-exporting the other way round keeps the direction of every existing
|
|
210
|
+
* import (host → shared) intact and still lets a host-side caller import the DTO
|
|
211
|
+
* from the module that produced it.
|
|
212
|
+
*/
|
|
213
|
+
export type { OpenDesignCodingPlanDto, OpenDesignCodingPlanWindowDto } from '../../shared/opendesign-contracts.ts';
|
|
214
|
+
/** One workspace lookup: the id a coding-plan read is addressed by, or why not. */
|
|
215
|
+
export interface OpenDesignWorkspaceIdRead {
|
|
216
|
+
ok: boolean;
|
|
217
|
+
/** The workspace id to address; null whenever the lookup did not land on one. */
|
|
218
|
+
id: string | null;
|
|
219
|
+
/** Why no id was read; the empty string on success. */
|
|
220
|
+
error: string;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Read the workspace id the coding-plan endpoint is addressed by.
|
|
224
|
+
*
|
|
225
|
+
* TWO READS, in this order, because the console itself does not use one:
|
|
226
|
+
*
|
|
227
|
+
* 1. `GET {amr}/workspaces/current` — the workspace this account is on right now,
|
|
228
|
+
* the object the console's own switcher starts from. The id is read from
|
|
229
|
+
* `activeWorkspaceId`, then `workspaceId`, then `id`, then the same keys under
|
|
230
|
+
* a nested `workspace`, then the same order again under a `data` wrapper.
|
|
231
|
+
* 2. Only when that states NO id, `GET {amr}/workspaces` — the listing, which
|
|
232
|
+
* answers what the account could switch to rather than where it is. Its
|
|
233
|
+
* first entry with an id wins, and every wrapper shape it has been seen in is
|
|
234
|
+
* accepted (bare array, `{ workspaces }`, `{ items }`, `{ data }`,
|
|
235
|
+
* `{ data: { items | workspaces } }`).
|
|
236
|
+
*
|
|
237
|
+
* The listing used to be the ONLY read here, and on a live account it answered
|
|
238
|
+
* 200 with a body whose entries carried no id: the lookup must therefore say
|
|
239
|
+
* WHICH endpoint failed and what it looked like, or the next attempt is blind.
|
|
240
|
+
* A failure reports the endpoint, its HTTP status (or the transport error) and a
|
|
241
|
+
* keys-only shape summary; no value and no id ever appears in it.
|
|
242
|
+
*
|
|
243
|
+
* Pure data in, data out: a refusal, a timeout or a malformed body is returned as
|
|
244
|
+
* `error`, never thrown, and a transport failure on the first read does not stop
|
|
245
|
+
* the second from answering. The caller composes the result into the account
|
|
246
|
+
* reading, so one unreadable surface cannot take the whole quota read down.
|
|
247
|
+
*
|
|
248
|
+
* @param options.fetchFn - Injected fetch (tests never reach the network).
|
|
249
|
+
* @param options.controlKey - The OAuth account's `vela_ctrl_…` key.
|
|
250
|
+
* @param options.apiBase - Control-plane base; overridable for a deployment.
|
|
251
|
+
* @param options.signal - Caller cancellation.
|
|
252
|
+
* @param options.timeoutMs - Per-request budget.
|
|
253
|
+
* @returns The id, or the reason neither endpoint stated one.
|
|
254
|
+
*/
|
|
255
|
+
export declare function fetchWorkspaceId({ fetchFn, controlKey, apiBase, signal, timeoutMs, }: {
|
|
256
|
+
fetchFn: typeof fetch;
|
|
257
|
+
controlKey: string;
|
|
258
|
+
apiBase?: string;
|
|
259
|
+
signal?: AbortSignal;
|
|
260
|
+
timeoutMs?: number;
|
|
261
|
+
}): Promise<OpenDesignWorkspaceIdRead>;
|
|
262
|
+
/**
|
|
263
|
+
* Read one account's Design Plan allowance.
|
|
264
|
+
*
|
|
265
|
+
* This is the line's REAL quota surface — the 5-hour and 7-day windows the
|
|
266
|
+
* console draws as "剩余 90% / 81%" — and it is the only endpoint that states a
|
|
267
|
+
* bounded window at all: `/billing/summary` states credits and a tier, never a
|
|
268
|
+
* rolling allowance.
|
|
269
|
+
*
|
|
270
|
+
* `GET {amr}/workspaces/{id}/billing/coding-plan-usage`, always the same URL with
|
|
271
|
+
* the same `x-vela-workspace-id`, tried once per credential SHAPE (see
|
|
272
|
+
* {@link codingPlanAttempts}). The retry rule is the important half: only
|
|
273
|
+
* `401` / `403` — "these credentials are not accepted" — moves on to the next
|
|
274
|
+
* shape, because that is the only verdict a different key could change. A `404` or
|
|
275
|
+
* a `500`, and in particular `coding_plan_configuration_unavailable`, is the
|
|
276
|
+
* endpoint's own verdict about the WORKSPACE, so it stops the search and travels
|
|
277
|
+
* out verbatim.
|
|
278
|
+
*
|
|
279
|
+
* Exhausting every shape yields one sentence a user can act on: the last refusal
|
|
280
|
+
* plus the shapes that were tried. A success carries NO trace of which credential
|
|
281
|
+
* worked — the shape of a credential is not the card's business.
|
|
282
|
+
*
|
|
283
|
+
* It never throws and never fills a window nobody measured.
|
|
284
|
+
*
|
|
285
|
+
* @param options.fetchFn - Injected fetch.
|
|
286
|
+
* @param options.controlKey - The account's `vela_ctrl_…` key.
|
|
287
|
+
* @param options.runtimeKey - The account's `sk-amr-…` key; `''` skips the two
|
|
288
|
+
* shapes that need one.
|
|
289
|
+
* @param options.workspaceId - From {@link fetchWorkspaceId}.
|
|
290
|
+
* @param options.apiBase - Control-plane base.
|
|
291
|
+
* @param options.signal - Caller cancellation.
|
|
292
|
+
* @param options.timeoutMs - Per-request budget.
|
|
293
|
+
* @returns The plan, or the reason every shape it knew failed.
|
|
294
|
+
*/
|
|
295
|
+
export declare function fetchCodingPlanUsage({ fetchFn, controlKey, runtimeKey, workspaceId, apiBase, signal, timeoutMs, }: {
|
|
296
|
+
fetchFn: typeof fetch;
|
|
297
|
+
controlKey: string;
|
|
298
|
+
runtimeKey: string;
|
|
299
|
+
workspaceId: string;
|
|
300
|
+
apiBase?: string;
|
|
301
|
+
signal?: AbortSignal;
|
|
302
|
+
timeoutMs?: number;
|
|
303
|
+
}): Promise<OpenDesignCodingPlanDto>;
|
|
201
304
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/host/opendesign/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src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","sourceRoot":"","sources":["../../../../src/host/opendesign/routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../src/host/opendesign/routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAclD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AAC9D,OAAO,EAKL,KAAK,4BAA4B,EAClC,MAAM,kBAAkB,CAAA;AAEzB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AAC5D,OAAO,EAQL,KAAK,yBAAyB,EAE9B,KAAK,mBAAmB,EACzB,MAAM,sCAAsC,CAAA;AAsG7C,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,4BAA4B,CAAA;IACtC,WAAW,EAAE,qBAAqB,CAAA;IAClC,iFAAiF;IACjF,OAAO,EAAE,OAAO,KAAK,CAAA;IACrB,8EAA8E;IAC9E,KAAK,CAAC,EAAE,sBAAsB,CAAA;IAC9B;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,OAAO,IAAI,OAAO,CAAA;IAClB,QAAQ,IAAI,MAAM,GAAG,IAAI,CAAA;CAC1B;AAED,4FAA4F;AAC5F,eAAO,MAAM,qBAAqB,4BAAsB,CAAA;AAExD;;;;;;GAMG;AACH,UAAU,UAAU;IAClB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAA;IAChD,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,oEAAoE;AACpE,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,sBAAsB,EAC/B,UAAU,CAAC,EAAE,UAAU,GACtB,OAAO,CAAC,mBAAmB,CAAC,CAyD9B;AAkBD,+FAA+F;AAC/F,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;CAAS,CAAA;AAEvC;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,sBAAsB,GAAG,MAAM,IAAI,CA0clG"}
|
|
@@ -51,6 +51,37 @@ export declare const WALLET_BALANCE_PATH = "/wallet/balance";
|
|
|
51
51
|
* plan grants, the amounts consumed, and the current billing period.
|
|
52
52
|
*/
|
|
53
53
|
export declare const BILLING_SUMMARY_PATH = "/billing/summary";
|
|
54
|
+
/**
|
|
55
|
+
* The workspace the signed-in account is CURRENTLY on.
|
|
56
|
+
*
|
|
57
|
+
* This is what the console itself reads to pick "the active workspace": its
|
|
58
|
+
* response object carries `activeWorkspaceId` beside `workspaceType` and `role`.
|
|
59
|
+
* It is the first place the coding-plan read looks for an id, because it answers
|
|
60
|
+
* "where is this account right now" rather than "where could it go".
|
|
61
|
+
*/
|
|
62
|
+
export declare const CURRENT_WORKSPACE_PATH = "/workspaces/current";
|
|
63
|
+
/**
|
|
64
|
+
* The workspace list: the FALLBACK source of that id.
|
|
65
|
+
*
|
|
66
|
+
* `GET {amr}/workspaces` with the same control key answers every workspace the
|
|
67
|
+
* account can see. It is only consulted when {@link CURRENT_WORKSPACE_PATH} does
|
|
68
|
+
* not state an id — a listing describes what the account could switch to, while
|
|
69
|
+
* the coding-plan read needs the one workspace it is on. The device flow returns
|
|
70
|
+
* neither, so these two reads are the only way to learn an id at all.
|
|
71
|
+
*/
|
|
72
|
+
export declare const WORKSPACES_PATH = "/workspaces";
|
|
73
|
+
/**
|
|
74
|
+
* The Design Plan's real allowance, per workspace: the 5-hour and 7-day windows
|
|
75
|
+
* the console draws.
|
|
76
|
+
*
|
|
77
|
+
* Appended to `{WORKSPACES_PATH}/{workspaceId}`. It is the only surface of this
|
|
78
|
+
* line that states a bounded window — `/billing/summary` states credits and the
|
|
79
|
+
* tier but never a rolling allowance — and it authenticates with the control key
|
|
80
|
+
* as a Bearer token plus `x-vela-workspace-id`, exactly like the wallet read.
|
|
81
|
+
* The console itself calls it with a browser session, so a control-key Bearer is
|
|
82
|
+
* unverified: a refusal is reported as data, never as a reason to guess.
|
|
83
|
+
*/
|
|
84
|
+
export declare const CODING_PLAN_USAGE_SUFFIX = "/billing/coding-plan-usage";
|
|
54
85
|
/**
|
|
55
86
|
* What the create call says about this client. The service stores host /
|
|
56
87
|
* profile / cliVersion per authorization (its console lists devices by them);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/host/opendesign/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,eAAO,MAAM,WAAW,eAAe,CAAA;AACvC,eAAO,MAAM,aAAa,eAAe,CAAA;AAEzC;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,uCAAuC,CAAA;AAEpE,sEAAsE;AACtE,eAAO,MAAM,gBAAgB,8DAA8D,CAAA;AAE3F;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,0CAA0C,CAAA;AAEnE,iEAAiE;AACjE,eAAO,MAAM,0BAA0B,+BAA+B,CAAA;AACtE,eAAO,MAAM,mBAAmB,oBAAoB,CAAA;AACpD;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,qBAAqB,CAAA;AAEtD;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,SAAS,CAAA;AAC3C,eAAO,MAAM,kBAAkB,6BAA6B,CAAA;AAE5D,sEAAsE;AACtE,eAAO,MAAM,sBAAsB,SAAU,CAAA;AAE7C;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,QAAS,CAAA;AAExC;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B,KAAK,CAAA;AAEjD,6CAA6C;AAC7C,eAAO,MAAM,8BAA8B,SAAU,CA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nE,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;IAC1B,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;IACxB,OAAO,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;CAC5C;AAED,qEAAqE;AACrE,MAAM,WAAW,yBAAyB;IACxC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CACnB"}
|
|
@@ -26,12 +26,15 @@
|
|
|
26
26
|
*
|
|
27
27
|
* @module dsh-chatgpt-subscription/host/progress-updates
|
|
28
28
|
*/
|
|
29
|
+
import { type ProgressUpdateLanguage } from './prompt.ts';
|
|
29
30
|
/** 一次挂载读到的有效设置(由主入口每次重新解析活引用后交进来)。 */
|
|
30
31
|
export interface ProgressUpdatesSettings {
|
|
31
32
|
/** 总开关。 */
|
|
32
33
|
enabled: boolean;
|
|
33
34
|
/** 催促阈值:连续多少轮带工具调用却没有进展更新就提醒一次。 */
|
|
34
35
|
nudgeThreshold: number;
|
|
36
|
+
/** 进展更新的输出语言(只管标题与正文,不影响提示词本身的语言)。 */
|
|
37
|
+
language: ProgressUpdateLanguage;
|
|
35
38
|
}
|
|
36
39
|
/**
|
|
37
40
|
* 设置字段在运行时可能是活引用(volatile)或普通值(手工构造的上下文、测试)。
|
|
@@ -52,6 +55,8 @@ export interface ProgressUpdatesConfigFields {
|
|
|
52
55
|
progressUpdates?: ProgressUpdatesConfigField<boolean>;
|
|
53
56
|
/** 催促阈值得字段。 */
|
|
54
57
|
progressUpdatesNudgeThreshold?: ProgressUpdatesConfigField<number>;
|
|
58
|
+
/** 输出语言字段。 */
|
|
59
|
+
progressUpdatesLanguage?: ProgressUpdatesConfigField<ProgressUpdateLanguage>;
|
|
55
60
|
}
|
|
56
61
|
/**
|
|
57
62
|
* 读取一个配置字段,沿着 volatile 活引用取当前值。
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/host/progress-updates/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/host/progress-updates/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAaH,OAAO,EAKL,KAAK,sBAAsB,EAC5B,MAAM,aAAa,CAAA;AAiBpB,sCAAsC;AACtC,MAAM,WAAW,uBAAuB;IACtC,WAAW;IACX,OAAO,EAAE,OAAO,CAAA;IAChB,mCAAmC;IACnC,cAAc,EAAE,MAAM,CAAA;IACtB,sCAAsC;IACtC,QAAQ,EAAE,sBAAsB,CAAA;CACjC;AAED;;;;;;GAMG;AACH,UAAU,SAAS,CAAC,CAAC;IACnB,iBAAiB;IACjB,GAAG,IAAI,CAAC,GAAG,SAAS,CAAA;CACrB;AAED,sBAAsB;AACtB,MAAM,MAAM,0BAA0B,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,SAAS,CAAA;AAExE,mCAAmC;AACnC,MAAM,WAAW,2BAA2B;IAC1C,aAAa;IACb,eAAe,CAAC,EAAE,0BAA0B,CAAC,OAAO,CAAC,CAAA;IACrD,eAAe;IACf,6BAA6B,CAAC,EAAE,0BAA0B,CAAC,MAAM,CAAC,CAAA;IAClE,cAAc;IACd,uBAAuB,CAAC,EAAE,0BAA0B,CAAC,sBAAsB,CAAC,CAAA;CAC7E;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,KAAK,EAAE,0BAA0B,CAAC,CAAC,CAAC,GAAG,C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