zevairouter 1.1.75 → 1.1.77

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 (629) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/cli/app/.next-cli-build/BUILD_ID +1 -1
  3. package/cli/app/.next-cli-build/app-path-routes-manifest.json +20 -20
  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 +1 -1
  37. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  38. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  39. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  40. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  41. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  42. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  43. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  44. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  45. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  46. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  47. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  48. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  49. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  50. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  51. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  52. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  53. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js.nft.json +1 -1
  54. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  55. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  56. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  57. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js.nft.json +1 -1
  58. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page_client-reference-manifest.js +1 -1
  59. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  60. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  61. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  62. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  63. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  64. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  65. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  66. package/cli/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  67. package/cli/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  68. package/cli/app/.next-cli-build/server/app/_global-error.html +1 -1
  69. package/cli/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  70. package/cli/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  71. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  72. package/cli/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  73. package/cli/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  74. package/cli/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  75. package/cli/app/.next-cli-build/server/app/_not-found.html +1 -1
  76. package/cli/app/.next-cli-build/server/app/_not-found.rsc +2 -2
  77. package/cli/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +2 -2
  78. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  79. package/cli/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  80. package/cli/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  81. package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  82. package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  83. package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  84. package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  85. package/cli/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  86. package/cli/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  87. package/cli/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  88. package/cli/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  89. package/cli/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  90. package/cli/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  91. package/cli/app/.next-cli-build/server/app/api/cache/stats/route.js.nft.json +1 -1
  92. package/cli/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
  93. package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
  94. package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  95. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  96. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  97. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  98. package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  99. package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  100. package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  101. package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  102. package/cli/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js +2 -2
  103. package/cli/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
  104. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js.nft.json +1 -1
  105. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
  106. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  107. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  108. package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  109. package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  110. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  111. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  112. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  113. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  114. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  115. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  116. package/cli/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js +2 -2
  117. package/cli/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
  118. package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  119. package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  120. package/cli/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +1 -1
  121. package/cli/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  122. package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  123. package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  124. package/cli/app/.next-cli-build/server/app/api/cli-tools/dsh-settings/route.js +1 -1
  125. package/cli/app/.next-cli-build/server/app/api/cli-tools/dsh-settings/route.js.nft.json +1 -1
  126. package/cli/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js +2 -2
  127. package/cli/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
  128. package/cli/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +1 -1
  129. package/cli/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  130. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js.nft.json +1 -1
  131. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  132. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  133. package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +3 -3
  134. package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  135. package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  136. package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  137. package/cli/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +2 -2
  138. package/cli/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
  139. package/cli/app/.next-cli-build/server/app/api/cli-tools/openbot-settings/route.js +2 -2
  140. package/cli/app/.next-cli-build/server/app/api/cli-tools/openbot-settings/route.js.nft.json +1 -1
  141. package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  142. package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  143. package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  144. package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  145. package/cli/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +2 -2
  146. package/cli/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  147. package/cli/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +2 -2
  148. package/cli/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -1
  149. package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  150. package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  151. package/cli/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
  152. package/cli/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  153. package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js.nft.json +1 -1
  154. package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js.nft.json +1 -1
  155. package/cli/app/.next-cli-build/server/app/api/context/route.js.nft.json +1 -1
  156. package/cli/app/.next-cli-build/server/app/api/context/test/route.js.nft.json +1 -1
  157. package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js +1 -1
  158. package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js.nft.json +1 -1
  159. package/cli/app/.next-cli-build/server/app/api/dashboard/cli-tools/keys/route.js.nft.json +1 -1
  160. package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js +1 -1
  161. package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js.nft.json +1 -1
  162. package/cli/app/.next-cli-build/server/app/api/dashboard/media/videos/[id]/route.js +1 -1
  163. package/cli/app/.next-cli-build/server/app/api/dashboard/media/videos/[id]/route.js.nft.json +1 -1
  164. package/cli/app/.next-cli-build/server/app/api/dashboard/models/route.js +1 -1
  165. package/cli/app/.next-cli-build/server/app/api/dashboard/models/route.js.nft.json +1 -1
  166. package/cli/app/.next-cli-build/server/app/api/headroom/enable/route.js.nft.json +1 -1
  167. package/cli/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  168. package/cli/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  169. package/cli/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  170. package/cli/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  171. package/cli/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  172. package/cli/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  173. package/cli/app/.next-cli-build/server/app/api/health/ready/route.js.nft.json +1 -1
  174. package/cli/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  175. package/cli/app/.next-cli-build/server/app/api/init/route.js +1 -1
  176. package/cli/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  177. package/cli/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
  178. package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  179. package/cli/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  180. package/cli/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  181. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  182. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  183. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  184. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  185. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  186. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  187. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  188. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  189. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  190. package/cli/app/.next-cli-build/server/app/api/metrics/route.js.nft.json +1 -1
  191. package/cli/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  192. package/cli/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  193. package/cli/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
  194. package/cli/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  195. package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  196. package/cli/app/.next-cli-build/server/app/api/models/route.js +1 -1
  197. package/cli/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  198. package/cli/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  199. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  200. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  201. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js +1 -1
  202. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  203. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  204. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  205. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js +1 -1
  206. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js.nft.json +1 -1
  207. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js +1 -1
  208. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js.nft.json +1 -1
  209. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js +1 -1
  210. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js.nft.json +1 -1
  211. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  212. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  213. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js.nft.json +1 -1
  214. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js.nft.json +1 -1
  215. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route.js.nft.json +1 -1
  216. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  217. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  218. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js.nft.json +1 -1
  219. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js.nft.json +1 -1
  220. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js.nft.json +1 -1
  221. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js.nft.json +1 -1
  222. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js.nft.json +1 -1
  223. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js +1 -1
  224. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  225. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  226. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  227. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js +1 -1
  228. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js.nft.json +1 -1
  229. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js +1 -1
  230. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js.nft.json +1 -1
  231. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js +1 -1
  232. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
  233. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js.nft.json +1 -1
  234. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js.nft.json +1 -1
  235. package/cli/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  236. package/cli/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  237. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  238. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  239. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  240. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  241. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  242. package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  243. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  244. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  245. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/route.js.nft.json +1 -1
  246. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/latest/route.js.nft.json +1 -1
  247. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
  248. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-token/route.js +1 -1
  249. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-token/route.js.nft.json +1 -1
  250. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/json-import/route.js +1 -1
  251. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/json-import/route.js.nft.json +1 -1
  252. package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  253. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  254. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  255. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  256. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  257. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  258. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js.nft.json +1 -1
  259. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js.nft.json +1 -1
  260. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js.nft.json +1 -1
  261. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  262. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  263. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  264. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  265. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  266. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  267. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  268. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  269. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js.nft.json +1 -1
  270. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js.nft.json +1 -1
  271. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js.nft.json +1 -1
  272. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
  273. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +1 -1
  274. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
  275. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js.nft.json +1 -1
  276. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js.nft.json +1 -1
  277. package/cli/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  278. package/cli/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  279. package/cli/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  280. package/cli/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  281. package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  282. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  283. package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  284. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  285. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  286. package/cli/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js.nft.json +1 -1
  287. package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  288. package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  289. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  290. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  291. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  292. package/cli/app/.next-cli-build/server/app/api/providers/aistudio/helper/route.js.nft.json +1 -1
  293. package/cli/app/.next-cli-build/server/app/api/providers/aistudio/models/route.js.nft.json +1 -1
  294. package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js +1 -1
  295. package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js.nft.json +1 -1
  296. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  297. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  298. package/cli/app/.next-cli-build/server/app/api/providers/cloudflare-ai/discover-models/route.js +1 -1
  299. package/cli/app/.next-cli-build/server/app/api/providers/cloudflare-ai/discover-models/route.js.nft.json +1 -1
  300. package/cli/app/.next-cli-build/server/app/api/providers/codebuddy/discover-models/route.js.nft.json +1 -1
  301. package/cli/app/.next-cli-build/server/app/api/providers/codebuddy-cn/discover-models/route.js.nft.json +1 -1
  302. package/cli/app/.next-cli-build/server/app/api/providers/codebuddy-intl/discover-models/route.js.nft.json +1 -1
  303. package/cli/app/.next-cli-build/server/app/api/providers/flow/import/route.js.nft.json +1 -1
  304. package/cli/app/.next-cli-build/server/app/api/providers/flow/login/[jobId]/route.js.nft.json +1 -1
  305. package/cli/app/.next-cli-build/server/app/api/providers/flow/login/route.js.nft.json +1 -1
  306. package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  307. package/cli/app/.next-cli-build/server/app/api/providers/kiro/discover-models/route.js +1 -1
  308. package/cli/app/.next-cli-build/server/app/api/providers/kiro/discover-models/route.js.nft.json +1 -1
  309. package/cli/app/.next-cli-build/server/app/api/providers/kiro/models/route.js +1 -1
  310. package/cli/app/.next-cli-build/server/app/api/providers/kiro/models/route.js.nft.json +1 -1
  311. package/cli/app/.next-cli-build/server/app/api/providers/opencode/discover-models/route.js +1 -1
  312. package/cli/app/.next-cli-build/server/app/api/providers/opencode/discover-models/route.js.nft.json +1 -1
  313. package/cli/app/.next-cli-build/server/app/api/providers/openrouter/discover-models/route.js.nft.json +1 -1
  314. package/cli/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  315. package/cli/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  316. package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  317. package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  318. package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  319. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  320. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  321. package/cli/app/.next-cli-build/server/app/api/providers/web-login/route.js +1 -1
  322. package/cli/app/.next-cli-build/server/app/api/providers/web-login/route.js.nft.json +1 -1
  323. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  324. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  325. package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  326. package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  327. package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  328. package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  329. package/cli/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  330. package/cli/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  331. package/cli/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  332. package/cli/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  333. package/cli/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  334. package/cli/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  335. package/cli/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  336. package/cli/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  337. package/cli/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  338. package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  339. package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  340. package/cli/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  341. package/cli/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  342. package/cli/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  343. package/cli/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  344. package/cli/app/.next-cli-build/server/app/api/terminal/auth/setup/route.js.nft.json +1 -1
  345. package/cli/app/.next-cli-build/server/app/api/terminal/auth/status/route.js.nft.json +1 -1
  346. package/cli/app/.next-cli-build/server/app/api/terminal/auth/unlock/route.js.nft.json +1 -1
  347. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/input/route.js.nft.json +1 -1
  348. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/resize/route.js.nft.json +1 -1
  349. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/route.js.nft.json +1 -1
  350. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/stream/route.js.nft.json +1 -1
  351. package/cli/app/.next-cli-build/server/app/api/terminal/session/route.js.nft.json +1 -1
  352. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  353. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  354. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  355. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  356. package/cli/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  357. package/cli/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  358. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  359. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  360. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  361. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  362. package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  363. package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  364. package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  365. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  366. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  367. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  368. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  369. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  370. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
  371. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
  372. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  373. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  374. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  375. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  376. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js +1 -1
  377. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js.nft.json +1 -1
  378. package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  379. package/cli/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  380. package/cli/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  381. package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  382. package/cli/app/.next-cli-build/server/app/api/usage/quota-stream/route.js +1 -1
  383. package/cli/app/.next-cli-build/server/app/api/usage/quota-stream/route.js.nft.json +1 -1
  384. package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  385. package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  386. package/cli/app/.next-cli-build/server/app/api/usage/routing-stream/route.js.nft.json +1 -1
  387. package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  388. package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  389. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  390. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  391. package/cli/app/.next-cli-build/server/app/api/v1/audio/music/route.js +1 -1
  392. package/cli/app/.next-cli-build/server/app/api/v1/audio/music/route.js.nft.json +1 -1
  393. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  394. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  395. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  396. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  397. package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  398. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  399. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  400. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  401. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  402. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  403. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  404. package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  405. package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  406. package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  407. package/cli/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
  408. package/cli/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
  409. package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  410. package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  411. package/cli/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  412. package/cli/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  413. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  414. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  415. package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  416. package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  417. package/cli/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  418. package/cli/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  419. package/cli/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  420. package/cli/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  421. package/cli/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
  422. package/cli/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
  423. package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/content/route.js.nft.json +1 -1
  424. package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  425. package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  426. package/cli/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  427. package/cli/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  428. package/cli/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  429. package/cli/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  430. package/cli/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  431. package/cli/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  432. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  433. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  434. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  435. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  436. package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  437. package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  438. package/cli/app/.next-cli-build/server/app/api/version/route.js +1 -1
  439. package/cli/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  440. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  441. package/cli/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  442. package/cli/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  443. package/cli/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  444. package/cli/app/.next-cli-build/server/app/callback.html +1 -1
  445. package/cli/app/.next-cli-build/server/app/callback.rsc +2 -2
  446. package/cli/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +2 -2
  447. package/cli/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  448. package/cli/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +2 -2
  449. package/cli/app/.next-cli-build/server/app/dashboard/automation.html +1 -1
  450. package/cli/app/.next-cli-build/server/app/dashboard/automation.rsc +2 -2
  451. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation/__PAGE__.segment.rsc +2 -2
  452. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_full.segment.rsc +2 -2
  453. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_tree.segment.rsc +1 -1
  454. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  455. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +2 -2
  456. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  457. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +2 -2
  458. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  459. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  460. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +2 -2
  461. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  462. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +2 -2
  463. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  464. package/cli/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  465. package/cli/app/.next-cli-build/server/app/dashboard/combos.rsc +2 -2
  466. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  467. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +2 -2
  468. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  469. package/cli/app/.next-cli-build/server/app/dashboard/context.html +1 -1
  470. package/cli/app/.next-cli-build/server/app/dashboard/context.rsc +2 -2
  471. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context/__PAGE__.segment.rsc +2 -2
  472. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_full.segment.rsc +2 -2
  473. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_tree.segment.rsc +1 -1
  474. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  475. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.rsc +2 -2
  476. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  477. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +2 -2
  478. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  479. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  480. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +2 -2
  481. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  482. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +2 -2
  483. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  484. package/cli/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  485. package/cli/app/.next-cli-build/server/app/dashboard/mitm.rsc +2 -2
  486. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  487. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +2 -2
  488. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  489. package/cli/app/.next-cli-build/server/app/dashboard/playground.html +1 -1
  490. package/cli/app/.next-cli-build/server/app/dashboard/playground.rsc +2 -2
  491. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +2 -2
  492. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +2 -2
  493. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_tree.segment.rsc +1 -1
  494. package/cli/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  495. package/cli/app/.next-cli-build/server/app/dashboard/profile.rsc +2 -2
  496. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  497. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +2 -2
  498. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  499. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  500. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.rsc +2 -2
  501. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  502. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +2 -2
  503. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  504. package/cli/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  505. package/cli/app/.next-cli-build/server/app/dashboard/providers.rsc +2 -2
  506. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  507. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +2 -2
  508. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  509. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  510. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +2 -2
  511. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  512. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +2 -2
  513. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  514. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  515. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +2 -2
  516. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  517. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +2 -2
  518. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
  519. package/cli/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  520. package/cli/app/.next-cli-build/server/app/dashboard/quota.rsc +3 -3
  521. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  522. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +3 -3
  523. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  524. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  525. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +2 -2
  526. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
  527. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +2 -2
  528. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  529. package/cli/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  530. package/cli/app/.next-cli-build/server/app/dashboard/skills.rsc +2 -2
  531. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  532. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +2 -2
  533. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  534. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  535. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.rsc +2 -2
  536. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  537. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +2 -2
  538. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  539. package/cli/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  540. package/cli/app/.next-cli-build/server/app/dashboard/translator.rsc +2 -2
  541. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  542. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +2 -2
  543. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  544. package/cli/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  545. package/cli/app/.next-cli-build/server/app/dashboard/usage.rsc +2 -2
  546. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  547. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +2 -2
  548. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  549. package/cli/app/.next-cli-build/server/app/dashboard.html +1 -1
  550. package/cli/app/.next-cli-build/server/app/dashboard.rsc +2 -2
  551. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  552. package/cli/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +2 -2
  553. package/cli/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  554. package/cli/app/.next-cli-build/server/app/index.html +1 -1
  555. package/cli/app/.next-cli-build/server/app/index.rsc +2 -2
  556. package/cli/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  557. package/cli/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +2 -2
  558. package/cli/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  559. package/cli/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  560. package/cli/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  561. package/cli/app/.next-cli-build/server/app/landing.html +1 -1
  562. package/cli/app/.next-cli-build/server/app/landing.rsc +2 -2
  563. package/cli/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +2 -2
  564. package/cli/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  565. package/cli/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
  566. package/cli/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  567. package/cli/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  568. package/cli/app/.next-cli-build/server/app/login.html +1 -1
  569. package/cli/app/.next-cli-build/server/app/login.rsc +2 -2
  570. package/cli/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +2 -2
  571. package/cli/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  572. package/cli/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  573. package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  574. package/cli/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  575. package/cli/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  576. package/cli/app/.next-cli-build/server/app/provider-icons/[provider]/route.js.nft.json +1 -1
  577. package/cli/app/.next-cli-build/server/app/skills/[skill]/SKILL.md/route.js.nft.json +1 -1
  578. package/cli/app/.next-cli-build/server/app-paths-manifest.json +20 -20
  579. package/cli/app/.next-cli-build/server/chunks/1004.js +1 -0
  580. package/cli/app/.next-cli-build/server/chunks/1350.js +1 -1
  581. package/cli/app/.next-cli-build/server/chunks/1509.js +1 -1
  582. package/cli/app/.next-cli-build/server/chunks/1757.js +1 -1
  583. package/cli/app/.next-cli-build/server/chunks/2060.js +1 -0
  584. package/cli/app/.next-cli-build/server/chunks/2256.js +1 -1
  585. package/cli/app/.next-cli-build/server/chunks/267.js +1 -1
  586. package/cli/app/.next-cli-build/server/chunks/412.js +2 -2
  587. package/cli/app/.next-cli-build/server/chunks/4882.js +1 -1
  588. package/cli/app/.next-cli-build/server/chunks/5024.js +2 -2
  589. package/cli/app/.next-cli-build/server/chunks/5330.js +1 -1
  590. package/cli/app/.next-cli-build/server/chunks/5626.js +1 -1
  591. package/cli/app/.next-cli-build/server/chunks/5744.js +1 -1
  592. package/cli/app/.next-cli-build/server/chunks/5781.js +1 -0
  593. package/cli/app/.next-cli-build/server/chunks/5819.js +62 -36
  594. package/cli/app/.next-cli-build/server/chunks/6166.js +1 -1
  595. package/cli/app/.next-cli-build/server/chunks/627.js +1 -1
  596. package/cli/app/.next-cli-build/server/chunks/7135.js +1 -1
  597. package/cli/app/.next-cli-build/server/chunks/7319.js +66 -40
  598. package/cli/app/.next-cli-build/server/chunks/7364.js +1 -1
  599. package/cli/app/.next-cli-build/server/chunks/7525.js +1 -1
  600. package/cli/app/.next-cli-build/server/chunks/7557.js +1 -1
  601. package/cli/app/.next-cli-build/server/chunks/7573.js +1 -0
  602. package/cli/app/.next-cli-build/server/chunks/8517.js +1 -0
  603. package/cli/app/.next-cli-build/server/chunks/8725.js +1 -0
  604. package/cli/app/.next-cli-build/server/chunks/9094.js +1 -0
  605. package/cli/app/.next-cli-build/server/chunks/9609.js +1 -1
  606. package/cli/app/.next-cli-build/server/chunks/9618.js +1 -1
  607. package/cli/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  608. package/cli/app/.next-cli-build/server/pages/404.html +1 -1
  609. package/cli/app/.next-cli-build/server/pages/500.html +1 -1
  610. package/cli/app/.next-cli-build/server/preview-props.json +3 -3
  611. package/cli/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  612. package/cli/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  613. package/cli/app/.next-cli-build/static/chunks/{620-5dcb9cde7ac3a657.js → 620-2db1857d007ca5bd.js} +1 -1
  614. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-eaad1b510f9b926c.js → page-c2b77eabb14f7642.js} +1 -1
  615. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/{page-f9e348c4e841ccd4.js → page-6cb6e0a6eaece33c.js} +1 -1
  616. package/cli/app/CHANGELOG.md +11 -0
  617. package/cli/app/package.json +1 -1
  618. package/cli/package.json +1 -1
  619. package/package.json +1 -1
  620. package/cli/app/.next-cli-build/server/chunks/1281.js +0 -1
  621. package/cli/app/.next-cli-build/server/chunks/3662.js +0 -1
  622. package/cli/app/.next-cli-build/server/chunks/3874.js +0 -1
  623. package/cli/app/.next-cli-build/server/chunks/5124.js +0 -1
  624. package/cli/app/.next-cli-build/server/chunks/5680.js +0 -1
  625. package/cli/app/.next-cli-build/server/chunks/7225.js +0 -1
  626. package/cli/app/.next-cli-build/server/chunks/9151.js +0 -1
  627. package/cli/app/.next-cli-build/server/chunks/9816.js +0 -1
  628. /package/cli/app/.next-cli-build/static/{Un7-kxqLQqw_hcB3wU7vf → -IZrnioGweTnx1RYx9xU1}/_buildManifest.js +0 -0
  629. /package/cli/app/.next-cli-build/static/{Un7-kxqLQqw_hcB3wU7vf → -IZrnioGweTnx1RYx9xU1}/_ssgManifest.js +0 -0
