zevairouter 1.1.64 → 1.1.66

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 (596) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/cli/app/.next-cli-build/BUILD_ID +1 -1
  3. package/cli/app/.next-cli-build/app-path-routes-manifest.json +6 -6
  4. package/cli/app/.next-cli-build/build-manifest.json +2 -2
  5. package/cli/app/.next-cli-build/prerender-manifest.json +3 -3
  6. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js.nft.json +1 -1
  7. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page_client-reference-manifest.js +1 -1
  8. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  9. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  10. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  11. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  12. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  13. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  14. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  15. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  16. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  17. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  18. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js.nft.json +1 -1
  19. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page_client-reference-manifest.js +1 -1
  20. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  21. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  22. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  23. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  24. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  25. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  26. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  27. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  28. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  29. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  30. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  31. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  32. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  33. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  34. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
  35. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  36. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  37. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  38. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  39. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  40. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  41. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  42. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  43. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  44. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  45. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  46. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  47. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  48. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  49. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  50. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  51. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js.nft.json +1 -1
  52. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  53. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  54. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  55. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js.nft.json +1 -1
  56. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page_client-reference-manifest.js +1 -1
  57. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  58. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  59. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  60. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  61. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  62. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  63. package/cli/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  64. package/cli/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  65. package/cli/app/.next-cli-build/server/app/_global-error.html +1 -1
  66. package/cli/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  67. package/cli/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  68. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  69. package/cli/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  70. package/cli/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  71. package/cli/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  72. package/cli/app/.next-cli-build/server/app/_not-found.html +1 -1
  73. package/cli/app/.next-cli-build/server/app/_not-found.rsc +2 -2
  74. package/cli/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +2 -2
  75. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  76. package/cli/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  77. package/cli/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  78. package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  79. package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  80. package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  81. package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  82. package/cli/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  83. package/cli/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  84. package/cli/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  85. package/cli/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  86. package/cli/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  87. package/cli/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  88. package/cli/app/.next-cli-build/server/app/api/cache/stats/route.js.nft.json +1 -1
  89. package/cli/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
  90. package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -6
  91. package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  92. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  93. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  94. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  95. package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  96. package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  97. package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  98. package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  99. package/cli/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js +3 -3
  100. package/cli/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
  101. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js.nft.json +1 -1
  102. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
  103. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +2 -2
  104. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  105. package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  106. package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  107. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
  108. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  109. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  110. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  111. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  112. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  113. package/cli/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js +2 -2
  114. package/cli/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
  115. package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  116. package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  117. package/cli/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +1 -1
  118. package/cli/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  119. package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  120. package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  121. package/cli/app/.next-cli-build/server/app/api/cli-tools/dsh-settings/route.js +2 -2
  122. package/cli/app/.next-cli-build/server/app/api/cli-tools/dsh-settings/route.js.nft.json +1 -1
  123. package/cli/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js +3 -3
  124. package/cli/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
  125. package/cli/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +1 -1
  126. package/cli/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  127. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js.nft.json +1 -1
  128. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +1 -1
  129. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  130. package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +1 -1
  131. package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  132. package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  133. package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  134. package/cli/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +2 -2
  135. package/cli/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
  136. package/cli/app/.next-cli-build/server/app/api/cli-tools/openbot-settings/route.js +2 -2
  137. package/cli/app/.next-cli-build/server/app/api/cli-tools/openbot-settings/route.js.nft.json +1 -1
  138. package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  139. package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  140. package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -2
  141. package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  142. package/cli/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +2 -2
  143. package/cli/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  144. package/cli/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +1 -1
  145. package/cli/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -1
  146. package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js +3 -1
  147. package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  148. package/cli/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
  149. package/cli/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  150. package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js.nft.json +1 -1
  151. package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js.nft.json +1 -1
  152. package/cli/app/.next-cli-build/server/app/api/context/route.js.nft.json +1 -1
  153. package/cli/app/.next-cli-build/server/app/api/context/test/route.js.nft.json +1 -1
  154. package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js +1 -1
  155. package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js.nft.json +1 -1
  156. package/cli/app/.next-cli-build/server/app/api/dashboard/cli-tools/keys/route.js.nft.json +1 -1
  157. package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js +1 -1
  158. package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js.nft.json +1 -1
  159. package/cli/app/.next-cli-build/server/app/api/dashboard/media/videos/[id]/route.js +1 -1
  160. package/cli/app/.next-cli-build/server/app/api/dashboard/media/videos/[id]/route.js.nft.json +1 -1
  161. package/cli/app/.next-cli-build/server/app/api/dashboard/models/route.js +1 -1
  162. package/cli/app/.next-cli-build/server/app/api/dashboard/models/route.js.nft.json +1 -1
  163. package/cli/app/.next-cli-build/server/app/api/headroom/enable/route.js.nft.json +1 -1
  164. package/cli/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  165. package/cli/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  166. package/cli/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  167. package/cli/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  168. package/cli/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  169. package/cli/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  170. package/cli/app/.next-cli-build/server/app/api/health/ready/route.js.nft.json +1 -1
  171. package/cli/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  172. package/cli/app/.next-cli-build/server/app/api/init/route.js +1 -1
  173. package/cli/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  174. package/cli/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
  175. package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  176. package/cli/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  177. package/cli/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  178. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  179. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  180. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  181. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  182. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  183. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  184. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  185. package/cli/app/.next-cli-build/server/app/api/metrics/route.js.nft.json +1 -1
  186. package/cli/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  187. package/cli/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  188. package/cli/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
  189. package/cli/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  190. package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  191. package/cli/app/.next-cli-build/server/app/api/models/route.js +1 -1
  192. package/cli/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  193. package/cli/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  194. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  195. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  196. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js +1 -1
  197. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  198. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  199. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  200. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js +1 -1
  201. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js.nft.json +1 -1
  202. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js +1 -1
  203. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js.nft.json +1 -1
  204. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js +1 -1
  205. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js.nft.json +1 -1
  206. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  207. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  208. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js.nft.json +1 -1
  209. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js.nft.json +1 -1
  210. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route.js.nft.json +1 -1
  211. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  212. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  213. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js.nft.json +1 -1
  214. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js.nft.json +1 -1
  215. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js.nft.json +1 -1
  216. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js.nft.json +1 -1
  217. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js.nft.json +1 -1
  218. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  219. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  220. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js.nft.json +1 -1
  221. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js.nft.json +1 -1
  222. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
  223. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js.nft.json +1 -1
  224. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js.nft.json +1 -1
  225. package/cli/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  226. package/cli/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  227. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  228. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  229. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  230. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  231. package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  232. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  233. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  234. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/route.js.nft.json +1 -1
  235. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/latest/route.js.nft.json +1 -1
  236. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
  237. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-token/route.js.nft.json +1 -1
  238. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/json-import/route.js.nft.json +1 -1
  239. package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  240. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  241. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  242. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  243. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  244. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js.nft.json +1 -1
  245. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js.nft.json +1 -1
  246. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js.nft.json +1 -1
  247. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  248. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  249. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  250. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  251. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  252. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  253. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js.nft.json +1 -1
  254. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js.nft.json +1 -1
  255. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js.nft.json +1 -1
  256. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
  257. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
  258. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js.nft.json +1 -1
  259. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js.nft.json +1 -1
  260. package/cli/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  261. package/cli/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  262. package/cli/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  263. package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  264. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  265. package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  266. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  267. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  268. package/cli/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js.nft.json +1 -1
  269. package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  270. package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  271. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  272. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  273. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  274. package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js +1 -1
  275. package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js.nft.json +1 -1
  276. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  277. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  278. package/cli/app/.next-cli-build/server/app/api/providers/cloudflare-ai/discover-models/route.js +1 -1
  279. package/cli/app/.next-cli-build/server/app/api/providers/cloudflare-ai/discover-models/route.js.nft.json +1 -1
  280. package/cli/app/.next-cli-build/server/app/api/providers/codebuddy/discover-models/route.js.nft.json +1 -1
  281. package/cli/app/.next-cli-build/server/app/api/providers/codebuddy-cn/discover-models/route.js.nft.json +1 -1
  282. package/cli/app/.next-cli-build/server/app/api/providers/codebuddy-intl/discover-models/route.js.nft.json +1 -1
  283. package/cli/app/.next-cli-build/server/app/api/providers/flow/import/route.js.nft.json +1 -1
  284. package/cli/app/.next-cli-build/server/app/api/providers/flow/login/[jobId]/route.js.nft.json +1 -1
  285. package/cli/app/.next-cli-build/server/app/api/providers/flow/login/route.js.nft.json +1 -1
  286. package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  287. package/cli/app/.next-cli-build/server/app/api/providers/kiro/discover-models/route.js +1 -1
  288. package/cli/app/.next-cli-build/server/app/api/providers/kiro/discover-models/route.js.nft.json +1 -1
  289. package/cli/app/.next-cli-build/server/app/api/providers/kiro/models/route.js +1 -1
  290. package/cli/app/.next-cli-build/server/app/api/providers/kiro/models/route.js.nft.json +1 -1
  291. package/cli/app/.next-cli-build/server/app/api/providers/opencode/discover-models/route.js +1 -1
  292. package/cli/app/.next-cli-build/server/app/api/providers/opencode/discover-models/route.js.nft.json +1 -1
  293. package/cli/app/.next-cli-build/server/app/api/providers/openrouter/discover-models/route.js.nft.json +1 -1
  294. package/cli/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  295. package/cli/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  296. package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  297. package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  298. package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  299. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  300. package/cli/app/.next-cli-build/server/app/api/providers/web-login/route.js.nft.json +1 -1
  301. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  302. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  303. package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  304. package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  305. package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  306. package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  307. package/cli/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  308. package/cli/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  309. package/cli/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  310. package/cli/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  311. package/cli/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  312. package/cli/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  313. package/cli/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  314. package/cli/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  315. package/cli/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  316. package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  317. package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  318. package/cli/app/.next-cli-build/server/app/api/settings/route.js +3 -1
  319. package/cli/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  320. package/cli/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  321. package/cli/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  322. package/cli/app/.next-cli-build/server/app/api/terminal/auth/setup/route.js.nft.json +1 -1
  323. package/cli/app/.next-cli-build/server/app/api/terminal/auth/status/route.js.nft.json +1 -1
  324. package/cli/app/.next-cli-build/server/app/api/terminal/auth/unlock/route.js.nft.json +1 -1
  325. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/input/route.js.nft.json +1 -1
  326. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/resize/route.js.nft.json +1 -1
  327. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/route.js.nft.json +1 -1
  328. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/stream/route.js.nft.json +1 -1
  329. package/cli/app/.next-cli-build/server/app/api/terminal/session/route.js.nft.json +1 -1
  330. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  331. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  332. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  333. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  334. package/cli/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  335. package/cli/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  336. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  337. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  338. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  339. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  340. package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  341. package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  342. package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  343. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  344. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  345. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  346. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
  347. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  348. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
  349. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
  350. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  351. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  352. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  353. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  354. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js +1 -1
  355. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js.nft.json +1 -1
  356. package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  357. package/cli/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  358. package/cli/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  359. package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  360. package/cli/app/.next-cli-build/server/app/api/usage/quota-stream/route.js +2 -2
  361. package/cli/app/.next-cli-build/server/app/api/usage/quota-stream/route.js.nft.json +1 -1
  362. package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  363. package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  364. package/cli/app/.next-cli-build/server/app/api/usage/routing-stream/route.js.nft.json +1 -1
  365. package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  366. package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  367. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  368. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  369. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  370. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  371. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  372. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  373. package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  374. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  375. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  376. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  377. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  378. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  379. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  380. package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  381. package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  382. package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  383. package/cli/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
  384. package/cli/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
  385. package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  386. package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  387. package/cli/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  388. package/cli/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  389. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  390. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  391. package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  392. package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  393. package/cli/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  394. package/cli/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  395. package/cli/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  396. package/cli/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  397. package/cli/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
  398. package/cli/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
  399. package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/content/route.js.nft.json +1 -1
  400. package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  401. package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  402. package/cli/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  403. package/cli/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  404. package/cli/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  405. package/cli/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  406. package/cli/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  407. package/cli/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  408. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  409. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  410. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  411. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  412. package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  413. package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  414. package/cli/app/.next-cli-build/server/app/api/version/route.js +1 -1
  415. package/cli/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  416. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  417. package/cli/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  418. package/cli/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  419. package/cli/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  420. package/cli/app/.next-cli-build/server/app/callback.html +1 -1
  421. package/cli/app/.next-cli-build/server/app/callback.rsc +2 -2
  422. package/cli/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +2 -2
  423. package/cli/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  424. package/cli/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +2 -2
  425. package/cli/app/.next-cli-build/server/app/dashboard/automation.html +1 -1
  426. package/cli/app/.next-cli-build/server/app/dashboard/automation.rsc +2 -2
  427. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation/__PAGE__.segment.rsc +2 -2
  428. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_full.segment.rsc +2 -2
  429. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_tree.segment.rsc +1 -1
  430. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  431. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +2 -2
  432. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  433. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +2 -2
  434. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  435. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  436. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +2 -2
  437. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  438. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +2 -2
  439. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  440. package/cli/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  441. package/cli/app/.next-cli-build/server/app/dashboard/combos.rsc +2 -2
  442. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  443. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +2 -2
  444. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  445. package/cli/app/.next-cli-build/server/app/dashboard/context.html +1 -1
  446. package/cli/app/.next-cli-build/server/app/dashboard/context.rsc +2 -2
  447. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context/__PAGE__.segment.rsc +2 -2
  448. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_full.segment.rsc +2 -2
  449. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_tree.segment.rsc +1 -1
  450. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  451. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.rsc +2 -2
  452. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  453. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +2 -2
  454. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  455. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  456. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +2 -2
  457. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  458. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +2 -2
  459. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  460. package/cli/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  461. package/cli/app/.next-cli-build/server/app/dashboard/mitm.rsc +2 -2
  462. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  463. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +2 -2
  464. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  465. package/cli/app/.next-cli-build/server/app/dashboard/playground.html +1 -1
  466. package/cli/app/.next-cli-build/server/app/dashboard/playground.rsc +2 -2
  467. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +2 -2
  468. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +2 -2
  469. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_tree.segment.rsc +1 -1
  470. package/cli/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  471. package/cli/app/.next-cli-build/server/app/dashboard/profile.rsc +2 -2
  472. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  473. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +2 -2
  474. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  475. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  476. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.rsc +2 -2
  477. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  478. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +2 -2
  479. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  480. package/cli/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  481. package/cli/app/.next-cli-build/server/app/dashboard/providers.rsc +2 -2
  482. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  483. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +2 -2
  484. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  485. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  486. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +2 -2
  487. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  488. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +2 -2
  489. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  490. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  491. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +2 -2
  492. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  493. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +2 -2
  494. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
  495. package/cli/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  496. package/cli/app/.next-cli-build/server/app/dashboard/quota.rsc +3 -3
  497. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  498. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +3 -3
  499. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  500. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  501. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +2 -2
  502. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
  503. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +2 -2
  504. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  505. package/cli/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  506. package/cli/app/.next-cli-build/server/app/dashboard/skills.rsc +2 -2
  507. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  508. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +2 -2
  509. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  510. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  511. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.rsc +2 -2
  512. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  513. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +2 -2
  514. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  515. package/cli/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  516. package/cli/app/.next-cli-build/server/app/dashboard/translator.rsc +2 -2
  517. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  518. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +2 -2
  519. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  520. package/cli/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  521. package/cli/app/.next-cli-build/server/app/dashboard/usage.rsc +2 -2
  522. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  523. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +2 -2
  524. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  525. package/cli/app/.next-cli-build/server/app/dashboard.html +1 -1
  526. package/cli/app/.next-cli-build/server/app/dashboard.rsc +2 -2
  527. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  528. package/cli/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +2 -2
  529. package/cli/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  530. package/cli/app/.next-cli-build/server/app/index.html +1 -1
  531. package/cli/app/.next-cli-build/server/app/index.rsc +2 -2
  532. package/cli/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  533. package/cli/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +2 -2
  534. package/cli/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  535. package/cli/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  536. package/cli/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  537. package/cli/app/.next-cli-build/server/app/landing.html +1 -1
  538. package/cli/app/.next-cli-build/server/app/landing.rsc +2 -2
  539. package/cli/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +2 -2
  540. package/cli/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  541. package/cli/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
  542. package/cli/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  543. package/cli/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  544. package/cli/app/.next-cli-build/server/app/login.html +1 -1
  545. package/cli/app/.next-cli-build/server/app/login.rsc +2 -2
  546. package/cli/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +2 -2
  547. package/cli/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  548. package/cli/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  549. package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  550. package/cli/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  551. package/cli/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  552. package/cli/app/.next-cli-build/server/app/provider-icons/[provider]/route.js.nft.json +1 -1
  553. package/cli/app/.next-cli-build/server/app/skills/[skill]/SKILL.md/route.js.nft.json +1 -1
  554. package/cli/app/.next-cli-build/server/app-paths-manifest.json +6 -6
  555. package/cli/app/.next-cli-build/server/chunks/1350.js +1 -1
  556. package/cli/app/.next-cli-build/server/chunks/1757.js +1 -1
  557. package/cli/app/.next-cli-build/server/chunks/3190.js +1 -1
  558. package/cli/app/.next-cli-build/server/chunks/3204.js +1 -1
  559. package/cli/app/.next-cli-build/server/chunks/4039.js +1 -1
  560. package/cli/app/.next-cli-build/server/chunks/4128.js +3 -0
  561. package/cli/app/.next-cli-build/server/chunks/4177.js +1 -0
  562. package/cli/app/.next-cli-build/server/chunks/4730.js +1 -1
  563. package/cli/app/.next-cli-build/server/chunks/4827.js +1 -0
  564. package/cli/app/.next-cli-build/server/chunks/5024.js +51 -1
  565. package/cli/app/.next-cli-build/server/chunks/5330.js +18 -18
  566. package/cli/app/.next-cli-build/server/chunks/5626.js +1 -1
  567. package/cli/app/.next-cli-build/server/chunks/5744.js +2 -0
  568. package/cli/app/.next-cli-build/server/chunks/5905.js +2 -2
  569. package/cli/app/.next-cli-build/server/chunks/7135.js +1 -1
  570. package/cli/app/.next-cli-build/server/chunks/7319.js +23 -23
  571. package/cli/app/.next-cli-build/server/chunks/8238.js +1 -1
  572. package/cli/app/.next-cli-build/server/chunks/9489.js +1 -0
  573. package/cli/app/.next-cli-build/server/chunks/9548.js +1 -1
  574. package/cli/app/.next-cli-build/server/chunks/9618.js +1 -1
  575. package/cli/app/.next-cli-build/server/chunks/9679.js +1 -1
  576. package/cli/app/.next-cli-build/server/chunks/9946.js +1 -0
  577. package/cli/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  578. package/cli/app/.next-cli-build/server/pages/404.html +1 -1
  579. package/cli/app/.next-cli-build/server/pages/500.html +1 -1
  580. package/cli/app/.next-cli-build/server/preview-props.json +3 -3
  581. package/cli/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  582. package/cli/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  583. package/cli/app/.next-cli-build/static/chunks/{620-3a2ccad7dbaba6da.js → 620-7835dd9c83c5b531.js} +1 -1
  584. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/{page-a0e271ee32723312.js → page-41baf67bacd12af7.js} +1 -1
  585. package/cli/app/CHANGELOG.md +16 -0
  586. package/cli/app/package.json +1 -1
  587. package/cli/package.json +1 -1
  588. package/package.json +1 -1
  589. package/cli/app/.next-cli-build/server/chunks/4754.js +0 -1
  590. package/cli/app/.next-cli-build/server/chunks/5308.js +0 -3
  591. package/cli/app/.next-cli-build/server/chunks/5580.js +0 -1
  592. package/cli/app/.next-cli-build/server/chunks/6382.js +0 -51
  593. package/cli/app/.next-cli-build/server/chunks/7793.js +0 -1
  594. package/cli/app/.next-cli-build/server/chunks/8795.js +0 -1
  595. /package/cli/app/.next-cli-build/static/{Osr-wd9QaMA1NymhYIOSl → 86qPSmidvodTOsnCM3oez}/_buildManifest.js +0 -0
  596. /package/cli/app/.next-cli-build/static/{Osr-wd9QaMA1NymhYIOSl → 86qPSmidvodTOsnCM3oez}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- "use strict";exports.id=1757,exports.ids=[1757],exports.modules={15507:(a,b,c)=>{c.d(b,{ND:()=>h,hC:()=>g});var d=c(79748),e=c.n(d);let f=new Map;async function g(a){if(!a)return"none";try{let b=await e().stat(a);return`${b.mtimeMs}:${b.size}`}catch{return"missing"}}async function h(a,{ttlMs:b,fingerprint:c}={},d){let e=f.get(a);if(e?.promise)return e.promise;if(e&&Date.now()-e.at<b&&(!c||await c(e.value)===e.fp))return e.value;let g=Promise.resolve().then(d);f.set(a,{promise:g});try{let b=await g,d=c?await c(b):null;return f.set(a,{value:b,at:Date.now(),fp:d}),b}catch(b){throw f.delete(a),b}}},21757:(a,b,c)=>{c.r(b),c.d(b,{DELETE:()=>Y,GET:()=>T,POST:()=>X});var d=c(49796),e=c(77598),f=c(51455),g=c.n(f),h=c(48161),i=c.n(h),j=c(76760),k=c.n(j),l=c(23211),m=c(79984),n=c(15507),o=c(69415),p=c(30869),q=c(24424);let r="zevairouter-host",s=Promise.resolve();function t(a){let b=String(a??"");if(!/^[0-9]+$/.test(b))return null;let c=Number(b);return Number.isSafeInteger(c)&&c>=1&&c<=65535?c:null}function u(a){let b=s.then(a,a);return s=b.catch(()=>{}),b}function v(a,b){return{installationTarget:r,platform:process.platform,configDir:a.configDir,configPath:a.configPath,envPath:a.envPath,binaryPath:b?.binaryPath||null,version:b?.version||null,supported:!!(b?.installed&&(0,o.pE)(b.version)),localBaseUrl:function(){let a=t(process.env.PORT)??t(p.h0.appPort);if(null===a)throw Error("ZevaiRouter app port configuration is invalid");return`http://127.0.0.1:${a}/v1`}(),profile:a.profile||"default"}}function w(a,b=!1){return{available:a,restorable:b,conflict:a&&!b}}function x(a,b){return a instanceof o.yq?l.NextResponse.json({error:a.message,code:a.code,installationTarget:r},{status:a.status}):a instanceof SyntaxError?l.NextResponse.json({error:"Request body must be valid JSON",code:"INVALID_HERMES_SETTINGS",installationTarget:r},{status:400}):(console.error(b,a instanceof Error?a.message:a),l.NextResponse.json({error:b,code:"HERMES_IO_ERROR",installationTarget:r},{status:500}))}async function y(a,b){let c;try{let d;c=await g().open(a,"r");let e=await c.stat();if(!e.isFile())throw new o.yq("Hermes settings path is not a regular file",{code:"HERMES_PATH_INVALID",status:422});if(e.size>b)throw new o.yq("Hermes settings file is too large to update safely",{code:"HERMES_FILE_TOO_LARGE",status:422});let f=Buffer.allocUnsafe(b+1),h=0;for(;h<f.length;){let{bytesRead:a}=await c.read(f,h,f.length-h,h);if(0===a)break;h+=a}if(h>b)throw new o.yq("Hermes settings file is too large to update safely",{code:"HERMES_FILE_TOO_LARGE",status:422});let i=f.subarray(0,h);try{d=new TextDecoder("utf-8",{fatal:!0}).decode(i)}catch{throw new o.yq("Hermes settings file is not valid UTF-8",{code:"HERMES_FILE_ENCODING_INVALID",status:422})}return{exists:!0,text:d,mode:511&e.mode,uid:"win32"===process.platform?null:e.uid,gid:"win32"===process.platform?null:e.gid}}catch(a){if(a?.code==="ENOENT")return{exists:!1,text:"",mode:null,uid:null,gid:null};throw a}finally{c&&await c.close().catch(()=>{})}}async function z(a){try{let b=await g().stat(a,{bigint:!0});if(!b.isFile())throw new o.yq("Hermes backup path is not a regular file",{code:"HERMES_PATH_INVALID",status:422});return{exists:!0,dev:b.dev,ino:b.ino,size:b.size,mode:b.mode,uid:b.uid,gid:b.gid,mtimeNs:b.mtimeNs,ctimeNs:b.ctimeNs}}catch(a){if(a?.code==="ENOENT")return{exists:!1};throw a}}async function A(a,b){let c=await z(a);if(!["exists","dev","ino","size","mode","uid","gid","mtimeNs","ctimeNs"].every(a=>c[a]===b[a]))throw new o.yq("Hermes backup changed while it was being discarded",{code:"HERMES_CONFIG_CHANGED",status:409})}async function B(a){let b;if("win32"!==process.platform)try{b=await g().open(a,"r"),await b.sync()}catch(a){if(!["EBADF","EINVAL","ENOTSUP"].includes(a?.code))throw a}finally{b&&await b.close().catch(()=>{})}}async function C(a,b,c,{uid:d=null,gid:f=null}={}){let h,i=k().dirname(a);await g().mkdir(i,{recursive:!0,mode:448});let j=k().join(i,`.${k().basename(a)}.${process.pid}.${(0,e.randomUUID)()}.tmp`);try{h=await g().open(j,"wx",c),await h.writeFile(b,"utf8"),"win32"!==process.platform&&Number.isInteger(d)&&Number.isInteger(f)&&(d!==process.getuid()||f!==process.getgid())&&await h.chown(d,f),await h.chmod(c),await h.sync(),await h.close(),h=null,await g().rename(j,a),await B(i)}finally{h&&await h.close().catch(()=>{}),await g().unlink(j).catch(()=>{})}}async function D(a){try{await g().unlink(a),await B(k().dirname(a))}catch(a){if(a?.code!=="ENOENT")throw a}}async function E(a,b){let{exists:c,text:d,mode:e}=b;c?await C(a,d,e??384,b):await D(a)}async function F(a,b,c){let d=await y(a,c);if(d.exists!==b.exists||d.text!==b.text||d.mode!==b.mode||d.uid!==b.uid||d.gid!==b.gid)throw new o.yq("Hermes settings changed while the operation was in progress",{code:"HERMES_CONFIG_CHANGED",status:409})}function G(a,b){return a.exists===b.exists&&(!a.exists||a.text===b.text&&a.mode===b.mode&&(null===b.uid||a.uid===b.uid)&&(null===b.gid||a.gid===b.gid))}function H(a,b){return null!==a?a:"win32"===process.platform?null:b()}async function I(a,b,c,d){try{let e=await y(a,d),f=G(e,c),g=G(e,b);return f&&await E(a,b),f||g}catch{return!1}}async function J(a){let b=await y(a.backupPath,262144);return{snapshot:b,backup:b.exists?(0,o.Ad)(b.text):null}}async function K(a,b,c){try{let{backup:d}=await J(a);if(!d)return w(!1);let e=(0,o.v5)(d,{configText:b.text,envText:c.text,configPath:a.configPath,envPath:a.envPath,configMode:b.mode,envMode:c.mode});return w(!0,e)}catch{return w(!0,!1)}}function L(a){if(!(0,o.Jk)(a))throw new o.yq("Hermes config, environment, and backup paths must be different",{code:"HERMES_PATH_INVALID",status:422})}async function M(a){try{return await g().realpath(a)}catch(a){if(a?.code!=="ENOENT")throw a}try{if((await g().lstat(a)).isSymbolicLink())throw new o.yq("Hermes settings path is a dangling symbolic link",{code:"HERMES_PATH_INVALID",status:422})}catch(a){if(a?.code!=="ENOENT")throw a}let b=k().dirname(a),c=[k().basename(a)];for(;;){try{let a=await g().realpath(b);return k().join(a,...c)}catch(a){if(a?.code!=="ENOENT")throw a}let d=k().dirname(b);if(d===b)return a;c.unshift(k().basename(b)),b=d}}async function N(a){let[b,c,d]=await Promise.all([M(a.configPath),M(a.envPath),M(a.backupPath)]);return{...a,configDir:k().dirname(b),configPath:b,envPath:c,backupPath:d}}function O(a){return a?.url?new URL(a.url,"http://localhost").searchParams.get("profile"):null}async function P(a){let b=(0,o.SL)(a);if(!b.isDefault&&!await (0,o.hh)(b.configDir))throw new o.yq("Hermes profile not found",{code:"HERMES_PROFILE_NOT_FOUND",status:404});return b}let Q=()=>`${process.env.PATH||""}|${process.env.HERMES_HOME||""}|${i().homedir()}`,R=async(a,b,c)=>a?{...await (0,n.ND)(`hermes:paths:${b.binaryPath}:${b.version}:${Q()}`,{ttlMs:6e4,fingerprint:()=>(0,n.hC)(b.binaryPath)},()=>(0,o.Pi)({installation:b,fallbackPaths:c}))}:(0,o.Pi)({installation:b,fallbackPaths:c});async function S({useBackupPathsWhenUnavailable:a=!1,profile:b=null,cached:c=!1}={}){let d,e=await (c?(0,n.ND)(`hermes:install:${Q()}`,{ttlMs:3e5,fingerprint:a=>(0,n.hC)(a?.binaryPath)},()=>(0,o.S2)()):(0,o.S2)());if(b&&"default"!==b){let a=await P(b),c=await N(a);return L(c),{installation:e,paths:c}}let f=(0,o.TY)();if(e.installed)d=await R(c,e,f);else if(a){let a=await N(f);try{let{backup:b}=await J(a);d=b?function(a,b){if([b?.paths?.configPath,b?.paths?.envPath].some(a=>"string"!=typeof a||!k().isAbsolute(a)||/[\u0000-\u001f\u007f]/.test(a)))throw new o.yq("Hermes backup contains invalid settings paths",{code:"HERMES_BACKUP_INVALID",status:409});return{...a,configDir:k().dirname(b.paths.configPath),configPath:b.paths.configPath,envPath:b.paths.envPath}}(f,b):f}catch{d=f}}else d=f;let g=await N(d);return L(g),{installation:e,paths:g}}async function T(a){try{let{installation:b,paths:c}=await S({useBackupPathsWhenUnavailable:!0,profile:O(a),cached:!0}),d=await y(c.configPath,5242880),e=await y(c.envPath,1048576),f=await K(c,d,e);if(!b.installed)return l.NextResponse.json({installed:!1,...v(c,b),settings:{model:null,stt:null,roles:{delegation:null,auxiliary:{}}},hasZevai:!1,hasZevaiStt:!1,backup:f,message:"Hermes Agent is not installed on the ZevaiRouter host"});let g=(0,o.ZB)(d.text);return l.NextResponse.json({installed:!0,...v(c,b),settings:{model:g.model,stt:g.stt||null,roles:g.roles||{delegation:null,auxiliary:{}}},hasZevai:g.hasZevai,hasZevaiStt:!0===g.hasZevaiStt,backup:f})}catch(a){return x(a,"Failed to inspect Hermes settings on the ZevaiRouter host")}}async function U(a){return a?.body&&"object"==typeof a.body&&"function"!=typeof a.body.getReader?a.body:"function"==typeof a?.json?a.json():{}}async function V(a){let b=(0,o.bU)(a),{installation:c,paths:d}=await S({profile:"string"==typeof a?.profile?a.profile:null});if(!c.installed)throw new o.yq("Hermes Agent is not installed on the ZevaiRouter host",{code:"HERMES_NOT_INSTALLED",status:409});if(!(0,o.pE)(c.version))throw new o.yq("Hermes Agent 0.4.0 or newer is required for ZevaiRouter-managed API keys",{code:"HERMES_VERSION_UNSUPPORTED",status:422});let e=await y(d.configPath,5242880),f=await y(d.envPath,1048576),g=await J(d),h=g.backup;if(h&&!(0,o.v5)(h,{configText:e.text,envText:f.text,configPath:d.configPath,envPath:d.envPath,configMode:e.mode,envMode:f.mode}))throw new o.yq("Hermes settings changed after the previous ZevaiRouter Apply; reset or reconcile them first",{code:"HERMES_CONFIG_CHANGED",status:409});let i=(0,o.FV)(e.text,b),j=(0,o.yC)(f.text,await (0,m.k7)(b.apiKey)),k=(0,o.JC)({paths:d,priorBackup:h,configFileExisted:e.exists,envFileExisted:f.exists,configMode:e.mode,envMode:f.mode,configBefore:i.before,envBefore:j.before,configApplied:i.applied,envAppliedHash:j.appliedHash,sttBefore:i.sttBefore||null,sttApplied:i.sttApplied||null,rolesBefore:i.rolesBefore||null,rolesApplied:i.rolesApplied||null,configAppliedMode:"win32"===process.platform?null:e.mode??384,envAppliedMode:"win32"===process.platform?null:384}),n=(0,o.Vm)(k);if(Buffer.byteLength(n,"utf8")>262144)throw new o.yq("Hermes managed settings are too large to back up safely",{code:"HERMES_BACKUP_TOO_LARGE",status:422});await F(d.configPath,e,5242880),await F(d.envPath,f,1048576),await F(d.backupPath,g.snapshot,262144);let p={exists:!0,text:n,mode:384,uid:H(g.snapshot.uid,()=>process.getuid()),gid:H(g.snapshot.gid,()=>process.getgid())},q={exists:!0,text:i.text,mode:e.mode??384,uid:H(e.uid,()=>process.getuid()),gid:H(e.gid,()=>process.getgid())},r={exists:!0,text:j.text,mode:384,uid:H(f.uid,()=>process.getuid()),gid:H(f.gid,()=>process.getgid())};try{await E(d.backupPath,p),await E(d.configPath,q),await E(d.envPath,r)}catch(h){let a=await I(d.envPath,f,r,1048576),b=await I(d.configPath,e,q,5242880),c=!!a&&!!b&&await I(d.backupPath,g.snapshot,p,262144);throw a&&b&&c||console.error("Hermes Apply rollback could not safely restore every file"),h}return l.NextResponse.json({success:!0,message:"Hermes settings applied on the ZevaiRouter host",...v(d,c),backup:w(!0,!0)})}async function W(a){let b=(0,o.bU)(a),c=await (0,o.Nc)(),d=[];for(let a of c)try{let{paths:c}=await S({profile:a.isDefault?null:a.name}),e=await y(c.configPath,5242880),f=(0,o.KE)(e.text,{seedModel:b.model});if("apply"!==f.action){d.push({profile:a.name,status:"skipped",reason:f.reason});continue}let g=await V({...a.isDefault?{}:{profile:a.name},baseUrl:b.baseUrl,apiKey:b.apiKey,model:f.model,selections:f.selections}),h=await U(g);(g.status||200)>=400?d.push({profile:a.name,status:"failed",reason:h.error||"apply failed"}):d.push({profile:a.name,status:"updated",model:f.model})}catch(b){d.push({profile:a.name,status:"failed",reason:b instanceof o.yq?b.message:"apply failed"})}let e=d.filter(a=>"updated"===a.status).length;return l.NextResponse.json({success:e>0,bulk:!0,results:d,updated:e,skipped:d.length-e,message:`Updated endpoint on ${e} Hermes profile(s)`})}async function X(a){return u(async()=>{try{let b=await a.json();if(b?.applyToAll===!0)return await W(b);return await V(b)}catch(a){return x(a,"Failed to update Hermes settings on the ZevaiRouter host")}})}async function Y(a){return u(async()=>{try{if(a?.url&&"1"===new URL(a.url,"http://localhost").searchParams.get("discard")){let b=O(a),c=b&&"default"!==b?await P(b):(0,o.TY)(),d=await N(c);L(d);let e=await z(d.backupPath);if(!e.exists)throw new o.yq("No ZevaiRouter Hermes backup is available to discard",{code:"HERMES_BACKUP_NOT_FOUND",status:404});return await A(d.backupPath,e),await D(d.backupPath),l.NextResponse.json({success:!0,discarded:!0,message:"Hermes backup discarded; config and environment settings were not changed",installationTarget:r,configPath:d.configPath,envPath:d.envPath,backup:w(!1)})}let{paths:b}=await S({useBackupPathsWhenUnavailable:!0,profile:O(a)}),c=await y(b.configPath,5242880),d=await y(b.envPath,1048576),e=await J(b);if(!e.backup)throw new o.yq("No ZevaiRouter Hermes backup is available to restore",{code:"HERMES_BACKUP_NOT_FOUND",status:404});let f=e.backup;if(!(0,o.v5)(f,{configText:c.text,envText:d.text,configPath:b.configPath,envPath:b.envPath,configMode:c.mode,envMode:d.mode}))throw new o.yq("Hermes managed settings changed after ZevaiRouter applied them",{code:"HERMES_CONFIG_CHANGED",status:409});let g=(0,o.x8)(c.text,f.before.model,f.applied.model,f.applied?.stt?{before:f.before?.stt,applied:f.applied.stt}:null,f.applied?.roles?{before:f.before?.roles,applied:f.applied.roles}:null),h=(0,o.MK)(d.text,f.before.env,f.applied.envHash),i={exists:f.before.configFileExisted||"{}"!==g.trim(),text:g,mode:f.before.configMode??384,uid:c.uid,gid:c.gid},j={exists:f.before.envFileExisted||h.trim().length>0,text:h,mode:f.before.envMode??384,uid:d.uid,gid:d.gid};await F(b.configPath,c,5242880),await F(b.envPath,d,1048576),await F(b.backupPath,e.snapshot,262144);try{await E(b.configPath,i),await E(b.envPath,j),await D(b.backupPath)}catch(f){let a=await I(b.envPath,d,j,1048576),e=await I(b.configPath,c,i,5242880);throw a&&e||console.error("Hermes Reset rollback could not safely restore every file"),f}return l.NextResponse.json({success:!0,message:"Previous Hermes settings restored on the ZevaiRouter host",installationTarget:r,configPath:b.configPath,envPath:b.envPath,backup:w(!1)})}catch(b){let a=x(b,"Failed to restore Hermes settings on the ZevaiRouter host");if(b instanceof o.yq&&"HERMES_CONFIG_CHANGED"===b.code)return l.NextResponse.json({error:b.message,code:b.code,installationTarget:r,backup:w(!0,!1)},{status:b.status});return a}})}(0,q.D)([T,X,Y]),(0,d.A)(T,"408a2b57acd4c0a6562af4fa1f600d9fb485ab5fb5",null),(0,d.A)(X,"4024cfbde762973ce2beaafd9ccf169b6796bfb114",null),(0,d.A)(Y,"40d7a17cdc3413a3a4b1c731542c47204c788e1873",null)}};
