@eddyskywalker/dsh-chatgpt-subscription 0.4.0 → 0.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.
Files changed (109) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/README.md +67 -1
  3. package/lib/client.js +2255 -742
  4. package/lib/client.js.map +1 -1
  5. package/lib/index.js +17139 -12058
  6. package/lib/types/client/CodexSubscriptionSection.d.ts +1 -1
  7. package/lib/types/client/CodexSubscriptionSection.d.ts.map +1 -1
  8. package/lib/types/client/ProviderHubSection.d.ts.map +1 -1
  9. package/lib/types/client/antigravity/AntigravitySection.d.ts.map +1 -1
  10. package/lib/types/client/antigravity/locales.d.ts +24 -192
  11. package/lib/types/client/antigravity/locales.d.ts.map +1 -1
  12. package/lib/types/client/api.d.ts +13 -1
  13. package/lib/types/client/api.d.ts.map +1 -1
  14. package/lib/types/client/command-code/CommandCodeSection.d.ts.map +1 -1
  15. package/lib/types/client/command-code/locales.d.ts +66 -201
  16. package/lib/types/client/command-code/locales.d.ts.map +1 -1
  17. package/lib/types/client/common/AccountPoolSection.d.ts +55 -0
  18. package/lib/types/client/common/AccountPoolSection.d.ts.map +1 -0
  19. package/lib/types/client/common/account-pool-labels.d.ts +43 -0
  20. package/lib/types/client/common/account-pool-labels.d.ts.map +1 -0
  21. package/lib/types/client/common/styles.d.ts +11 -0
  22. package/lib/types/client/common/styles.d.ts.map +1 -0
  23. package/lib/types/client/index.d.ts +1 -0
  24. package/lib/types/client/index.d.ts.map +1 -1
  25. package/lib/types/client/kimi-code/KimiCodeSection.d.ts.map +1 -1
  26. package/lib/types/client/kimi-code/locales.d.ts +63 -336
  27. package/lib/types/client/kimi-code/locales.d.ts.map +1 -1
  28. package/lib/types/client/locales.d.ts +41 -1
  29. package/lib/types/client/locales.d.ts.map +1 -1
  30. package/lib/types/client/workbuddy/WorkBuddyComposerQuota.d.ts +26 -0
  31. package/lib/types/client/workbuddy/WorkBuddyComposerQuota.d.ts.map +1 -0
  32. package/lib/types/client/workbuddy/WorkBuddySection.d.ts +41 -0
  33. package/lib/types/client/workbuddy/WorkBuddySection.d.ts.map +1 -0
  34. package/lib/types/client/workbuddy/locales.d.ts +563 -0
  35. package/lib/types/client/workbuddy/locales.d.ts.map +1 -0
  36. package/lib/types/client/workbuddy/styles.d.ts +11 -0
  37. package/lib/types/client/workbuddy/styles.d.ts.map +1 -0
  38. package/lib/types/host/antigravity/account-pool.d.ts +15 -5
  39. package/lib/types/host/antigravity/account-pool.d.ts.map +1 -1
  40. package/lib/types/host/antigravity/routes.d.ts.map +1 -1
  41. package/lib/types/host/codex-account-pool.d.ts +64 -0
  42. package/lib/types/host/codex-account-pool.d.ts.map +1 -0
  43. package/lib/types/host/command-code/account-pool.d.ts +60 -0
  44. package/lib/types/host/command-code/account-pool.d.ts.map +1 -0
  45. package/lib/types/host/command-code/adapter.d.ts +11 -1
  46. package/lib/types/host/command-code/adapter.d.ts.map +1 -1
  47. package/lib/types/host/command-code/client.d.ts +17 -1
  48. package/lib/types/host/command-code/client.d.ts.map +1 -1
  49. package/lib/types/host/command-code/oauth.d.ts +4 -1
  50. package/lib/types/host/command-code/oauth.d.ts.map +1 -1
  51. package/lib/types/host/command-code/routes.d.ts +11 -2
  52. package/lib/types/host/command-code/routes.d.ts.map +1 -1
  53. package/lib/types/host/common/account-pool.d.ts +197 -0
  54. package/lib/types/host/common/account-pool.d.ts.map +1 -0
  55. package/lib/types/host/common/home.d.ts +8 -0
  56. package/lib/types/host/common/home.d.ts.map +1 -0
  57. package/lib/types/host/kimi-code/account-pool.d.ts +48 -0
  58. package/lib/types/host/kimi-code/account-pool.d.ts.map +1 -0
  59. package/lib/types/host/kimi-code/adapter.d.ts +10 -1
  60. package/lib/types/host/kimi-code/adapter.d.ts.map +1 -1
  61. package/lib/types/host/kimi-code/client.d.ts +16 -0
  62. package/lib/types/host/kimi-code/client.d.ts.map +1 -1
  63. package/lib/types/host/kimi-code/oauth.d.ts +2 -0
  64. package/lib/types/host/kimi-code/oauth.d.ts.map +1 -1
  65. package/lib/types/host/kimi-code/routes.d.ts +10 -2
  66. package/lib/types/host/kimi-code/routes.d.ts.map +1 -1
  67. package/lib/types/host/oauth-service.d.ts +41 -2
  68. package/lib/types/host/oauth-service.d.ts.map +1 -1
  69. package/lib/types/host/preset-sync.d.ts +7 -1
  70. package/lib/types/host/preset-sync.d.ts.map +1 -1
  71. package/lib/types/host/responses-client.d.ts +15 -0
  72. package/lib/types/host/responses-client.d.ts.map +1 -1
  73. package/lib/types/host/routes.d.ts +2 -1
  74. package/lib/types/host/routes.d.ts.map +1 -1
  75. package/lib/types/host/usage-service.d.ts +15 -0
  76. package/lib/types/host/usage-service.d.ts.map +1 -1
  77. package/lib/types/host/workbuddy/account-pool.d.ts +106 -0
  78. package/lib/types/host/workbuddy/account-pool.d.ts.map +1 -0
  79. package/lib/types/host/workbuddy/adapter.d.ts +97 -0
  80. package/lib/types/host/workbuddy/adapter.d.ts.map +1 -0
  81. package/lib/types/host/workbuddy/client.d.ts +90 -0
  82. package/lib/types/host/workbuddy/client.d.ts.map +1 -0
  83. package/lib/types/host/workbuddy/mapper.d.ts +114 -0
  84. package/lib/types/host/workbuddy/mapper.d.ts.map +1 -0
  85. package/lib/types/host/workbuddy/model-catalog.d.ts +108 -0
  86. package/lib/types/host/workbuddy/model-catalog.d.ts.map +1 -0
  87. package/lib/types/host/workbuddy/oauth.d.ts +38 -0
  88. package/lib/types/host/workbuddy/oauth.d.ts.map +1 -0
  89. package/lib/types/host/workbuddy/routes.d.ts +33 -0
  90. package/lib/types/host/workbuddy/routes.d.ts.map +1 -0
  91. package/lib/types/host/workbuddy/token-store.d.ts +216 -0
  92. package/lib/types/host/workbuddy/token-store.d.ts.map +1 -0
  93. package/lib/types/host/workbuddy/types.d.ts +127 -0
  94. package/lib/types/host/workbuddy/types.d.ts.map +1 -0
  95. package/lib/types/index.d.ts +10 -0
  96. package/lib/types/index.d.ts.map +1 -1
  97. package/lib/types/shared/account-pool-contracts.d.ts +55 -0
  98. package/lib/types/shared/account-pool-contracts.d.ts.map +1 -0
  99. package/lib/types/shared/antigravity-contracts.d.ts +4 -10
  100. package/lib/types/shared/antigravity-contracts.d.ts.map +1 -1
  101. package/lib/types/shared/command-code-contracts.d.ts +14 -0
  102. package/lib/types/shared/command-code-contracts.d.ts.map +1 -1
  103. package/lib/types/shared/contracts.d.ts +6 -0
  104. package/lib/types/shared/contracts.d.ts.map +1 -1
  105. package/lib/types/shared/kimi-code-contracts.d.ts +14 -0
  106. package/lib/types/shared/kimi-code-contracts.d.ts.map +1 -1
  107. package/lib/types/shared/workbuddy-contracts.d.ts +204 -0
  108. package/lib/types/shared/workbuddy-contracts.d.ts.map +1 -0
  109. package/package.json +1 -1
