switchboard-router 0.6.30 → 0.8.0

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 (1257) hide show
  1. package/app/.next/static/LW9zpYBdABYCFKEJUiC4B/_buildManifest.js +1 -0
  2. package/app/.next/static/LW9zpYBdABYCFKEJUiC4B/_ssgManifest.js +1 -0
  3. package/app/.next/static/chunks/1321-8d4ef805452d3649.js +1 -0
  4. package/app/.next/static/chunks/136-b76ff55769d5ecb1.js +1 -0
  5. package/app/.next/static/chunks/1a258343-33aee1e7d9aa500f.js +1 -0
  6. package/app/.next/static/chunks/3531-e8d13ec64699f527.js +68 -0
  7. package/app/.next/static/chunks/3794-d7cddff008311ab3.js +52 -0
  8. package/app/.next/static/chunks/4707-1ec0b2edbb07f455.js +1 -0
  9. package/app/.next/static/chunks/4bd1b696-8a4ab4fdf0ae305a.js +1 -0
  10. package/app/.next/static/chunks/5497-a3b9cdb0b8300541.js +7 -0
  11. package/app/.next/static/chunks/594-5a5c7b405aa92038.js +64 -0
  12. package/app/.next/static/chunks/6430-4c528cfc35666c11.js +1 -0
  13. package/app/.next/static/chunks/7055-e60e20f43bfbe5f8.js +1 -0
  14. package/app/.next/static/chunks/782-3a03a779968fa7a2.js +3 -0
  15. package/app/.next/static/chunks/8202.1ffc6ce531e066ce.js +1 -0
  16. package/app/.next/static/chunks/8500-74c368e06d70378e.js +1 -0
  17. package/app/.next/static/chunks/app/(dashboard)/dashboard/agent-library/page-24b5a8515eee26d6.js +1 -0
  18. package/app/.next/static/chunks/app/(dashboard)/dashboard/basic-chat/page-4ec8bfa73afe20a6.js +1 -0
  19. package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-d7205b7328b3fed1.js +1 -0
  20. package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-d0b6efe01e687aec.js +1 -0
  21. package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-5cfdfdf507c8222f.js +1 -0
  22. package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/routing/page-25629f96675ad55d.js +1 -0
  23. package/app/.next/static/chunks/app/(dashboard)/dashboard/console-log/page-b54cd17200807e49.js +1 -0
  24. package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-cd44cb44125275b6.js +3 -0
  25. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-995a96a01c24b126.js +59 -0
  26. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-52c12af07f9a6de0.js +1 -0
  27. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/page-8554ba79c854167f.js +4 -0
  28. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/page-0f54c9a5e7391a77.js +1 -0
  29. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-cfbd3661ac75b8c5.js +1 -0
  30. package/app/.next/static/chunks/app/(dashboard)/dashboard/mitm/page-8779ff2bc755ba78.js +1 -0
  31. package/app/.next/static/chunks/app/(dashboard)/dashboard/page-c33d24bdadcf0c6e.js +1 -0
  32. package/app/.next/static/chunks/app/(dashboard)/dashboard/profile/page-d32871b974f7e72f.js +1 -0
  33. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-e4258dcd8fb1a077.js +10 -0
  34. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/new/page-74d56b3b7ac42546.js +1 -0
  35. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/page-555f079cdf31bbf6.js +1 -0
  36. package/app/.next/static/chunks/app/(dashboard)/dashboard/pxpipe/page-bd18ad88b98cd373.js +1 -0
  37. package/app/.next/static/chunks/app/(dashboard)/dashboard/quota/page-b3ffcc7df06a37d8.js +1 -0
  38. package/app/.next/static/chunks/app/(dashboard)/dashboard/skills/[id]/page-56bf48ee2068208e.js +1 -0
  39. package/app/.next/static/chunks/app/(dashboard)/dashboard/skills/page-46986a955b8c89b2.js +1 -0
  40. package/app/.next/static/chunks/app/(dashboard)/dashboard/token-saver/page-20972a96e348f397.js +1 -0
  41. package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/page-0cc2ccbe11cc0013.js +1 -0
  42. package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/page-5af5fff7d28ed91d.js +1 -0
  43. package/app/.next/static/chunks/app/(dashboard)/error-d633be4a53c4ab61.js +1 -0
  44. package/app/.next/static/chunks/app/(dashboard)/layout-62b4e2cdf745f8d0.js +1 -0
  45. package/app/.next/static/chunks/app/_global-error/page-e5f03432dd0bcd61.js +1 -0
  46. package/app/.next/static/chunks/app/_not-found/page-ee581ced4614e639.js +1 -0
  47. package/app/.next/static/chunks/app/api/agent-library/catalog/route-e5f03432dd0bcd61.js +1 -0
  48. package/app/.next/static/chunks/app/api/agent-library/doctor/route-e5f03432dd0bcd61.js +1 -0
  49. package/app/.next/static/chunks/app/api/agent-library/export/route-e5f03432dd0bcd61.js +1 -0
  50. package/app/.next/static/chunks/app/api/agent-library/mcp/route-e5f03432dd0bcd61.js +1 -0
  51. package/app/.next/static/chunks/app/api/agent-library/route-e5f03432dd0bcd61.js +1 -0
  52. package/app/.next/static/chunks/app/api/agent-library/skills/route-e5f03432dd0bcd61.js +1 -0
  53. package/app/.next/static/chunks/app/api/agent-library/sync/route-e5f03432dd0bcd61.js +1 -0
  54. package/app/.next/static/chunks/app/api/agent-library/updates/route-e5f03432dd0bcd61.js +1 -0
  55. package/app/.next/static/chunks/app/api/auth/status/route-e5f03432dd0bcd61.js +1 -0
  56. package/app/.next/static/chunks/app/api/cli-tools/aider-settings/route-e5f03432dd0bcd61.js +1 -0
  57. package/app/.next/static/chunks/app/api/cli-tools/all-statuses/route-e5f03432dd0bcd61.js +1 -0
  58. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-e5f03432dd0bcd61.js +1 -0
  59. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-e5f03432dd0bcd61.js +1 -0
  60. package/app/.next/static/chunks/app/api/cli-tools/claude-full-catalog/route-e5f03432dd0bcd61.js +1 -0
  61. package/app/.next/static/chunks/app/api/cli-tools/claude-picker-labels/route-e5f03432dd0bcd61.js +1 -0
  62. package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-e5f03432dd0bcd61.js +1 -0
  63. package/app/.next/static/chunks/app/api/cli-tools/cline-settings/route-e5f03432dd0bcd61.js +1 -0
  64. package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-e5f03432dd0bcd61.js +1 -0
  65. package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-e5f03432dd0bcd61.js +1 -0
  66. package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-e5f03432dd0bcd61.js +1 -0
  67. package/app/.next/static/chunks/app/api/cli-tools/cowork-settings/route-e5f03432dd0bcd61.js +1 -0
  68. package/app/.next/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-e5f03432dd0bcd61.js +1 -0
  69. package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-e5f03432dd0bcd61.js +1 -0
  70. package/app/.next/static/chunks/app/api/cli-tools/gemini-cli-settings/route-e5f03432dd0bcd61.js +1 -0
  71. package/app/.next/static/chunks/app/api/cli-tools/grok-settings/route-e5f03432dd0bcd61.js +1 -0
  72. package/app/.next/static/chunks/app/api/cli-tools/hermes-settings/route-e5f03432dd0bcd61.js +1 -0
  73. package/app/.next/static/chunks/app/api/cli-tools/jcode-settings/route-e5f03432dd0bcd61.js +1 -0
  74. package/app/.next/static/chunks/app/api/cli-tools/kilo-settings/route-e5f03432dd0bcd61.js +1 -0
  75. package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-e5f03432dd0bcd61.js +1 -0
  76. package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-e5f03432dd0bcd61.js +1 -0
  77. package/app/.next/static/chunks/app/api/cli-tools/pi-settings/route-e5f03432dd0bcd61.js +1 -0
  78. package/app/.next/static/chunks/app/api/cli-tools/picker-labels/route-e5f03432dd0bcd61.js +1 -0
  79. package/app/.next/static/chunks/app/api/combos/[id]/route-e5f03432dd0bcd61.js +1 -0
  80. package/app/.next/static/chunks/app/api/combos/route-e5f03432dd0bcd61.js +1 -0
  81. package/app/.next/static/chunks/app/api/headroom/extras/route-e5f03432dd0bcd61.js +1 -0
  82. package/app/.next/static/chunks/app/api/headroom/proxy/[...path]/route-e5f03432dd0bcd61.js +1 -0
  83. package/app/.next/static/chunks/app/api/headroom/restart/route-e5f03432dd0bcd61.js +1 -0
  84. package/app/.next/static/chunks/app/api/headroom/start/route-e5f03432dd0bcd61.js +1 -0
  85. package/app/.next/static/chunks/app/api/headroom/status/route-e5f03432dd0bcd61.js +1 -0
  86. package/app/.next/static/chunks/app/api/headroom/stop/route-e5f03432dd0bcd61.js +1 -0
  87. package/app/.next/static/chunks/app/api/health/route-e5f03432dd0bcd61.js +1 -0
  88. package/app/.next/static/chunks/app/api/keys/[id]/route-e5f03432dd0bcd61.js +1 -0
  89. package/app/.next/static/chunks/app/api/keys/route-e5f03432dd0bcd61.js +1 -0
  90. package/app/.next/static/chunks/app/api/locale/route-e5f03432dd0bcd61.js +1 -0
  91. package/app/.next/static/chunks/app/api/mcp/[plugin]/message/route-e5f03432dd0bcd61.js +1 -0
  92. package/app/.next/static/chunks/app/api/mcp/[plugin]/sse/route-e5f03432dd0bcd61.js +1 -0
  93. package/app/.next/static/chunks/app/api/media-providers/tts/deepgram/voices/route-e5f03432dd0bcd61.js +1 -0
  94. package/app/.next/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-e5f03432dd0bcd61.js +1 -0
  95. package/app/.next/static/chunks/app/api/media-providers/tts/inworld/voices/route-e5f03432dd0bcd61.js +1 -0
  96. package/app/.next/static/chunks/app/api/media-providers/tts/minimax/voices/route-e5f03432dd0bcd61.js +1 -0
  97. package/app/.next/static/chunks/app/api/media-providers/tts/voices/route-e5f03432dd0bcd61.js +1 -0
  98. package/app/.next/static/chunks/app/api/mgmt/v1/combos/[id]/route-e5f03432dd0bcd61.js +1 -0
  99. package/app/.next/static/chunks/app/api/mgmt/v1/combos/[id]/strategy/route-e5f03432dd0bcd61.js +1 -0
  100. package/app/.next/static/chunks/app/api/mgmt/v1/combos/route-e5f03432dd0bcd61.js +1 -0
  101. package/app/.next/static/chunks/app/api/mgmt/v1/health/route-e5f03432dd0bcd61.js +1 -0
  102. package/app/.next/static/chunks/app/api/mgmt/v1/metrics/route-e5f03432dd0bcd61.js +1 -0
  103. package/app/.next/static/chunks/app/api/mgmt/v1/providers/route-e5f03432dd0bcd61.js +1 -0
  104. package/app/.next/static/chunks/app/api/mgmt/v1/routing/route-e5f03432dd0bcd61.js +1 -0
  105. package/app/.next/static/chunks/app/api/mgmt/v1/usage/route-e5f03432dd0bcd61.js +1 -0
  106. package/app/.next/static/chunks/app/api/mgmt/v1/version/route-e5f03432dd0bcd61.js +1 -0
  107. package/app/.next/static/chunks/app/api/models/alias/route-e5f03432dd0bcd61.js +1 -0
  108. package/app/.next/static/chunks/app/api/models/availability/route-e5f03432dd0bcd61.js +1 -0
  109. package/app/.next/static/chunks/app/api/models/custom/route-e5f03432dd0bcd61.js +1 -0
  110. package/app/.next/static/chunks/app/api/models/disabled/route-e5f03432dd0bcd61.js +1 -0
  111. package/app/.next/static/chunks/app/api/models/route-e5f03432dd0bcd61.js +1 -0
  112. package/app/.next/static/chunks/app/api/models/test/route-e5f03432dd0bcd61.js +1 -0
  113. package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-e5f03432dd0bcd61.js +1 -0
  114. package/app/.next/static/chunks/app/api/oauth/codex/bulk-import/route-e5f03432dd0bcd61.js +1 -0
  115. package/app/.next/static/chunks/app/api/oauth/codex/import-token/route-e5f03432dd0bcd61.js +1 -0
  116. package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-e5f03432dd0bcd61.js +1 -0
  117. package/app/.next/static/chunks/app/api/oauth/cursor/import/route-e5f03432dd0bcd61.js +1 -0
  118. package/app/.next/static/chunks/app/api/oauth/gitlab/pat/route-e5f03432dd0bcd61.js +1 -0
  119. package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-e5f03432dd0bcd61.js +1 -0
  120. package/app/.next/static/chunks/app/api/oauth/kiro/api-key/route-e5f03432dd0bcd61.js +1 -0
  121. package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-e5f03432dd0bcd61.js +1 -0
  122. package/app/.next/static/chunks/app/api/oauth/kiro/import/route-e5f03432dd0bcd61.js +1 -0
  123. package/app/.next/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-e5f03432dd0bcd61.js +1 -0
  124. package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-e5f03432dd0bcd61.js +1 -0
  125. package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-e5f03432dd0bcd61.js +1 -0
  126. package/app/.next/static/chunks/app/api/pricing/route-e5f03432dd0bcd61.js +1 -0
  127. package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-e5f03432dd0bcd61.js +1 -0
  128. package/app/.next/static/chunks/app/api/provider-nodes/route-e5f03432dd0bcd61.js +1 -0
  129. package/app/.next/static/chunks/app/api/provider-nodes/validate/route-e5f03432dd0bcd61.js +1 -0
  130. package/app/.next/static/chunks/app/api/providers/[id]/model-probes/batch/route-e5f03432dd0bcd61.js +1 -0
  131. package/app/.next/static/chunks/app/api/providers/[id]/model-probes/cache/route-e5f03432dd0bcd61.js +1 -0
  132. package/app/.next/static/chunks/app/api/providers/[id]/model-probes/prepare/route-e5f03432dd0bcd61.js +1 -0
  133. package/app/.next/static/chunks/app/api/providers/[id]/model-probes/remove-unavailable/route-e5f03432dd0bcd61.js +1 -0
  134. package/app/.next/static/chunks/app/api/providers/[id]/model-probes/route-e5f03432dd0bcd61.js +1 -0
  135. package/app/.next/static/chunks/app/api/providers/[id]/model-probes/verify/cancel/route-e5f03432dd0bcd61.js +1 -0
  136. package/app/.next/static/chunks/app/api/providers/[id]/model-probes/verify/start/route-e5f03432dd0bcd61.js +1 -0
  137. package/app/.next/static/chunks/app/api/providers/[id]/model-probes/verify/status/route-e5f03432dd0bcd61.js +1 -0
  138. package/app/.next/static/chunks/app/api/providers/[id]/models/route-e5f03432dd0bcd61.js +1 -0
  139. package/app/.next/static/chunks/app/api/providers/[id]/route-e5f03432dd0bcd61.js +1 -0
  140. package/app/.next/static/chunks/app/api/providers/[id]/test/route-e5f03432dd0bcd61.js +1 -0
  141. package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-e5f03432dd0bcd61.js +1 -0
  142. package/app/.next/static/chunks/app/api/providers/client/route-e5f03432dd0bcd61.js +1 -0
  143. package/app/.next/static/chunks/app/api/providers/kilo/free-models/route-e5f03432dd0bcd61.js +1 -0
  144. package/app/.next/static/chunks/app/api/providers/route-e5f03432dd0bcd61.js +1 -0
  145. package/app/.next/static/chunks/app/api/providers/suggested-models/route-e5f03432dd0bcd61.js +1 -0
  146. package/app/.next/static/chunks/app/api/providers/test-batch/route-e5f03432dd0bcd61.js +1 -0
  147. package/app/.next/static/chunks/app/api/providers/validate/route-e5f03432dd0bcd61.js +1 -0
  148. package/app/.next/static/chunks/app/api/pxpipe/health/route-e5f03432dd0bcd61.js +1 -0
  149. package/app/.next/static/chunks/app/api/pxpipe/install/route-e5f03432dd0bcd61.js +1 -0
  150. package/app/.next/static/chunks/app/api/pxpipe/logs/route-e5f03432dd0bcd61.js +1 -0
  151. package/app/.next/static/chunks/app/api/pxpipe/restart/route-e5f03432dd0bcd61.js +1 -0
  152. package/app/.next/static/chunks/app/api/pxpipe/start/route-e5f03432dd0bcd61.js +1 -0
  153. package/app/.next/static/chunks/app/api/pxpipe/stats/route-e5f03432dd0bcd61.js +1 -0
  154. package/app/.next/static/chunks/app/api/pxpipe/status/route-e5f03432dd0bcd61.js +1 -0
  155. package/app/.next/static/chunks/app/api/pxpipe/stop/route-e5f03432dd0bcd61.js +1 -0
  156. package/app/.next/static/chunks/app/api/routing/feedback/route-e5f03432dd0bcd61.js +1 -0
  157. package/app/.next/static/chunks/app/api/routing/insights/route-e5f03432dd0bcd61.js +1 -0
  158. package/app/.next/static/chunks/app/api/routing/learn/route-e5f03432dd0bcd61.js +1 -0
  159. package/app/.next/static/chunks/app/api/routing/stats/route-e5f03432dd0bcd61.js +1 -0
  160. package/app/.next/static/chunks/app/api/routing/versions/promote/route-e5f03432dd0bcd61.js +1 -0
  161. package/app/.next/static/chunks/app/api/routing/versions/rollback/route-e5f03432dd0bcd61.js +1 -0
  162. package/app/.next/static/chunks/app/api/settings/database/route-e5f03432dd0bcd61.js +1 -0
  163. package/app/.next/static/chunks/app/api/settings/proxy-test/route-e5f03432dd0bcd61.js +1 -0
  164. package/app/.next/static/chunks/app/api/settings/route-e5f03432dd0bcd61.js +1 -0
  165. package/app/.next/static/chunks/app/api/shutdown/route-e5f03432dd0bcd61.js +1 -0
  166. package/app/.next/static/chunks/app/api/skills/[id]/route-e5f03432dd0bcd61.js +1 -0
  167. package/app/.next/static/chunks/app/api/tags/route-e5f03432dd0bcd61.js +1 -0
  168. package/app/.next/static/chunks/app/api/token-saver/vault-stats/route-e5f03432dd0bcd61.js +1 -0
  169. package/app/.next/static/chunks/app/api/translator/console-logs/route-e5f03432dd0bcd61.js +1 -0
  170. package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-e5f03432dd0bcd61.js +1 -0
  171. package/app/.next/static/chunks/app/api/translator/load/route-e5f03432dd0bcd61.js +1 -0
  172. package/app/.next/static/chunks/app/api/translator/save/route-e5f03432dd0bcd61.js +1 -0
  173. package/app/.next/static/chunks/app/api/translator/send/route-e5f03432dd0bcd61.js +1 -0
  174. package/app/.next/static/chunks/app/api/translator/translate/route-e5f03432dd0bcd61.js +1 -0
  175. package/app/.next/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-e5f03432dd0bcd61.js +1 -0
  176. package/app/.next/static/chunks/app/api/usage/[connectionId]/route-e5f03432dd0bcd61.js +1 -0
  177. package/app/.next/static/chunks/app/api/usage/chart/route-e5f03432dd0bcd61.js +1 -0
  178. package/app/.next/static/chunks/app/api/usage/history/route-e5f03432dd0bcd61.js +1 -0
  179. package/app/.next/static/chunks/app/api/usage/logs/route-e5f03432dd0bcd61.js +1 -0
  180. package/app/.next/static/chunks/app/api/usage/providers/route-e5f03432dd0bcd61.js +1 -0
  181. package/app/.next/static/chunks/app/api/usage/request-details/route-e5f03432dd0bcd61.js +1 -0
  182. package/app/.next/static/chunks/app/api/usage/request-logs/route-e5f03432dd0bcd61.js +1 -0
  183. package/app/.next/static/chunks/app/api/usage/stats/route-e5f03432dd0bcd61.js +1 -0
  184. package/app/.next/static/chunks/app/api/usage/stream/route-e5f03432dd0bcd61.js +1 -0
  185. package/app/.next/static/chunks/app/api/v1/api/chat/route-e5f03432dd0bcd61.js +1 -0
  186. package/app/.next/static/chunks/app/api/v1/audio/speech/route-e5f03432dd0bcd61.js +1 -0
  187. package/app/.next/static/chunks/app/api/v1/audio/transcriptions/route-e5f03432dd0bcd61.js +1 -0
  188. package/app/.next/static/chunks/app/api/v1/audio/voices/route-e5f03432dd0bcd61.js +1 -0
  189. package/app/.next/static/chunks/app/api/v1/chat/completions/route-e5f03432dd0bcd61.js +1 -0
  190. package/app/.next/static/chunks/app/api/v1/embeddings/route-e5f03432dd0bcd61.js +1 -0
  191. package/app/.next/static/chunks/app/api/v1/images/generations/route-e5f03432dd0bcd61.js +1 -0
  192. package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-e5f03432dd0bcd61.js +1 -0
  193. package/app/.next/static/chunks/app/api/v1/messages/route-e5f03432dd0bcd61.js +1 -0
  194. package/app/.next/static/chunks/app/api/v1/models/[kind]/route-e5f03432dd0bcd61.js +1 -0
  195. package/app/.next/static/chunks/app/api/v1/models/info/route-e5f03432dd0bcd61.js +1 -0
  196. package/app/.next/static/chunks/app/api/v1/models/route-e5f03432dd0bcd61.js +1 -0
  197. package/app/.next/static/chunks/app/api/v1/responses/compact/route-e5f03432dd0bcd61.js +1 -0
  198. package/app/.next/static/chunks/app/api/v1/responses/route-e5f03432dd0bcd61.js +1 -0
  199. package/app/.next/static/chunks/app/api/v1/route-e5f03432dd0bcd61.js +1 -0
  200. package/app/.next/static/chunks/app/api/v1/search/route-e5f03432dd0bcd61.js +1 -0
  201. package/app/.next/static/chunks/app/api/v1/videos/[id]/route-e5f03432dd0bcd61.js +1 -0
  202. package/app/.next/static/chunks/app/api/v1/videos/edits/route-e5f03432dd0bcd61.js +1 -0
  203. package/app/.next/static/chunks/app/api/v1/videos/extensions/route-e5f03432dd0bcd61.js +1 -0
  204. package/app/.next/static/chunks/app/api/v1/videos/generations/route-e5f03432dd0bcd61.js +1 -0
  205. package/app/.next/static/chunks/app/api/v1/web/fetch/route-e5f03432dd0bcd61.js +1 -0
  206. package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-e5f03432dd0bcd61.js +1 -0
  207. package/app/.next/static/chunks/app/api/v1beta/models/route-e5f03432dd0bcd61.js +1 -0
  208. package/app/.next/static/chunks/app/api/version/route-e5f03432dd0bcd61.js +1 -0
  209. package/app/.next/static/chunks/app/api/version/shutdown/route-e5f03432dd0bcd61.js +1 -0
  210. package/app/.next/static/chunks/app/api/version/update/route-e5f03432dd0bcd61.js +1 -0
  211. package/app/.next/static/chunks/app/callback/page-5c1d863ff86ddc6e.js +1 -0
  212. package/app/.next/static/chunks/app/dashboard/settings/pricing/page-423a4c1e078872dd.js +1 -0
  213. package/app/.next/static/chunks/app/landing/page-9e06d57d9b215fd7.js +1 -0
  214. package/app/.next/static/chunks/app/layout-214ea0ad8a3d8323.js +1 -0
  215. package/app/.next/static/chunks/app/login/page-e5f03432dd0bcd61.js +1 -0
  216. package/app/.next/static/chunks/app/manifest.webmanifest/route-e5f03432dd0bcd61.js +1 -0
  217. package/app/.next/static/chunks/app/page-e5f03432dd0bcd61.js +1 -0
  218. package/app/.next/static/chunks/framework-461b899b66554474.js +1 -0
  219. package/app/.next/static/chunks/main-app-83fef838b21a8d19.js +1 -0
  220. package/app/.next/static/chunks/main-d2d664d299c2e1bc.js +5 -0
  221. package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-e5f03432dd0bcd61.js +1 -0
  222. package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-e5f03432dd0bcd61.js +1 -0
  223. package/app/.next/static/chunks/next/dist/client/components/builtin/global-error-f9c47afa2e4175d7.js +1 -0
  224. package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-e5f03432dd0bcd61.js +1 -0
  225. package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-e5f03432dd0bcd61.js +1 -0
  226. package/app/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  227. package/app/.next/static/chunks/webpack-57b54315eb9fa808.js +1 -0
  228. package/app/.next/static/css/23b999cda6943547.css +1 -0
  229. package/app/.next/static/css/a26e7bdf55d5cb27.css +1 -0
  230. package/app/.next/static/css/e07f2bf4fa519943.css +31 -0
  231. package/app/.next/static/media/011e180705008d6f-s.woff2 +0 -0
  232. package/app/.next/static/media/20535187d867b7b9-s.woff2 +0 -0
  233. package/app/.next/static/media/26d4368bf94c0ec4-s.p.woff2 +0 -0
  234. package/app/.next/static/media/2801417b65625cf5-s.woff2 +0 -0
  235. package/app/.next/static/media/28793f5c5e3d822d-s.woff2 +0 -0
  236. package/app/.next/static/media/5356a6a4f2c8c8d8-s.woff2 +0 -0
  237. package/app/.next/static/media/58f386aa6b1a2a92-s.woff2 +0 -0
  238. package/app/.next/static/media/73cb51aac9c97f90-s.woff2 +0 -0
  239. package/app/.next/static/media/7b19b489dc6743ba-s.woff2 +0 -0
  240. package/app/.next/static/media/7ba5fb2a8c88521c-s.woff2 +0 -0
  241. package/app/.next/static/media/92eeb95d069020cc-s.woff2 +0 -0
  242. package/app/.next/static/media/98e207f02528a563-s.p.woff2 +0 -0
  243. package/app/.next/static/media/99dcf268bda04fe5-s.woff2 +0 -0
  244. package/app/.next/static/media/b3bf17a9041d9433-s.woff2 +0 -0
  245. package/app/.next/static/media/c9c3823090ec8b55-s.woff2 +0 -0
  246. package/app/.next/static/media/catalog.e7ada387.json +1710 -0
  247. package/app/.next/static/media/d26bbd13d6b70f89-s.woff2 +0 -0
  248. package/app/.next/static/media/d29838c109ef09b4-s.woff2 +0 -0
  249. package/app/.next/static/media/d3ebbfd689654d3a-s.p.woff2 +0 -0
  250. package/app/.next/static/media/db96af6b531dc71f-s.p.woff2 +0 -0
  251. package/app/.next/static/media/e40af3453d7c920a-s.woff2 +0 -0
  252. package/app/.next/static/media/ef4d5661765d0e49-s.woff2 +0 -0
  253. package/app/.next/static/media/material-symbols-outlined.f656244e.woff2 +0 -0
  254. package/app/.next-cli-build/BUILD_ID +1 -1
  255. package/app/.next-cli-build/app-path-routes-manifest.json +26 -10
  256. package/app/.next-cli-build/build-manifest.json +2 -2
  257. package/app/.next-cli-build/prerender-manifest.json +3 -3
  258. package/app/.next-cli-build/required-server-files.json +5 -1
  259. package/app/.next-cli-build/routes-manifest.json +98 -0
  260. package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-library/page.js +1 -1
  261. package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-library/page.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-library/page_client-reference-manifest.js +1 -1
  263. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  264. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  266. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  267. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  269. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  270. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  272. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  273. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  275. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/routing/page.js +1 -1
  276. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/routing/page.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/routing/page_client-reference-manifest.js +1 -1
  278. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  279. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  281. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  282. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  284. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +11 -11
  285. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  287. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  288. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  290. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
  291. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  293. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js +1 -1
  294. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page_client-reference-manifest.js +1 -1
  296. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  297. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  299. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  300. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  302. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  303. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  305. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  306. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  308. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
  309. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  311. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  312. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  314. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  315. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  317. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -0
  318. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -0
  319. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -0
  320. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  321. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  323. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/[id]/page.js +1 -1
  324. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/[id]/page.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/[id]/page_client-reference-manifest.js +1 -1
  326. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  327. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  329. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  330. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  332. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  333. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  335. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  336. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  338. package/app/.next-cli-build/server/app/_global-error/page.js +2 -2
  339. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  341. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  342. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  343. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  344. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  345. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  346. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  347. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  349. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  350. package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  351. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  352. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +4 -4
  353. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  354. package/app/.next-cli-build/server/app/api/agent-library/catalog/route.js +1 -1
  355. package/app/.next-cli-build/server/app/api/agent-library/catalog/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/agent-library/doctor/route.js +1 -1
  357. package/app/.next-cli-build/server/app/api/agent-library/doctor/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/agent-library/export/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/agent-library/export/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/agent-library/mcp/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/agent-library/mcp/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/agent-library/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/agent-library/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/agent-library/skills/route.js +1 -1
  365. package/app/.next-cli-build/server/app/api/agent-library/skills/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/agent-library/sync/route.js +1 -1
  367. package/app/.next-cli-build/server/app/api/agent-library/sync/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/api/agent-library/updates/route.js +1 -1
  369. package/app/.next-cli-build/server/app/api/agent-library/updates/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/cli-tools/aider-settings/route.js +2 -2
  373. package/app/.next-cli-build/server/app/api/cli-tools/aider-settings/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
  375. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  377. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  379. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/api/cli-tools/claude-full-catalog/route.js +1 -1
  381. package/app/.next-cli-build/server/app/api/cli-tools/claude-full-catalog/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/cli-tools/claude-picker-labels/route.js +1 -1
  383. package/app/.next-cli-build/server/app/api/cli-tools/claude-picker-labels/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +1 -1
  385. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  387. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +2 -2
  389. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  391. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  393. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  395. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  397. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  398. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  399. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  400. package/app/.next-cli-build/server/app/api/cli-tools/gemini-cli-settings/route.js +2 -2
  401. package/app/.next-cli-build/server/app/api/cli-tools/gemini-cli-settings/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/cli-tools/grok-settings/route.js +2 -2
  403. package/app/.next-cli-build/server/app/api/cli-tools/grok-settings/route.js.nft.json +1 -1
  404. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  405. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  406. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  407. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  409. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  410. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  411. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  412. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  413. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +1 -1
  415. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  416. package/app/.next-cli-build/server/app/api/cli-tools/picker-labels/route.js +1 -1
  417. package/app/.next-cli-build/server/app/api/cli-tools/picker-labels/route.js.nft.json +1 -1
  418. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  419. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  420. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  421. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  422. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -0
  423. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -0
  424. package/app/.next-cli-build/server/app/api/headroom/extras/route_client-reference-manifest.js +1 -0
  425. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  426. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  427. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -0
  428. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -0
  429. package/app/.next-cli-build/server/app/api/headroom/restart/route_client-reference-manifest.js +1 -0
  430. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  431. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  432. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  433. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  434. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  435. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  436. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  437. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  438. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  439. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  440. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  441. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  442. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  443. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  444. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
  445. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  446. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
  447. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  448. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  449. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  450. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  451. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  452. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  453. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  454. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  455. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  456. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  457. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  458. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/route.js +1 -1
  459. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/route.js.nft.json +1 -1
  460. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/strategy/route.js +1 -1
  461. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/strategy/route.js.nft.json +1 -1
  462. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/route.js +1 -1
  463. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/route.js.nft.json +1 -1
  464. package/app/.next-cli-build/server/app/api/mgmt/v1/health/route.js +1 -1
  465. package/app/.next-cli-build/server/app/api/mgmt/v1/health/route.js.nft.json +1 -1
  466. package/app/.next-cli-build/server/app/api/mgmt/v1/metrics/route.js +2 -0
  467. package/app/.next-cli-build/server/app/api/mgmt/v1/metrics/route.js.nft.json +1 -0
  468. package/app/.next-cli-build/server/app/api/mgmt/v1/metrics/route_client-reference-manifest.js +1 -0
  469. package/app/.next-cli-build/server/app/api/mgmt/v1/providers/route.js +1 -1
  470. package/app/.next-cli-build/server/app/api/mgmt/v1/providers/route.js.nft.json +1 -1
  471. package/app/.next-cli-build/server/app/api/mgmt/v1/routing/route.js +1 -1
  472. package/app/.next-cli-build/server/app/api/mgmt/v1/routing/route.js.nft.json +1 -1
  473. package/app/.next-cli-build/server/app/api/mgmt/v1/usage/route.js +1 -1
  474. package/app/.next-cli-build/server/app/api/mgmt/v1/usage/route.js.nft.json +1 -1
  475. package/app/.next-cli-build/server/app/api/mgmt/v1/version/route.js +1 -1
  476. package/app/.next-cli-build/server/app/api/mgmt/v1/version/route.js.nft.json +1 -1
  477. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  478. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  479. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  480. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  481. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  482. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  483. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  484. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  485. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  486. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  487. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  488. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  489. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  490. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  491. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  492. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  493. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  494. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  495. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  496. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  497. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  498. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  499. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  500. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  501. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  502. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  503. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  504. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  505. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  506. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  507. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  508. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  509. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  510. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  511. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  512. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  513. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  514. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  515. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  516. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  517. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  518. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  519. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  520. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  521. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  522. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  523. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/batch/route.js +1 -1
  524. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/batch/route.js.nft.json +1 -1
  525. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/cache/route.js +1 -1
  526. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/cache/route.js.nft.json +1 -1
  527. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/prepare/route.js +1 -1
  528. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/prepare/route.js.nft.json +1 -1
  529. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/remove-unavailable/route.js +1 -1
  530. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/remove-unavailable/route.js.nft.json +1 -1
  531. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/route.js +1 -1
  532. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/route.js.nft.json +1 -1
  533. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/verify/cancel/route.js +1 -1
  534. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/verify/cancel/route.js.nft.json +1 -1
  535. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/verify/start/route.js +1 -1
  536. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/verify/start/route.js.nft.json +1 -1
  537. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/verify/status/route.js +1 -1
  538. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/verify/status/route.js.nft.json +1 -1
  539. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  540. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  541. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  542. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  543. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  544. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  545. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  546. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  547. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  548. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  549. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  550. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  551. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  552. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  553. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  554. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  555. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  556. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  557. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  558. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  559. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +3 -0
  560. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -0
  561. package/app/.next-cli-build/server/app/api/pxpipe/health/route_client-reference-manifest.js +1 -0
  562. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +3 -0
  563. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -0
  564. package/app/.next-cli-build/server/app/api/pxpipe/install/route_client-reference-manifest.js +1 -0
  565. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +3 -0
  566. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -0
  567. package/app/.next-cli-build/server/app/api/pxpipe/logs/route_client-reference-manifest.js +1 -0
  568. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +3 -0
  569. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -0
  570. package/app/.next-cli-build/server/app/api/pxpipe/restart/route_client-reference-manifest.js +1 -0
  571. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +3 -0
  572. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -0
  573. package/app/.next-cli-build/server/app/api/pxpipe/start/route_client-reference-manifest.js +1 -0
  574. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +3 -0
  575. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -0
  576. package/app/.next-cli-build/server/app/api/pxpipe/stats/route_client-reference-manifest.js +1 -0
  577. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +3 -0
  578. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -0
  579. package/app/.next-cli-build/server/app/api/pxpipe/status/route_client-reference-manifest.js +1 -0
  580. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +3 -0
  581. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -0
  582. package/app/.next-cli-build/server/app/api/pxpipe/stop/route_client-reference-manifest.js +1 -0
  583. package/app/.next-cli-build/server/app/api/routing/feedback/route.js +1 -1
  584. package/app/.next-cli-build/server/app/api/routing/feedback/route.js.nft.json +1 -1
  585. package/app/.next-cli-build/server/app/api/routing/insights/route.js +1 -1
  586. package/app/.next-cli-build/server/app/api/routing/insights/route.js.nft.json +1 -1
  587. package/app/.next-cli-build/server/app/api/routing/learn/route.js +1 -1
  588. package/app/.next-cli-build/server/app/api/routing/learn/route.js.nft.json +1 -1
  589. package/app/.next-cli-build/server/app/api/routing/stats/route.js +1 -1
  590. package/app/.next-cli-build/server/app/api/routing/stats/route.js.nft.json +1 -1
  591. package/app/.next-cli-build/server/app/api/routing/versions/promote/route.js +1 -1
  592. package/app/.next-cli-build/server/app/api/routing/versions/promote/route.js.nft.json +1 -1
  593. package/app/.next-cli-build/server/app/api/routing/versions/rollback/route.js +1 -1
  594. package/app/.next-cli-build/server/app/api/routing/versions/rollback/route.js.nft.json +1 -1
  595. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  596. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  597. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  598. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  599. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  600. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  601. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  602. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  603. package/app/.next-cli-build/server/app/api/skills/[id]/route.js +1 -1
  604. package/app/.next-cli-build/server/app/api/skills/[id]/route.js.nft.json +1 -1
  605. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  606. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  607. package/app/.next-cli-build/server/app/api/token-saver/vault-stats/route.js +1 -1
  608. package/app/.next-cli-build/server/app/api/token-saver/vault-stats/route.js.nft.json +1 -1
  609. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  610. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  611. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  612. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  613. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  614. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  615. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  616. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  617. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  618. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  619. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  620. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  621. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  622. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  623. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  624. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  625. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  626. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  627. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  628. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  629. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  630. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  631. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  632. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  633. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  634. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  635. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  636. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  637. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  638. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  639. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  640. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  641. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  642. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  643. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  644. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  645. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  646. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  647. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  648. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  649. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  650. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  651. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  652. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  653. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  654. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  655. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  656. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  657. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  658. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  659. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  660. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  661. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  662. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  663. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  664. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  665. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  666. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  667. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  668. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  669. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  670. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  671. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  672. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  673. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -0
  674. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -0
  675. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route_client-reference-manifest.js +1 -0
  676. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -0
  677. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -0
  678. package/app/.next-cli-build/server/app/api/v1/videos/edits/route_client-reference-manifest.js +1 -0
  679. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -0
  680. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -0
  681. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route_client-reference-manifest.js +1 -0
  682. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -0
  683. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -0
  684. package/app/.next-cli-build/server/app/api/v1/videos/generations/route_client-reference-manifest.js +1 -0
  685. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  686. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  687. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  688. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  689. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  690. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  691. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  692. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  693. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  694. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  695. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  696. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  697. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  698. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  699. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  700. package/app/.next-cli-build/server/app/callback.html +1 -1
  701. package/app/.next-cli-build/server/app/callback.rsc +4 -4
  702. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
  703. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  704. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +4 -4
  705. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  706. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  707. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  708. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  709. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
  710. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  711. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  712. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +5 -5
  713. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  714. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  715. package/app/.next-cli-build/server/app/index.html +1 -1
  716. package/app/.next-cli-build/server/app/index.rsc +4 -4
  717. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +4 -4
  718. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  719. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  720. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  721. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  722. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  723. package/app/.next-cli-build/server/app/landing.html +1 -1
  724. package/app/.next-cli-build/server/app/landing.rsc +4 -4
  725. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
  726. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  727. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +4 -4
  728. package/app/.next-cli-build/server/app/login/page.js +1 -1
  729. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  730. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  731. package/app/.next-cli-build/server/app/login.html +1 -1
  732. package/app/.next-cli-build/server/app/login.rsc +4 -4
  733. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
  734. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  735. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +4 -4
  736. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  737. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  738. package/app/.next-cli-build/server/app/page.js +1 -1
  739. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  740. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  741. package/app/.next-cli-build/server/app-paths-manifest.json +26 -10
  742. package/app/.next-cli-build/server/chunks/1294.js +1 -1
  743. package/app/.next-cli-build/server/chunks/1350.js +1 -1
  744. package/app/.next-cli-build/server/chunks/159.js +1 -1
  745. package/app/.next-cli-build/server/chunks/1656.js +2 -0
  746. package/app/.next-cli-build/server/chunks/1937.js +2 -2
  747. package/app/.next-cli-build/server/chunks/194.js +1 -1
  748. package/app/.next-cli-build/server/chunks/1998.js +1 -1
  749. package/app/.next-cli-build/server/chunks/2376.js +1 -1
  750. package/app/.next-cli-build/server/chunks/2409.js +1 -1
  751. package/app/.next-cli-build/server/chunks/3026.js +1 -0
  752. package/app/.next-cli-build/server/chunks/3072.js +1 -1
  753. package/app/.next-cli-build/server/chunks/3075.js +1 -1
  754. package/app/.next-cli-build/server/chunks/3546.js +1 -1
  755. package/app/.next-cli-build/server/chunks/3593.js +2 -2
  756. package/app/.next-cli-build/server/chunks/369.js +11 -9
  757. package/app/.next-cli-build/server/chunks/3787.js +1 -1
  758. package/app/.next-cli-build/server/chunks/3904.js +1 -1
  759. package/app/.next-cli-build/server/chunks/3986.js +39 -23
  760. package/app/.next-cli-build/server/chunks/4739.js +2 -2
  761. package/app/.next-cli-build/server/chunks/4780.js +2 -2
  762. package/app/.next-cli-build/server/chunks/4803.js +1 -1
  763. package/app/.next-cli-build/server/chunks/507.js +2 -2
  764. package/app/.next-cli-build/server/chunks/5258.js +2 -2
  765. package/app/.next-cli-build/server/chunks/5350.js +1 -1
  766. package/app/.next-cli-build/server/chunks/5616.js +1 -0
  767. package/app/.next-cli-build/server/chunks/5717.js +47 -0
  768. package/app/.next-cli-build/server/chunks/5781.js +15 -0
  769. package/app/.next-cli-build/server/chunks/5888.js +246 -0
  770. package/app/.next-cli-build/server/chunks/5913.js +1 -0
  771. package/app/.next-cli-build/server/chunks/6052.js +2 -0
  772. package/app/.next-cli-build/server/chunks/6252.js +1 -1
  773. package/app/.next-cli-build/server/chunks/6274.js +1 -0
  774. package/app/.next-cli-build/server/chunks/6328.js +1 -1
  775. package/app/.next-cli-build/server/chunks/6347.js +1 -0
  776. package/app/.next-cli-build/server/chunks/6395.js +15 -15
  777. package/app/.next-cli-build/server/chunks/6406.js +1 -1
  778. package/app/.next-cli-build/server/chunks/6492.js +1 -1
  779. package/app/.next-cli-build/server/chunks/6947.js +1 -0
  780. package/app/.next-cli-build/server/chunks/698.js +2 -2
  781. package/app/.next-cli-build/server/chunks/6985.js +1 -1
  782. package/app/.next-cli-build/server/chunks/7141.js +1 -1
  783. package/app/.next-cli-build/server/chunks/7454.js +1 -1
  784. package/app/.next-cli-build/server/chunks/7557.js +4 -4
  785. package/app/.next-cli-build/server/chunks/7757.js +1 -0
  786. package/app/.next-cli-build/server/chunks/7774.js +3 -3
  787. package/app/.next-cli-build/server/chunks/7828.js +2 -2
  788. package/app/.next-cli-build/server/chunks/7965.js +2 -2
  789. package/app/.next-cli-build/server/chunks/8062.js +1 -1
  790. package/app/.next-cli-build/server/chunks/8117.js +1 -1
  791. package/app/.next-cli-build/server/chunks/8400.js +9 -9
  792. package/app/.next-cli-build/server/chunks/8469.js +1 -1
  793. package/app/.next-cli-build/server/chunks/849.js +1 -0
  794. package/app/.next-cli-build/server/chunks/8520.js +2 -2
  795. package/app/.next-cli-build/server/chunks/8658.js +1 -1
  796. package/app/.next-cli-build/server/chunks/869.js +1 -1
  797. package/app/.next-cli-build/server/chunks/8775.js +1 -1
  798. package/app/.next-cli-build/server/chunks/8789.js +1 -1
  799. package/app/.next-cli-build/server/chunks/8834.js +7 -0
  800. package/app/.next-cli-build/server/chunks/8942.js +246 -0
  801. package/app/.next-cli-build/server/chunks/8998.js +67 -43
  802. package/app/.next-cli-build/server/chunks/{5615.js → 9091.js} +2 -2
  803. package/app/.next-cli-build/server/chunks/9261.js +6 -6
  804. package/app/.next-cli-build/server/chunks/9264.js +10 -0
  805. package/app/.next-cli-build/server/chunks/940.js +246 -0
  806. package/app/.next-cli-build/server/chunks/9421.js +4 -0
  807. package/app/.next-cli-build/server/chunks/9508.js +4 -4
  808. package/app/.next-cli-build/server/chunks/9617.js +1 -0
  809. package/app/.next-cli-build/server/chunks/static/media/versions.401d57e8.json +20 -0
  810. package/app/.next-cli-build/server/functions-config-manifest.json +6 -0
  811. package/app/.next-cli-build/server/instrumentation.js +1 -1
  812. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  813. package/app/.next-cli-build/server/middleware.js +24 -12
  814. package/app/.next-cli-build/server/pages/404.html +1 -1
  815. package/app/.next-cli-build/server/pages/500.html +1 -1
  816. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  817. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  818. package/app/.next-cli-build/static/LW9zpYBdABYCFKEJUiC4B/_buildManifest.js +1 -0
  819. package/app/.next-cli-build/static/chunks/1321-8d4ef805452d3649.js +1 -0
  820. package/app/.next-cli-build/static/chunks/3531-e8d13ec64699f527.js +68 -0
  821. package/app/.next-cli-build/static/chunks/4707-1ec0b2edbb07f455.js +1 -0
  822. package/app/.next-cli-build/static/chunks/5497-a3b9cdb0b8300541.js +7 -0
  823. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/agent-library/page-24b5a8515eee26d6.js +1 -0
  824. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-4ec8bfa73afe20a6.js +1 -0
  825. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-6633578a55a1a436.js → page-d7205b7328b3fed1.js} +1 -1
  826. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-3cbe5d8636bd2161.js → page-d0b6efe01e687aec.js} +1 -1
  827. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-5cfdfdf507c8222f.js +1 -0
  828. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/routing/{page-1fc70bcd434deb73.js → page-25629f96675ad55d.js} +1 -1
  829. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-b54cd17200807e49.js +1 -0
  830. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-cd44cb44125275b6.js +3 -0
  831. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-995a96a01c24b126.js +59 -0
  832. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-95bf830096d019fd.js → page-52c12af07f9a6de0.js} +1 -1
  833. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/page-8554ba79c854167f.js +4 -0
  834. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/page-0f54c9a5e7391a77.js +1 -0
  835. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-961013b570bbeac6.js → page-cfbd3661ac75b8c5.js} +1 -1
  836. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-59e54ef2021ad5bb.js → page-8779ff2bc755ba78.js} +1 -1
  837. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-c33d24bdadcf0c6e.js +1 -0
  838. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/{page-b5b9038ea28e63b6.js → page-d32871b974f7e72f.js} +1 -1
  839. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-e4258dcd8fb1a077.js +10 -0
  840. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/page-74d56b3b7ac42546.js +1 -0
  841. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-d3e35265648406f2.js → page-555f079cdf31bbf6.js} +1 -1
  842. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/pxpipe/page-bd18ad88b98cd373.js +1 -0
  843. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-b3ffcc7df06a37d8.js +1 -0
  844. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/[id]/{page-bb4af1ac9b13a514.js → page-56bf48ee2068208e.js} +1 -1
  845. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-4382c14f28ddfc7f.js → page-46986a955b8c89b2.js} +1 -1
  846. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-20972a96e348f397.js +1 -0
  847. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-0cc2ccbe11cc0013.js +1 -0
  848. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-5af5fff7d28ed91d.js +1 -0
  849. package/app/.next-cli-build/static/chunks/app/(dashboard)/error-d633be4a53c4ab61.js +1 -0
  850. package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-d1fa5b81e1c386ab.js → layout-62b4e2cdf745f8d0.js} +1 -1
  851. package/app/.next-cli-build/static/chunks/app/_global-error/page-e5f03432dd0bcd61.js +1 -0
  852. package/app/.next-cli-build/static/chunks/app/api/agent-library/catalog/route-e5f03432dd0bcd61.js +1 -0
  853. package/app/.next-cli-build/static/chunks/app/api/agent-library/doctor/route-e5f03432dd0bcd61.js +1 -0
  854. package/app/.next-cli-build/static/chunks/app/api/agent-library/export/route-e5f03432dd0bcd61.js +1 -0
  855. package/app/.next-cli-build/static/chunks/app/api/agent-library/mcp/route-e5f03432dd0bcd61.js +1 -0
  856. package/app/.next-cli-build/static/chunks/app/api/agent-library/route-e5f03432dd0bcd61.js +1 -0
  857. package/app/.next-cli-build/static/chunks/app/api/agent-library/skills/route-e5f03432dd0bcd61.js +1 -0
  858. package/app/.next-cli-build/static/chunks/app/api/agent-library/sync/route-e5f03432dd0bcd61.js +1 -0
  859. package/app/.next-cli-build/static/chunks/app/api/agent-library/updates/route-e5f03432dd0bcd61.js +1 -0
  860. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-e5f03432dd0bcd61.js +1 -0
  861. package/app/.next-cli-build/static/chunks/app/api/cli-tools/aider-settings/route-e5f03432dd0bcd61.js +1 -0
  862. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-e5f03432dd0bcd61.js +1 -0
  863. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-e5f03432dd0bcd61.js +1 -0
  864. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-e5f03432dd0bcd61.js +1 -0
  865. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-full-catalog/route-e5f03432dd0bcd61.js +1 -0
  866. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-picker-labels/route-e5f03432dd0bcd61.js +1 -0
  867. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-e5f03432dd0bcd61.js +1 -0
  868. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-e5f03432dd0bcd61.js +1 -0
  869. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-e5f03432dd0bcd61.js +1 -0
  870. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-e5f03432dd0bcd61.js +1 -0
  871. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-e5f03432dd0bcd61.js +1 -0
  872. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-e5f03432dd0bcd61.js +1 -0
  873. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-e5f03432dd0bcd61.js +1 -0
  874. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-e5f03432dd0bcd61.js +1 -0
  875. package/app/.next-cli-build/static/chunks/app/api/cli-tools/gemini-cli-settings/route-e5f03432dd0bcd61.js +1 -0
  876. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-settings/route-e5f03432dd0bcd61.js +1 -0
  877. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-e5f03432dd0bcd61.js +1 -0
  878. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-e5f03432dd0bcd61.js +1 -0
  879. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-e5f03432dd0bcd61.js +1 -0
  880. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-e5f03432dd0bcd61.js +1 -0
  881. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-e5f03432dd0bcd61.js +1 -0
  882. package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-e5f03432dd0bcd61.js +1 -0
  883. package/app/.next-cli-build/static/chunks/app/api/cli-tools/picker-labels/route-e5f03432dd0bcd61.js +1 -0
  884. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-e5f03432dd0bcd61.js +1 -0
  885. package/app/.next-cli-build/static/chunks/app/api/combos/route-e5f03432dd0bcd61.js +1 -0
  886. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-e5f03432dd0bcd61.js +1 -0
  887. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-e5f03432dd0bcd61.js +1 -0
  888. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-e5f03432dd0bcd61.js +1 -0
  889. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-e5f03432dd0bcd61.js +1 -0
  890. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-e5f03432dd0bcd61.js +1 -0
  891. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-e5f03432dd0bcd61.js +1 -0
  892. package/app/.next-cli-build/static/chunks/app/api/health/route-e5f03432dd0bcd61.js +1 -0
  893. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-e5f03432dd0bcd61.js +1 -0
  894. package/app/.next-cli-build/static/chunks/app/api/keys/route-e5f03432dd0bcd61.js +1 -0
  895. package/app/.next-cli-build/static/chunks/app/api/locale/route-e5f03432dd0bcd61.js +1 -0
  896. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-e5f03432dd0bcd61.js +1 -0
  897. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-e5f03432dd0bcd61.js +1 -0
  898. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-e5f03432dd0bcd61.js +1 -0
  899. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-e5f03432dd0bcd61.js +1 -0
  900. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-e5f03432dd0bcd61.js +1 -0
  901. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-e5f03432dd0bcd61.js +1 -0
  902. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-e5f03432dd0bcd61.js +1 -0
  903. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/combos/[id]/route-e5f03432dd0bcd61.js +1 -0
  904. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/combos/[id]/strategy/route-e5f03432dd0bcd61.js +1 -0
  905. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/combos/route-e5f03432dd0bcd61.js +1 -0
  906. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/health/route-e5f03432dd0bcd61.js +1 -0
  907. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/metrics/route-e5f03432dd0bcd61.js +1 -0
  908. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/providers/route-e5f03432dd0bcd61.js +1 -0
  909. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/routing/route-e5f03432dd0bcd61.js +1 -0
  910. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/usage/route-e5f03432dd0bcd61.js +1 -0
  911. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/version/route-e5f03432dd0bcd61.js +1 -0
  912. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-e5f03432dd0bcd61.js +1 -0
  913. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-e5f03432dd0bcd61.js +1 -0
  914. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-e5f03432dd0bcd61.js +1 -0
  915. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-e5f03432dd0bcd61.js +1 -0
  916. package/app/.next-cli-build/static/chunks/app/api/models/route-e5f03432dd0bcd61.js +1 -0
  917. package/app/.next-cli-build/static/chunks/app/api/models/test/route-e5f03432dd0bcd61.js +1 -0
  918. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-e5f03432dd0bcd61.js +1 -0
  919. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-e5f03432dd0bcd61.js +1 -0
  920. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-e5f03432dd0bcd61.js +1 -0
  921. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-e5f03432dd0bcd61.js +1 -0
  922. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-e5f03432dd0bcd61.js +1 -0
  923. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-e5f03432dd0bcd61.js +1 -0
  924. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-e5f03432dd0bcd61.js +1 -0
  925. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-e5f03432dd0bcd61.js +1 -0
  926. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-e5f03432dd0bcd61.js +1 -0
  927. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-e5f03432dd0bcd61.js +1 -0
  928. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-e5f03432dd0bcd61.js +1 -0
  929. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-e5f03432dd0bcd61.js +1 -0
  930. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-e5f03432dd0bcd61.js +1 -0
  931. package/app/.next-cli-build/static/chunks/app/api/pricing/route-e5f03432dd0bcd61.js +1 -0
  932. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-e5f03432dd0bcd61.js +1 -0
  933. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-e5f03432dd0bcd61.js +1 -0
  934. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-e5f03432dd0bcd61.js +1 -0
  935. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/batch/route-e5f03432dd0bcd61.js +1 -0
  936. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/cache/route-e5f03432dd0bcd61.js +1 -0
  937. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/prepare/route-e5f03432dd0bcd61.js +1 -0
  938. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/remove-unavailable/route-e5f03432dd0bcd61.js +1 -0
  939. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/route-e5f03432dd0bcd61.js +1 -0
  940. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/verify/cancel/route-e5f03432dd0bcd61.js +1 -0
  941. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/verify/start/route-e5f03432dd0bcd61.js +1 -0
  942. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/verify/status/route-e5f03432dd0bcd61.js +1 -0
  943. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-e5f03432dd0bcd61.js +1 -0
  944. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-e5f03432dd0bcd61.js +1 -0
  945. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-e5f03432dd0bcd61.js +1 -0
  946. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-e5f03432dd0bcd61.js +1 -0
  947. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-e5f03432dd0bcd61.js +1 -0
  948. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-e5f03432dd0bcd61.js +1 -0
  949. package/app/.next-cli-build/static/chunks/app/api/providers/route-e5f03432dd0bcd61.js +1 -0
  950. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-e5f03432dd0bcd61.js +1 -0
  951. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-e5f03432dd0bcd61.js +1 -0
  952. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-e5f03432dd0bcd61.js +1 -0
  953. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-e5f03432dd0bcd61.js +1 -0
  954. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-e5f03432dd0bcd61.js +1 -0
  955. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-e5f03432dd0bcd61.js +1 -0
  956. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-e5f03432dd0bcd61.js +1 -0
  957. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-e5f03432dd0bcd61.js +1 -0
  958. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-e5f03432dd0bcd61.js +1 -0
  959. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-e5f03432dd0bcd61.js +1 -0
  960. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-e5f03432dd0bcd61.js +1 -0
  961. package/app/.next-cli-build/static/chunks/app/api/routing/feedback/route-e5f03432dd0bcd61.js +1 -0
  962. package/app/.next-cli-build/static/chunks/app/api/routing/insights/route-e5f03432dd0bcd61.js +1 -0
  963. package/app/.next-cli-build/static/chunks/app/api/routing/learn/route-e5f03432dd0bcd61.js +1 -0
  964. package/app/.next-cli-build/static/chunks/app/api/routing/stats/route-e5f03432dd0bcd61.js +1 -0
  965. package/app/.next-cli-build/static/chunks/app/api/routing/versions/promote/route-e5f03432dd0bcd61.js +1 -0
  966. package/app/.next-cli-build/static/chunks/app/api/routing/versions/rollback/route-e5f03432dd0bcd61.js +1 -0
  967. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-e5f03432dd0bcd61.js +1 -0
  968. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-e5f03432dd0bcd61.js +1 -0
  969. package/app/.next-cli-build/static/chunks/app/api/settings/route-e5f03432dd0bcd61.js +1 -0
  970. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-e5f03432dd0bcd61.js +1 -0
  971. package/app/.next-cli-build/static/chunks/app/api/skills/[id]/route-e5f03432dd0bcd61.js +1 -0
  972. package/app/.next-cli-build/static/chunks/app/api/tags/route-e5f03432dd0bcd61.js +1 -0
  973. package/app/.next-cli-build/static/chunks/app/api/token-saver/vault-stats/route-e5f03432dd0bcd61.js +1 -0
  974. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-e5f03432dd0bcd61.js +1 -0
  975. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-e5f03432dd0bcd61.js +1 -0
  976. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-e5f03432dd0bcd61.js +1 -0
  977. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-e5f03432dd0bcd61.js +1 -0
  978. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-e5f03432dd0bcd61.js +1 -0
  979. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-e5f03432dd0bcd61.js +1 -0
  980. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-e5f03432dd0bcd61.js +1 -0
  981. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-e5f03432dd0bcd61.js +1 -0
  982. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-e5f03432dd0bcd61.js +1 -0
  983. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-e5f03432dd0bcd61.js +1 -0
  984. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-e5f03432dd0bcd61.js +1 -0
  985. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-e5f03432dd0bcd61.js +1 -0
  986. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-e5f03432dd0bcd61.js +1 -0
  987. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-e5f03432dd0bcd61.js +1 -0
  988. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-e5f03432dd0bcd61.js +1 -0
  989. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-e5f03432dd0bcd61.js +1 -0
  990. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-e5f03432dd0bcd61.js +1 -0
  991. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-e5f03432dd0bcd61.js +1 -0
  992. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-e5f03432dd0bcd61.js +1 -0
  993. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-e5f03432dd0bcd61.js +1 -0
  994. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-e5f03432dd0bcd61.js +1 -0
  995. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-e5f03432dd0bcd61.js +1 -0
  996. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-e5f03432dd0bcd61.js +1 -0
  997. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-e5f03432dd0bcd61.js +1 -0
  998. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-e5f03432dd0bcd61.js +1 -0
  999. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-e5f03432dd0bcd61.js +1 -0
  1000. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-e5f03432dd0bcd61.js +1 -0
  1001. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-e5f03432dd0bcd61.js +1 -0
  1002. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-e5f03432dd0bcd61.js +1 -0
  1003. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-e5f03432dd0bcd61.js +1 -0
  1004. package/app/.next-cli-build/static/chunks/app/api/v1/route-e5f03432dd0bcd61.js +1 -0
  1005. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-e5f03432dd0bcd61.js +1 -0
  1006. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-e5f03432dd0bcd61.js +1 -0
  1007. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-e5f03432dd0bcd61.js +1 -0
  1008. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-e5f03432dd0bcd61.js +1 -0
  1009. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-e5f03432dd0bcd61.js +1 -0
  1010. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-e5f03432dd0bcd61.js +1 -0
  1011. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-e5f03432dd0bcd61.js +1 -0
  1012. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-e5f03432dd0bcd61.js +1 -0
  1013. package/app/.next-cli-build/static/chunks/app/api/version/route-e5f03432dd0bcd61.js +1 -0
  1014. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-e5f03432dd0bcd61.js +1 -0
  1015. package/app/.next-cli-build/static/chunks/app/api/version/update/route-e5f03432dd0bcd61.js +1 -0
  1016. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-423a4c1e078872dd.js +1 -0
  1017. package/app/.next-cli-build/static/chunks/app/login/page-e5f03432dd0bcd61.js +1 -0
  1018. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-e5f03432dd0bcd61.js +1 -0
  1019. package/app/.next-cli-build/static/chunks/app/page-e5f03432dd0bcd61.js +1 -0
  1020. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-e5f03432dd0bcd61.js +1 -0
  1021. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-e5f03432dd0bcd61.js +1 -0
  1022. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-e5f03432dd0bcd61.js +1 -0
  1023. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-e5f03432dd0bcd61.js +1 -0
  1024. package/app/.next-cli-build/static/css/23b999cda6943547.css +1 -0
  1025. package/app/custom-server.js +63 -2
  1026. package/app/node_modules/impit/CHANGELOG.md +545 -0
  1027. package/app/node_modules/impit/README.md +62 -0
  1028. package/app/node_modules/impit/dts-header.d.ts +36 -0
  1029. package/app/node_modules/impit/errors.js +117 -0
  1030. package/app/node_modules/impit/index.d.ts +431 -0
  1031. package/app/node_modules/impit/index.js +583 -0
  1032. package/app/node_modules/impit/index.wrapper.js +504 -0
  1033. package/app/node_modules/impit/package.json +66 -0
  1034. package/app/node_modules/impit/pnpm-workspace.yaml +15 -0
  1035. package/app/node_modules/impit/tsconfig.docs.json +6 -0
  1036. package/app/node_modules/impit-linux-x64-gnu/README.md +3 -0
  1037. package/app/node_modules/impit-linux-x64-gnu/impit-node.linux-x64-gnu.node +0 -0
  1038. package/app/node_modules/impit-linux-x64-gnu/package.json +24 -0
  1039. package/app/open-sse/identity/snapshots/versions.json +20 -0
  1040. package/app/open-sse/identity/tls/bin/darwin/arm64/switchboard-claude-tls +0 -0
  1041. package/app/open-sse/identity/tls/bin/darwin/x64/switchboard-claude-tls +0 -0
  1042. package/app/open-sse/identity/tls/bin/linux/arm64/switchboard-claude-tls +0 -0
  1043. package/app/open-sse/identity/tls/bin/linux/x64/switchboard-claude-tls +0 -0
  1044. package/app/open-sse/identity/tls/bin/win32/arm64/switchboard-claude-tls.exe +0 -0
  1045. package/app/open-sse/identity/tls/bin/win32/x64/switchboard-claude-tls.exe +0 -0
  1046. package/app/package.json +9 -3
  1047. package/app/server.js +1 -1
  1048. package/app/src/lib/db/adapters/betterSqliteAdapter.js +12 -6
  1049. package/app/src/lib/db/adapters/bunSqliteAdapter.js +11 -6
  1050. package/app/src/lib/db/adapters/nodeSqliteAdapter.js +11 -6
  1051. package/app/src/lib/db/adapters/sqljsAdapter.js +12 -5
  1052. package/app/src/lib/db/migrate.js +167 -22
  1053. package/app/src/lib/oauth/services/qoder.js +8 -1
  1054. package/app/src/lib/oauth/services/xai.js +11 -3
  1055. package/cli.js +14 -0
  1056. package/package.json +10 -2
  1057. package/src/cli/cliOptions.js +3 -0
  1058. package/src/cli/commands/xaiVideo.js +300 -0
  1059. package/src/cli/menus/apiKeys.js +7 -49
  1060. package/src/cli/menus/cliTools.js +4 -5
  1061. package/src/cli/terminalUI.js +2 -2
  1062. package/src/cli/utils/input.js +40 -0
  1063. package/app/.next-cli-build/server/chunks/1064.js +0 -104
  1064. package/app/.next-cli-build/server/chunks/1421.js +0 -1
  1065. package/app/.next-cli-build/server/chunks/2925.js +0 -1
  1066. package/app/.next-cli-build/server/chunks/3535.js +0 -1
  1067. package/app/.next-cli-build/server/chunks/4776.js +0 -33
  1068. package/app/.next-cli-build/server/chunks/615.js +0 -1
  1069. package/app/.next-cli-build/server/chunks/6448.js +0 -109
  1070. package/app/.next-cli-build/server/chunks/65.js +0 -1
  1071. package/app/.next-cli-build/server/chunks/7335.js +0 -1
  1072. package/app/.next-cli-build/server/chunks/7374.js +0 -2
  1073. package/app/.next-cli-build/server/chunks/8718.js +0 -1
  1074. package/app/.next-cli-build/server/chunks/9046.js +0 -1
  1075. package/app/.next-cli-build/server/chunks/9062.js +0 -104
  1076. package/app/.next-cli-build/server/chunks/9489.js +0 -8
  1077. package/app/.next-cli-build/server/chunks/9696.js +0 -7
  1078. package/app/.next-cli-build/static/chunks/1321-5250bb46aa281ab5.js +0 -1
  1079. package/app/.next-cli-build/static/chunks/3531-5066ce0b15cf43af.js +0 -68
  1080. package/app/.next-cli-build/static/chunks/5497-53b1dd3f23fb96bc.js +0 -7
  1081. package/app/.next-cli-build/static/chunks/7592-bbf465c7acd2478e.js +0 -1
  1082. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/agent-library/page-62bea7b75b3f2692.js +0 -1
  1083. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-1eb380280857cf20.js +0 -1
  1084. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-4bf0abe7c7119ac0.js +0 -1
  1085. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-fdc5377da12ec933.js +0 -1
  1086. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-b48bd39cb03c4985.js +0 -3
  1087. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-9e60537a4b8f5a0c.js +0 -59
  1088. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/page-45ebe6bb46c9f65e.js +0 -4
  1089. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/page-7ac82c8930583633.js +0 -1
  1090. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-27ae229b00137a0b.js +0 -1
  1091. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-1ec149c6b914249d.js +0 -10
  1092. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/page-fe7ccc9c117d7d38.js +0 -1
  1093. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-5ac3900baf3fe9ca.js +0 -1
  1094. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-1b2b6b736fe98698.js +0 -1
  1095. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-92fe95bd4e6b3d0a.js +0 -1
  1096. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-4c47b9660f3066e2.js +0 -1
  1097. package/app/.next-cli-build/static/chunks/app/_global-error/page-596c1bc92adc4d71.js +0 -1
  1098. package/app/.next-cli-build/static/chunks/app/api/agent-library/catalog/route-596c1bc92adc4d71.js +0 -1
  1099. package/app/.next-cli-build/static/chunks/app/api/agent-library/doctor/route-596c1bc92adc4d71.js +0 -1
  1100. package/app/.next-cli-build/static/chunks/app/api/agent-library/export/route-596c1bc92adc4d71.js +0 -1
  1101. package/app/.next-cli-build/static/chunks/app/api/agent-library/mcp/route-596c1bc92adc4d71.js +0 -1
  1102. package/app/.next-cli-build/static/chunks/app/api/agent-library/route-596c1bc92adc4d71.js +0 -1
  1103. package/app/.next-cli-build/static/chunks/app/api/agent-library/skills/route-596c1bc92adc4d71.js +0 -1
  1104. package/app/.next-cli-build/static/chunks/app/api/agent-library/sync/route-596c1bc92adc4d71.js +0 -1
  1105. package/app/.next-cli-build/static/chunks/app/api/agent-library/updates/route-596c1bc92adc4d71.js +0 -1
  1106. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-596c1bc92adc4d71.js +0 -1
  1107. package/app/.next-cli-build/static/chunks/app/api/cli-tools/aider-settings/route-596c1bc92adc4d71.js +0 -1
  1108. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-596c1bc92adc4d71.js +0 -1
  1109. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-596c1bc92adc4d71.js +0 -1
  1110. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-596c1bc92adc4d71.js +0 -1
  1111. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-full-catalog/route-596c1bc92adc4d71.js +0 -1
  1112. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-picker-labels/route-596c1bc92adc4d71.js +0 -1
  1113. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-596c1bc92adc4d71.js +0 -1
  1114. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-596c1bc92adc4d71.js +0 -1
  1115. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-596c1bc92adc4d71.js +0 -1
  1116. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-596c1bc92adc4d71.js +0 -1
  1117. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-596c1bc92adc4d71.js +0 -1
  1118. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-596c1bc92adc4d71.js +0 -1
  1119. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-596c1bc92adc4d71.js +0 -1
  1120. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-596c1bc92adc4d71.js +0 -1
  1121. package/app/.next-cli-build/static/chunks/app/api/cli-tools/gemini-cli-settings/route-596c1bc92adc4d71.js +0 -1
  1122. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-settings/route-596c1bc92adc4d71.js +0 -1
  1123. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-596c1bc92adc4d71.js +0 -1
  1124. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-596c1bc92adc4d71.js +0 -1
  1125. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-596c1bc92adc4d71.js +0 -1
  1126. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-596c1bc92adc4d71.js +0 -1
  1127. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-596c1bc92adc4d71.js +0 -1
  1128. package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-596c1bc92adc4d71.js +0 -1
  1129. package/app/.next-cli-build/static/chunks/app/api/cli-tools/picker-labels/route-596c1bc92adc4d71.js +0 -1
  1130. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-596c1bc92adc4d71.js +0 -1
  1131. package/app/.next-cli-build/static/chunks/app/api/combos/route-596c1bc92adc4d71.js +0 -1
  1132. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-596c1bc92adc4d71.js +0 -1
  1133. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-596c1bc92adc4d71.js +0 -1
  1134. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-596c1bc92adc4d71.js +0 -1
  1135. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-596c1bc92adc4d71.js +0 -1
  1136. package/app/.next-cli-build/static/chunks/app/api/health/route-596c1bc92adc4d71.js +0 -1
  1137. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-596c1bc92adc4d71.js +0 -1
  1138. package/app/.next-cli-build/static/chunks/app/api/keys/route-596c1bc92adc4d71.js +0 -1
  1139. package/app/.next-cli-build/static/chunks/app/api/locale/route-596c1bc92adc4d71.js +0 -1
  1140. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-596c1bc92adc4d71.js +0 -1
  1141. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-596c1bc92adc4d71.js +0 -1
  1142. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-596c1bc92adc4d71.js +0 -1
  1143. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-596c1bc92adc4d71.js +0 -1
  1144. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-596c1bc92adc4d71.js +0 -1
  1145. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-596c1bc92adc4d71.js +0 -1
  1146. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-596c1bc92adc4d71.js +0 -1
  1147. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/combos/[id]/route-596c1bc92adc4d71.js +0 -1
  1148. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/combos/[id]/strategy/route-596c1bc92adc4d71.js +0 -1
  1149. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/combos/route-596c1bc92adc4d71.js +0 -1
  1150. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/health/route-596c1bc92adc4d71.js +0 -1
  1151. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/providers/route-596c1bc92adc4d71.js +0 -1
  1152. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/routing/route-596c1bc92adc4d71.js +0 -1
  1153. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/usage/route-596c1bc92adc4d71.js +0 -1
  1154. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/version/route-596c1bc92adc4d71.js +0 -1
  1155. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-596c1bc92adc4d71.js +0 -1
  1156. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-596c1bc92adc4d71.js +0 -1
  1157. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-596c1bc92adc4d71.js +0 -1
  1158. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-596c1bc92adc4d71.js +0 -1
  1159. package/app/.next-cli-build/static/chunks/app/api/models/route-596c1bc92adc4d71.js +0 -1
  1160. package/app/.next-cli-build/static/chunks/app/api/models/test/route-596c1bc92adc4d71.js +0 -1
  1161. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-596c1bc92adc4d71.js +0 -1
  1162. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-596c1bc92adc4d71.js +0 -1
  1163. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-596c1bc92adc4d71.js +0 -1
  1164. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-596c1bc92adc4d71.js +0 -1
  1165. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-596c1bc92adc4d71.js +0 -1
  1166. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-596c1bc92adc4d71.js +0 -1
  1167. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-596c1bc92adc4d71.js +0 -1
  1168. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-596c1bc92adc4d71.js +0 -1
  1169. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-596c1bc92adc4d71.js +0 -1
  1170. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-596c1bc92adc4d71.js +0 -1
  1171. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-596c1bc92adc4d71.js +0 -1
  1172. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-596c1bc92adc4d71.js +0 -1
  1173. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-596c1bc92adc4d71.js +0 -1
  1174. package/app/.next-cli-build/static/chunks/app/api/pricing/route-596c1bc92adc4d71.js +0 -1
  1175. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-596c1bc92adc4d71.js +0 -1
  1176. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-596c1bc92adc4d71.js +0 -1
  1177. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-596c1bc92adc4d71.js +0 -1
  1178. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/batch/route-596c1bc92adc4d71.js +0 -1
  1179. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/cache/route-596c1bc92adc4d71.js +0 -1
  1180. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/prepare/route-596c1bc92adc4d71.js +0 -1
  1181. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/remove-unavailable/route-596c1bc92adc4d71.js +0 -1
  1182. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/route-596c1bc92adc4d71.js +0 -1
  1183. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/verify/cancel/route-596c1bc92adc4d71.js +0 -1
  1184. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/verify/start/route-596c1bc92adc4d71.js +0 -1
  1185. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/verify/status/route-596c1bc92adc4d71.js +0 -1
  1186. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-596c1bc92adc4d71.js +0 -1
  1187. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-596c1bc92adc4d71.js +0 -1
  1188. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-596c1bc92adc4d71.js +0 -1
  1189. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-596c1bc92adc4d71.js +0 -1
  1190. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-596c1bc92adc4d71.js +0 -1
  1191. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-596c1bc92adc4d71.js +0 -1
  1192. package/app/.next-cli-build/static/chunks/app/api/providers/route-596c1bc92adc4d71.js +0 -1
  1193. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-596c1bc92adc4d71.js +0 -1
  1194. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-596c1bc92adc4d71.js +0 -1
  1195. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-596c1bc92adc4d71.js +0 -1
  1196. package/app/.next-cli-build/static/chunks/app/api/routing/feedback/route-596c1bc92adc4d71.js +0 -1
  1197. package/app/.next-cli-build/static/chunks/app/api/routing/insights/route-596c1bc92adc4d71.js +0 -1
  1198. package/app/.next-cli-build/static/chunks/app/api/routing/learn/route-596c1bc92adc4d71.js +0 -1
  1199. package/app/.next-cli-build/static/chunks/app/api/routing/stats/route-596c1bc92adc4d71.js +0 -1
  1200. package/app/.next-cli-build/static/chunks/app/api/routing/versions/promote/route-596c1bc92adc4d71.js +0 -1
  1201. package/app/.next-cli-build/static/chunks/app/api/routing/versions/rollback/route-596c1bc92adc4d71.js +0 -1
  1202. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-596c1bc92adc4d71.js +0 -1
  1203. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-596c1bc92adc4d71.js +0 -1
  1204. package/app/.next-cli-build/static/chunks/app/api/settings/route-596c1bc92adc4d71.js +0 -1
  1205. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-596c1bc92adc4d71.js +0 -1
  1206. package/app/.next-cli-build/static/chunks/app/api/skills/[id]/route-596c1bc92adc4d71.js +0 -1
  1207. package/app/.next-cli-build/static/chunks/app/api/tags/route-596c1bc92adc4d71.js +0 -1
  1208. package/app/.next-cli-build/static/chunks/app/api/token-saver/vault-stats/route-596c1bc92adc4d71.js +0 -1
  1209. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-596c1bc92adc4d71.js +0 -1
  1210. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-596c1bc92adc4d71.js +0 -1
  1211. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-596c1bc92adc4d71.js +0 -1
  1212. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-596c1bc92adc4d71.js +0 -1
  1213. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-596c1bc92adc4d71.js +0 -1
  1214. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-596c1bc92adc4d71.js +0 -1
  1215. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-596c1bc92adc4d71.js +0 -1
  1216. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-596c1bc92adc4d71.js +0 -1
  1217. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-596c1bc92adc4d71.js +0 -1
  1218. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-596c1bc92adc4d71.js +0 -1
  1219. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-596c1bc92adc4d71.js +0 -1
  1220. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-596c1bc92adc4d71.js +0 -1
  1221. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-596c1bc92adc4d71.js +0 -1
  1222. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-596c1bc92adc4d71.js +0 -1
  1223. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-596c1bc92adc4d71.js +0 -1
  1224. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-596c1bc92adc4d71.js +0 -1
  1225. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-596c1bc92adc4d71.js +0 -1
  1226. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-596c1bc92adc4d71.js +0 -1
  1227. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-596c1bc92adc4d71.js +0 -1
  1228. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-596c1bc92adc4d71.js +0 -1
  1229. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-596c1bc92adc4d71.js +0 -1
  1230. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-596c1bc92adc4d71.js +0 -1
  1231. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-596c1bc92adc4d71.js +0 -1
  1232. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-596c1bc92adc4d71.js +0 -1
  1233. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-596c1bc92adc4d71.js +0 -1
  1234. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-596c1bc92adc4d71.js +0 -1
  1235. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-596c1bc92adc4d71.js +0 -1
  1236. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-596c1bc92adc4d71.js +0 -1
  1237. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-596c1bc92adc4d71.js +0 -1
  1238. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-596c1bc92adc4d71.js +0 -1
  1239. package/app/.next-cli-build/static/chunks/app/api/v1/route-596c1bc92adc4d71.js +0 -1
  1240. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-596c1bc92adc4d71.js +0 -1
  1241. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-596c1bc92adc4d71.js +0 -1
  1242. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-596c1bc92adc4d71.js +0 -1
  1243. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-596c1bc92adc4d71.js +0 -1
  1244. package/app/.next-cli-build/static/chunks/app/api/version/route-596c1bc92adc4d71.js +0 -1
  1245. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-596c1bc92adc4d71.js +0 -1
  1246. package/app/.next-cli-build/static/chunks/app/api/version/update/route-596c1bc92adc4d71.js +0 -1
  1247. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-3414584e4d85b11f.js +0 -1
  1248. package/app/.next-cli-build/static/chunks/app/login/page-596c1bc92adc4d71.js +0 -1
  1249. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-596c1bc92adc4d71.js +0 -1
  1250. package/app/.next-cli-build/static/chunks/app/page-596c1bc92adc4d71.js +0 -1
  1251. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-596c1bc92adc4d71.js +0 -1
  1252. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-596c1bc92adc4d71.js +0 -1
  1253. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-596c1bc92adc4d71.js +0 -1
  1254. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-596c1bc92adc4d71.js +0 -1
  1255. package/app/.next-cli-build/static/css/8f209feb703c674d.css +0 -1
  1256. package/app/.next-cli-build/static/dTnRQJQsV_UGBAsupqJ2u/_buildManifest.js +0 -1
  1257. /package/app/.next-cli-build/static/{dTnRQJQsV_UGBAsupqJ2u → LW9zpYBdABYCFKEJUiC4B}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6897],{5194:(e,t,s)=>{Promise.resolve().then(s.bind(s,94091))},94091:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var a=s(95155),r=s(12115),l=s(35497),n=s(77251);function i(){let[e,t]=(0,r.useState)(null),[s,i]=(0,r.useState)(!0),[o,c]=(0,r.useState)(""),[m,x]=(0,r.useState)(null),[p,h]=(0,r.useState)(null),[u,b]=(0,r.useState)(null),[y,g]=(0,r.useState)("overview"),[f,j]=(0,r.useState)({id:"",name:"",transport:"stdio",command:"npx",args:"-y @modelcontextprotocol/server-filesystem .",url:"",notes:""}),[v,w]=(0,r.useState)([]),[k,N]=(0,r.useState)(""),[C,S]=(0,r.useState)(""),[P,$]=(0,r.useState)(""),[O,T]=(0,r.useState)(!1),[E,M]=(0,r.useState)(""),[I,A]=(0,r.useState)(""),[z,L]=(0,r.useState)({}),[Z,U]=(0,r.useState)(null),[D,R]=(0,r.useState)(!1),[J,_]=(0,r.useState)(""),H=(0,r.useCallback)(async()=>{i(!0);try{let e=await fetch("/api/agent-library",{cache:"no-store"}),s=await e.json();if(!e.ok)throw Error(s.error||"Load failed");t(s)}catch(e){x({type:"error",text:e.message})}finally{i(!1)}},[]),K=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/agent-library/updates",{cache:"no-store"}),t=await e.json();if(!e.ok)return;let s={};for(let e of t.results||[])s[e.id]=e;L(s)}catch{}},[]);(0,r.useEffect)(()=>{H(),K(),fetch("/api/agent-library/catalog").then(e=>e.json()).then(e=>w(e.presets||[])).catch(()=>{})},[H,K]);let F=e?.settings||{},G=e?.agents||{};async function W(e){c("settings"),x(null);try{let t=await fetch("/api/agent-library",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();if(!t.ok)throw Error(s.error||"Save failed");x({type:"success",text:"Settings saved"}),await H()}catch(e){x({type:"error",text:e.message})}finally{c("")}}async function B(e){c(e),x(null),b(null);try{let t=await fetch("/api/agent-library/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,confirm:"clean"===e||void 0})}),s=await t.json();if(!t.ok)throw Error(s.error||s.message||"Sync failed");b(s),x({type:s.conflictCount?"warn":"success",text:"dry-run"===e?`Dry-run: ${s.summary?.skillsSynced??0} skill ops, ${s.summary?.mcpOk??0} MCP ok, ${s.conflictCount||0} conflicts`:"clean"===e?"Removed Switchboard-managed projections only":`Applied: ${s.summary?.skillsSynced??0} skills synced, ${s.conflictCount||0} conflicts protected`}),await H()}catch(e){x({type:"error",text:e.message})}finally{c("")}}async function Y(){c("doctor");try{let e=await fetch("/api/agent-library/doctor",{cache:"no-store"}),t=await e.json();if(!e.ok)throw Error(t.error||"Doctor failed");h(t),x({type:t.ok?"success":"warn",text:t.ok?"Doctor: no blocking errors":`Doctor: ${t.issues?.filter(e=>"error"===e.severity).length||0} errors`})}catch(e){x({type:"error",text:e.message})}finally{c("")}}async function q(e){e?.preventDefault?.(),c("mcp");try{let e=f.args?f.args.split(/\s+/).filter(Boolean):[],t=await fetch("/api/agent-library/mcp",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:f.id,name:f.name||f.id,transport:f.transport,command:"stdio"===f.transport?f.command:void 0,args:"stdio"===f.transport?e:void 0,url:"stdio"!==f.transport?f.url:void 0,notes:f.notes})}),s=await t.json();if(!t.ok)throw Error(s.error||"MCP save failed");s.warnings?.length?x({type:"warn",text:s.warnings.join(" \xb7 ")}):x({type:"success",text:`MCP ${s.server?.id} saved (Apply to project)`}),j({id:"",name:"",transport:"stdio",command:"npx",args:"",url:"",notes:""}),await H()}catch(e){x({type:"error",text:e.message})}finally{c("")}}async function Q(e){if(await (0,n.l)({message:`Remove MCP ${e} from library? (targets updated on next Apply)`,confirmText:"Continue"})){c("mcp-del");try{let t=await fetch(`/api/agent-library/mcp?id=${encodeURIComponent(e)}`,{method:"DELETE"}),s=await t.json();if(!t.ok)throw Error(s.error);x({type:"success",text:"MCP removed from library"}),await H()}catch(e){x({type:"error",text:e.message})}finally{c("")}}}async function V(e){if(await (0,n.l)({message:`Remove skill ${e} from library?`,confirmText:"Continue"})){c("skill-del");try{let t=await fetch(`/api/agent-library/skills?id=${encodeURIComponent(e)}`,{method:"DELETE"}),s=await t.json();if(!t.ok)throw Error(s.error);x({type:"success",text:"Skill removed from library"}),await H(),await K()}catch(e){x({type:"error",text:e.message})}finally{c("")}}}async function X(){c("skill-add");try{let e=await fetch("/api/agent-library/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:E,markdown:I,source:"manual"})}),t=await e.json();if(!e.ok)throw Error(t.error);x({type:"success",text:`Skill ${t.id} installed in library`}),M(""),A(""),await H()}catch(e){x({type:"error",text:e.message})}finally{c("")}}async function ee(e){c("upd-preview"),R(!1);try{let t=await fetch("/api/agent-library/updates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"preview",skillId:e})}),s=await t.json();if(!t.ok||!s.ok)throw Error(s.message||s.error||"Preview failed");U({id:e,markdown:s.markdown,contentHash:s.contentHash})}catch(e){x({type:"error",text:e.message})}finally{c("")}}async function et(){if(Z){c("upd-apply");try{let e=await fetch("/api/agent-library/updates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"update",skillId:Z.id,confirmed:D,expectedHash:Z.contentHash})}),t=await e.json();if(!e.ok||!t.ok)throw Error(t.message||t.error||"Update failed");x({type:"success",text:t.warning||`Updated ${t.id}`}),U(null),R(!1),await H(),await K()}catch(e){x({type:"error",text:e.message})}finally{c("")}}}async function es(e){c("preview");try{let t=await fetch("/api/agent-library/catalog",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"preview",url:e})}),s=await t.json();if(!t.ok||!s.ok)throw Error(s.error||"Preview failed");$(s.preview||""),x({type:"success",text:`Preview loaded (${s.bytes} bytes)`})}catch(e){x({type:"error",text:e.message})}finally{c("")}}async function ea(){c("catalog");try{let e=await fetch("/api/agent-library/catalog",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"install",skillId:C,url:k,confirmed:O})}),t=await e.json();if(!e.ok)throw Error(t.message||t.error||"Install failed");x({type:"success",text:t.warning||`Installed ${t.id}`}),T(!1),await H(),await K()}catch(e){x({type:"error",text:e.message})}finally{c("")}}async function er(){c("export");try{let e=await fetch("/api/agent-library/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({destPath:J||void 0})}),t=await e.json();if(!e.ok)throw Error(t.message||t.error||"Export failed");x({type:"success",text:`Exported AgentSync layout to ${t.path}`})}catch(e){x({type:"error",text:e.message})}finally{c("")}}return(0,a.jsxs)("div",{className:"max-w-5xl mx-auto space-y-5 pb-12",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("h1",{className:"text-[17px] font-semibold text-text-main",children:"Agent library"}),(0,a.jsxs)("p",{className:"text-xs text-text-muted leading-relaxed max-w-2xl",children:["One Switchboard-owned library of ",(0,a.jsx)("strong",{className:"text-text-main",children:"skills"})," and"," ",(0,a.jsx)("strong",{className:"text-text-main",children:"MCP servers"}),", projected into Claude Code, Codex, OpenCode, Gemini CLI, and Cursor. Managed entries use the"," ",(0,a.jsx)("code",{className:"text-[11px] font-mono",children:"sb-"})," namespace so we never overwrite your existing skills or MCP keys."]})]}),m&&(0,a.jsx)("div",{className:`text-xs px-3 py-2 rounded-lg border ${"success"===m.type?"bg-green-500/10 border-green-500/30 text-green-600 dark:text-green-400":"warn"===m.type?"bg-amber-500/10 border-amber-500/30 text-amber-700 dark:text-amber-400":"bg-red-500/10 border-red-500/30 text-red-500"}`,children:m.text}),(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,a.jsxs)("label",{className:"flex items-center gap-2 text-sm text-text-main cursor-pointer",children:[(0,a.jsx)("input",{type:"checkbox",className:"accent-[var(--color-primary)]","aria-label":"Sync enabled",checked:!1!==F.enabled,disabled:!!o,onChange:e=>W({enabled:e.target.checked})}),"Sync enabled"]}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,a.jsx)(l.$n,{size:"sm",variant:"secondary",disabled:!!o||!1===F.enabled,loading:"dry-run"===o,onClick:()=>B("dry-run"),children:"Dry-run"}),(0,a.jsx)(l.$n,{size:"sm",disabled:!!o||!1===F.enabled,loading:"apply"===o,onClick:()=>B("apply"),children:"Apply sync"}),(0,a.jsx)(l.$n,{size:"sm",variant:"outline",disabled:!!o,loading:"doctor"===o,onClick:Y,children:"Doctor"})]})]}),(0,a.jsxs)("p",{className:"text-[11px] text-text-subtle mt-2 font-mono break-all",children:["Library: ",e?.libraryRoot||"…",F.linkMode?` \xb7 mode=${F.linkMode}`:"",F.scope?` \xb7 scope=${F.scope}`:""]})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1 border-b border-border pb-0",children:[{id:"overview",label:"Overview"},{id:"skills",label:"Skills"},{id:"mcp",label:"MCP"},{id:"catalog",label:"Catalog"},{id:"advanced",label:"Advanced"}].map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>g(e.id),className:`px-3 py-2 text-xs font-medium rounded-t-md transition-colors ${y===e.id?"bg-surface border border-border border-b-surface text-primary -mb-px":"text-text-muted hover:text-text-main"}`,children:e.label},e.id))}),s&&(0,a.jsxs)("p",{className:"text-sm text-text-muted flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[18px]",children:"progress_activity"}),"Loading…"]}),!s&&"overview"===y&&(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main mb-2",children:"How it works"}),(0,a.jsxs)("ol",{className:"text-xs text-text-muted space-y-1.5 list-decimal pl-4 leading-relaxed",children:[(0,a.jsxs)("li",{children:["Skills and MCP servers live only in Switchboard's library (",(0,a.jsx)("code",{className:"font-mono",children:"~/.switchboard/agent-library"}),")."]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{className:"text-text-main",children:"Apply sync"})," projects them into each enabled agent under namespaced paths/keys (",(0,a.jsx)("code",{className:"font-mono",children:"sb-*"}),")."]}),(0,a.jsxs)("li",{children:["If a path already exists and is ",(0,a.jsx)("em",{children:"not"})," marked managed, we"," ",(0,a.jsx)("strong",{className:"text-text-main",children:"skip"})," it (never overwrite)."]}),(0,a.jsx)("li",{children:"Turn individual agents or skills/MCP off with the toggles below."})]})]}),(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main mb-3",children:"Targets"}),(0,a.jsx)("div",{className:"space-y-2",children:Object.values(G).map(e=>{let t=F.targets?.[e.id]||{skills:!0,mcp:!0};return(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 py-2 border-b border-border-subtle last:border-0",children:[(0,a.jsx)("span",{className:"text-sm text-text-main",children:e.label}),(0,a.jsxs)("div",{className:"flex gap-4 text-xs text-text-muted",children:[(0,a.jsxs)("label",{className:"flex items-center gap-1.5 cursor-pointer",children:[(0,a.jsx)("input",{type:"checkbox","aria-label":`${e.label} skills projection`,checked:!1!==t.skills,disabled:!e.supportsSkills||!!o,onChange:s=>W({targets:{...F.targets,[e.id]:{...t,skills:s.target.checked}}})}),"Skills"]}),(0,a.jsxs)("label",{className:"flex items-center gap-1.5 cursor-pointer",children:[(0,a.jsx)("input",{type:"checkbox","aria-label":`${e.label} MCP projection`,checked:!1!==t.mcp,disabled:!e.supportsMcp||!!o,onChange:s=>W({targets:{...F.targets,[e.id]:{...t,mcp:s.target.checked}}})}),"MCP"]})]})]},e.id)})})]}),(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main mb-3",children:"Safety & link mode"}),(0,a.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 text-xs",children:[(0,a.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Link mode"}),(0,a.jsxs)("select",{className:"bg-surface border border-border rounded-md px-2 py-1.5 text-text-main",value:F.linkMode||"copy",disabled:!!o,onChange:e=>W({linkMode:e.target.value}),children:[(0,a.jsx)("option",{value:"copy",children:"Copy (safe default on Windows)"}),(0,a.jsx)("option",{value:"symlink",children:"Symlink (instant updates; may need privileges on Windows)"})]})]}),(0,a.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Scope"}),(0,a.jsxs)("select",{className:"bg-surface border border-border rounded-md px-2 py-1.5 text-text-main",value:F.scope||"global",disabled:!!o,onChange:e=>W({scope:e.target.value,projectPath:"project"===e.target.value?F.projectPath||"":null}),children:[(0,a.jsx)("option",{value:"global",children:"Global (user home agents)"}),(0,a.jsx)("option",{value:"project",children:"Project (paths under project folder)"})]})]}),"project"===F.scope&&(0,a.jsxs)("label",{className:"flex flex-col gap-1 sm:col-span-2",children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Project path (absolute)"}),(0,a.jsx)("input",{className:"bg-surface border border-border rounded-md px-2 py-1.5 font-mono text-text-main",value:F.projectPath||"",placeholder:"/Users/you/my-app",disabled:!!o,onChange:e=>W({projectPath:e.target.value})})]}),(0,a.jsxs)("label",{className:"flex items-start gap-2 sm:col-span-2 cursor-pointer",children:[(0,a.jsx)("input",{type:"checkbox",className:"mt-0.5","aria-label":"Never overwrite user-owned files",checked:!1!==F.neverOverwriteUser,disabled:!!o,onChange:async e=>{e.target.checked?W({neverOverwriteUser:!0}):await (0,n.l)({message:"Allow overwriting paths that are NOT Switchboard-managed? This can replace your personal skills/MCP. Continue?",confirmText:"Continue"})&&W({neverOverwriteUser:!1,confirmAllowOverwrite:!0})}}),(0,a.jsxs)("span",{className:"text-text-muted leading-relaxed",children:[(0,a.jsx)("strong",{className:"text-text-main",children:"Never overwrite user-owned files"})," ","(recommended). Only touch ",(0,a.jsx)("code",{className:"font-mono",children:"sb-*"})," managed entries."]})]}),(0,a.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,a.jsx)("input",{type:"checkbox","aria-label":"Auto-include Switchboard product skills",checked:!1!==F.includeProductSkills,disabled:!!o,onChange:e=>W({includeProductSkills:e.target.checked})}),(0,a.jsx)("span",{className:"text-text-muted",children:"Auto-include Switchboard product skills (entry + chat)"})]})]})]}),(0,a.jsxs)("div",{className:"grid sm:grid-cols-3 gap-3",children:[(0,a.jsx)(d,{label:"Skills in library",value:String(e?.skills?.length??0)}),(0,a.jsx)(d,{label:"MCP servers",value:String(e?.mcpServers?.length??0)}),(0,a.jsx)(d,{label:"Last sync",value:e?.state?.lastSync?.at?new Date(e.state.lastSync.at).toLocaleString():"—"})]}),u&&(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main mb-2",children:"Last sync detail"}),(0,a.jsx)("pre",{className:"text-[11px] font-mono text-text-muted overflow-x-auto max-h-48 bg-surface-2 p-2 rounded",children:JSON.stringify(u.summary||u,null,2)}),u.skills?.filter(e=>"conflict"===e.action).length>0&&(0,a.jsxs)("div",{className:"mt-2 text-xs text-amber-600 dark:text-amber-400",children:["Conflicts (protected):",(0,a.jsx)("ul",{className:"list-disc pl-4 mt-1",children:u.skills.filter(e=>"conflict"===e.action).map((e,t)=>(0,a.jsxs)("li",{children:[e.agent,"/",e.skillId,": ",e.message||e.reason]},t))})]})]}),p&&(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main mb-2",children:"Doctor"}),p.issues?.length===0?(0,a.jsx)("p",{className:"text-xs text-green-600",children:"No issues"}):(0,a.jsx)("ul",{className:"text-xs space-y-1",children:p.issues?.map((e,t)=>(0,a.jsxs)("li",{className:"error"===e.severity?"text-red-500":"text-amber-600 dark:text-amber-400",children:["[",e.severity,"] ",e.message]},t))})]})]}),!s&&"skills"===y&&(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"Library skills"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(l.$n,{size:"sm",variant:"ghost",disabled:!!o,onClick:async()=>{c("upd-check");try{await K(),x({type:"success",text:"Update check complete"})}finally{c("")}},children:"Check updates"}),(0,a.jsx)(l.$n,{size:"sm",variant:"secondary",disabled:!!o,onClick:async()=>{c("ensure");try{await fetch("/api/agent-library/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"ensure_product"})}),await H(),x({type:"success",text:"Product skills ensured"})}finally{c("")}},children:"Refresh product skills"})]})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(e?.skills||[]).map(e=>(0,a.jsxs)("div",{className:"flex items-start justify-between gap-2 p-3 rounded-lg border border-border-subtle bg-surface-2/50",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-text-main",children:e.title||e.id}),(0,a.jsx)(l.Ex,{size:"sm",variant:"default",children:(0,a.jsxs)("code",{className:"text-[10px]",children:["sb-",e.id]})}),z[e.id]?.status==="update"&&(0,a.jsx)(l.Ex,{size:"sm",variant:"warning",children:"update available"}),z[e.id]?.status==="error"&&(0,a.jsx)("span",{className:"text-[10px] text-text-subtle",title:z[e.id]?.message||"check failed",children:"check failed"})]}),(0,a.jsx)("p",{className:"text-[11px] text-text-muted mt-0.5 line-clamp-2",children:e.description||"—"})]}),(0,a.jsxs)("div",{className:"flex gap-1 shrink-0",children:[z[e.id]?.status==="update"&&(0,a.jsx)(l.$n,{size:"sm",variant:"secondary",disabled:!!o,loading:"upd-preview"===o&&Z?.id!==e.id,onClick:()=>ee(e.id),children:"Update"}),(0,a.jsx)(l.$n,{size:"sm",variant:"ghost",disabled:!!o,onClick:()=>V(e.id),children:"Remove"})]})]},e.id)),!e?.skills?.length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No skills yet. Enable product skills or add manually."})]})]}),Z&&(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsxs)("h2",{className:"text-sm font-semibold text-text-main mb-2",children:["Update preview — ",(0,a.jsx)("code",{className:"text-[12px]",children:Z.id})]}),(0,a.jsx)("p",{className:"text-[11px] text-text-subtle mb-2",children:"Full incoming SKILL.md shown below. Exactly these bytes are installed on confirm — if upstream changes in between, the update is refused and you preview again."}),(0,a.jsx)("pre",{className:"text-[10px] font-mono max-h-64 overflow-auto bg-surface-2 p-2 rounded border border-border-subtle whitespace-pre-wrap",children:Z.markdown}),(0,a.jsxs)("label",{className:"flex items-start gap-2 text-xs text-text-muted cursor-pointer mt-2",children:[(0,a.jsx)("input",{type:"checkbox","aria-label":"I reviewed this skill update and understand it may instruct agents to run tools or shell commands",checked:D,onChange:e=>R(e.target.checked)}),"I reviewed this skill and understand it may instruct agents to run tools/shell commands."]}),(0,a.jsxs)("div",{className:"flex gap-2 mt-2",children:[(0,a.jsx)(l.$n,{size:"sm",disabled:!D||!!o,loading:"upd-apply"===o,onClick:et,children:"Apply update"}),(0,a.jsx)(l.$n,{size:"sm",variant:"ghost",disabled:!!o,onClick:()=>{U(null),R(!1)},children:"Cancel"})]})]}),(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main mb-2",children:"Add skill (paste SKILL.md)"}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("input",{className:"w-full bg-surface border border-border rounded-md px-2 py-1.5 text-xs font-mono",placeholder:"skill-id (e.g. my-review)",value:E,onChange:e=>M(e.target.value)}),(0,a.jsx)("textarea",{className:"w-full h-40 bg-surface border border-border rounded-md px-2 py-1.5 text-xs font-mono",placeholder:"---\nname: my-skill\ndescription: ...\n---\n\n# ...",value:I,onChange:e=>A(e.target.value)}),(0,a.jsx)(l.$n,{size:"sm",disabled:!E||!I||!!o,loading:"skill-add"===o,onClick:X,children:"Add to library"})]})]})]}),!s&&"mcp"===y&&(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main mb-1",children:"MCP servers in library"}),(0,a.jsxs)("p",{className:"text-[11px] text-text-subtle mb-3",children:["Prefer ",(0,a.jsxs)("code",{className:"font-mono",children:["$","{GITHUB_TOKEN}"]})," style env values — do not paste raw API keys if you can avoid it. Keys are projected as"," ",(0,a.jsx)("code",{className:"font-mono",children:"sb-*"})," only."]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(e?.mcpServers||[]).map(e=>(0,a.jsxs)("div",{className:"flex items-start justify-between gap-2 p-3 rounded-lg border border-border-subtle",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-sm text-text-main font-medium",children:e.name}),(0,a.jsx)("code",{className:"text-[10px] text-text-subtle",children:e.id}),(0,a.jsxs)("div",{className:"text-[11px] text-text-muted mt-1",children:[e.transport||"stdio"," \xb7"," ",e.command?`${e.command} ${(e.args||[]).join(" ")}`:e.url]})]}),(0,a.jsx)(l.$n,{size:"sm",variant:"ghost",onClick:()=>Q(e.id),children:"Remove"})]},e.id)),!e?.mcpServers?.length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No MCP servers in library yet."})]})]}),(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main mb-3",children:"Add MCP server"}),(0,a.jsxs)("form",{className:"grid gap-2 sm:grid-cols-2",onSubmit:q,children:[(0,a.jsx)("input",{required:!0,className:"bg-surface border border-border rounded-md px-2 py-1.5 text-xs font-mono",placeholder:"id (e.g. filesystem)",value:f.id,onChange:e=>j({...f,id:e.target.value})}),(0,a.jsx)("input",{className:"bg-surface border border-border rounded-md px-2 py-1.5 text-xs",placeholder:"Display name",value:f.name,onChange:e=>j({...f,name:e.target.value})}),(0,a.jsxs)("select",{className:"bg-surface border border-border rounded-md px-2 py-1.5 text-xs",value:f.transport,onChange:e=>j({...f,transport:e.target.value}),children:[(0,a.jsx)("option",{value:"stdio",children:"stdio (command)"}),(0,a.jsx)("option",{value:"http",children:"http (url)"}),(0,a.jsx)("option",{value:"sse",children:"sse (url)"})]}),"stdio"===f.transport?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("input",{className:"bg-surface border border-border rounded-md px-2 py-1.5 text-xs font-mono",placeholder:"command",value:f.command,onChange:e=>j({...f,command:e.target.value})}),(0,a.jsx)("input",{className:"sm:col-span-2 bg-surface border border-border rounded-md px-2 py-1.5 text-xs font-mono",placeholder:"args (space-separated)",value:f.args,onChange:e=>j({...f,args:e.target.value})})]}):(0,a.jsx)("input",{className:"sm:col-span-1 bg-surface border border-border rounded-md px-2 py-1.5 text-xs font-mono",placeholder:"https://...",value:f.url,onChange:e=>j({...f,url:e.target.value})}),(0,a.jsx)("div",{className:"sm:col-span-2",children:(0,a.jsx)(l.$n,{size:"sm",type:"submit",loading:"mcp"===o,disabled:!!o,children:"Save to library"})})]})]})]}),!s&&"catalog"===y&&(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main mb-1",children:"Trusted presets"}),(0,a.jsx)("p",{className:"text-[11px] text-text-subtle mb-3",children:"Fetches SKILL.md only — never runs install scripts. You must confirm and then Apply sync."}),(0,a.jsx)("div",{className:"space-y-2",children:v.map(e=>(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 p-2 rounded border border-border-subtle",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-sm text-text-main",children:e.name}),(0,a.jsx)("div",{className:"text-[11px] text-text-muted",children:e.description})]}),(0,a.jsxs)("div",{className:"flex gap-1",children:[(0,a.jsx)(l.$n,{size:"sm",variant:"ghost",onClick:()=>{N(e.rawUrl),S(e.skillId),es(e.rawUrl)},children:"Preview"}),(0,a.jsx)(l.$n,{size:"sm",variant:"secondary",onClick:()=>{N(e.rawUrl),S(e.skillId),T(!1)},children:"Select"})]})]},e.id))})]}),(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main mb-2",children:"Install from URL"}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("input",{className:"w-full bg-surface border border-border rounded-md px-2 py-1.5 text-xs font-mono",placeholder:"skill-id",value:C,onChange:e=>S(e.target.value)}),(0,a.jsx)("input",{className:"w-full bg-surface border border-border rounded-md px-2 py-1.5 text-xs font-mono",placeholder:"https://.../SKILL.md",value:k,onChange:e=>N(e.target.value)}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:(0,a.jsx)(l.$n,{size:"sm",variant:"secondary",disabled:!k||!!o,onClick:()=>es(k),children:"Preview"})}),P&&(0,a.jsx)("pre",{className:"text-[10px] font-mono max-h-48 overflow-auto bg-surface-2 p-2 rounded border border-border-subtle whitespace-pre-wrap",children:P}),(0,a.jsxs)("label",{className:"flex items-start gap-2 text-xs text-text-muted cursor-pointer",children:[(0,a.jsx)("input",{type:"checkbox","aria-label":"I reviewed this catalog skill and understand it may instruct agents to run tools or shell commands",checked:O,onChange:e=>T(e.target.checked)}),"I reviewed this skill and understand it may instruct agents to run tools/shell commands."]}),(0,a.jsx)(l.$n,{size:"sm",disabled:!k||!C||!O||!!o,loading:"catalog"===o,onClick:ea,children:"Install into library"})]})]})]}),!s&&"advanced"===y&&(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main mb-2",children:"Clean managed projections"}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mb-3",children:["Removes only ",(0,a.jsx)("code",{className:"font-mono",children:"sb-*"})," skills and MCP keys written by Switchboard. Your other skills/MCP stay untouched."]}),(0,a.jsx)(l.$n,{size:"sm",variant:"outline",disabled:!!o,loading:"clean"===o,onClick:async()=>{await (0,n.l)({message:"Remove all Switchboard-managed skill/MCP projections from targets?",confirmText:"Continue"})&&B("clean")},children:"Clean managed only"})]}),(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main mb-2",children:"Export AgentSync layout"}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Writes a coexistence-friendly ",(0,a.jsx)("code",{className:"font-mono",children:".agents/"})," tree (skills + agentsync.toml). Does not run agentsync. Paths must be under your home or project directory."]}),(0,a.jsx)("input",{className:"w-full bg-surface border border-border rounded-md px-2 py-1.5 text-xs font-mono mb-2",placeholder:"Optional dest (default ~/switchboard-agents-export/.agents)",value:J,onChange:e=>_(e.target.value)}),(0,a.jsx)(l.$n,{size:"sm",variant:"secondary",disabled:!!o,loading:"export"===o,onClick:er,children:"Export"})]}),(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main mb-2",children:"Coexistence"}),(0,a.jsxs)("ul",{className:"text-xs text-text-muted space-y-1 list-disc pl-4",children:[(0,a.jsxs)("li",{children:["Switchboard only owns ",(0,a.jsx)("code",{className:"font-mono",children:"sb-*"})," skill directories and MCP keys."]}),(0,a.jsx)("li",{children:"AgentSync / skillbook may manage other paths — avoid pointing both at the same un-namespaced skill."}),(0,a.jsx)("li",{children:"Product skills for HTTP agents remain under Dashboard → Skills (separate)."})]})]})]})]})}function d({label:e,value:t}){return(0,a.jsxs)(l.Zp,{padding:"sm",children:[(0,a.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-text-subtle font-semibold",children:e}),(0,a.jsx)("div",{className:"text-sm text-text-main mt-1 font-medium truncate",title:t,children:t})]})}}},e=>{e.O(0,[2574,3862,782,8500,594,1321,4707,5497,8441,3794,7358],()=>e(e.s=5194)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4465],{55774:(e,t,r)=>{Promise.resolve().then(r.bind(r,88512))},88512:(e,t,r)=>{"use strict";r.d(t,{default:()=>b});var a=r(95155),s=r(12115),i=r(35497),l=r(28777),n=r(88105),o=r(5772);let d="basic-chat.sessions",c="basic-chat.activeSessionId",m="basic-chat.activeProviderId",u="basic-chat.draft";function p(){return globalThis.crypto?.randomUUID?globalThis.crypto.randomUUID():`chat_${Date.now()}_${Math.random().toString(16).slice(2)}`}function h(e){if("string"==typeof e)return e;if(null==e)return"";if(Array.isArray(e))return e.map(h).filter(Boolean).join(" ");if("object"==typeof e){if("string"==typeof e.message)return e.message;if("string"==typeof e.error)return e.error;try{return JSON.stringify(e)}catch{}}return String(e)}function x(e=""){let t=h(e).replace(/\s+/g," ").trim();return t?t.length>52?`${t.slice(0,52).trimEnd()}…`:t:"New chat"}async function f(e){return await new Promise((t,r)=>{let a=new FileReader;a.onload=()=>t(String(a.result||"")),a.onerror=()=>r(a.error||Error("Failed to read file")),a.readAsDataURL(e)})}function g(e){return e?.name||function(e=""){return String(e).replace(/[-_]/g," ").replace(/\b\w/g,e=>e.toUpperCase()).trim()||"Unknown"}(e?.provider||e?.id||"provider")}function w(e){return h(e?.providerSpecificData?.prefix)||h(e?.provider)||h(e?.id)}function b(){let[e,t]=(0,s.useState)([]),[r,b]=(0,s.useState)(!0),[v,N]=(0,s.useState)(""),[y,j]=(0,s.useState)(()=>{try{let e=function(e,t){try{return JSON.parse(e)}catch{return t}}(globalThis.localStorage.getItem(d),[]);return Array.isArray(e)?e.map(e=>({...e,messages:Array.isArray(e.messages)?e.messages:[]})):[]}catch{return[]}}),[S,I]=(0,s.useState)(()=>globalThis.localStorage.getItem(c)||""),[A,k]=(0,s.useState)(()=>globalThis.localStorage.getItem(m)||""),[D,O]=(0,s.useState)(""),[C,$]=(0,s.useState)(()=>globalThis.localStorage.getItem(u)||""),[_,M]=(0,s.useState)([]),[E,T]=(0,s.useState)(!1),[U,R]=(0,s.useState)(""),[z,P]=(0,s.useState)(""),[q,J]=(0,s.useState)(!1),[B,F]=(0,s.useState)(!1),[K,L]=(0,s.useState)(!1),W=(0,s.useRef)(null),G=(0,s.useRef)(null),H=(0,s.useRef)(!1),Y=(0,s.useRef)(null),Q=(0,s.useRef)(null);(0,s.useEffect)(()=>{J(!0)},[]),(0,s.useEffect)(()=>{let e=!1;return async function(){b(!0),N("");try{let r=await fetch("/api/providers",{cache:"no-store"}),a=await r.json().catch(()=>({})),s=Array.isArray(a.connections)?a.connections.filter(e=>e?.isActive!==!1):[];if(0===s.length){e||(t([]),N("No providers connected yet."));return}let i=new Map;for(let e of s){let t=e.provider||e.id,r=g(e),a=(0,n.mq)(t)?"openai-compatible":(0,n.gb)(t)?"anthropic-compatible":t;i.has(t)||i.set(t,{providerId:t,providerName:r,providerType:a,connections:[],models:[]});let s=i.get(t);s.providerName=s.providerName||r,s.providerType=s.providerType||a,s.connections.push(e);let o=(0,l.KC)(t).map(t=>(function(e,t){if(!e?.id)return null;let r=`${w(t)}/${e.id}`;return{id:r,requestModel:r,name:e.name||e.id,providerId:t.provider,providerName:g(t),source:"static"}})(t,e)).filter(Boolean);s.models.push(...o)}for(let e of(await Promise.all(s.map(async e=>{try{let t=await fetch(`/api/providers/${e.id}/models`,{cache:"no-store"}),r=await t.json().catch(()=>({}));if(!t.ok)return{connection:e,models:[]};let a=(Array.isArray(r?.models)?r.models:Array.isArray(r?.data)?r.data:Array.isArray(r?.results)?r.results:Array.isArray(r)?r:[]).map(t=>(function(e,t){let r="string"==typeof e?e:e?.id||e?.name||e?.model||"";if(!r)return null;let a="string"==typeof e?e:e?.name||e?.displayName||r,s=r;if((0,n.mq)(t.provider)||(0,n.gb)(t.provider)){let e=w(t);e&&!r.startsWith(`${e}/`)&&(s=`${e}/${r}`)}return{id:s,requestModel:s,name:a,providerId:t.provider,providerName:g(t),source:"live"}})(t,e)).filter(Boolean);return{connection:e,models:a}}catch{return{connection:e,models:[]}}})))){let t=e.connection.provider||e.connection.id,r=i.get(t);r&&r.models.push(...e.models)}let o=Array.from(i.values()).map(e=>({...e,models:(function(e){let t=new Map;for(let r of e)r?.id&&(t.has(r.id)||t.set(r.id,r));return Array.from(t.values())})(e.models).sort((e,t)=>e.name.localeCompare(t.name))})).filter(e=>e.models.length>0).sort((e,t)=>e.providerName.localeCompare(t.providerName));e||(t(o),0===o.length&&N("Providers connected but no models available."))}catch(r){e||(N(h(r?.message)||"Failed to load providers/models."),t([]))}finally{e||b(!1)}}(),()=>{e=!0}},[]),(0,s.useEffect)(()=>{let e=e=>{Y.current&&!Y.current.contains(e.target)&&F(!1),Q.current&&!Q.current.contains(e.target)&&L(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let V=(0,s.useMemo)(()=>{let t=new Map;for(let r of e)for(let e of r.models)t.set(e.id,{...e,providerId:r.providerId,providerName:r.providerName});return t},[e]),X=(0,s.useMemo)(()=>e.find(e=>e.providerId===A)||e[0]||null,[e,A]),Z=(0,s.useMemo)(()=>{if(D&&V.has(D))return V.get(D);if(S){let e=y.find(e=>e.id===S);if(e?.modelId&&V.has(e.modelId))return V.get(e.modelId)}return X?.models?.[0]||null},[D,V,X,y,S]),ee=(0,s.useMemo)(()=>y.find(e=>e.id===S)||null,[y,S]),et=ee?.messages||[],er=(0,s.useMemo)(()=>[...y].sort((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()),[y]),ea=!E&&!!Z&&(C.trim().length>0||_.length>0);(0,s.useEffect)(()=>{if(q)try{globalThis.localStorage.setItem(d,JSON.stringify(y)),globalThis.localStorage.setItem(c,S),globalThis.localStorage.setItem(m,A),globalThis.localStorage.setItem(u,C)}catch{}},[q,y,S,A,C]),(0,s.useEffect)(()=>{if(!q||r||H.current||0===e.length)return;let t=e.find(e=>e.providerId===A)||e[0],a=D&&V.has(D)?V.get(D):t.models[0];if(y.length>0){let e=y.find(e=>e.id===S)||y[0],r=e?.modelId&&V.has(e.modelId)?V.get(e.modelId):a;H.current=!0,I(e.id),k(r?.providerId||t.providerId),O(r?.id||a.id);return}let s={id:p(),title:"New chat",providerId:t.providerId,providerName:t.providerName,modelId:a.id,modelName:a.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]};H.current=!0,j([s]),I(s.id),k(t.providerId),O(a.id)},[q,r,e,V,y,S,A,D]);let es=(e,t)=>{j(r=>r.map(r=>r.id===e?t({...r,messages:Array.isArray(r.messages)?r.messages.map(e=>({...e})):[]}):r))},ei=e=>e?{id:p(),title:"New chat",providerId:e.providerId,providerName:e.providerName,modelId:e.id,modelName:e.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]}:null,el=async e=>{let t=Array.from(e.target.files||[]);if(0===t.length)return;let r=t.filter(e=>e.type.startsWith("image/"));if(0===r.length){e.target.value="";return}let a=await Promise.all(r.map(async e=>({id:p(),name:e.name,type:e.type,size:e.size,dataUrl:await f(e)})));M(e=>[...e,...a]),e.target.value=""},en=async()=>{let e=Z||X?.models?.[0]||null;if(!e)return;let t=C.trim();if(!t&&0===_.length)return;let r=S,a=y.find(e=>e.id===r);if(!a){if(!(a=ei(e)))return;r=a.id,j(e=>[a,...e]),I(r)}let s={id:p(),role:"user",content:t,attachments:_.map(e=>({id:e.id,name:e.name,type:e.type,dataUrl:e.dataUrl})),createdAt:new Date().toISOString()},i=p(),l={id:i,role:"assistant",content:"",createdAt:new Date().toISOString(),status:"streaming"},n=[...a.messages||[],s,l];j(a=>a.map(a=>a.id===r?{...a,providerId:e.providerId,providerName:e.providerName,modelId:e.id,modelName:e.name,messages:n,updatedAt:new Date().toISOString(),title:"New chat"===a.title?x(t):a.title}:a)),$(""),M([]),T(!0),R(i),P(""),G.current?.abort(),G.current=new AbortController;let o=n.filter(e=>"assistant"!==e.role||e.id!==i).map(e=>({role:e.role,content:"user"===e.role?function(e){let t=h(e.content).trim(),r=Array.isArray(e.attachments)?e.attachments:[];if(0===r.length)return t;let a=[];for(let e of(t&&a.push({type:"text",text:t}),r))e?.dataUrl&&a.push({type:"image_url",image_url:{url:e.dataUrl}});return a.length>0?a:t}(e):e.content}));try{var d;let a,s=await fetch("/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify({model:e.requestModel||e.id,messages:o,stream:!0}),signal:G.current.signal});if(!s.ok){let e=await s.json().catch(()=>({}));throw Error(h(e.error||e.message||`Request failed (${s.status})`))}let l=s.body?.getReader();if(!l){let e=await s.json().catch(()=>({})),t=h(e?.choices?.[0]?.message?.content||e?.output_text||e?.error||e?.message||"");es(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:t,status:"done"}:e),updatedAt:new Date().toISOString()}));return}let n=new TextDecoder,c="",m="";for(;;){let{value:e,done:t}=await l.read();if(t)break;let a=(c+=n.decode(e,{stream:!0})).split(/\r?\n/);for(let e of(c=a.pop()||"",a)){let t=e.trim();if(!t.startsWith("data:"))continue;let a=t.slice(5).trim();if(a&&"[DONE]"!==a)try{let e=JSON.parse(a),t=function(e){if(!e||"object"!=typeof e)return"";let t=e.choices?.[0];return[(t?.delta||{}).content,t?.message?.content,e.output_text,e.text].map(h).filter(Boolean)[0]||""}(e);if(!t)continue;m+=t,P(m),es(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:m,status:"streaming"}:e),updatedAt:new Date().toISOString()}))}catch{}}}es(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:m||e.content,status:"done"}:e),updatedAt:new Date().toISOString()})),d=r,a=x(t),es(d,e=>({...e,title:"New chat"===e.title?a:e.title,updatedAt:new Date().toISOString()}))}catch(e){if("AbortError"===e.name)es(r,e=>({...e,messages:e.messages.flatMap(e=>e.id!==i?[e]:h(e.content)?[{...e,status:"stopped"}]:[]),updatedAt:new Date().toISOString()}));else{let t=h(e?.message||e);es(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:e.content||`Error: ${t}`,status:"error"}:e),updatedAt:new Date().toISOString()})),N(t||"Failed to send message.")}}finally{T(!1),R(""),P(""),G.current=null}},eo=Z?`${Z.name}`:"Select model",ed=Z?Z.requestModel:"Choose from connected providers";return(0,a.jsx)("div",{className:"relative flex-1 flex flex-col h-full min-h-0 min-w-0 bg-[#212121] text-white overflow-hidden",children:(0,a.jsxs)("div",{className:"relative mx-auto flex flex-1 h-full min-h-0 w-full max-w-4xl flex-col",children:[(0,a.jsxs)("div",{className:"flex shrink-0 items-center justify-between gap-3 px-4 py-3 lg:px-6",children:[(0,a.jsxs)("div",{ref:Y,className:"relative",children:[(0,a.jsx)("button",{type:"button",onClick:()=>F(e=>!e),className:"flex items-center gap-3 rounded-2xl border border-white/10 bg-white/5 px-4 py-3 text-left transition hover:bg-white/8",children:(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-sm font-semibold text-white",children:eo}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-white/70",children:"expand_more"})]}),(0,a.jsx)("p",{className:"truncate text-xs text-white/55",children:ed})]})}),B?(0,a.jsxs)("div",{className:"absolute left-0 top-[calc(100%+10px)] z-30 w-[min(520px,calc(100vw-2rem))] overflow-hidden rounded-[20px] border border-white/10 bg-[#262626] shadow-2xl shadow-black/50",children:[(0,a.jsxs)("div",{className:"border-b border-white/10 px-4 py-3",children:[(0,a.jsx)("p",{className:"text-xs uppercase tracking-[0.22em] text-white/45",children:"Models"}),(0,a.jsx)("p",{className:"text-sm text-white/75",children:"Only from connected providers"})]}),(0,a.jsx)("div",{className:"max-h-[60vh] overflow-y-auto p-2 custom-scrollbar",children:e.map(e=>(0,a.jsxs)("div",{className:"mb-2 rounded-[16px] border border-white/10 bg-black/20 p-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-2 py-2",children:[(0,a.jsx)("p",{className:"text-sm font-semibold text-white",children:e.providerName}),(0,a.jsx)(i.Ex,{size:"sm",variant:"default",children:e.models.length})]}),(0,a.jsx)("div",{className:"grid gap-2 sm:grid-cols-2",children:e.models.map(e=>{let t=e.id===D;return(0,a.jsx)("button",{type:"button",onClick:()=>(e=>{let t=V.get(e);if(!t)return;let r=y.find(e=>e.id===S);if(r&&r.messages.length>0){let e=ei(t);if(!e)return;j(t=>[e,...t]),I(e.id)}else if(r)j(e=>e.map(e=>e.id===r.id?{...e,providerId:t.providerId,providerName:t.providerName,modelId:t.id,modelName:t.name}:e)),I(r.id);else{let e=ei(t);if(!e)return;j(t=>[e,...t]),I(e.id)}k(t.providerId),O(t.id),F(!1)})(e.id),className:`rounded-[14px] border px-3 py-3 text-left transition ${t?"border-blue-400/40 bg-blue-500/15":"border-white/10 bg-white/5 hover:bg-white/8"}`,children:(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium text-white",children:e.name}),(0,a.jsx)("p",{className:"truncate text-[11px] text-white/45",children:e.requestModel})]}),t?(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-blue-300",children:"check_circle"}):null]})},e.id)})})]},e.providerId))})]}):null]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(i.$n,{variant:"ghost",size:"sm",icon:"add",onClick:()=>{if(!Z)return;let e=ei(Z);e&&(j(t=>[e,...t]),I(e.id),k(e.providerId),O(e.modelId),$(""),M([]),R(""),P(""))},disabled:!Z,children:"New conversation"}),(0,a.jsx)("button",{type:"button",onClick:()=>L(e=>!e),className:"rounded-2xl border border-white/10 bg-white/5 px-4 py-3 text-sm text-white/80 transition hover:bg-white/8",children:"History"}),(0,a.jsx)(i.$n,{variant:"ghost",size:"sm",icon:"delete",onClick:()=>{if(!S)return;let e=y.filter(e=>e.id!==S),t=e[0]||null;j(e),t?(I(t.id),k(t.providerId),O(t.modelId)):(I(""),k(""),O(""))},disabled:!S||0===y.length,children:"Clear"})]})]}),K?(0,a.jsxs)("div",{ref:Q,className:"absolute right-4 top-[72px] z-20 w-[min(360px,calc(100vw-2rem))] rounded-[20px] border border-white/10 bg-[#262626] p-2 shadow-2xl shadow-black/50 lg:right-6",children:[(0,a.jsx)("div",{className:"px-3 py-2",children:(0,a.jsx)("p",{className:"text-xs uppercase tracking-[0.22em] text-white/45",children:"Recent chats"})}),(0,a.jsx)("div",{className:"max-h-[48vh] space-y-2 overflow-y-auto p-1 custom-scrollbar",children:0===er.length?(0,a.jsx)("div",{className:"rounded-[16px] border border-dashed border-white/10 bg-white/5 p-4 text-sm text-white/55",children:"No conversations yet."}):er.map(e=>{let t=e.id===S,r=[...e.messages||[]].reverse().find(e=>"user"===e.role)||e.messages?.[0];return(0,a.jsx)("button",{type:"button",onClick:()=>{var t;let r;return t=e.id,void((r=y.find(e=>e.id===t))&&(I(t),k(r.providerId||A),O(r.modelId||D),L(!1)))},className:`w-full rounded-[16px] border px-3 py-3 text-left transition ${t?"border-blue-400/40 bg-blue-500/15":"border-white/10 bg-white/5 hover:bg-white/8"}`,children:(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium text-white",children:e.title}),(0,a.jsx)("p",{className:"mt-1 truncate text-xs text-white/50",children:h(r?.content)||"Empty chat"})]}),(0,a.jsx)("span",{className:"text-[10px] text-white/40 shrink-0",children:function(e){if(!e)return"Now";let t=new Date(e).getTime();if(Number.isNaN(t))return"Now";let r=Math.max(1,Math.round((Date.now()-t)/6e4));if(r<60)return`${r}m`;let a=Math.round(r/60);return a<24?`${a}h`:`${Math.round(a/24)}d`}(e.updatedAt)})]})},e.id)})})]}):null,v?(0,a.jsx)("div",{className:"mt-4 rounded-[18px] border border-rose-500/20 bg-rose-500/10 px-4 py-3 text-rose-100",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"error"}),(0,a.jsx)("p",{className:"text-sm leading-6",children:v})]})}):null,(0,a.jsxs)("div",{className:"flex flex-1 flex-col min-h-0",children:[(0,a.jsxs)("div",{className:"flex-1 overflow-y-auto py-4 custom-scrollbar",children:[0===et.length?(0,a.jsx)("div",{className:"flex min-h-[50vh] items-center justify-center px-4 text-center",children:(0,a.jsxs)("div",{className:"max-w-xl space-y-4",children:[(0,a.jsx)("div",{className:"mx-auto flex size-16 items-center justify-center rounded-[20px] border border-white/10 bg-white/5 text-white/80",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[30px]",children:"chat"})}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("h2",{className:"text-2xl font-semibold text-white",children:"Start a conversation"}),(0,a.jsx)("p",{className:"text-sm leading-6 text-white/60",children:"Simple chat interface to interact with any AI model from connected providers. Select a model and start chatting!"})]})]})}):null,(0,a.jsx)("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-4 px-4",children:et.map(e=>{let t="user"===e.role,r="assistant"===e.role,s=r&&e.id===U&&"streaming"===e.status,i=h(e.content)||(r?z:"");return(0,a.jsx)("div",{className:`flex w-full ${t?"justify-end":"justify-start"} mb-6`,children:(0,a.jsxs)("div",{className:`max-w-[min(88%,42rem)] ${t?"rounded-3xl bg-[#2f2f2f] px-5 py-3.5 text-white":"text-white/90"}`,children:[(0,a.jsx)("div",{className:"mb-1 flex items-center justify-between gap-3",children:(0,a.jsx)("span",{className:"text-xs font-semibold",children:t?"You":Z?.name||"Assistant"})}),e.attachments?.length?(0,a.jsx)("div",{className:"mb-3 grid grid-cols-2 gap-2 sm:grid-cols-3 mt-2",children:e.attachments.map(e=>(0,a.jsx)("a",{href:e.dataUrl,target:"_blank",rel:"noreferrer",className:"overflow-hidden rounded-[18px] border border-white/10 bg-black/20",children:(0,a.jsx)(o.default,{src:e.dataUrl,alt:e.name,width:320,height:112,unoptimized:!0,className:"h-28 w-full object-cover"})},e.id))}):null,(0,a.jsxs)("div",{className:"whitespace-pre-wrap break-words text-[15px] leading-7",children:[i,r&&s&&!z?(0,a.jsx)("span",{className:"inline-block animate-pulse",children:"▋"}):null]}),r&&"stopped"===e.status?(0,a.jsx)("p",{className:"mt-1 text-xs italic text-white/45",children:"Generation stopped"}):null]})},e.id)})})]}),(0,a.jsxs)("div",{className:"shrink-0 pt-2",children:[_.length>0?(0,a.jsx)("div",{className:"mx-auto mb-3 flex w-full max-w-3xl flex-wrap gap-2 px-4",children:_.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-full border border-white/10 bg-white/5 px-3 py-2",children:[(0,a.jsx)("span",{className:"text-xs text-white/80 max-w-[12rem] truncate",children:e.name}),(0,a.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void M(e=>e.filter(e=>e.id!==t))},className:"text-white/55 hover:text-white","aria-label":"Remove attachment",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]},e.id))}):null,(0,a.jsx)("div",{className:"mx-auto w-full max-w-3xl px-4 pb-2",children:(0,a.jsxs)("div",{className:"rounded-[26px] bg-[#2f2f2f] px-3 pt-3 pb-2 shadow-[0_0_15px_rgba(0,0,0,0.10)] ring-1 ring-white/5",children:[(0,a.jsx)("textarea",{value:C,onChange:e=>$(e.target.value),onKeyDown:e=>{"Enter"===e.key&&!e.shiftKey&&(e.preventDefault(),ea&&en())},placeholder:"Message AI",rows:1,className:"w-full resize-none bg-transparent px-2 text-[15px] leading-6 text-white outline-none placeholder:text-white/40 custom-scrollbar max-h-[25vh] overflow-y-auto"}),(0,a.jsxs)("div",{className:"mt-2 flex items-center justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>W.current?.click(),disabled:!Z||r,"aria-label":"Attach image",className:"p-2 text-white/50 hover:text-white transition rounded-full hover:bg-white/5",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"attach_file"})}),(0,a.jsx)("input",{ref:W,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:el}),(0,a.jsx)("span",{className:"text-xs font-medium text-white/30 truncate max-w-[120px]",children:Z?Z.name:"No model"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[E?(0,a.jsx)("button",{type:"button",onClick:()=>{G.current?.abort()},"aria-label":"Stop generating",className:"p-2 text-white bg-white/10 hover:bg-white/20 transition rounded-full h-8 w-8 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"stop"})}):null,(0,a.jsx)("button",{type:"button",onClick:en,disabled:!ea,"aria-label":"Send message",className:`h-8 w-8 rounded-full flex items-center justify-center transition ${ea?"bg-white text-black hover:opacity-90":"bg-white/10 text-white/30 cursor-not-allowed"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})})]})]})]})})]}),(0,a.jsx)("p",{className:"mx-auto mt-2 max-w-3xl px-4 pb-4 text-center text-[11px] text-white/30",children:"Model list is filtered from connected providers."})]})]})})}}},e=>{e.O(0,[2574,3862,782,8500,594,1321,4707,5497,8441,3794,7358],()=>e(e.s=55774)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3554],{7769:(e,s,r)=>{Promise.resolve().then(r.bind(r,85309))},85309:(e,s,r)=>{"use strict";r.d(s,{default:()=>u});var t=r(95155),a=r(12115),i=r(98500),l=r.n(i),o=r(35497),c=r(3534),d=r(28777),n=r(88105),x=r(28048),v=r(78559);function u({toolId:e,machineId:s}){let r=c.dM[e],[i,m]=(0,a.useState)([]),[h,p]=(0,a.useState)(!0),[f,P]=(0,a.useState)({}),[j,w]=(0,a.useState)([]);(0,a.useEffect)(()=>{let e=!0;return(async()=>{try{let[s,r]=await Promise.all([fetch("/api/providers"),fetch("/api/keys")]);if(!e)return;if(s.ok){let e=await s.json();m(e.connections||[])}if(r.ok){let e=await r.json();w(e.keys||[])}}catch(e){(0,v.s)("Error loading tool data:",e)}finally{e&&p(!1)}})(),()=>{e=!1}},[]);let b=()=>i.filter(e=>!1!==e.isActive).map(e=>({...e,provider:(0,n.rs)(e.provider)})),k=(0,a.useCallback)((e,s,r)=>{P(t=>t[e]?.[s]===r?t:{...t,[e]:{...t[e],[s]:r}})},[]);return r?h?(0,t.jsx)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:(0,t.jsx)(o.Qv,{})}):(0,t.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,t.jsxs)(l(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),s?(0,t.jsxs)("p",{className:"text-xs text-text-muted font-mono",children:["Machine: ",s]}):null,(()=>{let s,a,i,l=(s=b(),a=[],i=new Set,s.forEach(e=>{let s=(0,n.rs)(e.provider),r=d.Xg[s]||s;(0,d.KC)(s).forEach(t=>{let l=`${r}/${t.id}`;i.has(l)||(i.add(l),a.push({value:l,label:`${r}/${t.id}`,provider:s,alias:r,connectionName:e.name,modelId:t.id}))})}),a).length>0,o={tool:r,isExpanded:!0,onToggle:()=>{},baseUrl:window.location.origin,apiKeys:j,tunnelEnabled:!1,tunnelPublicUrl:"",tailscaleEnabled:!1,tailscaleUrl:"",cloudEnabled:!1};switch(e){case"claude":return(0,t.jsx)(x.Tk,{...o,activeProviders:b(),modelMappings:f[e]||{},onModelMappingChange:(s,r)=>k(e,s,r),hasActiveProviders:l});case"codex":return(0,t.jsx)(x.Ah,{...o,activeProviders:b()});case"opencode":return(0,t.jsx)(x.qO,{...o,activeProviders:b()});case"cowork":return(0,t.jsx)(x.Q6,{...o,activeProviders:b(),hasActiveProviders:l,cloudUrl:""});case"droid":return(0,t.jsx)(x.ZM,{...o,activeProviders:b(),hasActiveProviders:l});case"openclaw":return(0,t.jsx)(x.yZ,{...o,activeProviders:b(),hasActiveProviders:l});case"hermes":return(0,t.jsx)(x.RF,{...o,activeProviders:b(),hasActiveProviders:l});case"cline":return(0,t.jsx)(x.aG,{...o,activeProviders:b()});case"kilo":return(0,t.jsx)(x.c9,{...o,activeProviders:b()});case"deepseek-tui":return(0,t.jsx)(x.lF,{...o,activeProviders:b(),hasActiveProviders:l});case"jcode":return(0,t.jsx)(x.mW,{...o,activeProviders:b(),hasActiveProviders:l});case"grok":return(0,t.jsx)(x.wg,{...o,activeProviders:b(),hasActiveProviders:l});case"pi":return(0,t.jsx)(x.S3,{...o,activeProviders:b(),hasActiveProviders:l});case"aider":return(0,t.jsx)(x.qn,{...o,activeProviders:b(),hasActiveProviders:l});case"gemini-cli":return(0,t.jsx)(x.Ib,{...o,activeProviders:b(),hasActiveProviders:l});default:return(0,t.jsx)(x.a7,{toolId:e,...o,activeProviders:b()})}})()]}):(0,t.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,t.jsxs)(l(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),(0,t.jsx)("p",{className:"text-sm text-text-muted",children:"Tool not found or disabled."})]})}}},e=>{e.O(0,[2574,3862,782,8500,594,1321,7592,5497,3531,8441,3794,7358],()=>e(e.s=7769)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3554],{7769:(e,s,r)=>{Promise.resolve().then(r.bind(r,85309))},85309:(e,s,r)=>{"use strict";r.d(s,{default:()=>u});var t=r(95155),a=r(12115),i=r(98500),l=r.n(i),o=r(35497),c=r(3534),d=r(28777),n=r(88105),x=r(28048),v=r(78559);function u({toolId:e,machineId:s}){let r=c.dM[e],[i,m]=(0,a.useState)([]),[h,p]=(0,a.useState)(!0),[f,P]=(0,a.useState)({}),[j,w]=(0,a.useState)([]);(0,a.useEffect)(()=>{let e=!0;return(async()=>{try{let[s,r]=await Promise.all([fetch("/api/providers"),fetch("/api/keys")]);if(!e)return;if(s.ok){let e=await s.json();m(e.connections||[])}if(r.ok){let e=await r.json();w(e.keys||[])}}catch(e){(0,v.s)("Error loading tool data:",e)}finally{e&&p(!1)}})(),()=>{e=!1}},[]);let b=()=>i.filter(e=>!1!==e.isActive).map(e=>({...e,provider:(0,n.rs)(e.provider)})),k=(0,a.useCallback)((e,s,r)=>{P(t=>t[e]?.[s]===r?t:{...t,[e]:{...t[e],[s]:r}})},[]);return r?h?(0,t.jsx)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:(0,t.jsx)(o.Qv,{})}):(0,t.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,t.jsxs)(l(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),s?(0,t.jsxs)("p",{className:"text-xs text-text-muted font-mono",children:["Machine: ",s]}):null,(()=>{let s,a,i,l=(s=b(),a=[],i=new Set,s.forEach(e=>{let s=(0,n.rs)(e.provider),r=d.Xg[s]||s;(0,d.KC)(s).forEach(t=>{let l=`${r}/${t.id}`;i.has(l)||(i.add(l),a.push({value:l,label:`${r}/${t.id}`,provider:s,alias:r,connectionName:e.name,modelId:t.id}))})}),a).length>0,o={tool:r,isExpanded:!0,onToggle:()=>{},baseUrl:window.location.origin,apiKeys:j,tunnelEnabled:!1,tunnelPublicUrl:"",tailscaleEnabled:!1,tailscaleUrl:"",cloudEnabled:!1};switch(e){case"claude":return(0,t.jsx)(x.Tk,{...o,activeProviders:b(),modelMappings:f[e]||{},onModelMappingChange:(s,r)=>k(e,s,r),hasActiveProviders:l});case"codex":return(0,t.jsx)(x.Ah,{...o,activeProviders:b()});case"opencode":return(0,t.jsx)(x.qO,{...o,activeProviders:b()});case"cowork":return(0,t.jsx)(x.Q6,{...o,activeProviders:b(),hasActiveProviders:l,cloudUrl:""});case"droid":return(0,t.jsx)(x.ZM,{...o,activeProviders:b(),hasActiveProviders:l});case"openclaw":return(0,t.jsx)(x.yZ,{...o,activeProviders:b(),hasActiveProviders:l});case"hermes":return(0,t.jsx)(x.RF,{...o,activeProviders:b(),hasActiveProviders:l});case"cline":return(0,t.jsx)(x.aG,{...o,activeProviders:b()});case"kilo":return(0,t.jsx)(x.c9,{...o,activeProviders:b()});case"deepseek-tui":return(0,t.jsx)(x.lF,{...o,activeProviders:b(),hasActiveProviders:l});case"jcode":return(0,t.jsx)(x.mW,{...o,activeProviders:b(),hasActiveProviders:l});case"grok":return(0,t.jsx)(x.wg,{...o,activeProviders:b(),hasActiveProviders:l});case"pi":return(0,t.jsx)(x.S3,{...o,activeProviders:b(),hasActiveProviders:l});case"aider":return(0,t.jsx)(x.qn,{...o,activeProviders:b(),hasActiveProviders:l});case"gemini-cli":return(0,t.jsx)(x.Ib,{...o,activeProviders:b(),hasActiveProviders:l});default:return(0,t.jsx)(x.a7,{toolId:e,...o,activeProviders:b()})}})()]}):(0,t.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,t.jsxs)(l(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),(0,t.jsx)("p",{className:"text-sm text-text-muted",children:"Tool not found or disabled."})]})}}},e=>{e.O(0,[2574,3862,782,8500,594,1321,4707,5497,3531,8441,3794,7358],()=>e(e.s=7769)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2326],{12750:(e,s,l)=>{Promise.resolve().then(l.bind(l,53501))},53501:(e,s,l)=>{"use strict";l.d(s,{default:()=>g});var a=l(95155),t=l(12115),r=l(35497),i=l(3534),n=l(28048),c=l(98500),o=l.n(c),d=l(5772);function x({toolId:e,tool:s,status:l}){let t=l?l.installed?l.hasSwitchboard?{label:"Connected",cls:"bg-green-500/10 text-green-600 dark:text-green-400 border border-green-500/20"}:{label:"Installed \xb7 not configured",cls:"bg-amber-500/10 text-amber-600 dark:text-amber-400 border border-amber-500/25"}:{label:"Not installed",cls:"bg-orange-500/15 text-orange-600 dark:text-orange-400 border border-orange-500/25"}:{label:"Unknown",cls:"bg-gray-500/10 text-gray-500"};return(0,a.jsx)(o(),{href:`/dashboard/cli-tools/${e}`,className:"block",children:(0,a.jsx)(r.Zp,{padding:"sm",className:"h-full overflow-hidden hover:border-primary/50 transition-colors cursor-pointer",children:(0,a.jsx)("div",{className:"flex h-full flex-col gap-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:s.image?(0,a.jsx)(d.default,{src:s.image,alt:s.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}}):s.icon?(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px]",style:{color:s.color},children:s.icon}):null}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("h3",{className:"font-medium text-sm truncate",children:s.name}),(0,a.jsx)("span",{className:`inline-block mt-1 px-1.5 py-0.5 text-[10px] font-medium rounded-full ${t.cls}`,children:t.label})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px] shrink-0",children:"chevron_right"})]})})})})}var m=l(78559);function g({machineId:e}){let[s,l]=(0,t.useState)(!0),[c,o]=(0,t.useState)({});if((0,t.useEffect)(()=>{let e=!0;return(async()=>{try{let s=await fetch("/api/cli-tools/all-statuses");s.ok&&e&&o(await s.json())}catch(e){(0,m.s)("Error fetching tool statuses:",e)}finally{e&&l(!1)}})(),()=>{e=!1}},[]),s)return(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:[(0,a.jsx)(r.Qv,{}),(0,a.jsx)(r.Qv,{}),(0,a.jsx)(r.Qv,{}),(0,a.jsx)(r.Qv,{}),(0,a.jsx)(r.Qv,{}),(0,a.jsx)(r.Qv,{})]});let d=Object.entries(i.dM),h=Object.entries(i.wn);return(0,a.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-6 px-1 sm:px-0",children:[(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:d.map(([e,s])=>(0,a.jsx)(x,{toolId:e,tool:s,status:c[e]},e))}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"security"}),(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"MITM Tools"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:h.map(([e,s])=>(0,a.jsx)(n.gY,{tool:s},e))})]})]})}}},e=>{e.O(0,[2574,3862,782,8500,594,1321,7592,5497,3531,8441,3794,7358],()=>e(e.s=12750)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2326],{12750:(e,s,l)=>{Promise.resolve().then(l.bind(l,53501))},53501:(e,s,l)=>{"use strict";l.d(s,{default:()=>g});var a=l(95155),t=l(12115),r=l(35497),i=l(3534),n=l(28048),c=l(98500),o=l.n(c),d=l(5772);function x({toolId:e,tool:s,status:l}){let t=l?l.installed?l.hasSwitchboard?{label:"Connected",cls:"bg-green-500/10 text-green-600 dark:text-green-400 border border-green-500/20"}:{label:"Installed \xb7 not configured",cls:"bg-amber-500/10 text-amber-600 dark:text-amber-400 border border-amber-500/25"}:{label:"Not installed",cls:"bg-orange-500/15 text-orange-600 dark:text-orange-400 border border-orange-500/25"}:{label:"Unknown",cls:"bg-gray-500/10 text-gray-500"};return(0,a.jsx)(o(),{href:`/dashboard/cli-tools/${e}`,className:"block",children:(0,a.jsx)(r.Zp,{padding:"sm",className:"h-full overflow-hidden hover:border-primary/50 transition-colors cursor-pointer",children:(0,a.jsx)("div",{className:"flex h-full flex-col gap-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:s.image?(0,a.jsx)(d.default,{src:s.image,alt:s.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}}):s.icon?(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px]",style:{color:s.color},children:s.icon}):null}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("h3",{className:"font-medium text-sm truncate",children:s.name}),(0,a.jsx)("span",{className:`inline-block mt-1 px-1.5 py-0.5 text-[10px] font-medium rounded-full ${t.cls}`,children:t.label})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px] shrink-0",children:"chevron_right"})]})})})})}var m=l(78559);function g({machineId:e}){let[s,l]=(0,t.useState)(!0),[c,o]=(0,t.useState)({});if((0,t.useEffect)(()=>{let e=!0;return(async()=>{try{let s=await fetch("/api/cli-tools/all-statuses");s.ok&&e&&o(await s.json())}catch(e){(0,m.s)("Error fetching tool statuses:",e)}finally{e&&l(!1)}})(),()=>{e=!1}},[]),s)return(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:[(0,a.jsx)(r.Qv,{}),(0,a.jsx)(r.Qv,{}),(0,a.jsx)(r.Qv,{}),(0,a.jsx)(r.Qv,{}),(0,a.jsx)(r.Qv,{}),(0,a.jsx)(r.Qv,{})]});let d=Object.entries(i.dM),h=Object.entries(i.wn);return(0,a.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-6 px-1 sm:px-0",children:[(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:d.map(([e,s])=>(0,a.jsx)(x,{toolId:e,tool:s,status:c[e]},e))}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"security"}),(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"MITM Tools"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:h.map(([e,s])=>(0,a.jsx)(n.gY,{tool:s},e))})]})]})}}},e=>{e.O(0,[2574,3862,782,8500,594,1321,4707,5497,3531,8441,3794,7358],()=>e(e.s=12750)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{41483:(e,t,a)=>{"use strict";a.d(t,{default:()=>j});var l=a(95155),s=a(12115),r=a(44923),o=a(87256),i=a(39768),n=a(5020),d=a(35497),c=a(11059);a(88105);var m=a(65921),x=a(78559),u=a(47224);let p=/^[a-zA-Z0-9_.\-]+$/,h=[{key:"vision",label:"Vision",icon:"visibility",desc:"Images"},{key:"audioInput",label:"Audio",icon:"graphic_eq",desc:"Audio input"}],b={enabled:!0,roundRobin:!1,models:[]},f=Object.keys({vision:{...b},pdf:{...b},audioInput:{...b},videoInput:{...b}});function g(e){return Array.isArray(e)?{enabled:!0,roundRobin:!1,models:e.map(e=>e?.model||e).filter(Boolean)}:e&&"object"==typeof e?{enabled:!1!==e.enabled,roundRobin:!!e.roundRobin,models:Array.isArray(e.models)?e.models.filter(Boolean):[]}:{...b}}function j({initialData:e}){let t=(0,m.i)(e=>e.error),[a,r]=(0,s.useState)(()=>(e?.combos||[]).filter(e=>!e.kind||"llm"===e.kind)),[o,i]=(0,s.useState)(!e),[n,x]=(0,s.useState)(!1),[u,p]=(0,s.useState)(null),[h,b]=(0,s.useState)(e?.connections||[]),[v,N]=(0,s.useState)(e?.settings?.comboStrategies||{}),[k,w]=(0,s.useState)(e?.modelCaps||{}),[C,A]=(0,s.useState)(()=>{let t=e?.settings?.capacityAdapter||{},a={};for(let e of f)a[e]=g(t[e]);return a}),[F,O]=(0,s.useState)(null),{copied:$,copy:E}=(0,c.C)(),q=(0,s.useCallback)(async()=>{try{let[e,t,a,l]=await Promise.all([fetch("/api/combos"),fetch("/api/providers"),fetch("/api/settings"),fetch("/api/models")]);if(![e,t,a,l].every(e=>e.ok))throw Error("One or more combo resources failed to load");let s=await e.json(),o=await t.json(),i=await a.json();if(e.ok&&r((s.combos||[]).filter(e=>!e.kind||"llm"===e.kind)),t.ok&&b(o.connections||[]),l.ok){let e=await l.json(),t={};for(let a of e.models||[])a.caps&&(t[a.fullModel]=a.caps);w(t)}N(i.comboStrategies||{});let n=i.capacityAdapter||{},d={};for(let e of f)d[e]=g(n[e]);A(d)}catch(e){t("Failed to fetch combo data")}finally{i(!1)}},[t]);(0,s.useEffect)(()=>{e?.combos?i(!1):q()},[e,q]);let P=async e=>{try{let{strategy:a,capacityAutoSwitch:l,routerModel:s,objective:r,...o}=e,i=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});if(i.ok){let e=await i.json().catch(()=>({})),t=o.name?.trim()||e?.name;t&&(a||void 0!==l||s||r)&&await T(t,y(a,l,s,r)),await q(),x(!1)}else{let e=await i.json();t(e.error||"Failed to create combo")}}catch(e){t("Failed to create combo")}},D=async(e,a)=>{try{let{strategy:l,capacityAutoSwitch:s,routerModel:r,objective:o,...i}=a,n=u?.name,d=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(d.ok){let e=i.name?.trim()||n;if(n&&e&&n!==e&&N(t=>{let a={...t};return n in a&&(e in a||(a[e]=a[n]),delete a[n]),a}),e&&(l||void 0!==s)){let t,a=n&&n!==e?(t={...v},n in t&&(e in t||(t[e]=t[n]),delete t[n]),t):v;await T(e,y(l,s,r,o),a)}await q(),p(null)}else{let e=await d.json();t(e.error||"Failed to update combo")}}catch(e){t("Failed to update combo")}},_=async e=>{let l=a.find(t=>t.id===e);O({title:"Delete Combo",message:l?.name?`Delete combo “${l.name}”?`:"Delete this combo?",onConfirm:async()=>{O(null);try{let a=await fetch(`/api/combos/${e}`,{method:"DELETE"});if(a.ok)r(t=>t.filter(t=>t.id!==e)),l?.name&&N(e=>{if(!(l.name in e))return e;let t={...e};return delete t[l.name],t});else{let e=await a.json().catch(()=>({}));t(e.error||`Failed to delete combo (HTTP ${a.status})`)}}catch(e){t("Failed to delete combo")}}})},T=async(e,a,l=null)=>{try{let s={...l||v},r={...s[e]||{},...a};for(let e of Object.keys(r))(""===r[e]||null===r[e]||void 0===r[e])&&delete r[e];let o=r.fallbackStrategy||"fallback";"fallback"!==o||r.judgeModel||r.routerModel||r.objective||void 0!==r.learningEnabled||void 0!==r.freezeLearning||void 0!==r.explorationRate||!1===r.capacityAutoSwitch?(!r.fallbackStrategy&&void 0===a.fallbackStrategy&&s[e]?.fallbackStrategy&&(r.fallbackStrategy=s[e].fallbackStrategy),s[e]=r):delete s[e];let i=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:s})});if(!i.ok){let e=await i.json().catch(()=>({}));t(e.error||`Failed to update combo strategy (${i.status})`);return}N(s)}catch(e){throw t("Failed to update combo strategy"),e}},z=async e=>{A(e);try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({capacityAdapter:e})})).ok||t("Failed to update capacity adapter")}catch(e){t("Failed to update capacity adapter")}};return o?(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,l.jsx)(d.Qv,{}),(0,l.jsx)(d.Qv,{})]}):(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,l.jsxs)("div",{className:"min-w-0 max-w-3xl",children:[(0,l.jsx)("h1",{className:"text-[17px] font-semibold text-text-main",children:"Combos"}),(0,l.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Group models under one name, then pick a strategy per combo:"}),(0,l.jsxs)("ul",{className:"text-sm text-text-muted mt-2 flex flex-col gap-1.5",children:[(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Fallback"})," ","— tries models in order (next on failure)"]}),(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Round Robin"})," ","— rotates models across requests to spread load"]}),(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Fusion"})," ","— queries all models in parallel, then a judge synthesizes one answer. Best quality, but costs the most: every request bills all panel models + the judge (N+1 calls)"]}),(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Auto"})," ","— a router model picks one worker from the pool each request (2 calls: router + worker); optional learning from outcomes"]}),(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Capacity auto-switch"})," ","— when enabled on a combo, sends image/PDF requests to a model that supports them first (works with Fallback, Round Robin, and Fusion)"]})]})]}),(0,l.jsx)(d.$n,{icon:"add",onClick:()=>x(!0),className:"w-full sm:w-auto whitespace-nowrap shrink-0",children:"Create Combo"})]}),0===a.length?(0,l.jsx)(d.Zp,{children:(0,l.jsxs)("div",{className:"text-center py-12",children:[(0,l.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"layers"})}),(0,l.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No combos yet"}),(0,l.jsx)("p",{className:"text-sm text-text-muted mb-4 max-w-md mx-auto",children:"Create a named model group, choose Fallback / Round Robin / Fusion / Auto, and point clients at the combo name."}),(0,l.jsx)(d.$n,{icon:"add",onClick:()=>x(!0),className:"w-full sm:w-auto",children:"Create Combo"})]})}):(0,l.jsx)("div",{className:"flex flex-col gap-4",children:a.map(e=>(0,l.jsx)(S,{combo:e,modelCaps:k,activeProviders:h,copied:$,onCopy:E,onEdit:()=>p(e),onDelete:()=>_(e.id),strategy:v[e.name]||{},onSetStrategy:t=>T(e.name,t)},e.id))}),(0,l.jsx)(R,{capacityAdapter:C,onChange:z,activeProviders:h,getCaps:e=>k[e]||null}),(0,l.jsx)(M,{isOpen:n,onClose:()=>x(!1),onSave:P,activeProviders:h,modelCaps:k,initialStrategy:{fallbackStrategy:"fallback",capacityAutoSwitch:!0}},"create"),(0,l.jsx)(M,{isOpen:!!u,combo:u,onClose:()=>p(null),onSave:e=>D(u.id,e),activeProviders:h,modelCaps:k,initialStrategy:u?v[u.name]||{fallbackStrategy:"fallback"}:{}},u?.id||"new"),(0,l.jsx)(d.uo,{isOpen:!!F,onClose:()=>O(null),onConfirm:F?.onConfirm,title:F?.title||"Confirm",message:F?.message,variant:"danger"})]})}function y(e,t,a,l){let s=e||"fallback",r={fallbackStrategy:s,...void 0!==t?{capacityAutoSwitch:t}:{}};return"auto"===s?(a&&(r.routerModel=a),l&&(r.objective=l),r.judgeModel=""):("fusion"===s?r.routerModel="":(r.routerModel="",r.judgeModel=""),r.objective="",r.learningEnabled="",r.freezeLearning="",r.explorationRate=""),r}function v(e,t,a){let l=(e||[]).filter(e=>e&&e!==t);return l.length>0&&!l.some(e=>a[e]?.vision)}function N({models:e,routerModel:t}){let a=(e||[]).filter(e=>e&&e!==t);if(a.length<2)return null;let{cheap:s,frontier:r,disabled:o}=function(e){let t=(e||[]).filter(Boolean);if(t.length<=1)return{cheap:t.slice(),frontier:[],disabled:!0};let a=t.map(e=>({m:e,t:function(e){if(!e)return 4;let[t,...a]=e.split("/"),l=a.join("/")||t,s=(0,u.PS)(t,l);if(!s||"number"!=typeof s.input)return 4;let r="number"==typeof s.output?s.output:3*s.input,o=s.input+r;return o<2?0:o<10?1:o<30?2:o<80?3:4}(e)}));if(new Set(a.map(e=>e.t)).size<=1)return{cheap:t.slice(),frontier:[],disabled:!0};let l=a.filter(e=>e.t<=1).map(e=>e.m),s=a.filter(e=>e.t>=2).map(e=>e.m);if(!l.length||!s.length){let e=a.map((e,t)=>({...e,i:t})).sort((e,t)=>e.t-t.t||e.i-t.i),t=Math.ceil(e.length/2);l=e.slice(0,t).map(e=>e.m),s=e.slice(t).map(e=>e.m)}return{cheap:l,frontier:s,disabled:!1}}(a),i=e=>String(e).split("/").pop();return o?(0,l.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[(0,l.jsx)("span",{className:"text-[11px] font-medium text-text-muted",children:"Tiers"}),(0,l.jsx)("span",{className:"text-[10px] text-text-subtle",title:"All workers share one cost tier — tiered routing is off",children:"single tier (tiering off)"})]}):(0,l.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[(0,l.jsx)("span",{className:"text-[11px] font-medium text-text-muted",children:"Tiers"}),s.map(e=>(0,l.jsx)("span",{className:"rounded border border-emerald-500/30 bg-emerald-500/10 px-1.5 py-0.5 font-mono text-[10px] text-emerald-600 dark:text-emerald-400",title:`${e} — cheap tier`,children:i(e)},`c-${e}`)),(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px] text-text-subtle",children:"arrow_forward"}),r.map(e=>(0,l.jsx)("span",{className:"rounded border border-amber-500/30 bg-amber-500/10 px-1.5 py-0.5 font-mono text-[10px] text-amber-600 dark:text-amber-400",title:`${e} — frontier tier`,children:i(e)},`f-${e}`))]})}let k=[{value:"fallback",label:"Fallback — try in order"},{value:"round-robin",label:"Round Robin — rotate load"},{value:"fusion",label:"Fusion — panel + judge (N+1)"},{value:"auto",label:"Auto — router picks 1 worker"}],w={fallback:"Tries models top-to-bottom; on failure uses the next.","round-robin":"Rotates models across requests to spread load.",fusion:"Calls every model, then a judge merges answers (bills N+1).",auto:"Router model chooses one worker each request (bills 2 calls)."},C=[{value:"quality",label:"Quality"},{value:"balanced",label:"Balanced"},{value:"economy",label:"Economy"},{value:"latency",label:"Latency"}];function S({combo:e,modelCaps:t={},activeProviders:a=[],copied:r,onCopy:o,onEdit:i,onDelete:n,strategy:c={},onSetStrategy:m}){let[x,u]=(0,s.useState)(!1),[p,h]=(0,s.useState)(!1),[b,f]=(0,s.useState)(!1),[g,j]=(0,s.useState)(!1),[y,A]=(0,s.useState)(""),M=c.fallbackStrategy||"fallback",R=c.judgeModel||"",F="auto"===M,O=c.routerModel||"",$=c.objective||"balanced",E=c.providerStrategy||"off",q=!1!==c.capacityAutoSwitch;return(0,l.jsxs)(d.Zp,{padding:"sm",className:"group",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-3 sm:items-center",children:[(0,l.jsx)("div",{className:"size-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"})}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsx)("code",{className:"block truncate font-mono text-sm font-medium",children:e.name}),(0,l.jsx)("p",{className:"text-[10px] text-text-subtle mt-0.5",children:w[M]||""}),(0,l.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1",children:[0===e.models.length?(0,l.jsx)("span",{className:"text-xs text-text-muted italic",children:"No models"}):e.models.slice(0,3).map((e,a)=>(0,l.jsxs)("code",{className:"inline-flex items-center gap-1 rounded bg-black/5 px-1.5 py-0.5 font-mono text-xs text-text-muted dark:bg-white/5",children:[(0,l.jsx)("span",{children:e}),(0,l.jsx)(d.nh,{caps:t[e]})]},a)),e.models.length>3&&(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",e.models.length-3," more"]})]}),"fusion"===M&&(0,l.jsxs)("div",{className:"mt-2 flex min-w-0 flex-wrap items-center gap-1.5",children:[(0,l.jsx)("span",{className:"text-[11px] font-medium text-text-muted",children:"Judge"}),(0,l.jsxs)("button",{onClick:()=>u(!0),className:"inline-flex max-w-full items-center gap-1 rounded border border-dashed border-primary/40 px-1.5 py-0.5 font-mono text-[11px] text-primary hover:border-primary hover:bg-primary/5 transition-colors",title:"Pick the model that fuses panel answers",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"gavel"}),(0,l.jsx)("span",{className:"truncate",children:R||`Auto — ${e.models[0]||"first model"}`})]}),R&&(0,l.jsx)("button",{onClick:()=>m({judgeModel:""}),className:"p-0.5 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10 transition-colors",title:"Reset judge to Auto",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"close"})})]}),F&&(0,l.jsxs)("div",{className:"mt-2 flex min-w-0 flex-col gap-2",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[(0,l.jsx)("span",{className:"text-[11px] font-medium text-text-muted",children:"Router"}),(0,l.jsxs)("button",{type:"button",onClick:()=>h(!0),className:"inline-flex max-w-full items-center gap-1 rounded border border-dashed border-primary/40 px-1.5 py-0.5 font-mono text-[11px] text-primary hover:border-primary hover:bg-primary/5 transition-colors",title:"Model that picks the worker each request — required for Auto",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"alt_route"}),(0,l.jsx)("span",{className:"truncate",children:O||"Select a router model (required)"})]})]}),O&&e.models?.includes(O)&&(0,l.jsxs)("p",{className:"text-[10px] text-amber-600 dark:text-amber-400 flex items-center gap-1",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"warning"}),"Router is also in the worker list — it is auto-excluded from the pool."]}),v(e.models,O,t)&&(0,l.jsxs)("p",{className:"text-[10px] text-amber-600 dark:text-amber-400 flex items-center gap-1",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"warning"}),"No vision-capable model — image requests will have images stripped"]}),(0,l.jsx)(N,{models:e.models,routerModel:O}),(0,l.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[(0,l.jsx)("span",{className:"text-[11px] font-medium text-text-muted",children:"Objective"}),(0,l.jsx)("select",{value:$,onChange:e=>m({objective:e.target.value}),className:"rounded border border-border bg-surface-2 px-1.5 py-0.5 text-[11px] text-text-main",children:C.map(e=>(0,l.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,l.jsxs)("label",{className:"inline-flex items-center gap-1 text-[11px] text-text-muted cursor-pointer",children:[(0,l.jsx)("input",{type:"checkbox",className:"rounded border-border",checked:!1!==c.learningEnabled,onChange:e=>m({learningEnabled:e.target.checked})}),"Learn"]}),(0,l.jsxs)("label",{className:"inline-flex items-center gap-1 text-[11px] text-text-muted cursor-pointer",title:"Keep routing on current learning version; block relearn",children:[(0,l.jsx)("input",{type:"checkbox",className:"rounded border-border",checked:!!c.freezeLearning,onChange:e=>m({freezeLearning:e.target.checked})}),"Freeze"]}),(0,l.jsxs)("label",{className:"inline-flex items-center gap-1 text-[11px] text-text-muted cursor-pointer",title:"Occasionally append a 1/2/3 feedback prompt to Auto chat replies (human chat only). Off by default.",children:[(0,l.jsx)("input",{type:"checkbox",className:"rounded border-border",checked:!!c.feedbackAsk,onChange:e=>m({feedbackAsk:e.target.checked})}),"Ask feedback"]}),(0,l.jsxs)("button",{type:"button",disabled:g||!!c.freezeLearning,onClick:async()=>{j(!0),A("");try{let t=await fetch("/api/routing/learn",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboName:e.name})}),a=await t.json();A(a.message||(a.ok?"Done":a.error||"Failed"))}catch(e){A(e.message||"Failed")}finally{j(!1)}},className:"inline-flex items-center gap-1 rounded border border-primary/40 bg-primary/10 px-2 py-0.5 text-[11px] font-medium text-primary hover:bg-primary/15 disabled:opacity-50",title:"Run learning optimizer on recent routing events",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"psychology"}),g?"Learning…":"Relearn now"]}),(0,l.jsx)("a",{href:`/dashboard/combos/routing?combo=${encodeURIComponent(e.name)}`,className:"inline-flex items-center gap-1 rounded border border-border px-2 py-0.5 text-[11px] text-text-muted hover:text-primary hover:border-primary/40",children:"Insights"})]}),(0,l.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[(0,l.jsx)("span",{className:"text-[11px] font-medium text-text-muted",children:"Provider"}),(0,l.jsxs)("select",{value:E,onChange:e=>m({providerStrategy:e.target.value}),className:"rounded border border-border bg-surface-2 px-1.5 py-0.5 text-[11px] text-text-main",children:[(0,l.jsx)("option",{value:"off",children:"Off"}),(0,l.jsx)("option",{value:"priority",children:"Priority"}),(0,l.jsx)("option",{value:"round-robin",children:"Round robin"}),(0,l.jsx)("option",{value:"fastest",children:"Fastest"}),(0,l.jsx)("option",{value:"quota-first",children:"Quota first"})]}),"priority"===E&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("input",{type:"text",value:Array.isArray(c.providerOrder)?c.providerOrder.join(", "):"",onChange:e=>m({providerOrder:e.target.value.split(",").map(e=>e.trim()).filter(Boolean)}),placeholder:"provider-a, provider-b",className:"w-40 rounded border border-border bg-surface-2 px-1.5 py-0.5 text-[11px] text-text-main"}),(0,l.jsx)("span",{className:"text-[10px] text-text-muted",children:"comma-separated provider names, highest priority first"})]}),(0,l.jsx)("input",{type:"number",min:"1",value:c.providerLatencyGuardMs??"",onChange:e=>m({providerLatencyGuardMs:Number(e.target.value)||void 0}),placeholder:"20000",title:"Demote providers slower than this latency in milliseconds",className:"w-20 rounded border border-border bg-surface-2 px-1.5 py-0.5 text-[11px] text-text-main"})]}),"quota-first"===E&&(0,l.jsx)("p",{className:"text-[10px] text-text-muted",children:"Quota data currently available for Claude & Codex; other providers use availability (not rate-limited, lower recent use)."}),(0,l.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2 text-[11px] text-text-muted",children:[(0,l.jsxs)("label",{className:"inline-flex items-center gap-1",children:["Window",(0,l.jsxs)("select",{value:c.learningWindowDays??14,onChange:e=>m({learningWindowDays:Number(e.target.value)||14}),className:"rounded border border-border bg-surface-2 px-1 py-0.5 text-[11px] text-text-main",children:[(0,l.jsx)("option",{value:7,children:"7d"}),(0,l.jsx)("option",{value:14,children:"14d"}),(0,l.jsx)("option",{value:30,children:"30d"})]})]}),(0,l.jsxs)("label",{className:"inline-flex items-center gap-1",title:"Epsilon-greedy exploration (capped at 20%)",children:["Explore",(0,l.jsx)("select",{value:Math.round((c.explorationRate??.05)*100),onChange:e=>m({explorationRate:Number(e.target.value)/100}),className:"rounded border border-border bg-surface-2 px-1 py-0.5 text-[11px] text-text-main",children:[0,5,10,15,20].map(e=>(0,l.jsxs)("option",{value:e,children:[e,"%"]},e))})]}),(0,l.jsxs)("label",{className:"inline-flex items-center gap-1",title:"0 = manual relearn only",children:["Auto-relearn",(0,l.jsxs)("select",{value:c.autoLearnIntervalHours??0,onChange:e=>m({autoLearnIntervalHours:Number(e.target.value)||0}),className:"rounded border border-border bg-surface-2 px-1 py-0.5 text-[11px] text-text-main",children:[(0,l.jsx)("option",{value:0,children:"off"}),(0,l.jsx)("option",{value:6,children:"6h"}),(0,l.jsx)("option",{value:12,children:"12h"}),(0,l.jsx)("option",{value:24,children:"24h"}),(0,l.jsx)("option",{value:72,children:"72h"})]})]}),(0,l.jsxs)("label",{className:"inline-flex items-center gap-1",title:"Capacity pre-filter before router (vision/PDF)",children:[(0,l.jsx)("input",{type:"checkbox",className:"rounded border-border",checked:!1!==c.capacityAutoSwitch,onChange:e=>m({capacityAutoSwitch:e.target.checked})}),"Heuristic first"]}),(0,l.jsxs)("label",{className:"inline-flex items-center gap-1",title:"Emit X-Auto-Router-* response headers (worker, cluster, score, skipped)",children:[(0,l.jsx)("input",{type:"checkbox",className:"rounded border-border",checked:!1!==c.emitAutoRouterHeaders,onChange:e=>m({emitAutoRouterHeaders:e.target.checked})}),"Route headers"]})]}),y?(0,l.jsx)("p",{className:"text-[11px] font-mono text-text-subtle",children:y}):(0,l.jsx)("p",{className:"text-[10px] text-text-subtle",children:"Worker pool = models list (router model excluded if listed). Every request re-routes. Router model is required — pick a connected account (a cheap, fast model such as Haiku works well)."})]})]})]}),(0,l.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center sm:gap-3 sm:shrink-0",children:[(0,l.jsxs)("div",{className:"w-full sm:w-[220px] flex flex-col gap-1.5",children:[(0,l.jsx)(d.l6,{options:k,value:M,onChange:e=>{let t=e.target.value;if("auto"===t&&!O){f(!0),h(!0);return}m({fallbackStrategy:t})},selectClassName:"py-1.5 text-xs"}),!F&&(0,l.jsxs)("label",{className:"inline-flex items-center gap-1.5 text-[10px] text-text-muted cursor-pointer",children:[(0,l.jsx)("input",{type:"checkbox",className:"rounded border-border",checked:q,onChange:e=>m({capacityAutoSwitch:e.target.checked})}),"Capacity auto-switch (vision/PDF first)"]})]}),(0,l.jsxs)("div",{className:"grid grid-cols-3 gap-1 sm:flex",children:[(0,l.jsxs)("button",{onClick:t=>{t.stopPropagation(),o(e.name,`combo-${e.id}`)},className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Copy combo name",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:r===`combo-${e.id}`?"check":"content_copy"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Copy"})]}),(0,l.jsxs)("button",{onClick:i,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Edit",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,l.jsxs)("button",{onClick:n,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 transition-colors hover:bg-red-500/10",title:"Delete",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]})]})]}),(0,l.jsx)(d.rq,{isOpen:x,onClose:()=>u(!1),onSelect:e=>{m({judgeModel:e?.value||""}),u(!1)},activeProviders:a,title:"Select Judge Model",addedModelValues:R?[R]:[],closeOnSelect:!0}),(0,l.jsx)(d.rq,{isOpen:p,onClose:()=>{f(!1),h(!1)},onSelect:e=>{let t=e?.value||"";b?(f(!1),t&&m({fallbackStrategy:"auto",routerModel:t})):m({routerModel:t}),h(!1)},activeProviders:a,title:"Select Router Model",addedModelValues:O?[O]:[],closeOnSelect:!0})]})}function A({id:e,index:t,model:a,learned:r=null,isFirst:n,isLast:d,onEdit:c,onMoveUp:m,onMoveDown:x,onRemove:u}){let{attributes:p,listeners:h,setNodeRef:b,transform:f,isDragging:g}=(0,o.gl)({id:e}),j={transform:i.Ks.Transform.toString(f),opacity:g?.4:1,zIndex:g?999:void 0},[y,v]=(0,s.useState)(!1),[N,k]=(0,s.useState)(a),w=()=>{let e=N.trim();e&&e!==a?c(e):k(a),v(!1)};return(0,l.jsxs)("div",{ref:b,style:j,className:`group flex min-w-0 items-center gap-1.5 rounded-md px-2 py-1 bg-black/[0.02] hover:bg-black/[0.04] dark:bg-white/[0.02] dark:hover:bg-white/[0.04] transition-colors ${g?"shadow-md ring-1 ring-primary/30":""}`,children:[(0,l.jsx)("button",{...p,...h,type:"button",className:"cursor-grab touch-none p-0.5 rounded text-text-muted hover:text-primary active:cursor-grabbing shrink-0",title:"Drag to reorder",children:(0,l.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,l.jsx)("circle",{cx:"9",cy:"4",r:"2"}),(0,l.jsx)("circle",{cx:"15",cy:"4",r:"2"}),(0,l.jsx)("circle",{cx:"9",cy:"12",r:"2"}),(0,l.jsx)("circle",{cx:"15",cy:"12",r:"2"}),(0,l.jsx)("circle",{cx:"9",cy:"20",r:"2"}),(0,l.jsx)("circle",{cx:"15",cy:"20",r:"2"})]})}),(0,l.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-3 text-center shrink-0",children:t+1}),y?(0,l.jsx)("input",{autoFocus:!0,value:N,onChange:e=>k(e.target.value),onBlur:w,onKeyDown:e=>{"Enter"===e.key&&w(),"Escape"===e.key&&(k(a),v(!1))},className:"min-w-0 flex-1 rounded border border-primary/40 bg-white px-1.5 py-0.5 font-mono text-xs text-text-main outline-none dark:bg-black/20"}):(0,l.jsx)("div",{role:"button",tabIndex:0,className:"min-w-0 flex-1 cursor-text truncate rounded px-1.5 py-0.5 font-mono text-xs text-text-main hover:bg-black/5 dark:hover:bg-white/5 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/40",onClick:()=>v(!0),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),v(!0))},title:"Click to edit","aria-label":`Edit model ${a}`,children:a}),r&&r.n>=10&&(0,l.jsxs)("span",{className:"shrink-0 font-mono text-[10px] text-text-subtle",title:"Learned routing stats (all combos, last 14d)",children:["avg ",Math.round(r.avgScore)," \xb7 n=",r.n,r.bestCluster?` \xb7 best: ${r.bestCluster}`:""]}),(0,l.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5",children:[(0,l.jsx)("button",{onClick:m,disabled:n,className:`p-0.5 rounded ${n?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move up",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_upward"})}),(0,l.jsx)("button",{onClick:x,disabled:d,className:`p-0.5 rounded ${d?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move down",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_downward"})})]}),(0,l.jsx)("button",{onClick:u,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 transition-all",title:"Remove",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]})}function M({isOpen:e,combo:t,onClose:a,onSave:i,activeProviders:c,modelCaps:m={},kindFilter:u=null,initialStrategy:h={}}){let[b,f]=(0,s.useState)(t?.name||""),[g,j]=(0,s.useState)(t?.models||[]),[y,N]=(0,s.useState)(h.fallbackStrategy||"fallback"),[C,S]=(0,s.useState)(!1!==h.capacityAutoSwitch),[R,F]=(0,s.useState)(!1),[O,$]=(0,s.useState)(!1),[E,q]=(0,s.useState)(""),[P,D]=(0,s.useState)({}),[_,T]=(0,s.useState)({}),z=(0,r.FR)((0,r.MS)(r.AN,{activationConstraint:{distance:5}}),(0,r.MS)(r.uN,{coordinateGetter:o.JR})),L=g.map((e,t)=>({uid:`item-${t}`,model:e})),I=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let t=await e.json();D(t.aliases||{})}}catch(e){(0,x.s)("Error fetching modal data:",e)}try{let e=await fetch("/api/routing/stats");if(!e.ok)throw Error("Failed to fetch learned routing stats");let t=await e.json(),a={};for(let e of t.global||[]){let t=Object.entries(e.clusters||{}),l=t.filter(([,e])=>e.n>=3),s=(l.length?l:t).reduce((e,t)=>{if(!e)return t;let[a,s]=e,[r,o]=t,i=l.length?s.avgScore:s.n,n=l.length?o.avgScore:o.n;return n>i||n===i&&r<a?t:e},null);a[e.worker]={avgScore:e.avgScore,n:e.n,bestCluster:s?s[0]:null}}T(a)}catch{T({})}};(0,s.useEffect)(()=>{e&&(f(t?.name||""),j(t?.models||[]),N(h.fallbackStrategy||"fallback"),S(!1!==h.capacityAutoSwitch),F(!1),$(!1),q(""),T({}),I())},[e,t?.id,t?.name]);let B=e=>e.trim()?p.test(e)?(q(""),!0):(q("Only letters, numbers, -, _ and . allowed"),!1):(q("Name is required"),!1),H=async()=>{if(B(b)){if(0===g.length)return void(0,x.s)("Add at least one model to the combo");if("auto"===y&&g.length<2)return void(0,x.s)("Auto strategy needs at least 2 models in the worker pool (plus a connected router account)");$(!0),await i({name:b.trim(),models:g,strategy:y,capacityAutoSwitch:"auto"===y||C}),$(!1)}},J=!!t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(d.aF,{isOpen:e,onClose:a,title:J?"Edit Combo":"Create Combo",children:(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsxs)("p",{className:"text-xs text-text-muted leading-relaxed",children:["Clients call this combo by name as the ",(0,l.jsx)("code",{className:"text-primary",children:"model"})," field. Strategy controls how models in the list are used."]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(d.pd,{label:"Combo Name",value:b,onChange:e=>{let t=e.target.value;f(t),t?B(t):q("")},placeholder:"my-combo",error:E}),(0,l.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and . allowed \xb7 use as model id in /v1"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Strategy"}),(0,l.jsx)(d.l6,{options:k,value:y,onChange:e=>N(e.target.value),selectClassName:"py-2 text-sm"}),(0,l.jsx)("p",{className:"text-[11px] text-text-muted mt-1.5",children:w[y]}),"auto"===y&&(0,l.jsxs)("p",{className:"text-[11px] text-amber-600 dark:text-amber-400 mt-1 flex items-center gap-1",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"info"}),"Auto requires a router model — select one on the combo card after saving."]}),"auto"!==y&&(0,l.jsxs)("label",{className:"mt-2 inline-flex items-center gap-2 text-xs text-text-muted cursor-pointer",children:[(0,l.jsx)("input",{type:"checkbox",className:"rounded border-border",checked:C,onChange:e=>S(e.target.checked)}),"Capacity auto-switch — prefer vision/PDF-capable models when the request needs them"]}),"auto"===y&&(0,l.jsx)("p",{className:"text-[11px] text-text-subtle mt-1.5 font-mono",children:"After create: set Router model on the combo card (must be a connected account). Workers = this model list (router excluded if listed)."}),"fusion"===y&&(0,l.jsx)("p",{className:"text-[11px] text-text-subtle mt-1.5 font-mono",children:"After create: optionally set Judge on the combo card (default = first model)."})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("label",{className:"text-sm font-medium mb-1.5 block",children:["Models ","fallback"===y?"(order = priority)":"(pool)"]}),g.length>0&&v(g,null,m)&&(0,l.jsxs)("p",{className:"text-[10px] text-amber-600 dark:text-amber-400 flex items-center gap-1 mb-1",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"warning"}),"No vision-capable model — image requests will have images stripped"]}),0===g.length?(0,l.jsxs)("div",{className:"text-center py-4 border border-dashed border-black/10 dark:border-white/10 rounded-lg bg-black/[0.01] dark:bg-white/[0.01]",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-xl mb-1",children:"layers"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"No models added yet"})]}):(0,l.jsx)(r.Mp,{sensors:z,collisionDetection:r.fp,onDragEnd:e=>{let{active:t,over:a}=e;if(a&&t.id!==a.id){let e=L.findIndex(e=>e.uid===t.id),l=L.findIndex(e=>e.uid===a.id);-1!==e&&-1!==l&&j(t=>(0,o.be)(t,e,l))}},modifiers:[n.FN,n.gj],children:(0,l.jsx)(o.gB,{items:L.map(e=>e.uid),strategy:o._G,children:(0,l.jsx)("div",{className:"flex max-h-[55vh] min-w-0 flex-col gap-1 overflow-y-auto sm:max-h-[350px]",children:L.map(({uid:e,model:t},a)=>(0,l.jsx)(A,{id:e,index:a,model:t,learned:_[t]||null,isFirst:0===a,isLast:a===L.length-1,onEdit:e=>{let t=[...g];t[a]=e,j(t)},onMoveUp:()=>(e=>{if(0===e)return;let t=[...g];[t[e-1],t[e]]=[t[e],t[e-1]],j(t)})(a),onMoveDown:()=>(e=>{if(e===g.length-1)return;let t=[...g];[t[e],t[e+1]]=[t[e+1],t[e]],j(t)})(a),onRemove:()=>{j(g.filter((e,t)=>t!==a))}},e))})})}),(0,l.jsxs)("button",{onClick:()=>F(!0),className:"w-full mt-2 py-2 border border-dashed border-black/10 dark:border-white/10 rounded-lg text-xs text-primary font-medium hover:text-primary hover:border-primary/50 transition-colors flex items-center justify-center gap-1",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add Model"]})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-2 pt-1 sm:flex-row",children:[(0,l.jsx)(d.$n,{onClick:a,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,l.jsx)(d.$n,{onClick:H,fullWidth:!0,size:"sm",disabled:!b.trim()||!!E||O,children:O?"Saving...":J?"Save":"Create"})]})]})}),(0,l.jsx)(d.rq,{isOpen:R,onClose:()=>F(!1),onSelect:e=>{g.includes(e.value)||j([...g,e.value])},onDeselect:e=>{j(g.filter(t=>t!==e.value))},activeProviders:c,modelAliases:P,title:"Add Model to Combo",kindFilter:u,addedModelValues:g,closeOnSelect:!1})]})}function R({capacityAdapter:e,onChange:t,activeProviders:a,getCaps:s}){return(0,l.jsx)(d.Zp,{padding:"sm",children:(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsx)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("p",{className:"text-sm font-medium text-text-main",children:"Capacity Adapter"}),(0,l.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Request carries images or audio your model can't read? Auto-switches to a model in the pool below."}),(0,l.jsxs)("ul",{className:"mt-1.5 text-[11px] text-text-muted flex flex-col gap-0.5",children:[(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Vision"})," — images (png, jpg, webp, …)"]}),(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Audio"})," — audio input"]})]})]})}),(0,l.jsx)("div",{className:"flex flex-col gap-4",children:h.map(r=>(0,l.jsx)(F,{cap:r,entry:e[r.key]||b,onChange:a=>t({...e,[r.key]:a}),activeProviders:a,getCaps:s},r.key))})]})})}function F({cap:e,entry:t,onChange:a,activeProviders:r,getCaps:o}){let[i,n]=(0,s.useState)(!1),{enabled:c,roundRobin:m,models:x}=t,u=e=>a({...t,...e}),p=(e,t)=>{let a=e+t;if(a<0||a>=x.length)return;let l=[...x];[l[e],l[a]]=[l[a],l[e]],u({models:l})};return(0,l.jsxs)("div",{className:`group rounded-lg border border-black/5 p-3 ${!c?"opacity-50":""} dark:border-white/10`,children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2.5 sm:items-center",children:[(0,l.jsx)(d.lM,{checked:c,onChange:e=>u({enabled:e}),"aria-label":`Enable ${e.label} adapter`}),(0,l.jsx)("div",{className:"size-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:e.icon})}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,l.jsx)("code",{className:"font-mono text-sm font-medium text-text-main",children:e.label}),(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:["— ",e.desc]})]}),(0,l.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1",children:[0===x.length?(0,l.jsx)("span",{className:"text-xs text-text-muted italic",children:"No models"}):x.slice(0,3).map((e,t)=>(0,l.jsxs)("code",{className:"group/chip inline-flex items-center gap-1 rounded bg-black/5 px-1.5 py-0.5 font-mono text-xs text-text-muted dark:bg-white/5",children:[(0,l.jsx)("span",{children:e}),(0,l.jsx)(d.nh,{caps:o?.(e)}),(0,l.jsx)("button",{onClick:()=>p(t,-1),disabled:0===t,className:`leading-none opacity-0 group-hover/chip:opacity-100 ${0===t?"text-text-muted/20":"text-text-muted hover:text-primary"}`,children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_upward"})}),(0,l.jsx)("button",{onClick:()=>p(t,1),disabled:t===x.length-1,className:`leading-none opacity-0 group-hover/chip:opacity-100 ${t===x.length-1?"text-text-muted/20":"text-text-muted hover:text-primary"}`,children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_downward"})}),(0,l.jsx)("button",{onClick:()=>{let e;u({models:0===(e=x.filter((e,a)=>a!==t)).length?["oc/mimo-v2.5-free"]:e})},className:"leading-none opacity-0 group-hover/chip:opacity-100 text-text-muted hover:text-red-500",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},`${e}-${t}`)),x.length>3&&(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",x.length-3," more"]})]})]})]}),(0,l.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center sm:gap-3 sm:shrink-0",children:[(0,l.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-text-muted cursor-pointer select-none",children:[(0,l.jsx)(d.lM,{checked:m,onChange:e=>u({roundRobin:e}),disabled:!c,"aria-label":`Round-robin ${e.label} adapter`}),(0,l.jsx)("span",{children:"Round"})]}),(0,l.jsx)(d.$n,{icon:"add",variant:"ghost",size:"sm",onClick:()=>n(!0),disabled:!c,title:`Add ${e.label} model`,children:"Add Model"})]})]}),i&&(0,l.jsx)(d.rq,{isOpen:i,onClose:()=>n(!1),onSelect:e=>{x.includes(e.value)||u({models:[...x,e.value]})},activeProviders:r,title:`Add ${e.label} Model`,addedModelValues:x,capFilter:e.key,closeOnSelect:!1})]})}},80063:(e,t,a)=>{Promise.resolve().then(a.bind(a,41483))}},e=>{e.O(0,[2574,3862,782,8500,594,7055,1321,4707,5497,8441,3794,7358],()=>e(e.s=80063)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[624],{61872:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>C});var a=s(95155),r=s(12115),l=s(73321),o=s(98500),n=s.n(o),i=s(21742),c=s(16746),d=s(28408),x=s(32539),m=s(59656),p=s(84420),u=s(19381),h=s(94977),b=s(48035),j=s(67869),g=s(67389),f=s(85545),N=s(35497);let y=["#3987e5","#199e70","#c98500","#9085e9","#008300","#e66767"],v="#8a8172",k=[{key:"router",label:"Router"},{key:"bandit_policy",label:"Bandit policy"},{key:"cached_route",label:"Cached route"},{key:"exploration",label:"Exploration"},{key:"judge_flag_escalation",label:"Judge escalation"},{key:"fallback_rescue",label:"Fallback rescue"}],w={backgroundColor:"var(--color-bg)",border:"1px solid var(--color-border)",borderRadius:"8px",color:"var(--color-text)",fontSize:"12px"};function S({active:e,payload:t}){if(!e||!t?.length)return null;let s=t[0].payload;return(0,a.jsxs)("div",{className:"font-mono",style:w,children:[(0,a.jsx)("p",{className:"mb-1 text-text-muted",children:s.worker}),(0,a.jsxs)("p",{className:"text-text-main",children:["Score: ",Math.round(Number(s.avgScore)||0)]}),null!=s.winRate&&(0,a.jsxs)("p",{className:"text-text-main",children:["Win rate: ",Math.round(100*s.winRate),"%"]}),(0,a.jsxs)("p",{className:"text-text-main",children:["Latency: ",Math.round(Number(s.avgLatencyMs)||0),"ms"]})]})}function C(){return(0,a.jsx)(r.Suspense,{fallback:(0,a.jsx)("p",{className:"text-sm text-text-muted p-4",children:"Loading insights…"}),children:(0,a.jsx)(M,{})})}function M(){let e,t,s=(0,l.useSearchParams)().get("combo")||"",[o,C]=(0,r.useState)(null),[M,L]=(0,r.useState)(null),[$,R]=(0,r.useState)(!1),[_,F]=(0,r.useState)(""),[A,E]=(0,r.useState)(""),[T,P]=(0,r.useState)(14),[z,W]=(0,r.useState)(""),[Z,J]=(0,r.useState)(""),[I,K]=(0,r.useState)(!1),q=(0,r.useCallback)(async()=>{if(s){R(!0),F("");try{let e=new URLSearchParams({combo:s,days:String(T)});z&&e.set("cluster",z),Z&&e.set("worker",Z),I&&e.set("exploration","1");let[t,a]=await Promise.all([fetch(`/api/routing/insights?${e}`,{cache:"no-store"}),fetch(`/api/routing/stats?combo=${encodeURIComponent(s)}&days=${T}`,{cache:"no-store"}).then(async e=>e.ok?e.json():null).catch(()=>null)]),r=await t.json();if(!t.ok)throw Error(r.error||"Failed to load insights");C(r),L(a)}catch(e){F(e.message||"Failed"),C(null),L(null)}finally{R(!1)}}},[s,T,z,Z,I]);(0,r.useEffect)(()=>{q()},[q]);let D=(0,r.useCallback)(async(e,t)=>{if(e)try{let s=await fetch("/api/routing/feedback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({requestId:e,rating:t})}),a=await s.json().catch(()=>({}));if(!s.ok)throw Error(a.error||"Feedback failed");E(0===t?"Feedback cleared":"Thanks — feedback recorded"),await q()}catch(e){E(e.message||"Feedback failed")}},[q]),B=(0,r.useMemo)(()=>{if(!o?.heatmap)return 100;let e=1;for(let t of o.heatmap)for(let s of t.cells||[])null!=s.avg&&s.avg>e&&(e=s.avg);return e},[o]),U=M?.timeline||[],G=(e=[...new Set([...(o?.modelStats||[]).map(e=>e.worker),...U.map(e=>e.worker)].filter(Boolean))].sort(),t={},e.forEach((e,s)=>{t[e]=s<6?y[s]:v}),t),V=(o?.modelStats||[]).map(e=>({...e,workerLabel:e.worker.split("/").pop(),winRate:null!=e.wins&&Number(e.n)>0?Number(e.wins)/Number(e.n):null})),H=[...new Set(U.map(e=>e.worker).filter(Boolean))].sort(),Q=H.filter(e=>G[e]!==v),X=H.some(e=>G[e]===v),Y=new Map;for(let e of U){let t=Number(e.avgScore);if(!Number.isFinite(t))continue;let s=Y.get(e.day)||{day:e.day,otherN:0,otherScore:0};if(G[e.worker]===v){let a=Number(e.n)||0;s.otherN+=a,s.otherScore+=t*a}else s[e.worker]=t;Y.set(e.day,s)}let ee=[...Y.values()].map(e=>(e.otherN>0&&(e.Other=e.otherScore/e.otherN),delete e.otherN,delete e.otherScore,e)),et=X?[...Q,"Other"]:Q,es=M?.pickSource||{},ea=Object.values(es).reduce((e,t)=>e+(Number(t)||0),0),er=ea?Math.round(((Number(es.bandit_policy)||0)+(Number(es.cached_route)||0))/ea*100):null,el=U.reduce((e,t)=>e+(Number(t.n)||0),0),eo=U.reduce((e,t)=>e+(Number(t.avgScore)||0)*(Number(t.n)||0),0),en=M?.judgeCoverage,ei=en?.total?Math.round(Number(en.judged)/Number(en.total)*100):null;return s?(0,a.jsxs)("div",{className:"flex flex-col gap-5 max-w-[1180px]",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("h1",{className:"text-[17px] font-semibold tracking-tight",children:"Routing insights"}),(0,a.jsxs)("p",{className:"text-xs font-mono text-text-subtle",children:["combo: ",s,o?.strategy?.routerModel?` \xb7 router ${o.strategy.routerModel}`:"",o?.strategy?.objective?` \xb7 ${o.strategy.objective}`:"",o?.strategy?.explorationRate!=null?` \xb7 ε=${Math.round((o.strategy.explorationRate??.05)*100)}% (cap ${Math.round((o.strategy.explorationRateCap??.2)*100)}%)`:""]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 items-center",children:[(0,a.jsxs)("select",{value:T,onChange:e=>P(Number(e.target.value)||14),className:"text-[11.5px] font-mono text-text-subtle px-2 py-1.5 rounded-[7px] bg-surface-2 border border-border",title:"Date range",children:[(0,a.jsx)("option",{value:7,children:"last 7 days"}),(0,a.jsx)("option",{value:14,children:"last 14 days"}),(0,a.jsx)("option",{value:30,children:"last 30 days"}),(0,a.jsx)("option",{value:90,children:"last 90 days"})]}),(0,a.jsxs)("select",{value:z,onChange:e=>W(e.target.value),className:"text-[11.5px] font-mono text-text-subtle px-2 py-1.5 rounded-[7px] bg-surface-2 border border-border max-w-[140px]",title:"Filter cluster",children:[(0,a.jsx)("option",{value:"",children:"all clusters"}),(o?.clusters||[]).map(e=>(0,a.jsx)("option",{value:e,children:e},e))]}),(0,a.jsxs)("select",{value:Z,onChange:e=>J(e.target.value),className:"text-[11.5px] font-mono text-text-subtle px-2 py-1.5 rounded-[7px] bg-surface-2 border border-border max-w-[160px]",title:"Filter worker",children:[(0,a.jsx)("option",{value:"",children:"all workers"}),(o?.workers||[]).map(e=>(0,a.jsx)("option",{value:e,children:e.split("/").pop()},e))]}),(0,a.jsxs)("label",{className:"inline-flex items-center gap-1 text-[11px] text-text-muted cursor-pointer",children:[(0,a.jsx)("input",{type:"checkbox",className:"rounded border-border",checked:I,onChange:e=>K(e.target.checked)}),"exploration only"]}),(0,a.jsx)(N.$n,{size:"sm",variant:"secondary",onClick:q,disabled:$,children:"Refresh"}),(0,a.jsx)(N.$n,{size:"sm",disabled:$,onClick:async()=>{E("");try{let e=await fetch("/api/routing/learn",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboName:s})}),t=await e.json();E(t.message||JSON.stringify(t)),await q()}catch(e){E(e.message)}},children:"Relearn now"}),(0,a.jsx)(n(),{href:"/dashboard/combos",className:"text-xs text-text-muted hover:text-primary px-2 py-1.5",children:"← Combos"})]})]}),A&&(0,a.jsx)("p",{className:"text-xs font-mono text-text-subtle",children:A}),_&&(0,a.jsx)("p",{className:"text-sm text-red-400",children:_}),$&&!o&&(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Loading…"}),o&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[(0,a.jsx)(O,{label:"Requests",value:String(o.eventCount??0)}),(0,a.jsx)(O,{label:"Need for learn",value:o.needMore>0?`${o.needMore} more`:"ready"}),(0,a.jsx)(O,{label:"Active version",value:o.promoted?`v${o.promoted.version}`:"—"}),(0,a.jsx)(O,{label:"Eval score",value:o.promoted?.evalScore!=null?Number(o.promoted.evalScore).toFixed(1):"—"})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[(0,a.jsx)(O,{label:"Router-skip %",value:null==er?"—":`${er}%`}),(0,a.jsx)(O,{label:"Avg score",value:el>0?(eo/el).toFixed(1):"—"}),(0,a.jsx)(O,{label:"Judge coverage %",value:null==ei?"—":`${ei}%`}),(0,a.jsx)(O,{label:"Total picks",value:String(ea)})]}),(0,a.jsxs)("p",{className:"text-[11px] text-text-subtle font-mono -mt-2",children:["Request-level counts (one per chat). Intermediate fallback attempts",null!=o.attemptCount&&o.attemptCount!==o.eventCount?` (${o.attemptCount} attempt rows)`:""," ","feed the bandit but not the min-events gate. Single-worker and heuristic shortcuts are not logged here."]}),(0,a.jsxs)(N.Zp,{padding:"md",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-1 flex-wrap gap-2",children:[(0,a.jsx)("span",{className:"text-[13px] font-semibold",children:"Win-rate heatmap"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[10.5px] font-mono text-text-subtle",children:[(0,a.jsx)("span",{children:"low"}),(0,a.jsx)("span",{className:"w-[120px] h-2 rounded",style:{background:"linear-gradient(90deg,rgba(229,180,84,.1),rgba(229,180,84,.72))"}}),(0,a.jsx)("span",{children:"high \xb7 number always shown"})]})]}),(0,a.jsx)("p",{className:"text-[11.5px] font-mono text-text-subtle mb-3",children:"cluster \xd7 worker \xb7 average outcome score (0–100)"}),o.clusters?.length&&o.workers?.length?(0,a.jsxs)("div",{className:"grid gap-1 overflow-x-auto",style:{gridTemplateColumns:`112px repeat(${o.workers.length}, minmax(56px, 1fr))`},children:[(0,a.jsx)("div",{}),o.workers.map(e=>(0,a.jsx)("div",{className:"font-mono text-[10.5px] text-text-muted text-center pb-1 truncate",title:e,children:e.split("/").pop()},e)),o.heatmap.map(e=>(0,a.jsxs)("div",{className:"contents",children:[(0,a.jsx)("div",{className:"text-[11px] uppercase tracking-wide text-text-muted flex items-center font-medium",children:e.cluster}),e.cells.map(t=>{let s=t.avg,r=null==s||B<=0?0:Math.min(1,s/B);return(0,a.jsx)("div",{className:"rounded text-center font-mono text-[11px] py-2 border border-border",style:{background:`rgba(229,180,84,${.08+.55*r})`,color:null==s?"#6F6653":"#ECE4D2"},title:`${t.worker}: n=${t.n}`,children:null==s?"—":Math.round(s)},`${e.cluster}-${t.worker}`)})]},e.cluster))]}):(0,a.jsx)("p",{className:"text-sm text-text-muted py-6 text-center",children:"No routing events yet. Point a client at this combo with strategy Auto."})]}),(0,a.jsxs)(N.Zp,{padding:"md",children:[(0,a.jsx)("span",{className:"text-[13px] font-semibold",children:"Score trend"}),(0,a.jsx)("p",{className:"text-[11px] text-text-subtle font-mono mb-2",children:"mean outcome score per worker per day (request-level)"}),0===ee.length?(0,a.jsx)("p",{className:"text-xs text-text-muted py-6 text-center",children:"No routing data in this window — Auto combos learn as they route"}):(0,a.jsx)(i.u,{width:"100%",height:220,children:(0,a.jsxs)(c.b,{data:ee,margin:{top:8,right:12,left:0,bottom:0},children:[(0,a.jsx)(d.d,{strokeDasharray:"3 3",strokeOpacity:.1}),(0,a.jsx)(x.W,{dataKey:"day",tick:{className:"font-mono",fill:"currentColor",fillOpacity:.65,fontSize:10},tickFormatter:e=>String(e).slice(5),tickLine:!1,axisLine:!1}),(0,a.jsx)(m.h,{domain:[0,100],tick:{className:"font-mono",fill:"currentColor",fillOpacity:.65,fontSize:10},tickLine:!1,axisLine:!1,width:32}),(0,a.jsx)(p.m,{contentStyle:w,itemStyle:{color:"var(--color-text)"},labelStyle:{color:"var(--color-text-muted)"},formatter:(e,t)=>[Math.round(Number(e)),t]}),et.length>=2&&(0,a.jsx)(u.s,{formatter:e=>(0,a.jsx)("span",{className:"font-mono text-[10px] text-text-muted",children:e})}),et.map(e=>(0,a.jsx)(h.N1,{type:"monotone",dataKey:t=>t[e]??null,name:"Other"===e?"Other":e.split("/").pop(),stroke:"Other"===e?v:G[e],strokeWidth:2,dot:!1,activeDot:{r:4},connectNulls:!0,isAnimationActive:!1},e))]})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[(0,a.jsxs)(N.Zp,{padding:"md",children:[(0,a.jsx)("span",{className:"text-[13px] font-semibold",children:"Worker comparison"}),(0,a.jsx)("p",{className:"text-[11px] text-text-subtle font-mono mb-3",children:"average outcome score (0–100)"}),0===V.length?(0,a.jsx)("p",{className:"text-xs text-text-muted py-6 text-center",children:"No routing data in this window — Auto combos learn as they route"}):(0,a.jsx)(i.u,{width:"100%",height:Math.max(180,34*V.length),children:(0,a.jsxs)(b.E,{data:V,layout:"vertical",margin:{top:2,right:34,left:0,bottom:0},children:[(0,a.jsx)(d.d,{strokeDasharray:"3 3",strokeOpacity:.1,horizontal:!1}),(0,a.jsx)(x.W,{type:"number",domain:[0,100],tick:{className:"font-mono",fill:"currentColor",fillOpacity:.65,fontSize:10},tickLine:!1,axisLine:!1}),(0,a.jsx)(m.h,{type:"category",dataKey:"workerLabel",width:110,tick:{className:"font-mono",fill:"currentColor",fillOpacity:.65,fontSize:10},tickLine:!1,axisLine:!1}),(0,a.jsx)(p.m,{content:(0,a.jsx)(S,{}),contentStyle:w}),(0,a.jsxs)(j.yP,{dataKey:"avgScore",name:"Average score",barSize:16,radius:[0,4,4,0],isAnimationActive:!1,children:[V.map(e=>(0,a.jsx)(g.f,{fill:G[e.worker]||v},e.worker)),(0,a.jsx)(f.Ze,{dataKey:"avgScore",position:"right",formatter:e=>Math.round(Number(e)||0),fill:"var(--color-text-muted)",className:"font-mono"})]})]})})]}),(0,a.jsxs)(N.Zp,{padding:"md",children:[(0,a.jsx)("span",{className:"text-[13px] font-semibold",children:"Pick source"}),(0,a.jsx)("p",{className:"text-[11px] text-text-subtle font-mono mb-3",children:"terminal selections in the selected window"}),0===ea?(0,a.jsx)("p",{className:"text-xs text-text-muted py-6 text-center",children:"No routing data in this window — Auto combos learn as they route"}):(0,a.jsx)(i.u,{width:"100%",height:180,children:(0,a.jsxs)(b.E,{data:[{name:"window",...es}],margin:{top:8,right:8,left:0,bottom:0},children:[(0,a.jsx)(d.d,{strokeDasharray:"3 3",strokeOpacity:.1,vertical:!1}),(0,a.jsx)(x.W,{type:"number",tick:{className:"font-mono",fill:"currentColor",fillOpacity:.65,fontSize:10},tickLine:!1,axisLine:!1}),(0,a.jsx)(m.h,{type:"category",dataKey:"name",width:48,tick:{className:"font-mono",fill:"currentColor",fillOpacity:.65,fontSize:10},tickLine:!1,axisLine:!1}),(0,a.jsx)(p.m,{contentStyle:w,itemStyle:{color:"var(--color-text)"},labelStyle:{color:"var(--color-text-muted)"}}),(0,a.jsx)(u.s,{formatter:e=>(0,a.jsx)("span",{className:"font-mono text-[10px] text-text-muted",children:e})}),k.map((e,t)=>(0,a.jsx)(j.yP,{dataKey:e.key,name:e.label,stackId:"s",fill:t<6?y[t]:v,isAnimationActive:!1},e.key))]})})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[(0,a.jsxs)(N.Zp,{padding:"md",children:[(0,a.jsx)("span",{className:"text-[13px] font-semibold",children:"Model performance"}),(0,a.jsxs)("div",{className:"mt-3 space-y-2",children:[0===(o.modelStats||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No data"}),(o.modelStats||[]).map(e=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_52px_60px_40px] gap-2 items-center text-xs",children:[(0,a.jsx)("span",{className:"font-mono truncate text-text-main",title:e.worker,children:e.worker}),(0,a.jsx)("span",{className:"text-right font-mono text-text-muted",children:null!=e.avgScore?Math.round(e.avgScore):"—"}),(0,a.jsx)("span",{className:"text-right font-mono text-text-muted",children:null!=e.avgLatencyMs?`${Math.round(e.avgLatencyMs)}ms`:"—"}),(0,a.jsx)("span",{className:"text-right font-mono text-text-subtle",children:e.errors||0})]},e.worker))]})]}),(0,a.jsxs)(N.Zp,{padding:"md",children:[(0,a.jsx)("span",{className:"text-[13px] font-semibold",children:"Learning versions"}),(0,a.jsx)("p",{className:"text-[11px] text-text-subtle font-mono mb-2",children:"immutable \xb7 rollback-safe"}),(0,a.jsxs)("div",{className:"space-y-2 max-h-64 overflow-y-auto",children:[0===(o.versions||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No versions yet"}),(o.versions||[]).map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 text-xs border-b border-border py-1.5",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("span",{className:"font-mono text-text-main",children:["v",e.version,e.promoted?" \xb7 active":""]}),(0,a.jsxs)("div",{className:"text-[10px] text-text-subtle font-mono",children:["eval ",null!=e.evalScore?Number(e.evalScore).toFixed(1):"—"," \xb7"," ",e.source]})]}),!e.promoted&&(0,a.jsx)("button",{type:"button",className:"text-primary text-[11px] hover:underline",onClick:async()=>{await fetch("/api/routing/versions/promote",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e.id})}),q()},children:"Promote"})]},e.id))]}),o.promoted?.prevVersionId&&(0,a.jsx)(N.$n,{size:"sm",variant:"outline",className:"mt-3",onClick:async()=>{await fetch("/api/routing/versions/rollback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboName:s})}),q()},children:"Rollback"})]})]}),(0,a.jsxs)(N.Zp,{padding:"md",children:[(0,a.jsx)("span",{className:"text-[13px] font-semibold",children:"Recent decisions"}),(0,a.jsxs)("div",{className:"mt-3 overflow-x-auto",children:[(0,a.jsxs)("table",{className:"w-full text-left text-xs",children:[(0,a.jsx)("thead",{className:"text-text-subtle font-mono uppercase tracking-wide",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"py-1 pr-2",children:"Time"}),(0,a.jsx)("th",{className:"py-1 pr-2",children:"Cluster"}),(0,a.jsx)("th",{className:"py-1 pr-2",children:"Worker"}),(0,a.jsx)("th",{className:"py-1 pr-2",children:"Score"}),(0,a.jsx)("th",{className:"py-1 pr-2",children:"Reason"}),(0,a.jsx)("th",{className:"py-1",children:"Rate"})]})}),(0,a.jsx)("tbody",{children:(o.recent||[]).map(e=>{let t=e.meta?.userRating??null;return(0,a.jsxs)("tr",{className:"border-t border-border",children:[(0,a.jsxs)("td",{className:"py-1.5 pr-2 font-mono text-text-muted whitespace-nowrap",children:[e.timestamp?.slice(0,19)?.replace("T"," "),e.meta?.exploration?(0,a.jsx)("span",{className:"ml-1 text-[9px] text-primary",children:"ε"}):null,e.meta?.judgeScore!=null?(0,a.jsxs)("span",{className:"ml-1 text-[9px] text-text-subtle",title:`LLM-judge score ${e.meta.judgeScore}/10`,children:["J",e.meta.judgeScore]}):null]}),(0,a.jsx)("td",{className:"py-1.5 pr-2",children:e.cluster||"—"}),(0,a.jsx)("td",{className:"py-1.5 pr-2 font-mono truncate max-w-[160px]",title:e.pickedWorker,children:e.pickedWorker?.split("/").pop()||"—"}),(0,a.jsx)("td",{className:"py-1.5 pr-2 font-mono",children:null!=e.outcomeScore?Math.round(e.outcomeScore):"—"}),(0,a.jsx)("td",{className:"py-1.5 pr-2 text-text-muted truncate max-w-[240px]",title:e.routerReason,children:e.routerReason||"—"}),(0,a.jsx)("td",{className:"py-1.5 whitespace-nowrap",children:e.requestId?(0,a.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,a.jsx)("button",{type:"button",title:"Good route",className:`text-[13px] leading-none ${1===t?"text-primary":"text-text-subtle hover:text-primary"}`,onClick:()=>D(e.requestId,+(1!==t)),children:"▲"}),(0,a.jsx)("button",{type:"button",title:"Bad route",className:`text-[13px] leading-none ${-1===t?"text-red-400":"text-text-subtle hover:text-red-400"}`,onClick:()=>D(e.requestId,-1===t?0:-1),children:"▼"})]}):(0,a.jsx)("span",{className:"text-[10px] text-text-subtle",children:"—"})})]},e.id)})})]}),!(o.recent||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted py-4 text-center",children:"No decisions logged"})]})]}),(0,a.jsxs)(N.Zp,{padding:"md",children:[(0,a.jsx)("span",{className:"text-[13px] font-semibold",children:"Exploration log"}),(0,a.jsx)("p",{className:"text-[11px] text-text-subtle font-mono mb-2",children:"epsilon-greedy random picks (meta.exploration)"}),(0,a.jsxs)("div",{className:"space-y-1.5 max-h-48 overflow-y-auto",children:[0===(o.explorationLog||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No exploration events in this window"}),(o.explorationLog||[]).map(e=>(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 text-[11px] font-mono border-b border-border py-1",children:[(0,a.jsx)("span",{className:"text-text-muted",children:e.timestamp?.slice(0,19)?.replace("T"," ")}),(0,a.jsx)("span",{children:e.cluster||"—"}),(0,a.jsx)("span",{className:"text-primary",children:e.pickedWorker?.split("/").pop()}),(0,a.jsxs)("span",{className:"text-text-subtle",children:["score ",null!=e.outcomeScore?Math.round(e.outcomeScore):"—"]})]},`ex-${e.id}`))]})]})]})]}):(0,a.jsxs)("div",{className:"max-w-lg space-y-3",children:[(0,a.jsx)("h1",{className:"text-[17px] font-semibold",children:"Routing insights"}),(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Open from a combo card with strategy ",(0,a.jsx)("strong",{children:"Auto"}),", or append"," ",(0,a.jsx)("code",{className:"text-xs",children:"?combo=your-combo"}),"."]}),(0,a.jsx)(n(),{href:"/dashboard/combos",className:"text-sm text-primary hover:underline",children:"← Combos"})]})}function O({label:e,value:t}){return(0,a.jsxs)("div",{className:"rounded-[11px] border border-border bg-surface p-3.5",children:[(0,a.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-text-subtle mb-1.5",children:e}),(0,a.jsx)("div",{className:"font-mono text-[18px] font-semibold text-text-main",children:t})]})}},63759:(e,t,s)=>{Promise.resolve().then(s.bind(s,61872))}},e=>{e.O(0,[2574,3862,782,8500,594,136,1321,7592,5497,8441,3794,7358],()=>e(e.s=63759)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[624],{61872:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>C});var a=s(95155),r=s(12115),l=s(73321),o=s(98500),n=s.n(o),i=s(21742),c=s(16746),d=s(28408),x=s(32539),m=s(59656),p=s(84420),u=s(19381),h=s(94977),b=s(48035),j=s(67869),g=s(67389),f=s(85545),N=s(35497);let y=["#3987e5","#199e70","#c98500","#9085e9","#008300","#e66767"],v="#8a8172",k=[{key:"router",label:"Router"},{key:"bandit_policy",label:"Bandit policy"},{key:"cached_route",label:"Cached route"},{key:"exploration",label:"Exploration"},{key:"judge_flag_escalation",label:"Judge escalation"},{key:"fallback_rescue",label:"Fallback rescue"}],w={backgroundColor:"var(--color-bg)",border:"1px solid var(--color-border)",borderRadius:"8px",color:"var(--color-text)",fontSize:"12px"};function S({active:e,payload:t}){if(!e||!t?.length)return null;let s=t[0].payload;return(0,a.jsxs)("div",{className:"font-mono",style:w,children:[(0,a.jsx)("p",{className:"mb-1 text-text-muted",children:s.worker}),(0,a.jsxs)("p",{className:"text-text-main",children:["Score: ",Math.round(Number(s.avgScore)||0)]}),null!=s.winRate&&(0,a.jsxs)("p",{className:"text-text-main",children:["Win rate: ",Math.round(100*s.winRate),"%"]}),(0,a.jsxs)("p",{className:"text-text-main",children:["Latency: ",Math.round(Number(s.avgLatencyMs)||0),"ms"]})]})}function C(){return(0,a.jsx)(r.Suspense,{fallback:(0,a.jsx)("p",{className:"text-sm text-text-muted p-4",children:"Loading insights…"}),children:(0,a.jsx)(M,{})})}function M(){let e,t,s=(0,l.useSearchParams)().get("combo")||"",[o,C]=(0,r.useState)(null),[M,L]=(0,r.useState)(null),[$,R]=(0,r.useState)(!1),[_,F]=(0,r.useState)(""),[A,E]=(0,r.useState)(""),[T,P]=(0,r.useState)(14),[z,W]=(0,r.useState)(""),[Z,J]=(0,r.useState)(""),[I,K]=(0,r.useState)(!1),q=(0,r.useCallback)(async()=>{if(s){R(!0),F("");try{let e=new URLSearchParams({combo:s,days:String(T)});z&&e.set("cluster",z),Z&&e.set("worker",Z),I&&e.set("exploration","1");let[t,a]=await Promise.all([fetch(`/api/routing/insights?${e}`,{cache:"no-store"}),fetch(`/api/routing/stats?combo=${encodeURIComponent(s)}&days=${T}`,{cache:"no-store"}).then(async e=>e.ok?e.json():null).catch(()=>null)]),r=await t.json();if(!t.ok)throw Error(r.error||"Failed to load insights");C(r),L(a)}catch(e){F(e.message||"Failed"),C(null),L(null)}finally{R(!1)}}},[s,T,z,Z,I]);(0,r.useEffect)(()=>{q()},[q]);let D=(0,r.useCallback)(async(e,t)=>{if(e)try{let s=await fetch("/api/routing/feedback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({requestId:e,rating:t})}),a=await s.json().catch(()=>({}));if(!s.ok)throw Error(a.error||"Feedback failed");E(0===t?"Feedback cleared":"Thanks — feedback recorded"),await q()}catch(e){E(e.message||"Feedback failed")}},[q]),B=(0,r.useMemo)(()=>{if(!o?.heatmap)return 100;let e=1;for(let t of o.heatmap)for(let s of t.cells||[])null!=s.avg&&s.avg>e&&(e=s.avg);return e},[o]),U=M?.timeline||[],G=(e=[...new Set([...(o?.modelStats||[]).map(e=>e.worker),...U.map(e=>e.worker)].filter(Boolean))].sort(),t={},e.forEach((e,s)=>{t[e]=s<6?y[s]:v}),t),V=(o?.modelStats||[]).map(e=>({...e,workerLabel:e.worker.split("/").pop(),winRate:null!=e.wins&&Number(e.n)>0?Number(e.wins)/Number(e.n):null})),H=[...new Set(U.map(e=>e.worker).filter(Boolean))].sort(),Q=H.filter(e=>G[e]!==v),X=H.some(e=>G[e]===v),Y=new Map;for(let e of U){let t=Number(e.avgScore);if(!Number.isFinite(t))continue;let s=Y.get(e.day)||{day:e.day,otherN:0,otherScore:0};if(G[e.worker]===v){let a=Number(e.n)||0;s.otherN+=a,s.otherScore+=t*a}else s[e.worker]=t;Y.set(e.day,s)}let ee=[...Y.values()].map(e=>(e.otherN>0&&(e.Other=e.otherScore/e.otherN),delete e.otherN,delete e.otherScore,e)),et=X?[...Q,"Other"]:Q,es=M?.pickSource||{},ea=Object.values(es).reduce((e,t)=>e+(Number(t)||0),0),er=ea?Math.round(((Number(es.bandit_policy)||0)+(Number(es.cached_route)||0))/ea*100):null,el=U.reduce((e,t)=>e+(Number(t.n)||0),0),eo=U.reduce((e,t)=>e+(Number(t.avgScore)||0)*(Number(t.n)||0),0),en=M?.judgeCoverage,ei=en?.total?Math.round(Number(en.judged)/Number(en.total)*100):null;return s?(0,a.jsxs)("div",{className:"flex flex-col gap-5 max-w-[1180px]",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("h1",{className:"text-[17px] font-semibold tracking-tight",children:"Routing insights"}),(0,a.jsxs)("p",{className:"text-xs font-mono text-text-subtle",children:["combo: ",s,o?.strategy?.routerModel?` \xb7 router ${o.strategy.routerModel}`:"",o?.strategy?.objective?` \xb7 ${o.strategy.objective}`:"",o?.strategy?.explorationRate!=null?` \xb7 ε=${Math.round((o.strategy.explorationRate??.05)*100)}% (cap ${Math.round((o.strategy.explorationRateCap??.2)*100)}%)`:""]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 items-center",children:[(0,a.jsxs)("select",{value:T,onChange:e=>P(Number(e.target.value)||14),className:"text-[11.5px] font-mono text-text-subtle px-2 py-1.5 rounded-[7px] bg-surface-2 border border-border",title:"Date range",children:[(0,a.jsx)("option",{value:7,children:"last 7 days"}),(0,a.jsx)("option",{value:14,children:"last 14 days"}),(0,a.jsx)("option",{value:30,children:"last 30 days"}),(0,a.jsx)("option",{value:90,children:"last 90 days"})]}),(0,a.jsxs)("select",{value:z,onChange:e=>W(e.target.value),className:"text-[11.5px] font-mono text-text-subtle px-2 py-1.5 rounded-[7px] bg-surface-2 border border-border max-w-[140px]",title:"Filter cluster",children:[(0,a.jsx)("option",{value:"",children:"all clusters"}),(o?.clusters||[]).map(e=>(0,a.jsx)("option",{value:e,children:e},e))]}),(0,a.jsxs)("select",{value:Z,onChange:e=>J(e.target.value),className:"text-[11.5px] font-mono text-text-subtle px-2 py-1.5 rounded-[7px] bg-surface-2 border border-border max-w-[160px]",title:"Filter worker",children:[(0,a.jsx)("option",{value:"",children:"all workers"}),(o?.workers||[]).map(e=>(0,a.jsx)("option",{value:e,children:e.split("/").pop()},e))]}),(0,a.jsxs)("label",{className:"inline-flex items-center gap-1 text-[11px] text-text-muted cursor-pointer",children:[(0,a.jsx)("input",{type:"checkbox",className:"rounded border-border",checked:I,onChange:e=>K(e.target.checked)}),"exploration only"]}),(0,a.jsx)(N.$n,{size:"sm",variant:"secondary",onClick:q,disabled:$,children:"Refresh"}),(0,a.jsx)(N.$n,{size:"sm",disabled:$,onClick:async()=>{E("");try{let e=await fetch("/api/routing/learn",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboName:s})}),t=await e.json();E(t.message||JSON.stringify(t)),await q()}catch(e){E(e.message)}},children:"Relearn now"}),(0,a.jsx)(n(),{href:"/dashboard/combos",className:"text-xs text-text-muted hover:text-primary px-2 py-1.5",children:"← Combos"})]})]}),A&&(0,a.jsx)("p",{className:"text-xs font-mono text-text-subtle",children:A}),_&&(0,a.jsx)("p",{className:"text-sm text-red-400",children:_}),$&&!o&&(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Loading…"}),o&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[(0,a.jsx)(O,{label:"Requests",value:String(o.eventCount??0)}),(0,a.jsx)(O,{label:"Need for learn",value:o.needMore>0?`${o.needMore} more`:"ready"}),(0,a.jsx)(O,{label:"Active version",value:o.promoted?`v${o.promoted.version}`:"—"}),(0,a.jsx)(O,{label:"Eval score",value:o.promoted?.evalScore!=null?Number(o.promoted.evalScore).toFixed(1):"—"})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[(0,a.jsx)(O,{label:"Router-skip %",value:null==er?"—":`${er}%`}),(0,a.jsx)(O,{label:"Avg score",value:el>0?(eo/el).toFixed(1):"—"}),(0,a.jsx)(O,{label:"Judge coverage %",value:null==ei?"—":`${ei}%`}),(0,a.jsx)(O,{label:"Total picks",value:String(ea)})]}),(0,a.jsxs)("p",{className:"text-[11px] text-text-subtle font-mono -mt-2",children:["Request-level counts (one per chat). Intermediate fallback attempts",null!=o.attemptCount&&o.attemptCount!==o.eventCount?` (${o.attemptCount} attempt rows)`:""," ","feed the bandit but not the min-events gate. Single-worker and heuristic shortcuts are not logged here."]}),(0,a.jsxs)(N.Zp,{padding:"md",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-1 flex-wrap gap-2",children:[(0,a.jsx)("span",{className:"text-[13px] font-semibold",children:"Win-rate heatmap"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[10.5px] font-mono text-text-subtle",children:[(0,a.jsx)("span",{children:"low"}),(0,a.jsx)("span",{className:"w-[120px] h-2 rounded",style:{background:"linear-gradient(90deg,rgba(229,180,84,.1),rgba(229,180,84,.72))"}}),(0,a.jsx)("span",{children:"high \xb7 number always shown"})]})]}),(0,a.jsx)("p",{className:"text-[11.5px] font-mono text-text-subtle mb-3",children:"cluster \xd7 worker \xb7 average outcome score (0–100)"}),o.clusters?.length&&o.workers?.length?(0,a.jsxs)("div",{className:"grid gap-1 overflow-x-auto",style:{gridTemplateColumns:`112px repeat(${o.workers.length}, minmax(56px, 1fr))`},children:[(0,a.jsx)("div",{}),o.workers.map(e=>(0,a.jsx)("div",{className:"font-mono text-[10.5px] text-text-muted text-center pb-1 truncate",title:e,children:e.split("/").pop()},e)),o.heatmap.map(e=>(0,a.jsxs)("div",{className:"contents",children:[(0,a.jsx)("div",{className:"text-[11px] uppercase tracking-wide text-text-muted flex items-center font-medium",children:e.cluster}),e.cells.map(t=>{let s=t.avg,r=null==s||B<=0?0:Math.min(1,s/B);return(0,a.jsx)("div",{className:"rounded text-center font-mono text-[11px] py-2 border border-border",style:{background:`rgba(229,180,84,${.08+.55*r})`,color:null==s?"#6F6653":"#ECE4D2"},title:`${t.worker}: n=${t.n}`,children:null==s?"—":Math.round(s)},`${e.cluster}-${t.worker}`)})]},e.cluster))]}):(0,a.jsx)("p",{className:"text-sm text-text-muted py-6 text-center",children:"No routing events yet. Point a client at this combo with strategy Auto."})]}),(0,a.jsxs)(N.Zp,{padding:"md",children:[(0,a.jsx)("span",{className:"text-[13px] font-semibold",children:"Score trend"}),(0,a.jsx)("p",{className:"text-[11px] text-text-subtle font-mono mb-2",children:"mean outcome score per worker per day (request-level)"}),0===ee.length?(0,a.jsx)("p",{className:"text-xs text-text-muted py-6 text-center",children:"No routing data in this window — Auto combos learn as they route"}):(0,a.jsx)(i.u,{width:"100%",height:220,children:(0,a.jsxs)(c.b,{data:ee,margin:{top:8,right:12,left:0,bottom:0},children:[(0,a.jsx)(d.d,{strokeDasharray:"3 3",strokeOpacity:.1}),(0,a.jsx)(x.W,{dataKey:"day",tick:{className:"font-mono",fill:"currentColor",fillOpacity:.65,fontSize:10},tickFormatter:e=>String(e).slice(5),tickLine:!1,axisLine:!1}),(0,a.jsx)(m.h,{domain:[0,100],tick:{className:"font-mono",fill:"currentColor",fillOpacity:.65,fontSize:10},tickLine:!1,axisLine:!1,width:32}),(0,a.jsx)(p.m,{contentStyle:w,itemStyle:{color:"var(--color-text)"},labelStyle:{color:"var(--color-text-muted)"},formatter:(e,t)=>[Math.round(Number(e)),t]}),et.length>=2&&(0,a.jsx)(u.s,{formatter:e=>(0,a.jsx)("span",{className:"font-mono text-[10px] text-text-muted",children:e})}),et.map(e=>(0,a.jsx)(h.N1,{type:"monotone",dataKey:t=>t[e]??null,name:"Other"===e?"Other":e.split("/").pop(),stroke:"Other"===e?v:G[e],strokeWidth:2,dot:!1,activeDot:{r:4},connectNulls:!0,isAnimationActive:!1},e))]})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[(0,a.jsxs)(N.Zp,{padding:"md",children:[(0,a.jsx)("span",{className:"text-[13px] font-semibold",children:"Worker comparison"}),(0,a.jsx)("p",{className:"text-[11px] text-text-subtle font-mono mb-3",children:"average outcome score (0–100)"}),0===V.length?(0,a.jsx)("p",{className:"text-xs text-text-muted py-6 text-center",children:"No routing data in this window — Auto combos learn as they route"}):(0,a.jsx)(i.u,{width:"100%",height:Math.max(180,34*V.length),children:(0,a.jsxs)(b.E,{data:V,layout:"vertical",margin:{top:2,right:34,left:0,bottom:0},children:[(0,a.jsx)(d.d,{strokeDasharray:"3 3",strokeOpacity:.1,horizontal:!1}),(0,a.jsx)(x.W,{type:"number",domain:[0,100],tick:{className:"font-mono",fill:"currentColor",fillOpacity:.65,fontSize:10},tickLine:!1,axisLine:!1}),(0,a.jsx)(m.h,{type:"category",dataKey:"workerLabel",width:110,tick:{className:"font-mono",fill:"currentColor",fillOpacity:.65,fontSize:10},tickLine:!1,axisLine:!1}),(0,a.jsx)(p.m,{content:(0,a.jsx)(S,{}),contentStyle:w}),(0,a.jsxs)(j.yP,{dataKey:"avgScore",name:"Average score",barSize:16,radius:[0,4,4,0],isAnimationActive:!1,children:[V.map(e=>(0,a.jsx)(g.f,{fill:G[e.worker]||v},e.worker)),(0,a.jsx)(f.Ze,{dataKey:"avgScore",position:"right",formatter:e=>Math.round(Number(e)||0),fill:"var(--color-text-muted)",className:"font-mono"})]})]})})]}),(0,a.jsxs)(N.Zp,{padding:"md",children:[(0,a.jsx)("span",{className:"text-[13px] font-semibold",children:"Pick source"}),(0,a.jsx)("p",{className:"text-[11px] text-text-subtle font-mono mb-3",children:"terminal selections in the selected window"}),0===ea?(0,a.jsx)("p",{className:"text-xs text-text-muted py-6 text-center",children:"No routing data in this window — Auto combos learn as they route"}):(0,a.jsx)(i.u,{width:"100%",height:180,children:(0,a.jsxs)(b.E,{data:[{name:"window",...es}],margin:{top:8,right:8,left:0,bottom:0},children:[(0,a.jsx)(d.d,{strokeDasharray:"3 3",strokeOpacity:.1,vertical:!1}),(0,a.jsx)(x.W,{type:"number",tick:{className:"font-mono",fill:"currentColor",fillOpacity:.65,fontSize:10},tickLine:!1,axisLine:!1}),(0,a.jsx)(m.h,{type:"category",dataKey:"name",width:48,tick:{className:"font-mono",fill:"currentColor",fillOpacity:.65,fontSize:10},tickLine:!1,axisLine:!1}),(0,a.jsx)(p.m,{contentStyle:w,itemStyle:{color:"var(--color-text)"},labelStyle:{color:"var(--color-text-muted)"}}),(0,a.jsx)(u.s,{formatter:e=>(0,a.jsx)("span",{className:"font-mono text-[10px] text-text-muted",children:e})}),k.map((e,t)=>(0,a.jsx)(j.yP,{dataKey:e.key,name:e.label,stackId:"s",fill:t<6?y[t]:v,isAnimationActive:!1},e.key))]})})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[(0,a.jsxs)(N.Zp,{padding:"md",children:[(0,a.jsx)("span",{className:"text-[13px] font-semibold",children:"Model performance"}),(0,a.jsxs)("div",{className:"mt-3 space-y-2",children:[0===(o.modelStats||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No data"}),(o.modelStats||[]).map(e=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_52px_60px_40px] gap-2 items-center text-xs",children:[(0,a.jsx)("span",{className:"font-mono truncate text-text-main",title:e.worker,children:e.worker}),(0,a.jsx)("span",{className:"text-right font-mono text-text-muted",children:null!=e.avgScore?Math.round(e.avgScore):"—"}),(0,a.jsx)("span",{className:"text-right font-mono text-text-muted",children:null!=e.avgLatencyMs?`${Math.round(e.avgLatencyMs)}ms`:"—"}),(0,a.jsx)("span",{className:"text-right font-mono text-text-subtle",children:e.errors||0})]},e.worker))]})]}),(0,a.jsxs)(N.Zp,{padding:"md",children:[(0,a.jsx)("span",{className:"text-[13px] font-semibold",children:"Learning versions"}),(0,a.jsx)("p",{className:"text-[11px] text-text-subtle font-mono mb-2",children:"immutable \xb7 rollback-safe"}),(0,a.jsxs)("div",{className:"space-y-2 max-h-64 overflow-y-auto",children:[0===(o.versions||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No versions yet"}),(o.versions||[]).map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 text-xs border-b border-border py-1.5",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("span",{className:"font-mono text-text-main",children:["v",e.version,e.promoted?" \xb7 active":""]}),(0,a.jsxs)("div",{className:"text-[10px] text-text-subtle font-mono",children:["eval ",null!=e.evalScore?Number(e.evalScore).toFixed(1):"—"," \xb7"," ",e.source]})]}),!e.promoted&&(0,a.jsx)("button",{type:"button",className:"text-primary text-[11px] hover:underline",onClick:async()=>{await fetch("/api/routing/versions/promote",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e.id})}),q()},children:"Promote"})]},e.id))]}),o.promoted?.prevVersionId&&(0,a.jsx)(N.$n,{size:"sm",variant:"outline",className:"mt-3",onClick:async()=>{await fetch("/api/routing/versions/rollback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboName:s})}),q()},children:"Rollback"})]})]}),(0,a.jsxs)(N.Zp,{padding:"md",children:[(0,a.jsx)("span",{className:"text-[13px] font-semibold",children:"Recent decisions"}),(0,a.jsxs)("div",{className:"mt-3 overflow-x-auto",children:[(0,a.jsxs)("table",{className:"w-full text-left text-xs",children:[(0,a.jsx)("thead",{className:"text-text-subtle font-mono uppercase tracking-wide",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"py-1 pr-2",children:"Time"}),(0,a.jsx)("th",{className:"py-1 pr-2",children:"Cluster"}),(0,a.jsx)("th",{className:"py-1 pr-2",children:"Worker"}),(0,a.jsx)("th",{className:"py-1 pr-2",children:"Score"}),(0,a.jsx)("th",{className:"py-1 pr-2",children:"Reason"}),(0,a.jsx)("th",{className:"py-1",children:"Rate"})]})}),(0,a.jsx)("tbody",{children:(o.recent||[]).map(e=>{let t=e.meta?.userRating??null;return(0,a.jsxs)("tr",{className:"border-t border-border",children:[(0,a.jsxs)("td",{className:"py-1.5 pr-2 font-mono text-text-muted whitespace-nowrap",children:[e.timestamp?.slice(0,19)?.replace("T"," "),e.meta?.exploration?(0,a.jsx)("span",{className:"ml-1 text-[9px] text-primary",children:"ε"}):null,e.meta?.judgeScore!=null?(0,a.jsxs)("span",{className:"ml-1 text-[9px] text-text-subtle",title:`LLM-judge score ${e.meta.judgeScore}/10`,children:["J",e.meta.judgeScore]}):null]}),(0,a.jsx)("td",{className:"py-1.5 pr-2",children:e.cluster||"—"}),(0,a.jsx)("td",{className:"py-1.5 pr-2 font-mono truncate max-w-[160px]",title:e.pickedWorker,children:e.pickedWorker?.split("/").pop()||"—"}),(0,a.jsx)("td",{className:"py-1.5 pr-2 font-mono",children:null!=e.outcomeScore?Math.round(e.outcomeScore):"—"}),(0,a.jsx)("td",{className:"py-1.5 pr-2 text-text-muted truncate max-w-[240px]",title:e.routerReason,children:e.routerReason||"—"}),(0,a.jsx)("td",{className:"py-1.5 whitespace-nowrap",children:e.requestId?(0,a.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,a.jsx)("button",{type:"button",title:"Good route",className:`text-[13px] leading-none ${1===t?"text-primary":"text-text-subtle hover:text-primary"}`,onClick:()=>D(e.requestId,+(1!==t)),children:"▲"}),(0,a.jsx)("button",{type:"button",title:"Bad route",className:`text-[13px] leading-none ${-1===t?"text-red-400":"text-text-subtle hover:text-red-400"}`,onClick:()=>D(e.requestId,-1===t?0:-1),children:"▼"})]}):(0,a.jsx)("span",{className:"text-[10px] text-text-subtle",children:"—"})})]},e.id)})})]}),!(o.recent||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted py-4 text-center",children:"No decisions logged"})]})]}),(0,a.jsxs)(N.Zp,{padding:"md",children:[(0,a.jsx)("span",{className:"text-[13px] font-semibold",children:"Exploration log"}),(0,a.jsx)("p",{className:"text-[11px] text-text-subtle font-mono mb-2",children:"epsilon-greedy random picks (meta.exploration)"}),(0,a.jsxs)("div",{className:"space-y-1.5 max-h-48 overflow-y-auto",children:[0===(o.explorationLog||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No exploration events in this window"}),(o.explorationLog||[]).map(e=>(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 text-[11px] font-mono border-b border-border py-1",children:[(0,a.jsx)("span",{className:"text-text-muted",children:e.timestamp?.slice(0,19)?.replace("T"," ")}),(0,a.jsx)("span",{children:e.cluster||"—"}),(0,a.jsx)("span",{className:"text-primary",children:e.pickedWorker?.split("/").pop()}),(0,a.jsxs)("span",{className:"text-text-subtle",children:["score ",null!=e.outcomeScore?Math.round(e.outcomeScore):"—"]})]},`ex-${e.id}`))]})]})]})]}):(0,a.jsxs)("div",{className:"max-w-lg space-y-3",children:[(0,a.jsx)("h1",{className:"text-[17px] font-semibold",children:"Routing insights"}),(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Open from a combo card with strategy ",(0,a.jsx)("strong",{children:"Auto"}),", or append"," ",(0,a.jsx)("code",{className:"text-xs",children:"?combo=your-combo"}),"."]}),(0,a.jsx)(n(),{href:"/dashboard/combos",className:"text-sm text-primary hover:underline",children:"← Combos"})]})}function O({label:e,value:t}){return(0,a.jsxs)("div",{className:"rounded-[11px] border border-border bg-surface p-3.5",children:[(0,a.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-text-subtle mb-1.5",children:e}),(0,a.jsx)("div",{className:"font-mono text-[18px] font-semibold text-text-main",children:t})]})}},63759:(e,t,s)=>{Promise.resolve().then(s.bind(s,61872))}},e=>{e.O(0,[2574,3862,782,8500,594,136,1321,4707,5497,8441,3794,7358],()=>e(e.s=63759)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[712],{44493:(e,t,s)=>{"use strict";s.d(t,{default:()=>i});var n=s(95155),l=s(12115),r=s(35497),a=s(90620),c=s(78559);let o={LOG:"text-green-400",INFO:"text-blue-400",WARN:"text-yellow-400",ERROR:"text-red-400",DEBUG:"text-purple-400"};function i(){let[e,t]=(0,l.useState)([]),[s,i]=(0,l.useState)(!1),[d,x]=(0,l.useState)(!1),[u,m]=(0,l.useState)(0),p=(0,l.useRef)(null),h=(0,l.useRef)(null),g=async()=>{try{await fetch("/api/translator/console-logs",{method:"DELETE"})}catch(e){(0,c.s)("Failed to clear console logs:",e)}};return(0,l.useEffect)(()=>{let e=new EventSource("/api/translator/console-logs/stream");return h.current=e,e.onopen=()=>{i(!0),x(!1)},e.onmessage=e=>{let s=JSON.parse(e.data);"init"===s.type?t(s.logs.slice(-a.UY.maxLines)):"line"===s.type?t(e=>{let t=[...e,s.line];return t.length>a.UY.maxLines?t.slice(-a.UY.maxLines):t}):"lines"===s.type?t(e=>{let t=[...e,...s.lines];return t.length>a.UY.maxLines?t.slice(-a.UY.maxLines):t}):"clear"===s.type&&t([])},e.onerror=()=>{i(!1),x(!0)},()=>{e.close(),h.current=null}},[u]),(0,l.useEffect)(()=>{p.current&&(p.current.scrollTop=p.current.scrollHeight)},[e]),(0,n.jsx)("div",{className:"",children:(0,n.jsxs)(r.Zp,{children:[(0,n.jsxs)("div",{className:"flex items-center justify-end gap-2 px-4 pt-3 pb-2",children:[(0,n.jsx)("span",{className:`text-xs font-mono mr-auto ${s?"text-green-500":"text-text-muted"}`,role:"status","aria-live":"polite",children:s?"connected":d?"disconnected":"connecting"}),d&&(0,n.jsx)(r.$n,{size:"sm",variant:"outline",icon:"refresh",onClick:()=>{h.current?.close(),x(!1),i(!1),m(e=>e+1)},children:"Reconnect"}),(0,n.jsx)(r.$n,{size:"sm",variant:"outline",icon:"delete",onClick:g,children:"Clear"})]}),d&&(0,n.jsxs)("div",{role:"alert",className:"mx-4 mb-2 flex items-start gap-2 rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-500",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[16px] leading-none mt-0.5",children:"error"}),(0,n.jsx)("span",{children:"Console stream disconnected — the log view is paused and new logs are not being received."})]}),(0,n.jsx)("div",{ref:p,className:"bg-black rounded-b-lg p-4 text-xs font-mono h-[calc(100vh-220px)] overflow-y-auto","aria-label":"Console log stream",children:0===e.length?(0,n.jsx)("span",{className:"text-text-muted",children:d?"No console logs received yet (disconnected).":"No console logs yet."}):(0,n.jsx)("div",{className:"space-y-0.5",children:e.map((e,t)=>{let s,l;return(0,n.jsx)("div",{children:(l=o[(s=e.match(/\[(\w+)\]/g))?s[1]?.replace(/\[|\]/g,""):null]||"text-green-400",(0,n.jsx)("span",{className:l,children:e}))},t)})})})]})})}},63131:(e,t,s)=>{Promise.resolve().then(s.bind(s,44493))}},e=>{e.O(0,[2574,3862,782,8500,594,1321,4707,5497,8441,3794,7358],()=>e(e.s=63131)),_N_E=e.O()}]);
@@ -0,0 +1,3 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6099],{13918:(e,t,s)=>{"use strict";s.d(t,{default:()=>P});var i=s(95155),a=s(12115),n=s(14051),r=s.n(n),o=s(35625),l=s(4109),c=s(53390),u=s(31967),d=s(98216),h=s(5858),m=class extends d.Q{#e;#t=void 0;#s;#i;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,h.f8)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,h.EN)(t.mutationKey)!==(0,h.EN)(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(e){this.#a(),this.#n(e)}getCurrentResult(){return this.#t}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#a(),this.#n()}mutate(e,t){return this.#i=t,this.#s?.removeObserver(this),this.#s=this.#e.getMutationCache().build(this.#e,this.options),this.#s.addObserver(this),this.#s.execute(e)}#a(){let e=this.#s?.state??(0,c.$)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#n(e){u.jG.batch(()=>{if(this.#i&&this.hasListeners()){let t=this.#t.variables,s=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#i.onSuccess?.(e.data,t,s,i)}catch(e){Promise.reject(e)}try{this.#i.onSettled?.(e.data,null,t,s,i)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#i.onError?.(e.error,t,s,i)}catch(e){Promise.reject(e)}try{this.#i.onSettled?.(void 0,e.error,t,s,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}};function p(e,t){let s=(0,o.jE)(t),[i]=a.useState(()=>new m(s,e));a.useEffect(()=>{i.setOptions(e)},[i,e]);let n=a.useSyncExternalStore(a.useCallback(e=>i.subscribe(u.jG.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),r=a.useCallback((e,t)=>{i.mutate(e,t).catch(h.lQ)},[i]);if(n.error&&(0,h.GU)(i.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:r,mutateAsync:n.mutate}}var x=s(35497),y=s(11059);function b({label:e,url:t,copyId:s,copied:a,onCopy:n,badge:r,actions:o}){return(0,i.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,i.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center border ${"CF"===r||"TS"===r?"bg-primary/10 text-primary border-primary/25":"bg-surface-2 text-text-muted border-border"}`,children:e}),(0,i.jsx)(x.pd,{value:t,readOnly:!0,className:"flex-1 min-w-0",inputClassName:"font-mono text-sm"}),(0,i.jsx)("button",{type:"button",onClick:()=>n(t,s),className:"p-2 hover:bg-surface-2 rounded text-text-muted hover:text-primary transition-colors shrink-0 border border-transparent hover:border-border",title:"Copy","aria-label":`Copy ${e} endpoint URL`,children:(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px] leading-none",children:a===s?"check":"content_copy"})}),o]})}function f({message:e,action:t}){return(0,i.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-brand-500/10 border border-brand-500/30 text-brand-400",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[16px] shrink-0 leading-none",children:"warning"}),(0,i.jsx)("p",{className:"text-xs flex-1 text-brand-300",children:e}),t&&(0,i.jsx)("a",{href:t.href,className:"text-xs font-medium underline shrink-0 hover:opacity-80",onClick:t.href.startsWith("#")?e=>{e.preventDefault(),document.getElementById(t.href.slice(1))?.scrollIntoView({behavior:"smooth"})}:void 0,children:t.label})]})}function g(e){return String(e||"").split("\n").map(e=>e.trim()).filter(Boolean)}function v(e){return""===e?null:Number(e)}function j({apiKey:e,isOpen:t,isSaving:s,onClose:n,onSave:r}){let[o,l]=(0,a.useState)(""),[c,u]=(0,a.useState)(!0),[d,h]=(0,a.useState)(""),[m,p]=(0,a.useState)(""),[y,b]=(0,a.useState)(""),[f,C]=(0,a.useState)(""),[k,N]=(0,a.useState)(""),[w,P]=(0,a.useState)("");return(0,a.useEffect)(()=>{t&&e&&(l(e.name||""),u(!1!==e.isActive),h((e.allowedModels||[]).join("\n")),p((e.allowedCombos||[]).join("\n")),b(function(e){if(!e)return"";let t=new Date(e);return Number.isNaN(t.getTime())?"":new Date(t.getTime()-6e4*t.getTimezoneOffset()).toISOString().slice(0,16)}(e.expiresAt)),C(e.rateLimitPerMinute??""),N(e.concurrencyLimit??""),P(e.spendLimitUsd??""))},[e,t]),(0,i.jsx)(x.aF,{isOpen:t,onClose:n,title:"Edit API Key Policy",size:"lg",children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsx)(x.pd,{label:"Key name",value:o,onChange:e=>l(e.target.value)}),(0,i.jsxs)("div",{className:"flex items-center justify-between rounded-lg border border-border p-3",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("p",{className:"text-sm font-medium",children:"Active"}),(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Paused keys cannot authenticate."})]}),(0,i.jsx)(x.lM,{checked:c,onChange:u})]}),(0,i.jsxs)("label",{className:"flex flex-col gap-1.5 text-sm font-medium",children:["Allowed model IDs",(0,i.jsx)("textarea",{className:"min-h-24 rounded-lg border border-border bg-surface-2 p-3 font-mono text-sm",value:d,onChange:e=>h(e.target.value),placeholder:"openai/gpt-5\\nanthropic/claude-sonnet"}),(0,i.jsx)("span",{className:"text-xs font-normal text-text-muted",children:"One exact model ID per line. Empty allows all targets."})]}),(0,i.jsxs)("label",{className:"flex flex-col gap-1.5 text-sm font-medium",children:["Allowed combo names",(0,i.jsx)("textarea",{className:"min-h-20 rounded-lg border border-border bg-surface-2 p-3 font-mono text-sm",value:m,onChange:e=>p(e.target.value),placeholder:"fast\\nquality"}),(0,i.jsx)("span",{className:"text-xs font-normal text-text-muted",children:"One exact combo name per line."})]}),(0,i.jsx)(x.pd,{label:"Expires at",type:"datetime-local",value:y,onChange:e=>b(e.target.value)}),(0,i.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-3",children:[(0,i.jsx)(x.pd,{label:"Requests / minute",type:"number",min:"1",step:"1",value:f,onChange:e=>C(e.target.value)}),(0,i.jsx)(x.pd,{label:"Concurrent requests",type:"number",min:"1",step:"1",value:k,onChange:e=>N(e.target.value)}),(0,i.jsx)(x.pd,{label:"Spend ceiling (USD)",type:"number",min:"0",step:"0.01",value:w,onChange:e=>P(e.target.value)})]}),(0,i.jsxs)("p",{className:"text-sm text-text-muted",children:["Current spend: ",(0,i.jsxs)("span",{className:"font-mono text-text-main",children:["$",Number(e?.spentUsd||0).toFixed(4)]})]}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(x.$n,{fullWidth:!0,loading:s,disabled:s||!o.trim(),onClick:()=>r({name:o,isActive:c,allowedModels:g(d),allowedCombos:g(m),expiresAt:y?new Date(y).toISOString():null,rateLimitPerMinute:v(f),concurrencyLimit:v(k),spendLimitUsd:v(w)}),children:"Save policy"}),(0,i.jsx)(x.$n,{fullWidth:!0,variant:"ghost",disabled:s,onClick:n,children:"Cancel"})]})]})})}j.propTypes={apiKey:r().object,isOpen:r().bool.isRequired,isSaving:r().bool.isRequired,onClose:r().func.isRequired,onSave:r().func.isRequired};let C=()=>["endpoint","keys"],k=()=>["endpoint","settings"];async function N(e,t){let s=await fetch(e,{...t,headers:{"Content-Type":"application/json",...t?.headers||{}},credentials:"same-origin"}),i=null;try{i=await s.json()}catch{i=null}if(!s.ok){let e=i&&(i.error||i.message)||`Request failed (${s.status})`,t=Error("string"==typeof e?e:"Request failed");throw t.status=s.status,t.data=i,t}return i}var w=s(65921);function P({initialData:e}){let t=(0,o.jE)(),s=e?.machineId||"",n=(0,w.i)(e=>e.error),r=(0,l.I)({queryKey:C(),queryFn:async()=>{let e=async()=>(await N("/api/keys")).keys||[],t=await e();if(0===t.length)try{await N("/api/keys",{method:"POST",body:JSON.stringify({name:"Default Key"})}),t=await e()}catch{}return t},initialData:e?.keys||[]}),c=(0,l.I)({queryKey:k(),queryFn:()=>N("/api/settings"),initialData:e?.settings||{}}),u=r.data||[],d=c.data?.requireApiKey===!0,[h,m]=(0,a.useState)(!1),[g,v]=(0,a.useState)(""),[S,A]=(0,a.useState)(null),[O,I]=(0,a.useState)(null),[R,E]=(0,a.useState)(null),[M,K]=(0,a.useState)("/v1");(0,a.useEffect)(()=>{K(`${window.location.origin}/v1`)},[]);let{copied:q,copy:$}=(0,y.C)(),D=p({mutationFn:e=>N("/api/settings",{method:"PATCH",body:JSON.stringify({requireApiKey:e})}),onSuccess:()=>{t.invalidateQueries({queryKey:k()})},onError:()=>n("Failed to update API key requirement")}),F=p({mutationFn:e=>N("/api/keys",{method:"POST",body:JSON.stringify({name:e})}),onSuccess:e=>{A(e.key||null),v(""),m(!1),t.invalidateQueries({queryKey:C()})},onError:()=>n("Failed to create API key")}),L=p({mutationFn:e=>N(`/api/keys/${e}`,{method:"DELETE"}),onSuccess:()=>{t.invalidateQueries({queryKey:C()})},onError:()=>n("Failed to delete API key")}),T=p({mutationFn:({id:e,isActive:t})=>N(`/api/keys/${e}`,{method:"PUT",body:JSON.stringify({isActive:t})}),onSuccess:()=>{t.invalidateQueries({queryKey:C()})},onError:()=>n("Failed to toggle API key")}),U=p({mutationFn:({id:e,patch:t})=>N(`/api/keys/${e}`,{method:"PUT",body:JSON.stringify(t)}),onSuccess:()=>{E(null),t.invalidateQueries({queryKey:C()})},onError:()=>n("Failed to update API key policy")});return(0,i.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,i.jsxs)(x.Zp,{children:[(0,i.jsxs)("h2",{className:"text-lg font-semibold mb-4 flex items-center gap-2",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-primary",children:"api"}),"API Endpoint"]}),(0,i.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Local OpenAI-compatible base URL for coding agents and SDKs. Switchboard is local-only — no tunnels or remote exposure."}),(0,i.jsx)(b,{label:"Local",url:M,copyId:"local_url",copied:q,onCopy:$}),s?(0,i.jsxs)("p",{className:"mt-3 text-xs text-text-muted font-mono",children:["Machine: ",s]}):null]}),(0,i.jsxs)(x.Zp,{id:"require-api-key",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,i.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-primary",children:"vpn_key"}),"API Keys"]}),(0,i.jsx)(x.$n,{icon:"add",onClick:()=>m(!0),children:"Create Key"})]}),(0,i.jsxs)("div",{className:"flex items-center justify-between pb-4 mb-4 border-b border-border",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("p",{className:"font-medium",children:"Require API key"}),(0,i.jsx)("p",{className:"text-sm text-text-muted",children:"Requests without a valid key will be rejected"})]}),(0,i.jsx)(x.lM,{checked:d,onChange:()=>{d?I({title:"Disable API key protection?",message:"Any client that can reach this Switchboard endpoint will be able to use your provider accounts.",onConfirm:()=>{I(null),D.mutate(!1)}}):D.mutate(!0)},"aria-label":"Require API key"})]}),!d&&(0,i.jsx)("div",{className:"mb-4 -mt-2",children:(0,i.jsx)(f,{message:"API key is not required — any local client can call /v1."})}),0===u.length?(0,i.jsxs)("div",{className:"text-center py-12",children:[(0,i.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"vpn_key"})}),(0,i.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No API keys yet"}),(0,i.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create your first API key to get started"}),(0,i.jsx)(x.$n,{icon:"add",onClick:()=>m(!0),children:"Create Key"})]}):(0,i.jsx)("div",{className:"flex flex-col",children:u.map(e=>{let t=e.name?.trim()||e.id;return(0,i.jsxs)("div",{className:`group flex items-center justify-between py-3 border-b border-black/[0.03] dark:border-white/[0.03] last:border-b-0 ${!1===e.isActive?"opacity-60":""}`,children:[(0,i.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,i.jsx)("p",{className:"text-sm font-medium",children:e.name}),(0,i.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mt-1",children:[(0,i.jsx)("code",{className:"text-xs text-text-muted font-mono",children:e.keyPrefix}),e.rotationRequired?(0,i.jsx)("span",{className:"rounded-full bg-orange-500/10 px-2 py-0.5 text-[11px] text-orange-600",title:"This legacy key remains usable through its compatibility verifier until you create a replacement.",children:"Rotation required"}):null,e.allowedModels?.length||e.allowedCombos?.length?(0,i.jsx)("span",{className:"rounded-full bg-primary/10 px-2 py-0.5 text-[11px] text-primary",children:"Restricted targets"}):(0,i.jsx)("span",{className:"rounded-full bg-black/5 px-2 py-0.5 text-[11px] text-text-muted dark:bg-white/5",children:"All targets"}),e.rateLimitPerMinute?(0,i.jsxs)("span",{className:"rounded-full bg-black/5 px-2 py-0.5 text-[11px] text-text-muted dark:bg-white/5",children:[e.rateLimitPerMinute,"/min"]}):null,e.concurrencyLimit?(0,i.jsxs)("span",{className:"rounded-full bg-black/5 px-2 py-0.5 text-[11px] text-text-muted dark:bg-white/5",children:[e.concurrencyLimit," concurrent"]}):null,null!=e.spendLimitUsd?(0,i.jsxs)("span",{className:"rounded-full bg-black/5 px-2 py-0.5 text-[11px] text-text-muted dark:bg-white/5",children:["$",Number(e.spentUsd||0).toFixed(2)," / $",Number(e.spendLimitUsd).toFixed(2)]}):null]}),(0,i.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Created ",new Date(e.createdAt).toLocaleDateString()]}),!1===e.isActive&&(0,i.jsx)("p",{className:"text-xs text-orange-500 mt-1",children:"Paused"})]}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(x.lM,{size:"sm",checked:e.isActive??!0,onChange:s=>{e.isActive&&!s?I({title:"Pause API Key",message:`Pause API key "${t}"?
2
+
3
+ This key will stop working immediately but can be resumed later.`,onConfirm:async()=>{I(null),T.mutate({id:e.id,isActive:s})}}):T.mutate({id:e.id,isActive:s})},title:e.isActive?"Pause key":"Resume key","aria-label":e.isActive?`Pause API key ${t}`:`Resume API key ${t}`}),(0,i.jsx)("button",{type:"button",onClick:()=>E(e),className:"p-2 hover:bg-primary/10 rounded text-text-muted hover:text-primary opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",title:"Edit key policy","aria-label":`Edit API key ${t} policy`,children:(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,i.jsx)("button",{type:"button",onClick:()=>I({title:"Delete API Key",message:`Delete API key "${t}"?`,onConfirm:async()=>{I(null),L.mutate(e.id)}}),className:"p-2 hover:bg-red-500/10 rounded text-red-500 opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all","aria-label":`Delete API key ${t}`,children:(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id)})})]}),(0,i.jsx)(x.aF,{isOpen:h,title:"Create API Key",onClose:()=>{m(!1),v("")},children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsx)(x.pd,{label:"Key Name",value:g,onChange:e=>v(e.target.value),placeholder:"Production Key"}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(x.$n,{onClick:()=>F.mutate(g.trim()),fullWidth:!0,disabled:!g.trim()||F.isPending,loading:F.isPending,children:"Create"}),(0,i.jsx)(x.$n,{onClick:()=>{m(!1),v("")},variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,i.jsx)(x.aF,{isOpen:!!S,title:"API Key Created",onClose:()=>A(null),children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-4",children:[(0,i.jsx)("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 mb-2 font-medium",children:"Save this key now!"}),(0,i.jsx)("p",{className:"text-sm text-yellow-700 dark:text-yellow-300",children:"This is the only time you will see this key. Store it securely."})]}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(x.pd,{value:S||"",readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,i.jsx)(x.$n,{variant:"secondary",icon:"created_key"===q?"check":"content_copy",onClick:()=>$(S,"created_key"),children:"created_key"===q?"Copied!":"Copy"})]}),(0,i.jsx)(x.$n,{onClick:()=>A(null),fullWidth:!0,children:"Done"})]})}),(0,i.jsx)(j,{apiKey:R,isOpen:!!R,isSaving:U.isPending,onClose:()=>E(null),onSave:e=>U.mutate({id:R.id,patch:e})}),(0,i.jsx)(x.uo,{isOpen:!!O,onClose:()=>I(null),onConfirm:O?.onConfirm,title:O?.title||"Confirm",message:O?.message,variant:"danger"})]})}P.propTypes={initialData:r().shape({machineId:r().string,keys:r().array,settings:r().object}).isRequired}},53390:(e,t,s)=>{"use strict";s.d(t,{$:()=>o,s:()=>r});var i=s(31967),a=s(99190),n=s(9846),r=class extends a.k{#e;#r;#o;#l;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#o=e.mutationCache,this.#r=[],this.state=e.state||o(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#r.includes(e)||(this.#r.push(e),this.clearGcTimeout(),this.#o.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#r=this.#r.filter(t=>t!==e),this.scheduleGc(),this.#o.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#r.length||("pending"===this.state.status?this.scheduleGc():this.#o.remove(this))}continue(){return this.#l?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#c({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#l=(0,n.II)({fn:()=>this.options.mutationFn?this.options.mutationFn(e,s):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#c({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#c({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#o.canRun(this)});let i="pending"===this.state.status,a=!this.#l.canStart();try{if(i)t();else{this.#c({type:"pending",variables:e,isPaused:a}),this.#o.config.onMutate&&await this.#o.config.onMutate(e,this,s);let t=await this.options.onMutate?.(e,s);t!==this.state.context&&this.#c({type:"pending",context:t,variables:e,isPaused:a})}let n=await this.#l.start();return await this.#o.config.onSuccess?.(n,e,this.state.context,this,s),await this.options.onSuccess?.(n,e,this.state.context,s),await this.#o.config.onSettled?.(n,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(n,null,e,this.state.context,s),this.#c({type:"success",data:n}),n}catch(t){try{await this.#o.config.onError?.(t,e,this.state.context,this,s)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,s)}catch(e){Promise.reject(e)}try{await this.#o.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,s)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,s)}catch(e){Promise.reject(e)}throw this.#c({type:"error",error:t}),t}finally{this.#o.runNext(this)}}#c(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),i.jG.batch(()=>{this.#r.forEach(t=>{t.onMutationUpdate(e)}),this.#o.notify({mutation:this,type:"updated",action:e})})}};function o(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},53427:(e,t,s)=>{Promise.resolve().then(s.bind(s,13918))}},e=>{e.O(0,[2574,3862,782,8500,594,1321,4707,5497,8441,3794,7358],()=>e(e.s=53427)),_N_E=e.O()}]);