1
+ "use strict";exports.id=1757,exports.ids=[1757],exports.modules={15507:(a,b,c)=>{c.d(b,{ND:()=>h,hC:()=>g});var d=c(79748),e=c.n(d);let f=new Map;async function g(a){if(!a)return"none";try{let b=await e().stat(a);return`${b.mtimeMs}:${b.size}`}catch{return"missing"}}async function h(a,{ttlMs:b,fingerprint:c}={},d){let e=f.get(a);if(e?.promise)return e.promise;if(e&&Date.now()-e.at<b&&(!c||await c(e.value)===e.fp))return e.value;let g=Promise.resolve().then(d);f.set(a,{promise:g});try{let b=await g,d=c?await c(b):null;return f.set(a,{value:b,at:Date.now(),fp:d}),b}catch(b){throw f.delete(a),b}}},21757:(a,b,c)=>{c.r(b),c.d(b,{DELETE:()=>Y,GET:()=>T,POST:()=>X});var d=c(49796),e=c(77598),f=c(51455),g=c.n(f),h=c(48161),i=c.n(h),j=c(76760),k=c.n(j),l=c(23211),m=c(79984),n=c(15507),o=c(69415),p=c(30869),q=c(24424);let r="zevairouter-host",s=Promise.resolve();function t(a){let b=String(a??"");if(!/^[0-9]+$/.test(b))return null;let c=Number(b);return Number.isSafeInteger(c)&&c>=1&&c<=65535?c:null}function u(a){let b=s.then(a,a);return s=b.catch(()=>{}),b}function v(a,b){return{installationTarget:r,platform:process.platform,configDir:a.configDir,configPath:a.configPath,envPath:a.envPath,binaryPath:b?.binaryPath||null,version:b?.version||null,supported:!!(b?.installed&&(0,o.pE)(b.version)),localBaseUrl:function(){let a=t(process.env.PORT)??t(p.h0.appPort);if(null===a)throw Error("ZevaiRouter app port configuration is invalid");return`http://127.0.0.1:${a}/v1`}(),profile:a.profile||"default"}}function w(a,b=!1){return{available:a,restorable:b,conflict:a&&!b}}function x(a,b){return a instanceof o.yq?l.NextResponse.json({error:a.message,code:a.code,installationTarget:r},{status:a.status}):a instanceof SyntaxError?l.NextResponse.json({error:"Request body must be valid JSON",code:"INVALID_HERMES_SETTINGS",installationTarget:r},{status:400}):(console.error(b,a instanceof Error?a.message:a),l.NextResponse.json({error:b,code:"HERMES_IO_ERROR",installationTarget:r},{status:500}))}async function y(a,b){let c;try{let d;c=await g().open(a,"r");let e=await c.stat();if(!e.isFile())throw new o.yq("Hermes settings path is not a regular file",{code:"HERMES_PATH_INVALID",status:422});if(e.size>b)throw new o.yq("Hermes settings file is too large to update safely",{code:"HERMES_FILE_TOO_LARGE",status:422});let f=Buffer.allocUnsafe(b+1),h=0;for(;h<f.length;){let{bytesRead:a}=await c.read(f,h,f.length-h,h);if(0===a)break;h+=a}if(h>b)throw new o.yq("Hermes settings file is too large to update safely",{code:"HERMES_FILE_TOO_LARGE",status:422});let i=f.subarray(0,h);try{d=new TextDecoder("utf-8",{fatal:!0}).decode(i)}catch{throw new o.yq("Hermes settings file is not valid UTF-8",{code:"HERMES_FILE_ENCODING_INVALID",status:422})}return{exists:!0,text:d,mode:511&e.mode,uid:"win32"===process.platform?null:e.uid,gid:"win32"===process.platform?null:e.gid}}catch(a){if(a?.code==="ENOENT")return{exists:!1,text:"",mode:null,uid:null,gid:null};throw a}finally{c&&await c.close().catch(()=>{})}}async function z(a){try{let b=await g().stat(a,{bigint:!0});if(!b.isFile())throw new o.yq("Hermes backup path is not a regular file",{code:"HERMES_PATH_INVALID",status:422});return{exists:!0,dev:b.dev,ino:b.ino,size:b.size,mode:b.mode,uid:b.uid,gid:b.gid,mtimeNs:b.mtimeNs,ctimeNs:b.ctimeNs}}catch(a){if(a?.code==="ENOENT")return{exists:!1};throw a}}async function A(a,b){let c=await z(a);if(!["exists","dev","ino","size","mode","uid","gid","mtimeNs","ctimeNs"].every(a=>c[a]===b[a]))throw new o.yq("Hermes backup changed while it was being discarded",{code:"HERMES_CONFIG_CHANGED",status:409})}async function B(a){let b;if("win32"!==process.platform)try{b=await g().open(a,"r"),await b.sync()}catch(a){if(!["EBADF","EINVAL","ENOTSUP"].includes(a?.code))throw a}finally{b&&await b.close().catch(()=>{})}}async function C(a,b,c,{uid:d=null,gid:f=null}={}){let h,i=k().dirname(a);await g().mkdir(i,{recursive:!0,mode:448});let j=k().join(i,`.${k().basename(a)}.${process.pid}.${(0,e.randomUUID)()}.tmp`);try{h=await g().open(j,"wx",c),await h.writeFile(b,"utf8"),"win32"!==process.platform&&Number.isInteger(d)&&Number.isInteger(f)&&(d!==process.getuid()||f!==process.getgid())&&await h.chown(d,f),await h.chmod(c),await h.sync(),await h.close(),h=null,await g().rename(j,a),await B(i)}finally{h&&await h.close().catch(()=>{}),await g().unlink(j).catch(()=>{})}}async function D(a){try{await g().unlink(a),await B(k().dirname(a))}catch(a){if(a?.code!=="ENOENT")throw a}}async function E(a,b){let{exists:c,text:d,mode:e}=b;c?await C(a,d,e??384,b):await D(a)}async function F(a,b,c){let d=await y(a,c);if(d.exists!==b.exists||d.text!==b.text||d.mode!==b.mode||d.uid!==b.uid||d.gid!==b.gid)throw new o.yq("Hermes settings changed while the operation was in progress",{code:"HERMES_CONFIG_CHANGED",status:409})}function G(a,b){return a.exists===b.exists&&(!a.exists||a.text===b.text&&a.mode===b.mode&&(null===b.uid||a.uid===b.uid)&&(null===b.gid||a.gid===b.gid))}function H(a,b){return null!==a?a:"win32"===process.platform?null:b()}async function I(a,b,c,d){try{let e=await y(a,d),f=G(e,c),g=G(e,b);return f&&await E(a,b),f||g}catch{return!1}}async function J(a){let b=await y(a.backupPath,262144);return{snapshot:b,backup:b.exists?(0,o.Ad)(b.text):null}}async function K(a,b,c){try{let{backup:d}=await J(a);if(!d)return w(!1);let e=(0,o.v5)(d,{configText:b.text,envText:c.text,configPath:a.configPath,envPath:a.envPath,configMode:b.mode,envMode:c.mode});return w(!0,e)}catch{return w(!0,!1)}}function L(a){if(!(0,o.Jk)(a))throw new o.yq("Hermes config, environment, and backup paths must be different",{code:"HERMES_PATH_INVALID",status:422})}async function M(a){try{return await g().realpath(a)}catch(a){if(a?.code!=="ENOENT")throw a}try{if((await g().lstat(a)).isSymbolicLink())throw new o.yq("Hermes settings path is a dangling symbolic link",{code:"HERMES_PATH_INVALID",status:422})}catch(a){if(a?.code!=="ENOENT")throw a}let b=k().dirname(a),c=[k().basename(a)];for(;;){try{let a=await g().realpath(b);return k().join(a,...c)}catch(a){if(a?.code!=="ENOENT")throw a}let d=k().dirname(b);if(d===b)return a;c.unshift(k().basename(b)),b=d}}async function N(a){let[b,c,d]=await Promise.all([M(a.configPath),M(a.envPath),M(a.backupPath)]);return{...a,configDir:k().dirname(b),configPath:b,envPath:c,backupPath:d}}function O(a){return a?.url?new URL(a.url,"http://localhost").searchParams.get("profile"):null}async function P(a){let b=(0,o.SL)(a);if(!b.isDefault&&!await (0,o.hh)(b.configDir))throw new o.yq("Hermes profile not found",{code:"HERMES_PROFILE_NOT_FOUND",status:404});return b}let Q=()=>`${process.env.PATH||""}|${process.env.HERMES_HOME||""}|${i().homedir()}`,R=async(a,b,c)=>a?{...await (0,n.ND)(`hermes:paths:${b.binaryPath}:${b.version}:${Q()}`,{ttlMs:6e4,fingerprint:()=>(0,n.hC)(b.binaryPath)},()=>(0,o.Pi)({installation:b,fallbackPaths:c}))}:(0,o.Pi)({installation:b,fallbackPaths:c});async function S({useBackupPathsWhenUnavailable:a=!1,profile:b=null,cached:c=!1}={}){let d,e=await (c?(0,n.ND)(`hermes:install:${Q()}`,{ttlMs:3e5,fingerprint:a=>(0,n.hC)(a?.binaryPath)},()=>(0,o.S2)()):(0,o.S2)());if(b&&"default"!==b){let a=await P(b),c=await N(a);return L(c),{installation:e,paths:c}}let f=(0,o.TY)();if(e.installed)d=await R(c,e,f);else if(a){let a=await N(f);try{let{backup:b}=await J(a);d=b?function(a,b){if([b?.paths?.configPath,b?.paths?.envPath].some(a=>"string"!=typeof a||!k().isAbsolute(a)||/[\u0000-\u001f\u007f]/.test(a)))throw new o.yq("Hermes backup contains invalid settings paths",{code:"HERMES_BACKUP_INVALID",status:409});return{...a,configDir:k().dirname(b.paths.configPath),configPath:b.paths.configPath,envPath:b.paths.envPath}}(f,b):f}catch{d=f}}else d=f;let g=await N(d);return L(g),{installation:e,paths:g}}async function T(a){try{let{installation:b,paths:c}=await S({useBackupPathsWhenUnavailable:!0,profile:O(a),cached:!0}),d=await y(c.configPath,5242880),e=await y(c.envPath,1048576),f=await K(c,d,e);if(!b.installed)return l.NextResponse.json({installed:!1,...v(c,b),settings:{model:null,stt:null,roles:{delegation:null,auxiliary:{}}},hasZevai:!1,hasZevaiStt:!1,backup:f,message:"Hermes Agent is not installed on the ZevaiRouter host"});let g=(0,o.ZB)(d.text);return l.NextResponse.json({installed:!0,...v(c,b),settings:{model:g.model,stt:g.stt||null,roles:g.roles||{delegation:null,auxiliary:{}}},hasZevai:g.hasZevai,hasZevaiStt:!0===g.hasZevaiStt,backup:f})}catch(a){return x(a,"Failed to inspect Hermes settings on the ZevaiRouter host")}}async function U(a){return a?.body&&"object"==typeof a.body&&"function"!=typeof a.body.getReader?a.body:"function"==typeof a?.json?a.json():{}}async function V(a){let b=(0,o.bU)(a),{installation:c,paths:d}=await S({profile:"string"==typeof a?.profile?a.profile:null});if(!c.installed)throw new o.yq("Hermes Agent is not installed on the ZevaiRouter host",{code:"HERMES_NOT_INSTALLED",status:409});if(!(0,o.pE)(c.version))throw new o.yq("Hermes Agent 0.4.0 or newer is required for ZevaiRouter-managed API keys",{code:"HERMES_VERSION_UNSUPPORTED",status:422});let e=await y(d.configPath,5242880),f=await y(d.envPath,1048576),g=await J(d),h=g.backup;if(h&&!(0,o.v5)(h,{configText:e.text,envText:f.text,configPath:d.configPath,envPath:d.envPath,configMode:e.mode,envMode:f.mode}))throw new o.yq("Hermes settings changed after the previous ZevaiRouter Apply; reset or reconcile them first",{code:"HERMES_CONFIG_CHANGED",status:409});let i=(0,o.FV)(e.text,b),j=(0,o.yC)(f.text,await (0,m.k7)(b.apiKey)),k=(0,o.JC)({paths:d,priorBackup:h,configFileExisted:e.exists,envFileExisted:f.exists,configMode:e.mode,envMode:f.mode,configBefore:i.before,envBefore:j.before,configApplied:i.applied,envAppliedHash:j.appliedHash,sttBefore:i.sttBefore||null,sttApplied:i.sttApplied||null,rolesBefore:i.rolesBefore||null,rolesApplied:i.rolesApplied||null,configAppliedMode:"win32"===process.platform?null:e.mode??384,envAppliedMode:"win32"===process.platform?null:384}),n=(0,o.Vm)(k);if(Buffer.byteLength(n,"utf8")>262144)throw new o.yq("Hermes managed settings are too large to back up safely",{code:"HERMES_BACKUP_TOO_LARGE",status:422});await F(d.configPath,e,5242880),await F(d.envPath,f,1048576),await F(d.backupPath,g.snapshot,262144);let p={exists:!0,text:n,mode:384,uid:H(g.snapshot.uid,()=>process.getuid()),gid:H(g.snapshot.gid,()=>process.getgid())},q={exists:!0,text:i.text,mode:e.mode??384,uid:H(e.uid,()=>process.getuid()),gid:H(e.gid,()=>process.getgid())},r={exists:!0,text:j.text,mode:384,uid:H(f.uid,()=>process.getuid()),gid:H(f.gid,()=>process.getgid())};try{await E(d.backupPath,p),await E(d.configPath,q),await E(d.envPath,r)}catch(h){let a=await I(d.envPath,f,r,1048576),b=await I(d.configPath,e,q,5242880),c=!!a&&!!b&&await I(d.backupPath,g.snapshot,p,262144);throw a&&b&&c||console.error("Hermes Apply rollback could not safely restore every file"),h}return l.NextResponse.json({success:!0,message:"Hermes settings applied on the ZevaiRouter host",...v(d,c),backup:w(!0,!0)})}async function W(a){let b=(0,o.bU)(a),c=await (0,o.Nc)(),d=[];for(let a of c)try{let{paths:c}=await S({profile:a.isDefault?null:a.name}),e=await y(c.configPath,5242880),f=(0,o.KE)(e.text,{seedModel:b.model});if("apply"!==f.action){d.push({profile:a.name,status:"skipped",reason:f.reason});continue}let g=await V({...a.isDefault?{}:{profile:a.name},baseUrl:b.baseUrl,apiKey:b.apiKey,model:f.model,selections:f.selections}),h=await U(g);(g.status||200)>=400?d.push({profile:a.name,status:"failed",reason:h.error||"apply failed"}):d.push({profile:a.name,status:"updated",model:f.model})}catch(b){d.push({profile:a.name,status:"failed",reason:b instanceof o.yq?b.message:"apply failed"})}let e=d.filter(a=>"updated"===a.status).length;return l.NextResponse.json({success:e>0,bulk:!0,results:d,updated:e,skipped:d.length-e,message:`Updated endpoint on ${e} Hermes profile(s)`})}async function X(a){return u(async()=>{try{let b=await a.json();if(b?.applyToAll===!0)return await W(b);return await V(b)}catch(a){return x(a,"Failed to update Hermes settings on the ZevaiRouter host")}})}async function Y(a){return u(async()=>{try{if(a?.url&&"1"===new URL(a.url,"http://localhost").searchParams.get("discard")){let b=O(a),c=b&&"default"!==b?await P(b):(0,o.TY)(),d=await N(c);L(d);let e=await z(d.backupPath);if(!e.exists)throw new o.yq("No ZevaiRouter Hermes backup is available to discard",{code:"HERMES_BACKUP_NOT_FOUND",status:404});return await A(d.backupPath,e),await D(d.backupPath),l.NextResponse.json({success:!0,discarded:!0,message:"Hermes backup discarded; config and environment settings were not changed",installationTarget:r,configPath:d.configPath,envPath:d.envPath,backup:w(!1)})}let{paths:b}=await S({useBackupPathsWhenUnavailable:!0,profile:O(a)}),c=await y(b.configPath,5242880),d=await y(b.envPath,1048576),e=await J(b);if(!e.backup)throw new o.yq("No ZevaiRouter Hermes backup is available to restore",{code:"HERMES_BACKUP_NOT_FOUND",status:404});let f=e.backup;if(!(0,o.v5)(f,{configText:c.text,envText:d.text,configPath:b.configPath,envPath:b.envPath,configMode:c.mode,envMode:d.mode}))throw new o.yq("Hermes managed settings changed after ZevaiRouter applied them",{code:"HERMES_CONFIG_CHANGED",status:409});let g=(0,o.x8)(c.text,f.before.model,f.applied.model,f.applied?.stt?{before:f.before?.stt,applied:f.applied.stt}:null,f.applied?.roles?{before:f.before?.roles,applied:f.applied.roles}:null),h=(0,o.MK)(d.text,f.before.env,f.applied.envHash),i={exists:f.before.configFileExisted||"{}"!==g.trim(),text:g,mode:f.before.configMode??384,uid:c.uid,gid:c.gid},j={exists:f.before.envFileExisted||h.trim().length>0,text:h,mode:f.before.envMode??384,uid:d.uid,gid:d.gid};await F(b.configPath,c,5242880),await F(b.envPath,d,1048576),await F(b.backupPath,e.snapshot,262144);try{await E(b.configPath,i),await E(b.envPath,j),await D(b.backupPath)}catch(f){let a=await I(b.envPath,d,j,1048576),e=await I(b.configPath,c,i,5242880);throw a&&e||console.error("Hermes Reset rollback could not safely restore every file"),f}return l.NextResponse.json({success:!0,message:"Previous Hermes settings restored on the ZevaiRouter host",installationTarget:r,configPath:b.configPath,envPath:b.envPath,backup:w(!1)})}catch(b){let a=x(b,"Failed to restore Hermes settings on the ZevaiRouter host");if(b instanceof o.yq&&"HERMES_CONFIG_CHANGED"===b.code)return l.NextResponse.json({error:b.message,code:b.code,installationTarget:r,backup:w(!0,!1)},{status:b.status});return a}})}(0,q.D)([T,X,Y]),(0,d.A)(T,"4015c7ac7231701660bfb4222d4661ea47528a8da0",null),(0,d.A)(X,"405c91d1350f544a99f7199b9d2f4b619f3dc24d2d",null),(0,d.A)(Y,"404eb470fbaf9f906bc630d5248dd9c2658c776c52",null)}};
@@ -1 +1 @@
1
- exports.id=3190,exports.ids=[3190,3373,5754],exports.modules={15754:(a,b,c)=>{"use strict";let d=c(29021),{execFileSync:e}=c(79646),f="win32"===process.platform,g="linux"===process.platform;function h(a){return Number.isInteger(a)&&a>0&&a<=4194304}function i(a,b){try{return e(a,b,{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:5e3,windowsHide:!0})}catch{return null}}function j(a,b){if("string"!=typeof a||/[\r\n]/.test(a.trim()))return null;let c=a.trim(),d=c.indexOf(" ("),e=c.lastIndexOf(") ");if(d<1||e<=d+2||Number(c.slice(0,d))!==b)return null;let f=c.slice(e+2).split(/\s+/),g=f[19];return f.length<20||!/^\d+$/.test(g)?null:g}function k(a){if(!h(a))return null;if(g){let b=null;try{b=d.readFileSync(`/proc/${a}/stat`,"utf8")}catch{return null}let c=j(b,a);return c?`${a}:${c}`:null}if(f){let b=String(i("powershell",["-NonInteractive","-NoProfile","-Command",`(Get-Process -Id ${a} -ErrorAction Stop).StartTime.Ticks`])||"").trim();return/^\d+$/.test(b)?`${a}:${b}`:null}let b=String(i("ps",["-o","lstart=","-p",String(a)])||"").split(/\r?\n/).filter(a=>a.trim());if(1!==b.length)return null;let c=b[0].trim();return c?`${a}:${c}`:null}function l(a){if(!h(a))return null;if(f)return String(i("powershell",["-NonInteractive","-NoProfile","-Command",`(Get-CimInstance Win32_Process -Filter "ProcessId=${a}").CommandLine`])||"").trim()||null;let b=String(i("ps",["-o","command=","-p",String(a)])||"").split(/\r?\n/).filter(a=>a.trim());return 1!==b.length?null:b[0].trim()||null}function m(a){if(!h(a))return!1;try{return process.kill(a,0),!0}catch(a){return"EPERM"===a.code||"EACCES"===a.code}}function n(a){let b;try{b=d.readFileSync(a,"utf8").trim()}catch{return null}if(!b)return null;if(/^\d+$/.test(b)){let a=Number(b);return h(a)?{pid:a,startToken:null,kind:null,legacy:!0}:null}try{let a=JSON.parse(b),c=Number(a?.pid);if(!h(c))return null;return{pid:c,startToken:"string"==typeof a.startToken&&a.startToken?a.startToken:null,kind:"string"==typeof a.kind?a.kind:null,legacy:!1}}catch{return null}}a.exports={isValidPid:h,isProcessAlive:m,readProcessStartToken:k,readProcessCommand:l,writePidFile:function(a,b,{kind:c="process"}={}){let e=Number(b);if(!h(e))return!1;let f={v:1,kind:c,pid:e,startToken:k(e),platform:process.platform,writtenAt:new Date().toISOString()};try{let b=`${a}.${process.pid}.tmp`;return d.writeFileSync(b,JSON.stringify(f)),d.renameSync(b,a),!0}catch{return!1}},readPidFile:n,resolveVerifiedPid:function(a,{commandPattern:b=null}={}){let c=n(a);if(!c)return{pid:null,reason:"no_pid_file"};if(!m(c.pid))return{pid:null,reason:"not_running",pidFileStale:!0};let d=k(c.pid);if(c.startToken)return d?d!==c.startToken?{pid:null,reason:"pid_recycled",pidFileStale:!0}:{pid:c.pid,reason:"verified_start_token"}:{pid:null,reason:"identity_unreadable"};if(!b)return{pid:null,reason:"identity_unverifiable"};let e=l(c.pid);return e?b.test(e)?{pid:c.pid,reason:"verified_command"}:{pid:null,reason:"command_mismatch",pidFileStale:!0}:{pid:null,reason:"identity_unreadable"}},removePidFile:function(a){try{d.rmSync(a,{force:!0})}catch{}},parseLinuxStartTime:j}},21719:(a,b,c)=>{"use strict";c.d(b,{gq:()=>p,l4:()=>o});var d=c(79646),e=c(33873),f=c.n(e),g=c(29021),h=c.n(g),i=c(21820),j=c.n(i),k=c(30869),l=c(15754);let m=/(zevairouter[\\/]+cli[\\/]+cli\.js|[\\/]zevai(?:\.cmd)?)(?=\s|"|$)/i;function n(){return process.env.DATA_DIR?process.env.DATA_DIR:"win32"===process.platform?f().join(process.env.APPDATA||f().join(j().homedir(),"AppData","Roaming"),"zevai"):f().join(j().homedir(),".zevai")}async function o({excludePids:a=[]}={}){!function(){try{let a=f().join("win32"===process.platform?f().join(process.env.APPDATA||"","zevai"):f().join(j().homedir(),".zevai"),"mitm",".mitm.pid"),{pid:b}=(0,l.resolveVerifiedPid)(a,{commandPattern:/(mitm[\\/]server\.js|mitm[\\/]+server\b)/i});if(!b)return void(0,l.removePidFile)(a);if("win32"===process.platform)try{(0,d.execSync)(`taskkill /F /T /PID ${b}`,{stdio:"ignore",windowsHide:!0,timeout:3e3})}catch{try{(0,d.execSync)(`powershell -NonInteractive -WindowStyle Hidden -Command "Stop-Process -Id ${b} -Force"`,{stdio:"ignore",windowsHide:!0,timeout:3e3})}catch{}}else try{(0,d.execSync)(`sudo -n kill -9 ${b} 2>/dev/null`,{stdio:"ignore",timeout:3e3})}catch{try{process.kill(b,"SIGKILL")}catch{}}(0,l.removePidFile)(a)}catch{}}();let b=function(a=[]){try{return function(a,{selfPid:b,parentPid:c,excludePids:d=[],dataDir:e}){let g=new Map(a.map(a=>[a.pid,a])),h=new Map;for(let b of a)h.has(b.ppid)||h.set(b.ppid,[]),h.get(b.ppid).push(b.pid);let i=String(b),j=g.get(String(c)),k=j&&m.test(j.command)?j.pid:i,l=new Set(d.filter(a=>null!=a).map(String)),n=new Set,o=[k];for(;o.length>0;){let a=o.pop();l.has(a)||n.has(a)||(n.add(a),o.push(...h.get(a)||[]))}if(e){let b=["bin","runtime"].map(a=>f().join(e,a)+f().sep),c=a=>"win32"===process.platform?a.toLowerCase():a;for(let d of a){let a=c(d.command.replace(/^"/,""));b.some(b=>a.startsWith(c(b)))&&!l.has(d.pid)&&n.add(d.pid)}}return n.delete(i),[...n]}(function(){if("win32"===process.platform){let a=JSON.parse((0,d.execSync)('powershell -NonInteractive -WindowStyle Hidden -Command "Get-WmiObject Win32_Process | Select-Object ProcessId,ParentProcessId,CommandLine,ExecutablePath | ConvertTo-Json -Compress"',{encoding:"utf8",windowsHide:!0,timeout:5e3})||"[]");return(Array.isArray(a)?a:[a]).map(a=>({pid:String(a.ProcessId),ppid:String(a.ParentProcessId),command:a.CommandLine||a.ExecutablePath||""}))}return(0,d.execSync)("ps -axo pid=,ppid=,command= 2>/dev/null",{encoding:"utf8",timeout:5e3}).split("\n").map(a=>a.trim().match(/^(\d+)\s+(\d+)\s+(.*)$/)).filter(Boolean).map(([,a,b,c])=>({pid:a,ppid:b,command:c}))}(),{selfPid:process.pid,parentPid:process.ppid,excludePids:Array.isArray(a)?a:[],dataDir:n()})}catch{return[]}}(a),c=process.platform;b.forEach(a=>{try{"win32"===c?(0,d.execSync)(`taskkill /F /PID ${a} 2>nul`,{stdio:"ignore",shell:!0,windowsHide:!0,timeout:3e3}):(0,d.execSync)(`kill -9 ${a} 2>/dev/null`,{stdio:"ignore",timeout:3e3})}catch{}}),b.length>0&&await new Promise(a=>setTimeout(a,1500))}async function p(a=k.h0.npmPackageName){let b=function(a){try{if(!a||!h().existsSync(a))return a;let b=f().join(n(),"runtime","updater"),c=f().join(b,"updater.js");if(h().existsSync(c))try{if(h().statSync(a).size===h().statSync(c).size)return c}catch{}return h().mkdirSync(b,{recursive:!0}),h().copyFileSync(a,c),c}catch{return a}}(function(){if(process.env.UPDATER_SCRIPT_PATH&&h().existsSync(process.env.UPDATER_SCRIPT_PATH))return process.env.UPDATER_SCRIPT_PATH;let a=f().join(process.cwd(),"src","lib","updater","updater.js");if(h().existsSync(a))return a;let b=f().join(process.cwd(),"..","src","lib","updater","updater.js");return h().existsSync(b)?b:a}()),c="1"===process.env.TRAY_MODE,e={cmd:"win32"===process.platform?"npx.cmd":"npx",args:[k.h0.npmPackageName]},g=String(process.env.PORT||k.h0.appPort||1997),i=c?[...e.args,"--tray","--skip-update"]:[...e.args,"--port",g,"--no-browser","--skip-update","--log"],j=(0,d.spawn)(process.execPath,[b],{detached:!0,stdio:"ignore",windowsHide:!0,env:function(a={}){let b={...process.env,...a};return delete b.ZEVAI_LAUNCHD_JOB,delete b.XPC_SERVICE_NAME,b}({UPDATER_PKG_NAME:a||"zevairouter",UPDATER_PORT:String(k.h0.statusPort),UPDATER_TAIL_LINES:String(k.h0.statusLogTailLines),UPDATER_RETRIES:String(k.h0.installRetries),UPDATER_RETRY_DELAY_MS:String(k.h0.installRetryDelayMs),UPDATER_LINGER_MS:String(k.h0.lingerAfterDoneMs),UPDATER_WAIT_MIN_MS:String(k.h0.waitForExitMinMs),UPDATER_WAIT_MAX_MS:String(k.h0.waitForExitMaxMs),UPDATER_WAIT_CHECK_MS:String(k.h0.waitForExitCheckMs),UPDATER_APP_PORT:g,UPDATER_RELAUNCH:"1",UPDATER_RELAUNCH_CMD:e.cmd,UPDATER_RELAUNCH_ARGS:JSON.stringify(i),ZEVAI_SERVER_MODE:c?"":"1"})});j.unref();try{await o({excludePids:[j.pid]})}catch{}return setTimeout(()=>process.exit(0),k.h0.exitDelayMs),j.pid}},30869:(a,b,c)=>{"use strict";c.d(b,{UY:()=>i,X3:()=>k,eh:()=>f.eh,fg:()=>e.fg,h0:()=>h,oc:()=>j,vQ:()=>g});var d=c(39006),e=c(17404),f=c(81329);let g={name:"ZevaiRouter",description:"AI Infrastructure Management",version:d.version},h={npmPackageName:"zevairouter",installCmd:"npm i -g zevairouter",installCmdLatest:"npm i -g zevairouter@latest --prefer-online",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:1997},i={maxLines:200,pollIntervalMs:1e3},j={tickIntervalMs:6e4,pingLeadMs:5e3,refreshAheadMs:3e5,failureCooldownMs:9e5,providers:{claude:{settingsKey:"claudeAutoPing",quotaKey:"session (5h)",pingModel:"claude-haiku-4-5-20251001",pingText:"hi",pingMaxTokens:1},codex:{settingsKey:"codexAutoPing",quotaKey:"session",pingWhenResetAtSlides:!0,resetAtDriftMs:3e4,minPingIntervalMs:6e5,skipWhenBlockingQuotaExhausted:!0,pingModel:"gpt-5.5",pingText:"hi",pingInstructions:"Reply with OK.",pingReasoningEffort:"none"}}},k={openrouter:"https://openrouter.ai/api/v1/chat/completions",glm:"https://api.z.ai/api/anthropic/v1/messages","glm-cn":"https://open.bigmodel.cn/api/coding/paas/v4/chat/completions",kimi:"https://api.kimi.com/coding/v1/messages",minimax:"https://api.minimax.io/anthropic/v1/messages","minimax-cn":"https://api.minimaxi.com/anthropic/v1/messages",alicode:"https://coding.dashscope.aliyuncs.com/v1/chat/completions","alicode-intl":"https://coding-intl.dashscope.aliyuncs.com/v1/chat/completions","volcengine-ark":"https://ark.cn-beijing.volces.com/api/coding/v3/chat/completions",byteplus:"https://ark.ap-southeast.bytepluses.com/api/coding/v3/chat/completions",openai:"https://api.openai.com/v1/chat/completions","vercel-ai-gateway":"https://ai-gateway.vercel.sh/v1/chat/completions",anthropic:"https://api.anthropic.com/v1/messages",gemini:"https://generativelanguage.googleapis.com/v1beta/models",ollama:"https://ollama.com/api/chat","ollama-local":"http://localhost:11434/api/chat"}},39006:a=>{"use strict";a.exports=JSON.parse('{"name":"zevairouter","version":"1.1.64","description":"Self-hosted AI router: many providers, one OpenAI-compatible /v1 endpoint and dashboard","bin":{"zevai":"cli/cli.js"},"files":["cli/cli.js","cli/app/","!cli/app/.next-cli-build/cache/","!cli/app/.next-cli-build/server/route-cache/","cli/hooks/","cli/src/","cli/package.json","cli/README.md","cli/LICENSE","scripts/start-standalone.mjs","scripts/gflow-reply-capture.py","scripts/flow-vps-setup.sh","skills/","README.md","README.zh-CN.md","DOCKER.md","LICENSE","CHANGELOG.md"],"scripts":{"dev":"next dev --webpack --port 1997","build":"node scripts/build-app.mjs","start":"node ./scripts/start-standalone.mjs","dev:bun":"bun --bun next dev --webpack --port 1997","build:bun":"bun --bun next build --webpack","start:bun":"bun ./.next/standalone/server.js","lint":"eslint .","test":"vitest run --config tests/vitest.config.js","build:cli":"node cli/scripts/build-cli.js","audit:package":"node cli/scripts/audit-package.mjs","smoke:package":"node cli/scripts/smoke-package.mjs","verify:mobile-scroll":"node cli/scripts/verify-dashboard-mobile-scroll.mjs","candidate:build":"node cli/scripts/local-candidate.mjs build","candidate:install":"node cli/scripts/local-candidate.mjs install","candidate:status":"node cli/scripts/local-candidate.mjs status","candidate:rollback":"node cli/scripts/local-candidate.mjs rollback","release":"node cli/scripts/release.js","prepack":"npm run build:cli && npm run audit:package","postinstall":"node cli/hooks/postinstall.js"},"dependencies":{"confbox":"0.2.4","node-machine-id":"1.1.12","react":"19.2.4","react-dom":"19.2.4"},"comment_published_runtime":"npm install -g must not download next or @next/swc. Those, plus sql.js, yaml, and @node-saml/node-saml, stay devDependencies so local dev and build:cli can trace them into cli/app. The published tarball already ships that standalone server. confbox stays here because the CLI imports it directly.","comment_optional_runtime":"Optional packages are installed into ~/.zevai/runtime instead of the published tarball. Automation uses CloakBrowser with playwright-core; ZEVAI_MINIMAL_POSTINSTALL=1 skips its browser download. Other lazy runtimes are better-sqlite3, node-pty, and systray2.","overrides":{"body-parser":"^2.3.0","brace-expansion":"5.0.12","dompurify":"^3.4.12","ip-address":"^10.4.0","js-yaml":"4.3.2","nanoid":"^3.3.18","postcss":"^8.5.10","sharp":"0.35.5"},"comment_overrides":"Security floors for transitive dependencies. ESLint\'s legacy minimatch is a private, source-pinned 3.1.5 compatibility package backed by brace-expansion 5.0.9; modern minimatch and nanoid use fixed floors directly. Monaco still pins an old DOMPurify; Express, Next, ESLint, and image processing dependencies may resolve vulnerable body-parser, js-yaml, or sharp releases. Recheck and remove overrides once parent packages require fixed versions.","devDependencies":{"@dnd-kit/core":"^6.3.1","@dnd-kit/modifiers":"^9.0.0","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@monaco-editor/react":"^4.7.0","@node-saml/node-saml":"5.1.0","@tailwindcss/postcss":"^4.1.18","@xterm/addon-fit":"^0.11.0","@xterm/addon-web-links":"^0.12.0","@xterm/xterm":"^6.0.0","@xyflow/react":"^12.10.1","bcryptjs":"^3.0.3","better-sqlite3":"^12.6.2","chalk":"^4.1.2","dompurify":"^3.4.12","esbuild":"^0.28.1","eslint":"^9","eslint-config-next":"16.4.2","express":"^5.2.1","jose":"^6.1.3","marked":"^18.0.1","material-symbols":"^0.45.1","minimatch":"file:vendor/minimatch3-secure","monaco-editor":"^0.55.1","next":"16.4.2","node-forge":"^1.4.2","open":"^11.0.0","ora":"^9.1.0","postcss":"^8.5.10","prop-types":"^15.8.1","react-is":"^19.2.7","recharts":"^3.7.0","selfsigned":"^5.5.0","socks":"^2.8.9","socks-proxy-agent":"^10.1.0","sql.js":"1.14.1","tailwindcss":"^4","typescript":"6.0.3","undici":"^8.10.0","uuid":"^14.0.1","vitest":"4.1.12","yaml":"2.9.0","zustand":"^5.0.10"},"engines":{"node":">=22.5.0"},"keywords":["zevairouter","zevai","ai","router","proxy","kiro","codebuddy","claude","openai","api","quota","automation"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Verifiedlabs/zevairouter.git"},"bugs":{"url":"https://github.com/Verifiedlabs/zevairouter/issues"},"homepage":"https://github.com/Verifiedlabs/zevairouter"}')},59304:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d={id:"muse",alias:"muse",aliases:["muse-ai","meta-model-api","muse-code","muse-subscription"],category:"oauth",authModes:["oauth","apikey"],hasOAuth:!0,priority:120,passthroughModels:!0,display:{name:"Muse (Meta Model API)",icon:"auto_awesome",color:"#0866FF",textIcon:"MU",website:"https://muse.ai",notice:{text:"Sign in with your Meta account (Muse Code subscription) or paste a Model API key from dev.meta.ai. Subscription keys are minted per account; Meta may train on contributor-tier data.",apiKeyUrl:"https://dev.meta.ai",signupUrl:"https://muse.ai"}},transport:{baseUrl:"https://api.meta.ai/v1/chat/completions",validateUrl:"https://api.meta.ai/v1/models",modelsUrl:"https://api.meta.ai/v1/models",format:"openai",auth:{combined:!0,header:"Authorization",scheme:"bearer",hooks:["museHeaders"]},transports:[{format:"openai",baseUrl:"https://api.meta.ai/v1/chat/completions",auth:{combined:!0,header:"Authorization",scheme:"bearer",hooks:["museHeaders"]}},{format:"openai-responses",baseUrl:"https://api.meta.ai/v1/responses",auth:{combined:!0,header:"Authorization",scheme:"bearer",hooks:["museHeaders"]},thinkingFormat:"openai-responses"}]},oauth:{clientId:"1031625952748946",deviceCodeUrl:"https://auth.meta.com/oidc/device/authorization/",tokenUrl:"https://auth.meta.com/oidc/device/token/"},models:[{id:"muse-spark-1.3",name:"Muse Spark 1.3",targetFormat:"openai-responses",supportedFormats:["openai-responses"]},{id:"muse-spark-1.2",name:"Muse Spark 1.2",targetFormat:"openai-responses",supportedFormats:["openai-responses"]},{id:"muse-spark-1.1",name:"Muse Spark 1.1",targetFormat:"openai-responses",supportedFormats:["openai-responses"]},{id:"muse-spark-1.3-contributor",name:"Muse Spark 1.3 Contributor",targetFormat:"openai-responses",supportedFormats:["openai-responses"]},{id:"muse-spark-1.2-contributor",name:"Muse Spark 1.2 Contributor",targetFormat:"openai-responses",supportedFormats:["openai-responses"]}],serviceKinds:["llm"]}},62821:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d={id:"qoder-cn",alias:"qdcn",category:"oauth",authModes:["oauth","apikey"],hasOAuth:!0,priority:30,authHint:"Personal Access Token (pt-...) from https://qoder.com.cn/account/integrations",display:{name:"Qoder CN",icon:"water_drop",color:"#EC4899",website:"https://qoder.com.cn",notice:{signupUrl:"https://qoder.com.cn"}},transport:{baseUrl:"https://gateway.qoder.com.cn/algo/api/v2/service/pro/sse/agent_chat_generation",format:"openai",headers:{},timeoutMs:12e4,stallTimeoutMs:12e4,usage:{url:"https://openapi.qoder.com.cn/api/v2/quota/usage"}},oauth:{openApiBaseUrl:"https://openapi.qoder.com.cn",centerBaseUrl:"https://gateway.qoder.com.cn",chatBaseUrl:"https://gateway.qoder.com.cn",deviceTokenUrl:"https://openapi.qoder.com.cn/api/v1/deviceToken/poll",refreshUrl:"https://gateway.qoder.com.cn/algo/api/v3/user/refresh_token",userInfoUrl:"https://openapi.qoder.com.cn/api/v1/userinfo",quotaUsageUrl:"https://openapi.qoder.com.cn/api/v2/quota/usage",loginUrl:"https://qoder.com.cn/device/selectAccounts"},features:{usage:!0,usageApikey:!0},models:[{id:"ultimate",name:"Ultimate"},{id:"auto",name:"Auto"},{id:"performance",name:"Performance"},{id:"efficient",name:"Efficient"},{id:"lite",name:"Lite"},{id:"qmodel_38max",name:"Qwen3.8-Max"},{id:"qmodel_latest",name:"Qwen3.7-Max"},{id:"qmodel",name:"Qwen3.7-Plus"},{id:"qfmodel",name:"Qwen3.8-Flash"},{id:"kmodel_latest",name:"Kimi-K3"},{id:"kmodel",name:"Kimi-K2.7-Code"},{id:"gmodel",name:"GLM-5.3"},{id:"gfmodel",name:"GLM-5.3-Flash"},{id:"dmodel",name:"DeepSeek-V4-Pro"},{id:"dfmodel",name:"DeepSeek-V4-Flash"},{id:"mmodel",name:"MiniMax-M3"}],serviceKinds:["llm"]}},78335:()=>{},81329:(a,b,c)=>{"use strict";c.d(b,{Xg:()=>d.Xg,eh:()=>e,u0:()=>d.u0,vq:()=>d.vq});var d=c(19548);new Set(Object.entries(c(17404).AI_PROVIDERS).filter(([,a])=>a.passthroughModels).map(([a])=>a));let e=Object.entries(d.vq).flatMap(([a,b])=>b.map(b=>({provider:a,model:b.id,name:b.name})))},96487:()=>{}};
1
+ exports.id=3190,exports.ids=[3190,3373,5754],exports.modules={15754:(a,b,c)=>{"use strict";let d=c(29021),{execFileSync:e}=c(79646),f="win32"===process.platform,g="linux"===process.platform;function h(a){return Number.isInteger(a)&&a>0&&a<=4194304}function i(a,b){try{return e(a,b,{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:5e3,windowsHide:!0})}catch{return null}}function j(a,b){if("string"!=typeof a||/[\r\n]/.test(a.trim()))return null;let c=a.trim(),d=c.indexOf(" ("),e=c.lastIndexOf(") ");if(d<1||e<=d+2||Number(c.slice(0,d))!==b)return null;let f=c.slice(e+2).split(/\s+/),g=f[19];return f.length<20||!/^\d+$/.test(g)?null:g}function k(a){if(!h(a))return null;if(g){let b=null;try{b=d.readFileSync(`/proc/${a}/stat`,"utf8")}catch{return null}let c=j(b,a);return c?`${a}:${c}`:null}if(f){let b=String(i("powershell",["-NonInteractive","-NoProfile","-Command",`(Get-Process -Id ${a} -ErrorAction Stop).StartTime.Ticks`])||"").trim();return/^\d+$/.test(b)?`${a}:${b}`:null}let b=String(i("ps",["-o","lstart=","-p",String(a)])||"").split(/\r?\n/).filter(a=>a.trim());if(1!==b.length)return null;let c=b[0].trim();return c?`${a}:${c}`:null}function l(a){if(!h(a))return null;if(f)return String(i("powershell",["-NonInteractive","-NoProfile","-Command",`(Get-CimInstance Win32_Process -Filter "ProcessId=${a}").CommandLine`])||"").trim()||null;let b=String(i("ps",["-o","command=","-p",String(a)])||"").split(/\r?\n/).filter(a=>a.trim());return 1!==b.length?null:b[0].trim()||null}function m(a){if(!h(a))return!1;try{return process.kill(a,0),!0}catch(a){return"EPERM"===a.code||"EACCES"===a.code}}function n(a){let b;try{b=d.readFileSync(a,"utf8").trim()}catch{return null}if(!b)return null;if(/^\d+$/.test(b)){let a=Number(b);return h(a)?{pid:a,startToken:null,kind:null,legacy:!0}:null}try{let a=JSON.parse(b),c=Number(a?.pid);if(!h(c))return null;return{pid:c,startToken:"string"==typeof a.startToken&&a.startToken?a.startToken:null,kind:"string"==typeof a.kind?a.kind:null,legacy:!1}}catch{return null}}a.exports={isValidPid:h,isProcessAlive:m,readProcessStartToken:k,readProcessCommand:l,writePidFile:function(a,b,{kind:c="process"}={}){let e=Number(b);if(!h(e))return!1;let f={v:1,kind:c,pid:e,startToken:k(e),platform:process.platform,writtenAt:new Date().toISOString()};try{let b=`${a}.${process.pid}.tmp`;return d.writeFileSync(b,JSON.stringify(f)),d.renameSync(b,a),!0}catch{return!1}},readPidFile:n,resolveVerifiedPid:function(a,{commandPattern:b=null}={}){let c=n(a);if(!c)return{pid:null,reason:"no_pid_file"};if(!m(c.pid))return{pid:null,reason:"not_running",pidFileStale:!0};let d=k(c.pid);if(c.startToken)return d?d!==c.startToken?{pid:null,reason:"pid_recycled",pidFileStale:!0}:{pid:c.pid,reason:"verified_start_token"}:{pid:null,reason:"identity_unreadable"};if(!b)return{pid:null,reason:"identity_unverifiable"};let e=l(c.pid);return e?b.test(e)?{pid:c.pid,reason:"verified_command"}:{pid:null,reason:"command_mismatch",pidFileStale:!0}:{pid:null,reason:"identity_unreadable"}},removePidFile:function(a){try{d.rmSync(a,{force:!0})}catch{}},parseLinuxStartTime:j}},21719:(a,b,c)=>{"use strict";c.d(b,{gq:()=>p,l4:()=>o});var d=c(79646),e=c(33873),f=c.n(e),g=c(29021),h=c.n(g),i=c(21820),j=c.n(i),k=c(30869),l=c(15754);let m=/(zevairouter[\\/]+cli[\\/]+cli\.js|[\\/]zevai(?:\.cmd)?)(?=\s|"|$)/i;function n(){return process.env.DATA_DIR?process.env.DATA_DIR:"win32"===process.platform?f().join(process.env.APPDATA||f().join(j().homedir(),"AppData","Roaming"),"zevai"):f().join(j().homedir(),".zevai")}async function o({excludePids:a=[]}={}){!function(){try{let a=f().join("win32"===process.platform?f().join(process.env.APPDATA||"","zevai"):f().join(j().homedir(),".zevai"),"mitm",".mitm.pid"),{pid:b}=(0,l.resolveVerifiedPid)(a,{commandPattern:/(mitm[\\/]server\.js|mitm[\\/]+server\b)/i});if(!b)return void(0,l.removePidFile)(a);if("win32"===process.platform)try{(0,d.execSync)(`taskkill /F /T /PID ${b}`,{stdio:"ignore",windowsHide:!0,timeout:3e3})}catch{try{(0,d.execSync)(`powershell -NonInteractive -WindowStyle Hidden -Command "Stop-Process -Id ${b} -Force"`,{stdio:"ignore",windowsHide:!0,timeout:3e3})}catch{}}else try{(0,d.execSync)(`sudo -n kill -9 ${b} 2>/dev/null`,{stdio:"ignore",timeout:3e3})}catch{try{process.kill(b,"SIGKILL")}catch{}}(0,l.removePidFile)(a)}catch{}}();let b=function(a=[]){try{return function(a,{selfPid:b,parentPid:c,excludePids:d=[],dataDir:e}){let g=new Map(a.map(a=>[a.pid,a])),h=new Map;for(let b of a)h.has(b.ppid)||h.set(b.ppid,[]),h.get(b.ppid).push(b.pid);let i=String(b),j=g.get(String(c)),k=j&&m.test(j.command)?j.pid:i,l=new Set(d.filter(a=>null!=a).map(String)),n=new Set,o=[k];for(;o.length>0;){let a=o.pop();l.has(a)||n.has(a)||(n.add(a),o.push(...h.get(a)||[]))}if(e){let b=["bin","runtime"].map(a=>f().join(e,a)+f().sep),c=a=>"win32"===process.platform?a.toLowerCase():a;for(let d of a){let a=c(d.command.replace(/^"/,""));b.some(b=>a.startsWith(c(b)))&&!l.has(d.pid)&&n.add(d.pid)}}return n.delete(i),[...n]}(function(){if("win32"===process.platform){let a=JSON.parse((0,d.execSync)('powershell -NonInteractive -WindowStyle Hidden -Command "Get-WmiObject Win32_Process | Select-Object ProcessId,ParentProcessId,CommandLine,ExecutablePath | ConvertTo-Json -Compress"',{encoding:"utf8",windowsHide:!0,timeout:5e3})||"[]");return(Array.isArray(a)?a:[a]).map(a=>({pid:String(a.ProcessId),ppid:String(a.ParentProcessId),command:a.CommandLine||a.ExecutablePath||""}))}return(0,d.execSync)("ps -axo pid=,ppid=,command= 2>/dev/null",{encoding:"utf8",timeout:5e3}).split("\n").map(a=>a.trim().match(/^(\d+)\s+(\d+)\s+(.*)$/)).filter(Boolean).map(([,a,b,c])=>({pid:a,ppid:b,command:c}))}(),{selfPid:process.pid,parentPid:process.ppid,excludePids:Array.isArray(a)?a:[],dataDir:n()})}catch{return[]}}(a),c=process.platform;b.forEach(a=>{try{"win32"===c?(0,d.execSync)(`taskkill /F /PID ${a} 2>nul`,{stdio:"ignore",shell:!0,windowsHide:!0,timeout:3e3}):(0,d.execSync)(`kill -9 ${a} 2>/dev/null`,{stdio:"ignore",timeout:3e3})}catch{}}),b.length>0&&await new Promise(a=>setTimeout(a,1500))}async function p(a=k.h0.npmPackageName){let b=function(a){try{if(!a||!h().existsSync(a))return a;let b=f().join(n(),"runtime","updater"),c=f().join(b,"updater.js");if(h().existsSync(c))try{if(h().statSync(a).size===h().statSync(c).size)return c}catch{}return h().mkdirSync(b,{recursive:!0}),h().copyFileSync(a,c),c}catch{return a}}(function(){if(process.env.UPDATER_SCRIPT_PATH&&h().existsSync(process.env.UPDATER_SCRIPT_PATH))return process.env.UPDATER_SCRIPT_PATH;let a=f().join(process.cwd(),"src","lib","updater","updater.js");if(h().existsSync(a))return a;let b=f().join(process.cwd(),"..","src","lib","updater","updater.js");return h().existsSync(b)?b:a}()),c="1"===process.env.TRAY_MODE,e={cmd:"win32"===process.platform?"npx.cmd":"npx",args:[k.h0.npmPackageName]},g=String(process.env.PORT||k.h0.appPort||1997),i=c?[...e.args,"--tray","--skip-update"]:[...e.args,"--port",g,"--no-browser","--skip-update","--log"],j=(0,d.spawn)(process.execPath,[b],{detached:!0,stdio:"ignore",windowsHide:!0,env:function(a={}){let b={...process.env,...a};return delete b.ZEVAI_LAUNCHD_JOB,delete b.XPC_SERVICE_NAME,b}({UPDATER_PKG_NAME:a||"zevairouter",UPDATER_PORT:String(k.h0.statusPort),UPDATER_TAIL_LINES:String(k.h0.statusLogTailLines),UPDATER_RETRIES:String(k.h0.installRetries),UPDATER_RETRY_DELAY_MS:String(k.h0.installRetryDelayMs),UPDATER_LINGER_MS:String(k.h0.lingerAfterDoneMs),UPDATER_WAIT_MIN_MS:String(k.h0.waitForExitMinMs),UPDATER_WAIT_MAX_MS:String(k.h0.waitForExitMaxMs),UPDATER_WAIT_CHECK_MS:String(k.h0.waitForExitCheckMs),UPDATER_APP_PORT:g,UPDATER_RELAUNCH:"1",UPDATER_RELAUNCH_CMD:e.cmd,UPDATER_RELAUNCH_ARGS:JSON.stringify(i),ZEVAI_SERVER_MODE:c?"":"1"})});j.unref();try{await o({excludePids:[j.pid]})}catch{}return setTimeout(()=>process.exit(0),k.h0.exitDelayMs),j.pid}},30869:(a,b,c)=>{"use strict";c.d(b,{UY:()=>i,X3:()=>k,eh:()=>f.eh,fg:()=>e.fg,h0:()=>h,oc:()=>j,vQ:()=>g});var d=c(39006),e=c(17404),f=c(81329);let g={name:"ZevaiRouter",description:"AI Infrastructure Management",version:d.version},h={npmPackageName:"zevairouter",installCmd:"npm i -g zevairouter",installCmdLatest:"npm i -g zevairouter@latest --prefer-online",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:1997},i={maxLines:200,pollIntervalMs:1e3},j={tickIntervalMs:6e4,pingLeadMs:5e3,refreshAheadMs:3e5,failureCooldownMs:9e5,providers:{claude:{settingsKey:"claudeAutoPing",quotaKey:"session (5h)",pingModel:"claude-haiku-4-5-20251001",pingText:"hi",pingMaxTokens:1},codex:{settingsKey:"codexAutoPing",quotaKey:"session",pingWhenResetAtSlides:!0,resetAtDriftMs:3e4,minPingIntervalMs:6e5,skipWhenBlockingQuotaExhausted:!0,pingModel:"gpt-5.5",pingText:"hi",pingInstructions:"Reply with OK.",pingReasoningEffort:"none"}}},k={openrouter:"https://openrouter.ai/api/v1/chat/completions",glm:"https://api.z.ai/api/anthropic/v1/messages","glm-cn":"https://open.bigmodel.cn/api/coding/paas/v4/chat/completions",kimi:"https://api.kimi.com/coding/v1/messages",minimax:"https://api.minimax.io/anthropic/v1/messages","minimax-cn":"https://api.minimaxi.com/anthropic/v1/messages",alicode:"https://coding.dashscope.aliyuncs.com/v1/chat/completions","alicode-intl":"https://coding-intl.dashscope.aliyuncs.com/v1/chat/completions","volcengine-ark":"https://ark.cn-beijing.volces.com/api/coding/v3/chat/completions",byteplus:"https://ark.ap-southeast.bytepluses.com/api/coding/v3/chat/completions",openai:"https://api.openai.com/v1/chat/completions","vercel-ai-gateway":"https://ai-gateway.vercel.sh/v1/chat/completions",anthropic:"https://api.anthropic.com/v1/messages",gemini:"https://generativelanguage.googleapis.com/v1beta/models",ollama:"https://ollama.com/api/chat","ollama-local":"http://localhost:11434/api/chat"}},39006:a=>{"use strict";a.exports=JSON.parse('{"name":"zevairouter","version":"1.1.66","description":"Self-hosted AI router: many providers, one OpenAI-compatible /v1 endpoint and dashboard","bin":{"zevai":"cli/cli.js"},"files":["cli/cli.js","cli/app/","!cli/app/.next-cli-build/cache/","!cli/app/.next-cli-build/server/route-cache/","cli/hooks/","cli/src/","cli/package.json","cli/README.md","cli/LICENSE","scripts/start-standalone.mjs","scripts/gflow-reply-capture.py","scripts/flow-vps-setup.sh","skills/","README.md","README.zh-CN.md","DOCKER.md","LICENSE","CHANGELOG.md"],"scripts":{"dev":"next dev --webpack --port 1997","build":"node scripts/build-app.mjs","start":"node ./scripts/start-standalone.mjs","dev:bun":"bun --bun next dev --webpack --port 1997","build:bun":"bun --bun next build --webpack","start:bun":"bun ./.next/standalone/server.js","lint":"eslint .","test":"vitest run --config tests/vitest.config.js","build:cli":"node cli/scripts/build-cli.js","audit:package":"node cli/scripts/audit-package.mjs","smoke:package":"node cli/scripts/smoke-package.mjs","verify:mobile-scroll":"node cli/scripts/verify-dashboard-mobile-scroll.mjs","candidate:build":"node cli/scripts/local-candidate.mjs build","candidate:install":"node cli/scripts/local-candidate.mjs install","candidate:status":"node cli/scripts/local-candidate.mjs status","candidate:rollback":"node cli/scripts/local-candidate.mjs rollback","release":"node cli/scripts/release.js","prepack":"npm run build:cli && npm run audit:package","postinstall":"node cli/hooks/postinstall.js"},"dependencies":{"confbox":"0.2.4","node-machine-id":"1.1.12","react":"19.2.4","react-dom":"19.2.4"},"comment_published_runtime":"npm install -g must not download next or @next/swc. Those, plus sql.js, yaml, and @node-saml/node-saml, stay devDependencies so local dev and build:cli can trace them into cli/app. The published tarball already ships that standalone server. confbox stays here because the CLI imports it directly.","comment_optional_runtime":"Optional packages are installed into ~/.zevai/runtime instead of the published tarball. Automation uses CloakBrowser with playwright-core; ZEVAI_MINIMAL_POSTINSTALL=1 skips its browser download. Other lazy runtimes are better-sqlite3, node-pty, and systray2.","overrides":{"body-parser":"^2.3.0","brace-expansion":"5.0.12","dompurify":"^3.4.12","ip-address":"^10.4.0","js-yaml":"4.3.2","nanoid":"^3.3.18","postcss":"^8.5.10","sharp":"0.35.5"},"comment_overrides":"Security floors for transitive dependencies. ESLint\'s legacy minimatch is a private, source-pinned 3.1.5 compatibility package backed by brace-expansion 5.0.9; modern minimatch and nanoid use fixed floors directly. Monaco still pins an old DOMPurify; Express, Next, ESLint, and image processing dependencies may resolve vulnerable body-parser, js-yaml, or sharp releases. Recheck and remove overrides once parent packages require fixed versions.","devDependencies":{"@dnd-kit/core":"^6.3.1","@dnd-kit/modifiers":"^9.0.0","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@monaco-editor/react":"^4.7.0","@node-saml/node-saml":"5.1.0","@tailwindcss/postcss":"^4.1.18","@xterm/addon-fit":"^0.11.0","@xterm/addon-web-links":"^0.12.0","@xterm/xterm":"^6.0.0","@xyflow/react":"^12.10.1","bcryptjs":"^3.0.3","better-sqlite3":"^12.6.2","chalk":"^4.1.2","dompurify":"^3.4.12","esbuild":"^0.28.1","eslint":"^9","eslint-config-next":"16.4.2","express":"^5.2.1","jose":"^6.1.3","marked":"^18.0.1","material-symbols":"^0.45.1","minimatch":"file:vendor/minimatch3-secure","monaco-editor":"^0.55.1","next":"16.4.2","node-forge":"^1.4.2","open":"^11.0.0","ora":"^9.1.0","postcss":"^8.5.10","prop-types":"^15.8.1","react-is":"^19.2.7","recharts":"^3.7.0","selfsigned":"^5.5.0","socks":"^2.8.9","socks-proxy-agent":"^10.1.0","sql.js":"1.14.1","tailwindcss":"^4","typescript":"6.0.3","undici":"^8.10.0","uuid":"^14.0.1","vitest":"4.1.12","yaml":"2.9.0","zustand":"^5.0.10"},"engines":{"node":">=22.5.0"},"keywords":["zevairouter","zevai","ai","router","proxy","kiro","codebuddy","claude","openai","api","quota","automation"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Verifiedlabs/zevairouter.git"},"bugs":{"url":"https://github.com/Verifiedlabs/zevairouter/issues"},"homepage":"https://github.com/Verifiedlabs/zevairouter"}')},59304:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d={id:"muse",alias:"muse",aliases:["muse-ai","meta-model-api","muse-code","muse-subscription"],category:"oauth",authModes:["oauth","apikey"],hasOAuth:!0,priority:120,passthroughModels:!0,display:{name:"Muse (Meta Model API)",icon:"auto_awesome",color:"#0866FF",textIcon:"MU",website:"https://muse.ai",notice:{text:"Sign in with your Meta account (Muse Code subscription) or paste a Model API key from dev.meta.ai. Subscription keys are minted per account; Meta may train on contributor-tier data.",apiKeyUrl:"https://dev.meta.ai",signupUrl:"https://muse.ai"}},transport:{baseUrl:"https://api.meta.ai/v1/chat/completions",validateUrl:"https://api.meta.ai/v1/models",modelsUrl:"https://api.meta.ai/v1/models",format:"openai",auth:{combined:!0,header:"Authorization",scheme:"bearer",hooks:["museHeaders"]},transports:[{format:"openai",baseUrl:"https://api.meta.ai/v1/chat/completions",auth:{combined:!0,header:"Authorization",scheme:"bearer",hooks:["museHeaders"]}},{format:"openai-responses",baseUrl:"https://api.meta.ai/v1/responses",auth:{combined:!0,header:"Authorization",scheme:"bearer",hooks:["museHeaders"]},thinkingFormat:"openai-responses"}]},oauth:{clientId:"1031625952748946",deviceCodeUrl:"https://auth.meta.com/oidc/device/authorization/",tokenUrl:"https://auth.meta.com/oidc/device/token/"},models:[{id:"muse-spark-1.3",name:"Muse Spark 1.3",targetFormat:"openai-responses",supportedFormats:["openai-responses"]},{id:"muse-spark-1.2",name:"Muse Spark 1.2",targetFormat:"openai-responses",supportedFormats:["openai-responses"]},{id:"muse-spark-1.1",name:"Muse Spark 1.1",targetFormat:"openai-responses",supportedFormats:["openai-responses"]},{id:"muse-spark-1.3-contributor",name:"Muse Spark 1.3 Contributor",targetFormat:"openai-responses",supportedFormats:["openai-responses"]},{id:"muse-spark-1.2-contributor",name:"Muse Spark 1.2 Contributor",targetFormat:"openai-responses",supportedFormats:["openai-responses"]}],serviceKinds:["llm"]}},62821:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d={id:"qoder-cn",alias:"qdcn",category:"oauth",authModes:["oauth","apikey"],hasOAuth:!0,priority:30,authHint:"Personal Access Token (pt-...) from https://qoder.com.cn/account/integrations",display:{name:"Qoder CN",icon:"water_drop",color:"#EC4899",website:"https://qoder.com.cn",notice:{signupUrl:"https://qoder.com.cn"}},transport:{baseUrl:"https://gateway.qoder.com.cn/algo/api/v2/service/pro/sse/agent_chat_generation",format:"openai",headers:{},timeoutMs:12e4,stallTimeoutMs:12e4,usage:{url:"https://openapi.qoder.com.cn/api/v2/quota/usage"}},oauth:{openApiBaseUrl:"https://openapi.qoder.com.cn",centerBaseUrl:"https://gateway.qoder.com.cn",chatBaseUrl:"https://gateway.qoder.com.cn",deviceTokenUrl:"https://openapi.qoder.com.cn/api/v1/deviceToken/poll",refreshUrl:"https://gateway.qoder.com.cn/algo/api/v3/user/refresh_token",userInfoUrl:"https://openapi.qoder.com.cn/api/v1/userinfo",quotaUsageUrl:"https://openapi.qoder.com.cn/api/v2/quota/usage",loginUrl:"https://qoder.com.cn/device/selectAccounts"},features:{usage:!0,usageApikey:!0},models:[{id:"ultimate",name:"Ultimate"},{id:"auto",name:"Auto"},{id:"performance",name:"Performance"},{id:"efficient",name:"Efficient"},{id:"lite",name:"Lite"},{id:"qmodel_38max",name:"Qwen3.8-Max"},{id:"qmodel_latest",name:"Qwen3.7-Max"},{id:"qmodel",name:"Qwen3.7-Plus"},{id:"qfmodel",name:"Qwen3.8-Flash"},{id:"kmodel_latest",name:"Kimi-K3"},{id:"kmodel",name:"Kimi-K2.7-Code"},{id:"gmodel",name:"GLM-5.3"},{id:"gfmodel",name:"GLM-5.3-Flash"},{id:"dmodel",name:"DeepSeek-V4-Pro"},{id:"dfmodel",name:"DeepSeek-V4-Flash"},{id:"mmodel",name:"MiniMax-M3"}],serviceKinds:["llm"]}},78335:()=>{},81329:(a,b,c)=>{"use strict";c.d(b,{Xg:()=>d.Xg,eh:()=>e,u0:()=>d.u0,vq:()=>d.vq});var d=c(19548);new Set(Object.entries(c(17404).AI_PROVIDERS).filter(([,a])=>a.passthroughModels).map(([a])=>a));let e=Object.entries(d.vq).flatMap(([a,b])=>b.map(b=>({provider:a,model:b.id,name:b.name})))},96487:()=>{}};
@@ -1,4 +1,4 @@
1
- "use strict";exports.id=3204,exports.ids=[3204],exports.modules={8658:(a,b,c)=>{c.d(b,{K:()=>h});let d=new Set(["assistantResponseEvent","reasoningContentEvent","codeEvent","toolUseEvent"]),e=new Uint32Array(256);for(let a=0;a<e.length;a++){let b=a;for(let a=0;a<8;a++)b=1&b?0xedb88320^b>>>1:b>>>1;e[a]=b>>>0}function f(a){let b=0xffffffff;for(let c of a)b=e[(b^c)&255]^b>>>8;return(0xffffffff^b)>>>0}function g(a,b={}){let c=Error(a);return c.name="AwsEventStreamError",c.code=a,Object.assign(c,b),c}function h({maxMessageBytes:a=0x1000000}={}){let b=new Uint8Array(0),c=0,e=!1,i=!1,j="",k=!1;return Object.freeze({push(h){if(k)throw g("AWS_EVENTSTREAM_DECODER_FINISHED");if(!(h instanceof Uint8Array))throw TypeError("EventStream chunk must be Uint8Array");b=function(a,b){if(0===a.length)return new Uint8Array(b);let c=new Uint8Array(a.length+b.length);return c.set(a),c.set(b,a.length),c}(b,h);let l=[];for(;b.length>=12;){let h=new DataView(b.buffer,b.byteOffset,b.byteLength),k=h.getUint32(0,!1),m=h.getUint32(4,!1),n=h.getUint32(8,!1);if(f(b.subarray(0,8))!==n)throw g("AWS_EVENTSTREAM_PRELUDE_CRC_MISMATCH");if(k<16)throw g("AWS_EVENTSTREAM_INVALID_LENGTH",{messageBytes:k});if(k>a)throw g("AWS_EVENTSTREAM_MESSAGE_TOO_LARGE",{messageBytes:k});if(m>k-16)throw g("AWS_EVENTSTREAM_INVALID_HEADERS",{headersBytes:m});if(b.length<k)break;let o=function(a,b){let c=new DataView(a.buffer,a.byteOffset,a.byteLength).getUint32(a.length-4,!1);if(f(a.subarray(0,a.length-4))!==c)throw g("AWS_EVENTSTREAM_MESSAGE_CRC_MISMATCH",{messageBytes:a.length});let d=function(a,b){let c={},d=12+b,e=12;for(;e<d;){let b=a[e++];if(0===b||e+b+1>d)throw g("AWS_EVENTSTREAM_INVALID_HEADERS");let f=new TextDecoder().decode(a.slice(e,e+b));e+=b;let h=a[e++],i=function(a,b,c,d){let e=new DataView(a.buffer,a.byteOffset,a.byteLength),f=a=>{if(b+a>d)throw g("AWS_EVENTSTREAM_INVALID_HEADERS")};switch(c){case 0:return{value:!0,offset:b};case 1:return{value:!1,offset:b};case 2:return f(1),{value:e.getInt8(b),offset:b+1};case 3:return f(2),{value:e.getInt16(b,!1),offset:b+2};case 4:return f(4),{value:e.getInt32(b,!1),offset:b+4};case 5:return f(8),{value:e.getBigInt64(b,!1),offset:b+8};case 6:case 7:{f(2);let d=e.getUint16(b,!1);b+=2,f(d);let g=a.slice(b,b+d);return{value:7===c?new TextDecoder().decode(g):g,offset:b+d}}case 8:return f(8),{value:Number(e.getBigInt64(b,!1)),offset:b+8};case 9:{f(16);let c=[...a.slice(b,b+16)].map(a=>a.toString(16).padStart(2,"0")).join("");return{value:`${c.slice(0,8)}-${c.slice(8,12)}-${c.slice(12,16)}-${c.slice(16,20)}-${c.slice(20)}`,offset:b+16}}default:throw g("AWS_EVENTSTREAM_UNSUPPORTED_HEADER_TYPE",{headerType:c})}}(a,e,h,d);c[f]=i.value,e=i.offset}if(e!==d)throw g("AWS_EVENTSTREAM_INVALID_HEADERS");return c}(a,b),e=String(d[":event-type"]||""),h=String(d[":message-type"]||""),i=function(a,b){let c=a.slice(12+b,a.length-4);if(0===c.length)return null;let d=new TextDecoder().decode(c);if(!d.trim())return null;try{return JSON.parse(d)}catch{return{raw:d}}}(a,b),j="exception"===h||"error"===h||!!d[":exception-type"]||!!d[":error-code"]||/exception$/i.test(e),k=("metadataEvent"===e||"assistantResponseEvent"===e)&&(i?.stopReason==="CONTENT_FILTERED"||!!i?.stopDetails?.refusal),l=j||"messageStopEvent"===e||k;return Object.freeze({headers:Object.freeze(d),payload:i,isException:j,isTerminal:l,isContentFiltered:k,messageBytes:a.length})}(b.slice(0,k),m);b=b.slice(k),c+=1,o.isTerminal&&(e=!0);let p=String(o.headers[":event-type"]||"");d.has(p)&&(i=!0),j=p,l.push(o)}return l},remainingBytes:()=>b.length,finish(){if(k)return;if(k=!0,b.length>0||0===c)throw g("KIRO_STREAM_TRUNCATED",{remainingBytes:b.length});let a=i&&"meteringEvent"===j;if(!e&&!a)throw g("KIRO_STREAM_MISSING_TERMINAL",{eventCount:c})}})}},31106:(a,b,c)=>{c.d(b,{LQ:()=>k,iR:()=>h,kv:()=>j,r$:()=>i,ss:()=>f});var d=c(77598);let e={no_restriction:"None",unspecified:"Lax",lax:"Lax",strict:"Strict",none:"None"};function f(a){let b=String(a?.apiKey??"").trim()||String(a?.cookie??"").trim();if(b)return b;let c=a?.providerSpecificData;return c&&"object"==typeof c?Array.isArray(c.cookies)?JSON.stringify(c.cookies):String(c.cookie??c.cookies??"").trim():""}function g(a){if(!a||"object"!=typeof a||!a.name||"string"!=typeof a.value||!a.domain)return null;let b=e[String(a.sameSite||"").toLowerCase()]||(["Lax","Strict","None"].includes(a.sameSite)?a.sameSite:"Lax"),c="number"==typeof a.expirationDate?a.expirationDate:"number"==typeof a.expires?a.expires:-1;return{name:String(a.name),value:a.value,domain:String(a.domain),path:a.path||"/",expires:c>0?c:-1,httpOnly:!0===a.httpOnly,secure:!0===a.secure||"None"===b,sameSite:b}}function h(a){let b=String(a||"").trim();if(!b)return[];if(b.startsWith("[")||b.startsWith("{")){let a;try{a=JSON.parse(b)}catch{return[]}return(Array.isArray(a)?a:Array.isArray(a?.cookies)?a.cookies:[]).map(g).filter(Boolean)}return b.split(";").map(a=>a.trim()).filter(Boolean).map(a=>{let b=a.indexOf("=");if(b<=0)return null;let c=a.slice(0,b).trim(),d=a.slice(b+1).trim();return c?{name:c,value:d,domain:".nvidia.com",path:"/",expires:-1,httpOnly:!1,secure:!0,sameSite:"Lax"}:null}).filter(Boolean)}function i(a){let b=String(a||"").trim();if(!b)return{valid:!1,error:"Paste the build.nvidia.com cookies"};if(b.startsWith("[")||b.startsWith("{")){let a;try{a=JSON.parse(b)}catch{return{valid:!1,error:"Cookie JSON could not be parsed; paste the whole export from Cookie-Editor"}}if(!(Array.isArray(a)?a:Array.isArray(a?.cookies)?a.cookies:null))return{valid:!1,error:"Expected a cookie array or a storageState object with a cookies array"}}let c=h(b);return c.length?j(c)?{valid:!0,error:null,count:c.length}:{valid:!1,error:"No nvidia.com cookies found; export them while on build.nvidia.com"}:{valid:!1,error:"No usable cookies found (each needs name, value and domain)"}}function j(a){return a.some(a=>/(^|\.)nvidia\.com$/i.test(a.domain.replace(/^\./,""))&&a.value.length>0)}function k(a,b=null){if(b)return`nvidia-build:${String(b).slice(0,36)}`;let c=a.map(a=>`${a.domain}|${a.name}=${a.value}`).sort().join("\n");return`nvidia-build:${(0,d.createHash)("sha256").update(c).digest("hex").slice(0,16)}`}},57140:(a,b,c)=>{c.d(b,{UD:()=>o,jL:()=>n});var d=c(74957),e=c(35024),f=c(93429),g=c(8658),h=c(39609),i=c(41004);let j=/^[a-z0-9][a-z0-9-]{0,30}$/,k={claude:/(^|[./])anthropic\./,openai:/(^|[./])xai\./},l={claude:'an Anthropic model, e.g. "us.anthropic.claude-sonnet-4-5-20250929-v1:0"',openai:'an xAI model, e.g. "us.xai.grok-4.6"'};function m(a){let b=a?.providerSpecificData||{},c=("string"==typeof b.region?b.region.trim().toLowerCase():"")||"us-east-1";if(!j.test(c))throw Error("Invalid AWS region");let d="string"==typeof b.accessKeyId?b.accessKeyId.trim():"",e="string"==typeof a?.apiKey?a.apiKey.trim():"";if(!d||!e)throw Error("AWS Bedrock requires an access key id and secret access key");return{accessKeyId:d,secretAccessKey:e,sessionToken:"string"==typeof b.sessionToken&&b.sessionToken.trim()?b.sessionToken.trim():void 0,region:c}}async function n(a,b){let c;try{c=m(a)}catch(a){return{valid:!1,error:a.message}}let d=`https://bedrock.${c.region}.amazonaws.com/foundation-models`,e=(0,f.y)({method:"GET",url:d,headers:{Accept:"application/json"},region:c.region,service:"bedrock",credentials:c}),g=await b(d,{method:"GET",headers:e,redirect:"error"});if(g.ok)return{valid:!0,error:null};let h=String(g.headers?.get?.("x-amzn-errortype")||"").split(":")[0];if("AccessDeniedException"===h)return{valid:!0,error:null};let i=(await g.json?.().catch(()=>null))?.message;return{valid:!1,error:`AWS rejected the credentials (${h||`HTTP ${g.status}`})${i?`: ${i}`:""}`}}class o extends d.Hv{constructor(a="bedrock"){super(a,e.xq[a]||{}),this.wireFormat=this.config?.format||"openai"}buildUrl(a,b,c=0,d=null){return function(a,b,c,d,e){let{region:g}=m(e),h=k[b];if(h&&!h.test(String(c||"")))throw Error(`Bedrock model ${JSON.stringify(c)} is not supported by the ${a} provider, which expects ${l[b]}.`);let i=`https://bedrock-runtime.${g}.amazonaws.com/model/${(0,f.o)(c)}/${d?"invoke-with-response-stream":"invoke"}`;if(new URL(i).host!==`bedrock-runtime.${g}.amazonaws.com`)throw Error("Bedrock endpoint is not the published runtime host");return i}(this.provider,this.wireFormat,a,b,d)}transformRequest(a,b){return function(a,b){let{model:c,stream:d,...e}=b||{};return"claude"!==a?e:{...e,anthropic_version:"bedrock-2023-05-31"}}(this.wireFormat,b)}eventStreamToSse(a,b=null){let c=a.getReader(),d=new TextEncoder,e=new TextDecoder,f=(0,g.K)({maxMessageBytes:0x1800000}),h="claude"===this.wireFormat,i=!1,j=!1,k=!1;return new ReadableStream({start:async a=>{let g=b=>{k||a.enqueue(d.encode(b))},l=a=>{if(j)return;j=!0,b?.error?.("BEDROCK",a);let c=h?{type:"error",error:{type:"api_error",message:a}}:{error:{type:"api_error",message:a,code:"api_error"}};g(h?`event: error
1
+ "use strict";exports.id=3204,exports.ids=[3204],exports.modules={8658:(a,b,c)=>{c.d(b,{K:()=>h});let d=new Set(["assistantResponseEvent","reasoningContentEvent","codeEvent","toolUseEvent"]),e=new Uint32Array(256);for(let a=0;a<e.length;a++){let b=a;for(let a=0;a<8;a++)b=1&b?0xedb88320^b>>>1:b>>>1;e[a]=b>>>0}function f(a){let b=0xffffffff;for(let c of a)b=e[(b^c)&255]^b>>>8;return(0xffffffff^b)>>>0}function g(a,b={}){let c=Error(a);return c.name="AwsEventStreamError",c.code=a,Object.assign(c,b),c}function h({maxMessageBytes:a=0x1000000}={}){let b=new Uint8Array(0),c=0,e=!1,i=!1,j="",k=!1;return Object.freeze({push(h){if(k)throw g("AWS_EVENTSTREAM_DECODER_FINISHED");if(!(h instanceof Uint8Array))throw TypeError("EventStream chunk must be Uint8Array");b=function(a,b){if(0===a.length)return new Uint8Array(b);let c=new Uint8Array(a.length+b.length);return c.set(a),c.set(b,a.length),c}(b,h);let l=[];for(;b.length>=12;){let h=new DataView(b.buffer,b.byteOffset,b.byteLength),k=h.getUint32(0,!1),m=h.getUint32(4,!1),n=h.getUint32(8,!1);if(f(b.subarray(0,8))!==n)throw g("AWS_EVENTSTREAM_PRELUDE_CRC_MISMATCH");if(k<16)throw g("AWS_EVENTSTREAM_INVALID_LENGTH",{messageBytes:k});if(k>a)throw g("AWS_EVENTSTREAM_MESSAGE_TOO_LARGE",{messageBytes:k});if(m>k-16)throw g("AWS_EVENTSTREAM_INVALID_HEADERS",{headersBytes:m});if(b.length<k)break;let o=function(a,b){let c=new DataView(a.buffer,a.byteOffset,a.byteLength).getUint32(a.length-4,!1);if(f(a.subarray(0,a.length-4))!==c)throw g("AWS_EVENTSTREAM_MESSAGE_CRC_MISMATCH",{messageBytes:a.length});let d=function(a,b){let c={},d=12+b,e=12;for(;e<d;){let b=a[e++];if(0===b||e+b+1>d)throw g("AWS_EVENTSTREAM_INVALID_HEADERS");let f=new TextDecoder().decode(a.slice(e,e+b));e+=b;let h=a[e++],i=function(a,b,c,d){let e=new DataView(a.buffer,a.byteOffset,a.byteLength),f=a=>{if(b+a>d)throw g("AWS_EVENTSTREAM_INVALID_HEADERS")};switch(c){case 0:return{value:!0,offset:b};case 1:return{value:!1,offset:b};case 2:return f(1),{value:e.getInt8(b),offset:b+1};case 3:return f(2),{value:e.getInt16(b,!1),offset:b+2};case 4:return f(4),{value:e.getInt32(b,!1),offset:b+4};case 5:return f(8),{value:e.getBigInt64(b,!1),offset:b+8};case 6:case 7:{f(2);let d=e.getUint16(b,!1);b+=2,f(d);let g=a.slice(b,b+d);return{value:7===c?new TextDecoder().decode(g):g,offset:b+d}}case 8:return f(8),{value:Number(e.getBigInt64(b,!1)),offset:b+8};case 9:{f(16);let c=[...a.slice(b,b+16)].map(a=>a.toString(16).padStart(2,"0")).join("");return{value:`${c.slice(0,8)}-${c.slice(8,12)}-${c.slice(12,16)}-${c.slice(16,20)}-${c.slice(20)}`,offset:b+16}}default:throw g("AWS_EVENTSTREAM_UNSUPPORTED_HEADER_TYPE",{headerType:c})}}(a,e,h,d);c[f]=i.value,e=i.offset}if(e!==d)throw g("AWS_EVENTSTREAM_INVALID_HEADERS");return c}(a,b),e=String(d[":event-type"]||""),h=String(d[":message-type"]||""),i=function(a,b){let c=a.slice(12+b,a.length-4);if(0===c.length)return null;let d=new TextDecoder().decode(c);if(!d.trim())return null;try{return JSON.parse(d)}catch{return{raw:d}}}(a,b),j="exception"===h||"error"===h||!!d[":exception-type"]||!!d[":error-code"]||/exception$/i.test(e),k=("metadataEvent"===e||"assistantResponseEvent"===e)&&(i?.stopReason==="CONTENT_FILTERED"||!!i?.stopDetails?.refusal),l=j||"messageStopEvent"===e||k;return Object.freeze({headers:Object.freeze(d),payload:i,isException:j,isTerminal:l,isContentFiltered:k,messageBytes:a.length})}(b.slice(0,k),m);b=b.slice(k),c+=1,o.isTerminal&&(e=!0);let p=String(o.headers[":event-type"]||"");d.has(p)&&(i=!0),j=p,l.push(o)}return l},remainingBytes:()=>b.length,finish(){if(k)return;if(k=!0,b.length>0)throw g("KIRO_STREAM_TRUNCATED",{remainingBytes:b.length});if(0===c)throw g("KIRO_STREAM_EMPTY_RESPONSE",{remainingBytes:0});let a=i&&"meteringEvent"===j;if(!e&&!a)throw g("KIRO_STREAM_MISSING_TERMINAL",{eventCount:c})}})}},31106:(a,b,c)=>{c.d(b,{LQ:()=>k,iR:()=>h,kv:()=>j,r$:()=>i,ss:()=>f});var d=c(77598);let e={no_restriction:"None",unspecified:"Lax",lax:"Lax",strict:"Strict",none:"None"};function f(a){let b=String(a?.apiKey??"").trim()||String(a?.cookie??"").trim();if(b)return b;let c=a?.providerSpecificData;return c&&"object"==typeof c?Array.isArray(c.cookies)?JSON.stringify(c.cookies):String(c.cookie??c.cookies??"").trim():""}function g(a){if(!a||"object"!=typeof a||!a.name||"string"!=typeof a.value||!a.domain)return null;let b=e[String(a.sameSite||"").toLowerCase()]||(["Lax","Strict","None"].includes(a.sameSite)?a.sameSite:"Lax"),c="number"==typeof a.expirationDate?a.expirationDate:"number"==typeof a.expires?a.expires:-1;return{name:String(a.name),value:a.value,domain:String(a.domain),path:a.path||"/",expires:c>0?c:-1,httpOnly:!0===a.httpOnly,secure:!0===a.secure||"None"===b,sameSite:b}}function h(a){let b=String(a||"").trim();if(!b)return[];if(b.startsWith("[")||b.startsWith("{")){let a;try{a=JSON.parse(b)}catch{return[]}return(Array.isArray(a)?a:Array.isArray(a?.cookies)?a.cookies:[]).map(g).filter(Boolean)}return b.split(";").map(a=>a.trim()).filter(Boolean).map(a=>{let b=a.indexOf("=");if(b<=0)return null;let c=a.slice(0,b).trim(),d=a.slice(b+1).trim();return c?{name:c,value:d,domain:".nvidia.com",path:"/",expires:-1,httpOnly:!1,secure:!0,sameSite:"Lax"}:null}).filter(Boolean)}function i(a){let b=String(a||"").trim();if(!b)return{valid:!1,error:"Paste the build.nvidia.com cookies"};if(b.startsWith("[")||b.startsWith("{")){let a;try{a=JSON.parse(b)}catch{return{valid:!1,error:"Cookie JSON could not be parsed; paste the whole export from Cookie-Editor"}}if(!(Array.isArray(a)?a:Array.isArray(a?.cookies)?a.cookies:null))return{valid:!1,error:"Expected a cookie array or a storageState object with a cookies array"}}let c=h(b);return c.length?j(c)?{valid:!0,error:null,count:c.length}:{valid:!1,error:"No nvidia.com cookies found; export them while on build.nvidia.com"}:{valid:!1,error:"No usable cookies found (each needs name, value and domain)"}}function j(a){return a.some(a=>/(^|\.)nvidia\.com$/i.test(a.domain.replace(/^\./,""))&&a.value.length>0)}function k(a,b=null){if(b)return`nvidia-build:${String(b).slice(0,36)}`;let c=a.map(a=>`${a.domain}|${a.name}=${a.value}`).sort().join("\n");return`nvidia-build:${(0,d.createHash)("sha256").update(c).digest("hex").slice(0,16)}`}},57140:(a,b,c)=>{c.d(b,{UD:()=>o,jL:()=>n});var d=c(74957),e=c(35024),f=c(93429),g=c(8658),h=c(39609),i=c(41004);let j=/^[a-z0-9][a-z0-9-]{0,30}$/,k={claude:/(^|[./])anthropic\./,openai:/(^|[./])xai\./},l={claude:'an Anthropic model, e.g. "us.anthropic.claude-sonnet-4-5-20250929-v1:0"',openai:'an xAI model, e.g. "us.xai.grok-4.6"'};function m(a){let b=a?.providerSpecificData||{},c=("string"==typeof b.region?b.region.trim().toLowerCase():"")||"us-east-1";if(!j.test(c))throw Error("Invalid AWS region");let d="string"==typeof b.accessKeyId?b.accessKeyId.trim():"",e="string"==typeof a?.apiKey?a.apiKey.trim():"";if(!d||!e)throw Error("AWS Bedrock requires an access key id and secret access key");return{accessKeyId:d,secretAccessKey:e,sessionToken:"string"==typeof b.sessionToken&&b.sessionToken.trim()?b.sessionToken.trim():void 0,region:c}}async function n(a,b){let c;try{c=m(a)}catch(a){return{valid:!1,error:a.message}}let d=`https://bedrock.${c.region}.amazonaws.com/foundation-models`,e=(0,f.y)({method:"GET",url:d,headers:{Accept:"application/json"},region:c.region,service:"bedrock",credentials:c}),g=await b(d,{method:"GET",headers:e,redirect:"error"});if(g.ok)return{valid:!0,error:null};let h=String(g.headers?.get?.("x-amzn-errortype")||"").split(":")[0];if("AccessDeniedException"===h)return{valid:!0,error:null};let i=(await g.json?.().catch(()=>null))?.message;return{valid:!1,error:`AWS rejected the credentials (${h||`HTTP ${g.status}`})${i?`: ${i}`:""}`}}class o extends d.Hv{constructor(a="bedrock"){super(a,e.xq[a]||{}),this.wireFormat=this.config?.format||"openai"}buildUrl(a,b,c=0,d=null){return function(a,b,c,d,e){let{region:g}=m(e),h=k[b];if(h&&!h.test(String(c||"")))throw Error(`Bedrock model ${JSON.stringify(c)} is not supported by the ${a} provider, which expects ${l[b]}.`);let i=`https://bedrock-runtime.${g}.amazonaws.com/model/${(0,f.o)(c)}/${d?"invoke-with-response-stream":"invoke"}`;if(new URL(i).host!==`bedrock-runtime.${g}.amazonaws.com`)throw Error("Bedrock endpoint is not the published runtime host");return i}(this.provider,this.wireFormat,a,b,d)}transformRequest(a,b){return function(a,b){let{model:c,stream:d,...e}=b||{};return"claude"!==a?e:{...e,anthropic_version:"bedrock-2023-05-31"}}(this.wireFormat,b)}eventStreamToSse(a,b=null){let c=a.getReader(),d=new TextEncoder,e=new TextDecoder,f=(0,g.K)({maxMessageBytes:0x1800000}),h="claude"===this.wireFormat,i=!1,j=!1,k=!1;return new ReadableStream({start:async a=>{let g=b=>{k||a.enqueue(d.encode(b))},l=a=>{if(j)return;j=!0,b?.error?.("BEDROCK",a);let c=h?{type:"error",error:{type:"api_error",message:a}}:{error:{type:"api_error",message:a,code:"api_error"}};g(h?`event: error
2
2
  data: ${JSON.stringify(c)}
3
3
 
4
4
  `:`data: ${JSON.stringify(c)}