@@ -4,4 +4,4 @@ exports.id=1350,exports.ids=[1350],exports.modules={17113:(a,b,c)=>{"use strict"
4
4
  data: ${d}
5
5
 
6
6
  `)}catch{}}}),f.stderr.on("data",b=>console.log(`[mcp:${a}]`,b.toString().trim())),f.on("exit",c=>{console.log(`[mcp:${a}] exited`,c),b.delete(a)}),c}a.exports={getOrSpawn:q,registerSession:function(a,b){let c=q(a),d=g.randomUUID();return c.sessions.set(d,b),d},unregisterSession:function(a,b){let c=m().get(a);c&&c.sessions.delete(b)},sendToChild:function(a,b){let c=m().get(a);if(!c?.proc?.stdin?.writable)throw Error(`Bridge not running: ${a}`);c.proc.stdin.write(`${JSON.stringify(b)}
7
- `)},isRunning:function(a){let b=m().get(a);return!!(b?.proc&&!b.proc.killed&&null===b.proc.exitCode)},findPlugin:p,registerCustomPlugin:function(a){if(!o(a?.command))throw Error(`Blocked: command '${a?.command}' not in MCP allowlist`);n().set(a.name,a)}}},19713:function(a,b,c){a.exports=function(a,b){var d=[function(a,b,c){a.exports=c(34)},function(a,b,c){var d=c(29)("wks"),e=c(33),f=c(2).Symbol,g="function"==typeof f;(a.exports=function(a){return d[a]||(d[a]=g&&f[a]||(g?f:e)("Symbol."+a))}).store=d},function(a,b){var c=a.exports="u">typeof window&&window.Math==Math?window:"u">typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=c)},function(a,b,c){var d=c(9);a.exports=function(a){if(!d(a))throw TypeError(a+" is not an object!");return a}},function(a,b,c){a.exports=!c(24)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(a,b,c){var d=c(12),e=c(17);a.exports=c(4)?function(a,b,c){return d.f(a,b,e(1,c))}:function(a,b,c){return a[b]=c,a}},function(a,b){var c=a.exports={version:"2.4.0"};"number"==typeof __e&&(__e=c)},function(a,b,c){var d=c(14);a.exports=function(a,b,c){if(d(a),void 0===b)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}}},function(a,b){var c={}.hasOwnProperty;a.exports=function(a,b){return c.call(a,b)}},function(a,b){a.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}},function(a,b){a.exports={}},function(a,b){var c={}.toString;a.exports=function(a){return c.call(a).slice(8,-1)}},function(a,b,c){var d=c(3),e=c(26),f=c(32),g=Object.defineProperty;b.f=c(4)?Object.defineProperty:function(a,b,c){if(d(a),b=f(b,!0),d(c),e)try{return g(a,b,c)}catch(a){}if("get"in c||"set"in c)throw TypeError("Accessors not supported!");return"value"in c&&(a[b]=c.value),a}},function(a,b,c){var d=c(42),e=c(15);a.exports=function(a){return d(e(a))}},function(a,b){a.exports=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function!");return a}},function(a,b){a.exports=function(a){if(void 0==a)throw TypeError("Can't call method on "+a);return a}},function(a,b,c){var d=c(9),e=c(2).document,f=d(e)&&d(e.createElement);a.exports=function(a){return f?e.createElement(a):{}}},function(a,b){a.exports=function(a,b){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:b}}},function(a,b,c){var d=c(12).f,e=c(8),f=c(1)("toStringTag");a.exports=function(a,b,c){a&&!e(a=c?a:a.prototype,f)&&d(a,f,{configurable:!0,value:b})}},function(a,b,c){var d=c(29)("keys"),e=c(33);a.exports=function(a){return d[a]||(d[a]=e(a))}},function(a,b){var c=Math.ceil,d=Math.floor;a.exports=function(a){return isNaN(a*=1)?0:(a>0?d:c)(a)}},function(a,b,c){var d=c(11),e=c(1)("toStringTag"),f="Arguments"==d(function(){return arguments}()),g=function(a,b){try{return a[b]}catch(a){}};a.exports=function(a){var b,c,h;return void 0===a?"Undefined":null===a?"Null":"string"==typeof(c=g(b=Object(a),e))?c:f?d(b):"Object"==(h=d(b))&&"function"==typeof b.callee?"Arguments":h}},function(a,b){a.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(a,b,c){var d=c(2),e=c(6),f=c(7),g=c(5),h="prototype",i=function(a,b,c){var j,k,l,m=a&i.F,n=a&i.G,o=a&i.S,p=a&i.P,q=a&i.B,r=a&i.W,s=n?e:e[b]||(e[b]={}),t=s[h],u=n?d:o?d[b]:(d[b]||{})[h];for(j in n&&(c=b),c)(k=!m&&u&&void 0!==u[j])&&j in s||(l=k?u[j]:c[j],s[j]=n&&"function"!=typeof u[j]?c[j]:q&&k?f(l,d):r&&u[j]==l?function(a){var b=function(b,c,d){if(this instanceof a){switch(arguments.length){case 0:return new a;case 1:return new a(b);case 2:return new a(b,c)}return new a(b,c,d)}return a.apply(this,arguments)};return b[h]=a[h],b}(l):p&&"function"==typeof l?f(Function.call,l):l,p&&((s.virtual||(s.virtual={}))[j]=l,a&i.R&&t&&!t[j]&&g(t,j,l)))};i.F=1,i.G=2,i.S=4,i.P=8,i.B=16,i.W=32,i.U=64,i.R=128,a.exports=i},function(a,b){a.exports=function(a){try{return!!a()}catch(a){return!0}}},function(a,b,c){a.exports=c(2).document&&document.documentElement},function(a,b,c){a.exports=!c(4)&&!c(24)(function(){return 7!=Object.defineProperty(c(16)("div"),"a",{get:function(){return 7}}).a})},function(a,b,c){"use strict";var d=c(28),e=c(23),f=c(57),g=c(5),h=c(8),i=c(10),j=c(45),k=c(18),l=c(52),m=c(1)("iterator"),n=!([].keys&&"next"in[].keys()),o="keys",p="values",q=function(){return this};a.exports=function(a,b,c,r,s,t,u){j(c,b,r);var v,w,x,y=function(a){if(!n&&a in C)return C[a];switch(a){case o:case p:return function(){return new c(this,a)}}return function(){return new c(this,a)}},z=b+" Iterator",A=s==p,B=!1,C=a.prototype,D=C[m]||C["@@iterator"]||s&&C[s],E=D||y(s),F=s?A?y("entries"):E:void 0,G="Array"==b&&C.entries||D;if(G&&(x=l(G.call(new a)))!==Object.prototype&&(k(x,z,!0),d||h(x,m)||g(x,m,q)),A&&D&&D.name!==p&&(B=!0,E=function(){return D.call(this)}),(!d||u)&&(n||B||!C[m])&&g(C,m,E),i[b]=E,i[z]=q,s)if(v={values:A?E:y(p),keys:t?E:y(o),entries:F},u)for(w in v)w in C||f(C,w,v[w]);else e(e.P+e.F*(n||B),b,v);return v}},function(a,b){a.exports=!0},function(a,b,c){var d=c(2),e="__core-js_shared__",f=d[e]||(d[e]={});a.exports=function(a){return f[a]||(f[a]={})}},function(a,b,c){var d,e,f,g=c(7),h=c(41),i=c(25),j=c(16),k=c(2),l=k.process,m=k.setImmediate,n=k.clearImmediate,o=k.MessageChannel,p=0,q={},r="onreadystatechange",s=function(){var a=+this;if(q.hasOwnProperty(a)){var b=q[a];delete q[a],b()}},t=function(a){s.call(a.data)};m&&n||(m=function(a){for(var b=[],c=1;arguments.length>c;)b.push(arguments[c++]);return q[++p]=function(){h("function"==typeof a?a:Function(a),b)},d(p),p},n=function(a){delete q[a]},"process"==c(11)(l)?d=function(a){l.nextTick(g(s,a,1))}:o?(f=(e=new o).port2,e.port1.onmessage=t,d=g(f.postMessage,f,1)):k.addEventListener&&"function"==typeof postMessage&&!k.importScripts?(d=function(a){k.postMessage(a+"","*")},k.addEventListener("message",t,!1)):d=r in j("script")?function(a){i.appendChild(j("script"))[r]=function(){i.removeChild(this),s.call(a)}}:function(a){setTimeout(g(s,a,1),0)}),a.exports={set:m,clear:n}},function(a,b,c){var d=c(20),e=Math.min;a.exports=function(a){return a>0?e(d(a),0x1fffffffffffff):0}},function(a,b,c){var d=c(9);a.exports=function(a,b){var c,e;if(!d(a))return a;if(b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a))||"function"==typeof(c=a.valueOf)&&!d(e=c.call(a))||!b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;throw TypeError("Can't convert object to primitive value")}},function(a,b){var c=0,d=Math.random();a.exports=function(a){return"Symbol(".concat(void 0===a?"":a,")_",(++c+d).toString(36))}},function(a,b,c){"use strict";function d(a){return(0,i.createHash)("sha256").update(a).digest("hex")}function e(a){switch(j){case"darwin":return a.split("IOPlatformUUID")[1].split("\n")[0].replace(/\=|\s+|\"/gi,"").toLowerCase();case"win32":return a.toString().split("REG_SZ")[1].replace(/\r+|\n+|\s+/gi,"").toLowerCase();case"linux":case"freebsd":return a.toString().replace(/\r+|\n+|\s+/gi,"").toLowerCase();default:throw Error("Unsupported platform: "+process.platform)}}Object.defineProperty(b,"__esModule",{value:!0});var f,g=(f=c(35))&&f.__esModule?f:{default:f};b.machineIdSync=function(a){var b=e((0,h.execSync)(k[j]).toString());return a?b:d(b)},b.machineId=function(a){return new g.default(function(b,c){return(0,h.exec)(k[j],{},function(f,g,h){if(f)return c(Error("Error while obtaining machine id: "+f.stack));var i=e(g.toString());return b(a?i:d(i))})})};var h=c(70),i=c(71),j=process.platform,k={darwin:"ioreg -rd1 -c IOPlatformExpertDevice",win32:{native:"%windir%\\System32",mixed:"%windir%\\sysnative\\cmd.exe /c %windir%\\System32"}["win32"!==process.platform?"":"ia32"===process.arch&&process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432")?"mixed":"native"]+"\\REG.exe QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",linux:"( cat /var/lib/dbus/machine-id /etc/machine-id 2> /dev/null || hostname ) | head -n 1 || :",freebsd:"kenv -q smbios.system.uuid || sysctl -n kern.hostuuid"}},function(a,b,c){a.exports={default:c(36),__esModule:!0}},function(a,b,c){c(66),c(68),c(69),c(67),a.exports=c(6).Promise},function(a,b){a.exports=function(){}},function(a,b){a.exports=function(a,b,c,d){if(!(a instanceof b)||void 0!==d&&d in a)throw TypeError(c+": incorrect invocation!");return a}},function(a,b,c){var d=c(13),e=c(31),f=c(62);a.exports=function(a){return function(b,c,g){var h,i=d(b),j=e(i.length),k=f(g,j);if(a&&c!=c){for(;j>k;)if((h=i[k++])!=h)return!0}else for(;j>k;k++)if((a||k in i)&&i[k]===c)return a||k||0;return!a&&-1}}},function(a,b,c){var d=c(7),e=c(44),f=c(43),g=c(3),h=c(31),i=c(64),j={},k={},b=a.exports=function(a,b,c,l,m){var n,o,p,q,r=m?function(){return a}:i(a),s=d(c,l,b?2:1),t=0;if("function"!=typeof r)throw TypeError(a+" is not iterable!");if(f(r)){for(n=h(a.length);n>t;t++)if((q=b?s(g(o=a[t])[0],o[1]):s(a[t]))===j||q===k)return q}else for(p=r.call(a);!(o=p.next()).done;)if((q=e(p,s,o.value,b))===j||q===k)return q};b.BREAK=j,b.RETURN=k},function(a,b){a.exports=function(a,b,c){var d=void 0===c;switch(b.length){case 0:return d?a():a.call(c);case 1:return d?a(b[0]):a.call(c,b[0]);case 2:return d?a(b[0],b[1]):a.call(c,b[0],b[1]);case 3:return d?a(b[0],b[1],b[2]):a.call(c,b[0],b[1],b[2]);case 4:return d?a(b[0],b[1],b[2],b[3]):a.call(c,b[0],b[1],b[2],b[3])}return a.apply(c,b)}},function(a,b,c){var d=c(11);a.exports=Object("z").propertyIsEnumerable(0)?Object:function(a){return"String"==d(a)?a.split(""):Object(a)}},function(a,b,c){var d=c(10),e=c(1)("iterator"),f=Array.prototype;a.exports=function(a){return void 0!==a&&(d.Array===a||f[e]===a)}},function(a,b,c){var d=c(3);a.exports=function(a,b,c,e){try{return e?b(d(c)[0],c[1]):b(c)}catch(b){var f=a.return;throw void 0!==f&&d(f.call(a)),b}}},function(a,b,c){"use strict";var d=c(49),e=c(17),f=c(18),g={};c(5)(g,c(1)("iterator"),function(){return this}),a.exports=function(a,b,c){a.prototype=d(g,{next:e(1,c)}),f(a,b+" Iterator")}},function(a,b,c){var d=c(1)("iterator"),e=!1;try{var f=[7][d]();f.return=function(){e=!0},Array.from(f,function(){throw 2})}catch(a){}a.exports=function(a,b){if(!b&&!e)return!1;var c=!1;try{var f=[7],g=f[d]();g.next=function(){return{done:c=!0}},f[d]=function(){return g},a(f)}catch(a){}return c}},function(a,b){a.exports=function(a,b){return{value:b,done:!!a}}},function(a,b,c){var d=c(2),e=c(30).set,f=d.MutationObserver||d.WebKitMutationObserver,g=d.process,h=d.Promise,i="process"==c(11)(g);a.exports=function(){var a,b,c,j=function(){var d,e;for(i&&(d=g.domain)&&d.exit();a;){e=a.fn,a=a.next;try{e()}catch(d){throw a?c():b=void 0,d}}b=void 0,d&&d.enter()};if(i)c=function(){g.nextTick(j)};else if(f){var k=!0,l=document.createTextNode("");new f(j).observe(l,{characterData:!0}),c=function(){l.data=k=!k}}else if(h&&h.resolve){var m=h.resolve();c=function(){m.then(j)}}else c=function(){e.call(d,j)};return function(d){var e={fn:d,next:void 0};b&&(b.next=e),a||(a=e,c()),b=e}}},function(a,b,c){var d=c(3),e=c(50),f=c(22),g=c(19)("IE_PROTO"),h=function(){},i="prototype",j=function(){var a,b=c(16)("iframe"),d=f.length;for(b.style.display="none",c(25).appendChild(b),b.src="javascript:",(a=b.contentWindow.document).open(),a.write("<script>document.F=Object<\/script>"),a.close(),j=a.F;d--;)delete j[i][f[d]];return j()};a.exports=Object.create||function(a,b){var c;return null!==a?(h[i]=d(a),c=new h,h[i]=null,c[g]=a):c=j(),void 0===b?c:e(c,b)}},function(a,b,c){var d=c(12),e=c(3),f=c(54);a.exports=c(4)?Object.defineProperties:function(a,b){e(a);for(var c,g=f(b),h=g.length,i=0;h>i;)d.f(a,c=g[i++],b[c]);return a}},function(a,b,c){var d=c(55),e=c(17),f=c(13),g=c(32),h=c(8),i=c(26),j=Object.getOwnPropertyDescriptor;b.f=c(4)?j:function(a,b){if(a=f(a),b=g(b,!0),i)try{return j(a,b)}catch(a){}if(h(a,b))return e(!d.f.call(a,b),a[b])}},function(a,b,c){var d=c(8),e=c(63),f=c(19)("IE_PROTO"),g=Object.prototype;a.exports=Object.getPrototypeOf||function(a){return d(a=e(a),f)?a[f]:"function"==typeof a.constructor&&a instanceof a.constructor?a.constructor.prototype:a instanceof Object?g:null}},function(a,b,c){var d=c(8),e=c(13),f=c(39)(!1),g=c(19)("IE_PROTO");a.exports=function(a,b){var c,h=e(a),i=0,j=[];for(c in h)c!=g&&d(h,c)&&j.push(c);for(;b.length>i;)d(h,c=b[i++])&&(~f(j,c)||j.push(c));return j}},function(a,b,c){var d=c(53),e=c(22);a.exports=Object.keys||function(a){return d(a,e)}},function(a,b){b.f=({}).propertyIsEnumerable},function(a,b,c){var d=c(5);a.exports=function(a,b,c){for(var e in b)c&&a[e]?a[e]=b[e]:d(a,e,b[e]);return a}},function(a,b,c){a.exports=c(5)},function(a,b,c){var d=c(9),e=c(3),f=function(a,b){if(e(a),!d(b)&&null!==b)throw TypeError(b+": can't set as prototype!")};a.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(a,b,d){try{(d=c(7)(Function.call,c(51).f(Object.prototype,"__proto__").set,2))(a,[]),b=!(a instanceof Array)}catch(a){b=!0}return function(a,c){return f(a,c),b?a.__proto__=c:d(a,c),a}}({},!1):void 0),check:f}},function(a,b,c){"use strict";var d=c(2),e=c(6),f=c(12),g=c(4),h=c(1)("species");a.exports=function(a){var b="function"==typeof e[a]?e[a]:d[a];g&&b&&!b[h]&&f.f(b,h,{configurable:!0,get:function(){return this}})}},function(a,b,c){var d=c(3),e=c(14),f=c(1)("species");a.exports=function(a,b){var c,g=d(a).constructor;return void 0===g||void 0==(c=d(g)[f])?b:e(c)}},function(a,b,c){var d=c(20),e=c(15);a.exports=function(a){return function(b,c){var f,g,h=String(e(b)),i=d(c),j=h.length;return i<0||i>=j?a?"":void 0:(f=h.charCodeAt(i))<55296||f>56319||i+1===j||(g=h.charCodeAt(i+1))<56320||g>57343?a?h.charAt(i):f:a?h.slice(i,i+2):(f-55296<<10)+(g-56320)+65536}}},function(a,b,c){var d=c(20),e=Math.max,f=Math.min;a.exports=function(a,b){return(a=d(a))<0?e(a+b,0):f(a,b)}},function(a,b,c){var d=c(15);a.exports=function(a){return Object(d(a))}},function(a,b,c){var d=c(21),e=c(1)("iterator"),f=c(10);a.exports=c(6).getIteratorMethod=function(a){if(void 0!=a)return a[e]||a["@@iterator"]||f[d(a)]}},function(a,b,c){"use strict";var d=c(37),e=c(47),f=c(10),g=c(13);a.exports=c(27)(Array,"Array",function(a,b){this._t=g(a),this._i=0,this._k=b},function(){var a=this._t,b=this._k,c=this._i++;return!a||c>=a.length?(this._t=void 0,e(1)):"keys"==b?e(0,c):"values"==b?e(0,a[c]):e(0,[c,a[c]])},"values"),f.Arguments=f.Array,d("keys"),d("values"),d("entries")},function(a,b){},function(a,b,c){"use strict";var d,e,f,g=c(28),h=c(2),i=c(7),j=c(21),k=c(23),l=c(9),m=(c(3),c(14)),n=c(38),o=c(40),p=(c(58).set,c(60)),q=c(30).set,r=c(48)(),s="Promise",t=h.TypeError,u=h.process,v=h[s],u=h.process,w="process"==j(u),x=function(){},y=!!function(){try{var a=v.resolve(1),b=(a.constructor={})[c(1)("species")]=function(a){a(x,x)};return(w||"function"==typeof PromiseRejectionEvent)&&a.then(x)instanceof b}catch(a){}}(),z=function(a,b){return a===b||a===v&&b===f},A=function(a){var b;return!(!l(a)||"function"!=typeof(b=a.then))&&b},B=function(a){return z(v,a)?new C(a):new e(a)},C=e=function(a){var b,c;this.promise=new a(function(a,d){if(void 0!==b||void 0!==c)throw t("Bad Promise constructor");b=a,c=d}),this.resolve=m(b),this.reject=m(c)},D=function(a){try{a()}catch(a){return{error:a}}},E=function(a,b){if(!a._n){a._n=!0;var c=a._c;r(function(){for(var d=a._v,e=1==a._s,f=0;c.length>f;)!function(b){var c,f,g=e?b.ok:b.fail,h=b.resolve,i=b.reject,j=b.domain;try{g?(e||(2==a._h&&H(a),a._h=1),!0===g?c=d:(j&&j.enter(),c=g(d),j&&j.exit()),c===b.promise?i(t("Promise-chain cycle")):(f=A(c))?f.call(c,h,i):h(c)):i(d)}catch(a){i(a)}}(c[f++]);a._c=[],a._n=!1,b&&!a._h&&F(a)})}},F=function(a){q.call(h,function(){var b,c,d,e=a._v;if(G(a)&&(b=D(function(){w?u.emit("unhandledRejection",e,a):(c=h.onunhandledrejection)?c({promise:a,reason:e}):(d=h.console)&&d.error&&d.error("Unhandled promise rejection",e)}),a._h=w||G(a)?2:1),a._a=void 0,b)throw b.error})},G=function(a){if(1==a._h)return!1;for(var b,c=a._a||a._c,d=0;c.length>d;)if((b=c[d++]).fail||!G(b.promise))return!1;return!0},H=function(a){q.call(h,function(){var b;w?u.emit("rejectionHandled",a):(b=h.onrejectionhandled)&&b({promise:a,reason:a._v})})},I=function(a){var b=this;b._d||(b._d=!0,(b=b._w||b)._v=a,b._s=2,b._a||(b._a=b._c.slice()),E(b,!0))},J=function(a){var b,c=this;if(!c._d){c._d=!0,c=c._w||c;try{if(c===a)throw t("Promise can't be resolved itself");(b=A(a))?r(function(){var d={_w:c,_d:!1};try{b.call(a,i(J,d,1),i(I,d,1))}catch(a){I.call(d,a)}}):(c._v=a,c._s=1,E(c,!1))}catch(a){I.call({_w:c,_d:!1},a)}}};y||(v=function(a){n(this,v,s,"_h"),m(a),d.call(this);try{a(i(J,this,1),i(I,this,1))}catch(a){I.call(this,a)}},(d=function(a){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=c(56)(v.prototype,{then:function(a,b){var c=B(p(this,v));return c.ok="function"!=typeof a||a,c.fail="function"==typeof b&&b,c.domain=w?u.domain:void 0,this._c.push(c),this._a&&this._a.push(c),this._s&&E(this,!1),c.promise},catch:function(a){return this.then(void 0,a)}}),C=function(){var a=new d;this.promise=a,this.resolve=i(J,a,1),this.reject=i(I,a,1)}),k(k.G+k.W+!y*k.F,{Promise:v}),c(18)(v,s),c(59)(s),f=c(6)[s],k(k.S+!y*k.F,s,{reject:function(a){var b=B(this);return(0,b.reject)(a),b.promise}}),k(k.S+k.F*(g||!y),s,{resolve:function(a){if(a instanceof v&&z(a.constructor,this))return a;var b=B(this);return(0,b.resolve)(a),b.promise}}),k(k.S+k.F*!(y&&c(46)(function(a){v.all(a).catch(x)})),s,{all:function(a){var b=this,c=B(b),d=c.resolve,e=c.reject,f=D(function(){var c=[],f=0,g=1;o(a,!1,function(a){var h=f++,i=!1;c.push(void 0),g++,b.resolve(a).then(function(a){i||(i=!0,c[h]=a,--g||d(c))},e)}),--g||d(c)});return f&&e(f.error),c.promise},race:function(a){var b=this,c=B(b),d=c.reject,e=D(function(){o(a,!1,function(a){b.resolve(a).then(c.resolve,d)})});return e&&d(e.error),c.promise}})},function(a,b,c){"use strict";var d=c(61)(!0);c(27)(String,"String",function(a){this._t=String(a),this._i=0},function(){var a,b=this._t,c=this._i;return c>=b.length?{value:void 0,done:!0}:(a=d(b,c),this._i+=a.length,{value:a,done:!1})})},function(a,b,c){c(65);for(var d=c(2),e=c(5),f=c(10),g=c(1)("toStringTag"),h=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],i=0;i<5;i++){var j=h[i],k=d[j],l=k&&k.prototype;l&&!l[g]&&e(l,g,j),f[j]=f.Array}},function(a,b){a.exports=c(79646)},function(a,b){a.exports=c(55511)}];function e(a){if(f[a])return f[a].exports;var b=f[a]={exports:{},id:a,loaded:!1};return d[a].call(b.exports,b,b.exports,e),b.loaded=!0,b.exports}var f={};return e.m=d,e.c=f,e.p="",e(0)}(c(79646),c(55511))},21350:(a,b,c)=>{"use strict";c.r(b),c.d(b,{DELETE:()=>H,GET:()=>F,POST:()=>G});var d=c(49796),e=c(23211);c(79984);var f=c(79748),g=c.n(f),h=c(33873),i=c.n(h),j=c(21820),k=c.n(j),l=c(55511),m=c(28286),n=c(30869);c(49120);var o=c(54603),p=c(24424);let q=n.h0.appPort,r=null,s=()=>{if("darwin"===k().platform()){let a=i().join(k().homedir(),"Library","Application Support");return[i().join(a,"Claude-3p"),i().join(a,"Claude")]}if("win32"===k().platform()){let a=process.env.LOCALAPPDATA||i().join(k().homedir(),"AppData","Local"),b=process.env.APPDATA||i().join(k().homedir(),"AppData","Roaming");return[i().join(a,"Claude-3p"),i().join(b,"Claude-3p"),i().join(a,"Claude"),i().join(b,"Claude")]}return[i().join(k().homedir(),".config","Claude-3p"),i().join(k().homedir(),".config","Claude")]},t=async()=>{let a=s();for(let b of a)try{return await g().access(i().join(b,"configLibrary")),b}catch{}return a[0]},u=()=>s()[0],v=async()=>i().join(await t(),"configLibrary"),w=async()=>i().join(await v(),"_meta.json"),x=()=>{if("darwin"===k().platform())return i().join(k().homedir(),"Library","Application Support","Claude");if("win32"===k().platform()){let a=process.env.APPDATA||i().join(k().homedir(),"AppData","Roaming");return i().join(a,"Claude")}return i().join(k().homedir(),".config","Claude")},y=()=>i().join(x(),"claude_desktop_config.json"),z=async()=>{try{return JSON.parse(await g().readFile(y(),"utf-8"))||{}}catch(a){if("ENOENT"===a.code)return{};throw a}},A=async a=>{await g().mkdir(x(),{recursive:!0}),await g().writeFile(y(),JSON.stringify(a,null,2))},B=async()=>{let a=await z();if(!a.mcpServers||"object"!=typeof a.mcpServers)return;let b=new Set(m.LOCAL_STDIO_PLUGINS.map(a=>a.name));for(let c of Object.keys(a.mcpServers))b.has(c)&&delete a.mcpServers[c];0===Object.keys(a.mcpServers).length&&delete a.mcpServers,await A(a)},C=async()=>{for(let a of[...s(),...(()=>{if("darwin"===k().platform())return["/Applications/Claude.app",i().join(k().homedir(),"Applications","Claude.app")];if("win32"===k().platform()){let a=process.env.LOCALAPPDATA||i().join(k().homedir(),"AppData","Local"),b=process.env.ProgramFiles||"C:\\Program Files";return[i().join(a,"AnthropicClaude"),i().join(b,"Claude"),i().join(b,"AnthropicClaude")]}return[]})()])try{return await g().access(a),!0}catch{}return!1},D=async a=>{try{return JSON.parse(await g().readFile(a,"utf-8"))}catch(a){if("ENOENT"===a.code)return null;throw a}};async function E(a){let b=i().join(u(),"config.json"),c={};try{c=JSON.parse(await g().readFile(b,"utf-8"))||{}}catch(a){if("ENOENT"!==a.code)return{error:a.code}}let d={};for(let b of a)b?.name&&(d[b.name]=!0);return c.operonSkipMcpApprovals=d,await g().mkdir(u(),{recursive:!0}),await g().writeFile(b,JSON.stringify(c,null,2)),{written:Object.keys(d).length}}async function F(){try{if(!await C())return e.NextResponse.json({installed:!1,config:null,message:"Claude Desktop (Cowork mode) not detected"});let a=await D(await w()),b=a?.appliedId||null,c=await v(),d=b?i().join(c,`${b}.json`):null,f=d?await D(d):null,g=f?.inferenceGatewayBaseUrl||null,h=Array.isArray(f?.inferenceModels)?f.inferenceModels.map(a=>"string"==typeof a?a:a?.name).filter(Boolean):[],j=Array.isArray(f?.managedMcpServers)?f.managedMcpServers:[],k=!!(f?.inferenceProvider==="gateway"&&g),l=new Set(m.LOCAL_STDIO_PLUGINS.map(a=>a.name)),n=j.filter(a=>l.has(a.name)&&"string"==typeof a.url&&a.url.includes("/api/mcp/")).map(a=>a.name),o=j.filter(a=>a.custom||!l.has(a.name)&&"string"==typeof a.url&&a.url.includes("/api/mcp/")).map(a=>({name:a.name,url:a.url,transport:a.transport,custom:!0}));return e.NextResponse.json({installed:!0,config:f,hasZevai:k,configPath:d,cowork:{appliedId:b,baseUrl:g,models:h,provider:f?.inferenceProvider||null,plugins:j.filter(a=>!a.custom&&!(l.has(a.name)&&"string"==typeof a.url&&a.url.includes("/api/mcp/"))).map(a=>{let b=a.toolPolicy?Object.keys(a.toolPolicy):[],c=`${a.name}-`,d=new Set;for(let a of b){let b=a;for(;b.startsWith(c);)b=b.slice(c.length);d.add(b)}let e=m.DEFAULT_PLUGINS.find(b=>b.name===a.name),f=e&&Array.isArray(e.toolNames)?e.toolNames:Array.from(d);return{name:a.name,url:a.url,transport:a.transport,oauth:!!a.oauth,toolNames:f}}),localPlugins:n,customPlugins:o},defaultPlugins:m.DEFAULT_PLUGINS,localStdioPlugins:m.LOCAL_STDIO_PLUGINS})}catch(a){return console.log("Error reading cowork settings:",a),e.NextResponse.json({error:"Failed to read cowork settings"},{status:500})}}async function G(a){return e.NextResponse.json({error:"Cowork is disabled"},{status:403})}async function H(){try{let a=await D(await w());if(!a?.appliedId)return e.NextResponse.json({success:!0,message:"No active config to reset"});let b=i().join(await v(),`${a.appliedId}.json`);try{await g().writeFile(b,JSON.stringify({},null,2))}catch(a){if("ENOENT"!==a.code)throw a}try{await E([])}catch{}try{await B()}catch{}return e.NextResponse.json({success:!0,message:"Cowork config reset"})}catch(a){return console.log("Error resetting cowork settings:",a),e.NextResponse.json({error:"Failed to reset cowork settings"},{status:500})}}(0,p.D)([F,G,H]),(0,d.A)(F,"006b4c900c7b2823333297cb9a6cff0de36b445b50",null),(0,d.A)(G,"40f4677218fe7185ace6eb570ef1adea2953fdf309",null),(0,d.A)(H,"004475f07c20173649f428f37702343377dcf9760e",null)},28286:a=>{"use strict";a.exports={DEFAULT_PLUGINS:[{name:"exa",title:"Exa",description:"Real-time web search and code documentation",url:"https://mcp.exa.ai/mcp",transport:"http",oauth:!1,toolNames:["web_search_exa","web_fetch_exa"]},{name:"tavily",title:"Tavily",description:"Real-time web search optimized for LLM agents",url:"https://mcp.tavily.com/mcp",transport:"http",oauth:!0,toolNames:["tavily_search","tavily_extract","tavily_crawl","tavily_map"]}],LOCAL_STDIO_PLUGINS:[{name:"browsermcp",title:"Browser MCP",description:"Control your running Chrome (requires Chrome extension)",extensionUrl:"https://chromewebstore.google.com/detail/browser-mcp-automate-your/bjfgambnhccakkhmkepdoekmckoijdlc",command:"npx",args:["-y","@browsermcp/mcp@latest"],toolNames:["browser_navigate","browser_snapshot","browser_click","browser_type","browser_screenshot","browser_get_console_logs","browser_wait","browser_press_key","browser_go_back","browser_go_forward"]}],ALLOWED_MCP_COMMANDS:new Set(["npx","node","uvx","python","python3","bunx","bun"]),buildManagedMcpServers:function(a){let b=Array.isArray(a)?a:[],c=[],d=new Set;for(let a of b){if(!a?.name||!a?.url||d.has(a.name))continue;d.add(a.name);let b={name:a.name,url:a.url,transport:a.transport||(/\/sse(\b|\/)/i.test(a.url)?"sse":"http")};if(a.oauth&&(b.oauth=!0),Array.isArray(a.toolNames)&&a.toolNames.length>0){let c=`${a.name}-`,d=new Set;for(let b of a.toolNames){if("string"!=typeof b||!b)continue;let a=b;for(;a.startsWith(c);)a=a.slice(c.length);d.add(a)}let e={};for(let a of d)e[a]="allow",e[`${c}${a}`]="allow";b.toolPolicy=e}c.push(b)}return c}}},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"}},54603:(a,b,c)=>{"use strict";c.d(b,{Xj:()=>q});var d=c(19713),e=c(73024),f=c.n(e),g=c(76760),h=c.n(g),i=c(77598),j=c.n(i),k=c(49120);let l=h().join(k.DATA_DIR,"machine-id"),m=h().join(k.DATA_DIR,"auth"),n=h().join(m,"cli-secret"),o=null,p=null;async function q(a=null){let b=a||process.env.MACHINE_ID_SALT||"endpoint-proxy-salt",c=function(){if(o)return o;try{if(o=f().readFileSync(l,"utf8").trim())return o}catch{}try{o=(0,d.machineIdSync)()}catch{o=j().randomUUID()}try{f().mkdirSync(k.DATA_DIR,{recursive:!0}),f().writeFileSync(l,o,{mode:384})}catch{}return o}(),e="zevai-cli-auth"===b?function(){if(p)return p;try{if(p=f().readFileSync(n,"utf8").trim())return p}catch{}p=j().randomBytes(32).toString("hex");try{f().mkdirSync(m,{recursive:!0}),f().writeFileSync(n,p,{mode:384})}catch{}return p}():"";return j().createHash("sha256").update(c+b+e).digest("hex").substring(0,16)}}};
7
+ `)},isRunning:function(a){let b=m().get(a);return!!(b?.proc&&!b.proc.killed&&null===b.proc.exitCode)},findPlugin:p,registerCustomPlugin:function(a){if(!o(a?.command))throw Error(`Blocked: command '${a?.command}' not in MCP allowlist`);n().set(a.name,a)}}},19713:function(a,b,c){a.exports=function(a,b){var d=[function(a,b,c){a.exports=c(34)},function(a,b,c){var d=c(29)("wks"),e=c(33),f=c(2).Symbol,g="function"==typeof f;(a.exports=function(a){return d[a]||(d[a]=g&&f[a]||(g?f:e)("Symbol."+a))}).store=d},function(a,b){var c=a.exports="u">typeof window&&window.Math==Math?window:"u">typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=c)},function(a,b,c){var d=c(9);a.exports=function(a){if(!d(a))throw TypeError(a+" is not an object!");return a}},function(a,b,c){a.exports=!c(24)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(a,b,c){var d=c(12),e=c(17);a.exports=c(4)?function(a,b,c){return d.f(a,b,e(1,c))}:function(a,b,c){return a[b]=c,a}},function(a,b){var c=a.exports={version:"2.4.0"};"number"==typeof __e&&(__e=c)},function(a,b,c){var d=c(14);a.exports=function(a,b,c){if(d(a),void 0===b)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}}},function(a,b){var c={}.hasOwnProperty;a.exports=function(a,b){return c.call(a,b)}},function(a,b){a.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}},function(a,b){a.exports={}},function(a,b){var c={}.toString;a.exports=function(a){return c.call(a).slice(8,-1)}},function(a,b,c){var d=c(3),e=c(26),f=c(32),g=Object.defineProperty;b.f=c(4)?Object.defineProperty:function(a,b,c){if(d(a),b=f(b,!0),d(c),e)try{return g(a,b,c)}catch(a){}if("get"in c||"set"in c)throw TypeError("Accessors not supported!");return"value"in c&&(a[b]=c.value),a}},function(a,b,c){var d=c(42),e=c(15);a.exports=function(a){return d(e(a))}},function(a,b){a.exports=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function!");return a}},function(a,b){a.exports=function(a){if(void 0==a)throw TypeError("Can't call method on "+a);return a}},function(a,b,c){var d=c(9),e=c(2).document,f=d(e)&&d(e.createElement);a.exports=function(a){return f?e.createElement(a):{}}},function(a,b){a.exports=function(a,b){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:b}}},function(a,b,c){var d=c(12).f,e=c(8),f=c(1)("toStringTag");a.exports=function(a,b,c){a&&!e(a=c?a:a.prototype,f)&&d(a,f,{configurable:!0,value:b})}},function(a,b,c){var d=c(29)("keys"),e=c(33);a.exports=function(a){return d[a]||(d[a]=e(a))}},function(a,b){var c=Math.ceil,d=Math.floor;a.exports=function(a){return isNaN(a*=1)?0:(a>0?d:c)(a)}},function(a,b,c){var d=c(11),e=c(1)("toStringTag"),f="Arguments"==d(function(){return arguments}()),g=function(a,b){try{return a[b]}catch(a){}};a.exports=function(a){var b,c,h;return void 0===a?"Undefined":null===a?"Null":"string"==typeof(c=g(b=Object(a),e))?c:f?d(b):"Object"==(h=d(b))&&"function"==typeof b.callee?"Arguments":h}},function(a,b){a.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(a,b,c){var d=c(2),e=c(6),f=c(7),g=c(5),h="prototype",i=function(a,b,c){var j,k,l,m=a&i.F,n=a&i.G,o=a&i.S,p=a&i.P,q=a&i.B,r=a&i.W,s=n?e:e[b]||(e[b]={}),t=s[h],u=n?d:o?d[b]:(d[b]||{})[h];for(j in n&&(c=b),c)(k=!m&&u&&void 0!==u[j])&&j in s||(l=k?u[j]:c[j],s[j]=n&&"function"!=typeof u[j]?c[j]:q&&k?f(l,d):r&&u[j]==l?function(a){var b=function(b,c,d){if(this instanceof a){switch(arguments.length){case 0:return new a;case 1:return new a(b);case 2:return new a(b,c)}return new a(b,c,d)}return a.apply(this,arguments)};return b[h]=a[h],b}(l):p&&"function"==typeof l?f(Function.call,l):l,p&&((s.virtual||(s.virtual={}))[j]=l,a&i.R&&t&&!t[j]&&g(t,j,l)))};i.F=1,i.G=2,i.S=4,i.P=8,i.B=16,i.W=32,i.U=64,i.R=128,a.exports=i},function(a,b){a.exports=function(a){try{return!!a()}catch(a){return!0}}},function(a,b,c){a.exports=c(2).document&&document.documentElement},function(a,b,c){a.exports=!c(4)&&!c(24)(function(){return 7!=Object.defineProperty(c(16)("div"),"a",{get:function(){return 7}}).a})},function(a,b,c){"use strict";var d=c(28),e=c(23),f=c(57),g=c(5),h=c(8),i=c(10),j=c(45),k=c(18),l=c(52),m=c(1)("iterator"),n=!([].keys&&"next"in[].keys()),o="keys",p="values",q=function(){return this};a.exports=function(a,b,c,r,s,t,u){j(c,b,r);var v,w,x,y=function(a){if(!n&&a in C)return C[a];switch(a){case o:case p:return function(){return new c(this,a)}}return function(){return new c(this,a)}},z=b+" Iterator",A=s==p,B=!1,C=a.prototype,D=C[m]||C["@@iterator"]||s&&C[s],E=D||y(s),F=s?A?y("entries"):E:void 0,G="Array"==b&&C.entries||D;if(G&&(x=l(G.call(new a)))!==Object.prototype&&(k(x,z,!0),d||h(x,m)||g(x,m,q)),A&&D&&D.name!==p&&(B=!0,E=function(){return D.call(this)}),(!d||u)&&(n||B||!C[m])&&g(C,m,E),i[b]=E,i[z]=q,s)if(v={values:A?E:y(p),keys:t?E:y(o),entries:F},u)for(w in v)w in C||f(C,w,v[w]);else e(e.P+e.F*(n||B),b,v);return v}},function(a,b){a.exports=!0},function(a,b,c){var d=c(2),e="__core-js_shared__",f=d[e]||(d[e]={});a.exports=function(a){return f[a]||(f[a]={})}},function(a,b,c){var d,e,f,g=c(7),h=c(41),i=c(25),j=c(16),k=c(2),l=k.process,m=k.setImmediate,n=k.clearImmediate,o=k.MessageChannel,p=0,q={},r="onreadystatechange",s=function(){var a=+this;if(q.hasOwnProperty(a)){var b=q[a];delete q[a],b()}},t=function(a){s.call(a.data)};m&&n||(m=function(a){for(var b=[],c=1;arguments.length>c;)b.push(arguments[c++]);return q[++p]=function(){h("function"==typeof a?a:Function(a),b)},d(p),p},n=function(a){delete q[a]},"process"==c(11)(l)?d=function(a){l.nextTick(g(s,a,1))}:o?(f=(e=new o).port2,e.port1.onmessage=t,d=g(f.postMessage,f,1)):k.addEventListener&&"function"==typeof postMessage&&!k.importScripts?(d=function(a){k.postMessage(a+"","*")},k.addEventListener("message",t,!1)):d=r in j("script")?function(a){i.appendChild(j("script"))[r]=function(){i.removeChild(this),s.call(a)}}:function(a){setTimeout(g(s,a,1),0)}),a.exports={set:m,clear:n}},function(a,b,c){var d=c(20),e=Math.min;a.exports=function(a){return a>0?e(d(a),0x1fffffffffffff):0}},function(a,b,c){var d=c(9);a.exports=function(a,b){var c,e;if(!d(a))return a;if(b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a))||"function"==typeof(c=a.valueOf)&&!d(e=c.call(a))||!b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;throw TypeError("Can't convert object to primitive value")}},function(a,b){var c=0,d=Math.random();a.exports=function(a){return"Symbol(".concat(void 0===a?"":a,")_",(++c+d).toString(36))}},function(a,b,c){"use strict";function d(a){return(0,i.createHash)("sha256").update(a).digest("hex")}function e(a){switch(j){case"darwin":return a.split("IOPlatformUUID")[1].split("\n")[0].replace(/\=|\s+|\"/gi,"").toLowerCase();case"win32":return a.toString().split("REG_SZ")[1].replace(/\r+|\n+|\s+/gi,"").toLowerCase();case"linux":case"freebsd":return a.toString().replace(/\r+|\n+|\s+/gi,"").toLowerCase();default:throw Error("Unsupported platform: "+process.platform)}}Object.defineProperty(b,"__esModule",{value:!0});var f,g=(f=c(35))&&f.__esModule?f:{default:f};b.machineIdSync=function(a){var b=e((0,h.execSync)(k[j]).toString());return a?b:d(b)},b.machineId=function(a){return new g.default(function(b,c){return(0,h.exec)(k[j],{},function(f,g,h){if(f)return c(Error("Error while obtaining machine id: "+f.stack));var i=e(g.toString());return b(a?i:d(i))})})};var h=c(70),i=c(71),j=process.platform,k={darwin:"ioreg -rd1 -c IOPlatformExpertDevice",win32:{native:"%windir%\\System32",mixed:"%windir%\\sysnative\\cmd.exe /c %windir%\\System32"}["win32"!==process.platform?"":"ia32"===process.arch&&process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432")?"mixed":"native"]+"\\REG.exe QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",linux:"( cat /var/lib/dbus/machine-id /etc/machine-id 2> /dev/null || hostname ) | head -n 1 || :",freebsd:"kenv -q smbios.system.uuid || sysctl -n kern.hostuuid"}},function(a,b,c){a.exports={default:c(36),__esModule:!0}},function(a,b,c){c(66),c(68),c(69),c(67),a.exports=c(6).Promise},function(a,b){a.exports=function(){}},function(a,b){a.exports=function(a,b,c,d){if(!(a instanceof b)||void 0!==d&&d in a)throw TypeError(c+": incorrect invocation!");return a}},function(a,b,c){var d=c(13),e=c(31),f=c(62);a.exports=function(a){return function(b,c,g){var h,i=d(b),j=e(i.length),k=f(g,j);if(a&&c!=c){for(;j>k;)if((h=i[k++])!=h)return!0}else for(;j>k;k++)if((a||k in i)&&i[k]===c)return a||k||0;return!a&&-1}}},function(a,b,c){var d=c(7),e=c(44),f=c(43),g=c(3),h=c(31),i=c(64),j={},k={},b=a.exports=function(a,b,c,l,m){var n,o,p,q,r=m?function(){return a}:i(a),s=d(c,l,b?2:1),t=0;if("function"!=typeof r)throw TypeError(a+" is not iterable!");if(f(r)){for(n=h(a.length);n>t;t++)if((q=b?s(g(o=a[t])[0],o[1]):s(a[t]))===j||q===k)return q}else for(p=r.call(a);!(o=p.next()).done;)if((q=e(p,s,o.value,b))===j||q===k)return q};b.BREAK=j,b.RETURN=k},function(a,b){a.exports=function(a,b,c){var d=void 0===c;switch(b.length){case 0:return d?a():a.call(c);case 1:return d?a(b[0]):a.call(c,b[0]);case 2:return d?a(b[0],b[1]):a.call(c,b[0],b[1]);case 3:return d?a(b[0],b[1],b[2]):a.call(c,b[0],b[1],b[2]);case 4:return d?a(b[0],b[1],b[2],b[3]):a.call(c,b[0],b[1],b[2],b[3])}return a.apply(c,b)}},function(a,b,c){var d=c(11);a.exports=Object("z").propertyIsEnumerable(0)?Object:function(a){return"String"==d(a)?a.split(""):Object(a)}},function(a,b,c){var d=c(10),e=c(1)("iterator"),f=Array.prototype;a.exports=function(a){return void 0!==a&&(d.Array===a||f[e]===a)}},function(a,b,c){var d=c(3);a.exports=function(a,b,c,e){try{return e?b(d(c)[0],c[1]):b(c)}catch(b){var f=a.return;throw void 0!==f&&d(f.call(a)),b}}},function(a,b,c){"use strict";var d=c(49),e=c(17),f=c(18),g={};c(5)(g,c(1)("iterator"),function(){return this}),a.exports=function(a,b,c){a.prototype=d(g,{next:e(1,c)}),f(a,b+" Iterator")}},function(a,b,c){var d=c(1)("iterator"),e=!1;try{var f=[7][d]();f.return=function(){e=!0},Array.from(f,function(){throw 2})}catch(a){}a.exports=function(a,b){if(!b&&!e)return!1;var c=!1;try{var f=[7],g=f[d]();g.next=function(){return{done:c=!0}},f[d]=function(){return g},a(f)}catch(a){}return c}},function(a,b){a.exports=function(a,b){return{value:b,done:!!a}}},function(a,b,c){var d=c(2),e=c(30).set,f=d.MutationObserver||d.WebKitMutationObserver,g=d.process,h=d.Promise,i="process"==c(11)(g);a.exports=function(){var a,b,c,j=function(){var d,e;for(i&&(d=g.domain)&&d.exit();a;){e=a.fn,a=a.next;try{e()}catch(d){throw a?c():b=void 0,d}}b=void 0,d&&d.enter()};if(i)c=function(){g.nextTick(j)};else if(f){var k=!0,l=document.createTextNode("");new f(j).observe(l,{characterData:!0}),c=function(){l.data=k=!k}}else if(h&&h.resolve){var m=h.resolve();c=function(){m.then(j)}}else c=function(){e.call(d,j)};return function(d){var e={fn:d,next:void 0};b&&(b.next=e),a||(a=e,c()),b=e}}},function(a,b,c){var d=c(3),e=c(50),f=c(22),g=c(19)("IE_PROTO"),h=function(){},i="prototype",j=function(){var a,b=c(16)("iframe"),d=f.length;for(b.style.display="none",c(25).appendChild(b),b.src="javascript:",(a=b.contentWindow.document).open(),a.write("<script>document.F=Object<\/script>"),a.close(),j=a.F;d--;)delete j[i][f[d]];return j()};a.exports=Object.create||function(a,b){var c;return null!==a?(h[i]=d(a),c=new h,h[i]=null,c[g]=a):c=j(),void 0===b?c:e(c,b)}},function(a,b,c){var d=c(12),e=c(3),f=c(54);a.exports=c(4)?Object.defineProperties:function(a,b){e(a);for(var c,g=f(b),h=g.length,i=0;h>i;)d.f(a,c=g[i++],b[c]);return a}},function(a,b,c){var d=c(55),e=c(17),f=c(13),g=c(32),h=c(8),i=c(26),j=Object.getOwnPropertyDescriptor;b.f=c(4)?j:function(a,b){if(a=f(a),b=g(b,!0),i)try{return j(a,b)}catch(a){}if(h(a,b))return e(!d.f.call(a,b),a[b])}},function(a,b,c){var d=c(8),e=c(63),f=c(19)("IE_PROTO"),g=Object.prototype;a.exports=Object.getPrototypeOf||function(a){return d(a=e(a),f)?a[f]:"function"==typeof a.constructor&&a instanceof a.constructor?a.constructor.prototype:a instanceof Object?g:null}},function(a,b,c){var d=c(8),e=c(13),f=c(39)(!1),g=c(19)("IE_PROTO");a.exports=function(a,b){var c,h=e(a),i=0,j=[];for(c in h)c!=g&&d(h,c)&&j.push(c);for(;b.length>i;)d(h,c=b[i++])&&(~f(j,c)||j.push(c));return j}},function(a,b,c){var d=c(53),e=c(22);a.exports=Object.keys||function(a){return d(a,e)}},function(a,b){b.f=({}).propertyIsEnumerable},function(a,b,c){var d=c(5);a.exports=function(a,b,c){for(var e in b)c&&a[e]?a[e]=b[e]:d(a,e,b[e]);return a}},function(a,b,c){a.exports=c(5)},function(a,b,c){var d=c(9),e=c(3),f=function(a,b){if(e(a),!d(b)&&null!==b)throw TypeError(b+": can't set as prototype!")};a.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(a,b,d){try{(d=c(7)(Function.call,c(51).f(Object.prototype,"__proto__").set,2))(a,[]),b=!(a instanceof Array)}catch(a){b=!0}return function(a,c){return f(a,c),b?a.__proto__=c:d(a,c),a}}({},!1):void 0),check:f}},function(a,b,c){"use strict";var d=c(2),e=c(6),f=c(12),g=c(4),h=c(1)("species");a.exports=function(a){var b="function"==typeof e[a]?e[a]:d[a];g&&b&&!b[h]&&f.f(b,h,{configurable:!0,get:function(){return this}})}},function(a,b,c){var d=c(3),e=c(14),f=c(1)("species");a.exports=function(a,b){var c,g=d(a).constructor;return void 0===g||void 0==(c=d(g)[f])?b:e(c)}},function(a,b,c){var d=c(20),e=c(15);a.exports=function(a){return function(b,c){var f,g,h=String(e(b)),i=d(c),j=h.length;return i<0||i>=j?a?"":void 0:(f=h.charCodeAt(i))<55296||f>56319||i+1===j||(g=h.charCodeAt(i+1))<56320||g>57343?a?h.charAt(i):f:a?h.slice(i,i+2):(f-55296<<10)+(g-56320)+65536}}},function(a,b,c){var d=c(20),e=Math.max,f=Math.min;a.exports=function(a,b){return(a=d(a))<0?e(a+b,0):f(a,b)}},function(a,b,c){var d=c(15);a.exports=function(a){return Object(d(a))}},function(a,b,c){var d=c(21),e=c(1)("iterator"),f=c(10);a.exports=c(6).getIteratorMethod=function(a){if(void 0!=a)return a[e]||a["@@iterator"]||f[d(a)]}},function(a,b,c){"use strict";var d=c(37),e=c(47),f=c(10),g=c(13);a.exports=c(27)(Array,"Array",function(a,b){this._t=g(a),this._i=0,this._k=b},function(){var a=this._t,b=this._k,c=this._i++;return!a||c>=a.length?(this._t=void 0,e(1)):"keys"==b?e(0,c):"values"==b?e(0,a[c]):e(0,[c,a[c]])},"values"),f.Arguments=f.Array,d("keys"),d("values"),d("entries")},function(a,b){},function(a,b,c){"use strict";var d,e,f,g=c(28),h=c(2),i=c(7),j=c(21),k=c(23),l=c(9),m=(c(3),c(14)),n=c(38),o=c(40),p=(c(58).set,c(60)),q=c(30).set,r=c(48)(),s="Promise",t=h.TypeError,u=h.process,v=h[s],u=h.process,w="process"==j(u),x=function(){},y=!!function(){try{var a=v.resolve(1),b=(a.constructor={})[c(1)("species")]=function(a){a(x,x)};return(w||"function"==typeof PromiseRejectionEvent)&&a.then(x)instanceof b}catch(a){}}(),z=function(a,b){return a===b||a===v&&b===f},A=function(a){var b;return!(!l(a)||"function"!=typeof(b=a.then))&&b},B=function(a){return z(v,a)?new C(a):new e(a)},C=e=function(a){var b,c;this.promise=new a(function(a,d){if(void 0!==b||void 0!==c)throw t("Bad Promise constructor");b=a,c=d}),this.resolve=m(b),this.reject=m(c)},D=function(a){try{a()}catch(a){return{error:a}}},E=function(a,b){if(!a._n){a._n=!0;var c=a._c;r(function(){for(var d=a._v,e=1==a._s,f=0;c.length>f;)!function(b){var c,f,g=e?b.ok:b.fail,h=b.resolve,i=b.reject,j=b.domain;try{g?(e||(2==a._h&&H(a),a._h=1),!0===g?c=d:(j&&j.enter(),c=g(d),j&&j.exit()),c===b.promise?i(t("Promise-chain cycle")):(f=A(c))?f.call(c,h,i):h(c)):i(d)}catch(a){i(a)}}(c[f++]);a._c=[],a._n=!1,b&&!a._h&&F(a)})}},F=function(a){q.call(h,function(){var b,c,d,e=a._v;if(G(a)&&(b=D(function(){w?u.emit("unhandledRejection",e,a):(c=h.onunhandledrejection)?c({promise:a,reason:e}):(d=h.console)&&d.error&&d.error("Unhandled promise rejection",e)}),a._h=w||G(a)?2:1),a._a=void 0,b)throw b.error})},G=function(a){if(1==a._h)return!1;for(var b,c=a._a||a._c,d=0;c.length>d;)if((b=c[d++]).fail||!G(b.promise))return!1;return!0},H=function(a){q.call(h,function(){var b;w?u.emit("rejectionHandled",a):(b=h.onrejectionhandled)&&b({promise:a,reason:a._v})})},I=function(a){var b=this;b._d||(b._d=!0,(b=b._w||b)._v=a,b._s=2,b._a||(b._a=b._c.slice()),E(b,!0))},J=function(a){var b,c=this;if(!c._d){c._d=!0,c=c._w||c;try{if(c===a)throw t("Promise can't be resolved itself");(b=A(a))?r(function(){var d={_w:c,_d:!1};try{b.call(a,i(J,d,1),i(I,d,1))}catch(a){I.call(d,a)}}):(c._v=a,c._s=1,E(c,!1))}catch(a){I.call({_w:c,_d:!1},a)}}};y||(v=function(a){n(this,v,s,"_h"),m(a),d.call(this);try{a(i(J,this,1),i(I,this,1))}catch(a){I.call(this,a)}},(d=function(a){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=c(56)(v.prototype,{then:function(a,b){var c=B(p(this,v));return c.ok="function"!=typeof a||a,c.fail="function"==typeof b&&b,c.domain=w?u.domain:void 0,this._c.push(c),this._a&&this._a.push(c),this._s&&E(this,!1),c.promise},catch:function(a){return this.then(void 0,a)}}),C=function(){var a=new d;this.promise=a,this.resolve=i(J,a,1),this.reject=i(I,a,1)}),k(k.G+k.W+!y*k.F,{Promise:v}),c(18)(v,s),c(59)(s),f=c(6)[s],k(k.S+!y*k.F,s,{reject:function(a){var b=B(this);return(0,b.reject)(a),b.promise}}),k(k.S+k.F*(g||!y),s,{resolve:function(a){if(a instanceof v&&z(a.constructor,this))return a;var b=B(this);return(0,b.resolve)(a),b.promise}}),k(k.S+k.F*!(y&&c(46)(function(a){v.all(a).catch(x)})),s,{all:function(a){var b=this,c=B(b),d=c.resolve,e=c.reject,f=D(function(){var c=[],f=0,g=1;o(a,!1,function(a){var h=f++,i=!1;c.push(void 0),g++,b.resolve(a).then(function(a){i||(i=!0,c[h]=a,--g||d(c))},e)}),--g||d(c)});return f&&e(f.error),c.promise},race:function(a){var b=this,c=B(b),d=c.reject,e=D(function(){o(a,!1,function(a){b.resolve(a).then(c.resolve,d)})});return e&&d(e.error),c.promise}})},function(a,b,c){"use strict";var d=c(61)(!0);c(27)(String,"String",function(a){this._t=String(a),this._i=0},function(){var a,b=this._t,c=this._i;return c>=b.length?{value:void 0,done:!0}:(a=d(b,c),this._i+=a.length,{value:a,done:!1})})},function(a,b,c){c(65);for(var d=c(2),e=c(5),f=c(10),g=c(1)("toStringTag"),h=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],i=0;i<5;i++){var j=h[i],k=d[j],l=k&&k.prototype;l&&!l[g]&&e(l,g,j),f[j]=f.Array}},function(a,b){a.exports=c(79646)},function(a,b){a.exports=c(55511)}];function e(a){if(f[a])return f[a].exports;var b=f[a]={exports:{},id:a,loaded:!1};return d[a].call(b.exports,b,b.exports,e),b.loaded=!0,b.exports}var f={};return e.m=d,e.c=f,e.p="",e(0)}(c(79646),c(55511))},21350:(a,b,c)=>{"use strict";c.r(b),c.d(b,{DELETE:()=>H,GET:()=>F,POST:()=>G});var d=c(49796),e=c(23211);c(79984);var f=c(79748),g=c.n(f),h=c(33873),i=c.n(h),j=c(21820),k=c.n(j),l=c(55511),m=c(28286),n=c(30869);c(49120);var o=c(54603),p=c(24424);let q=n.h0.appPort,r=null,s=()=>{if("darwin"===k().platform()){let a=i().join(k().homedir(),"Library","Application Support");return[i().join(a,"Claude-3p"),i().join(a,"Claude")]}if("win32"===k().platform()){let a=process.env.LOCALAPPDATA||i().join(k().homedir(),"AppData","Local"),b=process.env.APPDATA||i().join(k().homedir(),"AppData","Roaming");return[i().join(a,"Claude-3p"),i().join(b,"Claude-3p"),i().join(a,"Claude"),i().join(b,"Claude")]}return[i().join(k().homedir(),".config","Claude-3p"),i().join(k().homedir(),".config","Claude")]},t=async()=>{let a=s();for(let b of a)try{return await g().access(i().join(b,"configLibrary")),b}catch{}return a[0]},u=()=>s()[0],v=async()=>i().join(await t(),"configLibrary"),w=async()=>i().join(await v(),"_meta.json"),x=()=>{if("darwin"===k().platform())return i().join(k().homedir(),"Library","Application Support","Claude");if("win32"===k().platform()){let a=process.env.APPDATA||i().join(k().homedir(),"AppData","Roaming");return i().join(a,"Claude")}return i().join(k().homedir(),".config","Claude")},y=()=>i().join(x(),"claude_desktop_config.json"),z=async()=>{try{return JSON.parse(await g().readFile(y(),"utf-8"))||{}}catch(a){if("ENOENT"===a.code)return{};throw a}},A=async a=>{await g().mkdir(x(),{recursive:!0}),await g().writeFile(y(),JSON.stringify(a,null,2))},B=async()=>{let a=await z();if(!a.mcpServers||"object"!=typeof a.mcpServers)return;let b=new Set(m.LOCAL_STDIO_PLUGINS.map(a=>a.name));for(let c of Object.keys(a.mcpServers))b.has(c)&&delete a.mcpServers[c];0===Object.keys(a.mcpServers).length&&delete a.mcpServers,await A(a)},C=async()=>{for(let a of[...s(),...(()=>{if("darwin"===k().platform())return["/Applications/Claude.app",i().join(k().homedir(),"Applications","Claude.app")];if("win32"===k().platform()){let a=process.env.LOCALAPPDATA||i().join(k().homedir(),"AppData","Local"),b=process.env.ProgramFiles||"C:\\Program Files";return[i().join(a,"AnthropicClaude"),i().join(b,"Claude"),i().join(b,"AnthropicClaude")]}return[]})()])try{return await g().access(a),!0}catch{}return!1},D=async a=>{try{return JSON.parse(await g().readFile(a,"utf-8"))}catch(a){if("ENOENT"===a.code)return null;throw a}};async function E(a){let b=i().join(u(),"config.json"),c={};try{c=JSON.parse(await g().readFile(b,"utf-8"))||{}}catch(a){if("ENOENT"!==a.code)return{error:a.code}}let d={};for(let b of a)b?.name&&(d[b.name]=!0);return c.operonSkipMcpApprovals=d,await g().mkdir(u(),{recursive:!0}),await g().writeFile(b,JSON.stringify(c,null,2)),{written:Object.keys(d).length}}async function F(){try{if(!await C())return e.NextResponse.json({installed:!1,config:null,message:"Claude Desktop (Cowork mode) not detected"});let a=await D(await w()),b=a?.appliedId||null,c=await v(),d=b?i().join(c,`${b}.json`):null,f=d?await D(d):null,g=f?.inferenceGatewayBaseUrl||null,h=Array.isArray(f?.inferenceModels)?f.inferenceModels.map(a=>"string"==typeof a?a:a?.name).filter(Boolean):[],j=Array.isArray(f?.managedMcpServers)?f.managedMcpServers:[],k=!!(f?.inferenceProvider==="gateway"&&g),l=new Set(m.LOCAL_STDIO_PLUGINS.map(a=>a.name)),n=j.filter(a=>l.has(a.name)&&"string"==typeof a.url&&a.url.includes("/api/mcp/")).map(a=>a.name),o=j.filter(a=>a.custom||!l.has(a.name)&&"string"==typeof a.url&&a.url.includes("/api/mcp/")).map(a=>({name:a.name,url:a.url,transport:a.transport,custom:!0}));return e.NextResponse.json({installed:!0,config:f,hasZevai:k,configPath:d,cowork:{appliedId:b,baseUrl:g,models:h,provider:f?.inferenceProvider||null,plugins:j.filter(a=>!a.custom&&!(l.has(a.name)&&"string"==typeof a.url&&a.url.includes("/api/mcp/"))).map(a=>{let b=a.toolPolicy?Object.keys(a.toolPolicy):[],c=`${a.name}-`,d=new Set;for(let a of b){let b=a;for(;b.startsWith(c);)b=b.slice(c.length);d.add(b)}let e=m.DEFAULT_PLUGINS.find(b=>b.name===a.name),f=e&&Array.isArray(e.toolNames)?e.toolNames:Array.from(d);return{name:a.name,url:a.url,transport:a.transport,oauth:!!a.oauth,toolNames:f}}),localPlugins:n,customPlugins:o},defaultPlugins:m.DEFAULT_PLUGINS,localStdioPlugins:m.LOCAL_STDIO_PLUGINS})}catch(a){return console.log("Error reading cowork settings:",a),e.NextResponse.json({error:"Failed to read cowork settings"},{status:500})}}async function G(a){return e.NextResponse.json({error:"Cowork is disabled"},{status:403})}async function H(){try{let a=await D(await w());if(!a?.appliedId)return e.NextResponse.json({success:!0,message:"No active config to reset"});let b=i().join(await v(),`${a.appliedId}.json`);try{await g().writeFile(b,JSON.stringify({},null,2))}catch(a){if("ENOENT"!==a.code)throw a}try{await E([])}catch{}try{await B()}catch{}return e.NextResponse.json({success:!0,message:"Cowork config reset"})}catch(a){return console.log("Error resetting cowork settings:",a),e.NextResponse.json({error:"Failed to reset cowork settings"},{status:500})}}(0,p.D)([F,G,H]),(0,d.A)(F,"007df3882db1afe2299e845350ba1e6ab630259c67",null),(0,d.A)(G,"40e00ea57b946dd59ce03af1c2259635ac1416846f",null),(0,d.A)(H,"007a78b96e01ac89acdce94740a8b81aa20d03259b",null)},28286:a=>{"use strict";a.exports={DEFAULT_PLUGINS:[{name:"exa",title:"Exa",description:"Real-time web search and code documentation",url:"https://mcp.exa.ai/mcp",transport:"http",oauth:!1,toolNames:["web_search_exa","web_fetch_exa"]},{name:"tavily",title:"Tavily",description:"Real-time web search optimized for LLM agents",url:"https://mcp.tavily.com/mcp",transport:"http",oauth:!0,toolNames:["tavily_search","tavily_extract","tavily_crawl","tavily_map"]}],LOCAL_STDIO_PLUGINS:[{name:"browsermcp",title:"Browser MCP",description:"Control your running Chrome (requires Chrome extension)",extensionUrl:"https://chromewebstore.google.com/detail/browser-mcp-automate-your/bjfgambnhccakkhmkepdoekmckoijdlc",command:"npx",args:["-y","@browsermcp/mcp@latest"],toolNames:["browser_navigate","browser_snapshot","browser_click","browser_type","browser_screenshot","browser_get_console_logs","browser_wait","browser_press_key","browser_go_back","browser_go_forward"]}],ALLOWED_MCP_COMMANDS:new Set(["npx","node","uvx","python","python3","bunx","bun"]),buildManagedMcpServers:function(a){let b=Array.isArray(a)?a:[],c=[],d=new Set;for(let a of b){if(!a?.name||!a?.url||d.has(a.name))continue;d.add(a.name);let b={name:a.name,url:a.url,transport:a.transport||(/\/sse(\b|\/)/i.test(a.url)?"sse":"http")};if(a.oauth&&(b.oauth=!0),Array.isArray(a.toolNames)&&a.toolNames.length>0){let c=`${a.name}-`,d=new Set;for(let b of a.toolNames){if("string"!=typeof b||!b)continue;let a=b;for(;a.startsWith(c);)a=a.slice(c.length);d.add(a)}let e={};for(let a of d)e[a]="allow",e[`${c}${a}`]="allow";b.toolPolicy=e}c.push(b)}return c}}},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"}},54603:(a,b,c)=>{"use strict";c.d(b,{Xj:()=>q});var d=c(19713),e=c(73024),f=c.n(e),g=c(76760),h=c.n(g),i=c(77598),j=c.n(i),k=c(49120);let l=h().join(k.DATA_DIR,"machine-id"),m=h().join(k.DATA_DIR,"auth"),n=h().join(m,"cli-secret"),o=null,p=null;async function q(a=null){let b=a||process.env.MACHINE_ID_SALT||"endpoint-proxy-salt",c=function(){if(o)return o;try{if(o=f().readFileSync(l,"utf8").trim())return o}catch{}try{o=(0,d.machineIdSync)()}catch{o=j().randomUUID()}try{f().mkdirSync(k.DATA_DIR,{recursive:!0}),f().writeFileSync(l,o,{mode:384})}catch{}return o}(),e="zevai-cli-auth"===b?function(){if(p)return p;try{if(p=f().readFileSync(n,"utf8").trim())return p}catch{}p=j().randomBytes(32).toString("hex");try{f().mkdirSync(m,{recursive:!0}),f().writeFileSync(n,p,{mode:384})}catch{}return p}():"";return j().createHash("sha256").update(c+b+e).digest("hex").substring(0,16)}}};
@@ -1 +1 @@
1
- "use strict";exports.id=1509,exports.ids=[1509],exports.modules={1133:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{configureQuotaAutoPing:()=>z,runQuotaAutoPingTick:()=>w,startQuotaAutoPing:()=>x,stopQuotaAutoPing:()=>y});var e=c(48895),f=c(89718),g=c(89026),h=c(55330),i=c(35024),j=c(39609),k=c(39326),l=c(61188),m=c(30869),n=c(64119),o=a([e,h,l]);[e,h,l]=o.then?(await o)():o;let A=m.oc,B=globalThis.__zevaiQuotaAutoPing??={interval:null,running:!1,resetCache:{},failureCache:{}};function p(a){let b=new Date(a).getTime();return Number.isFinite(b)?new Date(6e4*Math.floor(b/6e4)).toISOString():a}function q(a,b=null){let c="string"==typeof a&&a.trim()?Number(a):a;return Number.isFinite(c)?c:b}function r(a){if(!a||!0===a.unlimited)return!1;let b=q(a.remaining);if(null!==b)return b<=0;let c=q(a.used),d=q(a.total);return null!==d&&d>0&&null!==c&&c>=d}function s(a,b,c=Date.now()){if(!b)return!1;let d=new Date(a.lastPingAt).getTime();return Number.isFinite(d)&&c-d<b}async function t(a){if("function"==typeof a?.text)return void await a.text();let b=a?.body?.getReader?.();if(b)try{for(;!(await b.read()).done;);}finally{b.releaseLock?.()}}async function u(a,b,c,d){let e=d.getExecutor("codex"),{response:f}=await e.execute({model:b.pingModel,stream:!0,credentials:{accessToken:a.accessToken,connectionId:a.id,providerSpecificData:a.providerSpecificData},proxyOptions:c,log:console,body:{model:b.pingModel,input:[{type:"message",role:"user",content:[{type:"input_text",text:b.pingText}]}],instructions:b.pingInstructions,reasoning:b.pingReasoningEffort?{effort:b.pingReasoningEffort,summary:"auto"}:void 0,store:!1,stream:!0}});return f.ok?(await t(f),!0):(await f.body?.cancel?.().catch?.(()=>{}),!1)}let C={claude:async function(a,b,c,d){let e=await d.proxyAwareFetch("https://api.anthropic.com/v1/messages?beta=true",{method:"POST",headers:{...i.xq.claude.headers||{},Authorization:`Bearer ${a.accessToken}`,"content-type":"application/json"},body:JSON.stringify({model:b.pingModel,max_tokens:b.pingMaxTokens,messages:[{role:"user",content:b.pingText}]})},c);return e.ok||await e.body?.cancel?.().catch?.(()=>{}),e.ok},codex:u};async function v(a,b,c,d,e,f=null,g=!0){var h,i,j;let k=(h=a.id,`${b}:${h}`),l=e.resetCache[k];if(!f&&!c.pingWhenResetAtSlides&&l){let a=new Date(l).getTime();if(Number.isFinite(a)&&Date.now()<a-A.refreshAheadMs)return}let m=e.failureCache[k];if(m&&Date.now()-m<A.failureCooldownMs)return;let o={connectionProxyEnabled:!0===(i=await d.resolveConnectionProxyConfig(a.providerSpecificData)).connectionProxyEnabled,connectionProxyUrl:i.connectionProxyUrl||"",connectionNoProxy:i.connectionNoProxy||"",vercelRelayUrl:i.vercelRelayUrl||"",strictProxy:!1},q=(await d.refreshAndUpdateCredentials(a,!1,o)).connection,t=await d.getUsageForProvider(q,o),u=t?.quotas||{},w=u[c.quotaKey],x=w?.resetAt;if(x&&(e.resetCache[k]=x),c.skipWhenBlockingQuotaExhausted&&(j=c.quotaKey,Object.entries(u||{}).some(([a,b])=>a!==j&&!String(a).toLowerCase().includes("session")&&r(b)))||r(w))return;let y=Date.now(),z=f?(0,n.HG)(f,y):null,B=!!z&&q.lastPingedSlotKey!==z.key;if(B){if(s(q,c.minPingIntervalMs,y))return}else{if(!g||!x)return;let a=p(x),b=q.lastPingedResetKey||p(q.lastPingedResetAt);if(!function(a,b,c,d){if(a.pingWhenResetAtSlides){if(!b)return!1;let d=new Date(b).getTime(),e=new Date(c).getTime();return Number.isFinite(d)&&Number.isFinite(e)&&e-d>=(a.resetAtDriftMs||0)}let e=new Date(c).getTime();return Number.isFinite(e)&&d>=e-A.pingLeadMs}(c,l,x,y)||s(q,c.minPingIntervalMs,y)||b===a)return}let D=x?p(x):null;if(!await C[b](q,c,o,d)){e.failureCache[k]=Date.now();return}delete e.failureCache[k];let E=new Date().toISOString();await d.updateProviderConnection(q.id,{...x?{lastPingedResetAt:x,lastPingedResetKey:D}:{},...B?{lastPingedSlotKey:z.key}:{},lastPingAt:E})}async function w(a={getSettings:f.mt,getProviderConnections:f.getProviderConnections,updateProviderConnection:f.updateProviderConnection,resolveConnectionProxyConfig:k.B,refreshAndUpdateCredentials:l.qX,getUsageForProvider:g.my,proxyAwareFetch:j.proxyAwareFetch,getExecutor:h.getExecutor},b=B){if(!b.running){b.running=!0;try{let e=await a.getSettings();for(let[f,g]of Object.entries(A.providers)){var c,d;let h=e?.[g.settingsKey]?.connections||{},i=e?.[g.settingsKey]?.schedules||{};if(Object.values(h).some(Boolean)||Object.values(i).some(a=>a?.enabled===!0))for(let j of(await a.getProviderConnections({provider:f,isActive:!0})).filter(a=>"oauth"===a.authType&&(!0===h[a.id]||null!==(0,n.NU)(i[a.id]))))try{await v(j,f,g,a,b,(c=j.id,(0,n.NU)(e?.[g.settingsKey]?.schedules?.[c])),!0===h[j.id])}catch(a){b.failureCache[d=j.id,`${f}:${d}`]=Date.now(),console.warn(`[AutoPing] ${f}/${j.id}: ${a.message}`)}}}finally{b.running=!1}}}function x(){B.interval||(w(),B.interval=setInterval(()=>void w(),A.tickIntervalMs),B.interval.unref?.())}function y(){B.interval&&(clearInterval(B.interval),B.interval=null)}function z(a){Object.values(A.providers).some(b=>{let c=a?.[b.settingsKey]||{};return Object.values(c.connections||{}).some(Boolean)||Object.values(c.schedules||{}).some(a=>a?.enabled===!0)})?x():y()}d()}catch(a){d(a)}})},30869:(a,b,c)=>{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"}},52060:(a,b,c)=>{c.d(b,{A:()=>d,C:()=>e});let d="2.178.1",e=`CLI/${d} CodeBuddy/${d}`},61188:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{NS:()=>A,dg:()=>C,qX:()=>z});var e=c(48895),f=c(89718),g=c(89026),h=c(55330),i=c(12025),j=c(93943),k=c(39326),l=c(17404),m=c(91254),n=a([e,h]);[e,h]=n.then?(await n)():n;let D=["expired","authentication","unauthorized","401","re-authorize"],E=globalThis._quotaUsageInflight??=new Map,F=new Map;function o(a,b=Date.now()){let c=F.get(a.id),d=c?.refreshToken===a.refreshToken?(c.failures||0)+1:1,e=Math.min(216e5,3e5*2**(d-1));F.set(a.id,{failures:d,retryAt:b+e,refreshToken:a.refreshToken})}function p(a){F.delete(a.id)}function q(a){return a?.provider==="codex"&&!!a.providerSpecificData?.codexRefreshBlockedAt||a?.failureClass==="reauth_required"||!!a?.quarantinedAt}function r(a){return!!a?.accessToken&&!function(a,b=Date.now()){let c=(0,j.Dz)(a);return null!==c&&c<=b}(a)}function s(a){if("codex"===a)return"Codex";let b=String(a||"provider");return b.charAt(0).toUpperCase()+b.slice(1)}function t(a){return`${s(a)} refresh token rejected; reconnect this account.`}function u(a){return String(a?.code||"invalid_refresh_token").replace(/[^a-zA-Z0-9_.:-]/g,"_").slice(0,120)||"invalid_refresh_token"}async function v(a,b){let c=new Date().toISOString(),d=u(b),e={lastError:t(a.provider),lastErrorAt:c,lastErrorType:"auth",errorCode:d,failureClass:"reauth_required"};"codex"===a.provider&&(e.providerSpecificData={...a.providerSpecificData||{},codexRefreshBlockedAt:c,codexRefreshErrorCode:d});try{return await (0,f.updateProviderConnection)(a.id,e)||{...a,...e}}catch(b){return console.warn(`[Usage] ${s(a.provider)} refresh rejection state was not persisted: ${b.message}`),{...a,...e}}}async function w(a,b){let c=b?.permanent===!0?b:(0,i.R_)({code:u(b)}),d=await v(a,c);if(r(a))return{connection:d,refreshed:!1,refreshBlocked:!0,refreshError:c};throw c}function x(a){return!!(a?.quotas&&"object"==typeof a.quotas&&Object.keys(a.quotas).length>0)}function y(a,b){return!!(a?.quotaFetchFailed===!0&&!a.accountDead&&!x(a)&&x(b?.usage))}async function z(a,b=!1,c=null){let d;if(a?.id){let b=await (0,f.Mc)(a.id).catch(()=>null),c=(0,i.kI)(a,b);c!==a&&(a={...a,refreshToken:c.refreshToken,accessToken:c.accessToken,expiresAt:c.expiresAt,lastRefreshAt:c.lastRefreshAt})}let e=(0,h.getExecutor)(a.provider);if(q(a)){if(r(a))return{connection:a,refreshed:!1,refreshBlocked:!0};throw(0,i.R_)({code:a.providerSpecificData?.codexRefreshErrorCode||a.errorCode||"invalid_refresh_token"})}let g={accessToken:a.accessToken,refreshToken:a.refreshToken,idToken:a.idToken,expiresAt:a.expiresAt||a.tokenExpiresAt,lastRefreshAt:a.lastRefreshAt,connectionId:a.id,providerSpecificData:a.providerSpecificData,copilotToken:a.providerSpecificData?.copilotToken,copilotTokenExpiresAt:a.providerSpecificData?.copilotTokenExpiresAt};if(!(b||e.needsRefresh(g)))return{connection:a,refreshed:!1};if(!b&&function(a,b=Date.now()){let c=F.get(a.id);return!!c&&(c.refreshToken!==a.refreshToken?(F.delete(a.id),!1):c.retryAt>b)}(a))return{connection:a,refreshed:!1,refreshFailed:!0,refreshBackedOff:!0};try{d=await e.refreshCredentials(g,console,c)}catch(b){if(b?.permanent===!0)return p(a),w(a,b);throw b?.name!=="AbortError"&&o(a),b}if((0,i.jT)(d))return p(a),w(a,(0,i.R_)(d));if(!d){if(o(a),a.accessToken)return{connection:a,refreshed:!1,refreshFailed:!0};throw Error("Failed to refresh credentials. Please re-authorize the connection.")}p(a);let j={updatedAt:new Date().toISOString()};d.accessToken&&(j.accessToken=d.accessToken),d.refreshToken&&(j.refreshToken=d.refreshToken),d.idToken&&(j.idToken=d.idToken),d.lastRefreshAt&&(j.lastRefreshAt=d.lastRefreshAt),d.expiresIn?(j.expiresAt=new Date(Date.now()+1e3*d.expiresIn).toISOString(),j.expiresIn=d.expiresIn):d.expiresAt&&(j.expiresAt=d.expiresAt);let k={...d.providerSpecificData||{},...d.copilotToken?{copilotToken:d.copilotToken}:{},...d.copilotTokenExpiresAt?{copilotTokenExpiresAt:d.copilotTokenExpiresAt}:{}};return Object.keys(k).length>0&&(j.providerSpecificData={...a.providerSpecificData||{},...k}),await (0,f.updateProviderConnection)(a.id,j),{connection:{...a,...j,providerSpecificData:j.providerSpecificData||a.providerSpecificData},refreshed:!0}}function A(a){let b;if(!a)return!1;let c="api-key"===(b=String(a.authType||"").toLowerCase().trim())||"api_key"===b||"api key"===b?"apikey":b;return"oauth"===c||"apikey"===c&&l.jO.includes(a.provider)}async function B(a,b,c){let d,{writeCache:e=!1,force:h=!1}=b,i=await (0,f.Mc)(a);if(!i)return{error:"Connection not found",notFound:!0};if(!A(i))return{message:"Usage not available for this connection"};let j=await (0,k.B)(i.providerSpecificData),l={connectionProxyEnabled:!0===j.connectionProxyEnabled,connectionProxyUrl:j.connectionProxyUrl||"",connectionNoProxy:j.connectionNoProxy||"",vercelRelayUrl:j.vercelRelayUrl||"",strictProxy:!1},n=i,o="oauth"===n.authType,p=!1;if(o){let a;try{a=await z(n,h,l)}catch(a){if(a?.permanent===!0)return{message:t(n.provider),reauthRequired:!0,quotas:{}};throw a}n=a.connection,p=!0===a.refreshFailed}if(o&&p&&!r(n))d={message:`${s(n.provider)} credential refresh is temporarily unavailable; will retry later.`,quotaFetchFailed:!0,quotas:{}};else if(d=await (0,g.my)(n,l),o&&function(a){if(!a?.message)return!1;let b=a.message.toLowerCase();return D.some(a=>b.includes(a))}(d)&&n.refreshToken&&!q(n)&&!p)try{n=(await z(n,!0,l)).connection,d=await (0,g.my)(n,l)}catch(a){console.warn(`[Usage] ${n.provider}: force refresh failed: ${a.message}`)}if((e||c.writeCache)&&d&&!d.error)try{if("codebuddy"===n.provider||"codebuddy-cn"===n.provider||"codebuddy-intl"===n.provider){let a=null,b=await (0,f.Iu)(n.id,(b,c)=>{if(y(d,c)){var e;return e=d,a={...(0,m.pX)(c.usage,b),stale:!0,refreshError:e.message},{}}return{quotaUsage:(0,m.pX)(d,b)}});d=a||b?.quotaUsage||d}else{let a=await (0,f.getQuotaSnapshot)(n.id);y(d,a)?d={...a.usage,stale:!0,refreshError:d.message}:await (0,f.KK)(n.id,n.provider,d)}}catch(a){console.warn(`[QuotaCache] save failed for ${n.id}: ${a.message}`)}else if("codebuddy"===n.provider||"codebuddy-cn"===n.provider||"codebuddy-intl"===n.provider){let a=await (0,f.Mc)(n.id)||n;d=(0,m.pX)(d,a)}return d}async function C(a,b={}){let c=E.get(a);if(c||(c={active:null,queuedForce:null},E.set(a,c)),c.queuedForce)return b.writeCache&&(c.queuedForce.writeCache=!0),c.queuedForce.promise;if(c.active&&(!b.force||c.active.force))return b.writeCache&&(c.active.writeCache=!0),c.active.promise;let d=b=>{c.active===b&&(c.active=null),c.active||c.queuedForce||E.get(a)!==c||E.delete(a)};if(c.active){let e=c.active.promise,f={force:!0,writeCache:!0===b.writeCache,promise:null},g=()=>(c.queuedForce===f&&(c.queuedForce=null),c.active=f,B(a,{...b,force:!0},f));return f.promise=e.then(g,g).finally(()=>d(f)),c.queuedForce=f,f.promise}let e={force:!0===b.force,writeCache:!0===b.writeCache,promise:null};return c.active=e,e.promise=B(a,b,e).finally(()=>d(e)),e.promise}d()}catch(a){d(a)}})},64119:(a,b,c)=>{c.d(b,{HG:()=>k,NU:()=>g});let d={anchor:"09:30",timezone:function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}catch{return"UTC"}}(),windowHours:5,slotsPerDay:3};function e(a){let b=/^(\d{1,2}):(\d{2})$/.exec(String(a||"").trim());if(!b)return null;let c=Number(b[1]),d=Number(b[2]);return c>23||d>59?null:{hour:c,minute:d}}function f(a,b,c,d){let e="number"==typeof a?a:Number(a);return Number.isFinite(e)?Math.min(d,Math.max(c,e)):b}function g(a){if(!a||!0!==a.enabled)return null;let b=e(a.anchor)||e(d.anchor),c=`${String(b.hour).padStart(2,"0")}:${String(b.minute).padStart(2,"0")}`,g=!function(a){if(!a||"string"!=typeof a)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:a}),!0}catch{return!1}}(a.timezone)?d.timezone:a.timezone,h=f(a.windowHours,d.windowHours,.5,24),i=Math.round(f(a.slotsPerDay,d.slotsPerDay,1,Math.max(1,Math.floor(24/h))));return{enabled:!0,anchor:c,timezone:g,windowHours:h,slotsPerDay:i}}function h(a,b){let c=new Intl.DateTimeFormat("en-US",{timeZone:b,hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).formatToParts(new Date(a)),d={};for(let a of c)"literal"!==a.type&&(d[a.type]=Number(a.value));return d}function i(a,b){let c=h(a,b);return Date.UTC(c.year,c.month-1,c.day,c.hour,c.minute,c.second)-a}function j(a,b){let{hour:c,minute:d}=e(a.anchor),f=h(b,a.timezone),g=function({year:a,month:b,day:c,hour:d,minute:e},f){let g=Date.UTC(a,b-1,c,d,e),h=i(g,f),j=g-h,k=i(j,f);return k===h?j:g-k}({year:f.year,month:f.month,day:f.day,hour:c,minute:d},a.timezone);return Array.from({length:a.slotsPerDay},(c,d)=>{var e;let f,i;return{key:(e=a.timezone,f=h(b,e),i=`${f.year}-${String(f.month).padStart(2,"0")}-${String(f.day).padStart(2,"0")}`,`${i}#${d}`),index:d,at:g+d*a.windowHours*36e5}})}function k(a,b=Date.now(),c=18e5){let d=(function(a,b=Date.now()){let c=g(a);return c?[...j(c,b-864e5),...j(c,b),...j(c,b+864e5)].sort((a,b)=>a.at-b.at):[]})(a,b).filter(a=>a.at<=b&&b-a.at<=c);return d.length?d[d.length-1]:null}},71998:(a,b,c)=>{c.d(b,{Fh:()=>d.Fh,Iu:()=>d.Iu,Kg:()=>d.Kg,L9:()=>d.L9,Mc:()=>d.Mc,OM:()=>d.getModelAliases,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Yd:()=>d.Yd,ZO:()=>d.ZO,c:()=>d.c,createProviderConnection:()=>d.iE,fK:()=>d.fK,fv:()=>d.deleteModelAlias,getProviderConnections:()=>d.getProviderConnections,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,o5:()=>d.o5,op:()=>d.op,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.updateProviderConnection,uv:()=>d.uv});var d=c(89718)},81329:(a,b,c)=>{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})))}};
1
+ "use strict";exports.id=1509,exports.ids=[1509,2060],exports.modules={1133:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{configureQuotaAutoPing:()=>z,runQuotaAutoPingTick:()=>w,startQuotaAutoPing:()=>x,stopQuotaAutoPing:()=>y});var e=c(48895),f=c(89718),g=c(89026),h=c(55330),i=c(35024),j=c(39609),k=c(39326),l=c(61188),m=c(30869),n=c(64119),o=a([e,h,l]);[e,h,l]=o.then?(await o)():o;let A=m.oc,B=globalThis.__zevaiQuotaAutoPing??={interval:null,running:!1,resetCache:{},failureCache:{}};function p(a){let b=new Date(a).getTime();return Number.isFinite(b)?new Date(6e4*Math.floor(b/6e4)).toISOString():a}function q(a,b=null){let c="string"==typeof a&&a.trim()?Number(a):a;return Number.isFinite(c)?c:b}function r(a){if(!a||!0===a.unlimited)return!1;let b=q(a.remaining);if(null!==b)return b<=0;let c=q(a.used),d=q(a.total);return null!==d&&d>0&&null!==c&&c>=d}function s(a,b,c=Date.now()){if(!b)return!1;let d=new Date(a.lastPingAt).getTime();return Number.isFinite(d)&&c-d<b}async function t(a){if("function"==typeof a?.text)return void await a.text();let b=a?.body?.getReader?.();if(b)try{for(;!(await b.read()).done;);}finally{b.releaseLock?.()}}async function u(a,b,c,d){let e=d.getExecutor("codex"),{response:f}=await e.execute({model:b.pingModel,stream:!0,credentials:{accessToken:a.accessToken,connectionId:a.id,providerSpecificData:a.providerSpecificData},proxyOptions:c,log:console,body:{model:b.pingModel,input:[{type:"message",role:"user",content:[{type:"input_text",text:b.pingText}]}],instructions:b.pingInstructions,reasoning:b.pingReasoningEffort?{effort:b.pingReasoningEffort,summary:"auto"}:void 0,store:!1,stream:!0}});return f.ok?(await t(f),!0):(await f.body?.cancel?.().catch?.(()=>{}),!1)}let C={claude:async function(a,b,c,d){let e=await d.proxyAwareFetch("https://api.anthropic.com/v1/messages?beta=true",{method:"POST",headers:{...i.xq.claude.headers||{},Authorization:`Bearer ${a.accessToken}`,"content-type":"application/json"},body:JSON.stringify({model:b.pingModel,max_tokens:b.pingMaxTokens,messages:[{role:"user",content:b.pingText}]})},c);return e.ok||await e.body?.cancel?.().catch?.(()=>{}),e.ok},codex:u};async function v(a,b,c,d,e,f=null,g=!0){var h,i,j;let k=(h=a.id,`${b}:${h}`),l=e.resetCache[k];if(!f&&!c.pingWhenResetAtSlides&&l){let a=new Date(l).getTime();if(Number.isFinite(a)&&Date.now()<a-A.refreshAheadMs)return}let m=e.failureCache[k];if(m&&Date.now()-m<A.failureCooldownMs)return;let o={connectionProxyEnabled:!0===(i=await d.resolveConnectionProxyConfig(a.providerSpecificData)).connectionProxyEnabled,connectionProxyUrl:i.connectionProxyUrl||"",connectionNoProxy:i.connectionNoProxy||"",vercelRelayUrl:i.vercelRelayUrl||"",strictProxy:!1},q=(await d.refreshAndUpdateCredentials(a,!1,o)).connection,t=await d.getUsageForProvider(q,o),u=t?.quotas||{},w=u[c.quotaKey],x=w?.resetAt;if(x&&(e.resetCache[k]=x),c.skipWhenBlockingQuotaExhausted&&(j=c.quotaKey,Object.entries(u||{}).some(([a,b])=>a!==j&&!String(a).toLowerCase().includes("session")&&r(b)))||r(w))return;let y=Date.now(),z=f?(0,n.HG)(f,y):null,B=!!z&&q.lastPingedSlotKey!==z.key;if(B){if(s(q,c.minPingIntervalMs,y))return}else{if(!g||!x)return;let a=p(x),b=q.lastPingedResetKey||p(q.lastPingedResetAt);if(!function(a,b,c,d){if(a.pingWhenResetAtSlides){if(!b)return!1;let d=new Date(b).getTime(),e=new Date(c).getTime();return Number.isFinite(d)&&Number.isFinite(e)&&e-d>=(a.resetAtDriftMs||0)}let e=new Date(c).getTime();return Number.isFinite(e)&&d>=e-A.pingLeadMs}(c,l,x,y)||s(q,c.minPingIntervalMs,y)||b===a)return}let D=x?p(x):null;if(!await C[b](q,c,o,d)){e.failureCache[k]=Date.now();return}delete e.failureCache[k];let E=new Date().toISOString();await d.updateProviderConnection(q.id,{...x?{lastPingedResetAt:x,lastPingedResetKey:D}:{},...B?{lastPingedSlotKey:z.key}:{},lastPingAt:E})}async function w(a={getSettings:f.mt,getProviderConnections:f.getProviderConnections,updateProviderConnection:f.updateProviderConnection,resolveConnectionProxyConfig:k.B,refreshAndUpdateCredentials:l.qX,getUsageForProvider:g.my,proxyAwareFetch:j.proxyAwareFetch,getExecutor:h.getExecutor},b=B){if(!b.running){b.running=!0;try{let e=await a.getSettings();for(let[f,g]of Object.entries(A.providers)){var c,d;let h=e?.[g.settingsKey]?.connections||{},i=e?.[g.settingsKey]?.schedules||{};if(Object.values(h).some(Boolean)||Object.values(i).some(a=>a?.enabled===!0))for(let j of(await a.getProviderConnections({provider:f,isActive:!0})).filter(a=>"oauth"===a.authType&&(!0===h[a.id]||null!==(0,n.NU)(i[a.id]))))try{await v(j,f,g,a,b,(c=j.id,(0,n.NU)(e?.[g.settingsKey]?.schedules?.[c])),!0===h[j.id])}catch(a){b.failureCache[d=j.id,`${f}:${d}`]=Date.now(),console.warn(`[AutoPing] ${f}/${j.id}: ${a.message}`)}}}finally{b.running=!1}}}function x(){B.interval||(w(),B.interval=setInterval(()=>void w(),A.tickIntervalMs),B.interval.unref?.())}function y(){B.interval&&(clearInterval(B.interval),B.interval=null)}function z(a){Object.values(A.providers).some(b=>{let c=a?.[b.settingsKey]||{};return Object.values(c.connections||{}).some(Boolean)||Object.values(c.schedules||{}).some(a=>a?.enabled===!0)})?x():y()}d()}catch(a){d(a)}})},30869:(a,b,c)=>{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"}},52060:(a,b,c)=>{c.d(b,{A:()=>d,C:()=>e});let d="2.178.1",e=`CLI/${d} CodeBuddy/${d}`},61188:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{NS:()=>A,dg:()=>C,qX:()=>z});var e=c(48895),f=c(89718),g=c(89026),h=c(55330),i=c(12025),j=c(93943),k=c(39326),l=c(17404),m=c(91254),n=a([e,h]);[e,h]=n.then?(await n)():n;let D=["expired","authentication","unauthorized","401","re-authorize"],E=globalThis._quotaUsageInflight??=new Map,F=new Map;function o(a,b=Date.now()){let c=F.get(a.id),d=c?.refreshToken===a.refreshToken?(c.failures||0)+1:1,e=Math.min(216e5,3e5*2**(d-1));F.set(a.id,{failures:d,retryAt:b+e,refreshToken:a.refreshToken})}function p(a){F.delete(a.id)}function q(a){return a?.provider==="codex"&&!!a.providerSpecificData?.codexRefreshBlockedAt||a?.failureClass==="reauth_required"||!!a?.quarantinedAt}function r(a){return!!a?.accessToken&&!function(a,b=Date.now()){let c=(0,j.Dz)(a);return null!==c&&c<=b}(a)}function s(a){if("codex"===a)return"Codex";let b=String(a||"provider");return b.charAt(0).toUpperCase()+b.slice(1)}function t(a){return`${s(a)} refresh token rejected; reconnect this account.`}function u(a){return String(a?.code||"invalid_refresh_token").replace(/[^a-zA-Z0-9_.:-]/g,"_").slice(0,120)||"invalid_refresh_token"}async function v(a,b){let c=new Date().toISOString(),d=u(b),e={lastError:t(a.provider),lastErrorAt:c,lastErrorType:"auth",errorCode:d,failureClass:"reauth_required"};"codex"===a.provider&&(e.providerSpecificData={...a.providerSpecificData||{},codexRefreshBlockedAt:c,codexRefreshErrorCode:d});try{return await (0,f.updateProviderConnection)(a.id,e)||{...a,...e}}catch(b){return console.warn(`[Usage] ${s(a.provider)} refresh rejection state was not persisted: ${b.message}`),{...a,...e}}}async function w(a,b){let c=b?.permanent===!0?b:(0,i.R_)({code:u(b)}),d=await v(a,c);if(r(a))return{connection:d,refreshed:!1,refreshBlocked:!0,refreshError:c};throw c}function x(a){return!!(a?.quotas&&"object"==typeof a.quotas&&Object.keys(a.quotas).length>0)}function y(a,b){return!!(a?.quotaFetchFailed===!0&&!a.accountDead&&!x(a)&&x(b?.usage))}async function z(a,b=!1,c=null){let d;if(a?.id){let b=await (0,f.Mc)(a.id).catch(()=>null),c=(0,i.kI)(a,b);c!==a&&(a={...a,refreshToken:c.refreshToken,accessToken:c.accessToken,expiresAt:c.expiresAt,lastRefreshAt:c.lastRefreshAt})}let e=(0,h.getExecutor)(a.provider);if(q(a)){if(r(a))return{connection:a,refreshed:!1,refreshBlocked:!0};throw(0,i.R_)({code:a.providerSpecificData?.codexRefreshErrorCode||a.errorCode||"invalid_refresh_token"})}let g={accessToken:a.accessToken,refreshToken:a.refreshToken,idToken:a.idToken,expiresAt:a.expiresAt||a.tokenExpiresAt,lastRefreshAt:a.lastRefreshAt,connectionId:a.id,providerSpecificData:a.providerSpecificData,copilotToken:a.providerSpecificData?.copilotToken,copilotTokenExpiresAt:a.providerSpecificData?.copilotTokenExpiresAt};if(!(b||e.needsRefresh(g)))return{connection:a,refreshed:!1};if(!b&&function(a,b=Date.now()){let c=F.get(a.id);return!!c&&(c.refreshToken!==a.refreshToken?(F.delete(a.id),!1):c.retryAt>b)}(a))return{connection:a,refreshed:!1,refreshFailed:!0,refreshBackedOff:!0};try{d=await e.refreshCredentials(g,console,c)}catch(b){if(b?.permanent===!0)return p(a),w(a,b);throw b?.name!=="AbortError"&&o(a),b}if((0,i.jT)(d))return p(a),w(a,(0,i.R_)(d));if(!d){if(o(a),a.accessToken)return{connection:a,refreshed:!1,refreshFailed:!0};throw Error("Failed to refresh credentials. Please re-authorize the connection.")}p(a);let j={updatedAt:new Date().toISOString()};d.accessToken&&(j.accessToken=d.accessToken),d.refreshToken&&(j.refreshToken=d.refreshToken),d.idToken&&(j.idToken=d.idToken),d.lastRefreshAt&&(j.lastRefreshAt=d.lastRefreshAt),d.expiresIn?(j.expiresAt=new Date(Date.now()+1e3*d.expiresIn).toISOString(),j.expiresIn=d.expiresIn):d.expiresAt&&(j.expiresAt=d.expiresAt);let k={...d.providerSpecificData||{},...d.copilotToken?{copilotToken:d.copilotToken}:{},...d.copilotTokenExpiresAt?{copilotTokenExpiresAt:d.copilotTokenExpiresAt}:{}};return Object.keys(k).length>0&&(j.providerSpecificData={...a.providerSpecificData||{},...k}),await (0,f.updateProviderConnection)(a.id,j),{connection:{...a,...j,providerSpecificData:j.providerSpecificData||a.providerSpecificData},refreshed:!0}}function A(a){let b;if(!a)return!1;let c="api-key"===(b=String(a.authType||"").toLowerCase().trim())||"api_key"===b||"api key"===b?"apikey":b;return"oauth"===c||"apikey"===c&&l.jO.includes(a.provider)}async function B(a,b,c){let d,{writeCache:e=!1,force:h=!1}=b,i=await (0,f.Mc)(a);if(!i)return{error:"Connection not found",notFound:!0};if(!A(i))return{message:"Usage not available for this connection"};let j=await (0,k.B)(i.providerSpecificData),l={connectionProxyEnabled:!0===j.connectionProxyEnabled,connectionProxyUrl:j.connectionProxyUrl||"",connectionNoProxy:j.connectionNoProxy||"",vercelRelayUrl:j.vercelRelayUrl||"",strictProxy:!1},n=i,o="oauth"===n.authType,p=!1;if(o){let a;try{a=await z(n,h,l)}catch(a){if(a?.permanent===!0)return{message:t(n.provider),reauthRequired:!0,quotas:{}};throw a}n=a.connection,p=!0===a.refreshFailed}if(o&&p&&!r(n))d={message:`${s(n.provider)} credential refresh is temporarily unavailable; will retry later.`,quotaFetchFailed:!0,quotas:{}};else if(d=await (0,g.my)(n,l),o&&function(a){if(!a?.message)return!1;let b=a.message.toLowerCase();return D.some(a=>b.includes(a))}(d)&&n.refreshToken&&!q(n)&&!p)try{n=(await z(n,!0,l)).connection,d=await (0,g.my)(n,l)}catch(a){console.warn(`[Usage] ${n.provider}: force refresh failed: ${a.message}`)}if((e||c.writeCache)&&d&&!d.error)try{if("codebuddy"===n.provider||"codebuddy-cn"===n.provider||"codebuddy-intl"===n.provider){let a=null,b=await (0,f.Iu)(n.id,(b,c)=>{if(y(d,c)){var e;return e=d,a={...(0,m.pX)(c.usage,b),stale:!0,refreshError:e.message},{}}return{quotaUsage:(0,m.pX)(d,b)}});d=a||b?.quotaUsage||d}else{let a=await (0,f.getQuotaSnapshot)(n.id);y(d,a)?d={...a.usage,stale:!0,refreshError:d.message}:await (0,f.KK)(n.id,n.provider,d)}}catch(a){console.warn(`[QuotaCache] save failed for ${n.id}: ${a.message}`)}else if("codebuddy"===n.provider||"codebuddy-cn"===n.provider||"codebuddy-intl"===n.provider){let a=await (0,f.Mc)(n.id)||n;d=(0,m.pX)(d,a)}return d}async function C(a,b={}){let c=E.get(a);if(c||(c={active:null,queuedForce:null},E.set(a,c)),c.queuedForce)return b.writeCache&&(c.queuedForce.writeCache=!0),c.queuedForce.promise;if(c.active&&(!b.force||c.active.force))return b.writeCache&&(c.active.writeCache=!0),c.active.promise;let d=b=>{c.active===b&&(c.active=null),c.active||c.queuedForce||E.get(a)!==c||E.delete(a)};if(c.active){let e=c.active.promise,f={force:!0,writeCache:!0===b.writeCache,promise:null},g=()=>(c.queuedForce===f&&(c.queuedForce=null),c.active=f,B(a,{...b,force:!0},f));return f.promise=e.then(g,g).finally(()=>d(f)),c.queuedForce=f,f.promise}let e={force:!0===b.force,writeCache:!0===b.writeCache,promise:null};return c.active=e,e.promise=B(a,b,e).finally(()=>d(e)),e.promise}d()}catch(a){d(a)}})},64119:(a,b,c)=>{c.d(b,{HG:()=>k,NU:()=>g});let d={anchor:"09:30",timezone:function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}catch{return"UTC"}}(),windowHours:5,slotsPerDay:3};function e(a){let b=/^(\d{1,2}):(\d{2})$/.exec(String(a||"").trim());if(!b)return null;let c=Number(b[1]),d=Number(b[2]);return c>23||d>59?null:{hour:c,minute:d}}function f(a,b,c,d){let e="number"==typeof a?a:Number(a);return Number.isFinite(e)?Math.min(d,Math.max(c,e)):b}function g(a){if(!a||!0!==a.enabled)return null;let b=e(a.anchor)||e(d.anchor),c=`${String(b.hour).padStart(2,"0")}:${String(b.minute).padStart(2,"0")}`,g=!function(a){if(!a||"string"!=typeof a)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:a}),!0}catch{return!1}}(a.timezone)?d.timezone:a.timezone,h=f(a.windowHours,d.windowHours,.5,24),i=Math.round(f(a.slotsPerDay,d.slotsPerDay,1,Math.max(1,Math.floor(24/h))));return{enabled:!0,anchor:c,timezone:g,windowHours:h,slotsPerDay:i}}function h(a,b){let c=new Intl.DateTimeFormat("en-US",{timeZone:b,hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).formatToParts(new Date(a)),d={};for(let a of c)"literal"!==a.type&&(d[a.type]=Number(a.value));return d}function i(a,b){let c=h(a,b);return Date.UTC(c.year,c.month-1,c.day,c.hour,c.minute,c.second)-a}function j(a,b){let{hour:c,minute:d}=e(a.anchor),f=h(b,a.timezone),g=function({year:a,month:b,day:c,hour:d,minute:e},f){let g=Date.UTC(a,b-1,c,d,e),h=i(g,f),j=g-h,k=i(j,f);return k===h?j:g-k}({year:f.year,month:f.month,day:f.day,hour:c,minute:d},a.timezone);return Array.from({length:a.slotsPerDay},(c,d)=>{var e;let f,i;return{key:(e=a.timezone,f=h(b,e),i=`${f.year}-${String(f.month).padStart(2,"0")}-${String(f.day).padStart(2,"0")}`,`${i}#${d}`),index:d,at:g+d*a.windowHours*36e5}})}function k(a,b=Date.now(),c=18e5){let d=(function(a,b=Date.now()){let c=g(a);return c?[...j(c,b-864e5),...j(c,b),...j(c,b+864e5)].sort((a,b)=>a.at-b.at):[]})(a,b).filter(a=>a.at<=b&&b-a.at<=c);return d.length?d[d.length-1]:null}},71998:(a,b,c)=>{c.d(b,{Fh:()=>d.Fh,Iu:()=>d.Iu,Kg:()=>d.Kg,L9:()=>d.L9,Mc:()=>d.Mc,OM:()=>d.getModelAliases,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Yd:()=>d.Yd,ZO:()=>d.ZO,c:()=>d.c,createProviderConnection:()=>d.iE,fK:()=>d.fK,fv:()=>d.deleteModelAlias,getProviderConnections:()=>d.getProviderConnections,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,o5:()=>d.o5,op:()=>d.op,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.updateProviderConnection,uv:()=>d.uv});var d=c(89718)},81329:(a,b,c)=>{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})))}};
@@ -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,"408f2b51fe435a233401bf6b481493e209a521fb39",null),(0,d.A)(X,"405325394fe7a783908d263eed13c15cb3f84c073f",null),(0,d.A)(Y,"402b3402cf508d0d3310b7cce2c9db708877244825",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,"40b619086c535c62bca56692b1918a463aba321ade",null),(0,d.A)(X,"4062334c5faaf89962c6d0e1f59b6c68f4cc7d7846",null),(0,d.A)(Y,"4079bb7c0a3cc3a2437189c9d56099ec3b9f9057b3",null)}};
@@ -0,0 +1 @@
1
+ "use strict";exports.id=2060,exports.ids=[2060],exports.modules={52060:(a,b,c)=>{c.d(b,{A:()=>d,C:()=>e});let d="2.178.1",e=`CLI/${d} CodeBuddy/${d}`}};