@alm-allen/dsh-multi-provider 0.0.0-stage → 0.90.2

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 (857) hide show
  1. package/CHANGELOG.md +70 -0
  2. package/LICENSE +21 -0
  3. package/README.md +229 -2
  4. package/cordis.patch.yml +6 -0
  5. package/icon.svg +28 -0
  6. package/lib/client.js +25708 -0
  7. package/lib/client.js.map +1 -0
  8. package/lib/index.js +93587 -0
  9. package/lib/types/client/CodexComposerQuota.d.ts +13 -0
  10. package/lib/types/client/CodexComposerQuota.d.ts.map +1 -0
  11. package/lib/types/client/CodexSubscriptionSection.d.ts +42 -0
  12. package/lib/types/client/CodexSubscriptionSection.d.ts.map +1 -0
  13. package/lib/types/client/ProviderHubSection.d.ts +21 -0
  14. package/lib/types/client/ProviderHubSection.d.ts.map +1 -0
  15. package/lib/types/client/api.d.ts +66 -0
  16. package/lib/types/client/api.d.ts.map +1 -0
  17. package/lib/types/client/claude/ClaudeComposerQuota.d.ts +29 -0
  18. package/lib/types/client/claude/ClaudeComposerQuota.d.ts.map +1 -0
  19. package/lib/types/client/claude/ClaudeSection.d.ts +12 -0
  20. package/lib/types/client/claude/ClaudeSection.d.ts.map +1 -0
  21. package/lib/types/client/claude/locales.d.ts +489 -0
  22. package/lib/types/client/claude/locales.d.ts.map +1 -0
  23. package/lib/types/client/claude/styles.d.ts +15 -0
  24. package/lib/types/client/claude/styles.d.ts.map +1 -0
  25. package/lib/types/client/claude/useClaudeSection.d.ts +106 -0
  26. package/lib/types/client/claude/useClaudeSection.d.ts.map +1 -0
  27. package/lib/types/client/claude-api/ClaudeApiSection.d.ts +5 -0
  28. package/lib/types/client/claude-api/ClaudeApiSection.d.ts.map +1 -0
  29. package/lib/types/client/claude-api/api.d.ts +23 -0
  30. package/lib/types/client/claude-api/api.d.ts.map +1 -0
  31. package/lib/types/client/claude-api/locales.d.ts +161 -0
  32. package/lib/types/client/claude-api/locales.d.ts.map +1 -0
  33. package/lib/types/client/claude-api/styles.d.ts +4 -0
  34. package/lib/types/client/claude-api/styles.d.ts.map +1 -0
  35. package/lib/types/client/claude-api/useClaudeApiSection.d.ts +37 -0
  36. package/lib/types/client/claude-api/useClaudeApiSection.d.ts.map +1 -0
  37. package/lib/types/client/cline-pass/ClinePassComposerQuota.d.ts +23 -0
  38. package/lib/types/client/cline-pass/ClinePassComposerQuota.d.ts.map +1 -0
  39. package/lib/types/client/cline-pass/ClinePassSection.d.ts +17 -0
  40. package/lib/types/client/cline-pass/ClinePassSection.d.ts.map +1 -0
  41. package/lib/types/client/cline-pass/api.d.ts +85 -0
  42. package/lib/types/client/cline-pass/api.d.ts.map +1 -0
  43. package/lib/types/client/cline-pass/locales.d.ts +911 -0
  44. package/lib/types/client/cline-pass/locales.d.ts.map +1 -0
  45. package/lib/types/client/cline-pass/styles.d.ts +7 -0
  46. package/lib/types/client/cline-pass/styles.d.ts.map +1 -0
  47. package/lib/types/client/command-code/CommandCodeComposerQuota.d.ts +20 -0
  48. package/lib/types/client/command-code/CommandCodeComposerQuota.d.ts.map +1 -0
  49. package/lib/types/client/command-code/CommandCodeSection.d.ts +8 -0
  50. package/lib/types/client/command-code/CommandCodeSection.d.ts.map +1 -0
  51. package/lib/types/client/command-code/locales.d.ts +305 -0
  52. package/lib/types/client/command-code/locales.d.ts.map +1 -0
  53. package/lib/types/client/common/AccountPoolSection.d.ts +104 -0
  54. package/lib/types/client/common/AccountPoolSection.d.ts.map +1 -0
  55. package/lib/types/client/common/ComposerQuotaBadge.d.ts +63 -0
  56. package/lib/types/client/common/ComposerQuotaBadge.d.ts.map +1 -0
  57. package/lib/types/client/common/ContextWindowEditor.d.ts +71 -0
  58. package/lib/types/client/common/ContextWindowEditor.d.ts.map +1 -0
  59. package/lib/types/client/common/LineProxySection.d.ts +78 -0
  60. package/lib/types/client/common/LineProxySection.d.ts.map +1 -0
  61. package/lib/types/client/common/ModelChecklist.d.ts +29 -0
  62. package/lib/types/client/common/ModelChecklist.d.ts.map +1 -0
  63. package/lib/types/client/common/account-pool-labels.d.ts +74 -0
  64. package/lib/types/client/common/account-pool-labels.d.ts.map +1 -0
  65. package/lib/types/client/common/account-quota.d.ts +60 -0
  66. package/lib/types/client/common/account-quota.d.ts.map +1 -0
  67. package/lib/types/client/common/format.d.ts +70 -0
  68. package/lib/types/client/common/format.d.ts.map +1 -0
  69. package/lib/types/client/common/host-locale-mirror.d.ts +24 -0
  70. package/lib/types/client/common/host-locale-mirror.d.ts.map +1 -0
  71. package/lib/types/client/common/line-api.d.ts +8 -0
  72. package/lib/types/client/common/line-api.d.ts.map +1 -0
  73. package/lib/types/client/common/line-locale.d.ts +21 -0
  74. package/lib/types/client/common/line-locale.d.ts.map +1 -0
  75. package/lib/types/client/common/model-checklist-styles.d.ts +2 -0
  76. package/lib/types/client/common/model-checklist-styles.d.ts.map +1 -0
  77. package/lib/types/client/common/plugin-style.d.ts +23 -0
  78. package/lib/types/client/common/plugin-style.d.ts.map +1 -0
  79. package/lib/types/client/common/quota-follow-up.d.ts +30 -0
  80. package/lib/types/client/common/quota-follow-up.d.ts.map +1 -0
  81. package/lib/types/client/common/styles.d.ts +11 -0
  82. package/lib/types/client/common/styles.d.ts.map +1 -0
  83. package/lib/types/client/common/use-store.d.ts +3 -0
  84. package/lib/types/client/common/use-store.d.ts.map +1 -0
  85. package/lib/types/client/glm-coding-plan/GlmCodingPlanComposerQuota.d.ts +27 -0
  86. package/lib/types/client/glm-coding-plan/GlmCodingPlanComposerQuota.d.ts.map +1 -0
  87. package/lib/types/client/glm-coding-plan/GlmCodingPlanSection.d.ts +22 -0
  88. package/lib/types/client/glm-coding-plan/GlmCodingPlanSection.d.ts.map +1 -0
  89. package/lib/types/client/glm-coding-plan/api.d.ts +4 -0
  90. package/lib/types/client/glm-coding-plan/api.d.ts.map +1 -0
  91. package/lib/types/client/glm-coding-plan/locales.d.ts +409 -0
  92. package/lib/types/client/glm-coding-plan/locales.d.ts.map +1 -0
  93. package/lib/types/client/glm-coding-plan/styles.d.ts +16 -0
  94. package/lib/types/client/glm-coding-plan/styles.d.ts.map +1 -0
  95. package/lib/types/client/glm-coding-plan/useGlmCodingPlanSection.d.ts +65 -0
  96. package/lib/types/client/glm-coding-plan/useGlmCodingPlanSection.d.ts.map +1 -0
  97. package/lib/types/client/hub/HubOverview.d.ts +16 -0
  98. package/lib/types/client/hub/HubOverview.d.ts.map +1 -0
  99. package/lib/types/client/hub/brand-icons.d.ts +64 -0
  100. package/lib/types/client/hub/brand-icons.d.ts.map +1 -0
  101. package/lib/types/client/hub/brand-svg.d.ts +51 -0
  102. package/lib/types/client/hub/brand-svg.d.ts.map +1 -0
  103. package/lib/types/client/hub/hub-styles.d.ts +2 -0
  104. package/lib/types/client/hub/hub-styles.d.ts.map +1 -0
  105. package/lib/types/client/hub/providers.d.ts +55 -0
  106. package/lib/types/client/hub/providers.d.ts.map +1 -0
  107. package/lib/types/client/index.d.ts +67 -0
  108. package/lib/types/client/index.d.ts.map +1 -0
  109. package/lib/types/client/kimi-code/KimiCodeComposerQuota.d.ts +21 -0
  110. package/lib/types/client/kimi-code/KimiCodeComposerQuota.d.ts.map +1 -0
  111. package/lib/types/client/kimi-code/KimiCodeSection.d.ts +8 -0
  112. package/lib/types/client/kimi-code/KimiCodeSection.d.ts.map +1 -0
  113. package/lib/types/client/kimi-code/KimiModelCapabilities.d.ts +16 -0
  114. package/lib/types/client/kimi-code/KimiModelCapabilities.d.ts.map +1 -0
  115. package/lib/types/client/kimi-code/KimiQuotaCard.d.ts +31 -0
  116. package/lib/types/client/kimi-code/KimiQuotaCard.d.ts.map +1 -0
  117. package/lib/types/client/kimi-code/labels.d.ts +66 -0
  118. package/lib/types/client/kimi-code/labels.d.ts.map +1 -0
  119. package/lib/types/client/kimi-code/locales.d.ts +640 -0
  120. package/lib/types/client/kimi-code/locales.d.ts.map +1 -0
  121. package/lib/types/client/kimi-code/staff-art.d.ts +19 -0
  122. package/lib/types/client/kimi-code/staff-art.d.ts.map +1 -0
  123. package/lib/types/client/kimi-code/styles.d.ts +4 -0
  124. package/lib/types/client/kimi-code/styles.d.ts.map +1 -0
  125. package/lib/types/client/locales-ru/account-pool.d.ts +11 -0
  126. package/lib/types/client/locales-ru/account-pool.d.ts.map +1 -0
  127. package/lib/types/client/locales-ru/claude-api.d.ts +3 -0
  128. package/lib/types/client/locales-ru/claude-api.d.ts.map +1 -0
  129. package/lib/types/client/locales-ru/claude.d.ts +3 -0
  130. package/lib/types/client/locales-ru/claude.d.ts.map +1 -0
  131. package/lib/types/client/locales-ru/cline-pass.d.ts +11 -0
  132. package/lib/types/client/locales-ru/cline-pass.d.ts.map +1 -0
  133. package/lib/types/client/locales-ru/command-code.d.ts +9 -0
  134. package/lib/types/client/locales-ru/command-code.d.ts.map +1 -0
  135. package/lib/types/client/locales-ru/glm-coding-plan.d.ts +10 -0
  136. package/lib/types/client/locales-ru/glm-coding-plan.d.ts.map +1 -0
  137. package/lib/types/client/locales-ru/hub.d.ts +3 -0
  138. package/lib/types/client/locales-ru/hub.d.ts.map +1 -0
  139. package/lib/types/client/locales-ru/index.d.ts +26 -0
  140. package/lib/types/client/locales-ru/index.d.ts.map +1 -0
  141. package/lib/types/client/locales-ru/kimi-code.d.ts +10 -0
  142. package/lib/types/client/locales-ru/kimi-code.d.ts.map +1 -0
  143. package/lib/types/client/locales-ru/minimax-code.d.ts +9 -0
  144. package/lib/types/client/locales-ru/minimax-code.d.ts.map +1 -0
  145. package/lib/types/client/locales-ru/ollama.d.ts +10 -0
  146. package/lib/types/client/locales-ru/ollama.d.ts.map +1 -0
  147. package/lib/types/client/locales-ru/opencode-go.d.ts +3 -0
  148. package/lib/types/client/locales-ru/opencode-go.d.ts.map +1 -0
  149. package/lib/types/client/locales-ru/opendesign.d.ts +10 -0
  150. package/lib/types/client/locales-ru/opendesign.d.ts.map +1 -0
  151. package/lib/types/client/locales-ru/qianwen-token-plan.d.ts +3 -0
  152. package/lib/types/client/locales-ru/qianwen-token-plan.d.ts.map +1 -0
  153. package/lib/types/client/locales-ru/qoder.d.ts +11 -0
  154. package/lib/types/client/locales-ru/qoder.d.ts.map +1 -0
  155. package/lib/types/client/locales-ru/relayone.d.ts +3 -0
  156. package/lib/types/client/locales-ru/relayone.d.ts.map +1 -0
  157. package/lib/types/client/locales-ru/step-code.d.ts +9 -0
  158. package/lib/types/client/locales-ru/step-code.d.ts.map +1 -0
  159. package/lib/types/client/locales-ru/workbuddy.d.ts +10 -0
  160. package/lib/types/client/locales-ru/workbuddy.d.ts.map +1 -0
  161. package/lib/types/client/locales.d.ts +497 -0
  162. package/lib/types/client/locales.d.ts.map +1 -0
  163. package/lib/types/client/minimax-code/MinimaxCodeComposerQuota.d.ts +23 -0
  164. package/lib/types/client/minimax-code/MinimaxCodeComposerQuota.d.ts.map +1 -0
  165. package/lib/types/client/minimax-code/MinimaxCodeSection.d.ts +23 -0
  166. package/lib/types/client/minimax-code/MinimaxCodeSection.d.ts.map +1 -0
  167. package/lib/types/client/minimax-code/api.d.ts +35 -0
  168. package/lib/types/client/minimax-code/api.d.ts.map +1 -0
  169. package/lib/types/client/minimax-code/commands-contract.d.ts +46 -0
  170. package/lib/types/client/minimax-code/commands-contract.d.ts.map +1 -0
  171. package/lib/types/client/minimax-code/locales.d.ts +422 -0
  172. package/lib/types/client/minimax-code/locales.d.ts.map +1 -0
  173. package/lib/types/client/minimax-code/styles.d.ts +12 -0
  174. package/lib/types/client/minimax-code/styles.d.ts.map +1 -0
  175. package/lib/types/client/minimax-code/useMinimaxCodeSection.d.ts +164 -0
  176. package/lib/types/client/minimax-code/useMinimaxCodeSection.d.ts.map +1 -0
  177. package/lib/types/client/ollama/OllamaSection.d.ts +25 -0
  178. package/lib/types/client/ollama/OllamaSection.d.ts.map +1 -0
  179. package/lib/types/client/ollama/api.d.ts +49 -0
  180. package/lib/types/client/ollama/api.d.ts.map +1 -0
  181. package/lib/types/client/ollama/locales.d.ts +479 -0
  182. package/lib/types/client/ollama/locales.d.ts.map +1 -0
  183. package/lib/types/client/opencode-go/OpenCodeGoQuotaCard.d.ts +20 -0
  184. package/lib/types/client/opencode-go/OpenCodeGoQuotaCard.d.ts.map +1 -0
  185. package/lib/types/client/opencode-go/OpenCodeGoSection.d.ts +8 -0
  186. package/lib/types/client/opencode-go/OpenCodeGoSection.d.ts.map +1 -0
  187. package/lib/types/client/opencode-go/locales.d.ts +210 -0
  188. package/lib/types/client/opencode-go/locales.d.ts.map +1 -0
  189. package/lib/types/client/opencode-go/styles.d.ts +10 -0
  190. package/lib/types/client/opencode-go/styles.d.ts.map +1 -0
  191. package/lib/types/client/opendesign/OpenDesignComposerQuota.d.ts +26 -0
  192. package/lib/types/client/opendesign/OpenDesignComposerQuota.d.ts.map +1 -0
  193. package/lib/types/client/opendesign/OpenDesignSection.d.ts +19 -0
  194. package/lib/types/client/opendesign/OpenDesignSection.d.ts.map +1 -0
  195. package/lib/types/client/opendesign/api.d.ts +45 -0
  196. package/lib/types/client/opendesign/api.d.ts.map +1 -0
  197. package/lib/types/client/opendesign/locales.d.ts +815 -0
  198. package/lib/types/client/opendesign/locales.d.ts.map +1 -0
  199. package/lib/types/client/opendesign/styles.d.ts +16 -0
  200. package/lib/types/client/opendesign/styles.d.ts.map +1 -0
  201. package/lib/types/client/qianwen-token-plan/QianwenComposerQuota.d.ts +14 -0
  202. package/lib/types/client/qianwen-token-plan/QianwenComposerQuota.d.ts.map +1 -0
  203. package/lib/types/client/qianwen-token-plan/QianwenTokenPlanSection.d.ts +4 -0
  204. package/lib/types/client/qianwen-token-plan/QianwenTokenPlanSection.d.ts.map +1 -0
  205. package/lib/types/client/qianwen-token-plan/api.d.ts +5 -0
  206. package/lib/types/client/qianwen-token-plan/api.d.ts.map +1 -0
  207. package/lib/types/client/qianwen-token-plan/locales.d.ts +158 -0
  208. package/lib/types/client/qianwen-token-plan/locales.d.ts.map +1 -0
  209. package/lib/types/client/qianwen-token-plan/styles.d.ts +3 -0
  210. package/lib/types/client/qianwen-token-plan/styles.d.ts.map +1 -0
  211. package/lib/types/client/qianwen-token-plan/useQianwenSection.d.ts +32 -0
  212. package/lib/types/client/qianwen-token-plan/useQianwenSection.d.ts.map +1 -0
  213. package/lib/types/client/qoder/QoderComposerQuota.d.ts +41 -0
  214. package/lib/types/client/qoder/QoderComposerQuota.d.ts.map +1 -0
  215. package/lib/types/client/qoder/QoderSection.d.ts +37 -0
  216. package/lib/types/client/qoder/QoderSection.d.ts.map +1 -0
  217. package/lib/types/client/qoder/api.d.ts +4 -0
  218. package/lib/types/client/qoder/api.d.ts.map +1 -0
  219. package/lib/types/client/qoder/locales.d.ts +322 -0
  220. package/lib/types/client/qoder/locales.d.ts.map +1 -0
  221. package/lib/types/client/qoder/styles.d.ts +16 -0
  222. package/lib/types/client/qoder/styles.d.ts.map +1 -0
  223. package/lib/types/client/qoder/useQoderSection.d.ts +97 -0
  224. package/lib/types/client/qoder/useQoderSection.d.ts.map +1 -0
  225. package/lib/types/client/quota.d.ts +9 -0
  226. package/lib/types/client/quota.d.ts.map +1 -0
  227. package/lib/types/client/relayone/RelayOneComposerQuota.d.ts +14 -0
  228. package/lib/types/client/relayone/RelayOneComposerQuota.d.ts.map +1 -0
  229. package/lib/types/client/relayone/RelayOneSection.d.ts +4 -0
  230. package/lib/types/client/relayone/RelayOneSection.d.ts.map +1 -0
  231. package/lib/types/client/relayone/api.d.ts +5 -0
  232. package/lib/types/client/relayone/api.d.ts.map +1 -0
  233. package/lib/types/client/relayone/locales.d.ts +221 -0
  234. package/lib/types/client/relayone/locales.d.ts.map +1 -0
  235. package/lib/types/client/relayone/quota-format.d.ts +6 -0
  236. package/lib/types/client/relayone/quota-format.d.ts.map +1 -0
  237. package/lib/types/client/relayone/styles.d.ts +3 -0
  238. package/lib/types/client/relayone/styles.d.ts.map +1 -0
  239. package/lib/types/client/relayone/useRelayOneSection.d.ts +32 -0
  240. package/lib/types/client/relayone/useRelayOneSection.d.ts.map +1 -0
  241. package/lib/types/client/step-code/StepCodeComposerQuota.d.ts +50 -0
  242. package/lib/types/client/step-code/StepCodeComposerQuota.d.ts.map +1 -0
  243. package/lib/types/client/step-code/StepCodeSection.d.ts +28 -0
  244. package/lib/types/client/step-code/StepCodeSection.d.ts.map +1 -0
  245. package/lib/types/client/step-code/api.d.ts +4 -0
  246. package/lib/types/client/step-code/api.d.ts.map +1 -0
  247. package/lib/types/client/step-code/locales.d.ts +657 -0
  248. package/lib/types/client/step-code/locales.d.ts.map +1 -0
  249. package/lib/types/client/step-code/styles.d.ts +28 -0
  250. package/lib/types/client/step-code/styles.d.ts.map +1 -0
  251. package/lib/types/client/step-code/useStepCodeSection.d.ts +122 -0
  252. package/lib/types/client/step-code/useStepCodeSection.d.ts.map +1 -0
  253. package/lib/types/client/store.d.ts +19 -0
  254. package/lib/types/client/store.d.ts.map +1 -0
  255. package/lib/types/client/styles.d.ts +26 -0
  256. package/lib/types/client/styles.d.ts.map +1 -0
  257. package/lib/types/client/workbuddy/WorkBuddyComposerQuota.d.ts +34 -0
  258. package/lib/types/client/workbuddy/WorkBuddyComposerQuota.d.ts.map +1 -0
  259. package/lib/types/client/workbuddy/WorkBuddySection.d.ts +91 -0
  260. package/lib/types/client/workbuddy/WorkBuddySection.d.ts.map +1 -0
  261. package/lib/types/client/workbuddy/locales.d.ts +768 -0
  262. package/lib/types/client/workbuddy/locales.d.ts.map +1 -0
  263. package/lib/types/client/workbuddy/styles.d.ts +21 -0
  264. package/lib/types/client/workbuddy/styles.d.ts.map +1 -0
  265. package/lib/types/client/workbuddy/useWorkBuddySection.d.ts +149 -0
  266. package/lib/types/client/workbuddy/useWorkBuddySection.d.ts.map +1 -0
  267. package/lib/types/compat.d.ts +139 -0
  268. package/lib/types/compat.d.ts.map +1 -0
  269. package/lib/types/host/adapter.d.ts +43 -0
  270. package/lib/types/host/adapter.d.ts.map +1 -0
  271. package/lib/types/host/callback-server.d.ts +22 -0
  272. package/lib/types/host/callback-server.d.ts.map +1 -0
  273. package/lib/types/host/claude/account-pool.d.ts +583 -0
  274. package/lib/types/host/claude/account-pool.d.ts.map +1 -0
  275. package/lib/types/host/claude/adapter.d.ts +424 -0
  276. package/lib/types/host/claude/adapter.d.ts.map +1 -0
  277. package/lib/types/host/claude/adopt.d.ts +292 -0
  278. package/lib/types/host/claude/adopt.d.ts.map +1 -0
  279. package/lib/types/host/claude/client.d.ts +579 -0
  280. package/lib/types/host/claude/client.d.ts.map +1 -0
  281. package/lib/types/host/claude/mapper.d.ts +802 -0
  282. package/lib/types/host/claude/mapper.d.ts.map +1 -0
  283. package/lib/types/host/claude/model-catalog.d.ts +560 -0
  284. package/lib/types/host/claude/model-catalog.d.ts.map +1 -0
  285. package/lib/types/host/claude/oauth.d.ts +419 -0
  286. package/lib/types/host/claude/oauth.d.ts.map +1 -0
  287. package/lib/types/host/claude/routes.d.ts +131 -0
  288. package/lib/types/host/claude/routes.d.ts.map +1 -0
  289. package/lib/types/host/claude/token-store.d.ts +347 -0
  290. package/lib/types/host/claude/token-store.d.ts.map +1 -0
  291. package/lib/types/host/claude/types.d.ts +417 -0
  292. package/lib/types/host/claude/types.d.ts.map +1 -0
  293. package/lib/types/host/claude-api/adapter.d.ts +70 -0
  294. package/lib/types/host/claude-api/adapter.d.ts.map +1 -0
  295. package/lib/types/host/claude-api/capability-memory.d.ts +4 -0
  296. package/lib/types/host/claude-api/capability-memory.d.ts.map +1 -0
  297. package/lib/types/host/claude-api/catalog-manager.d.ts +57 -0
  298. package/lib/types/host/claude-api/catalog-manager.d.ts.map +1 -0
  299. package/lib/types/host/claude-api/client-version.d.ts +4 -0
  300. package/lib/types/host/claude-api/client-version.d.ts.map +1 -0
  301. package/lib/types/host/claude-api/client.d.ts +55 -0
  302. package/lib/types/host/claude-api/client.d.ts.map +1 -0
  303. package/lib/types/host/claude-api/compaction-instruction.d.ts +23 -0
  304. package/lib/types/host/claude-api/compaction-instruction.d.ts.map +1 -0
  305. package/lib/types/host/claude-api/compaction-store.d.ts +62 -0
  306. package/lib/types/host/claude-api/compaction-store.d.ts.map +1 -0
  307. package/lib/types/host/claude-api/compaction.d.ts +47 -0
  308. package/lib/types/host/claude-api/compaction.d.ts.map +1 -0
  309. package/lib/types/host/claude-api/mapper.d.ts +61 -0
  310. package/lib/types/host/claude-api/mapper.d.ts.map +1 -0
  311. package/lib/types/host/claude-api/model-catalog.d.ts +76 -0
  312. package/lib/types/host/claude-api/model-catalog.d.ts.map +1 -0
  313. package/lib/types/host/claude-api/routes.d.ts +22 -0
  314. package/lib/types/host/claude-api/routes.d.ts.map +1 -0
  315. package/lib/types/host/claude-api/stream.d.ts +88 -0
  316. package/lib/types/host/claude-api/stream.d.ts.map +1 -0
  317. package/lib/types/host/claude-api/token-store.d.ts +60 -0
  318. package/lib/types/host/claude-api/token-store.d.ts.map +1 -0
  319. package/lib/types/host/claude-api/types.d.ts +68 -0
  320. package/lib/types/host/claude-api/types.d.ts.map +1 -0
  321. package/lib/types/host/cline-pass/account-pool.d.ts +63 -0
  322. package/lib/types/host/cline-pass/account-pool.d.ts.map +1 -0
  323. package/lib/types/host/cline-pass/adapter.d.ts +60 -0
  324. package/lib/types/host/cline-pass/adapter.d.ts.map +1 -0
  325. package/lib/types/host/cline-pass/catalog.d.ts +49 -0
  326. package/lib/types/host/cline-pass/catalog.d.ts.map +1 -0
  327. package/lib/types/host/cline-pass/client.d.ts +109 -0
  328. package/lib/types/host/cline-pass/client.d.ts.map +1 -0
  329. package/lib/types/host/cline-pass/engine.d.ts +93 -0
  330. package/lib/types/host/cline-pass/engine.d.ts.map +1 -0
  331. package/lib/types/host/cline-pass/line.d.ts +55 -0
  332. package/lib/types/host/cline-pass/line.d.ts.map +1 -0
  333. package/lib/types/host/cline-pass/mapper.d.ts +138 -0
  334. package/lib/types/host/cline-pass/mapper.d.ts.map +1 -0
  335. package/lib/types/host/cline-pass/oauth.d.ts +134 -0
  336. package/lib/types/host/cline-pass/oauth.d.ts.map +1 -0
  337. package/lib/types/host/cline-pass/protocol.d.ts +44 -0
  338. package/lib/types/host/cline-pass/protocol.d.ts.map +1 -0
  339. package/lib/types/host/cline-pass/routes.d.ts +92 -0
  340. package/lib/types/host/cline-pass/routes.d.ts.map +1 -0
  341. package/lib/types/host/cline-pass/store.d.ts +75 -0
  342. package/lib/types/host/cline-pass/store.d.ts.map +1 -0
  343. package/lib/types/host/cline-pass/token-store.d.ts +170 -0
  344. package/lib/types/host/cline-pass/token-store.d.ts.map +1 -0
  345. package/lib/types/host/cline-pass/tools.d.ts +21 -0
  346. package/lib/types/host/cline-pass/tools.d.ts.map +1 -0
  347. package/lib/types/host/cline-pass/types.d.ts +127 -0
  348. package/lib/types/host/cline-pass/types.d.ts.map +1 -0
  349. package/lib/types/host/codex-account-pool.d.ts +223 -0
  350. package/lib/types/host/codex-account-pool.d.ts.map +1 -0
  351. package/lib/types/host/codex-adopt.d.ts +255 -0
  352. package/lib/types/host/codex-adopt.d.ts.map +1 -0
  353. package/lib/types/host/codex-catalog.d.ts +69 -0
  354. package/lib/types/host/codex-catalog.d.ts.map +1 -0
  355. package/lib/types/host/codex-fetch.d.ts +17 -0
  356. package/lib/types/host/codex-fetch.d.ts.map +1 -0
  357. package/lib/types/host/codex-file-import.d.ts +35 -0
  358. package/lib/types/host/codex-file-import.d.ts.map +1 -0
  359. package/lib/types/host/codex-identity.d.ts +132 -0
  360. package/lib/types/host/codex-identity.d.ts.map +1 -0
  361. package/lib/types/host/codex-remote-compaction.d.ts +41 -0
  362. package/lib/types/host/codex-remote-compaction.d.ts.map +1 -0
  363. package/lib/types/host/codex-search.d.ts +11 -0
  364. package/lib/types/host/codex-search.d.ts.map +1 -0
  365. package/lib/types/host/command-code/account-pool.d.ts +72 -0
  366. package/lib/types/host/command-code/account-pool.d.ts.map +1 -0
  367. package/lib/types/host/command-code/adapter.d.ts +89 -0
  368. package/lib/types/host/command-code/adapter.d.ts.map +1 -0
  369. package/lib/types/host/command-code/client.d.ts +126 -0
  370. package/lib/types/host/command-code/client.d.ts.map +1 -0
  371. package/lib/types/host/command-code/mapper.d.ts +199 -0
  372. package/lib/types/host/command-code/mapper.d.ts.map +1 -0
  373. package/lib/types/host/command-code/model-catalog.d.ts +90 -0
  374. package/lib/types/host/command-code/model-catalog.d.ts.map +1 -0
  375. package/lib/types/host/command-code/oauth.d.ts +95 -0
  376. package/lib/types/host/command-code/oauth.d.ts.map +1 -0
  377. package/lib/types/host/command-code/plans.d.ts +40 -0
  378. package/lib/types/host/command-code/plans.d.ts.map +1 -0
  379. package/lib/types/host/command-code/routes.d.ts +44 -0
  380. package/lib/types/host/command-code/routes.d.ts.map +1 -0
  381. package/lib/types/host/command-code/token-store.d.ts +100 -0
  382. package/lib/types/host/command-code/token-store.d.ts.map +1 -0
  383. package/lib/types/host/command-code/types.d.ts +222 -0
  384. package/lib/types/host/command-code/types.d.ts.map +1 -0
  385. package/lib/types/host/common/account-pool.d.ts +584 -0
  386. package/lib/types/host/common/account-pool.d.ts.map +1 -0
  387. package/lib/types/host/common/account-quota.d.ts +44 -0
  388. package/lib/types/host/common/account-quota.d.ts.map +1 -0
  389. package/lib/types/host/common/brand-compat.d.ts +4 -0
  390. package/lib/types/host/common/brand-compat.d.ts.map +1 -0
  391. package/lib/types/host/common/cache-activity.d.ts +16 -0
  392. package/lib/types/host/common/cache-activity.d.ts.map +1 -0
  393. package/lib/types/host/common/cache-affinity.d.ts +23 -0
  394. package/lib/types/host/common/cache-affinity.d.ts.map +1 -0
  395. package/lib/types/host/common/cache-hint.d.ts +18 -0
  396. package/lib/types/host/common/cache-hint.d.ts.map +1 -0
  397. package/lib/types/host/common/capabilities.d.ts +100 -0
  398. package/lib/types/host/common/capabilities.d.ts.map +1 -0
  399. package/lib/types/host/common/catalog-snapshot.d.ts +80 -0
  400. package/lib/types/host/common/catalog-snapshot.d.ts.map +1 -0
  401. package/lib/types/host/common/claude-capability-memory.d.ts +51 -0
  402. package/lib/types/host/common/claude-capability-memory.d.ts.map +1 -0
  403. package/lib/types/host/common/claude-code-cch.d.ts +28 -0
  404. package/lib/types/host/common/claude-code-cch.d.ts.map +1 -0
  405. package/lib/types/host/common/claude-code-corrections.d.ts +6 -0
  406. package/lib/types/host/common/claude-code-corrections.d.ts.map +1 -0
  407. package/lib/types/host/common/claude-code-first-party.d.ts +68 -0
  408. package/lib/types/host/common/claude-code-first-party.d.ts.map +1 -0
  409. package/lib/types/host/common/claude-code-version.d.ts +90 -0
  410. package/lib/types/host/common/claude-code-version.d.ts.map +1 -0
  411. package/lib/types/host/common/concurrency-gate.d.ts +46 -0
  412. package/lib/types/host/common/concurrency-gate.d.ts.map +1 -0
  413. package/lib/types/host/common/context-budget-fetch.d.ts +7 -0
  414. package/lib/types/host/common/context-budget-fetch.d.ts.map +1 -0
  415. package/lib/types/host/common/context-overflow.d.ts +7 -0
  416. package/lib/types/host/common/context-overflow.d.ts.map +1 -0
  417. package/lib/types/host/common/context-window-overrides.d.ts +12 -0
  418. package/lib/types/host/common/context-window-overrides.d.ts.map +1 -0
  419. package/lib/types/host/common/credential-read-cache.d.ts +82 -0
  420. package/lib/types/host/common/credential-read-cache.d.ts.map +1 -0
  421. package/lib/types/host/common/credentials-compat.d.ts +73 -0
  422. package/lib/types/host/common/credentials-compat.d.ts.map +1 -0
  423. package/lib/types/host/common/failure-classification.d.ts +21 -0
  424. package/lib/types/host/common/failure-classification.d.ts.map +1 -0
  425. package/lib/types/host/common/file-preferences.d.ts +49 -0
  426. package/lib/types/host/common/file-preferences.d.ts.map +1 -0
  427. package/lib/types/host/common/gpt-engineering-guidance.d.ts +16 -0
  428. package/lib/types/host/common/gpt-engineering-guidance.d.ts.map +1 -0
  429. package/lib/types/host/common/home.d.ts +8 -0
  430. package/lib/types/host/common/home.d.ts.map +1 -0
  431. package/lib/types/host/common/hosted-media.d.ts +36 -0
  432. package/lib/types/host/common/hosted-media.d.ts.map +1 -0
  433. package/lib/types/host/common/i18n/en.d.ts +9 -0
  434. package/lib/types/host/common/i18n/en.d.ts.map +1 -0
  435. package/lib/types/host/common/i18n/index.d.ts +13 -0
  436. package/lib/types/host/common/i18n/index.d.ts.map +1 -0
  437. package/lib/types/host/common/i18n/provider-name.d.ts +10 -0
  438. package/lib/types/host/common/i18n/provider-name.d.ts.map +1 -0
  439. package/lib/types/host/common/i18n/ru.d.ts +10 -0
  440. package/lib/types/host/common/i18n/ru.d.ts.map +1 -0
  441. package/lib/types/host/common/i18n/runtime.d.ts +54 -0
  442. package/lib/types/host/common/i18n/runtime.d.ts.map +1 -0
  443. package/lib/types/host/common/i18n/t.d.ts +38 -0
  444. package/lib/types/host/common/i18n/t.d.ts.map +1 -0
  445. package/lib/types/host/common/i18n/zh.d.ts +172 -0
  446. package/lib/types/host/common/i18n/zh.d.ts.map +1 -0
  447. package/lib/types/host/common/idle-watchdog.d.ts +58 -0
  448. package/lib/types/host/common/idle-watchdog.d.ts.map +1 -0
  449. package/lib/types/host/common/legacy-preferences.d.ts +29 -0
  450. package/lib/types/host/common/legacy-preferences.d.ts.map +1 -0
  451. package/lib/types/host/common/llm-compat.d.ts +157 -0
  452. package/lib/types/host/common/llm-compat.d.ts.map +1 -0
  453. package/lib/types/host/common/model-request-control.d.ts +21 -0
  454. package/lib/types/host/common/model-request-control.d.ts.map +1 -0
  455. package/lib/types/host/common/orphan-tool-calls.d.ts +47 -0
  456. package/lib/types/host/common/orphan-tool-calls.d.ts.map +1 -0
  457. package/lib/types/host/common/output-reservation.d.ts +11 -0
  458. package/lib/types/host/common/output-reservation.d.ts.map +1 -0
  459. package/lib/types/host/common/pool-storage-settings.d.ts +41 -0
  460. package/lib/types/host/common/pool-storage-settings.d.ts.map +1 -0
  461. package/lib/types/host/common/pool-storage.d.ts +143 -0
  462. package/lib/types/host/common/pool-storage.d.ts.map +1 -0
  463. package/lib/types/host/common/prefix-request-coordinator.d.ts +46 -0
  464. package/lib/types/host/common/prefix-request-coordinator.d.ts.map +1 -0
  465. package/lib/types/host/common/prefix-stability.d.ts +24 -0
  466. package/lib/types/host/common/prefix-stability.d.ts.map +1 -0
  467. package/lib/types/host/common/prompt-cache-policy.d.ts +47 -0
  468. package/lib/types/host/common/prompt-cache-policy.d.ts.map +1 -0
  469. package/lib/types/host/common/prompt-estimate.d.ts +22 -0
  470. package/lib/types/host/common/prompt-estimate.d.ts.map +1 -0
  471. package/lib/types/host/common/provider-route.d.ts +56 -0
  472. package/lib/types/host/common/provider-route.d.ts.map +1 -0
  473. package/lib/types/host/common/quota-refresh.d.ts +35 -0
  474. package/lib/types/host/common/quota-refresh.d.ts.map +1 -0
  475. package/lib/types/host/common/reasoning-dialect.d.ts +24 -0
  476. package/lib/types/host/common/reasoning-dialect.d.ts.map +1 -0
  477. package/lib/types/host/common/reasoning-efforts.d.ts +2 -0
  478. package/lib/types/host/common/reasoning-efforts.d.ts.map +1 -0
  479. package/lib/types/host/common/request-diagnostics.d.ts +79 -0
  480. package/lib/types/host/common/request-diagnostics.d.ts.map +1 -0
  481. package/lib/types/host/common/request-images.d.ts +275 -0
  482. package/lib/types/host/common/request-images.d.ts.map +1 -0
  483. package/lib/types/host/common/same-origin.d.ts +30 -0
  484. package/lib/types/host/common/same-origin.d.ts.map +1 -0
  485. package/lib/types/host/common/session-cache-state.d.ts +29 -0
  486. package/lib/types/host/common/session-cache-state.d.ts.map +1 -0
  487. package/lib/types/host/common/session-effort-memory.d.ts +35 -0
  488. package/lib/types/host/common/session-effort-memory.d.ts.map +1 -0
  489. package/lib/types/host/common/settings-compat.d.ts +55 -0
  490. package/lib/types/host/common/settings-compat.d.ts.map +1 -0
  491. package/lib/types/host/common/sticky-image-budget.d.ts +10 -0
  492. package/lib/types/host/common/sticky-image-budget.d.ts.map +1 -0
  493. package/lib/types/host/common/stream-error.d.ts +93 -0
  494. package/lib/types/host/common/stream-error.d.ts.map +1 -0
  495. package/lib/types/host/common/tool-schema.d.ts +27 -0
  496. package/lib/types/host/common/tool-schema.d.ts.map +1 -0
  497. package/lib/types/host/common/video-request.d.ts +81 -0
  498. package/lib/types/host/common/video-request.d.ts.map +1 -0
  499. package/lib/types/host/common/video.d.ts +90 -0
  500. package/lib/types/host/common/video.d.ts.map +1 -0
  501. package/lib/types/host/common/webserver-compat.d.ts +7 -0
  502. package/lib/types/host/common/webserver-compat.d.ts.map +1 -0
  503. package/lib/types/host/credential-store-secret-service.d.ts +66 -0
  504. package/lib/types/host/credential-store-secret-service.d.ts.map +1 -0
  505. package/lib/types/host/fetch-address-policy.d.ts +79 -0
  506. package/lib/types/host/fetch-address-policy.d.ts.map +1 -0
  507. package/lib/types/host/fetch-configuration.d.ts +6 -0
  508. package/lib/types/host/fetch-configuration.d.ts.map +1 -0
  509. package/lib/types/host/glm-coding-plan/account-pool.d.ts +152 -0
  510. package/lib/types/host/glm-coding-plan/account-pool.d.ts.map +1 -0
  511. package/lib/types/host/glm-coding-plan/adapter.d.ts +169 -0
  512. package/lib/types/host/glm-coding-plan/adapter.d.ts.map +1 -0
  513. package/lib/types/host/glm-coding-plan/adopt.d.ts +354 -0
  514. package/lib/types/host/glm-coding-plan/adopt.d.ts.map +1 -0
  515. package/lib/types/host/glm-coding-plan/biz-token-cache.d.ts +99 -0
  516. package/lib/types/host/glm-coding-plan/biz-token-cache.d.ts.map +1 -0
  517. package/lib/types/host/glm-coding-plan/client.d.ts +218 -0
  518. package/lib/types/host/glm-coding-plan/client.d.ts.map +1 -0
  519. package/lib/types/host/glm-coding-plan/exchange.d.ts +223 -0
  520. package/lib/types/host/glm-coding-plan/exchange.d.ts.map +1 -0
  521. package/lib/types/host/glm-coding-plan/mapper-anthropic.d.ts +312 -0
  522. package/lib/types/host/glm-coding-plan/mapper-anthropic.d.ts.map +1 -0
  523. package/lib/types/host/glm-coding-plan/mapper-openai.d.ts +213 -0
  524. package/lib/types/host/glm-coding-plan/mapper-openai.d.ts.map +1 -0
  525. package/lib/types/host/glm-coding-plan/model-catalog.d.ts +241 -0
  526. package/lib/types/host/glm-coding-plan/model-catalog.d.ts.map +1 -0
  527. package/lib/types/host/glm-coding-plan/oauth.d.ts +211 -0
  528. package/lib/types/host/glm-coding-plan/oauth.d.ts.map +1 -0
  529. package/lib/types/host/glm-coding-plan/routes.d.ts +93 -0
  530. package/lib/types/host/glm-coding-plan/routes.d.ts.map +1 -0
  531. package/lib/types/host/glm-coding-plan/token-store.d.ts +202 -0
  532. package/lib/types/host/glm-coding-plan/token-store.d.ts.map +1 -0
  533. package/lib/types/host/glm-coding-plan/types.d.ts +492 -0
  534. package/lib/types/host/glm-coding-plan/types.d.ts.map +1 -0
  535. package/lib/types/host/hub-overview.d.ts +32 -0
  536. package/lib/types/host/hub-overview.d.ts.map +1 -0
  537. package/lib/types/host/kimi-code/account-pool.d.ts +124 -0
  538. package/lib/types/host/kimi-code/account-pool.d.ts.map +1 -0
  539. package/lib/types/host/kimi-code/adapter.d.ts +451 -0
  540. package/lib/types/host/kimi-code/adapter.d.ts.map +1 -0
  541. package/lib/types/host/kimi-code/api-key.d.ts +55 -0
  542. package/lib/types/host/kimi-code/api-key.d.ts.map +1 -0
  543. package/lib/types/host/kimi-code/cache-affinity.d.ts +112 -0
  544. package/lib/types/host/kimi-code/cache-affinity.d.ts.map +1 -0
  545. package/lib/types/host/kimi-code/cache-hint.d.ts +65 -0
  546. package/lib/types/host/kimi-code/cache-hint.d.ts.map +1 -0
  547. package/lib/types/host/kimi-code/client.d.ts +306 -0
  548. package/lib/types/host/kimi-code/client.d.ts.map +1 -0
  549. package/lib/types/host/kimi-code/mapper.d.ts +913 -0
  550. package/lib/types/host/kimi-code/mapper.d.ts.map +1 -0
  551. package/lib/types/host/kimi-code/media-files.d.ts +206 -0
  552. package/lib/types/host/kimi-code/media-files.d.ts.map +1 -0
  553. package/lib/types/host/kimi-code/modalities.d.ts +23 -0
  554. package/lib/types/host/kimi-code/modalities.d.ts.map +1 -0
  555. package/lib/types/host/kimi-code/model-catalog.d.ts +125 -0
  556. package/lib/types/host/kimi-code/model-catalog.d.ts.map +1 -0
  557. package/lib/types/host/kimi-code/oauth.d.ts +213 -0
  558. package/lib/types/host/kimi-code/oauth.d.ts.map +1 -0
  559. package/lib/types/host/kimi-code/routes.d.ts +52 -0
  560. package/lib/types/host/kimi-code/routes.d.ts.map +1 -0
  561. package/lib/types/host/kimi-code/session-cache-state.d.ts +156 -0
  562. package/lib/types/host/kimi-code/session-cache-state.d.ts.map +1 -0
  563. package/lib/types/host/kimi-code/token-store.d.ts +182 -0
  564. package/lib/types/host/kimi-code/token-store.d.ts.map +1 -0
  565. package/lib/types/host/kimi-code/tool-argument-guard.d.ts +43 -0
  566. package/lib/types/host/kimi-code/tool-argument-guard.d.ts.map +1 -0
  567. package/lib/types/host/kimi-code/types.d.ts +458 -0
  568. package/lib/types/host/kimi-code/types.d.ts.map +1 -0
  569. package/lib/types/host/kimi-code/warmup-streak.d.ts +66 -0
  570. package/lib/types/host/kimi-code/warmup-streak.d.ts.map +1 -0
  571. package/lib/types/host/minimax-code/account-pool.d.ts +309 -0
  572. package/lib/types/host/minimax-code/account-pool.d.ts.map +1 -0
  573. package/lib/types/host/minimax-code/adapter.d.ts +207 -0
  574. package/lib/types/host/minimax-code/adapter.d.ts.map +1 -0
  575. package/lib/types/host/minimax-code/checkin-gateway.d.ts +145 -0
  576. package/lib/types/host/minimax-code/checkin-gateway.d.ts.map +1 -0
  577. package/lib/types/host/minimax-code/checkin.d.ts +207 -0
  578. package/lib/types/host/minimax-code/checkin.d.ts.map +1 -0
  579. package/lib/types/host/minimax-code/client.d.ts +242 -0
  580. package/lib/types/host/minimax-code/client.d.ts.map +1 -0
  581. package/lib/types/host/minimax-code/files-api.d.ts +117 -0
  582. package/lib/types/host/minimax-code/files-api.d.ts.map +1 -0
  583. package/lib/types/host/minimax-code/iso-bmff-duration.d.ts +84 -0
  584. package/lib/types/host/minimax-code/iso-bmff-duration.d.ts.map +1 -0
  585. package/lib/types/host/minimax-code/mapper.d.ts +351 -0
  586. package/lib/types/host/minimax-code/mapper.d.ts.map +1 -0
  587. package/lib/types/host/minimax-code/matrix-client.d.ts +168 -0
  588. package/lib/types/host/minimax-code/matrix-client.d.ts.map +1 -0
  589. package/lib/types/host/minimax-code/modalities.d.ts +20 -0
  590. package/lib/types/host/minimax-code/modalities.d.ts.map +1 -0
  591. package/lib/types/host/minimax-code/model-catalog.d.ts +227 -0
  592. package/lib/types/host/minimax-code/model-catalog.d.ts.map +1 -0
  593. package/lib/types/host/minimax-code/oauth.d.ts +220 -0
  594. package/lib/types/host/minimax-code/oauth.d.ts.map +1 -0
  595. package/lib/types/host/minimax-code/reset-card.d.ts +136 -0
  596. package/lib/types/host/minimax-code/reset-card.d.ts.map +1 -0
  597. package/lib/types/host/minimax-code/routes.d.ts +82 -0
  598. package/lib/types/host/minimax-code/routes.d.ts.map +1 -0
  599. package/lib/types/host/minimax-code/token-store.d.ts +328 -0
  600. package/lib/types/host/minimax-code/token-store.d.ts.map +1 -0
  601. package/lib/types/host/minimax-code/tool-argument-repair.d.ts +72 -0
  602. package/lib/types/host/minimax-code/tool-argument-repair.d.ts.map +1 -0
  603. package/lib/types/host/minimax-code/types.d.ts +378 -0
  604. package/lib/types/host/minimax-code/types.d.ts.map +1 -0
  605. package/lib/types/host/model-catalog.d.ts +43 -0
  606. package/lib/types/host/model-catalog.d.ts.map +1 -0
  607. package/lib/types/host/oauth-service.d.ts +242 -0
  608. package/lib/types/host/oauth-service.d.ts.map +1 -0
  609. package/lib/types/host/ollama/account-pool.d.ts +65 -0
  610. package/lib/types/host/ollama/account-pool.d.ts.map +1 -0
  611. package/lib/types/host/ollama/adapter.d.ts +90 -0
  612. package/lib/types/host/ollama/adapter.d.ts.map +1 -0
  613. package/lib/types/host/ollama/client.d.ts +166 -0
  614. package/lib/types/host/ollama/client.d.ts.map +1 -0
  615. package/lib/types/host/ollama/mapper.d.ts +49 -0
  616. package/lib/types/host/ollama/mapper.d.ts.map +1 -0
  617. package/lib/types/host/ollama/routes.d.ts +22 -0
  618. package/lib/types/host/ollama/routes.d.ts.map +1 -0
  619. package/lib/types/host/ollama/token-store.d.ts +78 -0
  620. package/lib/types/host/ollama/token-store.d.ts.map +1 -0
  621. package/lib/types/host/ollama/types.d.ts +247 -0
  622. package/lib/types/host/ollama/types.d.ts.map +1 -0
  623. package/lib/types/host/opencode-go/account-pool.d.ts +50 -0
  624. package/lib/types/host/opencode-go/account-pool.d.ts.map +1 -0
  625. package/lib/types/host/opencode-go/adapter.d.ts +38 -0
  626. package/lib/types/host/opencode-go/adapter.d.ts.map +1 -0
  627. package/lib/types/host/opencode-go/client.d.ts +13 -0
  628. package/lib/types/host/opencode-go/client.d.ts.map +1 -0
  629. package/lib/types/host/opencode-go/mapper-gemini.d.ts +13 -0
  630. package/lib/types/host/opencode-go/mapper-gemini.d.ts.map +1 -0
  631. package/lib/types/host/opencode-go/mapper-messages.d.ts +8 -0
  632. package/lib/types/host/opencode-go/mapper-messages.d.ts.map +1 -0
  633. package/lib/types/host/opencode-go/mapper-responses.d.ts +9 -0
  634. package/lib/types/host/opencode-go/mapper-responses.d.ts.map +1 -0
  635. package/lib/types/host/opencode-go/mapper.d.ts +38 -0
  636. package/lib/types/host/opencode-go/mapper.d.ts.map +1 -0
  637. package/lib/types/host/opencode-go/model-catalog.d.ts +57 -0
  638. package/lib/types/host/opencode-go/model-catalog.d.ts.map +1 -0
  639. package/lib/types/host/opencode-go/native-shared.d.ts +31 -0
  640. package/lib/types/host/opencode-go/native-shared.d.ts.map +1 -0
  641. package/lib/types/host/opencode-go/protocol.d.ts +13 -0
  642. package/lib/types/host/opencode-go/protocol.d.ts.map +1 -0
  643. package/lib/types/host/opencode-go/routes.d.ts +13 -0
  644. package/lib/types/host/opencode-go/routes.d.ts.map +1 -0
  645. package/lib/types/host/opencode-go/token-store.d.ts +29 -0
  646. package/lib/types/host/opencode-go/token-store.d.ts.map +1 -0
  647. package/lib/types/host/opencode-go/types.d.ts +20 -0
  648. package/lib/types/host/opencode-go/types.d.ts.map +1 -0
  649. package/lib/types/host/opendesign/account-pool.d.ts +54 -0
  650. package/lib/types/host/opendesign/account-pool.d.ts.map +1 -0
  651. package/lib/types/host/opendesign/adapter.d.ts +88 -0
  652. package/lib/types/host/opendesign/adapter.d.ts.map +1 -0
  653. package/lib/types/host/opendesign/catalog.d.ts +58 -0
  654. package/lib/types/host/opendesign/catalog.d.ts.map +1 -0
  655. package/lib/types/host/opendesign/client.d.ts +304 -0
  656. package/lib/types/host/opendesign/client.d.ts.map +1 -0
  657. package/lib/types/host/opendesign/line.d.ts +60 -0
  658. package/lib/types/host/opendesign/line.d.ts.map +1 -0
  659. package/lib/types/host/opendesign/mapper.d.ts +218 -0
  660. package/lib/types/host/opendesign/mapper.d.ts.map +1 -0
  661. package/lib/types/host/opendesign/oauth.d.ts +105 -0
  662. package/lib/types/host/opendesign/oauth.d.ts.map +1 -0
  663. package/lib/types/host/opendesign/routes.d.ts +75 -0
  664. package/lib/types/host/opendesign/routes.d.ts.map +1 -0
  665. package/lib/types/host/opendesign/token-store.d.ts +241 -0
  666. package/lib/types/host/opendesign/token-store.d.ts.map +1 -0
  667. package/lib/types/host/opendesign/types.d.ts +235 -0
  668. package/lib/types/host/opendesign/types.d.ts.map +1 -0
  669. package/lib/types/host/platform-token-store.d.ts +3 -0
  670. package/lib/types/host/platform-token-store.d.ts.map +1 -0
  671. package/lib/types/host/preferences.d.ts +26 -0
  672. package/lib/types/host/preferences.d.ts.map +1 -0
  673. package/lib/types/host/proxy-manager.d.ts +261 -0
  674. package/lib/types/host/proxy-manager.d.ts.map +1 -0
  675. package/lib/types/host/qianwen-token-plan/adapter.d.ts +37 -0
  676. package/lib/types/host/qianwen-token-plan/adapter.d.ts.map +1 -0
  677. package/lib/types/host/qianwen-token-plan/cache-stats.d.ts +17 -0
  678. package/lib/types/host/qianwen-token-plan/cache-stats.d.ts.map +1 -0
  679. package/lib/types/host/qianwen-token-plan/client.d.ts +5 -0
  680. package/lib/types/host/qianwen-token-plan/client.d.ts.map +1 -0
  681. package/lib/types/host/qianwen-token-plan/mapper.d.ts +71 -0
  682. package/lib/types/host/qianwen-token-plan/mapper.d.ts.map +1 -0
  683. package/lib/types/host/qianwen-token-plan/model-catalog.d.ts +28 -0
  684. package/lib/types/host/qianwen-token-plan/model-catalog.d.ts.map +1 -0
  685. package/lib/types/host/qianwen-token-plan/routes.d.ts +12 -0
  686. package/lib/types/host/qianwen-token-plan/routes.d.ts.map +1 -0
  687. package/lib/types/host/qianwen-token-plan/token-store.d.ts +56 -0
  688. package/lib/types/host/qianwen-token-plan/token-store.d.ts.map +1 -0
  689. package/lib/types/host/qianwen-token-plan/types.d.ts +13 -0
  690. package/lib/types/host/qianwen-token-plan/types.d.ts.map +1 -0
  691. package/lib/types/host/qoder/account-pool.d.ts +141 -0
  692. package/lib/types/host/qoder/account-pool.d.ts.map +1 -0
  693. package/lib/types/host/qoder/adapter.d.ts +167 -0
  694. package/lib/types/host/qoder/adapter.d.ts.map +1 -0
  695. package/lib/types/host/qoder/adopt.d.ts +146 -0
  696. package/lib/types/host/qoder/adopt.d.ts.map +1 -0
  697. package/lib/types/host/qoder/client.d.ts +323 -0
  698. package/lib/types/host/qoder/client.d.ts.map +1 -0
  699. package/lib/types/host/qoder/cosy.d.ts +173 -0
  700. package/lib/types/host/qoder/cosy.d.ts.map +1 -0
  701. package/lib/types/host/qoder/mapper.d.ts +332 -0
  702. package/lib/types/host/qoder/mapper.d.ts.map +1 -0
  703. package/lib/types/host/qoder/model-catalog.d.ts +231 -0
  704. package/lib/types/host/qoder/model-catalog.d.ts.map +1 -0
  705. package/lib/types/host/qoder/oauth.d.ts +151 -0
  706. package/lib/types/host/qoder/oauth.d.ts.map +1 -0
  707. package/lib/types/host/qoder/routes.d.ts +119 -0
  708. package/lib/types/host/qoder/routes.d.ts.map +1 -0
  709. package/lib/types/host/qoder/token-store.d.ts +280 -0
  710. package/lib/types/host/qoder/token-store.d.ts.map +1 -0
  711. package/lib/types/host/qoder/types.d.ts +262 -0
  712. package/lib/types/host/qoder/types.d.ts.map +1 -0
  713. package/lib/types/host/relayone/account-pool.d.ts +129 -0
  714. package/lib/types/host/relayone/account-pool.d.ts.map +1 -0
  715. package/lib/types/host/relayone/adapter.d.ts +87 -0
  716. package/lib/types/host/relayone/adapter.d.ts.map +1 -0
  717. package/lib/types/host/relayone/catalog-manager.d.ts +45 -0
  718. package/lib/types/host/relayone/catalog-manager.d.ts.map +1 -0
  719. package/lib/types/host/relayone/client.d.ts +5 -0
  720. package/lib/types/host/relayone/client.d.ts.map +1 -0
  721. package/lib/types/host/relayone/mapper-anthropic.d.ts +49 -0
  722. package/lib/types/host/relayone/mapper-anthropic.d.ts.map +1 -0
  723. package/lib/types/host/relayone/mapper-openai.d.ts +36 -0
  724. package/lib/types/host/relayone/mapper-openai.d.ts.map +1 -0
  725. package/lib/types/host/relayone/mapper-shared.d.ts +25 -0
  726. package/lib/types/host/relayone/mapper-shared.d.ts.map +1 -0
  727. package/lib/types/host/relayone/model-catalog.d.ts +70 -0
  728. package/lib/types/host/relayone/model-catalog.d.ts.map +1 -0
  729. package/lib/types/host/relayone/quota.d.ts +29 -0
  730. package/lib/types/host/relayone/quota.d.ts.map +1 -0
  731. package/lib/types/host/relayone/routes.d.ts +33 -0
  732. package/lib/types/host/relayone/routes.d.ts.map +1 -0
  733. package/lib/types/host/relayone/token-store.d.ts +49 -0
  734. package/lib/types/host/relayone/token-store.d.ts.map +1 -0
  735. package/lib/types/host/relayone/types.d.ts +22 -0
  736. package/lib/types/host/relayone/types.d.ts.map +1 -0
  737. package/lib/types/host/responses-client.d.ts +125 -0
  738. package/lib/types/host/responses-client.d.ts.map +1 -0
  739. package/lib/types/host/responses-mapper.d.ts +133 -0
  740. package/lib/types/host/responses-mapper.d.ts.map +1 -0
  741. package/lib/types/host/routes.d.ts +30 -0
  742. package/lib/types/host/routes.d.ts.map +1 -0
  743. package/lib/types/host/search-provider-switcher.d.ts +45 -0
  744. package/lib/types/host/search-provider-switcher.d.ts.map +1 -0
  745. package/lib/types/host/session-title-guard/index.d.ts +80 -0
  746. package/lib/types/host/session-title-guard/index.d.ts.map +1 -0
  747. package/lib/types/host/step-code/account-pool.d.ts +187 -0
  748. package/lib/types/host/step-code/account-pool.d.ts.map +1 -0
  749. package/lib/types/host/step-code/adapter.d.ts +156 -0
  750. package/lib/types/host/step-code/adapter.d.ts.map +1 -0
  751. package/lib/types/host/step-code/adopt.d.ts +201 -0
  752. package/lib/types/host/step-code/adopt.d.ts.map +1 -0
  753. package/lib/types/host/step-code/cache-stats.d.ts +181 -0
  754. package/lib/types/host/step-code/cache-stats.d.ts.map +1 -0
  755. package/lib/types/host/step-code/client.d.ts +339 -0
  756. package/lib/types/host/step-code/client.d.ts.map +1 -0
  757. package/lib/types/host/step-code/mapper.d.ts +305 -0
  758. package/lib/types/host/step-code/mapper.d.ts.map +1 -0
  759. package/lib/types/host/step-code/model-catalog.d.ts +247 -0
  760. package/lib/types/host/step-code/model-catalog.d.ts.map +1 -0
  761. package/lib/types/host/step-code/oauth.d.ts +265 -0
  762. package/lib/types/host/step-code/oauth.d.ts.map +1 -0
  763. package/lib/types/host/step-code/routes.d.ts +129 -0
  764. package/lib/types/host/step-code/routes.d.ts.map +1 -0
  765. package/lib/types/host/step-code/token-store.d.ts +325 -0
  766. package/lib/types/host/step-code/token-store.d.ts.map +1 -0
  767. package/lib/types/host/step-code/types.d.ts +492 -0
  768. package/lib/types/host/step-code/types.d.ts.map +1 -0
  769. package/lib/types/host/token-store-linux.d.ts +20 -0
  770. package/lib/types/host/token-store-linux.d.ts.map +1 -0
  771. package/lib/types/host/token-store-macos.d.ts +39 -0
  772. package/lib/types/host/token-store-macos.d.ts.map +1 -0
  773. package/lib/types/host/token-store-windows.d.ts +26 -0
  774. package/lib/types/host/token-store-windows.d.ts.map +1 -0
  775. package/lib/types/host/token-store.d.ts +81 -0
  776. package/lib/types/host/token-store.d.ts.map +1 -0
  777. package/lib/types/host/usage-service.d.ts +109 -0
  778. package/lib/types/host/usage-service.d.ts.map +1 -0
  779. package/lib/types/host/web-provider-reconciler.d.ts +34 -0
  780. package/lib/types/host/web-provider-reconciler.d.ts.map +1 -0
  781. package/lib/types/host/wire-auth.d.ts +63 -0
  782. package/lib/types/host/wire-auth.d.ts.map +1 -0
  783. package/lib/types/host/workbuddy/account-pool.d.ts +389 -0
  784. package/lib/types/host/workbuddy/account-pool.d.ts.map +1 -0
  785. package/lib/types/host/workbuddy/adapter.d.ts +248 -0
  786. package/lib/types/host/workbuddy/adapter.d.ts.map +1 -0
  787. package/lib/types/host/workbuddy/atrest.d.ts +98 -0
  788. package/lib/types/host/workbuddy/atrest.d.ts.map +1 -0
  789. package/lib/types/host/workbuddy/checkin.d.ts +150 -0
  790. package/lib/types/host/workbuddy/checkin.d.ts.map +1 -0
  791. package/lib/types/host/workbuddy/client.d.ts +214 -0
  792. package/lib/types/host/workbuddy/client.d.ts.map +1 -0
  793. package/lib/types/host/workbuddy/dsml.d.ts +55 -0
  794. package/lib/types/host/workbuddy/dsml.d.ts.map +1 -0
  795. package/lib/types/host/workbuddy/guardrails.d.ts +111 -0
  796. package/lib/types/host/workbuddy/guardrails.d.ts.map +1 -0
  797. package/lib/types/host/workbuddy/identity.d.ts +71 -0
  798. package/lib/types/host/workbuddy/identity.d.ts.map +1 -0
  799. package/lib/types/host/workbuddy/mapper.d.ts +238 -0
  800. package/lib/types/host/workbuddy/mapper.d.ts.map +1 -0
  801. package/lib/types/host/workbuddy/model-catalog.d.ts +239 -0
  802. package/lib/types/host/workbuddy/model-catalog.d.ts.map +1 -0
  803. package/lib/types/host/workbuddy/oauth.d.ts +47 -0
  804. package/lib/types/host/workbuddy/oauth.d.ts.map +1 -0
  805. package/lib/types/host/workbuddy/outbound-identity.d.ts +139 -0
  806. package/lib/types/host/workbuddy/outbound-identity.d.ts.map +1 -0
  807. package/lib/types/host/workbuddy/routes.d.ts +56 -0
  808. package/lib/types/host/workbuddy/routes.d.ts.map +1 -0
  809. package/lib/types/host/workbuddy/token-store.d.ts +370 -0
  810. package/lib/types/host/workbuddy/token-store.d.ts.map +1 -0
  811. package/lib/types/host/workbuddy/types.d.ts +185 -0
  812. package/lib/types/host/workbuddy/types.d.ts.map +1 -0
  813. package/lib/types/index.d.ts +248 -0
  814. package/lib/types/index.d.ts.map +1 -0
  815. package/lib/types/shared/account-pool-contracts.d.ts +99 -0
  816. package/lib/types/shared/account-pool-contracts.d.ts.map +1 -0
  817. package/lib/types/shared/claude-api-contracts.d.ts +98 -0
  818. package/lib/types/shared/claude-api-contracts.d.ts.map +1 -0
  819. package/lib/types/shared/claude-contracts.d.ts +370 -0
  820. package/lib/types/shared/claude-contracts.d.ts.map +1 -0
  821. package/lib/types/shared/cline-pass-contracts.d.ts +234 -0
  822. package/lib/types/shared/cline-pass-contracts.d.ts.map +1 -0
  823. package/lib/types/shared/command-code-contracts.d.ts +163 -0
  824. package/lib/types/shared/command-code-contracts.d.ts.map +1 -0
  825. package/lib/types/shared/contracts.d.ts +343 -0
  826. package/lib/types/shared/contracts.d.ts.map +1 -0
  827. package/lib/types/shared/glm-coding-plan-contracts.d.ts +315 -0
  828. package/lib/types/shared/glm-coding-plan-contracts.d.ts.map +1 -0
  829. package/lib/types/shared/hub-contracts.d.ts +37 -0
  830. package/lib/types/shared/hub-contracts.d.ts.map +1 -0
  831. package/lib/types/shared/i18n-contracts.d.ts +35 -0
  832. package/lib/types/shared/i18n-contracts.d.ts.map +1 -0
  833. package/lib/types/shared/kimi-code-contracts.d.ts +435 -0
  834. package/lib/types/shared/kimi-code-contracts.d.ts.map +1 -0
  835. package/lib/types/shared/minimax-code-contracts.d.ts +263 -0
  836. package/lib/types/shared/minimax-code-contracts.d.ts.map +1 -0
  837. package/lib/types/shared/model-catalog.d.ts +302 -0
  838. package/lib/types/shared/model-catalog.d.ts.map +1 -0
  839. package/lib/types/shared/ollama-contracts.d.ts +73 -0
  840. package/lib/types/shared/ollama-contracts.d.ts.map +1 -0
  841. package/lib/types/shared/opencode-go-contracts.d.ts +80 -0
  842. package/lib/types/shared/opencode-go-contracts.d.ts.map +1 -0
  843. package/lib/types/shared/opendesign-contracts.d.ts +262 -0
  844. package/lib/types/shared/opendesign-contracts.d.ts.map +1 -0
  845. package/lib/types/shared/preferences.d.ts +60 -0
  846. package/lib/types/shared/preferences.d.ts.map +1 -0
  847. package/lib/types/shared/qianwen-token-plan-contracts.d.ts +94 -0
  848. package/lib/types/shared/qianwen-token-plan-contracts.d.ts.map +1 -0
  849. package/lib/types/shared/qoder-contracts.d.ts +342 -0
  850. package/lib/types/shared/qoder-contracts.d.ts.map +1 -0
  851. package/lib/types/shared/relayone-contracts.d.ts +95 -0
  852. package/lib/types/shared/relayone-contracts.d.ts.map +1 -0
  853. package/lib/types/shared/step-code-contracts.d.ts +443 -0
  854. package/lib/types/shared/step-code-contracts.d.ts.map +1 -0
  855. package/lib/types/shared/workbuddy-contracts.d.ts +531 -0
  856. package/lib/types/shared/workbuddy-contracts.d.ts.map +1 -0
  857. package/package.json +147 -4