@@ -0,0 +1,563 @@
1
+ export declare const NS_WORKBUDDY = "dsh-workbuddy";
2
+ export declare const zh: {
3
+ readonly title: "WorkBuddy";
4
+ readonly pageDesc: "复用本机 CodeBuddy 桌面端登录态,管理 WorkBuddy(CodeBuddy 订阅)模型、上下文窗口与额度。";
5
+ readonly account: "账号";
6
+ readonly noAccounts: "暂无账号,点击「添加国区账号 / 添加国际区账号」完成浏览器授权,或登录 CodeBuddy 桌面端后重新扫描。";
7
+ readonly signedIn: "已找到凭据";
8
+ readonly signedOut: "未找到凭据";
9
+ readonly nickname: "昵称";
10
+ readonly uid: "账号 ID";
11
+ readonly uin: "UIN";
12
+ readonly region: "区域";
13
+ readonly regionCn: "国区";
14
+ readonly regionIntl: "国际区";
15
+ readonly accountType: "账号类型";
16
+ readonly backend: "后端地址";
17
+ readonly domain: "认证域名";
18
+ readonly tokenExpires: "登录态有效期";
19
+ readonly tokenExpired: "已过期";
20
+ readonly sourceFile: "凭据文件";
21
+ readonly authDirectory: "凭据目录";
22
+ readonly storage: "凭据存储";
23
+ readonly storageNotice: "桌面端账号仍读取 CodeBuddy 自己的凭据文件,插件不会删除这些文件;通过这里添加的账号保存在系统加密存储中(Windows DPAPI / macOS Keychain / Linux Secret Service),token 不进入浏览器。";
24
+ readonly notFoundTitle: "未找到 WorkBuddy 账号";
25
+ readonly notFoundHint: "可安装并登录 CodeBuddy 后重新扫描,也可以直接点击下方「添加国区账号」或「添加国际区账号」完成浏览器授权。";
26
+ readonly routeUnreachable: "无法读取 WorkBuddy 设置路由";
27
+ readonly routeUnreachableHint: "浏览器里加载的插件版本可能比 Host 进程里运行的新(客户端资源是现读磁盘的,Host 只在启动时加载)。请重启 DSH,让两端来自同一份构建。";
28
+ readonly rescan: "重新扫描";
29
+ readonly rescanning: "扫描中...";
30
+ readonly accounts: "本机凭据";
31
+ readonly accountsHint: "按账号地区分组。插件添加的账号可删除;CodeBuddy 桌面账号只能从本插件隐藏,绝不删除桌面端原凭据。点击账号会切换模型目录、额度和后续对话。";
32
+ readonly useAccount: "使用此账号";
33
+ readonly selectedAccount: "当前账号";
34
+ readonly addCnAccount: "添加国区账号";
35
+ readonly addIntlAccount: "添加国际区账号";
36
+ readonly authorizing: "授权中…";
37
+ readonly loginWaiting: "请在新打开的浏览器页面完成登录与授权。";
38
+ readonly loginFailed: "账号授权失败";
39
+ readonly pluginAccount: "插件账号";
40
+ readonly desktopAccount: "桌面账号";
41
+ readonly encryptedStorage: "系统加密存储";
42
+ readonly hiddenAccount: "已隐藏";
43
+ readonly hideAccount: "从插件隐藏";
44
+ readonly restoreAccount: "恢复显示";
45
+ readonly deleteAccount: "删除账号";
46
+ readonly deleteConfirm: "确定删除这个插件托管的账号吗?加密存储中的登录凭据会被移除。";
47
+ readonly connection: "连接";
48
+ readonly provider: "Provider";
49
+ readonly providerValue: "WorkBuddy Subscription · workbuddy-subscription";
50
+ readonly connectionState: "连接状态";
51
+ readonly connected: "已连接";
52
+ readonly untested: "未测试";
53
+ readonly testConnection: "测试连接";
54
+ readonly testingConnection: "测试中...";
55
+ readonly latency: "延迟";
56
+ readonly routeOwned: "模型路由由本插件提供";
57
+ readonly routeConflict: "模型路由已被其他 Provider 占用:{detail}。请在 DSH 设置中移除重复的 Provider 配置后重试。";
58
+ readonly modelsSection: "模型";
59
+ readonly enableProvider: "启用此供应商";
60
+ readonly modelsHint: "勾选后模型才会出现在对话页的模型选择列表中;未勾选或关闭上方开关可在列表中隐藏该供应商。目录与上下文窗口来自订阅网关的模型目录,并按账号所在区域过滤——跨区调用会被上游拒绝。";
61
+ readonly refreshCatalog: "刷新模型目录";
62
+ readonly refreshingCatalog: "刷新中...";
63
+ readonly selectAll: "全选";
64
+ readonly unselectAll: "全不选";
65
+ readonly imageSupport: "图片";
66
+ readonly textOnly: "纯文本";
67
+ readonly regionBadge: "区域";
68
+ readonly unavailableHere: "当前区域不可用";
69
+ readonly enhanced: "增强功能";
70
+ readonly defaultReasoningEffort: "默认思考深度";
71
+ readonly defaultReasoningEffortHint: "控制支持推理的模型在未单独指定时的思考强度。";
72
+ readonly defaultEffortAuto: "使用模型默认值";
73
+ readonly effortUnsupported: "当前模型不支持";
74
+ readonly noReasoningModels: "当前账号的模型都没有声明可用的思考档位,因此没有可选的默认档位。";
75
+ readonly defaultEffortKept: "已保存的档位不被当前任何模型支持,已保留但不会生效。";
76
+ readonly contextWindowSection: "模型上下文窗口";
77
+ readonly contextWindowHint: "默认值来自订阅网关的模型目录(每个模型的真实上下文上限);可覆盖为自定义容量,该值用于 DSH 的压缩与溢出判断,可输入 1M、512K、200K 等容量。";
78
+ readonly save: "保存";
79
+ readonly saved: "已保存";
80
+ readonly saving: "保存中...";
81
+ readonly quotaSection: "用量与配额";
82
+ readonly quotaDesc: "数据来自订阅的计费接口,页面可见时最多每 60 秒刷新一次。";
83
+ readonly refreshQuota: "刷新用量";
84
+ readonly refreshingQuota: "刷新中...";
85
+ readonly quotaEmpty: "暂无配额数据,点击「刷新用量」重试。";
86
+ readonly quotaPackage: "套餐";
87
+ readonly quotaRemaining: "剩余额度";
88
+ readonly quotaCycle: "本周期已用";
89
+ readonly quotaReset: "重置时间";
90
+ readonly updatedAt: "更新时间:{time}";
91
+ readonly loading: "加载中...";
92
+ readonly credits: "credits";
93
+ readonly composerLabel: "额度";
94
+ };
95
+ export declare const en: {
96
+ readonly title: "WorkBuddy";
97
+ readonly pageDesc: "Reuse the local CodeBuddy desktop sign-in to manage WorkBuddy (CodeBuddy subscription) models, context windows, and quota.";
98
+ readonly account: "Account";
99
+ readonly noAccounts: "No accounts yet. Add a China or international account, or sign in with the CodeBuddy desktop client and rescan.";
100
+ readonly signedIn: "Credential found";
101
+ readonly signedOut: "No credential found";
102
+ readonly nickname: "Nickname";
103
+ readonly uid: "Account ID";
104
+ readonly uin: "UIN";
105
+ readonly region: "Region";
106
+ readonly regionCn: "China";
107
+ readonly regionIntl: "International";
108
+ readonly accountType: "Account type";
109
+ readonly backend: "Backend";
110
+ readonly domain: "Auth domain";
111
+ readonly tokenExpires: "Sign-in valid until";
112
+ readonly tokenExpired: "Expired";
113
+ readonly sourceFile: "Credential file";
114
+ readonly authDirectory: "Credential directory";
115
+ readonly storage: "Credential storage";
116
+ readonly storageNotice: "Desktop accounts continue to use CodeBuddy’s credential files, which this plugin never deletes. Accounts added here use encrypted OS storage (Windows DPAPI, macOS Keychain, or Linux Secret Service); tokens never enter the browser.";
117
+ readonly notFoundTitle: "No WorkBuddy account found";
118
+ readonly notFoundHint: "Install and sign in to CodeBuddy and rescan, or use “Add China account” / “Add international account” below to authorize in the browser.";
119
+ readonly routeUnreachable: "The WorkBuddy settings route could not be read";
120
+ readonly routeUnreachableHint: "The plugin loaded in the browser may be newer than the one running in the Host: client assets are read from disk on demand, while the Host loads them only at startup. Restart DSH so both halves come from the same build.";
121
+ readonly rescan: "Rescan";
122
+ readonly rescanning: "Scanning...";
123
+ readonly accounts: "Local credentials";
124
+ readonly accountsHint: "Accounts are grouped by region. Plugin-managed accounts can be deleted; CodeBuddy desktop accounts can only be hidden from this plugin and their source files are never deleted. Selecting one switches models, quota, and chats.";
125
+ readonly useAccount: "Use this account";
126
+ readonly selectedAccount: "Selected account";
127
+ readonly addCnAccount: "Add China account";
128
+ readonly addIntlAccount: "Add international account";
129
+ readonly authorizing: "Authorizing…";
130
+ readonly loginWaiting: "Complete sign-in and authorization in the newly opened browser page.";
131
+ readonly loginFailed: "Account authorization failed";
132
+ readonly pluginAccount: "Plugin account";
133
+ readonly desktopAccount: "Desktop account";
134
+ readonly encryptedStorage: "Encrypted OS storage";
135
+ readonly hiddenAccount: "Hidden";
136
+ readonly hideAccount: "Hide from plugin";
137
+ readonly restoreAccount: "Restore";
138
+ readonly deleteAccount: "Delete account";
139
+ readonly deleteConfirm: "Delete this plugin-managed account? Its encrypted credential will be removed.";
140
+ readonly connection: "Connection";
141
+ readonly provider: "Provider";
142
+ readonly providerValue: "WorkBuddy Subscription · workbuddy-subscription";
143
+ readonly connectionState: "Connection state";
144
+ readonly connected: "Connected";
145
+ readonly untested: "Untested";
146
+ readonly testConnection: "Test connection";
147
+ readonly testingConnection: "Testing...";
148
+ readonly latency: "Latency";
149
+ readonly routeOwned: "This plugin serves the model route";
150
+ readonly routeConflict: "Another provider already owns the model route: {detail}. Remove the duplicate provider configuration in DSH settings and reload.";
151
+ readonly modelsSection: "Models";
152
+ readonly enableProvider: "Enable this provider";
153
+ readonly modelsHint: "Checked models appear in the DSH conversation model list. The catalog and its context windows come from the subscription gateway and are filtered by the account’s region — the upstream rejects a model asked of the wrong region.";
154
+ readonly refreshCatalog: "Refresh catalog";
155
+ readonly refreshingCatalog: "Refreshing...";
156
+ readonly selectAll: "Select all";
157
+ readonly unselectAll: "Deselect all";
158
+ readonly imageSupport: "Images";
159
+ readonly textOnly: "Text only";
160
+ readonly regionBadge: "Regions";
161
+ readonly unavailableHere: "Unavailable in this region";
162
+ readonly enhanced: "Enhanced features";
163
+ readonly defaultReasoningEffort: "Default reasoning effort";
164
+ readonly defaultReasoningEffortHint: "Reasoning effort for models that support it when the conversation does not specify one.";
165
+ readonly defaultEffortAuto: "Use the model default";
166
+ readonly effortUnsupported: "unsupported by the current models";
167
+ readonly noReasoningModels: "None of this account’s models declare a reasoning level, so there is no default to choose.";
168
+ readonly defaultEffortKept: "The saved level is not supported by any current model; it is kept but has no effect.";
169
+ readonly contextWindowSection: "Model context window";
170
+ readonly contextWindowHint: "Defaults come from the subscription gateway’s own catalog (each model’s real context cap); override one with the capacity DSH should use for compaction and overflow decisions (e.g., 1M, 512K, 200K).";
171
+ readonly save: "Save";
172
+ readonly saved: "Saved";
173
+ readonly saving: "Saving...";
174
+ readonly quotaSection: "Usage & quota";
175
+ readonly quotaDesc: "Read from the subscription billing endpoint; refreshes at most once every 60 seconds while visible.";
176
+ readonly refreshQuota: "Refresh quota";
177
+ readonly refreshingQuota: "Refreshing...";
178
+ readonly quotaEmpty: "No quota data yet — use “Refresh quota” to retry.";
179
+ readonly quotaPackage: "Package";
180
+ readonly quotaRemaining: "Remaining credits";
181
+ readonly quotaCycle: "Used this cycle";
182
+ readonly quotaReset: "Resets";
183
+ readonly updatedAt: "Updated at: {time}";
184
+ readonly loading: "Loading...";
185
+ readonly credits: "credits";
186
+ readonly composerLabel: "Quota";
187
+ };
188
+ export declare const dictionaries: {
189
+ zh: {
190
+ readonly title: "WorkBuddy";
191
+ readonly pageDesc: "复用本机 CodeBuddy 桌面端登录态,管理 WorkBuddy(CodeBuddy 订阅)模型、上下文窗口与额度。";
192
+ readonly account: "账号";
193
+ readonly noAccounts: "暂无账号,点击「添加国区账号 / 添加国际区账号」完成浏览器授权,或登录 CodeBuddy 桌面端后重新扫描。";
194
+ readonly signedIn: "已找到凭据";
195
+ readonly signedOut: "未找到凭据";
196
+ readonly nickname: "昵称";
197
+ readonly uid: "账号 ID";
198
+ readonly uin: "UIN";
199
+ readonly region: "区域";
200
+ readonly regionCn: "国区";
201
+ readonly regionIntl: "国际区";
202
+ readonly accountType: "账号类型";
203
+ readonly backend: "后端地址";
204
+ readonly domain: "认证域名";
205
+ readonly tokenExpires: "登录态有效期";
206
+ readonly tokenExpired: "已过期";
207
+ readonly sourceFile: "凭据文件";
208
+ readonly authDirectory: "凭据目录";
209
+ readonly storage: "凭据存储";
210
+ readonly storageNotice: "桌面端账号仍读取 CodeBuddy 自己的凭据文件,插件不会删除这些文件;通过这里添加的账号保存在系统加密存储中(Windows DPAPI / macOS Keychain / Linux Secret Service),token 不进入浏览器。";
211
+ readonly notFoundTitle: "未找到 WorkBuddy 账号";
212
+ readonly notFoundHint: "可安装并登录 CodeBuddy 后重新扫描,也可以直接点击下方「添加国区账号」或「添加国际区账号」完成浏览器授权。";
213
+ readonly routeUnreachable: "无法读取 WorkBuddy 设置路由";
214
+ readonly routeUnreachableHint: "浏览器里加载的插件版本可能比 Host 进程里运行的新(客户端资源是现读磁盘的,Host 只在启动时加载)。请重启 DSH,让两端来自同一份构建。";
215
+ readonly rescan: "重新扫描";
216
+ readonly rescanning: "扫描中...";
217
+ readonly accounts: "本机凭据";
218
+ readonly accountsHint: "按账号地区分组。插件添加的账号可删除;CodeBuddy 桌面账号只能从本插件隐藏,绝不删除桌面端原凭据。点击账号会切换模型目录、额度和后续对话。";
219
+ readonly useAccount: "使用此账号";
220
+ readonly selectedAccount: "当前账号";
221
+ readonly addCnAccount: "添加国区账号";
222
+ readonly addIntlAccount: "添加国际区账号";
223
+ readonly authorizing: "授权中…";
224
+ readonly loginWaiting: "请在新打开的浏览器页面完成登录与授权。";
225
+ readonly loginFailed: "账号授权失败";
226
+ readonly pluginAccount: "插件账号";
227
+ readonly desktopAccount: "桌面账号";
228
+ readonly encryptedStorage: "系统加密存储";
229
+ readonly hiddenAccount: "已隐藏";
230
+ readonly hideAccount: "从插件隐藏";
231
+ readonly restoreAccount: "恢复显示";
232
+ readonly deleteAccount: "删除账号";
233
+ readonly deleteConfirm: "确定删除这个插件托管的账号吗?加密存储中的登录凭据会被移除。";
234
+ readonly connection: "连接";
235
+ readonly provider: "Provider";
236
+ readonly providerValue: "WorkBuddy Subscription · workbuddy-subscription";
237
+ readonly connectionState: "连接状态";
238
+ readonly connected: "已连接";
239
+ readonly untested: "未测试";
240
+ readonly testConnection: "测试连接";
241
+ readonly testingConnection: "测试中...";
242
+ readonly latency: "延迟";
243
+ readonly routeOwned: "模型路由由本插件提供";
244
+ readonly routeConflict: "模型路由已被其他 Provider 占用:{detail}。请在 DSH 设置中移除重复的 Provider 配置后重试。";
245
+ readonly modelsSection: "模型";
246
+ readonly enableProvider: "启用此供应商";
247
+ readonly modelsHint: "勾选后模型才会出现在对话页的模型选择列表中;未勾选或关闭上方开关可在列表中隐藏该供应商。目录与上下文窗口来自订阅网关的模型目录,并按账号所在区域过滤——跨区调用会被上游拒绝。";
248
+ readonly refreshCatalog: "刷新模型目录";
249
+ readonly refreshingCatalog: "刷新中...";
250
+ readonly selectAll: "全选";
251
+ readonly unselectAll: "全不选";
252
+ readonly imageSupport: "图片";
253
+ readonly textOnly: "纯文本";
254
+ readonly regionBadge: "区域";
255
+ readonly unavailableHere: "当前区域不可用";
256
+ readonly enhanced: "增强功能";
257
+ readonly defaultReasoningEffort: "默认思考深度";
258
+ readonly defaultReasoningEffortHint: "控制支持推理的模型在未单独指定时的思考强度。";
259
+ readonly defaultEffortAuto: "使用模型默认值";
260
+ readonly effortUnsupported: "当前模型不支持";
261
+ readonly noReasoningModels: "当前账号的模型都没有声明可用的思考档位,因此没有可选的默认档位。";
262
+ readonly defaultEffortKept: "已保存的档位不被当前任何模型支持,已保留但不会生效。";
263
+ readonly contextWindowSection: "模型上下文窗口";
264
+ readonly contextWindowHint: "默认值来自订阅网关的模型目录(每个模型的真实上下文上限);可覆盖为自定义容量,该值用于 DSH 的压缩与溢出判断,可输入 1M、512K、200K 等容量。";
265
+ readonly save: "保存";
266
+ readonly saved: "已保存";
267
+ readonly saving: "保存中...";
268
+ readonly quotaSection: "用量与配额";
269
+ readonly quotaDesc: "数据来自订阅的计费接口,页面可见时最多每 60 秒刷新一次。";
270
+ readonly refreshQuota: "刷新用量";
271
+ readonly refreshingQuota: "刷新中...";
272
+ readonly quotaEmpty: "暂无配额数据,点击「刷新用量」重试。";
273
+ readonly quotaPackage: "套餐";
274
+ readonly quotaRemaining: "剩余额度";
275
+ readonly quotaCycle: "本周期已用";
276
+ readonly quotaReset: "重置时间";
277
+ readonly updatedAt: "更新时间:{time}";
278
+ readonly loading: "加载中...";
279
+ readonly credits: "credits";
280
+ readonly composerLabel: "额度";
281
+ };
282
+ 'zh-CN': {
283
+ readonly title: "WorkBuddy";
284
+ readonly pageDesc: "复用本机 CodeBuddy 桌面端登录态,管理 WorkBuddy(CodeBuddy 订阅)模型、上下文窗口与额度。";
285
+ readonly account: "账号";
286
+ readonly noAccounts: "暂无账号,点击「添加国区账号 / 添加国际区账号」完成浏览器授权,或登录 CodeBuddy 桌面端后重新扫描。";
287
+ readonly signedIn: "已找到凭据";
288
+ readonly signedOut: "未找到凭据";
289
+ readonly nickname: "昵称";
290
+ readonly uid: "账号 ID";
291
+ readonly uin: "UIN";
292
+ readonly region: "区域";
293
+ readonly regionCn: "国区";
294
+ readonly regionIntl: "国际区";
295
+ readonly accountType: "账号类型";
296
+ readonly backend: "后端地址";
297
+ readonly domain: "认证域名";
298
+ readonly tokenExpires: "登录态有效期";
299
+ readonly tokenExpired: "已过期";
300
+ readonly sourceFile: "凭据文件";
301
+ readonly authDirectory: "凭据目录";
302
+ readonly storage: "凭据存储";
303
+ readonly storageNotice: "桌面端账号仍读取 CodeBuddy 自己的凭据文件,插件不会删除这些文件;通过这里添加的账号保存在系统加密存储中(Windows DPAPI / macOS Keychain / Linux Secret Service),token 不进入浏览器。";
304
+ readonly notFoundTitle: "未找到 WorkBuddy 账号";
305
+ readonly notFoundHint: "可安装并登录 CodeBuddy 后重新扫描,也可以直接点击下方「添加国区账号」或「添加国际区账号」完成浏览器授权。";
306
+ readonly routeUnreachable: "无法读取 WorkBuddy 设置路由";
307
+ readonly routeUnreachableHint: "浏览器里加载的插件版本可能比 Host 进程里运行的新(客户端资源是现读磁盘的,Host 只在启动时加载)。请重启 DSH,让两端来自同一份构建。";
308
+ readonly rescan: "重新扫描";
309
+ readonly rescanning: "扫描中...";
310
+ readonly accounts: "本机凭据";
311
+ readonly accountsHint: "按账号地区分组。插件添加的账号可删除;CodeBuddy 桌面账号只能从本插件隐藏,绝不删除桌面端原凭据。点击账号会切换模型目录、额度和后续对话。";
312
+ readonly useAccount: "使用此账号";
313
+ readonly selectedAccount: "当前账号";
314
+ readonly addCnAccount: "添加国区账号";
315
+ readonly addIntlAccount: "添加国际区账号";
316
+ readonly authorizing: "授权中…";
317
+ readonly loginWaiting: "请在新打开的浏览器页面完成登录与授权。";
318
+ readonly loginFailed: "账号授权失败";
319
+ readonly pluginAccount: "插件账号";
320
+ readonly desktopAccount: "桌面账号";
321
+ readonly encryptedStorage: "系统加密存储";
322
+ readonly hiddenAccount: "已隐藏";
323
+ readonly hideAccount: "从插件隐藏";
324
+ readonly restoreAccount: "恢复显示";
325
+ readonly deleteAccount: "删除账号";
326
+ readonly deleteConfirm: "确定删除这个插件托管的账号吗?加密存储中的登录凭据会被移除。";
327
+ readonly connection: "连接";
328
+ readonly provider: "Provider";
329
+ readonly providerValue: "WorkBuddy Subscription · workbuddy-subscription";
330
+ readonly connectionState: "连接状态";
331
+ readonly connected: "已连接";
332
+ readonly untested: "未测试";
333
+ readonly testConnection: "测试连接";
334
+ readonly testingConnection: "测试中...";
335
+ readonly latency: "延迟";
336
+ readonly routeOwned: "模型路由由本插件提供";
337
+ readonly routeConflict: "模型路由已被其他 Provider 占用:{detail}。请在 DSH 设置中移除重复的 Provider 配置后重试。";
338
+ readonly modelsSection: "模型";
339
+ readonly enableProvider: "启用此供应商";
340
+ readonly modelsHint: "勾选后模型才会出现在对话页的模型选择列表中;未勾选或关闭上方开关可在列表中隐藏该供应商。目录与上下文窗口来自订阅网关的模型目录,并按账号所在区域过滤——跨区调用会被上游拒绝。";
341
+ readonly refreshCatalog: "刷新模型目录";
342
+ readonly refreshingCatalog: "刷新中...";
343
+ readonly selectAll: "全选";
344
+ readonly unselectAll: "全不选";
345
+ readonly imageSupport: "图片";
346
+ readonly textOnly: "纯文本";
347
+ readonly regionBadge: "区域";
348
+ readonly unavailableHere: "当前区域不可用";
349
+ readonly enhanced: "增强功能";
350
+ readonly defaultReasoningEffort: "默认思考深度";
351
+ readonly defaultReasoningEffortHint: "控制支持推理的模型在未单独指定时的思考强度。";
352
+ readonly defaultEffortAuto: "使用模型默认值";
353
+ readonly effortUnsupported: "当前模型不支持";
354
+ readonly noReasoningModels: "当前账号的模型都没有声明可用的思考档位,因此没有可选的默认档位。";
355
+ readonly defaultEffortKept: "已保存的档位不被当前任何模型支持,已保留但不会生效。";
356
+ readonly contextWindowSection: "模型上下文窗口";
357
+ readonly contextWindowHint: "默认值来自订阅网关的模型目录(每个模型的真实上下文上限);可覆盖为自定义容量,该值用于 DSH 的压缩与溢出判断,可输入 1M、512K、200K 等容量。";
358
+ readonly save: "保存";
359
+ readonly saved: "已保存";
360
+ readonly saving: "保存中...";
361
+ readonly quotaSection: "用量与配额";
362
+ readonly quotaDesc: "数据来自订阅的计费接口,页面可见时最多每 60 秒刷新一次。";
363
+ readonly refreshQuota: "刷新用量";
364
+ readonly refreshingQuota: "刷新中...";
365
+ readonly quotaEmpty: "暂无配额数据,点击「刷新用量」重试。";
366
+ readonly quotaPackage: "套餐";
367
+ readonly quotaRemaining: "剩余额度";
368
+ readonly quotaCycle: "本周期已用";
369
+ readonly quotaReset: "重置时间";
370
+ readonly updatedAt: "更新时间:{time}";
371
+ readonly loading: "加载中...";
372
+ readonly credits: "credits";
373
+ readonly composerLabel: "额度";
374
+ };
375
+ en: {
376
+ readonly title: "WorkBuddy";
377
+ readonly pageDesc: "Reuse the local CodeBuddy desktop sign-in to manage WorkBuddy (CodeBuddy subscription) models, context windows, and quota.";
378
+ readonly account: "Account";
379
+ readonly noAccounts: "No accounts yet. Add a China or international account, or sign in with the CodeBuddy desktop client and rescan.";
380
+ readonly signedIn: "Credential found";
381
+ readonly signedOut: "No credential found";
382
+ readonly nickname: "Nickname";
383
+ readonly uid: "Account ID";
384
+ readonly uin: "UIN";
385
+ readonly region: "Region";
386
+ readonly regionCn: "China";
387
+ readonly regionIntl: "International";
388
+ readonly accountType: "Account type";
389
+ readonly backend: "Backend";
390
+ readonly domain: "Auth domain";
391
+ readonly tokenExpires: "Sign-in valid until";
392
+ readonly tokenExpired: "Expired";
393
+ readonly sourceFile: "Credential file";
394
+ readonly authDirectory: "Credential directory";
395
+ readonly storage: "Credential storage";
396
+ readonly storageNotice: "Desktop accounts continue to use CodeBuddy’s credential files, which this plugin never deletes. Accounts added here use encrypted OS storage (Windows DPAPI, macOS Keychain, or Linux Secret Service); tokens never enter the browser.";
397
+ readonly notFoundTitle: "No WorkBuddy account found";
398
+ readonly notFoundHint: "Install and sign in to CodeBuddy and rescan, or use “Add China account” / “Add international account” below to authorize in the browser.";
399
+ readonly routeUnreachable: "The WorkBuddy settings route could not be read";
400
+ readonly routeUnreachableHint: "The plugin loaded in the browser may be newer than the one running in the Host: client assets are read from disk on demand, while the Host loads them only at startup. Restart DSH so both halves come from the same build.";
401
+ readonly rescan: "Rescan";
402
+ readonly rescanning: "Scanning...";
403
+ readonly accounts: "Local credentials";
404
+ readonly accountsHint: "Accounts are grouped by region. Plugin-managed accounts can be deleted; CodeBuddy desktop accounts can only be hidden from this plugin and their source files are never deleted. Selecting one switches models, quota, and chats.";
405
+ readonly useAccount: "Use this account";
406
+ readonly selectedAccount: "Selected account";
407
+ readonly addCnAccount: "Add China account";
408
+ readonly addIntlAccount: "Add international account";
409
+ readonly authorizing: "Authorizing…";
410
+ readonly loginWaiting: "Complete sign-in and authorization in the newly opened browser page.";
411
+ readonly loginFailed: "Account authorization failed";
412
+ readonly pluginAccount: "Plugin account";
413
+ readonly desktopAccount: "Desktop account";
414
+ readonly encryptedStorage: "Encrypted OS storage";
415
+ readonly hiddenAccount: "Hidden";
416
+ readonly hideAccount: "Hide from plugin";
417
+ readonly restoreAccount: "Restore";
418
+ readonly deleteAccount: "Delete account";
419
+ readonly deleteConfirm: "Delete this plugin-managed account? Its encrypted credential will be removed.";
420
+ readonly connection: "Connection";
421
+ readonly provider: "Provider";
422
+ readonly providerValue: "WorkBuddy Subscription · workbuddy-subscription";
423
+ readonly connectionState: "Connection state";
424
+ readonly connected: "Connected";
425
+ readonly untested: "Untested";
426
+ readonly testConnection: "Test connection";
427
+ readonly testingConnection: "Testing...";
428
+ readonly latency: "Latency";
429
+ readonly routeOwned: "This plugin serves the model route";
430
+ readonly routeConflict: "Another provider already owns the model route: {detail}. Remove the duplicate provider configuration in DSH settings and reload.";
431
+ readonly modelsSection: "Models";
432
+ readonly enableProvider: "Enable this provider";
433
+ readonly modelsHint: "Checked models appear in the DSH conversation model list. The catalog and its context windows come from the subscription gateway and are filtered by the account’s region — the upstream rejects a model asked of the wrong region.";
434
+ readonly refreshCatalog: "Refresh catalog";
435
+ readonly refreshingCatalog: "Refreshing...";
436
+ readonly selectAll: "Select all";
437
+ readonly unselectAll: "Deselect all";
438
+ readonly imageSupport: "Images";
439
+ readonly textOnly: "Text only";
440
+ readonly regionBadge: "Regions";
441
+ readonly unavailableHere: "Unavailable in this region";
442
+ readonly enhanced: "Enhanced features";
443
+ readonly defaultReasoningEffort: "Default reasoning effort";
444
+ readonly defaultReasoningEffortHint: "Reasoning effort for models that support it when the conversation does not specify one.";
445
+ readonly defaultEffortAuto: "Use the model default";
446
+ readonly effortUnsupported: "unsupported by the current models";
447
+ readonly noReasoningModels: "None of this account’s models declare a reasoning level, so there is no default to choose.";
448
+ readonly defaultEffortKept: "The saved level is not supported by any current model; it is kept but has no effect.";
449
+ readonly contextWindowSection: "Model context window";
450
+ readonly contextWindowHint: "Defaults come from the subscription gateway’s own catalog (each model’s real context cap); override one with the capacity DSH should use for compaction and overflow decisions (e.g., 1M, 512K, 200K).";
451
+ readonly save: "Save";
452
+ readonly saved: "Saved";
453
+ readonly saving: "Saving...";
454
+ readonly quotaSection: "Usage & quota";
455
+ readonly quotaDesc: "Read from the subscription billing endpoint; refreshes at most once every 60 seconds while visible.";
456
+ readonly refreshQuota: "Refresh quota";
457
+ readonly refreshingQuota: "Refreshing...";
458
+ readonly quotaEmpty: "No quota data yet — use “Refresh quota” to retry.";
459
+ readonly quotaPackage: "Package";
460
+ readonly quotaRemaining: "Remaining credits";
461
+ readonly quotaCycle: "Used this cycle";
462
+ readonly quotaReset: "Resets";
463
+ readonly updatedAt: "Updated at: {time}";
464
+ readonly loading: "Loading...";
465
+ readonly credits: "credits";
466
+ readonly composerLabel: "Quota";
467
+ };
468
+ 'en-US': {
469
+ readonly title: "WorkBuddy";
470
+ readonly pageDesc: "Reuse the local CodeBuddy desktop sign-in to manage WorkBuddy (CodeBuddy subscription) models, context windows, and quota.";
471
+ readonly account: "Account";
472
+ readonly noAccounts: "No accounts yet. Add a China or international account, or sign in with the CodeBuddy desktop client and rescan.";
473
+ readonly signedIn: "Credential found";
474
+ readonly signedOut: "No credential found";
475
+ readonly nickname: "Nickname";
476
+ readonly uid: "Account ID";
477
+ readonly uin: "UIN";
478
+ readonly region: "Region";
479
+ readonly regionCn: "China";
480
+ readonly regionIntl: "International";
481
+ readonly accountType: "Account type";
482
+ readonly backend: "Backend";
483
+ readonly domain: "Auth domain";
484
+ readonly tokenExpires: "Sign-in valid until";
485
+ readonly tokenExpired: "Expired";
486
+ readonly sourceFile: "Credential file";
487
+ readonly authDirectory: "Credential directory";
488
+ readonly storage: "Credential storage";
489
+ readonly storageNotice: "Desktop accounts continue to use CodeBuddy’s credential files, which this plugin never deletes. Accounts added here use encrypted OS storage (Windows DPAPI, macOS Keychain, or Linux Secret Service); tokens never enter the browser.";
490
+ readonly notFoundTitle: "No WorkBuddy account found";
491
+ readonly notFoundHint: "Install and sign in to CodeBuddy and rescan, or use “Add China account” / “Add international account” below to authorize in the browser.";
492
+ readonly routeUnreachable: "The WorkBuddy settings route could not be read";
493
+ readonly routeUnreachableHint: "The plugin loaded in the browser may be newer than the one running in the Host: client assets are read from disk on demand, while the Host loads them only at startup. Restart DSH so both halves come from the same build.";
494
+ readonly rescan: "Rescan";
495
+ readonly rescanning: "Scanning...";
496
+ readonly accounts: "Local credentials";
497
+ readonly accountsHint: "Accounts are grouped by region. Plugin-managed accounts can be deleted; CodeBuddy desktop accounts can only be hidden from this plugin and their source files are never deleted. Selecting one switches models, quota, and chats.";
498
+ readonly useAccount: "Use this account";
499
+ readonly selectedAccount: "Selected account";
500
+ readonly addCnAccount: "Add China account";
501
+ readonly addIntlAccount: "Add international account";
502
+ readonly authorizing: "Authorizing…";
503
+ readonly loginWaiting: "Complete sign-in and authorization in the newly opened browser page.";
504
+ readonly loginFailed: "Account authorization failed";
505
+ readonly pluginAccount: "Plugin account";
506
+ readonly desktopAccount: "Desktop account";
507
+ readonly encryptedStorage: "Encrypted OS storage";
508
+ readonly hiddenAccount: "Hidden";
509
+ readonly hideAccount: "Hide from plugin";
510
+ readonly restoreAccount: "Restore";
511
+ readonly deleteAccount: "Delete account";
512
+ readonly deleteConfirm: "Delete this plugin-managed account? Its encrypted credential will be removed.";
513
+ readonly connection: "Connection";
514
+ readonly provider: "Provider";
515
+ readonly providerValue: "WorkBuddy Subscription · workbuddy-subscription";
516
+ readonly connectionState: "Connection state";
517
+ readonly connected: "Connected";
518
+ readonly untested: "Untested";
519
+ readonly testConnection: "Test connection";
520
+ readonly testingConnection: "Testing...";
521
+ readonly latency: "Latency";
522
+ readonly routeOwned: "This plugin serves the model route";
523
+ readonly routeConflict: "Another provider already owns the model route: {detail}. Remove the duplicate provider configuration in DSH settings and reload.";
524
+ readonly modelsSection: "Models";
525
+ readonly enableProvider: "Enable this provider";
526
+ readonly modelsHint: "Checked models appear in the DSH conversation model list. The catalog and its context windows come from the subscription gateway and are filtered by the account’s region — the upstream rejects a model asked of the wrong region.";
527
+ readonly refreshCatalog: "Refresh catalog";
528
+ readonly refreshingCatalog: "Refreshing...";
529
+ readonly selectAll: "Select all";
530
+ readonly unselectAll: "Deselect all";
531
+ readonly imageSupport: "Images";
532
+ readonly textOnly: "Text only";
533
+ readonly regionBadge: "Regions";
534
+ readonly unavailableHere: "Unavailable in this region";
535
+ readonly enhanced: "Enhanced features";
536
+ readonly defaultReasoningEffort: "Default reasoning effort";
537
+ readonly defaultReasoningEffortHint: "Reasoning effort for models that support it when the conversation does not specify one.";
538
+ readonly defaultEffortAuto: "Use the model default";
539
+ readonly effortUnsupported: "unsupported by the current models";
540
+ readonly noReasoningModels: "None of this account’s models declare a reasoning level, so there is no default to choose.";
541
+ readonly defaultEffortKept: "The saved level is not supported by any current model; it is kept but has no effect.";
542
+ readonly contextWindowSection: "Model context window";
543
+ readonly contextWindowHint: "Defaults come from the subscription gateway’s own catalog (each model’s real context cap); override one with the capacity DSH should use for compaction and overflow decisions (e.g., 1M, 512K, 200K).";
544
+ readonly save: "Save";
545
+ readonly saved: "Saved";
546
+ readonly saving: "Saving...";
547
+ readonly quotaSection: "Usage & quota";
548
+ readonly quotaDesc: "Read from the subscription billing endpoint; refreshes at most once every 60 seconds while visible.";
549
+ readonly refreshQuota: "Refresh quota";
550
+ readonly refreshingQuota: "Refreshing...";
551
+ readonly quotaEmpty: "No quota data yet — use “Refresh quota” to retry.";
552
+ readonly quotaPackage: "Package";
553
+ readonly quotaRemaining: "Remaining credits";
554
+ readonly quotaCycle: "Used this cycle";
555
+ readonly quotaReset: "Resets";
556
+ readonly updatedAt: "Updated at: {time}";
557
+ readonly loading: "Loading...";
558
+ readonly credits: "credits";
559
+ readonly composerLabel: "Quota";
560
+ };
561
+ };
562
+ export type WorkBuddyLocaleKey = keyof typeof zh;
563
+ //# sourceMappingURL=locales.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../src/client/workbuddy/locales.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,kBAAkB,CAAA;AAE3C,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4FL,CAAA;AAEV,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4FL,CAAA;AAEV,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKxB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,EAAE,CAAA"}
@@ -0,0 +1,11 @@
1
+ export declare const STYLE_ID = "dsh-workbuddy-settings-style";
2
+ /**
3
+ * WorkBuddy-only additions to the shared settings design system.
4
+ *
5
+ * The base control styles (`.dsha-page`, `.dsha-group`, `.dsha-models`, …) come
6
+ * from the stylesheet the sibling routes install, so this file declares only
7
+ * what is unique to this card: the per-model capability line and the
8
+ * "unavailable in this region" treatment.
9
+ */
10
+ export declare function installWorkBuddyStyles(): void;
11
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/client/workbuddy/styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,iCAAiC,CAAA;AAEtD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAoB7C"}
@@ -1,6 +1,6 @@
1
1
  import type { CredentialStore } from '../token-store.ts';
