@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 @@
1
+ {"version":3,"file":"mapper.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/mapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAGH,OAAO,EAML,KAAK,oBAAoB,EAEzB,KAAK,eAAe,EACpB,KAAK,OAAO,EACZ,KAAK,WAAW,EAEjB,MAAM,yBAAyB,CAAA;AAMhC,OAAO,EAAE,uBAAuB,EAAmB,MAAM,0BAA0B,CAAA;AACnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AAOnE,OAAO,EAEL,mBAAmB,IAAI,yBAAyB,EACjD,MAAM,gCAAgC,CAAA;AAEvC,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,CAAA;AACxD,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,4BAA4B,EAC5B,kBAAkB,EAClB,sBAAsB,EAGtB,yBAAyB,EAEzB,0BAA0B,EAC1B,oCAAoC,EACpC,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EAEpB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,wBAAw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AAA;IACnB,wDAAwD;IACxD,YAAY,EAAE,MAAM,CAAA;IACpB;;;;;;;OAOG;IACH,gBAAgB,EAAE,MAAM,CAAA;IACxB,iFAAiF;IACjF,kBAAkB,EAAE,MAAM,CAAA;IAC1B,iFAAiF;IACjF,kBAAkB,EAAE,MAAM,CAAA;IAC1B;;;;;;;;;;;OAWG;IACH,kBAAkB,EAAE,OAAO,CAAA;CAC5B;AAsBD,gEAAgE;AAChE,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,mBAAmB,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAoBzG;AAcD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,SAAS,CAAC,EAAE,MAAM,EAClB,SAAS,CAAC,EAAE,MAAM,GACjB,kBAAkB,GAAG;IAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAmBlD;AASD,oFAAoF;AACpF,wBAAgB,eAAe,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAkBxD;AA6DD,uEAAuE;AACvE,wBAAgB,WAAW,CAAC,KAAK,EAAE,mBAAmB,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,WAAW,EAAE,CAgBzF;AAED,kEAAkE;AAClE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI,CAUrE"}
@@ -0,0 +1,206 @@
1
+ /**
2
+ * Kimi Code hosted-file (media upload) client.
3
+ *
4
+ * WHY THIS FILE EXISTS. Everything this plugin has ever sent to the Kimi Code
5
+ * gateway carries media INLINE, as a `data:<type>;base64,...` URL
6
+ * (mapper.ts builds both the image and the video block that way). The gateway
7
+ * also accepts a hosted reference instead: upload the bytes once, cite
8
+ * `ms://<id>` afterwards. That is the only way to send a clip whose base64 would
9
+ * overrun the request body ceiling, and it is what this module implements.
10
+ *
11
+ * EVERY WIRE FACT BELOW WAS MEASURED live against the subscription gateway by
12
+ * `scripts/probe-kimi-files.probe.ts` on this line's own account and region,
13
+ * not copied from the official client:
14
+ *
15
+ * - the upload is `POST {coding base}/v1/files`, `multipart/form-data` with a
16
+ * `file` part and a `purpose` part whose value is `image` or `video`
17
+ * (note: NOT the `*_understanding` vocabulary the MiniMax line uses);
18
+ * - it authenticates with the bearer token plus the same `X-Msh-*` identity
19
+ * headers every other request on this line sends;
20
+ * - the body answers with the id at the top level or nested under
21
+ * `data`/`file`/`result`, and the reference a later chat body cites is
22
+ * `ms://<id>`;
23
+ * - `content-type` is never set by hand: the runtime writes
24
+ * `multipart/form-data; boundary=...` itself, and a hand-written JSON header
25
+ * on a form body is a malformed request.
26
+ *
27
+ * DELIBERATELY NARROW. No adapter, mapper or route is touched here: this module
28
+ * only uploads, caches and returns a reference. Integration is a later change.
29
+ *
30
+ * @module dsh-multi-provider/kimi-media-files
31
+ */
32
+ /** Upload route, relative to a base URL that may already carry `/v1`. */
33
+ export declare const FILES_UPLOAD_PATH = "/v1/files";
34
+ /** Scheme a stored id is cited by on the wire. */
35
+ export declare const FILE_REF_SCHEME = "ms://";
36
+ /**
37
+ * Ceiling on cached references.
38
+ *
39
+ * Bounded because a long conversation can attach many distinct clips and a
40
+ * process that lives for days must not grow one map per upload forever. 256 is
41
+ * far more than one conversation cites and small enough to be invisible.
42
+ */
43
+ export declare const DEFAULT_MEDIA_FILE_CACHE_ENTRIES = 256;
44
+ /** Time budget for one upload request. */
45
+ export declare const MEDIA_UPLOAD_TIMEOUT_MS = 120000;
46
+ /** The two purposes this surface measuredly accepts. */
47
+ export type KimiMediaKind = 'image' | 'video';
48
+ /** Why one upload could not produce a usable reference. */
49
+ export type KimiMediaUploadFailure =
50
+ /** The request was unusable before anything was sent (media type, empty body, ...). */
51
+ 'invalid-request'
52
+ /** The media type is not image/* or video/*, so there is no purpose to send. */
53
+ | 'unsupported-media'
54
+ /** HTTP 401/403: the credential was not accepted. */
55
+ | 'unauthorized'
56
+ /** HTTP 404/405: this base URL does not expose the upload route. */
57
+ | 'not-found'
58
+ /** HTTP 413: the service refused the body as too large. */
59
+ | 'too-large'
60
+ /** HTTP 5xx: the service failed; the same request may succeed later. */
61
+ | 'server'
62
+ /** Any other non-2xx answer. */
63
+ | 'rejected'
64
+ /** 2xx whose body was not JSON. */
65
+ | 'not-json'
66
+ /** 2xx whose body carried no usable id. */
67
+ | 'no-id'
68
+ /** The local time budget elapsed before the response arrived. */
69
+ | 'timeout'
70
+ /** The request never completed (socket, DNS, TLS, ...). */
71
+ | 'network';
72
+ /**
73
+ * One failed upload.
74
+ *
75
+ * Carries the HTTP status and a REDACTED digest of the response body so a
76
+ * caller can decide (401 -> sign in again, 5xx -> retry) without the raw body
77
+ * reaching a log. The access token is never placed in `message` or `detail`;
78
+ * see {@link redact}.
79
+ */
80
+ export declare class KimiMediaUploadError extends Error {
81
+ readonly failure: KimiMediaUploadFailure;
82
+ readonly status: number | null;
83
+ /** Redacted one-line digest of the response body, or '' when there was none. */
84
+ readonly detail: string;
85
+ constructor(failure: KimiMediaUploadFailure, message: string, options?: {
86
+ status?: number | null;
87
+ detail?: string;
88
+ });
89
+ }
90
+ /** What one upload needs. */
91
+ export interface KimiMediaUploadRequest {
92
+ /** Bearer token the caller obtained; never logged and never part of a key. */
93
+ readonly accessToken: string;
94
+ /** Coding API base, with or without a trailing slash and with or without `/v1`. */
95
+ readonly baseUrl: string;
96
+ /**
97
+ * Opaque, stable identifier of the ACCOUNT the bytes are uploaded under.
98
+ *
99
+ * It scopes the cache: an id minted for one account is never handed to
100
+ * another, because nothing here proves the gateway shares ids across accounts.
101
+ * It must identify the account (a user id, an account slot index) and must
102
+ * NEVER be the access token — {@link KimiMediaFilesUploader.upload} refuses
103
+ * that, so a token cannot end up inside a cache key by accident.
104
+ */
105
+ readonly accountScope: string;
106
+ /** Complete file bytes. */
107
+ readonly data: Uint8Array;
108
+ /** Media type, such as `image/png` or `video/mp4`. */
109
+ readonly mediaType: string;
110
+ /** Optional display name; only its leaf is used, and never as a path. */
111
+ readonly filename?: string;
112
+ /** Cancels this caller's wait, and the upload once nobody is waiting. */
113
+ readonly signal?: AbortSignal;
114
+ }
115
+ /** Everything a caller of this module may swap out, plus test seams. */
116
+ export interface KimiMediaUploadOptions {
117
+ /** Transport; defaults to the global `fetch`. */
118
+ readonly fetchFn?: typeof fetch;
119
+ /** Cache ceiling; defaults to {@link DEFAULT_MEDIA_FILE_CACHE_ENTRIES}. */
120
+ readonly maxCacheEntries?: number;
121
+ /** Per-request time budget; 0 (or a negative value) disables it. */
122
+ readonly timeoutMs?: number;
123
+ }
124
+ /**
125
+ * The upload URL for one coding base.
126
+ *
127
+ * The base this line resolves normally carries neither a version nor a trailing
128
+ * slash (`https://api.kimi.com/coding`), so the measured route is built by
129
+ * appending `/v1/files` and the answer is `.../coding/v1/files`. A caller that
130
+ * passes a base which ALREADY ends in `/v1` — the official client's own
131
+ * KIMI_CODE_BASE_URL shape — gets the prefix removed once rather than doubled:
132
+ * `.../coding/v1/v1/files` is a 404 that reads like a missing route.
133
+ */
134
+ export declare function filesUploadUrl(baseUrl: string): string;
135
+ /** The upload purpose one media type maps to, or undefined when unsupported. */
136
+ export declare function mediaKindFor(mediaType: string): KimiMediaKind | undefined;
137
+ /** The wire reference for a stored id. */
138
+ export declare function fileReference(id: string): string;
139
+ /**
140
+ * The cache key for one upload.
141
+ *
142
+ * Five things, and each of them is load-bearing:
143
+ *
144
+ * - ACCOUNT SCOPE, because an id minted for one account is never assumed to be
145
+ * readable by another (see {@link KimiMediaUploadRequest.accountScope});
146
+ * - BASE URL (normalized through {@link filesUploadUrl}, so a trailing slash
147
+ * cannot split one endpoint into two slots), because two regions or two
148
+ * deployments are two distinct file stores;
149
+ * - MEDIA KIND and MEDIA TYPE, because the same bytes uploaded as an image and
150
+ * as a video are two different resources as far as the purpose is concerned;
151
+ * - CONTENT SHA-256, so identical bytes reuse one upload and any change at all
152
+ * misses the cache.
153
+ *
154
+ * The access token is NOT part of it: a key is written to memory only, but a
155
+ * token in a key is a token in the next dump, and the account is already
156
+ * identified by its scope. `|` cannot appear in a scope because the scope is
157
+ * sanitized here.
158
+ */
159
+ export declare function mediaFileCacheKey(input: {
160
+ accountScope: string;
161
+ baseUrl: string;
162
+ mediaType: string;
163
+ data: Uint8Array;
164
+ }): string;
165
+ /**
166
+ * Uploads one media file per distinct key, caching and single-flighting them.
167
+ *
168
+ * Two behaviours are deliberate and easy to get wrong:
169
+ *
170
+ * 1. SINGLE FLIGHT. Concurrent callers with the same key share one request.
171
+ * A caller that aborts stops waiting immediately and gets an AbortError, but
172
+ * the shared request is only cancelled once NO caller is still waiting — so
173
+ * one cancelled turn does not fail another turn that wants the same clip.
174
+ * 2. NO TTL. A successful reference is cached until it is evicted by the LRU
175
+ * ceiling. Inventing an expiry would either expire a live id (a failed turn)
176
+ * or outlive it silently; nothing here measured a lifetime, so nothing here
177
+ * pretends to know one. A reference the service later rejects is dropped with
178
+ * {@link forget} by whoever sees that rejection.
179
+ */
180
+ export declare class KimiMediaFilesUploader {
181
+ private readonly fetchFn;
182
+ private readonly timeoutMs;
183
+ private readonly coordinator;
184
+ constructor(options?: KimiMediaUploadOptions);
185
+ get size(): number;
186
+ upload(request: KimiMediaUploadRequest): Promise<string>;
187
+ /** Drop a dead reference so the next attempt uploads again. */
188
+ forget(request: Omit<KimiMediaUploadRequest, 'accessToken'>): boolean;
189
+ clear(): void;
190
+ private resolve;
191
+ private performUpload;
192
+ private transportFailure;
193
+ private settle;
194
+ }
195
+ /** One uploader with the default transport and cache size. */
196
+ export declare function createMediaFilesUploader(options?: KimiMediaUploadOptions): KimiMediaFilesUploader;
197
+ /**
198
+ * The process-wide uploader the adapter will use.
199
+ *
200
+ * Shared on purpose: the cache is the whole point, and a per-call instance would
201
+ * upload the same clip once per turn.
202
+ */
203
+ export declare const kimiMediaFiles: KimiMediaFilesUploader;
204
+ /** Upload one file through the shared uploader. */
205
+ export declare function uploadMediaFile(request: KimiMediaUploadRequest): Promise<string>;
206
+ //# sourceMappingURL=media-files.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C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAQ;IAClC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAsC;gBAEtD,OAAO,GAAE,sBAA2B;IAOhD,IAAI,IAAI,IAAI,MAAM,CAAiC;IAE7C,MAAM,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,MAAM,CAAC;IAM9D,+DAA+D;IAC/D,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,sBAAsB,EAAE,aAAa,CAAC,GAAG,OAAO;IAcrE,KAAK,IAAI,IAAI;IAEb,OAAO,CAAC,OAAO;YAiCD,aAAa;IA2C3B,OAAO,CAAC,gBAAgB;IAqBxB,OAAO,CAAC,MAAM;CAwDf;AAED,8DAA8D;AAC9D,wBAAgB,wBAAwB,CAAC,OAAO,GAAE,sBAA2B,GAAG,sBAAsB,CAErG;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc,wBAA6B,CAAA;AAExD,mDAAmD;AACnD,wBAAgB,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,MAAM,CAAC,CAEhF"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Kimi Code's video vocabulary, re-exported from the shared video modules.
3
+ *
4
+ * The traversal, byte budgeting and base64 encoding live in
5
+ * `../common/video-request.ts` now that a second line accepts video too; a
6
+ * second copy of the module augmentation would be a conflicting redeclaration
7
+ * of the same `video` key.
8
+ *
9
+ * What stays here is the part that is genuinely Kimi's: the models that take
10
+ * video, and the wording used when one cannot be sent.
11
+ */
12
+ import { type VideoOmissionReason } from '../common/video.ts';
13
+ export { VIDEO_MEDIA_TYPES, base64LengthOf, formatMediaBytes, isVideoMediaType, videoBlockLabel, videoDataUrl, type VideoAttachmentRef, type VideoBlock, type VideoOmissionReason, } from '../common/video.ts';
14
+ /**
15
+ * Deterministic text standing in for a video the request cannot carry.
16
+ *
17
+ * The model is told the video existed and why it is absent, so it asks for a
18
+ * description instead of answering as though the message were empty.
19
+ * @param reason - why the occurrence was omitted.
20
+ * @param label - display name or attachment id, when known.
21
+ */
22
+ export declare function videoOmissionText(reason: VideoOmissionReason, label?: string): string;
23
+ //# sourceMappingURL=modalities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modalities.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/modalities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAqB,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAEhF,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,KAAK,kBAAkB,EACvB,KAAK,UAAU,EACf,KAAK,mBAAmB,GACzB,MAAM,oBAAoB,CAAA;AAE3B;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,mBAAmB,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAYrF"}
@@ -0,0 +1,125 @@
1
+ /**
2
+ * Static catalog of the models the Kimi Code subscription serves.
3
+ *
4
+ * Transcribed from the official model table at
5
+ * https://www.kimi.com/code/docs/en/kimi-code/models.html. Model version names
6
+ * (K3, K2.8 Preview) are NOT valid request ids: only the ids below may appear in
7
+ * a request body, or the service answers 401 "Your model id does not exist".
8
+ */
9
+ import type { KimiCodeReasoningEffort, KimiCodeThinkingType } from '../../shared/kimi-code-contracts.ts';
10
+ /**
11
+ * Request-body ceiling the 1M-context tier defaults to.
12
+ *
13
+ * The 2 MB figure this line used to apply to every model comes from the gateway's
14
+ * generic error example and was never measured against a 1M window, while a real
15
+ * 1M session (3-4 MB of Chinese prose) hits it long before the window is full.
16
+ * The official kimi-cli ships no byte guard at all, so the ceiling is this
17
+ * plugin's own safety net rather than a client requirement.
18
+ *
19
+ * 8 MiB is sized so bytes never become the binding limit for a 1M session: that
20
+ * window's body is roughly 4 MB of English or 4.5 MB of dense Chinese, so 8 MiB
21
+ * leaves nearly double the headroom. What binds first is the model's own token
22
+ * window — the service answers "Your request exceeded model token limit", which
23
+ * common/context-overflow.ts already normalizes to CONTEXT_WINDOW_EXCEEDED, so
24
+ * compaction and retry behave exactly as they did before.
25
+ *
26
+ * The number is still an UPPER BOUND pending measurement, not a documented
27
+ * gateway limit: a deployment that has measured its own gateway pins the real
28
+ * figure with DSH_KIMI_CODE_MAX_BODY_BYTES. The 256K tier keeps 2 MB, where the
29
+ * old ceiling and the window line up.
30
+ */
31
+ export declare const LONG_CONTEXT_MESSAGE_BODY_BYTES: number;
32
+ /** One model the Kimi Code endpoint serves to subscription accounts. */
33
+ export interface KimiCodeCatalogModel {
34
+ /** Exact model id to put on the wire. */
35
+ id: string;
36
+ /** Display name shown in the picker. */
37
+ name: string;
38
+ /** Marketing version the id maps to, e.g. K3. */
39
+ version: string;
40
+ /**
41
+ * Context window used unless the user overrides it.
42
+ *
43
+ * For `k3` this is deliberately the Moderato-tier 256K bound rather than the
44
+ * 1M the model can reach: the server rejects a request that exceeds the
45
+ * signed-in plan's entitlement with a 401, so a session that silently grew
46
+ * past 256K on a Moderato account would fail hard instead of compacting.
47
+ * Allegretto-and-above users raise it with the context-window override.
48
+ */
49
+ contextWindow: number;
50
+ /** Context the highest tier unlocks, when it is larger than {@link contextWindow}. */
51
+ maxContextWindow: number | null;
52
+ /** Floor for the dynamic wire budget, NOT a ceiling or DSH defaultMaxTokens. */
53
+ maxTokens: number;
54
+ /**
55
+ * Local default for the gateway request-body ceiling, graded by context tier.
56
+ *
57
+ * This is the per-model default {@link maxRequestBodyBytesFor} returns when no
58
+ * environment override is set. It is NOT a documented gateway limit: the 1M
59
+ * tier's 8 MiB is a still-unmeasured upper bound (see
60
+ * {@link LONG_CONTEXT_MESSAGE_BODY_BYTES}), and the 256K tier keeps the 2 MiB
61
+ * figure this line applied to every model before the split.
62
+ */
63
+ maxRequestBodyBytes: number;
64
+ /** Input the model accepts; DSH only maps the text and image entries. */
65
+ inputModalities: readonly ('text' | 'image' | 'video')[];
66
+ /** Thinking levels the model accepts, in escalating order. */
67
+ reasoningEfforts: readonly KimiCodeReasoningEffort[];
68
+ /** Thinking level used when the conversation does not pick one. */
69
+ defaultReasoningEffort: KimiCodeReasoningEffort | null;
70
+ /**
71
+ * How the model handles thinking, when the official table states it.
72
+ *
73
+ * `only` means the model reasons at every level and the service rejects a
74
+ * disabled-thinking request with HTTP 400, so its effort list must never be
75
+ * offered with `none` in it. Absent for every model whose table entry does
76
+ * not say, which is not the same as "can be switched off".
77
+ */
78
+ thinkingType?: KimiCodeThinkingType;
79
+ /** Subscription tier needed for the full model, when not every member has it. */
80
+ minimumPlan: string | null;
81
+ /** Subscription tier needed for the full context window, when it differs. */
82
+ contextPlan: string | null;
83
+ /** One-line description from the official table. */
84
+ description: string;
85
+ /**
86
+ * Whether the model accepts message-level tool declarations.
87
+ *
88
+ * Taken from the capability list the official client ships in its own managed
89
+ * model table, which is more specific than the wire documentation (that names
90
+ * K3 alone, because it describes the K3 request schema):
91
+ *
92
+ * - k3, k3-256k, kimi-for-coding -> declared;
93
+ * - kimi-for-coding-highspeed -> NOT declared.
94
+ *
95
+ * The live `/v1/models` listing remains authoritative when it speaks: its own
96
+ * `supports_dynamic_tools` overrides this flag, including to turn it off.
97
+ */
98
+ supportsDynamicTools: boolean;
99
+ /**
100
+ * Relative quota cost of this model against the cheapest one.
101
+ *
102
+ * `null` where the official table publishes no multiplier for the id. The
103
+ * number is never guessed: this field is the only place a user can see why
104
+ * one model spends quota faster than another, so an invented 1x would
105
+ * understate a model that is really 2x or 3x.
106
+ */
107
+ quotaMultiplier: number | null;
108
+ /** How fast the model emits output. */
109
+ speed: 'regular' | 'highspeed';
110
+ }
111
+ /**
112
+ * The ids the subscription serves today.
113
+ *
114
+ * `kimi-for-coding` is the alias that never changes: Moonshot upgrades the model
115
+ * behind it in place (K2.7 Code became K2.8 Preview without a config change), so
116
+ * this entry is the durable default a user can leave selected.
117
+ */
118
+ export declare const KIMI_CODE_MODELS: readonly KimiCodeCatalogModel[];
119
+ /** Registry entry for one model id, or undefined when the id is unknown. */
120
+ export declare function kimiCodeModelDef(modelId: string): KimiCodeCatalogModel | undefined;
121
+ /** Membership test for one known model id. */
122
+ export declare function isKimiCodeModelId(value: unknown): boolean;
123
+ /** Display name for one model id, falling back to the raw id so nothing is hidden. */
124
+ export declare function kimiCodeModelName(modelId: string): string;
125
+ //# sourceMappingURL=model-catalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model-catalog.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/model-catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAA;AAGxG;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,+BAA+B,QAAmB,CAAA;AAE/D,wEAAwE;AACxE,MAAM,WAAW,oBAAoB;IACnC,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAA;IACV,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAA;IACZ,iDAAiD;IACjD,OAAO,EAAE,MAAM,CAAA;IACf;;;;;;;;OAQG;IACH,aAAa,EAAE,MAAM,CAAA;IACrB,sFAAsF;IACtF,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAA;IAC/B,gFAAgF;IAChF,SAAS,EAAE,MAAM,CAAA;IACjB;;;;;;;;OAQG;IACH,mBAAmB,EAAE,MAAM,CAAA;IAC3B,yEAAyE;IACzE,eAAe,EAAE,SAAS,CAAC,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC,EAAE,CAAA;IACxD,8DAA8D;IAC9D,gBAAgB,EAAE,SAAS,uBAAuB,EAAE,CAAA;IACpD,mEAAmE;IACnE,sBAAsB,EAAE,uBAAuB,GAAG,IAAI,CAAA;IACtD;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,oBAAoB,CAAA;IACnC,iFAAiF;IACjF,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,6EAA6E;IAC7E,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,oDAAoD;IACpD,WAAW,EAAE,MAAM,CAAA;IACnB;;;;;;;;;;;;OAYG;IACH,oBAAoB,EAAE,OAAO,CAAA;IAC7B;;;;;;;OAOG;IACH,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,uCAAuC;IACvC,KAAK,EAAE,SAAS,GAAG,WAAW,CAAA;CAC/B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,oBAAoB,EAqJ3D,CAAA;AAID,4EAA4E;AAC5E,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,oBAAoB,GAAG,SAAS,CAElF;AAED,8CAA8C;AAC9C,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAEzD;AAED,sFAAsF;AACtF,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEzD"}
@@ -0,0 +1,213 @@
1
+ import { FileCredentialStore, type KimiCodeCredentials } from './token-store.ts';
2
+ import type { KimiCodeLoginFlowStatus, KimiCodeRegion } from '../../shared/kimi-code-contracts.ts';
3
+ /** Raised when the stored refresh token was rejected and a new login is required. */
4
+ export declare class KimiCodeUnauthorizedError extends Error {
5
+ constructor(message: string);
6
+ }
7
+ /** Raised when a transient failure outlived its retry budget. */
8
+ export declare class KimiCodeRetryableError extends Error {
9
+ readonly cause?: unknown | undefined;
10
+ readonly status?: number | undefined;
11
+ constructor(message: string, cause?: unknown | undefined, status?: number | undefined);
12
+ }
13
+ /** A non-transient OAuth response; repeating the same request cannot repair it. */
14
+ export declare class KimiCodeOAuthError extends Error {
15
+ readonly status: number;
16
+ readonly cause?: unknown | undefined;
17
+ constructor(message: string, status: number, cause?: unknown | undefined);
18
+ }
19
+ /** Raised when the user denied the device authorization request. */
20
+ export declare class KimiCodeAccessDeniedError extends Error {
21
+ constructor(message: string);
22
+ }
23
+ /** Test seam: forget every remembered rejection. */
24
+ export declare function resetRefreshRejections(): void;
25
+ /**
26
+ * Whether the given refresh token was recently rejected by the service.
27
+ *
28
+ * The settings card uses this to say "sign in again" instead of showing an
29
+ * account that merely looks signed in while every call is failing.
30
+ */
31
+ export declare function isRefreshTokenRejected(refreshToken: string): boolean;
32
+ /**
33
+ * Extra headers the deployment supplies through KIMI_CODE_CUSTOM_HEADERS.
34
+ *
35
+ * The format is the official client's: newline-separated `Name: Value` lines,
36
+ * exactly as `ANTHROPIC_CUSTOM_HEADERS` carries them. A line without a colon
37
+ * is skipped, and both the name and the value are trimmed. The name keeps the
38
+ * casing the deployment wrote, because that is the header the deployment
39
+ * expects to see on the wire.
40
+ *
41
+ * The value is filtered through {@link asciiHeaderValue}, so a value with
42
+ * nothing printable left in it is dropped instead of being sent as an empty
43
+ * header.
44
+ *
45
+ * These headers form the LOWEST-precedence layer: the Kimi device identity
46
+ * headers and the caller's own headers both override them.
47
+ *
48
+ * @param env environment the variable is read from, injectable for tests.
49
+ */
50
+ export declare function parseKimiCodeCustomHeaders(env?: NodeJS.ProcessEnv): Record<string, string>;
51
+ /**
52
+ * Read the stable device id, creating it exactly once.
53
+ *
54
+ * The managed service treats this as the installation's identity. It is not a
55
+ * secret; it only has to stay stable, so a failed write degrades to a
56
+ * per-process value instead of failing the login.
57
+ */
58
+ export declare function getDeviceId(): Promise<string>;
59
+ /**
60
+ * Identity headers every Kimi Code OAuth and account request carries.
61
+ *
62
+ * Three layers, lowest precedence first:
63
+ *
64
+ * 1. the deployment's own `KIMI_CODE_CUSTOM_HEADERS`, so a gateway in front of
65
+ * this route can ask for one extra header without a plugin release;
66
+ * 2. the Kimi device identity, which the service uses to attribute usage to an
67
+ * installation;
68
+ * 3. the caller's own headers, which carry the credentials.
69
+ *
70
+ * A header name is matched across the layers without regard to case, so a
71
+ * custom `User-Agent` cannot sit next to the identity `user-agent` and have
72
+ * the last value win by accident: the higher layer replaces the lower one
73
+ * outright instead of adding a second copy of the same header.
74
+ */
75
+ export declare function kimiIdentityHeaders(extra?: Record<string, string>): Promise<Record<string, string>>;
76
+ /** Parsed device authorization response. */
77
+ export interface DeviceAuthorization {
78
+ userCode: string;
79
+ deviceCode: string;
80
+ verificationUri: string;
81
+ verificationUriComplete: string;
82
+ expiresIn: number;
83
+ interval: number;
84
+ }
85
+ /**
86
+ * Start a device authorization (RFC 8628 section 3.1).
87
+ *
88
+ * A public client sends only its `client_id`; no scope, no PKCE.
89
+ */
90
+ export declare function requestDeviceAuthorization(options?: {
91
+ fetchFn?: typeof fetch;
92
+ signal?: AbortSignal;
93
+ region?: KimiCodeRegion;
94
+ }): Promise<{
95
+ authorization: DeviceAuthorization;
96
+ host: string;
97
+ }>;
98
+ /** Identity claims a Kimi token carries about the signed-in account. */
99
+ export interface KimiTokenIdentity {
100
+ userId?: string;
101
+ email?: string;
102
+ /**
103
+ * Display name, when the issuer puts one in the token.
104
+ *
105
+ * It usually does not — the nickname is served by `/me` — but a token that
106
+ * names the account should be believed over the fallback the pool would
107
+ * otherwise mint (`账号 N`), and reading it here costs no request.
108
+ */
109
+ nickname?: string;
110
+ }
111
+ /**
112
+ * Decode one JWT payload without verifying it.
113
+ *
114
+ * Kimi's access and refresh tokens are JWTs whose payload names the account,
115
+ * and there is NO account-profile endpoint on the coding API — the identity
116
+ * exists only inside the token. The claims are read for display only and the
117
+ * token itself is what authenticates, so no signature check applies here.
118
+ */
119
+ export declare function decodeJwtPayload(token: string): Record<string, unknown> | undefined;
120
+ /**
121
+ * Account identity carried by a token pair.
122
+ *
123
+ * `user_id` is preferred across BOTH tokens before `sub` is considered: the two
124
+ * claims share an issuer namespace but `sub` is the weaker one, so a refresh
125
+ * token's `user_id` must beat an access token's `sub`.
126
+ */
127
+ export declare function identityFromTokens(accessToken: string, refreshToken?: string): KimiTokenIdentity;
128
+ /** OAuth token response, in the shape the rest of the plugin stores. */
129
+ export interface OAuthToken {
130
+ accessToken: string;
131
+ refreshToken: string;
132
+ expiresAt: number;
133
+ expiresIn: number;
134
+ scope: string;
135
+ tokenType: string;
136
+ }
137
+ /** How long before expiry a token must be replaced, from its own lifetime. */
138
+ export declare function refreshThresholdMs(expiresIn: number): number;
139
+ /**
140
+ * Refresh an access token, with the official client's bounded retry.
141
+ *
142
+ * Only a transient status or a transport failure is retried; a 401/403 (or an
143
+ * `invalid_grant` body) is a verdict that the refresh token is dead and stops
144
+ * immediately, because retrying it can never succeed.
145
+ *
146
+ * `maxAttempts` states the budget explicitly. A caller that already owns a
147
+ * retry loop — the harness retrying a model request — sets it to 1, so the two
148
+ * budgets do not multiply: the inner loop would otherwise spend the upstream
149
+ * three times over on every attempt the outer loop already counts.
150
+ */
151
+ export declare function refreshAccessToken(refreshToken: string, options?: {
152
+ fetchFn?: typeof fetch;
153
+ signal?: AbortSignal;
154
+ host?: string;
155
+ region?: KimiCodeRegion;
156
+ maxAttempts?: number;
157
+ }): Promise<OAuthToken>;
158
+ export interface EnsureTokenOptions {
159
+ fetchFn?: typeof fetch;
160
+ signal?: AbortSignal;
161
+ /** Refresh even when the current token is not near expiry. */
162
+ force?: boolean;
163
+ /**
164
+ * How many attempts the refresh may spend, including the first.
165
+ *
166
+ * Absent means {@link REFRESH_MAX_RETRIES}. A caller that owns its own retry
167
+ * loop states its budget here so the two do not multiply.
168
+ */
169
+ maxAttempts?: number;
170
+ }
171
+ /**
172
+ * Return a usable access token, refreshing and persisting when needed.
173
+ *
174
+ * Concurrent callers share one refresh request: a subscription is rate limited,
175
+ * and a burst of tool calls at token expiry would otherwise each try to rotate
176
+ * the same refresh token.
177
+ */
178
+ export declare function ensureAccessToken(store: FileCredentialStore, options?: EnsureTokenOptions): Promise<KimiCodeCredentials>;
179
+ export declare function getWebLoginStatus(): KimiCodeLoginFlowStatus;
180
+ /** Reset the flow so a cancelled attempt cannot keep a later one from starting. */
181
+ export declare function resetWebLogin(): void;
182
+ export declare function openBrowser(url: string): void;
183
+ /**
184
+ * Start the browser sign-in.
185
+ *
186
+ * Resolves immediately with the flow state the settings card polls; the device
187
+ * code is fetched, opened, and polled in the background so the HTTP request
188
+ * behind the button never has to stay open for the whole authorization.
189
+ */
190
+ export declare function beginWebLogin(store: FileCredentialStore, options?: {
191
+ fetchFn?: typeof fetch;
192
+ openBrowser?: (url: string) => void;
193
+ region?: KimiCodeRegion;
194
+ /** Called with the validated credential so a pool can keep every sign-in. */
195
+ onSave?: (credentials: KimiCodeCredentials) => Promise<unknown>;
196
+ /**
197
+ * Best-effort read of who the account is, before the credential is stored.
198
+ *
199
+ * Sign-in itself only proves the token pair; the account's name lives on
200
+ * `/me`. The caller supplies that read here so the first card already shows
201
+ * a name, and a failure leaves the credential exactly as the flow built it.
202
+ */
203
+ enrich?: (credentials: KimiCodeCredentials) => Promise<KimiCodeCredentials>;
204
+ /**
205
+ * Refuse a sign-in that landed on the wrong account, before it is stored.
206
+ *
207
+ * Used by a re-authorization, which names the row it belongs to: the device
208
+ * flow signs in whatever the browser is authenticated as, and accepting a
209
+ * different account would replace a row nobody asked to replace.
210
+ */
211
+ accept?: (credentials: KimiCodeCredentials) => string | null;
212
+ }): Promise<KimiCodeLoginFlowStatus>;
213
+ //# sourceMappingURL=oauth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/oauth.ts"],"names":[],"mappings":"AAgCA,OAAO,EACL,mBAAmB,EAKnB,KAAK,mBAAmB,EACzB,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAA;AAkBlG,qFAAqF;AACrF,qBAAa,yBAA0B,SAAQ,KAAK;gBACtC,OAAO,EAAE,MAAM;CAI5B;AAED,iEAAiE;AACjE,qBAAa,sBAAuB,SAAQ,KAAK;IAClB,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO;IAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM;gBAAnE,OAAO,EAAE,MAA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