@@ -0,0 +1,584 @@
1
+ import { type CredentialStore } from '../token-store.ts';
2
+ import { type ProbeableKeyringStore } from './pool-storage.ts';
3
+ import type { AccountAuthStatus, AccountRotationStrategy, PoolAccountSummaryDto } from '../../shared/account-pool-contracts.ts';
4
+ import type { PoolStorageDto, PoolStorageMode } from '../../shared/contracts.ts';
5
+ /** Refresh an access token this many milliseconds before it expires. */
6
+ export declare const POOL_REFRESH_MARGIN_MS = 60000;
7
+ /** Accounts a single pool may hold before `addAccount` refuses another one. */
8
+ export declare const DEFAULT_MAX_POOL_ACCOUNTS = 20;
9
+ /**
10
+ * A new account would exceed the configured pool capacity.
11
+ *
12
+ * Its own class so a caller can tell "no room" from "the write failed": a batch
13
+ * import answers 409 for the former and must not leave the user believing their
14
+ * file was broken.
15
+ */
16
+ export declare class AccountPoolCapacityError extends Error {
17
+ }
18
+ /**
19
+ * The parts of a pooled account every provider line agrees on.
20
+ *
21
+ * A provider's own account type extends this with whatever non-secret display
22
+ * facts its card renders (project id, key name, region, plan …).
23
+ */
24
+ export interface PoolAccountShape<TCredentials> {
25
+ id: string;
26
+ alias: string;
27
+ credentials: TCredentials;
28
+ addedAt: number;
29
+ lastUsedAt?: number;
30
+ isPrimary?: boolean;
31
+ cooldownUntil?: number;
32
+ cooldownReason?: string;
33
+ authStatus?: AccountAuthStatus;
34
+ authFailedReason?: string;
35
+ }
36
+ /** One provider's whole pool document, as it lives in encrypted storage. */
37
+ export interface PoolData<TAccount> {
38
+ version: 1;
39
+ activeAccountId?: string;
40
+ rotationStrategy: AccountRotationStrategy;
41
+ accounts: TAccount[];
42
+ }
43
+ /** Everything the core hands a provider hook that mints an account record. */
44
+ export interface PoolAccountInput<TCredentials, TAccount> {
45
+ id: string;
46
+ alias: string;
47
+ credentials: TCredentials;
48
+ addedAt: number;
49
+ isPrimary: boolean;
50
+ /** The account this one replaces, when the dedupe key already exists. */
51
+ existing?: TAccount;
52
+ }
53
+ /**
54
+ * What one refresh is allowed to spend, as the caller states it.
55
+ *
56
+ * A refresh that fails transiently is normally retried inside the provider's
57
+ * own OAuth layer, and that layer has its own default budget. A caller that
58
+ * ALREADY owns a retry loop must be able to say so: when the harness retries a
59
+ * model request, an inner retry loop multiplies the two budgets, so one
60
+ * upstream hiccup costs the service several times more requests than the
61
+ * caller ever intended.
62
+ *
63
+ * The field is optional everywhere it appears. An absent budget means the
64
+ * provider's own default, so every existing call keeps its behaviour.
65
+ */
66
+ export interface AccountPoolRefreshOptions {
67
+ /**
68
+ * How many attempts one refresh gets, including the first.
69
+ *
70
+ * A positive integer. Absent means the provider's default.
71
+ */
72
+ maxAttempts?: number;
73
+ }
74
+ /**
75
+ * Routing preference a caller states for ONE request, ahead of the strategy.
76
+ *
77
+ * Rotation is a pool-wide decision, but some reasons to prefer an account
78
+ * belong to a single request: a provider that caches prompt prefixes keeps one
79
+ * cache per account, so the account that already answered this exact prefix
80
+ * answers it cheaper than one that has never seen it. The core cannot know
81
+ * that — it never sees prompt content — so the caller names the accounts it
82
+ * would rather use and the core honours the order while they stay eligible.
83
+ *
84
+ * Absent, empty, or entirely ineligible: the rotation strategy runs exactly as
85
+ * it did before, so a line that never passes a hint behaves identically.
86
+ */
87
+ export interface AccountSelectionHint {
88
+ /**
89
+ * Account ids to try first, in order of preference.
90
+ *
91
+ * Order expresses preference, not permission: an id that is not in the pool,
92
+ * is cooling down, has a rejected credential or was already tried in this
93
+ * request is skipped, and when every id is skipped the strategy decides.
94
+ */
95
+ readonly preferAccountIds?: readonly string[];
96
+ }
97
+ /**
98
+ * Provider-specific behaviour of one account pool.
99
+ *
100
+ * The storage, serialization, eligibility, rotation and cooldown rules live in
101
+ * {@link AccountPoolCore}; only these hooks differ per provider line.
102
+ */
103
+ export interface AccountPoolHooks<TCredentials, TAccount extends PoolAccountShape<TCredentials>, TSummary extends PoolAccountSummaryDto> {
104
+ /** Provider id used in storage descriptions and diagnostics. */
105
+ providerId: string;
106
+ /** Human label used in the messages the core raises. */
107
+ displayName: string;
108
+ /** Plaintext path of the pool file; the encrypted variants derive from it. */
109
+ poolFile: string;
110
+ /** Keychain / Secret Service service name on macOS and Linux. */
111
+ keychainService: string;
112
+ /** Validate and normalize one whole pool document. */
113
+ parsePoolData(value: unknown): PoolData<TAccount>;
114
+ /** Mint an account record; the core only decides id, alias and primary flag. */
115
+ createAccount(input: PoolAccountInput<TCredentials, TAccount>): TAccount;
116
+ /** Identity two credentials share when they are the same upstream account. */
117
+ dedupeKey?(credentials: TCredentials): string | undefined;
118
+ /**
119
+ * Stable id to store a new account under, instead of a generated one.
120
+ *
121
+ * A provider that already keys its accounts by a public, non-secret identity
122
+ * (one that its stored settings also reference) returns that key here. Doing
123
+ * so keeps every id the settings card sends back — a pinned account, a hidden
124
+ * account — meaningful to the pool without a translation layer or a migration.
125
+ */
126
+ accountId?(credentials: TCredentials): string | undefined;
127
+ /** Alias for an account whose credentials name nothing the user would recognize. */
128
+ defaultAlias(credentials: TCredentials, position: number): string;
129
+ /** Unix milliseconds the access token expires; absent for a non-expiring key. */
130
+ expiresAt?(credentials: TCredentials): number | undefined;
131
+ /** Whether the credential must be refreshed before the next request. */
132
+ needsRefresh?(credentials: TCredentials, now: number): boolean;
133
+ /**
134
+ * Refresh one credential, returning the value to persist back into the pool.
135
+ *
136
+ * The attempt budget the caller stated arrives as the third argument. It is
137
+ * absent when the caller expressed none, and a hook that ignores it keeps
138
+ * whatever budget its own provider defaults to.
139
+ */
140
+ refresh?(credentials: TCredentials, fetchFn: typeof fetch, options?: AccountPoolRefreshOptions): Promise<TCredentials>;
141
+ /**
142
+ * Classify a failed refresh.
143
+ *
144
+ * Returning a status takes that account out of rotation (it is kept, so a new
145
+ * sign-in restores it) and lets the next eligible account serve the request.
146
+ * Returning undefined lets the refresh error surface: a transient failure
147
+ * must not cost an account its place in the pool.
148
+ */
149
+ refreshFailureStatus?(error: unknown): AccountAuthStatus | undefined;
150
+ /**
151
+ * Reason the stored credential is already known to be unusable (a rejected
152
+ * refresh token, for instance). Reported purely: nothing is written here.
153
+ */
154
+ authRejectedReason?(credentials: TCredentials): string | undefined;
155
+ /**
156
+ * Best-effort repair for an account the pool no longer owns.
157
+ *
158
+ * The pool holds a COPY of an account's credential when one was adopted from
159
+ * another application, and a copy can go stale: the moment either side rotates,
160
+ * the refresh token the pool holds is spent. Recovery is not a refresh (that
161
+ * would spend the dead token again) but a re-read of the authority, keeping the
162
+ * authoritative copy only when it still describes the same account.
163
+ *
164
+ * Returning null means "no newer authority"; the pool then leaves the row alone.
165
+ * Absent means the provider keeps no external authority at all.
166
+ *
167
+ * The "has it moved on" test belongs to the provider, which knows what identity
168
+ * means for its credential: the core only asks for the authority and lets the
169
+ * provider decide whether it is a newer state of the same account.
170
+ */
171
+ liveCredentialsFor?(account: TAccount): Promise<{
172
+ credentials: TCredentials;
173
+ advanced: boolean;
174
+ } | null>;
175
+ /**
176
+ * Best-effort, local-store synchronization after a credential commit.
177
+ *
178
+ * Runs under the pool lock and only once the pool write is verified, so a
179
+ * provider mirror can never get ahead of the pool. It must not re-enter the
180
+ * pool, and a failure is swallowed: the committed pool is the authority.
181
+ */
182
+ credentialsCommitted?(account: TAccount): Promise<void>;
183
+ /** Pre-pool single credential, projected as the primary account on read. */
184
+ legacyAccount?(): Promise<TAccount | null>;
185
+ /** Mirror the primary account into the single-credential store; `null` clears it. */
186
+ mirrorPrimary?(credentials: TCredentials | null): Promise<void>;
187
+ /**
188
+ * Add the provider's own display facts (project id, key name, region …) to
189
+ * the shared summary the core already filled in.
190
+ */
191
+ extendSummary?(account: TAccount, base: PoolAccountSummaryDto, now: number): TSummary;
192
+ /** Message raised when the pool holds no account at all. */
193
+ emptyMessage?: string;
194
+ /**
195
+ * Message raised when every account is cooling down or unusable.
196
+ *
197
+ * `waitMinutes` is null when NOTHING is cooling down: the caller then knows no
198
+ * reset instant was measured and must not name one.
199
+ */
200
+ allUnavailableMessage?(count: number, waitMinutes: number | null): string;
201
+ /**
202
+ * Message raised when every unusable account is unusable because its
203
+ * credential was rejected, and nothing is cooling down.
204
+ *
205
+ * Separate from {@link allUnavailableMessage} because the two conditions need
206
+ * opposite actions: waiting versus signing in again. Reporting a rejected pool
207
+ * as "rate limited, try again in N minutes" sent people to wait out a cooldown
208
+ * that never started and would never end.
209
+ */
210
+ allAuthFailedMessage?(count: number): string;
211
+ /** Accounts this pool accepts; defaults to {@link DEFAULT_MAX_POOL_ACCOUNTS}. */
212
+ maxAccounts?: number;
213
+ /**
214
+ * Account the user pinned in settings, or null/absent for automatic choice.
215
+ *
216
+ * When set and the account is eligible, it is chosen ahead of the rotation
217
+ * strategy; when it is ineligible the automatic choice takes over rather than
218
+ * failing the request, because a pinned account that is cooling down must not
219
+ * take the line offline.
220
+ */
221
+ preferAccountId?(): string | null;
222
+ /** Test seam; production resolves the backend from the paths above. */
223
+ backend?: CredentialStore<PoolData<TAccount>>;
224
+ /**
225
+ * Backend the test seam above stands in for, reported by {@link AccountPoolCore.poolStorage}.
226
+ *
227
+ * Only meaningful together with {@link backend}: a caller that supplies its own
228
+ * store has already made the choice, and the card must be told what that choice
229
+ * is instead of being shown the platform default.
230
+ */
231
+ storage?: PoolStorageDto;
232
+ /** Override of the deployment-wide `poolStorage`, for one pool. */
233
+ poolStorage?: PoolStorageMode;
234
+ /** Platform the backend is resolved for; defaults to `process.platform`, pinned in tests. */
235
+ platform?: NodeJS.Platform;
236
+ /** Test seam: the keyring the `keyring` backend probes, instead of the real `secret-tool`. */
237
+ keyring?: ProbeableKeyringStore<PoolData<TAccount>>;
238
+ }
239
+ /** Accept a stored rotation strategy, or fall back to sequential. */
240
+ export declare function normalizeRotationStrategy(value: unknown): AccountRotationStrategy;
241
+ /**
242
+ * Stable keychain account name for one pool file, isolated per `DSH_HOME`.
243
+ *
244
+ * A bare sha256 hex digest: that is what the Secret Service entry, the DPAPI file
245
+ * suffix and the Keychain account all address, and what survives a restart. It is
246
+ * NOT a legal credential-record id on its own — see `poolRecordKey` in
247
+ * `pool-storage.ts`, which prefixes it — so nothing may hand this value to the
248
+ * `ctx.credentials` seam directly.
249
+ */
250
+ export declare function poolCredentialAccount(filePath: string): string;
251
+ /**
252
+ * How long a pool store resolved as unusable is trusted before it is probed again.
253
+ *
254
+ * Short enough that unlocking the keyring is picked up by the next card refresh,
255
+ * long enough that a burst of requests against a host with no keyring launches
256
+ * one probe rather than one per request.
257
+ */
258
+ export declare const UNUSABLE_BACKEND_RETRY_MS = 5000;
259
+ /**
260
+ * The shared multi-account pool: encrypted storage, eligibility filtering,
261
+ * rotation strategy, 429 cooldowns and per-account auth failures.
262
+ *
263
+ * @typeParam TCredentials - the provider's stored credential shape.
264
+ * @typeParam TAccount - the provider's pooled account record.
265
+ * @typeParam TSummary - the public DTO the settings card renders.
266
+ */
267
+ export declare class AccountPoolCore<TCredentials, TAccount extends PoolAccountShape<TCredentials>, TSummary extends PoolAccountSummaryDto> {
268
+ protected readonly hooks: AccountPoolHooks<TCredentials, TAccount, TSummary>;
269
+ private readonly filePath;
270
+ /** The resolved backend, and the promise that resolves it (see {@link backendStore}). */
271
+ private readonly backendRef;
272
+ private backendPromise?;
273
+ /** Choice revision {@link backendPromise} was resolved under. */
274
+ private backendRevision;
275
+ /** When an unusable or failed resolution may be probed again (see {@link backendStore}). */
276
+ private backendRetryAt;
277
+ /**
278
+ * Bumped by every write that can move which account serves a request.
279
+ *
280
+ * Reading it costs nothing — unlike {@link read}, which decrypts the pool file
281
+ * (a DPAPI unprotect through a spawned `powershell.exe` on Windows, ~200 ms).
282
+ * A cache that must not report one account's data under another account's name
283
+ * can therefore invalidate on identity change without paying a credential read
284
+ * to discover it.
285
+ */
286
+ /** Pool-file identity of this instance: locks, revisions and flights key on it. */
287
+ private readonly operationKey;
288
+ constructor(hooks: AccountPoolHooks<TCredentials, TAccount, TSummary>);
289
+ /**
290
+ * A cheap, in-memory revision of the pool's serving identity.
291
+ *
292
+ * Compared against a previously observed value to detect an account change
293
+ * without decrypting the pool file. Every mutating write advances it, because
294
+ * which account a request resolves to depends on more than membership:
295
+ * eligibility reads `authStatus` and `cooldownUntil`, and the rotation
296
+ * strategy reads `isPrimary`, `activeAccountId` and `lastUsedAt`. All of
297
+ * those are written through {@link write}, so bumping it there covers every
298
+ * one of them without having to enumerate them per mutator.
299
+ * Over-invalidating only costs one credential read, while under-invalidating
300
+ * would report one account's usage under another account's name.
301
+ */
302
+ currentIdentityRevision(): number;
303
+ /**
304
+ * Human description of where this pool's credentials live.
305
+ *
306
+ * Derived from the backend that was resolved, not from the platform: on a
307
+ * server that answered `poolStorage` with the credential store or a file, the
308
+ * old sentence named a keyring entry that does not exist.
309
+ */
310
+ path(): string;
311
+ /**
312
+ * The backend holding this pool, and why it was chosen, for the settings surface.
313
+ *
314
+ * Resolves the store on first call, exactly as a read does: a card opened before
315
+ * any request has to be able to answer "where are my accounts?" as well.
316
+ */
317
+ poolStorage(): Promise<PoolStorageDto | undefined>;
318
+ /**
319
+ * The pool store: re-resolved when the setting changes, or when it was unusable.
320
+ *
321
+ * Lazy because the choice is a question about the host — does the keyring answer
322
+ * — and a pool is built from a constructor, which cannot await. A USABLE store is
323
+ * cached for the life of the process: re-detecting it per model request would pay
324
+ * a `secret-tool` launch per request, and could hand one turn two stores. An
325
+ * UNUSABLE one is not: a keyring that was locked or not yet up when the host
326
+ * started would otherwise hide every account until the setting changed, so it
327
+ * is probed again once {@link UNUSABLE_BACKEND_RETRY_MS} has passed.
328
+ */
329
+ private backendStore;
330
+ private resolveBackend;
331
+ /**
332
+ * Queue one storage transaction for this pool file.
333
+ *
334
+ * NOT reentrant: a transaction must use {@link loadPoolData} and
335
+ * {@link updatePool} rather than calling the public read/write methods.
336
+ */
337
+ private serialize;
338
+ private saveVerified;
339
+ /**
340
+ * Read the pool.
341
+ *
342
+ * A pool that holds no account yet projects the pre-pool single credential as
343
+ * the primary account. That projection stays side-effect free on purpose:
344
+ * every caller that changes the pool writes it back immediately afterwards,
345
+ * so persisting it here only bought an extra encrypted round trip and made a
346
+ * getter write to disk.
347
+ */
348
+ read(): Promise<PoolData<TAccount>>;
349
+ /**
350
+ * Load the pool without holding the file lock.
351
+ *
352
+ * Providers override this to maintain their own in-memory indexes, so every
353
+ * load — including one inside {@link updatePool} — refreshes them.
354
+ */
355
+ protected loadPoolData(): Promise<PoolData<TAccount>>;
356
+ private persistPoolData;
357
+ /**
358
+ * Replace the whole document (initialization, import), NOT a read-modify-write.
359
+ * Prefer {@link updatePool} for mutations so the draft is read under the lock.
360
+ */
361
+ write(data: PoolData<TAccount>): Promise<void>;
362
+ /**
363
+ * Read the LATEST document, mutate it and persist it as one file transaction.
364
+ *
365
+ * This is the whole fix for the read-modify-write race: the old shape read a
366
+ * snapshot, awaited (a token refresh, a settings write, an encrypted round
367
+ * trip) and then wrote that whole stale snapshot back, erasing whatever landed
368
+ * in between — including another account's freshly rotated token.
369
+ *
370
+ * The callback runs under the file lock, so it must not call read, write or
371
+ * updatePool (the lock is not reentrant) and must not do network I/O.
372
+ * Provider-local stores belong in `afterCommit`, which runs only once the
373
+ * pool write is verified, and must not re-enter the pool either.
374
+ */
375
+ protected updatePool<T>(mutate: (data: PoolData<TAccount>) => T | Promise<T>, afterCommit?: (data: PoolData<TAccount>, result: T) => Promise<void>): Promise<T>;
376
+ /**
377
+ * Public summaries of a document the caller already read.
378
+ *
379
+ * A caller that needs both the rows and which one would serve the next
380
+ * request must not read the pool twice: the two reads can straddle a write,
381
+ * and the answer would then name one account while listing another
382
+ * generation's state. Reading is not free either — an encrypted round trip,
383
+ * a DPAPI unprotect on Windows.
384
+ */
385
+ summariesOf(data: PoolData<TAccount>): TSummary[];
386
+ /** Public summaries, with cooldowns that already expired reported as absent. */
387
+ listAccounts(): Promise<TSummary[]>;
388
+ protected summarize(account: TAccount, now: number): TSummary;
389
+ /** Add or re-authorize one account; an existing dedupe key updates in place. */
390
+ addAccount(credentials: TCredentials, alias?: string): Promise<TAccount>;
391
+ /**
392
+ * Add or re-authorize inside an existing transaction.
393
+ *
394
+ * Capacity, dedupe and the primary decision are all taken against the live
395
+ * document, so two simultaneous sign-ins cannot each pass a check the other
396
+ * has already invalidated.
397
+ */
398
+ protected addAccountToPool(data: PoolData<TAccount>, credentials: TCredentials, alias?: string): TAccount;
399
+ setPrimary(accountId: string): Promise<void>;
400
+ /**
401
+ * Persist a refreshed credential for one account.
402
+ *
403
+ * `expected` makes this a conditional write: when the stored credential is
404
+ * no longer the one the caller started from, something newer won the race (a
405
+ * re-login, a rotation committed while this call was in flight) and the
406
+ * latest row is returned WITHOUT being overwritten. A deleted account is
407
+ * never brought back.
408
+ *
409
+ * Used by a forced refresh (a 401 mid-request) rather than by the rotating
410
+ * getEffectiveAccount path, which refreshes through its own single-flight.
411
+ */
412
+ updateAccountCredentials(accountId: string, credentials: TCredentials, expected?: TCredentials): Promise<TAccount | undefined>;
413
+ setAlias(accountId: string, alias: string): Promise<void>;
414
+ deleteAccount(accountId: string): Promise<void>;
415
+ /**
416
+ * Remove one account inside a transaction.
417
+ *
418
+ * Provider refusal rules (a snapshot this plugin does not own, a desktop
419
+ * account it may only hide) belong in an override of this, so the check and
420
+ * the removal cannot be separated by a concurrent change.
421
+ */
422
+ protected deleteAccountFromPool(data: PoolData<TAccount>, accountId: string): void;
423
+ setStrategy(strategy: AccountRotationStrategy): Promise<void>;
424
+ /** Cool one account down after an upstream 429. */
425
+ markCooldown(accountId: string, durationMs: number, reason: string): Promise<void>;
426
+ clearCooldown(accountId: string): Promise<void>;
427
+ /**
428
+ * Record that an account can no longer authenticate.
429
+ *
430
+ * The account stays in the pool: signing in again is what restores it, and a
431
+ * deleted account would take the user's alias and ordering with it.
432
+ */
433
+ markAuthFailed(accountId: string, reason: string, status?: AccountAuthStatus): Promise<void>;
434
+ clearAuthFailed(accountId: string): Promise<void>;
435
+ /** Whether an account may serve a request right now. */
436
+ protected isEligible(account: TAccount, now: number, triedAccountIds?: ReadonlySet<string>): boolean;
437
+ hasAnotherAvailableAccount(triedAccountIds: ReadonlySet<string>): Promise<boolean>;
438
+ /**
439
+ * Read one account's credential for work that is *not* a metered model
440
+ * request, without letting rotation state stand in the way.
441
+ *
442
+ * There are two different questions, and conflating them broke both:
443
+ *
444
+ * - "which account should serve this request?" — a routing decision, answered
445
+ * by {@link getEffectiveAccount} through cooldowns, auth status and the
446
+ * rotation strategy.
447
+ * - "may I have a usable ChatGPT credential?" — a credential question, asked
448
+ * by the web search, web fetch and image tools.
449
+ *
450
+ * A spent Codex rate-limit window says nothing about the other ChatGPT
451
+ * endpoints: search, fetch and image generation are not metered against it and
452
+ * keep working with the very same token. Routing those tools through
453
+ * {@link getEffectiveAccount} made one exhausted window fail all of them —
454
+ * and reported it as "credentials are required", which sent people looking for
455
+ * a sign-in problem they did not have.
456
+ *
457
+ * A credential that is *known* to be unusable is still refused (a rejected
458
+ * refresh token, an account the upstream already rejected at sign-in); only
459
+ * cooldowns — which are rotation bookkeeping — are ignored.
460
+ *
461
+ * @param fetchFn - fetch used if the credential is close to expiry.
462
+ */
463
+ getCredentialAccount(fetchFn?: typeof fetch, forceRefresh?: boolean): Promise<{
464
+ account: TAccount;
465
+ credentials: TCredentials;
466
+ }>;
467
+ /**
468
+ * Refresh one named account's credential for a caller that is not a metered
469
+ * model request.
470
+ *
471
+ * The settings card is what this exists for. It addresses an account by id
472
+ * rather than taking a rotation slot, and it used to hand the stored
473
+ * credential to the provider unchanged; with a 15-minute access token that
474
+ * meant a card opened more than a quarter of an hour after the last model
475
+ * request sent an expired bearer to the usage endpoint and was answered with
476
+ * 401 — "sign in again" for a credential that a plain refresh would have
477
+ * renewed.
478
+ *
479
+ * Rotation bookkeeping is deliberately ignored, matching
480
+ * {@link getCredentialAccount}: a cooldown or a pinned account describes
481
+ * routing, not whether the credential can be read. A credential the provider
482
+ * has already declared unusable is still refused, because refreshing it
483
+ * cannot succeed.
484
+ *
485
+ * @param accountId - the pool account to read, or undefined for the primary.
486
+ * @param fetchFn - fetch used by the provider's token refresh.
487
+ */
488
+ getFreshCredential(accountId?: string, fetchFn?: typeof fetch): Promise<TCredentials>;
489
+ /**
490
+ * Renew one account's credential unconditionally.
491
+ *
492
+ * This is the answer to a 401 that the local clock did not predict: an access
493
+ * token can be revoked upstream or rotated by another holder while it still
494
+ * looks unexpired, and only the service's own refusal says so. Renewing it is
495
+ * what separates that from a credential that genuinely needs a new sign-in.
496
+ */
497
+ renewCredential(accountId?: string, fetchFn?: typeof fetch, expected?: TCredentials): Promise<TCredentials>;
498
+ /**
499
+ * Resolve, and if needed renew, one account's credential.
500
+ *
501
+ * With no id the account that would serve the next request is used — the
502
+ * active one, then the primary, then the first — because a caller that does
503
+ * not name an account (the catalog loader) still has to present the
504
+ * credential that is actually in play.
505
+ */
506
+ private credentialFor;
507
+ /**
508
+ * Return one account's current row, refreshing it at most once per generation.
509
+ *
510
+ * Shared by every entry point — routing, auxiliary tools, the settings card
511
+ * and forced renewals — across all instances of the pool file, because a
512
+ * rotating refresh token may be spent once: two parallel exchanges both fail,
513
+ * and the losing one gets recorded as a dead sign-in.
514
+ *
515
+ * Reading the current generation and registering/joining its flight happen in
516
+ * one short transaction, so a commit cannot slip between the two decisions.
517
+ * The network call is fired AFTER the lock is released, and the plan returned
518
+ * from the lock is a plain value: awaiting a flight while holding the lock
519
+ * would deadlock that flight's own commit.
520
+ */
521
+ private freshAccount;
522
+ /**
523
+ * Refresh one account: network outside the lock, then a conditional commit.
524
+ *
525
+ * Every write-back is checked against the credential the refresh started from,
526
+ * which is what keeps a late response from restoring a spent token over a
527
+ * re-login, and keeps a deleted account from coming back.
528
+ */
529
+ private refreshAccount;
530
+ private assertUsableAccount;
531
+ /** Whether one account's credential must be refreshed before it is handed out. */
532
+ private shouldRefreshCredential;
533
+ /**
534
+ * Whether an account's stored credential is known to be unusable.
535
+ *
536
+ * Rotation bookkeeping — cooldowns, the tried set — is deliberately absent:
537
+ * those describe routing, not the credential.
538
+ */
539
+ protected isCredentialUsable(account: TAccount): boolean;
540
+ /** The account a rotation strategy picks out of an already-eligible set. */
541
+ private selectAccount;
542
+ /**
543
+ * The error every-account-unavailable raises.
544
+ *
545
+ * WHICH unavailable state this is decides both the code and the sentence, and
546
+ * the two are not interchangeable:
547
+ *
548
+ * - Nothing cooling down, and every row unusable because its credential was
549
+ * rejected: this is a sign-in problem. Reported as `AUTH` with the sign-in
550
+ * remedy. The previous form called it a rate limit and invented "wait 15
551
+ * minutes" on top, because the shortest-cooldown scan below finds nothing
552
+ * when nothing is cooling down and fell back to a hardcoded 15. The user was
553
+ * told to wait out a window that had never started and would never end,
554
+ * while the only real fix — signing in again — was never mentioned.
555
+ * - Anything cooling down: an honest 429, with the measured instant when one
556
+ * exists. `waitMinutes` is null when no reset instant was measured, and the
557
+ * message then says so instead of naming a made-up number.
558
+ *
559
+ * The mixed case (some cooling down, some rejected) reports the 429: a window
560
+ * really is open, and the sentence names the wait. What it must not do — and
561
+ * no longer does — is claim a wait when no cooldown was ever written.
562
+ */
563
+ private allUnavailableError;
564
+ /**
565
+ * Pick the account for the next request, refreshing its credential when it is
566
+ * about to expire.
567
+ *
568
+ * @param excludeIds - accounts already tried for this request, so a retry
569
+ * lands on a different account.
570
+ * @param fetchFn - fetch used by the provider's token refresh.
571
+ * @param forceRefresh - renew even when the stored token still looks usable.
572
+ * @param options - what the refresh may spend, passed down to the provider's
573
+ * refresh hook. Absent means the provider's own default budget.
574
+ * @param selection - this request's own account preference, when the caller
575
+ * has one (a warm prefix cache, for instance). Absent means the rotation
576
+ * strategy decides alone, exactly as before.
577
+ * @throws LlmError with `RATE_LIMIT` when every account is cooling down.
578
+ */
579
+ getEffectiveAccount(excludeIds?: ReadonlySet<string>, fetchFn?: typeof fetch, forceRefresh?: boolean, options?: AccountPoolRefreshOptions, selection?: AccountSelectionHint): Promise<{
580
+ account: TAccount;
581
+ credentials: TCredentials;
582
+ }>;
583
+ }
584
+ //# sourceMappingURL=account-pool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account-pool.d.ts","sourceRoot":"","sources":["../../../../src/host/common/account-pool.ts"],"names":[],"mappings":"AAIA,OAAO,EAA2B,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEjF,OAAO,EAQL,KAAK,qBAAqB,EAC3B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EACV,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,wCAAwC,CAAA;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAEhF,wEAAwE;AACxE,eAAO,MAAM,sBAAsB,QAAS,CAAA;AAK5C,+EAA+E;AAC/E,eAAO,MAAM,yBAAyB,KAAK,CAAA;AAE3C;;;;;;GAMG;AACH,qBAAa,wBAAyB,SAAQ,KAAK;CAAG;AAEtD;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB,CAAC,YAAY;IAC5C,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,YAAY,CAAA;IACzB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,i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;;;;;;;;;;OAaG;YACW,YAAY;IAwC1B;;;;;;OAMG;YACW,cAAc;IAwD5B,OAAO,CAAC,mBAAmB;IAgB3B,kFAAkF;IAClF,OAAO,CAAC,uBAAuB;IAM/B;;;;;OAKG;IACH,SAAS,CAAC,kBAAkB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO;IAMxD,4EAA4E;IAC5E,OAAO,CAAC,aAAa;IA0CrB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,OAAO,CAAC,mBAAmB;IAuC3B;;;;;;;;;;;;;;OAcG;IACG,mBAAmB,CACvB,UAAU,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,EAChC,OAAO,GAAE,OAAO,KAAa,EAC7B,YAAY,UAAQ,EACpB,OAAO,CAAC,EAAE,yBAAyB,EACnC,SAAS,CAAC,EAAE,oBAAoB,GAC/B,OAAO,CAAC;QAAE,OAAO,EAAE,QAAQ,CAAC;QAAC,WAAW,EAAE,YAAY,CAAA;KAAE,CAAC;CAmD7D"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Turning a line's own quota snapshot into the per-account shape the account
3
+ * card draws.
4
+ *
5
+ * Quota follows the account: a rotation decides which account spends the next
6
+ * request, so one line-level figure describes whichever account happened to be
7
+ * active when it was read. Every line already remembers what it read per
8
+ * account identity; these helpers are the single place that decides what of a
9
+ * snapshot is worth publishing, so seven lines cannot drift apart on the two
10
+ * questions that matter:
11
+ *
12
+ * - a window whose share nobody measured is NOT zero — it is dropped, because
13
+ * "0% used" and "not stated" are different claims and the bar would lie;
14
+ * - a snapshot with no read time is not a snapshot — the card's whole promise
15
+ * is "this is what we last saw, at this time".
16
+ */
17
+ import type { PoolAccountQuotaDto, PoolAccountQuotaWindowDto } from '../../shared/account-pool-contracts.ts';
18
+ /**
19
+ * A reset instant as Unix milliseconds.
20
+ *
21
+ * Providers state this in seconds, in milliseconds, or not at all, and the two
22
+ * numeric forms are told apart by magnitude rather than by a flag: 10^10
23
+ * seconds is the year 2286, so anything larger is already milliseconds.
24
+ */
25
+ export declare function quotaResetMs(value: number | null | undefined): number | null;
26
+ /**
27
+ * One window, or null when its consumed share was never measured.
28
+ *
29
+ * `label` may be empty: the card names an unlabeled window from its length, and
30
+ * only falls back to a generic name when the line stated neither.
31
+ */
32
+ export declare function quotaWindow(label: string, usedPercent: number | null | undefined, options?: {
33
+ windowDurationMins?: number | null;
34
+ resetsAt?: number | null;
35
+ }): PoolAccountQuotaWindowDto | null;
36
+ /**
37
+ * The snapshot to publish for one account, or undefined when there is none.
38
+ *
39
+ * Undefined is the honest answer for "never read" and for "read before this
40
+ * process started": both mean the card has nothing to show, and neither means
41
+ * the account is unspent.
42
+ */
43
+ export declare function poolQuota(fetchedAt: number | null | undefined, windows: readonly (PoolAccountQuotaWindowDto | null)[]): PoolAccountQuotaDto | undefined;
44
+ //# sourceMappingURL=account-quota.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account-quota.d.ts","sourceRoot":"","sources":["../../../../src/host/common/account-quota.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAA;AAE5G;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAG5E;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACtC,OAAO,GAAE;IAAE,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAO,GAC7E,yBAAyB,GAAG,IAAI,CAWlC;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CACvB,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,EAAE,SAAS,CAAC,yBAAyB,GAAG,IAAI,CAAC,EAAE,GACrD,mBAAmB,GAAG,SAAS,CAGjC"}
@@ -0,0 +1,4 @@
1
+ /** A stable Messages-safe id for tool calls replayed from another protocol. */
2
+ export declare function toClaudeToolUseId(value: unknown): string;
3
+ export declare const toToolCallId: (id: string) => any;
4
+ //# sourceMappingURL=brand-compat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"brand-compat.d.ts","sourceRoot":"","sources":["../../../../src/host/common/brand-compat.ts"],"names":[],"mappings":"AAGA,+EAA+E;AAC/E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAMxD;AAED,eAAO,MAAM,YAAY,OAAQ,MAAM,KAAG,GAIzC,CAAA"}