2
2
  import { FileCredentialStore, type AntigravityCredentials } from './token-store.ts';
3
- import type { AccountRotationStrategy, AntigravityAccountSummaryDto } from '../../shared/antigravity-contracts.ts';
3
+ import type { AntigravityAccountSummaryDto, AccountRotationStrategy } from '../../shared/antigravity-contracts.ts';
4
4
  export interface AntigravityPoolAccount {
5
5
  id: string;
6
6
  alias: string;
@@ -22,14 +22,20 @@ export interface AntigravityPoolData {
22
22
  }
23
23
  export declare function poolPath(): string;
24
24
  export declare function parseAntigravityPoolData(value: unknown): AntigravityPoolData;
25
+ /**
26
+ * Antigravity's account pool.
27
+ *
28
+ * The storage, eligibility, rotation and cooldown rules live in the shared
29
+ * {@link AccountPoolCore}; this facade keeps the provider-shaped API the routes
30
+ * and the adapter were written against, including the credential projection
31
+ * (`token` / `projectId`) that predates the shared core.
32
+ */
25
33
  export declare class AccountPoolStore {
26
- private readonly filePath;
27
- private readonly backend;
34
+ private readonly core;
28
35
  private readonly legacyStore;
29
36
  constructor(filePath?: string, backend?: CredentialStore<AntigravityPoolData>, legacyStore?: FileCredentialStore);
37
+ /** Human description of where this pool's credentials live. */
30
38
  path(): string;
31
- private serialize;
32
- private saveVerified;
33
39
  read(): Promise<AntigravityPoolData>;
34
40
  write(data: AntigravityPoolData): Promise<void>;
35
41
  listAccounts(): Promise<AntigravityAccountSummaryDto[]>;
@@ -41,6 +47,10 @@ export declare class AccountPoolStore {
41
47
  markCooldown(accountId: string, durationMs: number, reason: string): Promise<void>;
42
48
  clearCooldown(accountId: string): Promise<void>;
43
49
  hasAnotherAvailableAccount(triedAccountIds: ReadonlySet<string>): Promise<boolean>;
50
+ /**
51
+ * Pick the account for the next request, with the credential projection the
52
+ * Antigravity adapter consumes.
53
+ */
44
54
  getEffectiveAccount(excludeIds?: ReadonlySet<string>, fetchFn?: typeof fetch): Promise<{
45
55
  account: AntigravityPoolAccount;
46
56
  token: string;
@@ -1 +1 @@
1
- {"version":3,"file":"account-pool.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity/account-pool.ts"],"names":[],"mappings":"AAMA,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