@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,579 @@
1
+ /**
2
+ * Upstream HTTP surface of the Claude subscription line.
3
+ *
4
+ * WHAT THIS MODULE IS. Everything between "we hold a subscription OAuth
5
+ * credential" and "a response came back": the request headers, the model
6
+ * listing, the two independent sources of quota numbers, a one-shot
7
+ * connectivity probe, and the classification of a failure. It owns no
8
+ * credential lifecycle — refreshing is `oauth.ts`'s job, storage is
9
+ * `token-store.ts`'s — so every entry point here takes an ALREADY-CURRENT
10
+ * access token and never writes one back.
11
+ *
12
+ * Each behavioural claim below names the evidence behind it. Where the evidence
13
+ * is a reading of the locally installed reference implementation it says so;
14
+ * where it is this module's own judgement it says that instead, because a later
15
+ * reviewer has to be able to tell the two apart. Nothing here asserts what an
16
+ * endpoint returns without a fixture or a live read behind it.
17
+ *
18
+ * ---------------------------------------------------------------------------
19
+ * 1. THE HEADERS, AND WHY `x-api-key` MUST NOT BE THERE
20
+ * ---------------------------------------------------------------------------
21
+ *
22
+ * The subscription is not the Console API. The Console authenticates with
23
+ * `x-api-key`; the subscription authenticates with an OAuth access token in
24
+ * `Authorization: Bearer`. Sending BOTH is a documented 401 cause — the gateway
25
+ * sees an API-key-shaped credential on a route that does not serve API keys and
26
+ * refuses the request. So the builder below emits `authorization` and actively
27
+ * removes any `x-api-key` that a caller's `extra` map tried to smuggle in:
28
+ * a caller copying another provider's header map is exactly how that bug would
29
+ * re-enter this codebase, and a silent 401 is a bad way to find out.
30
+ *
31
+ * The `user-agent` is load-bearing rather than cosmetic. Upstream enforces a
32
+ * MINIMUM REPORTED CLIENT VERSION on this path: when the model being asked for
33
+ * is newer than the version we claim to be, the request is refused with HTTP 400
34
+ * and the body code `claude_code_version_too_old`
35
+ * ({@link ERROR_CODE_CLIENT_VERSION_TOO_OLD}). The version therefore comes from
36
+ * {@link claudeCliVersion} at CALL TIME rather than from a module constant, so a
37
+ * `setClaudeCliVersion` pin or a `DSH_CLAUDE_CLI_VERSION` in the environment
38
+ * takes effect on the very next request without a restart.
39
+ *
40
+ * `anthropic-beta` is cumulative: one request carries every marker that
41
+ * applies. Three sources contribute, and only one of them is conditional on the
42
+ * model — the reference's own rule is that a HAIKU model does NOT receive
43
+ * `claude-code-20250219` while every other model does. The only offline signal
44
+ * for that is the family token in the id itself.
45
+ *
46
+ * ---------------------------------------------------------------------------
47
+ * 2. THE MODEL LISTING OVERRIDES THE CONTEXT WINDOW AND NOTHING ELSE
48
+ * ---------------------------------------------------------------------------
49
+ *
50
+ * This is the invariant most worth protecting in this file. `GET /v1/models`
51
+ * states which ids the ACCOUNT can call and how much context each one takes; it
52
+ * says nothing about image support, about which thinking form a model needs, or
53
+ * about the reasoning ladder it exposes. Those are per-model facts that
54
+ * `model-catalog.ts` carries and that the family name does not decide — a
55
+ * listing-driven merge that wrote capability fields would silently replace them
56
+ * with `undefined` and produce requests the model rejects.
57
+ *
58
+ * So {@link loadCatalog} produces each entry as `{ ...catalogEntry,
59
+ * contextWindow }`: ONE written field, everything else copied verbatim from the
60
+ * frozen table (or from its conservative stub, for an id the table does not
61
+ * know). A test asserts that a listing cannot change any other field.
62
+ *
63
+ * The failure path matters as much as the success path. DSH 0.1.7 makes "the
64
+ * model must appear in the provider's catalog" a HARD GATE, so returning an
65
+ * empty list when the listing call fails would not degrade the picker — it would
66
+ * block model switching entirely, and it would do so while the account is
67
+ * perfectly usable. Every failure therefore yields {@link FALLBACK_MODELS}.
68
+ * An empty-but-successful listing is treated the same way, for the same reason.
69
+ *
70
+ * ---------------------------------------------------------------------------
71
+ * 3. TWO QUOTA SOURCES IN TWO DIFFERENT UNITS — THE BUG THIS FILE EXISTS TO STOP
72
+ * ---------------------------------------------------------------------------
73
+ *
74
+ * (a) PRIMARY, `GET /api/oauth/usage`. Each window is
75
+ * `{ utilization, resets_at }` and `utilization` is a PERCENT USED in
76
+ * 0-100. `utilization: 0` means nothing has been used — the ordinary state
77
+ * of a healthy account — and is NOT an error and NOT "no quota left".
78
+ *
79
+ * (b) SECONDARY, the `anthropic-ratelimit-unified-*` response headers on ANY
80
+ * `/v1/messages` response including 200s.
81
+ * `...-5h-utilization` is a FRACTION in 0-1. Same word, different unit:
82
+ * `0.25` here and `25` there both mean "a quarter of the window is gone".
83
+ * `...-5h-reset` is epoch SECONDS — not milliseconds, and not ISO — while
84
+ * `resets_at` in (a) IS ISO 8601. A parser that treats the two as one
85
+ * number under-reports by 100x or over-reports by 100x depending on which
86
+ * direction it guessed, and the card shows a confident wrong number either
87
+ * way.
88
+ *
89
+ * The conversion happens at exactly TWO boundaries and nowhere else: the
90
+ * header parser multiplies by 100 once, on the way in, and the body parser
91
+ * divides by 100 once, on the way in. After that both are the same
92
+ * {@link ClaudeUsageWindow}, and a test asserts that `0.25` in a header and
93
+ * `25` in a body produce byte-identical windows.
94
+ *
95
+ * Header data is allowed to satisfy the composer badge — the badge only needs
96
+ * the tightest window — but it must NOT permanently replace a full read. The
97
+ * cache therefore tracks two instants: when any source last wrote
98
+ * (`observedAt`, gated by {@link QUOTA_CACHE_TTL_MS}) and when a FULL read last
99
+ * succeeded (`fetchedAt`, gated by {@link QUOTA_FULL_REFRESH_MS}). Header
100
+ * updates advance only the first, so a stream of model calls cannot keep the
101
+ * card warm forever behind stale numbers.
102
+ *
103
+ * Unknown keys in the usage payload are IGNORED. The response's key set varies
104
+ * by account type and carries churning feature-flag codenames; a key this
105
+ * module does not know is not a window, and a missing known key is not zero.
106
+ *
107
+ * ---------------------------------------------------------------------------
108
+ * 4. FAILURE CLASSIFICATION
109
+ * ---------------------------------------------------------------------------
110
+ *
111
+ * Anthropic reports the real condition in the body's `error.type` while the
112
+ * HTTP status stays coarse, so the body is authoritative and the status is the
113
+ * fallback. The one distinction the rest of the line depends on is inside
114
+ * `rate_limit_error`: a 429 that names a SPENT WINDOW OF THIS ACCOUNT is fixed
115
+ * by switching accounts, and a 429 that does not is not — switching accounts on
116
+ * a global limit would burn every account in the pool against a wall none of
117
+ * them can pass. That distinction is exported as a first-class value rather
118
+ * than left for the caller to re-derive from headers.
119
+ */
120
+ import { type ClaudeCacheTtl, type ClaudeErrorType } from './types.ts';
121
+ import { type ClaudeCodeFirstPartyContext } from '../common/claude-code-first-party.ts';
122
+ import { type ClaudeModelEntry } from './model-catalog.ts';
123
+ import { type ClaudeCodeVersionSelection } from '../common/claude-code-version.ts';
124
+ import type { ClaudeCredentials } from './token-store.ts';
125
+ /** A flat, lower-cased header map, ready for `fetch`. */
126
+ export type ClaudeRequestHeaders = Record<string, string>;
127
+ /**
128
+ * Which product string a request reports as.
129
+ *
130
+ * `cli` is the Messages-API identity: `claude-cli/<v> (external, cli)`. The
131
+ * subscription usage endpoint is a different surface and the reference reports
132
+ * a different product there — `claude-code/<v>` — so the choice is a parameter
133
+ * rather than a constant. Reporting the wrong one is not fatal on the usage
134
+ * route, but it is also not free: the route is behind the same gateway that
135
+ * enforces the reported-version floor.
136
+ */
137
+ export type ClaudeUserAgentKind = 'cli' | 'code';
138
+ /** Options for {@link buildClaudeHeaders}. */
139
+ export interface ClaudeHeaderOptions {
140
+ /** Exact model id; the first-party helper applies the captured Haiku beta order. */
141
+ model?: string;
142
+ /**
143
+ * Prompt-cache tier this request's body writes. `1h` adds the beta that
144
+ * licenses it, so the header and the body cannot disagree.
145
+ */
146
+ cacheTtl?: ClaudeCacheTtl;
147
+ /**
148
+ * Whether this request's body states a mid-conversation tool change; adds the
149
+ * beta that licenses `tool_addition` / `tool_removal` blocks. Without it those
150
+ * blocks are an unknown content type.
151
+ */
152
+ toolChanges?: boolean;
153
+ /** HTTP method. `content-type` is emitted unless this is a GET. */
154
+ method?: 'GET' | 'POST' | string;
155
+ /** Which product identity to report. Defaults to the Messages-API one. */
156
+ userAgent?: ClaudeUserAgentKind;
157
+ /** Shared version selected for this request; defaults to the legacy accessor for auxiliary surfaces. */
158
+ version?: string;
159
+ /** First-party Messages context. Auxiliary catalog/quota calls leave this absent. */
160
+ firstParty?: ClaudeCodeFirstPartyContext;
161
+ /** Remembered refusal removes thinking-token-count before the request is sent. */
162
+ thinkingTokenCount?: boolean;
163
+ /** Explicit subscription opt-in; meaningful only on a first-party 1h request. */
164
+ cacheKeepalive?: boolean;
165
+ /** Runtime-corrected fast-mode wire requirement. */
166
+ fastMode?: 'ga' | 'beta' | null;
167
+ /** Extra headers. `x-api-key` is stripped from the result regardless. */
168
+ extra?: Record<string, string>;
169
+ }
170
+ /**
171
+ * The `anthropic-beta` set for one request, in a stable order.
172
+ *
173
+ * The server parses this as a set, but the plugin keeps the capture-backed order
174
+ * so Opus/Haiku fixtures can detect accidental reordering.
175
+ */
176
+ export declare function claudeBetas(options?: Pick<ClaudeHeaderOptions, 'model' | 'cacheTtl' | 'toolChanges' | 'thinkingTokenCount' | 'cacheKeepalive' | 'fastMode'>): string[];
177
+ /** The `User-Agent` value this line reports for one surface. */
178
+ export declare function claudeUserAgent(kind?: ClaudeUserAgentKind, version?: string): string;
179
+ /**
180
+ * Build the headers for one subscription request.
181
+ *
182
+ * The single builder for every surface this module touches — the Messages API,
183
+ * the model listing, the usage read, and the probe. `extra` is how a caller
184
+ * adds a header this module does not own (a streaming `accept`, an
185
+ * `anthropic-beta` the adapter negotiated) without a second builder drifting
186
+ * away from this one.
187
+ *
188
+ * @param accessToken - a CURRENT OAuth access token. This function does not
189
+ * check expiry; the caller owns refresh.
190
+ */
191
+ export declare function buildClaudeHeaders(accessToken: string, options?: ClaudeHeaderOptions): ClaudeRequestHeaders;
192
+ /** Drop the cached listing, forcing the next load to hit the network. */
193
+ export declare function clearCachedCatalog(): void;
194
+ /** The listing currently held, or an empty array before the first load. */
195
+ export declare function getCachedCatalog(): readonly ClaudeModelEntry[];
196
+ /** Whether the held listing is the shipped table standing in for a failed call. */
197
+ export declare function isCatalogFallback(): boolean;
198
+ /** One listing entry, reduced to the two fields this line reads from it. */
199
+ interface ListingEntry {
200
+ id: string;
201
+ /** The window the listing stated, or null when it stated none. */
202
+ contextWindow: number | null;
203
+ }
204
+ /**
205
+ * Whether one listing id names a Claude or Anthropic model.
206
+ *
207
+ * TRANSCRIBED from the official client's own model discovery, which keeps an
208
+ * entry when its id contains `claude` or `anthropic` ANYWHERE in the string,
209
+ * matched case-insensitively, and ignores everything else. A provider-prefixed
210
+ * id such as `vertex_ai/claude-sonnet-4-6` or `bedrock/anthropic.claude-sonnet-4-5`
211
+ * passes; an id that contains neither substring does not.
212
+ */
213
+ export declare function isClaudeModelId(id: string): boolean;
214
+ /**
215
+ * Fold the live listing onto the frozen capability table.
216
+ *
217
+ * `contextWindow` is the ONLY field the listing may write. Everything else is
218
+ * copied from `resolveClaudeModel`, which returns the catalog entry for a known
219
+ * id and the current-model template for an unknown one — so an id this line has
220
+ * never heard of inherits the shape of the current generation (adaptive
221
+ * thinking, the full effort ladder, image support, a 1M window) instead of
222
+ * inheriting invented capabilities from the listing. The listing's own
223
+ * `context_window` overrides the WINDOW and nothing else.
224
+ *
225
+ * The catalog is NOT widened by the listing: the returned array contains exactly
226
+ * the ids the server named, because the listing is the authority on what this
227
+ * account may call. (The fallback path is what keeps a failed call from
228
+ * narrowing it to nothing.)
229
+ *
230
+ * Entries whose id names no Claude or Anthropic model are IGNORED, exactly as
231
+ * the official client's discovery ignores them: a listing that also names
232
+ * something else must not put that something else in this line's picker.
233
+ */
234
+ export declare function mergeListingIntoCatalog(listing: readonly ListingEntry[]): ClaudeModelEntry[];
235
+ /** Options for {@link loadCatalog}. */
236
+ export interface CatalogLoadOptions {
237
+ fetchFn?: typeof fetch;
238
+ signal?: AbortSignal;
239
+ /** Bypass the cached listing and read the server again. */
240
+ force?: boolean;
241
+ }
242
+ /**
243
+ * Read the models the signed-in account can call.
244
+ *
245
+ * Cached for {@link CATALOG_CACHE_TTL_MS} and single-flighted per credential,
246
+ * because the harness resolves EVERY model of EVERY provider when it builds the
247
+ * picker — without both, one picker build is one network round trip per model.
248
+ *
249
+ * A failure is cached too, deliberately. The last successful live listing stays
250
+ * in place when one exists; only a first failure uses the shipped table. NOT
251
+ * caching the failure would put a dead endpoint behind fourteen sequential
252
+ * 20-second timeouts on every picker build.
253
+ * {@link clearCachedCatalog} is the escape hatch: the sign-in path calls it so a
254
+ * user who just authenticated does not sit behind a failure recorded before
255
+ * they did.
256
+ *
257
+ * @param credentials - a current subscription credential; it selects the cache
258
+ * entry, since a different account can see a different listing.
259
+ */
260
+ export declare function loadCatalog(credentials: ClaudeCredentials, options?: CatalogLoadOptions): Promise<readonly ClaudeModelEntry[]>;
261
+ /**
262
+ * One account window, normalized.
263
+ *
264
+ * The three numeric fields are null TOGETHER, and null means "the source did
265
+ * not say" — which is a different statement from 0, "nothing used". Collapsing
266
+ * them would turn a payload that omitted a window into a confident zero.
267
+ */
268
+ export interface ClaudeUsageWindow {
269
+ /** Wire key: `five_hour`, `seven_day`, `seven_day_sonnet`. */
270
+ id: string;
271
+ /** Display label. */
272
+ label: string;
273
+ /** Nominal length of the window in minutes, or null when unknown. */
274
+ windowMinutes: number | null;
275
+ /** Fraction of the window consumed, 0-1. Percent divided by 100 at this boundary. */
276
+ usedFraction: number | null;
277
+ /** Percent of the window consumed, 0-100. */
278
+ usedPercent: number | null;
279
+ /** Percent of the window still available, 0-100. */
280
+ remainingPercent: number | null;
281
+ /** ISO 8601 instant the window resets, or null. */
282
+ resetsAt: string | null;
283
+ /** Which source these numbers came from. */
284
+ source: 'usage' | 'headers';
285
+ }
286
+ /** The account's pay-as-you-go overage pool, as the usage payload states it. */
287
+ export interface ClaudeExtraUsage {
288
+ isEnabled: boolean;
289
+ monthlyLimit: number | null;
290
+ usedCredits: number | null;
291
+ /** Percent of the monthly limit consumed, 0-100 — same unit as the windows. */
292
+ utilization: number | null;
293
+ }
294
+ /** The whole quota snapshot the settings card and the composer badge read. */
295
+ export interface ClaudeAccountQuota {
296
+ windows: ClaudeUsageWindow[];
297
+ extraUsage: ClaudeExtraUsage | null;
298
+ /**
299
+ * Epoch ms of the last successful FULL usage read.
300
+ *
301
+ * Null when only response headers have ever been seen. This is the field that
302
+ * decides whether the next read may be satisfied from headers alone.
303
+ */
304
+ fetchedAt: number | null;
305
+ /** Epoch ms of the most recent update from any source. */
306
+ observedAt: number;
307
+ /** Unified rate-limit status the headers last reported, when they did. */
308
+ status: string | null;
309
+ /** Window the headers last named as representative, when they did. */
310
+ representativeClaim: string | null;
311
+ }
312
+ /** The window with the least headroom, or null when no window states one. */
313
+ export declare function tightestQuotaWindow(windows: readonly ClaudeUsageWindow[]): ClaudeUsageWindow | null;
314
+ /**
315
+ * Read the usage payload's known keys, and only its known keys.
316
+ *
317
+ * The key set varies by account type and the payload also carries churning
318
+ * feature-flag codenames; anything not named below is ignored, because reading
319
+ * an unknown key as a window is how a wrong number gets on the card. A known
320
+ * key that is `null` (the documented state of `seven_day_sonnet`) yields no
321
+ * window at all rather than a zeroed one.
322
+ */
323
+ export declare function parseUsagePayload(payload: unknown): {
324
+ windows: ClaudeUsageWindow[];
325
+ extraUsage: ClaudeExtraUsage | null;
326
+ };
327
+ /** Prefix every unified rate-limit header shares. */
328
+ export declare const QUOTA_HEADER_PREFIX = "anthropic-ratelimit-unified-";
329
+ /**
330
+ * Anything header-shaped.
331
+ *
332
+ * A `Headers` (what `fetch` returns) or a plain map (what a test or a
333
+ * hand-built call site has). Both are read case-insensitively, because HTTP
334
+ * header names are case-insensitive and a plain map from a caller often is not.
335
+ */
336
+ export type ClaudeHeaderSource = Headers | Record<string, string | readonly string[] | undefined>;
337
+ /** Convert the headers' epoch-SECONDS reset instant to the ISO form the card uses. */
338
+ export declare function epochSecondsToIso(value: number | undefined): string | null;
339
+ /** One window as the unified response headers state it. */
340
+ export interface ClaudeHeaderQuotaWindow {
341
+ id: string;
342
+ label: string;
343
+ windowMinutes: number | null;
344
+ /** The header's own unit: a FRACTION, 0-1. */
345
+ usedFraction: number;
346
+ /** The same number as a percent, 0-100. Derived here and nowhere else. */
347
+ usedPercent: number;
348
+ remainingPercent: number;
349
+ /** ISO 8601, converted from the header's epoch SECONDS. */
350
+ resetsAt: string | null;
351
+ /** Always `headers`: what this window is made of, for the merged DTO. */
352
+ source: 'headers';
353
+ }
354
+ /** Everything the unified rate-limit headers said about one response. */
355
+ export interface ClaudeQuotaHeaderReading {
356
+ windows: ClaudeHeaderQuotaWindow[];
357
+ /** `anthropic-ratelimit-unified-status` — e.g. a rejected/allowed verdict. */
358
+ status: string | null;
359
+ /** `anthropic-ratelimit-unified-representative-claim` — the window that speaks for the response. */
360
+ representativeClaim: string | null;
361
+ /** The overage headers, when the response carried any. */
362
+ overage: {
363
+ status: string | null;
364
+ utilization: number | null;
365
+ } | null;
366
+ }
367
+ /**
368
+ * Read the unified rate-limit headers off any response.
369
+ *
370
+ * THIS is the boundary where the header FRACTION becomes a fraction in the
371
+ * normalized DTO — it is never divided or multiplied again downstream. The
372
+ * sibling `resets_at` field in the usage payload is ISO while the header reset
373
+ * is epoch seconds; both land on the DTO as ISO.
374
+ */
375
+ export declare function parseQuotaHeaders(headers: ClaudeHeaderSource): ClaudeQuotaHeaderReading;
376
+ /** Drop every cached snapshot. Called on sign-out and after a credential change. */
377
+ export declare function clearCachedQuota(): void;
378
+ /**
379
+ * The cached snapshot, optionally only when it belongs to this credential.
380
+ *
381
+ * With one stored account the argument is unnecessary; it exists so a later
382
+ * pool chunk cannot render one account's usage under another account's name.
383
+ * Given a credential the answer is THAT account's own newest snapshot, which is
384
+ * what keeps two pooled accounts apart: a later read of a different account
385
+ * cannot displace it. Without one the pre-pool answer is kept — whatever was
386
+ * written last — because the single-account card has no identity to ask with.
387
+ */
388
+ export declare function getCachedQuota(credentials?: Pick<ClaudeCredentials, 'accessToken'>): ClaudeAccountQuota | null;
389
+ /**
390
+ * The newest snapshot held for one credential's account, for display only.
391
+ *
392
+ * The token-tail form, kept for a composition with a single stored credential.
393
+ * A pooled caller asks {@link cachedQuotaForPool} with the row id instead: a
394
+ * token is rotated by every refresh, so an entry filed under a tail is lost the
395
+ * moment the account renews.
396
+ */
397
+ export declare function cachedQuotaFor(credentials: Pick<ClaudeCredentials, 'accessToken'>): ClaudeAccountQuota | null;
398
+ /**
399
+ * The newest snapshot held for one pool row, for display only.
400
+ *
401
+ * The pool asks here while it builds the account list for the settings card, so
402
+ * this is a pure memory read: it never fetches. Null means nothing was ever read
403
+ * for this account, which is a different statement from "nothing used". A row id
404
+ * that is undefined falls back to the credential's own tail, which is what a
405
+ * composition without a pool has.
406
+ */
407
+ export declare function cachedQuotaForPool(accountId: string | undefined, credentials: Pick<ClaudeCredentials, 'accessToken'>): ClaudeAccountQuota | null;
408
+ /** Options for {@link fetchAccountQuota}. */
409
+ export interface QuotaFetchOptions {
410
+ fetchFn?: typeof fetch;
411
+ signal?: AbortSignal;
412
+ /** Bypass the cache and read the usage endpoint now. */
413
+ force?: boolean;
414
+ /**
415
+ * Pool row this read is made for, when a pool is in charge.
416
+ *
417
+ * The snapshot is then remembered against the row rather than against the
418
+ * access token, so the row keeps its meters across the token rotations that
419
+ * every refresh performs.
420
+ */
421
+ accountId?: string;
422
+ }
423
+ /**
424
+ * Read the account's usage meters.
425
+ *
426
+ * Cached for {@link QUOTA_CACHE_TTL_MS} and single-flighted per credential. The
427
+ * cache is served only while BOTH clocks are inside their windows: a snapshot
428
+ * kept warm by response headers still triggers a full read once the last real
429
+ * read is older than {@link QUOTA_FULL_REFRESH_MS}, which is what stops a busy
430
+ * conversation from pinning the card to numbers that arrived as a side effect.
431
+ *
432
+ * A failure never blanks the card: an existing snapshot for the same credential
433
+ * is returned instead, because a transient outage says nothing about the
434
+ * account's real usage. The exception is a credential failure, which is always
435
+ * surfaced — hiding a revoked credential behind stale numbers is how a user ends
436
+ * up staring at a card that claims they are fine.
437
+ */
438
+ export declare function fetchAccountQuota(credentials: ClaudeCredentials, options?: QuotaFetchOptions): Promise<ClaudeAccountQuota>;
439
+ /**
440
+ * Fold the unified response headers of any response into the cached snapshot.
441
+ *
442
+ * Called on every `/v1/messages` response — including 200s, which is where the
443
+ * numbers usually come from. It advances `observedAt` and NOT `fullReadAt`, so
444
+ * header data can satisfy the composer badge while the card is still required to
445
+ * perform a real read once the last one is older than
446
+ * {@link QUOTA_FULL_REFRESH_MS}.
447
+ *
448
+ * @param headers - response headers of a model call.
449
+ * @param accountKey - the account those headers belong to, as
450
+ * {@link accountKeyFor} derives it. Omitted, the reading is filed under
451
+ * whoever the newest snapshot already belongs to — the correct answer for the
452
+ * single-account case, and a reading whose account cannot be determined is
453
+ * filed under none rather than under the wrong one. When it is given and
454
+ * disagrees with that newest snapshot's account the reading is DISCARDED
455
+ * rather than merged: an unnamed reading merges into the snapshot it was read
456
+ * beside, so admitting one that is known to belong elsewhere is how two
457
+ * accounts' windows would end up in one entry.
458
+ * @returns the updated snapshot, or null when the headers carried nothing usable.
459
+ */
460
+ export declare function recordQuotaFromHeaders(headers: ClaudeHeaderSource, accountKey?: string): ClaudeAccountQuota | null;
461
+ /** A probe that reached the Messages API and was answered. */
462
+ export interface ClaudeProbeSuccess {
463
+ ok: true;
464
+ model: string;
465
+ status: number;
466
+ latencyMs: number;
467
+ /** `stop_reason` of the one-token answer, when the body carried one. */
468
+ stopReason: string | null;
469
+ }
470
+ /** A probe that did not succeed, with the reason rather than an exception. */
471
+ export interface ClaudeProbeFailure {
472
+ ok: false;
473
+ model: string;
474
+ /** HTTP status, or 0 when no response arrived at all. */
475
+ status: number;
476
+ latencyMs: number;
477
+ failure: ClaudeFailure;
478
+ }
479
+ export type ClaudeProbeResult = ClaudeProbeSuccess | ClaudeProbeFailure;
480
+ /** Options for {@link probeConnection}. */
481
+ export interface ProbeOptions {
482
+ fetchFn?: typeof fetch;
483
+ signal?: AbortSignal;
484
+ /**
485
+ * Model to probe with.
486
+ *
487
+ * Defaults to the cheapest id in the shipped table. A probe is a connectivity
488
+ * and credential check, and the widest-entitlement model answers it on every
489
+ * plan; a caller that wants to prove a SPECIFIC model's entitlement passes it
490
+ * here. The default haiku id exercises the captured haiku beta order; pass a
491
+ * selected model to
492
+ * probe the exact header set that model's real calls will use.
493
+ */
494
+ model?: string;
495
+ /** Shared first-party version and host-only install id. */
496
+ version?: ClaudeCodeVersionSelection;
497
+ deviceId?: string;
498
+ /** Deadline for the probe. Defaults to the discovery ceiling. */
499
+ timeoutMs?: number;
500
+ }
501
+ /** The model a probe uses when the caller names none. */
502
+ export declare const PROBE_DEFAULT_MODEL = "claude-haiku-4-5";
503
+ /**
504
+ * Prove the credential works and measure how long the round trip took.
505
+ *
506
+ * One non-streaming POST with `max_tokens: 1` — the smallest request the
507
+ * Messages API accepts, which keeps a probe from consuming anything meaningful
508
+ * even when it is run from the settings card on every save.
509
+ *
510
+ * An upstream rejection is RETURNED, not thrown: the card's whole job here is to
511
+ * render the reason, and a thrown error would have to be caught and unwrapped at
512
+ * every call site to say the same thing.
513
+ */
514
+ export declare function probeConnection(credentials: ClaudeCredentials, options?: ProbeOptions): Promise<ClaudeProbeResult>;
515
+ /**
516
+ * What a caller should DO about a failure — the taxonomy, not the message.
517
+ *
518
+ * - `credential` — the stored credential is finished (401/403). Final: retrying
519
+ * cannot help, and the user has to sign in again.
520
+ * - `request` — this request was wrong (400/404/413/422). Not retryable, and
521
+ * for this line often a client-version or parameter problem.
522
+ * - `rate_limit_account` — a usage WINDOW OF THIS ACCOUNT is spent. Switching
523
+ * accounts is what fixes it.
524
+ * - `rate_limit_global` — a limit that is not attributable to this account's
525
+ * window. Switching accounts would burn the pool against a wall.
526
+ * - `overloaded` — transient capacity shortage. Retryable, not account-specific.
527
+ * - `server` — a 5xx that is not an overload. Retryable.
528
+ * - `network` — no response arrived at all. Retryable.
529
+ */
530
+ export type ClaudeFailureKind = 'credential' | 'request' | 'rate_limit_account' | 'rate_limit_global' | 'overloaded' | 'server' | 'network';
531
+ /** A classified failure, in the shape the adapter and the settings card consume. */
532
+ export interface ClaudeFailure {
533
+ kind: ClaudeFailureKind;
534
+ /** Wire `error.type`, when the body named one this line recognizes. */
535
+ type: ClaudeErrorType | null;
536
+ /** HTTP status, or 0 for a transport failure. */
537
+ status: number;
538
+ /** Human-readable reason, from the body when it gave one. */
539
+ message: string;
540
+ /** Whether repeating the SAME request could succeed. */
541
+ retryable: boolean;
542
+ /**
543
+ * Whether the failure is attributable to this ACCOUNT's own usage window.
544
+ *
545
+ * This is the field a pool switches accounts on. It is true only for
546
+ * `rate_limit_account`.
547
+ */
548
+ accountScoped: boolean;
549
+ /** Whether the body's code was the reported-client-version floor. */
550
+ clientVersionTooOld: boolean;
551
+ /** ISO 8601 reset instant, when the body or the headers named one. */
552
+ resetsAt: string | null;
553
+ /** `retry-after`, in milliseconds, when the response carried it. */
554
+ retryAfterMs: number | null;
555
+ }
556
+ /** Error carrying a classified failure, for the paths that must signal instead of return. */
557
+ export declare class ClaudeRequestError extends Error {
558
+ readonly failure: ClaudeFailure;
559
+ constructor(failure: ClaudeFailure);
560
+ }
561
+ /** A transport failure: nothing came back, so there is no status and no body. */
562
+ export declare function networkFailure(error: unknown): ClaudeFailure;
563
+ /**
564
+ * Classify one failed response.
565
+ *
566
+ * The body is authoritative and the status is the fallback, because Anthropic's
567
+ * statuses are coarse: several unrelated conditions share a status while
568
+ * `error.type` names the real one. Both paths are exercised by tests with real
569
+ * response fixtures.
570
+ *
571
+ * @param status - HTTP status.
572
+ * @param bodyText - the response body as text. A body this function cannot
573
+ * parse costs a more precise `type`, never a wrong classification.
574
+ * @param headers - response headers, read for the unified rate-limit verdict and
575
+ * for `retry-after`.
576
+ */
577
+ export declare function classifyFailure(status: number, bodyText: string, headers?: ClaudeHeaderSource): ClaudeFailure;
578
+ export {};
579
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/host/claude/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsHG;AAGH,OAAO,EAgBL,KAAK,cAAc,EACnB,KAAK,eAAe,EACrB,MAAM,YAAY,CAAA;AACnB,OAAO,EAWL,KAAK,2BAA2B,EACjC,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EAAuC,KAAK,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAC/F,OAAO,EAA6B,KAAK,0BAA0B,EAAE,MAAM,kCAAkC,CAAA;AAE7G,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAgEzD,yDAAyD;AACzD,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAEzD;;;;;;;;;GASG;AACH,MAAM,MAAM,mBAAmB,GAAG,KAAK,GAAG,MAAM,CAAA;AAEhD,8CAA8C;AAC9C,MAAM,WAAW,mBAAmB;IAClC,oFAAoF;IACpF,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,cAAc,CAAA;IACzB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,mEAAmE;IACnE,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAA;IAChC,0EAA0E;IAC1E,SAAS,CAAC,EAAE,mBAAmB,CAAA;IAC/B,wGAAwG;IACxG,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,qFAAqF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