@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,143 @@
1
+ import { type CredentialStore } from '../token-store.ts';
2
+ import { type CredentialsRecordSeam } from './credentials-compat.ts';
3
+ import type { PoolStorageBackend, PoolStorageDto, PoolStorageMode } from '../../shared/contracts.ts';
4
+ /** Store a deployment gets when no `poolStorage` is configured anywhere. */
5
+ export declare const DEFAULT_POOL_STORAGE_MODE: PoolStorageMode;
6
+ /**
7
+ * The deployment-wide choice, as the runtime sees it.
8
+ *
9
+ * One plugin instance serves every provider line and one profile carries one
10
+ * `poolStorage`, so the value is read where the lines are built and consulted
11
+ * here. Module state rather than a constructor argument on eleven pools: a
12
+ * parameter would have to be threaded through ten provider constructors (one of
13
+ * which takes no options at all) to describe one deployment-wide decision.
14
+ */
15
+ export interface PoolStorageDefaults {
16
+ /** Where the configured value comes from; read on every resolve. */
17
+ mode?: () => PoolStorageMode;
18
+ /** Awaited before the mode is read, so a choice stored on disk is in place. */
19
+ ready?: () => Promise<void>;
20
+ /**
21
+ * `ctx.credentials`, read on EVERY resolve rather than captured once.
22
+ *
23
+ * A getter because the service is deliberately not in `inject`: nothing orders
24
+ * it before this plugin's `apply`, and a value captured there would send every
25
+ * pool of the process down the "no ctx.credentials service" branch for the rest
26
+ * of the process's life — `poolStorage: 'credentials'` reporting an unusable
27
+ * store on a host that has one.
28
+ */
29
+ credentials?: () => CredentialsRecordSeam | undefined;
30
+ logger?: Pick<Console, 'info' | 'warn'>;
31
+ }
32
+ /** Record the deployment-wide storage choice; call once, before any pool is built. */
33
+ export declare function configurePoolStorage(next: PoolStorageDefaults): void;
34
+ /**
35
+ * Announce that the stored choice changed.
36
+ *
37
+ * Called by the settings route after the new value is on disk; every pool drops
38
+ * the backend it cached and resolves again on its next read.
39
+ */
40
+ export declare function poolStorageChanged(): void;
41
+ /** The revision the current choice stands at. */
42
+ export declare function poolStorageRevision(): number;
43
+ /** The configured mode, without resolving a backend. */
44
+ export declare function poolStorageMode(): PoolStorageMode;
45
+ /** Clear the deployment-wide choice, so one test cannot leak into the next. */
46
+ export declare function resetPoolStorage(): void;
47
+ /** The keyring store as this module needs it: a credential store that can be asked whether it answers. */
48
+ export interface ProbeableKeyringStore<T> extends CredentialStore<T> {
49
+ ping(): Promise<{
50
+ available: boolean;
51
+ reason?: string;
52
+ }>;
53
+ }
54
+ export interface PoolStorageRequest<T> {
55
+ /** Configured choice; defaults to the process-wide {@link configurePoolStorage} value. */
56
+ mode?: PoolStorageMode;
57
+ /** Defaults to `process.platform`; explicit so every branch is testable. */
58
+ platform?: NodeJS.Platform;
59
+ /** Provider label, used only in the error raised on an unsupported platform. */
60
+ displayName: string;
61
+ /** Plain path of the pool document the keyring entry is derived from. */
62
+ poolFile: string;
63
+ /** Keychain / Secret Service service name, as the desktop backends already use it. */
64
+ keychainService: string;
65
+ /** Per-pool keychain account name (the digest of {@link poolFile}). */
66
+ account: string;
67
+ /** Validates and normalizes one whole pool document. */
68
+ parsePoolData: (value: unknown) => T;
69
+ /** `ctx.credentials` when the harness has one; absent otherwise. */
70
+ credentials?: CredentialsRecordSeam;
71
+ logger?: Pick<Console, 'info' | 'warn'>;
72
+ /** Test seam: the Secret Service backend, so a probe result can be supplied. */
73
+ keyring?: ProbeableKeyringStore<T>;
74
+ /**
75
+ * Test seam: the store a Windows or macOS host would use.
76
+ *
77
+ * DPAPI and the Keychain constructors refuse to exist on another platform, so
78
+ * without this the desktop branches could only ever be tested on the desks they
79
+ * belong to — which is how a platform branch ends up untested in CI.
80
+ */
81
+ desktopStore?: CredentialStore<T>;
82
+ }
83
+ export interface PoolStorageResolution<T> {
84
+ store: CredentialStore<T>;
85
+ storage: PoolStorageDto;
86
+ }
87
+ /** Human label of one backend, for the log line and for diagnostics. */
88
+ export declare function poolStorageBackendLabel(backend: PoolStorageBackend): string;
89
+ /** Whether the backend encrypts the document at rest. */
90
+ export declare function poolStorageEncrypted(backend: PoolStorageBackend): boolean;
91
+ /**
92
+ * The pool document as a record in DSH's own credential store.
93
+ *
94
+ * Stored through the seam's record half (see `credentials-compat.ts`): the
95
+ * document is this plugin's own format, and a `grant` payload is exactly the slot
96
+ * the seam keeps for a value only its owner can interpret.
97
+ *
98
+ * Writes are LAST-WRITER-WINS, and honestly so. `modifyRecord` is the seam's only
99
+ * write path and it does hand back the record as it stands under its lock, but a
100
+ * whole pool document is written from one in-memory copy: a second process that
101
+ * saved between this process's read and this write is overwritten. The lock makes
102
+ * the write atomic, not the transaction. This is the same guarantee the keyring
103
+ * backend has always given, and exactly what the `keyring` option gives — one
104
+ * process is the normal case (one `DSH_HOME`, one host), and it is stated here
105
+ * rather than implied away.
106
+ */
107
+ export declare class CredentialsRecordStore<T> implements CredentialStore<T> {
108
+ private readonly seam;
109
+ private readonly key;
110
+ private readonly parse;
111
+ constructor(seam: CredentialsRecordSeam, key: string, parse: (value: unknown) => T);
112
+ /** The `<scope>/<id>` address this pool occupies; a location, never a credential. */
113
+ recordKey(): string;
114
+ load(): Promise<T | null>;
115
+ save(value: T): Promise<void>;
116
+ clear(): Promise<void>;
117
+ }
118
+ /**
119
+ * Resolve the pool store for one line.
120
+ *
121
+ * Async because `credentials` availability is a runtime fact and the configured
122
+ * value may still be loading from disk; callers hold the promise rather than the
123
+ * store (see `AccountPoolCore`).
124
+ */
125
+ export declare function resolvePoolStorage<T>(request: PoolStorageRequest<T>): Promise<PoolStorageResolution<T>>;
126
+ /**
127
+ * The store a caller-supplied backend stands in for, on this platform.
128
+ *
129
+ * `AccountPoolHooks.backend` replaces the STORE, not the choice, and adoption
130
+ * harnesses use it without a `storage` to go with it. Falling back to
131
+ * `{ backend: 'keyring', encrypted: false }` there described a backend that cannot
132
+ * exist (the platform keyring is encrypted on every platform it exists on) and the
133
+ * wrong one on Windows or macOS.
134
+ */
135
+ export declare function poolStorageBackendForPlatform(platform: NodeJS.Platform): PoolStorageBackend;
136
+ /**
137
+ * Human description of where a resolved pool lives, for diagnostics.
138
+ *
139
+ * A location, never a credential: the sentence the pool printed before, now
140
+ * derived from the backend that actually won.
141
+ */
142
+ export declare function describePoolStoragePath(platform: NodeJS.Platform, poolFile: string, storage: PoolStorageDto, keychainService: string, account: string): string;
143
+ //# sourceMappingURL=pool-storage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pool-storage.d.ts","sourceRoot":"","sources":["../../../../src/host/common/pool-storage.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Bounded coordination for requests that share an upstream prefix cache.
3
+ * A missing warm TTL still permits in-flight de-duplication, but never claims
4
+ * that a completed request left the service warm.
5
+ */
6
+ export interface PrefixRequestLease {
7
+ readonly leader: boolean;
8
+ release(): void;
9
+ markWarm(): void;
10
+ }
11
+ export interface PrefixRequestCoordinatorOptions {
12
+ readonly waitMs?: number;
13
+ readonly maxGroups?: number;
14
+ readonly now?: () => number;
15
+ }
16
+ export declare class PrefixRequestCoordinator {
17
+ private readonly leaders;
18
+ private readonly bursts;
19
+ private readonly mainHeaders;
20
+ private readonly warm;
21
+ private readonly waitMs;
22
+ private readonly maxGroups;
23
+ private readonly now;
24
+ constructor(options?: PrefixRequestCoordinatorOptions);
25
+ /** Join or lead one cold prefix group. */
26
+ acquire(groupKey: string | undefined, signal: AbortSignal, warmTtlMs?: number): Promise<PrefixRequestLease>;
27
+ /** Serialize first-turn bursts on one account/model without a warm cache claim. */
28
+ acquireBurst(key: string, signal: AbortSignal): Promise<PrefixRequestLease>;
29
+ /** A main request owns the prefill slot until its response headers arrive. */
30
+ registerMainSession(sessionId: string): PrefixRequestLease;
31
+ /** An auxiliary title request waits briefly for the main request's headers. */
32
+ waitForMainSession(sessionId: string, signal: AbortSignal): Promise<void>;
33
+ isWarm(groupKey: string, ttlMs: number, at?: number): boolean;
34
+ /** Release every waiter and clear all process-local evidence. */
35
+ reset(): void;
36
+ private open;
37
+ /** Wait for a leader, the bounded budget, or caller cancellation; clean every listener. */
38
+ private race;
39
+ }
40
+ /** Cheap structural gate for auxiliary calls; provider-specific legacy probes may extend it. */
41
+ export declare function isAuxiliaryRequest(options: {
42
+ readonly purpose?: unknown;
43
+ }): boolean;
44
+ /** Coordinate one fetch through response headers, releasing on every outcome. */
45
+ export declare function fetchWithPrefixCoordination(fetchFn: typeof fetch, coordinator: PrefixRequestCoordinator, groupKey: string | undefined, warmTtlMs: number | undefined, input: Parameters<typeof fetch>[0], init?: Parameters<typeof fetch>[1]): Promise<Response>;
46
+ //# sourceMappingURL=prefix-request-coordinator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prefix-request-coordinator.d.ts","sourceRoot":"","sources":["../../../../src/host/common/prefix-request-coordinator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;IACxB,OAAO,IAAI,IAAI,CAAA;IACf,QAAQ,IAAI,IAAI,CAAA;CACjB;AAcD,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;CAC5B;AAED,qBAAa,wBAAwB;IACnC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAiC;IACzD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiC;IACxD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAiC;IAC7D,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA4B;IACjD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAQ;IAC/B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAQ;IAClC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAc;gBAEtB,OAAO,GAAE,+BAAoC;IAMzD,0CAA0C;IACpC,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAYjH,mFAAmF;IAC7E,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAYjF,8EAA8E;IAC9E,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,kBAAkB;IAO1D,+EAA+E;IACzE,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAK/E,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,GAAE,MAAmB,GAAG,OAAO;IAKzE,iEAAiE;IACjE,KAAK,IAAI,IAAI;IAQb,OAAO,CAAC,IAAI;IA2BZ,2FAA2F;YAC7E,IAAI;CAoBnB;AAED,gGAAgG;AAChG,wBAAgB,kBAAkB,CAAC,OAAO,EAAE;IAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAEnF;AAED,iFAAiF;AACjF,wBAAsB,2BAA2B,CAC/C,OAAO,EAAE,OAAO,KAAK,EACrB,WAAW,EAAE,wBAAwB,EACrC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,KAAK,EAAE,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,EAClC,IAAI,CAAC,EAAE,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,GACjC,OAAO,CAAC,QAAQ,CAAC,CAqBnB"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Stable bootstrap-prefix ordering for providers that reuse content prefixes.
3
+ * Dynamic mid-conversation updates stay at their original history position;
4
+ * only the initial harness bootstrap run is normalised ahead of the user task.
5
+ */
6
+ import { type GenerateOptions, type Message } from './llm-compat.ts';
7
+ import { type PromptCacheOverride } from './prompt-cache-policy.ts';
8
+ /** Stability tier for an initial bootstrap reminder; null means dynamic/history-bound. */
9
+ export declare function classifyBootstrapUserMessage(message: Message): 2 | 3 | 4 | null;
10
+ /** Normalise the initial bootstrap run, including the post-compaction shape. */
11
+ export declare function orderStaticPrefixMessages(messages: readonly Message[]): Message[];
12
+ /** Apply the policy at an adapter boundary; disabled providers keep object identity. */
13
+ export declare function withStaticPrefixOrdering<T extends GenerateOptions>(provider: string, options: T, override?: PromptCacheOverride): T;
14
+ /** Provider-neutral identity for requests that may share one cold prefix. */
15
+ export declare function sharedPrefixGroupKey(provider: string, options: GenerateOptions, namespace: string, accountScope: string): string | undefined;
16
+ export interface SharedPrefixSnapshot {
17
+ readonly systemPromptHash: string | null;
18
+ readonly toolsHash: string | null;
19
+ readonly cacheKey: string | null;
20
+ }
21
+ export type SharedPrefixDriftCause = 'first-request' | 'stable' | 'system-prompt' | 'tools' | 'cache-key' | 'cold-key';
22
+ /** Pure prefix-diff policy shared by provider-specific telemetry stores. */
23
+ export declare function classifyPrefixDrift(previous: SharedPrefixSnapshot | undefined, current: SharedPrefixSnapshot): SharedPrefixDriftCause;
24
+ //# sourceMappingURL=prefix-stability.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prefix-stability.d.ts","sourceRoot":"","sources":["../../../../src/host/common/prefix-stability.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,OAAO,EACb,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAuB,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAyBxF,0FAA0F;AAC1F,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,OAAO,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAgB/E;AAsCD,gFAAgF;AAChF,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,OAAO,EAAE,CAyDjF;AAED,wFAAwF;AACxF,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,eAAe,EAChE,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,CAAC,EACV,QAAQ,CAAC,EAAE,mBAAmB,GAC7B,CAAC,CAKH;AAsBD,6EAA6E;AAC7E,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,eAAe,EACxB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,GACnB,MAAM,GAAG,SAAS,CA0BpB;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAA;IACxC,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;CACjC;AAED,MAAM,MAAM,sBAAsB,GAAG,eAAe,GAAG,QAAQ,GAAG,eAAe,GAAG,OAAO,GAAG,WAAW,GAAG,UAAU,CAAA;AAEtH,4EAA4E;AAC5E,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,oBAAoB,GAAG,SAAS,EAC1C,OAAO,EAAE,oBAAoB,GAC5B,sBAAsB,CAOxB"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Provider-owned prompt-cache semantics, separated from reusable mechanisms.
3
+ *
4
+ * A cache read counter is not proof that a deployment supports cache keys,
5
+ * account affinity, or keepalive traffic. This registry is therefore the single
6
+ * place where those assumptions become explicit. Missing evidence disables the
7
+ * corresponding behaviour; a deployment override may enable it only when its
8
+ * required facts are present too.
9
+ */
10
+ export type PromptCacheMode = 'automatic' | 'explicit' | 'none';
11
+ export type PromptCacheScope = 'account' | 'shared' | 'unknown';
12
+ export type ColdStartMode = 'off' | 'in-flight' | 'warm';
13
+ export interface PromptCachePolicy {
14
+ readonly mode: PromptCacheMode;
15
+ readonly scope: PromptCacheScope;
16
+ readonly ttlMs?: number;
17
+ readonly staticPrefix: boolean;
18
+ readonly coldStart: ColdStartMode;
19
+ readonly stickyImages: boolean;
20
+ readonly affinity: boolean;
21
+ readonly waitWarmup: boolean;
22
+ readonly hint: boolean;
23
+ /** Keep the cache warm while background jobs run too; only meaningful with waitWarmup. */
24
+ readonly waitJobs?: boolean;
25
+ }
26
+ export type PromptCacheOverride = Partial<Omit<PromptCachePolicy, 'ttlMs'>> & {
27
+ ttlMs?: number;
28
+ };
29
+ export type PromptCacheOverrides = Readonly<Record<string, PromptCacheOverride>>;
30
+ /** Built-in facts already represented by a line's mapper, adapter, or official client. */
31
+ export declare const PROMPT_CACHE_POLICIES: Readonly<Record<string, PromptCachePolicy>>;
32
+ /** Validate one provider override without silently dropping unknown keys. */
33
+ export declare function parsePromptCacheOverride(provider: string, value: unknown): PromptCacheOverride;
34
+ /** Validate a whole config-owned map. Undefined means no overrides. */
35
+ export declare function parsePromptCacheOverrides(value: unknown): PromptCacheOverrides;
36
+ /** The table key a provider id resolves to: itself, or the line id a route id is an alias of. */
37
+ export declare function promptCachePolicyKey(provider: string): string;
38
+ /** Resolve one line, applying an already-validated or config-shaped override. */
39
+ export declare function promptCachePolicyOf(provider: string, override?: PromptCacheOverride): PromptCachePolicy;
40
+ /** Resolve the built-in matrix plus optional deployment overrides. */
41
+ export declare function resolvePromptCachePolicies(overrides?: unknown): Readonly<Record<string, PromptCachePolicy>>;
42
+ /** A volatile config field or an ordinary value, matching the host's loader seam. */
43
+ export type PromptCacheConfigField<T> = T | {
44
+ get(): T | undefined;
45
+ } | undefined;
46
+ export declare function readPromptCacheConfigField<T>(field: PromptCacheConfigField<T>): T | undefined;
47
+ //# sourceMappingURL=prompt-cache-policy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-cache-policy.d.ts","sourceRoot":"","sources":["../../../../src/host/common/prompt-cache-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,CAAA;AAC/D,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAA;AAC/D,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,WAAW,GAAG,MAAM,CAAA;AAExD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAA;IAC9B,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAA;IAChC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAA;IAC9B,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAA;IACjC,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAA;IAC9B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAA;IAC5B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;IACtB,0FAA0F;IAC1F,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAC5B;AAED,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAChG,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAA;AA8BhF,0FAA0F;AAC1F,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAwD5E,CAAA;AAaF,6EAA6E;AAC7E,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,mBAAmB,CAsB9F;AAED,uEAAuE;AACvE,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,oBAAoB,CAS9E;AAcD,iGAAiG;AACjG,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE7D;AAED,iFAAiF;AACjF,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,mBAAmB,GAAG,iBAAiB,CAIvG;AAED,sEAAsE;AACtE,wBAAgB,0BAA0B,CAAC,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAM3G;AAED,qFAAqF;AACrF,MAAM,MAAM,sBAAsB,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,GAAG,IAAI,CAAC,GAAG,SAAS,CAAA;CAAE,GAAG,SAAS,CAAA;AAEhF,wBAAgB,0BAA0B,CAAC,CAAC,EAAE,KAAK,EAAE,sBAAsB,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,SAAS,CAK7F"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Rough prompt-size estimation for one request.
3
+ *
4
+ * Shared because every line uses it for the same purpose: keeping `max_tokens`
5
+ * from making a request the service will reject outright, before a single token is
6
+ * spent. The service count stays authoritative; this only has to be close enough
7
+ * to leave room.
8
+ *
9
+ * @module dsh-multi-provider/prompt-estimate
10
+ */
11
+ import type { GenerateOptions } from "./llm-compat.ts";
12
+ /**
13
+ * Rough prompt size for one request, in tokens.
14
+ *
15
+ * Derived from the serialized text with the usual ~4 characters per token
16
+ * heuristic. It is deliberately an estimate: the purpose is only to keep
17
+ * `max_tokens` from making a request the service will reject outright, and the
18
+ * service's own count remains authoritative. Undefined is returned for an empty
19
+ * request so the caller leaves the cap alone rather than clamping against zero.
20
+ */
21
+ export declare function estimatedInputTokens(options: GenerateOptions): number | undefined;
22
+ //# sourceMappingURL=prompt-estimate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-estimate.d.ts","sourceRoot":"","sources":["../../../../src/host/common/prompt-estimate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAgBtD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,GAAG,SAAS,CA4BjF"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * One contested provider route, claimed the same way by every line this plugin
3
+ * adds.
4
+ *
5
+ * Each line registers an adapter for a provider id another adapter family may
6
+ * already own — the generic pi-ai provider configured with the same endpoint is
7
+ * the usual rival. Registration is all-or-nothing and DSH rejects a duplicate
8
+ * route, so a claim takes the route when it is free, reports the conflict when
9
+ * it is not, and claims it again as soon as the owner releases it.
10
+ *
11
+ * A composition without the event seam (or a reduced test context) still serves
12
+ * the route; only the automatic claim on release is unavailable.
13
+ */
14
+ import type { Context } from '@deepseek-ai/cordis';
15
+ import type { LlmRuntime } from '@deepseek-ai/dsh-llm';
16
+ /** `ctx.llm.registerAdapter`, the seam every line claims its route through. */
17
+ type RegisterAdapter = LlmRuntime['registerAdapter'];
18
+ /** The harness adapter type `registerAdapter` accepts, without naming any adapter class. */
19
+ type ProviderRouteAdapter = Parameters<RegisterAdapter>[1];
20
+ /** Live claim of one provider route, as the line's status route reads it. */
21
+ export interface ProviderRouteClaim {
22
+ /** Whether this plugin currently owns the route. */
23
+ serving(): boolean;
24
+ /** Why the route is served by another adapter, or `null` while this plugin owns it. */
25
+ conflict(): string | null;
26
+ /** Release the update watch (if any) and then the registration handle, in that order. */
27
+ dispose(): void;
28
+ }
29
+ /**
30
+ * Claim one provider route for this plugin and keep claiming it.
31
+ *
32
+ * The route is taken immediately, and every `llm/adapters-updated` reports the
33
+ * claim again — it is a no-op while the registration is held, and takes the
34
+ * route back once another owner releases it. A rejected claim is remembered
35
+ * rather than thrown, because the line whose route table asks through
36
+ * {@link ProviderRouteClaim.conflict} still has to render.
37
+ * @param ctx - The plugin context owning the `llm` service and the event seam.
38
+ * @param options - The route id, the display label the two log lines name, and the adapter serving it.
39
+ * @returns The claim's state and its disposer.
40
+ */
41
+ export declare function claimProviderRoute(ctx: Context, options: {
42
+ /** The provider route id this plugin contends for. */
43
+ providerId: string;
44
+ /** Display label for that line, interpolated into both lifecycle log lines. */
45
+ label: string;
46
+ /** The adapter instance to register for the route. */
47
+ adapter: ProviderRouteAdapter;
48
+ /**
49
+ * Whether to re-claim the route on `llm/adapters-updated` (default `true`).
50
+ * The Ollama line passes `false`: it has never watched the event, so it
51
+ * keeps its single claim at setup.
52
+ */
53
+ watch?: boolean;
54
+ }): ProviderRouteClaim;
55
+ export {};
56
+ //# sourceMappingURL=provider-route.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-route.d.ts","sourceRoot":"","sources":["../../../../src/host/common/provider-route.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEtD,+EAA+E;AAC/E,KAAK,eAAe,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAA;AAEpD,4FAA4F;AAC5F,KAAK,oBAAoB,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAA;AAK1D,6EAA6E;AAC7E,MAAM,WAAW,kBAAkB;IACjC,oDAAoD;IACpD,OAAO,IAAI,OAAO,CAAA;IAClB,uFAAuF;IACvF,QAAQ,IAAI,MAAM,GAAG,IAAI,CAAA;IACzB,yFAAyF;IACzF,OAAO,IAAI,IAAI,CAAA;CAChB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,OAAO,EACZ,OAAO,EAAE;IACP,sDAAsD;IACtD,UAAU,EAAE,MAAM,CAAA;IAClB,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAA;IACb,sDAAsD;IACtD,OAAO,EAAE,oBAAoB,CAAA;IAC7B;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,GACA,kBAAkB,CAoCpB"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * One quota refresh that runs behind an already-answered status call.
3
+ *
4
+ * A status card used to block on the upstream quota request whenever its
5
+ * snapshot had aged past the line's TTL — measured at up to 3.6 s on a real
6
+ * machine, on a tab whose other work answers in milliseconds. A snapshot that
7
+ * exists can answer immediately instead, with the refresh running behind it.
8
+ *
9
+ * The outcome is remembered here rather than dropped: a refresh that keeps
10
+ * failing would otherwise look exactly like a snapshot that never aged, and the
11
+ * card would show old numbers with no hint of why they stopped moving.
12
+ *
13
+ * The caller still decides whether the snapshot may answer at all. No snapshot,
14
+ * or one belonging to another account, has to be fetched before the card can be
15
+ * rendered — those paths call {@link run} and wait.
16
+ */
17
+ export declare class QuotaRefresh {
18
+ private pending;
19
+ private error;
20
+ /**
21
+ * Start one refresh behind the answer.
22
+ *
23
+ * A refresh that is already running is not duplicated; the caller can see
24
+ * that one is in flight through {@link refreshing} and ask again when it
25
+ * lands.
26
+ */
27
+ start(refresh: () => Promise<unknown>): void;
28
+ /** Run one refresh and wait for it, recording the same outcome. */
29
+ run(refresh: () => Promise<unknown>): Promise<void>;
30
+ /** Whether a refresh started here is still running. */
31
+ get refreshing(): boolean;
32
+ /** Message from the most recent failed refresh, or null when none failed. */
33
+ lastError(): string | null;
34
+ }
35
+ //# sourceMappingURL=quota-refresh.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quota-refresh.d.ts","sourceRoot":"","sources":["../../../../src/host/common/quota-refresh.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,OAAO,CAA6B;IAC5C,OAAO,CAAC,KAAK,CAAsB;IAEnC;;;;;;OAMG;IACH,KAAK,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI;IAa5C,mEAAmE;IAC7D,GAAG,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IASzD,uDAAuD;IACvD,IAAI,UAAU,IAAI,OAAO,CAExB;IAED,6EAA6E;IAC7E,SAAS,IAAI,MAAM,GAAG,IAAI;CAG3B"}
@@ -0,0 +1,24 @@
1
+ /** Learn the reasoning field a concrete OpenAI-compatible endpoint speaks. */
2
+ export declare const KNOWN_REASONING_KEYS: readonly ["reasoning_content", "reasoning_details", "reasoning"];
3
+ export declare class ReasoningKeyDialect {
4
+ private readonly defaultKey;
5
+ private readonly keys;
6
+ private detected;
7
+ constructor(defaultKey?: string, keys?: readonly string[]);
8
+ /** Record an observed field and return its text. Empty strings still teach the key. */
9
+ observe(source: unknown): string | undefined;
10
+ /** Record a previously parsed fragment without re-reading the wire object. */
11
+ observeKey(key: string): void;
12
+ protected learn(key: string): void;
13
+ outboundKey(): string;
14
+ reset(): void;
15
+ }
16
+ /** Provider+endpoint isolation; one gateway's dialect never contaminates another. */
17
+ export declare class ReasoningDialectRegistry {
18
+ private readonly maxEntries;
19
+ private readonly dialects;
20
+ constructor(maxEntries?: number);
21
+ for(provider: string, endpoint: string, defaultKey?: string): ReasoningKeyDialect;
22
+ reset(): void;
23
+ }
24
+ //# sourceMappingURL=reasoning-dialect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reasoning-dialect.d.ts","sourceRoot":"","sources":["../../../../src/host/common/reasoning-dialect.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAE9E,eAAO,MAAM,oBAAoB,kEAAmE,CAAA;AAEpG,qBAAa,mBAAmB;IAI5B,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,IAAI;IAJvB,OAAO,CAAC,QAAQ,CAAoB;gBAGjB,UAAU,GAAE,MAAgC,EAC5C,IAAI,GAAE,SAAS,MAAM,EAAyB;IAGjE,uFAAuF;IACvF,OAAO,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS;IAa5C,8EAA8E;IAC9E,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI7B,SAAS,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIlC,WAAW,IAAI,MAAM;IAIrB,KAAK,IAAI,IAAI;CAGd;AAED,qFAAqF;AACrF,qBAAa,wBAAwB;IAGvB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAFvC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAyC;gBAErC,UAAU,SAAK;IAE5C,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,mBAAmB;IAgBjF,KAAK,IAAI,IAAI;CACd"}
@@ -0,0 +1,2 @@
1
+ export declare function orderReasoningEfforts(efforts: readonly string[], strengthOrder: readonly string[]): string[];
2
+ //# sourceMappingURL=reasoning-efforts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reasoning-efforts.d.ts","sourceRoot":"","sources":["../../../../src/host/common/reasoning-efforts.ts"],"names":[],"mappings":"AAAA,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,EAAE,aAAa,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAI5G"}
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Reusable request diagnostics wrapper for model provider calls.
3
+ *
4
+ * Implements W5 usage, latency, and transport diagnostics:
5
+ * - First-byte chunk latency (firstByteMs) and total duration
6
+ * - Request payload bytes (null when unknown stream, not 0)
7
+ * - Safe runtime-validated enum-only endpoint and provider classification
8
+ * - Ephemeral keyed-HMAC fingerprints scoped per provider+endpoint
9
+ * - Disjoint token usage mapping with missing vs zero differentiation and endpoint-awareness
10
+ * - Complete SSE line and NDJSON streaming parser merging start/delta usage
11
+ * - Stream proxy with backpressure preservation (highWaterMark: 0) and early cancel/abort
12
+ * - Isolated failure boundary (diagnostics sink failures never break generation)
13
+ *
14
+ * @module dsh-multi-provider/request-diagnostics
15
+ */
16
+ export declare const DIAGNOSTIC_PROVIDERS: readonly ["codex-chatgpt", "claude-subscription", "kimi-code", "minimax-code", "command-code", "ollama", "claude", "codex", "glm-coding-plan", "step-code", "cline-pass", "qoder", "opendesign", "workbuddy-subscription", "qianwen-token-plan", "relayone", "claude-api", "opencode-go"];
17
+ export type DiagnosticProviderId = (typeof DIAGNOSTIC_PROVIDERS)[number];
18
+ export declare const KNOWN_WIRE_ENDPOINTS: readonly ["messages", "responses", "chat_completions", "generate_content", "stream_generate_content", "acp", "ollama_chat", "ollama_generate", "unknown"];
19
+ export type KnownWireEndpoint = (typeof KNOWN_WIRE_ENDPOINTS)[number];
20
+ export declare function isValidProvider(provider: unknown): provider is DiagnosticProviderId;
21
+ export declare function isValidEndpoint(endpoint: unknown): endpoint is KnownWireEndpoint;
22
+ export type HttpStatusClass = '2xx' | '3xx' | '4xx' | '5xx' | 'error';
23
+ export interface DisjointUsage {
24
+ inputTokens?: number;
25
+ outputTokens?: number;
26
+ cacheReadTokens?: number;
27
+ cacheWriteTokens?: number;
28
+ reasoningTokens?: number;
29
+ totalTokens?: number;
30
+ }
31
+ export interface FingerprintComparison {
32
+ prefixFingerprint?: string;
33
+ toolFingerprint?: string;
34
+ modelFingerprint?: string;
35
+ authFingerprint?: string;
36
+ prefixChanged?: boolean;
37
+ toolChanged?: boolean;
38
+ modelChanged?: boolean;
39
+ authChanged?: boolean;
40
+ }
41
+ export interface RequestDiagnosticRecord {
42
+ provider: DiagnosticProviderId;
43
+ endpoint: KnownWireEndpoint;
44
+ requestBytes: number | null;
45
+ firstByteMs: number | null;
46
+ ttftMs: null;
47
+ durationMs: number;
48
+ statusCode: number | null;
49
+ statusClass: HttpStatusClass;
50
+ outcome: 'completed' | 'canceled' | 'error';
51
+ usage?: DisjointUsage;
52
+ retries?: number;
53
+ fingerprints?: FingerprintComparison;
54
+ }
55
+ export interface CorrelationOptions {
56
+ sessionId?: string;
57
+ retryCount?: number;
58
+ }
59
+ export interface DiagnosticFetchOptions {
60
+ provider?: DiagnosticProviderId;
61
+ endpoint?: KnownWireEndpoint;
62
+ enabled?: boolean;
63
+ onRecord?: (record: RequestDiagnosticRecord) => unknown;
64
+ classifyEndpoint?: (url: string, pathname: string) => KnownWireEndpoint | null;
65
+ correlation?: CorrelationOptions;
66
+ }
67
+ export type FetchLike = typeof fetch;
68
+ export type FetchInput = Parameters<FetchLike>[0];
69
+ export type FetchInit = Parameters<FetchLike>[1];
70
+ export declare function computeHmacPrefix(data: string): string;
71
+ export declare function clearDiagnosticSessionState(): void;
72
+ export declare function getDiagnosticSessionCacheSize(): number;
73
+ export declare function isDefaultModelPath(pathname: string): KnownWireEndpoint | null;
74
+ export declare function parseUsageObject(raw: unknown, endpoint?: KnownWireEndpoint): DisjointUsage | undefined;
75
+ /**
76
+ * Creates a diagnostic wrapper around fetch for model requests.
77
+ */
78
+ export declare function createDiagnosticFetch(baseFetch: FetchLike, options?: DiagnosticFetchOptions): FetchLike;
79
+ //# sourceMappingURL=request-diagnostics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-diagnostics.d.ts","sourceRoot":"","sources":["../../../../src/host/common/request-diagnostics.ts"],"names":[],"mappings":"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"}