switchboard-router 0.9.8 → 0.9.10

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 (583) hide show
  1. package/app/.next/static/chunks/1321-a73f95036c368bd4.js +1 -0
  2. package/app/.next/static/chunks/1330-846d6a9e1497295e.js +7 -0
  3. package/app/.next/static/chunks/app/(dashboard)/dashboard/agent-library/page-65e302b698beee56.js +1 -0
  4. package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-337881fe6c0cc77a.js +16 -0
  5. package/app/.next/static/chunks/app/(dashboard)/dashboard/loading-c80ac975cf0f4842.js +1 -0
  6. package/app/{.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-78d098f14f8cff05.js → .next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-efb20dd903e0dc94.js} +10 -10
  7. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/page-03290d1edb08623a.js +4 -0
  8. package/app/.next/static/chunks/app/(dashboard)/dashboard/page-9bcd63bfeeac87c6.js +1 -0
  9. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-97e0f7067cab0724.js → page-ca71683d9d850162.js} +3 -3
  10. package/app/.next/static/chunks/app/(dashboard)/dashboard/pxpipe/page-c5c37fbce431369b.js +1 -0
  11. package/app/.next/static/chunks/app/(dashboard)/dashboard/skills/page-b582299fa61407d9.js +1 -0
  12. package/app/.next/static/css/92ffae29025c5847.css +1 -0
  13. package/app/.next-cli-build/BUILD_ID +1 -1
  14. package/app/.next-cli-build/app-path-routes-manifest.json +8 -8
  15. package/app/.next-cli-build/build-manifest.json +2 -2
  16. package/app/.next-cli-build/prerender-manifest.json +3 -3
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-library/page.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-library/page.js.nft.json +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-library/page_client-reference-manifest.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/routing/page.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/routing/page.js.nft.json +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/routing/page_client-reference-manifest.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +3 -3
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +10 -10
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js.nft.json +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page_client-reference-manifest.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/[id]/page.js +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/[id]/page.js.nft.json +1 -1
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/[id]/page_client-reference-manifest.js +1 -1
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  85. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  86. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  87. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  88. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  89. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  90. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  91. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  92. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  93. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  94. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  95. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  96. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  97. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  98. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  99. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  100. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  101. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  102. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  103. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  104. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  105. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  106. package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  107. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  108. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +4 -4
  109. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  110. package/app/.next-cli-build/server/app/api/agent-library/catalog/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/agent-library/doctor/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/agent-library/export/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/agent-library/mcp/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/agent-library/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/agent-library/skills/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/agent-library/sync/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/agent-library/updates/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/cli-tools/aider-settings/route.js +2 -2
  120. package/app/.next-cli-build/server/app/api/cli-tools/aider-settings/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
  122. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  124. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/claude-full-catalog/route.js +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/claude-full-catalog/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/claude-picker-labels/route.js +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/claude-picker-labels/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  133. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  137. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  139. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  141. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  143. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  145. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/gemini-cli-settings/route.js +2 -2
  147. package/app/.next-cli-build/server/app/api/cli-tools/gemini-cli-settings/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/grok-settings/route.js +2 -2
  149. package/app/.next-cli-build/server/app/api/cli-tools/grok-settings/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  151. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  153. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  155. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  157. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +1 -1
  161. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/cli-tools/picker-labels/route.js +1 -1
  163. package/app/.next-cli-build/server/app/api/cli-tools/picker-labels/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  165. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  169. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  171. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  173. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  175. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  177. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  179. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  181. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  183. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  185. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  190. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/strategy/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/strategy/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/mgmt/v1/health/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/mgmt/v1/health/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/mgmt/v1/metrics/route.js +2 -2
  208. package/app/.next-cli-build/server/app/api/mgmt/v1/metrics/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/mgmt/v1/providers/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/mgmt/v1/providers/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/mgmt/v1/routing/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/mgmt/v1/routing/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/mgmt/v1/usage/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/mgmt/v1/usage/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/mgmt/v1/version/route.js +1 -1
  216. package/app/.next-cli-build/server/app/api/mgmt/v1/version/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  226. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  228. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  232. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  234. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  237. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  246. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  258. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/batch/route.js +1 -1
  262. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/batch/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/cache/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/cache/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/prepare/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/prepare/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/remove-unavailable/route.js +1 -1
  268. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/remove-unavailable/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/route.js +1 -1
  270. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/verify/cancel/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/verify/cancel/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/verify/start/route.js +1 -1
  274. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/verify/start/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/verify/status/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/verify/status/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  280. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  282. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  286. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  289. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
  300. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  303. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/routing/feedback/route.js +1 -1
  306. package/app/.next-cli-build/server/app/api/routing/feedback/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/routing/insights/route.js +1 -1
  308. package/app/.next-cli-build/server/app/api/routing/insights/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/routing/learn/route.js +1 -1
  310. package/app/.next-cli-build/server/app/api/routing/learn/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/routing/stats/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/routing/stats/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/routing/versions/promote/route.js +1 -1
  314. package/app/.next-cli-build/server/app/api/routing/versions/promote/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/routing/versions/rollback/route.js +1 -1
  316. package/app/.next-cli-build/server/app/api/routing/versions/rollback/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  318. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  321. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/skills/[id]/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/token-saver/vault-stats/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  337. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  339. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  343. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -6
  355. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  357. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  363. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  364. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  365. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  366. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  367. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  368. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  369. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  370. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  371. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  372. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  373. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  374. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  375. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  376. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  377. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  378. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  379. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  380. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  381. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  382. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  383. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  384. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  385. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  386. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  387. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  388. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  389. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  390. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  391. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  392. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  393. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  394. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  395. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  396. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  397. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  398. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  399. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  400. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  401. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  402. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  403. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  404. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  405. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  406. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  407. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  408. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  409. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  410. package/app/.next-cli-build/server/app/callback.html +1 -1
  411. package/app/.next-cli-build/server/app/callback.rsc +4 -4
  412. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
  413. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  414. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +4 -4
  415. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  416. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  417. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  418. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  419. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
  420. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  421. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  422. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +4 -4
  423. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  424. package/app/.next-cli-build/server/app/index.html +1 -1
  425. package/app/.next-cli-build/server/app/index.rsc +4 -4
  426. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +4 -4
  427. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  428. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  429. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  430. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  431. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  432. package/app/.next-cli-build/server/app/landing.html +1 -1
  433. package/app/.next-cli-build/server/app/landing.rsc +4 -4
  434. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
  435. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  436. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +4 -4
  437. package/app/.next-cli-build/server/app/login/page.js +1 -1
  438. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  439. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  440. package/app/.next-cli-build/server/app/login.html +1 -1
  441. package/app/.next-cli-build/server/app/login.rsc +4 -4
  442. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
  443. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  444. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +4 -4
  445. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  446. package/app/.next-cli-build/server/app/page.js +1 -1
  447. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  448. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  449. package/app/.next-cli-build/server/app-paths-manifest.json +8 -8
  450. package/app/.next-cli-build/server/chunks/1158.js +1 -0
  451. package/app/.next-cli-build/server/chunks/1274.js +1 -0
  452. package/app/.next-cli-build/server/chunks/1351.js +1 -0
  453. package/app/.next-cli-build/server/chunks/1792.js +2 -0
  454. package/app/.next-cli-build/server/chunks/{159.js → 1837.js} +1 -1
  455. package/app/.next-cli-build/server/chunks/1937.js +1 -1
  456. package/app/.next-cli-build/server/chunks/1998.js +1 -1
  457. package/app/.next-cli-build/server/chunks/{3986.js → 2142.js} +2 -2
  458. package/app/.next-cli-build/server/chunks/{9508.js → 27.js} +5 -42
  459. package/app/.next-cli-build/server/chunks/3423.js +1 -0
  460. package/app/.next-cli-build/server/chunks/3446.js +1 -1
  461. package/app/.next-cli-build/server/chunks/3593.js +1 -1
  462. package/app/.next-cli-build/server/chunks/369.js +10 -10
  463. package/app/.next-cli-build/server/chunks/3735.js +2 -2
  464. package/app/.next-cli-build/server/chunks/403.js +1 -0
  465. package/app/.next-cli-build/server/chunks/4330.js +7 -0
  466. package/app/.next-cli-build/server/chunks/{940.js → 4675.js} +2 -2
  467. package/app/.next-cli-build/server/chunks/4739.js +1 -1
  468. package/app/.next-cli-build/server/chunks/4780.js +1 -1
  469. package/app/.next-cli-build/server/chunks/4803.js +1 -1
  470. package/app/.next-cli-build/server/chunks/507.js +1 -1
  471. package/app/.next-cli-build/server/chunks/5115.js +1 -0
  472. package/app/.next-cli-build/server/chunks/519.js +1 -0
  473. package/app/.next-cli-build/server/chunks/5195.js +1 -0
  474. package/app/.next-cli-build/server/chunks/5258.js +1 -1
  475. package/app/.next-cli-build/server/chunks/5717.js +9 -14
  476. package/app/.next-cli-build/server/chunks/5774.js +1 -0
  477. package/app/.next-cli-build/server/chunks/5781.js +2 -2
  478. package/app/.next-cli-build/server/chunks/5888.js +1 -1
  479. package/app/.next-cli-build/server/chunks/5920.js +2 -2
  480. package/app/.next-cli-build/server/chunks/6194.js +1 -0
  481. package/app/.next-cli-build/server/chunks/6252.js +1 -1
  482. package/app/.next-cli-build/server/chunks/6305.js +2 -0
  483. package/app/.next-cli-build/server/chunks/6328.js +1 -1
  484. package/app/.next-cli-build/server/chunks/6406.js +1 -1
  485. package/app/.next-cli-build/server/chunks/6492.js +1 -1
  486. package/app/.next-cli-build/server/chunks/{5913.js → 6757.js} +38 -1
  487. package/app/.next-cli-build/server/chunks/698.js +1 -1
  488. package/app/.next-cli-build/server/chunks/7133.js +1 -0
  489. package/app/.next-cli-build/server/chunks/7454.js +1 -1
  490. package/app/.next-cli-build/server/chunks/{3072.js → 7880.js} +2 -2
  491. package/app/.next-cli-build/server/chunks/7965.js +1 -1
  492. package/app/.next-cli-build/server/chunks/8027.js +63 -0
  493. package/app/.next-cli-build/server/chunks/8062.js +1 -1
  494. package/app/.next-cli-build/server/chunks/8400.js +12 -12
  495. package/app/.next-cli-build/server/chunks/8469.js +1 -1
  496. package/app/.next-cli-build/server/chunks/8520.js +1 -1
  497. package/app/.next-cli-build/server/chunks/869.js +1 -1
  498. package/app/.next-cli-build/server/chunks/8775.js +1 -1
  499. package/app/.next-cli-build/server/chunks/8789.js +1 -1
  500. package/app/.next-cli-build/server/chunks/8942.js +2 -2
  501. package/app/.next-cli-build/server/chunks/8976.js +1 -1
  502. package/app/.next-cli-build/server/chunks/8998.js +33 -38
  503. package/app/.next-cli-build/server/chunks/9059.js +1 -0
  504. package/app/.next-cli-build/server/chunks/9091.js +3 -3
  505. package/app/.next-cli-build/server/chunks/9261.js +2 -2
  506. package/app/.next-cli-build/server/chunks/9264.js +2 -2
  507. package/app/.next-cli-build/server/chunks/9421.js +2 -2
  508. package/app/.next-cli-build/server/chunks/static/media/versions.4155c5ec.json +24 -0
  509. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  510. package/app/.next-cli-build/server/middleware.js +11 -16
  511. package/app/.next-cli-build/server/pages/404.html +1 -1
  512. package/app/.next-cli-build/server/pages/500.html +1 -1
  513. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  514. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  515. package/app/.next-cli-build/static/chunks/1321-a73f95036c368bd4.js +1 -0
  516. package/app/.next-cli-build/static/chunks/1330-846d6a9e1497295e.js +7 -0
  517. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/agent-library/page-65e302b698beee56.js +1 -0
  518. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-337881fe6c0cc77a.js +16 -0
  519. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/loading-c80ac975cf0f4842.js +1 -0
  520. package/app/{.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-78d098f14f8cff05.js → .next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-efb20dd903e0dc94.js} +10 -10
  521. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/page-03290d1edb08623a.js +4 -0
  522. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-9bcd63bfeeac87c6.js +1 -0
  523. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-97e0f7067cab0724.js → page-ca71683d9d850162.js} +3 -3
  524. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/pxpipe/page-c5c37fbce431369b.js +1 -0
  525. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-b582299fa61407d9.js +1 -0
  526. package/app/.next-cli-build/static/css/92ffae29025c5847.css +1 -0
  527. package/app/open-sse/identity/snapshots/versions.json +9 -5
  528. package/app/open-sse/identity/tls/bin/darwin/arm64/switchboard-claude-tls +0 -0
  529. package/app/open-sse/identity/tls/bin/darwin/x64/switchboard-claude-tls +0 -0
  530. package/app/open-sse/identity/tls/bin/linux/arm64/switchboard-claude-tls +0 -0
  531. package/app/open-sse/identity/tls/bin/linux/x64/switchboard-claude-tls +0 -0
  532. package/app/open-sse/identity/tls/bin/win32/arm64/switchboard-claude-tls.exe +0 -0
  533. package/app/open-sse/identity/tls/bin/win32/x64/switchboard-claude-tls.exe +0 -0
  534. package/app/package.json +1 -1
  535. package/app/public/i18n/literals/zh-CN.json +17 -1
  536. package/app/src/lib/updater/updater.js +7 -2
  537. package/cli.js +85 -33
  538. package/hooks/trayRuntime.js +72 -17
  539. package/package.json +1 -1
  540. package/src/cli/api/client.js +9 -3
  541. package/src/cli/cliOptions.js +1 -1
  542. package/src/cli/processManager.js +61 -1
  543. package/src/cli/serverStatus.js +66 -4
  544. package/src/cli/terminalUI.js +5 -2
  545. package/src/cli/tray/autostart.js +20 -4
  546. package/src/cli/tray/tray.js +4 -1
  547. package/src/cli/utils/display.js +20 -0
  548. package/app/.next/static/chunks/1321-0003ef56aef2b3ab.js +0 -1
  549. package/app/.next/static/chunks/1330-56405eca78b12fee.js +0 -7
  550. package/app/.next/static/chunks/app/(dashboard)/dashboard/agent-library/page-40f3ca16440f8e17.js +0 -1
  551. package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-ca47b09e6ed6ae7b.js +0 -16
  552. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/page-ff13a39fb7744f5e.js +0 -4
  553. package/app/.next/static/chunks/app/(dashboard)/dashboard/page-86cd6523dcd61f1b.js +0 -1
  554. package/app/.next/static/chunks/app/(dashboard)/dashboard/pxpipe/page-1805f993834a1adb.js +0 -1
  555. package/app/.next/static/chunks/app/(dashboard)/dashboard/skills/page-645e7c5ec034fe8c.js +0 -1
  556. package/app/.next/static/css/196a6347b9104610.css +0 -1
  557. package/app/.next-cli-build/server/chunks/1350.js +0 -1
  558. package/app/.next-cli-build/server/chunks/1656.js +0 -2
  559. package/app/.next-cli-build/server/chunks/194.js +0 -1
  560. package/app/.next-cli-build/server/chunks/3026.js +0 -1
  561. package/app/.next-cli-build/server/chunks/5616.js +0 -1
  562. package/app/.next-cli-build/server/chunks/6052.js +0 -2
  563. package/app/.next-cli-build/server/chunks/6182.js +0 -63
  564. package/app/.next-cli-build/server/chunks/6274.js +0 -1
  565. package/app/.next-cli-build/server/chunks/6347.js +0 -1
  566. package/app/.next-cli-build/server/chunks/849.js +0 -1
  567. package/app/.next-cli-build/server/chunks/8658.js +0 -1
  568. package/app/.next-cli-build/server/chunks/8834.js +0 -7
  569. package/app/.next-cli-build/server/chunks/9617.js +0 -1
  570. package/app/.next-cli-build/server/chunks/static/media/versions.401d57e8.json +0 -20
  571. package/app/.next-cli-build/static/chunks/1321-0003ef56aef2b3ab.js +0 -1
  572. package/app/.next-cli-build/static/chunks/1330-56405eca78b12fee.js +0 -7
  573. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/agent-library/page-40f3ca16440f8e17.js +0 -1
  574. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-ca47b09e6ed6ae7b.js +0 -16
  575. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/page-ff13a39fb7744f5e.js +0 -4
  576. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-86cd6523dcd61f1b.js +0 -1
  577. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/pxpipe/page-1805f993834a1adb.js +0 -1
  578. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-645e7c5ec034fe8c.js +0 -1
  579. package/app/.next-cli-build/static/css/196a6347b9104610.css +0 -1
  580. /package/app/.next/static/{Kxe3gixpS84MCzX8yohZb → pVi5nGAVrNaYdEp0c24Nk}/_buildManifest.js +0 -0
  581. /package/app/.next/static/{Kxe3gixpS84MCzX8yohZb → pVi5nGAVrNaYdEp0c24Nk}/_ssgManifest.js +0 -0
  582. /package/app/.next-cli-build/static/{Kxe3gixpS84MCzX8yohZb → pVi5nGAVrNaYdEp0c24Nk}/_buildManifest.js +0 -0
  583. /package/app/.next-cli-build/static/{Kxe3gixpS84MCzX8yohZb → pVi5nGAVrNaYdEp0c24Nk}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6897],{5194:(e,t,s)=>{Promise.resolve().then(s.bind(s,94091))},35497:(e,t,s)=>{"use strict";s.d(t,{x0:()=>k.default,Ex:()=>o.default,$n:()=>a.default,nh:()=>$.default,Zp:()=>i.default,Qv:()=>d.CardSkeleton,CK:()=>h.default,uo:()=>n.ConfirmModal,G9:()=>f.default,wI:()=>w.default,vj:()=>v.default,vE:()=>j.default,pd:()=>r.default,Mh:()=>y.default,uR:()=>p.default,Nf:()=>u.default,aF:()=>n.default,rq:()=>m.default,gw:()=>N.default,LF:()=>x.default,Wx:()=>P.default,gM:()=>g.default,Iz:()=>C.default,l6:()=>l.default,lM:()=>c.default,m_:()=>S.default,jK:()=>b.default});var a=s(92542),r=s(11910),l=s(98),i=s(84588),n=s(81127),d=s(25086);s(56319);var o=s(56061),c=s(98542);s(38587),s(21110),s(92622),s(8823),s(92173);var x=s(90882),m=s(72908),p=s(28815),h=s(45455),u=s(28058),b=s(4809);s(21931),s(80752),s(40197);var g=s(23615);s(44736);var y=s(62899);s(94230);var f=s(30815),j=s(23936),v=s(95088),w=s(73579),k=s(96748),N=s(4823),C=s(28067),S=s(97677),P=s(51825),$=s(29366);s(76361),s(91450)},94091:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var a=s(95155),r=s(12115),l=s(35497),i=s(77251);function n(){let e,t,[s,n]=(0,r.useState)(null),[o,c]=(0,r.useState)(!0),[x,m]=(0,r.useState)(""),[p,h]=(0,r.useState)(null),[u,b]=(0,r.useState)(null),[g,y]=(0,r.useState)(null),[f,j]=(0,r.useState)("overview");(0,r.useEffect)(()=>{{let e=new URLSearchParams(window.location.search).get("tab");e&&["overview","skills","mcp","catalog","advanced"].includes(e)&&j(e)}},[]);let[v,w]=(0,r.useState)({id:"",name:"",transport:"stdio",command:"npx",args:"-y @modelcontextprotocol/server-filesystem .",url:"",notes:""}),[k,N]=(0,r.useState)([]),[C,S]=(0,r.useState)([]),[P,$]=(0,r.useState)(""),[E,I]=(0,r.useState)([]),[O,T]=(0,r.useState)(""),[M,z]=(0,r.useState)(""),[A,L]=(0,r.useState)(""),[U,R]=(0,r.useState)(""),[Z,D]=(0,r.useState)(!1),[J,G]=(0,r.useState)(""),[_,F]=(0,r.useState)(""),[H,K]=(0,r.useState)({}),[Q,W]=(0,r.useState)(null),[q,B]=(0,r.useState)(!1),[Y,V]=(0,r.useState)(""),X=(0,r.useCallback)(async()=>{c(!0);try{let e=await fetch("/api/agent-library",{cache:"no-store"}),t=await e.json();if(!e.ok)throw Error(t.error||"Load failed");n(t)}catch(e){h({type:"error",text:e.message})}finally{c(!1)}},[]),ee=(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;K(s)}catch{}},[]);(0,r.useEffect)(()=>{X(),ee(),fetch("/api/agent-library/catalog").then(e=>e.json()).then(e=>{N(e.presets||[]),S(e.mcpPresets||[])}).catch(()=>{})},[X,ee]);let et=s?.settings||{},es=s?.agents||{};async function ea(e){m("settings"),h(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");h({type:"success",text:"Settings saved"}),await X()}catch(e){h({type:"error",text:e.message})}finally{m("")}}async function er(e){m(e),h(null),y(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");y(s),h({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 X()}catch(e){h({type:"error",text:e.message})}finally{m("")}}async function el(){m("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");b(t),h({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){h({type:"error",text:e.message})}finally{m("")}}async function ei(e){e?.preventDefault?.(),m("mcp");try{let e=v.args?v.args.split(/\s+/).filter(Boolean):[],t=await fetch("/api/agent-library/mcp",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:v.id,name:v.name||v.id,transport:v.transport,command:"stdio"===v.transport?v.command:void 0,args:"stdio"===v.transport?e:void 0,url:"stdio"!==v.transport?v.url:void 0,notes:v.notes})}),s=await t.json();if(!t.ok)throw Error(s.error||"MCP save failed");s.warnings?.length?h({type:"warn",text:s.warnings.join(" \xb7 ")}):h({type:"success",text:`MCP ${s.server?.id} saved (Apply to project)`}),w({id:"",name:"",transport:"stdio",command:"npx",args:"",url:"",notes:""}),await X()}catch(e){h({type:"error",text:e.message})}finally{m("")}}async function en(e){m(`mcp-preset-${e.id}`),h(null);try{let t=await fetch("/api/agent-library/mcp",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e.id,name:e.name||e.id,transport:e.transport||"stdio",command:e.command,args:e.args,url:e.url,env:e.env,notes:e.notes})}),s=await t.json();if(!t.ok)throw Error(s.error||"MCP preset save failed");h({type:"success",text:`MCP ${s.server?.id||e.id} saved to library. Click Apply sync to project to agents.`}),await X()}catch(e){h({type:"error",text:e.message})}finally{m("")}}function ed(e){w({id:e.id,name:e.name||e.id,transport:e.transport||"stdio",command:e.command||"npx",args:(e.args||[]).join(" "),url:e.url||"",notes:e.notes||""}),h({type:"success",text:`Loaded ${e.name} into form below. Edit parameters as needed and click Save.`})}async function eo(e){if(await (0,i.l)({message:`Remove MCP ${e} from library? (targets updated on next Apply)`,confirmText:"Continue"})){m("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);h({type:"success",text:"MCP removed from library"}),await X()}catch(e){h({type:"error",text:e.message})}finally{m("")}}}async function ec(e){if(await (0,i.l)({message:`Remove skill ${e} from library?`,confirmText:"Continue"})){m("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);h({type:"success",text:"Skill removed from library"}),await X(),await ee()}catch(e){h({type:"error",text:e.message})}finally{m("")}}}async function ex(){m("skill-add");try{let e=await fetch("/api/agent-library/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:J,markdown:_,source:"manual"})}),t=await e.json();if(!e.ok)throw Error(t.error);h({type:"success",text:`Skill ${t.id} installed in library`}),G(""),F(""),await X()}catch(e){h({type:"error",text:e.message})}finally{m("")}}async function em(e){m("upd-preview"),B(!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");W({id:e,markdown:s.markdown,contentHash:s.contentHash})}catch(e){h({type:"error",text:e.message})}finally{m("")}}async function ep(){if(Q){m("upd-apply");try{let e=await fetch("/api/agent-library/updates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"update",skillId:Q.id,confirmed:q,expectedHash:Q.contentHash})}),t=await e.json();if(!e.ok||!t.ok)throw Error(t.message||t.error||"Update failed");h({type:"success",text:t.warning||`Updated ${t.id}`}),W(null),B(!1),await X(),await ee()}catch(e){h({type:"error",text:e.message})}finally{m("")}}}async function eh(e){if(e?.preventDefault?.(),P.trim()){m("resolve"),h(null),T("");try{let e=await fetch("/api/agent-library/catalog",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"resolve",input:P.trim()})}),t=await e.json();if(!e.ok||!t.ok)throw Error(t.message||t.error||"Resolution failed");let s=t.skills||[];I(s),1===s.length?(L(s[0].skillId),z(s[0].rawUrl),R(s[0].preview||""),D(!1),h({type:"success",text:`Resolved skill: ${s[0].skillId}`})):s.length>1&&(L(""),z(""),R(""),D(!1),h({type:"success",text:`Found ${s.length} skills in ${t.repo||"repository"}. Select one below.`}))}catch(e){h({type:"error",text:e.message})}finally{m("")}}}async function eu(e){m("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");R(s.preview||""),h({type:"success",text:`Preview loaded (${s.bytes} bytes)`})}catch(e){h({type:"error",text:e.message})}finally{m("")}}async function eb(){m("catalog");try{let e=await fetch("/api/agent-library/catalog",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"install",skillId:A,url:M,confirmed:Z})}),t=await e.json();if(!e.ok)throw Error(t.message||t.error||"Install failed");T(t.id||A),h({type:"success",text:t.warning||`Installed ${t.id}`}),D(!1),await X(),await ee()}catch(e){h({type:"error",text:e.message})}finally{m("")}}async function eg(){m("export");try{let e=await fetch("/api/agent-library/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({destPath:Y||void 0})}),t=await e.json();if(!e.ok)throw Error(t.message||t.error||"Export failed");h({type:"success",text:`Exported AgentSync layout to ${t.path}`})}catch(e){h({type:"error",text:e.message})}finally{m("")}}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."]})]}),p&&(0,a.jsx)("div",{className:`text-xs px-3 py-2 rounded-lg border ${"success"===p.type?"bg-green-500/10 border-green-500/30 text-green-600 dark:text-green-400":"warn"===p.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:p.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!==et.enabled,disabled:!!x,onChange:e=>ea({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:!!x||!1===et.enabled,loading:"dry-run"===x,onClick:()=>er("dry-run"),children:"Dry-run"}),(0,a.jsx)(l.$n,{size:"sm",disabled:!!x||!1===et.enabled,loading:"apply"===x,onClick:()=>er("apply"),children:"Apply sync"}),(0,a.jsx)(l.$n,{size:"sm",variant:"outline",disabled:!!x,loading:"doctor"===x,onClick:el,children:"Doctor"})]})]}),(0,a.jsxs)("p",{className:"text-[11px] text-text-subtle mt-2 font-mono break-all",children:["Library: ",s?.libraryRoot||"…",et.linkMode?` \xb7 mode=${et.linkMode}`:"",et.scope?` \xb7 scope=${et.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:()=>j(e.id),className:`px-3 py-2 text-xs font-medium rounded-t-md transition-colors ${f===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))}),o&&(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…"]}),!o&&"overview"===f&&(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(es).map(e=>{let t=et.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||!!x,onChange:s=>ea({targets:{...et.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||!!x,onChange:s=>ea({targets:{...et.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:et.linkMode||"copy",disabled:!!x,onChange:e=>ea({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:et.scope||"global",disabled:!!x,onChange:e=>ea({scope:e.target.value,projectPath:"project"===e.target.value?et.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"===et.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:et.projectPath||"",placeholder:"/Users/you/my-app",disabled:!!x,onChange:e=>ea({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!==et.neverOverwriteUser,disabled:!!x,onChange:async e=>{e.target.checked?ea({neverOverwriteUser:!0}):await (0,i.l)({message:"Allow overwriting paths that are NOT Switchboard-managed? This can replace your personal skills/MCP. Continue?",confirmText:"Continue"})&&ea({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!==et.includeProductSkills,disabled:!!x,onChange:e=>ea({includeProductSkills:e.target.checked})}),(0,a.jsx)("span",{className:"text-text-muted",children:"Auto-include Switchboard product skills (entry + chat)"})]})]})]}),(0,a.jsx)(l.Zp,{padding:"md",className:"border-primary/20 bg-primary/5",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,a.jsxs)("div",{className:"space-y-1 max-w-xl",children:[(0,a.jsxs)("div",{className:"text-xs font-semibold text-text-main flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"hub"}),"Featured: Executor.sh Tool Gateway & MCP Presets"]}),(0,a.jsxs)("p",{className:"text-[11px] text-text-muted leading-relaxed",children:["Connect your AI agents to OpenAPI, GraphQL, MCP servers, and custom JavaScript functions via ",(0,a.jsx)("strong",{children:"Executor.sh"})," (",(0,a.jsx)("code",{className:"font-mono text-primary",children:"npx -y executor mcp"}),")."]})]}),(0,a.jsx)(l.$n,{size:"sm",variant:"primary",onClick:()=>j("mcp"),children:"Manage MCP Gateways"})]})}),(0,a.jsxs)("div",{className:"grid sm:grid-cols-3 gap-3",children:[(0,a.jsx)(d,{label:"Skills in library",value:String(s?.skills?.length??0)}),(0,a.jsx)(d,{label:"MCP servers",value:String(s?.mcpServers?.length??0)}),(0,a.jsx)(d,{label:"Last sync",value:s?.state?.lastSync?.at?new Date(s.state.lastSync.at).toLocaleString():"—"})]}),g&&(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(g.summary||g,null,2)}),g.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:g.skills.filter(e=>"conflict"===e.action).map((e,t)=>(0,a.jsxs)("li",{children:[e.agent,"/",e.skillId,": ",e.message||e.reason]},t))})]})]}),u&&(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main mb-2",children:"Doctor"}),u.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:u.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))})]})]}),!o&&"skills"===f&&(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:!!x,onClick:async()=>{m("upd-check");try{await ee(),h({type:"success",text:"Update check complete"})}finally{m("")}},children:"Check updates"}),(0,a.jsx)(l.$n,{size:"sm",variant:"secondary",disabled:!!x,onClick:async()=>{m("ensure");try{await fetch("/api/agent-library/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"ensure_product"})}),await X(),h({type:"success",text:"Product skills ensured"})}finally{m("")}},children:"Refresh product skills"})]})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(s?.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]})}),H[e.id]?.status==="update"&&(0,a.jsx)(l.Ex,{size:"sm",variant:"warning",children:"update available"}),H[e.id]?.status==="error"&&(0,a.jsx)("span",{className:"text-[10px] text-text-subtle",title:H[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:[H[e.id]?.status==="update"&&(0,a.jsx)(l.$n,{size:"sm",variant:"secondary",disabled:!!x,loading:"upd-preview"===x&&Q?.id!==e.id,onClick:()=>em(e.id),children:"Update"}),(0,a.jsx)(l.$n,{size:"sm",variant:"ghost",disabled:!!x,onClick:()=>ec(e.id),children:"Remove"})]})]},e.id)),!s?.skills?.length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No skills yet. Enable product skills or add manually."})]})]}),Q&&(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:Q.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:Q.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:q,onChange:e=>B(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:!q||!!x,loading:"upd-apply"===x,onClick:ep,children:"Apply update"}),(0,a.jsx)(l.$n,{size:"sm",variant:"ghost",disabled:!!x,onClick:()=>{W(null),B(!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:J,onChange:e=>G(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:_,onChange:e=>F(e.target.value)}),(0,a.jsx)(l.$n,{size:"sm",disabled:!J||!_||!!x,loading:"skill-add"===x,onClick:ex,children:"Add to library"})]})]})]}),!o&&"mcp"===f&&(0,a.jsxs)("div",{className:"space-y-4",children:[(e=C.find(e=>"executor"===e.id)||{id:"executor",name:"Executor.sh (Tool Gateway)",description:"Unified MCP tool gateway for OpenAPI, GraphQL, MCP servers & sandboxed JavaScript functions (executor.sh)",transport:"stdio",command:"npx",args:["-y","executor","mcp"],notes:"Executor.sh tool execution gateway (https://executor.sh)",docsUrl:"https://executor.sh"},t=(s?.mcpServers||[]).some(e=>"executor"===e.id||"sb-executor"===e.id),(0,a.jsx)(l.Zp,{padding:"md",className:"border-primary/30 bg-primary/5",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"space-y-1 max-w-xl",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px]",children:"hub"}),(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"Executor.sh Tool Gateway"}),(0,a.jsx)(l.Ex,{variant:"primary",size:"sm",children:"FEATURED GATEWAY"}),t&&(0,a.jsx)(l.Ex,{variant:"default",size:"sm",children:"Installed in Library"})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted leading-relaxed",children:"Connect your AI agents to OpenAPI, GraphQL, MCP servers, and custom JavaScript functions through a single managed endpoint with local-first credential management."}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3 pt-1 text-[11px] font-mono text-text-subtle",children:[(0,a.jsxs)("span",{children:["Command: ",(0,a.jsx)("code",{className:"text-text-main",children:"npx -y executor mcp"})]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("a",{href:"https://executor.sh",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline inline-flex items-center gap-0.5",children:["executor.sh docs",(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"open_in_new"})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 shrink-0",children:[(0,a.jsx)(l.$n,{size:"sm",variant:t?"outline":"primary",disabled:t||!!x,loading:"mcp-preset-executor"===x,onClick:()=>en(e),children:t?"Installed":"Add Executor Gateway"}),(0,a.jsx)(l.$n,{size:"sm",variant:"secondary",disabled:!!x,onClick:()=>ed(e),children:"Customize"})]})]})})),C.filter(e=>"executor"!==e.id).length>0&&(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main mb-1",children:"Popular MCP Server Presets"}),(0,a.jsx)("p",{className:"text-[11px] text-text-subtle mb-3",children:"1-click presets for common Model Context Protocol servers."}),(0,a.jsx)("div",{className:"grid gap-2 sm:grid-cols-3",children:C.filter(e=>"executor"!==e.id).map(e=>{let t=(s?.mcpServers||[]).some(t=>t.id===e.id||t.id===`sb-${e.id}`);return(0,a.jsxs)("div",{className:"p-3 rounded-lg border border-border-subtle bg-surface-2/40 hover:bg-surface-2/70 flex flex-col justify-between gap-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-1",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main",children:e.name}),t&&(0,a.jsx)(l.Ex,{size:"sm",variant:"default",children:"Installed"})]}),(0,a.jsx)("p",{className:"text-[11px] text-text-muted mt-1 line-clamp-2",children:e.description})]}),(0,a.jsxs)("div",{className:"flex gap-1.5 pt-1",children:[(0,a.jsx)(l.$n,{size:"sm",variant:"secondary",disabled:t||!!x,loading:x===`mcp-preset-${e.id}`,onClick:()=>en(e),children:t?"Installed":"Add"}),(0,a.jsx)(l.$n,{size:"sm",variant:"ghost",disabled:!!x,onClick:()=>ed(e),children:"Customize"})]})]},e.id)})})]}),(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:[(s?.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:()=>eo(e.id),children:"Remove"})]},e.id)),!s?.mcpServers?.length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No MCP servers in library yet. Add Executor.sh or another preset above."})]})]}),(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main mb-3",children:"Add Custom MCP server"}),(0,a.jsxs)("form",{className:"grid gap-2 sm:grid-cols-2",onSubmit:ei,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:v.id,onChange:e=>w({...v,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:v.name,onChange:e=>w({...v,name:e.target.value})}),(0,a.jsxs)("select",{className:"bg-surface border border-border rounded-md px-2 py-1.5 text-xs",value:v.transport,onChange:e=>w({...v,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"===v.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:v.command,onChange:e=>w({...v,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:v.args,onChange:e=>w({...v,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:v.url,onChange:e=>w({...v,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"===x,disabled:!!x,children:"Save to library"})})]})]})]}),!o&&"catalog"===f&&(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:"Smart Import (Command, Repo, or URL)"}),(0,a.jsxs)("p",{className:"text-[11px] text-text-subtle mb-3",children:["Paste CLI commands like ",(0,a.jsx)("code",{className:"font-mono text-primary",children:"npx skills add citrolabs/ego-lite"}),", GitHub repositories like ",(0,a.jsx)("code",{className:"font-mono text-primary",children:"citrolabs/ego-lite"}),", or direct ",(0,a.jsx)("code",{className:"font-mono text-primary",children:"SKILL.md"})," URLs."]}),(0,a.jsxs)("form",{onSubmit:eh,className:"space-y-2.5",children:[(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{className:"flex-1 bg-surface border border-border rounded-md px-2.5 py-1.5 text-xs font-mono text-text-main placeholder:text-text-subtle",placeholder:"e.g. npx skills add citrolabs/ego-lite, anthropics/skills, or https://github.com/...",value:P,disabled:!!x,onChange:e=>{$(e.target.value),T("")}}),(0,a.jsx)(l.$n,{size:"sm",type:"submit",disabled:!P.trim()||!!x,loading:"resolve"===x,children:"Resolve & Preview"}),P&&(0,a.jsx)(l.$n,{size:"sm",variant:"ghost",disabled:!!x,onClick:()=>{$(""),I([]),L(""),z(""),R(""),D(!1),T("")},children:"Clear"})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 text-[11px] text-text-subtle pt-1",children:[(0,a.jsx)("span",{className:"font-medium text-text-muted",children:"Quick try:"}),["npx skills add citrolabs/ego-lite","anthropics/skills","citrolabs/ego-lite"].map(e=>(0,a.jsx)("button",{type:"button",className:"px-2 py-0.5 rounded border border-border-subtle bg-surface-2 hover:bg-surface text-text-main hover:border-primary font-mono text-[10px] transition-colors cursor-pointer",disabled:!!x,onClick:()=>{$(e),T(""),m("resolve"),h(null),fetch("/api/agent-library/catalog",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"resolve",input:e})}).then(e=>e.json()).then(e=>{if(!e.ok)throw Error(e.message||e.error||"Resolution failed");let t=e.skills||[];I(t),1===t.length?(L(t[0].skillId),z(t[0].rawUrl),R(t[0].preview||""),D(!1),h({type:"success",text:`Resolved skill: ${t[0].skillId}`})):t.length>1&&(L(""),z(""),R(""),D(!1),h({type:"success",text:`Found ${t.length} skills in ${e.repo||"repository"}. Select one below.`}))}).catch(e=>h({type:"error",text:e.message})).finally(()=>m(""))},children:e},e))]})]}),E.length>1&&(0,a.jsxs)("div",{className:"mt-4 pt-3 border-t border-border-subtle space-y-2",children:[(0,a.jsxs)("div",{className:"text-xs font-medium text-text-main flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"folder_open"}),"Found ",E.length," skills in repository:"]}),(0,a.jsx)("div",{className:"grid gap-2 sm:grid-cols-2",children:E.map(e=>(0,a.jsxs)("div",{className:`p-2.5 rounded-lg border transition-all text-xs cursor-pointer ${M===e.rawUrl?"border-primary bg-primary/5 shadow-sm":"border-border-subtle hover:border-border bg-surface-2/40"}`,onClick:()=>{L(e.skillId),z(e.rawUrl),D(!1),e.preview?R(e.preview):eu(e.rawUrl)},children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-1",children:[(0,a.jsx)("span",{className:"font-semibold text-text-main",children:e.title||e.skillId}),(0,a.jsx)(l.Ex,{size:"sm",variant:M===e.rawUrl?"primary":"default",children:(0,a.jsxs)("code",{className:"text-[10px]",children:["sb-",e.skillId]})})]}),(0,a.jsx)("div",{className:"text-[11px] font-mono text-text-subtle mt-1 truncate",children:e.path}),e.description&&(0,a.jsx)("p",{className:"text-[11px] text-text-muted mt-1 line-clamp-2",children:e.description})]},e.path||e.skillId))})]}),M&&(0,a.jsxs)("div",{className:"mt-4 pt-3 border-t border-border-subtle space-y-3",children:[(0,a.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2",children:[(0,a.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,a.jsxs)("span",{className:"text-[11px] text-text-muted",children:["Skill ID (installed as sb-",A||"...",")"]}),(0,a.jsx)("input",{className:"w-full bg-surface border border-border rounded-md px-2 py-1.5 text-xs font-mono text-text-main",placeholder:"skill-id",value:A,disabled:!!x,onChange:e=>L(e.target.value)})]}),(0,a.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,a.jsx)("span",{className:"text-[11px] text-text-muted",children:"Resolved Raw Source URL"}),(0,a.jsx)("input",{className:"w-full bg-surface border border-border rounded-md px-2 py-1.5 text-xs font-mono text-text-main",placeholder:"https://.../SKILL.md",value:M,disabled:!!x,onChange:e=>z(e.target.value)})]})]}),U?(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("span",{className:"text-[11px] text-text-muted",children:"SKILL.md preview:"}),(0,a.jsx)("pre",{className:"text-[10px] font-mono max-h-56 overflow-auto bg-surface-2 p-2.5 rounded-lg border border-border-subtle whitespace-pre-wrap",children:U})]}):(0,a.jsx)(l.$n,{size:"sm",variant:"secondary",disabled:!M||!!x,loading:"preview"===x,onClick:()=>eu(M),children:"Load Preview"}),(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:Z,disabled:!!x,onChange:e=>D(e.target.checked)}),(0,a.jsx)("span",{children:"I reviewed this skill and understand it may instruct agents to run tools or shell commands."})]}),(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsx)(l.$n,{size:"sm",disabled:!M||!A||!Z||!!x,loading:"catalog"===x,onClick:eb,children:"Install into library"})})]}),O&&(0,a.jsxs)("div",{className:"mt-4 p-3 rounded-lg bg-green-500/10 border border-green-500/30 flex flex-wrap items-center justify-between gap-3",children:[(0,a.jsxs)("div",{className:"text-xs text-green-700 dark:text-green-300",children:[(0,a.jsx)("strong",{children:O})," is installed in your Switchboard library. Apply sync to project it into Claude, Codex, Gemini, OpenCode, and Cursor."]}),(0,a.jsx)(l.$n,{size:"sm",variant:"primary",loading:"apply"===x,disabled:!!x,onClick:()=>er("apply"),children:"Apply sync to all agents now"})]})]}),(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:"One-click standard skills from official sources."}),(0,a.jsx)("div",{className:"space-y-2",children:k.map(e=>(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 p-2.5 rounded-lg border border-border-subtle bg-surface-2/40 hover:bg-surface-2/70 transition-colors",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-xs font-semibold 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.5",children:[(0,a.jsx)(l.$n,{size:"sm",variant:"ghost",onClick:()=>{$(e.rawUrl),z(e.rawUrl),L(e.skillId),I([]),T(""),eu(e.rawUrl)},children:"Preview"}),(0,a.jsx)(l.$n,{size:"sm",variant:"secondary",onClick:()=>{$(e.rawUrl),z(e.rawUrl),L(e.skillId),I([]),D(!1),T(""),eu(e.rawUrl)},children:"Select"})]})]},e.id))})]})]}),!o&&"advanced"===f&&(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:!!x,loading:"clean"===x,onClick:async()=>{await (0,i.l)({message:"Remove all Switchboard-managed skill/MCP projections from targets?",confirmText:"Continue"})&&er("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:Y,onChange:e=>V(e.target.value)}),(0,a.jsx)(l.$n,{size:"sm",variant:"secondary",disabled:!!x,loading:"export"===x,onClick:eg,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,1330,8441,3794,7358],()=>e(e.s=5194)),_N_E=e.O()}]);
@@ -1,16 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6099],{35497:(e,t,s)=>{"use strict";s.d(t,{x0:()=>C.default,Ex:()=>d.default,$n:()=>a.default,nh:()=>P.default,Zp:()=>r.default,Qv:()=>l.CardSkeleton,CK:()=>p.default,uo:()=>o.ConfirmModal,G9:()=>g.default,wI:()=>k.default,vj:()=>j.default,vE:()=>v.default,pd:()=>i.default,Mh:()=>f.default,uR:()=>h.default,Nf:()=>x.default,aF:()=>o.default,rq:()=>m.default,gw:()=>N.default,LF:()=>u.default,Wx:()=>A.default,gM:()=>b.default,Iz:()=>w.default,l6:()=>n.default,lM:()=>c.default,m_:()=>S.default,jK:()=>y.default});var a=s(92542),i=s(11910),n=s(98),r=s(84588),o=s(81127),l=s(25086);s(56319);var d=s(56061),c=s(98542);s(38587),s(21110),s(92622),s(8823),s(92173);var u=s(90882),m=s(72908),h=s(28815),p=s(45455),x=s(28058),y=s(4809);s(21931),s(80752),s(40197);var b=s(23615);s(44736);var f=s(62899);s(94230);var g=s(30815),v=s(23936),j=s(95088),k=s(73579),C=s(96748),N=s(4823),w=s(28067),S=s(97677),A=s(51825),P=s(29366);s(76361),s(91450)},53390:(e,t,s)=>{"use strict";s.d(t,{$:()=>o,s:()=>r});var a=s(31967),i=s(99190),n=s(9846),r=class extends i.k{#e;#t;#s;#a;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#s=e.mutationCache,this.#t=[],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.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||("pending"===this.state.status?this.scheduleGc():this.#s.remove(this))}continue(){return this.#a?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#a=(0,n.II)({fn:()=>this.options.mutationFn?this.options.mutationFn(e,s):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#i({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#i({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});let a="pending"===this.state.status,i=!this.#a.canStart();try{if(a)t();else{this.#i({type:"pending",variables:e,isPaused:i}),this.#s.config.onMutate&&await this.#s.config.onMutate(e,this,s);let t=await this.options.onMutate?.(e,s);t!==this.state.context&&this.#i({type:"pending",context:t,variables:e,isPaused:i})}let n=await this.#a.start();return await this.#s.config.onSuccess?.(n,e,this.state.context,this,s),await this.options.onSuccess?.(n,e,this.state.context,s),await this.#s.config.onSettled?.(n,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(n,null,e,this.state.context,s),this.#i({type:"success",data:n}),n}catch(t){try{await this.#s.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.#s.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.#i({type:"error",error:t}),t}finally{this.#s.runNext(this)}}#i(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),a.jG.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#s.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,97774))},97774:(e,t,s)=>{"use strict";s.d(t,{default:()=>O});var a=s(95155),i=s(12115),n=s(14051),r=s.n(n),o=s(35625),l=s(4109),d=s(53390),c=s(31967),u=s(98216),m=s(5858),h=class extends u.Q{#e;#n=void 0;#r;#o;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#l()}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,m.f8)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,m.EN)(t.mutationKey)!==(0,m.EN)(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(e){this.#l(),this.#d(e)}getCurrentResult(){return this.#n}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#l(),this.#d()}mutate(e,t){return this.#o=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#l(){let e=this.#r?.state??(0,d.$)();this.#n={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#d(e){c.jG.batch(()=>{if(this.#o&&this.hasListeners()){let t=this.#n.variables,s=this.#n.context,a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#o.onSuccess?.(e.data,t,s,a)}catch(e){Promise.reject(e)}try{this.#o.onSettled?.(e.data,null,t,s,a)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#o.onError?.(e.error,t,s,a)}catch(e){Promise.reject(e)}try{this.#o.onSettled?.(void 0,e.error,t,s,a)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#n)})})}};function p(e,t){let s=(0,o.jE)(t),[a]=i.useState(()=>new h(s,e));i.useEffect(()=>{a.setOptions(e)},[a,e]);let n=i.useSyncExternalStore(i.useCallback(e=>a.subscribe(c.jG.batchCalls(e)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),r=i.useCallback((e,t)=>{a.mutate(e,t).catch(m.lQ)},[a]);if(n.error&&(0,m.GU)(a.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:i,onCopy:n,badge:r,actions:o}){return(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.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,a.jsx)(x.pd,{value:t,readOnly:!0,className:"flex-1 min-w-0",inputClassName:"font-mono text-sm"}),(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[18px] leading-none",children:i===s?"check":"content_copy"})}),o]})}let f=[{id:"openai_base",label:"OpenAI Base URL",category:"openai",method:"BASE",path:"/v1",desc:"For OPENAI_BASE_URL, Cursor, Aider, OpenCode, LiteLLM, LangChain",headerHint:"Authorization: Bearer <key>"},{id:"openai_chat",label:"Chat Completions",category:"openai",method:"POST",path:"/v1/chat/completions",desc:"Standard OpenAI chat stream & JSON format across all models & combos",headerHint:"Authorization: Bearer <key>"},{id:"openai_models",label:"Model Catalog",category:"openai",method:"GET",path:"/v1/models",desc:"Discover all active upstream models, custom models, and combos",headerHint:"Authorization: Bearer <key>"},{id:"claude_base",label:"Anthropic Base URL",category:"claude",method:"BASE",path:"",desc:"For ANTHROPIC_BASE_URL (Claude Code CLI, Cline, Roo Code, Claude SDK)",headerHint:"x-api-key: <key> or ANTHROPIC_AUTH_TOKEN"},{id:"claude_messages",label:"Claude Messages",category:"claude",method:"POST",path:"/v1/messages",desc:"Native Anthropic Messages API with streaming, tool use, & thinking blocks",headerHint:"x-api-key: <key> or Authorization: Bearer <key>"},{id:"claude_count",label:"Count Tokens",category:"claude",method:"POST",path:"/v1/messages/count_tokens",desc:"Anthropic token calculation API",headerHint:"x-api-key: <key>"},{id:"gemini_base",label:"Gemini Base URL",category:"gemini",method:"BASE",path:"/v1beta",desc:"For Google GenAI SDK & Gemini CLI base URLs",headerHint:"x-goog-api-key: <key>"},{id:"gemini_content",label:"Gemini Content Generation",category:"gemini",method:"POST",path:"/v1beta/models/{model}:generateContent",desc:"Native Google Gemini REST format with streaming & schema support",headerHint:"x-goog-api-key: <key>"},{id:"responses_api",label:"Codex Responses API",category:"responses",method:"POST",path:"/v1/responses",desc:"OpenAI Responses format (Codex CLI, instruction tuning, response loops)",headerHint:"Authorization: Bearer <key>"},{id:"media_stt",label:"Audio Transcriptions (STT)",category:"media",method:"POST",path:"/v1/audio/transcriptions",desc:"Speech-to-text audio transcription via multipart/form-data",headerHint:"Authorization: Bearer <key>"},{id:"media_tts",label:"Text-to-Speech (TTS)",category:"media",method:"POST",path:"/v1/audio/speech",desc:"Synthesize spoken audio from text with voice selection",headerHint:"Authorization: Bearer <key>"},{id:"media_embeddings",label:"Vector Embeddings",category:"media",method:"POST",path:"/v1/embeddings",desc:"Text embeddings for semantic search, vector stores, and RAG",headerHint:"Authorization: Bearer <key>"},{id:"media_images",label:"Image Generation",category:"media",method:"POST",path:"/v1/images/generations",desc:"Text-to-image synthesis and image editing",headerHint:"Authorization: Bearer <key>"}],g=[{value:"all",label:"All Routes"},{value:"openai",label:"OpenAI",icon:"forum"},{value:"claude",label:"Claude",icon:"smart_toy"},{value:"gemini",label:"Gemini",icon:"diamond"},{value:"responses",label:"Responses",icon:"terminal"},{value:"media",label:"Media (STT/TTS/Img)",icon:"mic"},{value:"snippets",label:"SDK & CLI Snippets",icon:"code"}];function v({origin:e,copied:t,onCopy:s}){let[n,r]=(0,i.useState)("all"),o=e.replace(/\/+$/,""),l="all"===n?f:f.filter(e=>e.category===n),d=`export ANTHROPIC_BASE_URL="${o}"
2
- export ANTHROPIC_AUTH_TOKEN="sk_switchboard"
3
- claude`,c=`from openai import OpenAI
4
-
5
- client = OpenAI(
6
- base_url="${o}/v1",
7
- api_key="sk_switchboard"
8
- )`,u=`curl ${o}/v1/chat/completions \\
9
- -H "Content-Type: application/json" \\
10
- -H "Authorization: Bearer sk_switchboard" \\
11
- -d '{
12
- "model": "claude-sonnet-4-6",
13
- "messages": [{"role": "user", "content": "Hello"}]
14
- }'`;return(0,a.jsxs)(x.Zp,{children:[(0,a.jsx)("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4 mb-4",children:(0,a.jsxs)("div",{children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"hub"}),"Protocol & Tool Endpoints"]}),(0,a.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Every route and protocol exposed by Switchboard with format translation."})]})}),(0,a.jsx)("div",{className:"mb-6 overflow-x-auto pb-1",children:(0,a.jsx)(x.Iz,{options:g,value:n,onChange:r,size:"sm"})}),"snippets"===n?(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"rounded-[10px] bg-surface-2 p-4 border border-border",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsxs)("span",{className:"text-sm font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"terminal"}),"Claude Code CLI Environment"]}),(0,a.jsxs)("button",{type:"button",onClick:()=>s(d,"snippet_claude"),className:"p-1.5 hover:bg-surface rounded text-text-muted hover:text-primary transition-colors text-xs flex items-center gap-1 border border-border/50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"snippet_claude"===t?"check":"content_copy"}),"snippet_claude"===t?"Copied":"Copy"]})]}),(0,a.jsx)("pre",{className:"text-xs font-mono bg-black/5 dark:bg-black/40 p-3 rounded-[6px] overflow-x-auto text-text-main",children:d})]}),(0,a.jsxs)("div",{className:"rounded-[10px] bg-surface-2 p-4 border border-border",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsxs)("span",{className:"text-sm font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"code"}),"OpenAI Python SDK"]}),(0,a.jsxs)("button",{type:"button",onClick:()=>s(c,"snippet_python"),className:"p-1.5 hover:bg-surface rounded text-text-muted hover:text-primary transition-colors text-xs flex items-center gap-1 border border-border/50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"snippet_python"===t?"check":"content_copy"}),"snippet_python"===t?"Copied":"Copy"]})]}),(0,a.jsx)("pre",{className:"text-xs font-mono bg-black/5 dark:bg-black/40 p-3 rounded-[6px] overflow-x-auto text-text-main",children:c})]}),(0,a.jsxs)("div",{className:"rounded-[10px] bg-surface-2 p-4 border border-border",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsxs)("span",{className:"text-sm font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"send"}),"Direct cURL"]}),(0,a.jsxs)("button",{type:"button",onClick:()=>s(u,"snippet_curl"),className:"p-1.5 hover:bg-surface rounded text-text-muted hover:text-primary transition-colors text-xs flex items-center gap-1 border border-border/50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"snippet_curl"===t?"check":"content_copy"}),"snippet_curl"===t?"Copied":"Copy"]})]}),(0,a.jsx)("pre",{className:"text-xs font-mono bg-black/5 dark:bg-black/40 p-3 rounded-[6px] overflow-x-auto text-text-main",children:u})]})]}):(0,a.jsx)("div",{className:"flex flex-col divide-y divide-border/60",children:l.map(e=>{let i=`${o}${e.path}`;return(0,a.jsxs)("div",{className:"py-3.5 first:pt-0 last:pb-0 flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)("span",{className:`text-[11px] font-mono font-semibold px-2 py-0.5 rounded border shrink-0 ${function(e){switch(e){case"POST":return"bg-teal-500/10 text-teal-600 dark:text-teal-400 border-teal-500/20";case"GET":return"bg-sky-500/10 text-sky-600 dark:text-sky-400 border-sky-500/20";default:return"bg-primary/10 text-primary border-primary/25"}}(e.method)}`,children:e.method}),(0,a.jsx)("span",{className:"text-sm font-medium truncate",children:e.label})]}),e.headerHint&&(0,a.jsx)("span",{className:"text-[11px] font-mono text-text-muted hidden md:inline truncate max-w-[280px]",children:e.headerHint})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)(x.pd,{value:i,readOnly:!0,className:"flex-1 min-w-0",inputClassName:"font-mono text-xs bg-surface-2"}),(0,a.jsx)("button",{type:"button",onClick:()=>s(i,e.id),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 URL","aria-label":`Copy ${e.label} URL`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] leading-none",children:t===e.id?"check":"content_copy"})})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:e.desc})]},e.id)})})]})}function j({message:e,action:t}){return(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[16px] shrink-0 leading-none",children:"warning"}),(0,a.jsx)("p",{className:"text-xs flex-1 text-brand-300",children:e}),t&&(0,a.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 k(e){return String(e||"").split("\n").map(e=>e.trim()).filter(Boolean)}function C(e){return""===e?null:Number(e)}function N({apiKey:e,isOpen:t,isSaving:s,onClose:n,onSave:r}){let[o,l]=(0,i.useState)(""),[d,c]=(0,i.useState)(!0),[u,m]=(0,i.useState)(""),[h,p]=(0,i.useState)(""),[y,b]=(0,i.useState)(""),[f,g]=(0,i.useState)(""),[v,j]=(0,i.useState)(""),[w,S]=(0,i.useState)("");return(0,i.useEffect)(()=>{t&&e&&(l(e.name||""),c(!1!==e.isActive),m((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)),g(e.rateLimitPerMinute??""),j(e.concurrencyLimit??""),S(e.spendLimitUsd??""))},[e,t]),(0,a.jsx)(x.aF,{isOpen:t,onClose:n,title:"Edit API Key Policy",size:"lg",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(x.pd,{label:"Key name",value:o,onChange:e=>l(e.target.value)}),(0,a.jsxs)("div",{className:"flex items-center justify-between rounded-lg border border-border p-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Active"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Paused keys cannot authenticate."})]}),(0,a.jsx)(x.lM,{checked:d,onChange:c})]}),(0,a.jsxs)("label",{className:"flex flex-col gap-1.5 text-sm font-medium",children:["Allowed model IDs",(0,a.jsx)("textarea",{className:"min-h-24 rounded-lg border border-border bg-surface-2 p-3 font-mono text-sm",value:u,onChange:e=>m(e.target.value),placeholder:"openai/gpt-5\\nanthropic/claude-sonnet"}),(0,a.jsx)("span",{className:"text-xs font-normal text-text-muted",children:"One exact model ID per line. Empty allows all targets."})]}),(0,a.jsxs)("label",{className:"flex flex-col gap-1.5 text-sm font-medium",children:["Allowed combo names",(0,a.jsx)("textarea",{className:"min-h-20 rounded-lg border border-border bg-surface-2 p-3 font-mono text-sm",value:h,onChange:e=>p(e.target.value),placeholder:"fast\\nquality"}),(0,a.jsx)("span",{className:"text-xs font-normal text-text-muted",children:"One exact combo name per line."})]}),(0,a.jsx)(x.pd,{label:"Expires at",type:"datetime-local",value:y,onChange:e=>b(e.target.value)}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-3",children:[(0,a.jsx)(x.pd,{label:"Requests / minute",type:"number",min:"1",step:"1",value:f,onChange:e=>g(e.target.value)}),(0,a.jsx)(x.pd,{label:"Concurrent requests",type:"number",min:"1",step:"1",value:v,onChange:e=>j(e.target.value)}),(0,a.jsx)(x.pd,{label:"Spend ceiling (USD)",type:"number",min:"0",step:"0.01",value:w,onChange:e=>S(e.target.value)})]}),(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Current spend: ",(0,a.jsxs)("span",{className:"font-mono text-text-main",children:["$",Number(e?.spentUsd||0).toFixed(4)]})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(x.$n,{fullWidth:!0,loading:s,disabled:s||!o.trim(),onClick:()=>r({name:o,isActive:d,allowedModels:k(u),allowedCombos:k(h),expiresAt:y?new Date(y).toISOString():null,rateLimitPerMinute:C(f),concurrencyLimit:C(v),spendLimitUsd:C(w)}),children:"Save policy"}),(0,a.jsx)(x.$n,{fullWidth:!0,variant:"ghost",disabled:s,onClick:n,children:"Cancel"})]})]})})}v.propTypes={origin:r().string.isRequired,copied:r().string,onCopy:r().func.isRequired},N.propTypes={apiKey:r().object,isOpen:r().bool.isRequired,isSaving:r().bool.isRequired,onClose:r().func.isRequired,onSave:r().func.isRequired};let w=()=>["endpoint","keys"],S=()=>["endpoint","settings"];async function A(e,t){let s=await fetch(e,{...t,headers:{"Content-Type":"application/json",...t?.headers||{}},credentials:"same-origin"}),a=null;try{a=await s.json()}catch{a=null}if(!s.ok){let e=a&&(a.error||a.message)||`Request failed (${s.status})`,t=Error("string"==typeof e?e:"Request failed");throw t.status=s.status,t.data=a,t}return a}var P=s(65921);function O({initialData:e}){let t=(0,o.jE)(),s=e?.machineId||"",n=(0,P.i)(e=>e.error),r=(0,l.I)({queryKey:w(),queryFn:async()=>{let e=async()=>(await A("/api/keys")).keys||[],t=await e();if(0===t.length)try{await A("/api/keys",{method:"POST",body:JSON.stringify({name:"Default Key"})}),t=await e()}catch{}return t},initialData:e?.keys||[]}),d=(0,l.I)({queryKey:S(),queryFn:()=>A("/api/settings"),initialData:e?.settings||{}}),c=r.data||[],u=d.data?.requireApiKey===!0,[m,h]=(0,i.useState)(!1),[f,g]=(0,i.useState)(""),[k,C]=(0,i.useState)(null),[I,R]=(0,i.useState)(null),[_,T]=(0,i.useState)(null),[E,M]=(0,i.useState)("/v1"),[K,L]=(0,i.useState)("http://127.0.0.1:20128");(0,i.useEffect)(()=>{M(`${window.location.origin}/v1`),L(window.location.origin)},[]);let{copied:$,copy:q}=(0,y.C)(),D=p({mutationFn:e=>A("/api/settings",{method:"PATCH",body:JSON.stringify({requireApiKey:e})}),onSuccess:()=>{t.invalidateQueries({queryKey:S()})},onError:()=>n("Failed to update API key requirement")}),F=p({mutationFn:e=>A("/api/keys",{method:"POST",body:JSON.stringify({name:e})}),onSuccess:e=>{C(e.key||null),g(""),h(!1),t.invalidateQueries({queryKey:w()})},onError:()=>n("Failed to create API key")}),U=p({mutationFn:e=>A(`/api/keys/${e}`,{method:"DELETE"}),onSuccess:()=>{t.invalidateQueries({queryKey:w()})},onError:()=>n("Failed to delete API key")}),H=p({mutationFn:({id:e,isActive:t})=>A(`/api/keys/${e}`,{method:"PUT",body:JSON.stringify({isActive:t})}),onSuccess:()=>{t.invalidateQueries({queryKey:w()})},onError:()=>n("Failed to toggle API key")}),G=p({mutationFn:({id:e,patch:t})=>A(`/api/keys/${e}`,{method:"PUT",body:JSON.stringify(t)}),onSuccess:()=>{T(null),t.invalidateQueries({queryKey:w()})},onError:()=>n("Failed to update API key policy")});return(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsxs)(x.Zp,{children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold mb-4 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"api"}),"API Endpoint"]}),(0,a.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,a.jsx)(b,{label:"Local",url:E,copyId:"local_url",copied:$,onCopy:q}),s?(0,a.jsxs)("p",{className:"mt-3 text-xs text-text-muted font-mono",children:["Machine: ",s]}):null]}),(0,a.jsx)(v,{origin:K,copied:$,onCopy:q}),(0,a.jsxs)(x.Zp,{id:"require-api-key",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"vpn_key"}),"API Keys"]}),(0,a.jsx)(x.$n,{icon:"add",onClick:()=>h(!0),children:"Create Key"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pb-4 mb-4 border-b border-border",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Require API key"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Requests without a valid key will be rejected"})]}),(0,a.jsx)(x.lM,{checked:u,onChange:()=>{u?R({title:"Disable API key protection?",message:"Any client that can reach this Switchboard endpoint will be able to use your provider accounts.",onConfirm:()=>{R(null),D.mutate(!1)}}):D.mutate(!0)},"aria-label":"Require API key"})]}),!u&&(0,a.jsx)("div",{className:"mb-4 -mt-2",children:(0,a.jsx)(j,{message:"API key is not required — any local client can call /v1."})}),0===c.length?(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"vpn_key"})}),(0,a.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No API keys yet"}),(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create your first API key to get started"}),(0,a.jsx)(x.$n,{icon:"add",onClick:()=>h(!0),children:"Create Key"})]}):(0,a.jsx)("div",{className:"flex flex-col",children:c.map(e=>{let t=e.name?.trim()||e.id;return(0,a.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,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:e.name}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mt-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono",children:e.keyPrefix}),e.rotationRequired?(0,a.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,a.jsx)("span",{className:"rounded-full bg-primary/10 px-2 py-0.5 text-[11px] text-primary",children:"Restricted targets"}):(0,a.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,a.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,a.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,a.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,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Created ",new Date(e.createdAt).toLocaleDateString()]}),!1===e.isActive&&(0,a.jsx)("p",{className:"text-xs text-orange-500 mt-1",children:"Paused"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(x.lM,{size:"sm",checked:e.isActive??!0,onChange:s=>{e.isActive&&!s?R({title:"Pause API Key",message:`Pause API key "${t}"?
15
-
16
- This key will stop working immediately but can be resumed later.`,onConfirm:async()=>{R(null),H.mutate({id:e.id,isActive:s})}}):H.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,a.jsx)("button",{type:"button",onClick:()=>T(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,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,a.jsx)("button",{type:"button",onClick:()=>R({title:"Delete API Key",message:`Delete API key "${t}"?`,onConfirm:async()=>{R(null),U.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,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id)})})]}),(0,a.jsx)(x.aF,{isOpen:m,title:"Create API Key",onClose:()=>{h(!1),g("")},children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(x.pd,{label:"Key Name",value:f,onChange:e=>g(e.target.value),placeholder:"Production Key"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(x.$n,{onClick:()=>F.mutate(f.trim()),fullWidth:!0,disabled:!f.trim()||F.isPending,loading:F.isPending,children:"Create"}),(0,a.jsx)(x.$n,{onClick:()=>{h(!1),g("")},variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,a.jsx)(x.aF,{isOpen:!!k,title:"API Key Created",onClose:()=>C(null),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.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,a.jsx)("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 mb-2 font-medium",children:"Save this key now!"}),(0,a.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,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(x.pd,{value:k||"",readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)(x.$n,{variant:"secondary",icon:"created_key"===$?"check":"content_copy",onClick:()=>q(k,"created_key"),children:"created_key"===$?"Copied!":"Copy"})]}),(0,a.jsx)(x.$n,{onClick:()=>C(null),fullWidth:!0,children:"Done"})]})}),(0,a.jsx)(N,{apiKey:_,isOpen:!!_,isSaving:G.isPending,onClose:()=>T(null),onSave:e=>G.mutate({id:_.id,patch:e})}),(0,a.jsx)(x.uo,{isOpen:!!I,onClose:()=>R(null),onConfirm:I?.onConfirm,title:I?.title||"Confirm",message:I?.message,variant:"danger"})]})}O.propTypes={initialData:r().shape({machineId:r().string,keys:r().array,settings:r().object}).isRequired}}},e=>{e.O(0,[2574,3862,782,8500,594,1321,4707,1330,8441,3794,7358],()=>e(e.s=53427)),_N_E=e.O()}]);
@@ -1,4 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8334],{22662:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>g});var s=a(95155),l=a(73321),r=a(12115),i=a(98500),n=a.n(i),o=a(35497),d=a(57250),c=a(88105),m=a(78559),x=a(77251),u=a(5772);let h=/^[a-zA-Z0-9_.\-]+$/,p={webSearch:"Web Search",webFetch:"Web Fetch",image:"Text to Image",tts:"Text To Speech"},f={webSearch:"/v1/search",webFetch:"/v1/web/fetch",image:"/v1/images/generations",tts:"/v1/audio/speech"},b={webSearch:e=>({model:e,query:"What is the latest news about AI?",search_type:"web",max_results:5}),webFetch:e=>({model:e,url:"https://example.com",format:"markdown"}),image:e=>({model:e,prompt:"A cute cat playing piano",n:1,size:"1024x1024"}),tts:e=>({model:e,input:"Hello, this is a test.",voice:"alloy"})};function j(e){return"webSearch"===e||"webFetch"===e?"/dashboard/media-providers/web":`/dashboard/media-providers/${e}`}function g(){let{id:e}=(0,l.useParams)(),t=(0,l.useRouter)(),[a,i]=(0,r.useState)(null),[g,w]=(0,r.useState)(!0),[v,y]=(0,r.useState)(""),[N,k]=(0,r.useState)(""),[S,C]=(0,r.useState)([]),[$,U]=(0,r.useState)(!1),[O,_]=(0,r.useState)(!1),[R,T]=(0,r.useState)([]),[A,M]=(0,r.useState)(!1),[P,L]=(0,r.useState)(null),[z,E]=(0,r.useState)(""),[F,D]=(0,r.useState)(""),[I,W]=(0,r.useState)([]),[J,Z]=(0,r.useState)({}),q=async()=>{try{let[t,a,s,l,r]=await Promise.all([fetch(`/api/combos/${e}`,{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"}),fetch("/api/usage/logs",{cache:"no-store"}),fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/alias",{cache:"no-store"})]);if(r.ok&&Z((await r.json()).aliases||{}),l.ok&&W((await l.json()).connections||[]),!t.ok){i(null),w(!1);return}let n=await t.json();i(n),y(n.name),C(n.models||[]);let o=a.ok?await a.json():{};U(o.comboStrategies?.[n.name]?.fallbackStrategy==="round-robin");let d=s.ok?await s.json():[];T(d.filter(e=>"string"==typeof e&&e.includes(n.name)).slice(0,50))}catch{}w(!1)};(0,r.useEffect)(()=>{q()},[e]);let H=e=>e.trim()?h.test(e)?(k(""),!0):(k("Only letters, numbers, -, _ and ."),!1):(k("Name is required"),!1),K=async t=>{let a=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.json();return(0,m.s)(e.error||"Failed to save"),!1}return!0},B=async()=>{!H(v)||v===a.name||await K({name:v})&&await q()},G=async e=>{let t=e?.value||e;if(!t||S.includes(t))return;let a=[...S,t];C(a),await K({models:a})},Q=async e=>{let t=e?.value||e;if(!t||!S.includes(t))return;let a=S.filter(e=>e!==t);C(a),await K({models:a})},Y=async e=>{let t=S.filter((t,a)=>a!==e);C(t),await K({models:t})},V=async(e,t)=>{let a=[...S],s=e+t;s<0||s>=a.length||([a[e],a[s]]=[a[s],a[e]],C(a),await K({models:a}))},X=async e=>{U(e);let t=await fetch("/api/settings",{cache:"no-store"}),s={...(t.ok?await t.json():{}).comboStrategies||{}};e?s[a.name]={fallbackStrategy:"round-robin"}:delete s[a.name],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:s})})},ee=async()=>{!await (0,x.l)({message:`Delete combo "${a.name?.trim()||e}"?`,confirmText:"Continue"})||(await fetch(`/api/combos/${e}`,{method:"DELETE"})).ok&&t.push(j(a.kind))},et=async()=>{if(!F.trim())return void E("Paste a client key secret before running this example.");if(M(!0),L(null),E(""),P?.audioUrl)try{URL.revokeObjectURL(P.audioUrl)}catch{}if(P?.imageUrl?.startsWith("blob:"))try{URL.revokeObjectURL(P.imageUrl)}catch{}let e=Date.now();try{let t=f[a.kind],s=b[a.kind](a.name),l={"Content-Type":"application/json"};F&&(l.Authorization=`Bearer ${F}`);let r=await fetch(`/api${t}`,{method:"POST",headers:l,body:JSON.stringify(s)}),i=Date.now()-e;if(!r.ok){let e=await r.json().catch(()=>({}));E(e?.error?.message||e?.error||`HTTP ${r.status}`),L({json:JSON.stringify(e,null,2),latencyMs:i});return}let n=r.headers.get("content-type")||"";if(n.startsWith("image/")){let e=await r.blob();L({imageUrl:URL.createObjectURL(e),latencyMs:i});return}if(n.startsWith("audio/")||"application/octet-stream"===n){let e=await r.blob();L({audioUrl:URL.createObjectURL(e),latencyMs:i});return}let o=await r.json(),d=o?.data?.[0],c=d?.b64_json?`data:image/png;base64,${d.b64_json}`:d?.url||"";L({json:JSON.stringify(function e(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(e);let a={};for(let[s,l]of Object.entries(t))a[s]="b64_json"===s&&"string"==typeof l&&l.length>100?`<${l.length} chars base64>`:e(l);return a}(o),null,2),imageUrl:c,latencyMs:i})}catch(e){E(e.message||"Network error")}M(!1)};if(g)return(0,s.jsx)("div",{className:"text-text-muted text-sm",children:"Loading..."});if(!a)return(0,l.notFound)();let ea=p[a.kind]||c.rj.find(e=>e.id===a.kind)?.label||"Combo",es=f[a.kind],el=a.kind&&b[a.kind]?b[a.kind](a.name):null,er=es?`curl -X POST http://localhost:20128${es} \\
2
- -H "Content-Type: application/json" \\
3
- -H "Authorization: Bearer ${F||"YOUR_KEY"}" \\
4
- -d '${JSON.stringify(el)}'`:"",ei=j(a.kind);return(0,s.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,s.jsx)(n(),{href:ei,className:"text-text-muted hover:text-primary",children:(0,s.jsx)("span",{className:"material-symbols-outlined",children:"arrow_back"})}),(0,s.jsx)("div",{className:"size-10 rounded-lg bg-primary/10 flex items-center justify-center",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-primary",children:"layers"})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:[ea," Combo"]}),(0,s.jsx)("code",{className:"text-lg font-semibold font-mono",children:a.name})]})]}),(0,s.jsx)(o.$n,{variant:"outline",icon:"delete",onClick:ee,className:"text-red-500 border-red-200 hover:bg-red-50",children:"Delete"})]}),(0,s.jsxs)(o.Zp,{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Settings"}),(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(o.pd,{label:"Combo Name",value:v,onChange:e=>{y(e.target.value),H(e.target.value)},onBlur:B,error:N}),(0,s.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and ."})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Round Robin"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Rotate providers across requests instead of strict fallback order."})]}),(0,s.jsx)(o.lM,{checked:$,onChange:X})]})]})]}),(0,s.jsxs)(o.Zp,{children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Providers"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Tried in order (top-down) or rotated when round-robin is on."})]}),(0,s.jsx)(o.$n,{size:"sm",icon:"add",onClick:()=>_(!0),children:"Add Provider"})]}),0===S.length?(0,s.jsx)("div",{className:"text-center py-6 border border-dashed border-border rounded-lg text-text-muted text-sm",children:"No providers yet."}):(0,s.jsx)("div",{className:"flex flex-col gap-2",children:S.map((e,t)=>{let{providerId:a,model:l}=function(e){if("string"!=typeof e)return{providerId:"",model:""};let t=e.indexOf("/");return t<0?{providerId:e,model:""}:{providerId:e.slice(0,t),model:e.slice(t+1)}}(e),r=c.Q2[a];return(0,s.jsxs)("div",{className:"flex items-center gap-3 p-2 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted w-5 text-center",children:t+1}),(0,s.jsx)(d.A,{src:`/providers/${a}.png`,alt:r?.name||a,size:24,className:"object-contain rounded shrink-0",fallbackText:r?.textIcon||a.slice(0,2).toUpperCase(),fallbackColor:r?.color}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("div",{className:"text-sm font-medium truncate",children:r?.name||a}),l&&(0,s.jsx)("code",{className:"text-[10px] text-text-muted font-mono truncate block",children:l})]}),(0,s.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,s.jsx)("button",{onClick:()=>V(t,-1),disabled:0===t,className:`p-1 rounded ${0===t?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,"aria-label":`Move ${r?.name||a} up`,title:"Move up",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]","aria-hidden":"true",children:"arrow_upward"})}),(0,s.jsx)("button",{onClick:()=>V(t,1),disabled:t===S.length-1,className:`p-1 rounded ${t===S.length-1?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,"aria-label":`Move ${r?.name||a} down`,title:"Move down",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]","aria-hidden":"true",children:"arrow_downward"})}),(0,s.jsx)("button",{onClick:()=>Y(t),className:"p-1 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10","aria-label":`Remove ${r?.name||a}`,title:"Remove",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]","aria-hidden":"true",children:"close"})})]})]},`${e}-${t}`)})})]}),a.kind&&es&&(0,s.jsxs)(o.Zp,{children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Test Example"}),(0,s.jsx)(o.$n,{size:"sm",icon:"play_arrow",onClick:et,disabled:A||0===S.length||!F.trim(),children:A?"Running...":"Run"})]}),(0,s.jsx)("div",{className:"mb-3",children:(0,s.jsx)(o.pd,{id:"combo-example-key",label:"Client Key Secret",type:"password",autoComplete:"off",placeholder:"Paste a Switchboard client key secret (sk-...)",value:F,onChange:e=>D(e.target.value),hint:"Run uses this key as the Authorization bearer for the local gateway endpoint."})}),(0,s.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-x-auto whitespace-pre-wrap break-all",children:er}),z&&(0,s.jsx)("p",{role:"alert",className:"mt-3 text-xs text-red-500 break-words",children:z}),P&&(0,s.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[null!=P.latencyMs&&(0,s.jsxs)("span",{className:"text-[11px] text-text-muted",children:["⚡ ",P.latencyMs,"ms"]}),P.imageUrl&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,s.jsxs)("a",{href:P.imageUrl,download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,s.jsx)(u.default,{src:P.imageUrl,alt:"Generated",width:1024,height:1024,unoptimized:!0,className:"max-w-full rounded-lg border border-border"})]}),P.audioUrl&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,s.jsxs)("a",{href:P.audioUrl,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,s.jsx)("audio",{controls:!0,src:P.audioUrl,className:"w-full"})]}),P.json&&(0,s.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[300px] whitespace-pre-wrap break-all",children:P.json})]})]}),(0,s.jsxs)(o.Zp,{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Usage Logs"}),0===R.length?(0,s.jsx)("p",{className:"text-xs text-text-muted italic",children:"No usage yet."}):(0,s.jsx)("pre",{className:"text-[11px] font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[400px] whitespace-pre-wrap",children:R.join("\n")})]}),(0,s.jsx)(o.rq,{isOpen:O,onClose:()=>_(!1),onSelect:G,onDeselect:Q,activeProviders:I,modelAliases:J,title:`Add ${ea} Model`,kindFilter:a.kind,addedModelValues:S,closeOnSelect:!1})]})}},35497:(e,t,a)=>{"use strict";a.d(t,{x0:()=>N.default,Ex:()=>d.default,$n:()=>s.default,nh:()=>U.default,Zp:()=>i.default,Qv:()=>o.CardSkeleton,CK:()=>h.default,uo:()=>n.ConfirmModal,G9:()=>g.default,wI:()=>y.default,vj:()=>v.default,vE:()=>w.default,pd:()=>l.default,Mh:()=>j.default,uR:()=>u.default,Nf:()=>p.default,aF:()=>n.default,rq:()=>x.default,gw:()=>k.default,LF:()=>m.default,Wx:()=>$.default,gM:()=>b.default,Iz:()=>S.default,l6:()=>r.default,lM:()=>c.default,m_:()=>C.default,jK:()=>f.default});var s=a(92542),l=a(11910),r=a(98),i=a(84588),n=a(81127),o=a(25086);a(56319);var d=a(56061),c=a(98542);a(38587),a(21110),a(92622),a(8823),a(92173);var m=a(90882),x=a(72908),u=a(28815),h=a(45455),p=a(28058),f=a(4809);a(21931),a(80752),a(40197);var b=a(23615);a(44736);var j=a(62899);a(94230);var g=a(30815),w=a(23936),v=a(95088),y=a(73579),N=a(96748),k=a(4823),S=a(28067),C=a(97677),$=a(51825),U=a(29366);a(76361),a(91450)},69701:(e,t,a)=>{Promise.resolve().then(a.bind(a,22662))}},e=>{e.O(0,[2574,3862,782,8500,594,1321,4707,1330,8441,3794,7358],()=>e(e.s=69701)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6337],{11059:(e,o,t)=>{"use strict";t.d(o,{C:()=>r});var n=t(12115);function r(e=2e3){let[o,t]=(0,n.useState)(null),s=(0,n.useRef)(null),l=(0,n.useCallback)(async(o,n="default")=>{let r=async()=>{if(navigator?.clipboard?.writeText)await navigator.clipboard.writeText(o);else{let e=document.createElement("textarea");e.value=o,e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e);try{if(e.select(),!document.execCommand("copy"))throw Error("Clipboard copy was rejected")}finally{document.body.removeChild(e)}}};try{await r(),t(n),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{t(null)},e)}catch{}},[e]);return(0,n.useEffect)(()=>()=>{s.current&&clearTimeout(s.current)},[]),{copied:o,copy:l}}},14051:(e,o,t)=>{e.exports=t(34701)()},21172:(e,o,t)=>{"use strict";Object.defineProperty(o,"__esModule",{value:!0}),Object.defineProperty(o,"useMergedRef",{enumerable:!0,get:function(){return r}});let n=t(12115);function r(e,o){let t=(0,n.useRef)(null),r=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=t.current;e&&(t.current=null,e());let o=r.current;o&&(r.current=null,o())}else e&&(t.current=s(e,n)),o&&(r.current=s(o,n))},[e,o])}function s(e,o){if("function"!=typeof e)return e.current=o,()=>{e.current=null};{let t=e(o);return"function"==typeof t?t:()=>e(null)}}("function"==typeof o.default||"object"==typeof o.default&&null!==o.default)&&void 0===o.default.__esModule&&(Object.defineProperty(o.default,"__esModule",{value:!0}),Object.assign(o.default,o),e.exports=o.default)},34701:(e,o,t)=>{"use strict";var n=t(82114);function r(){}function s(){}s.resetWarningCache=r,e.exports=function(){function e(e,o,t,r,s,l){if(l!==n){var a=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function o(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:o,element:e,elementType:e,instanceOf:o,node:e,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:s,resetWarningCache:r};return t.PropTypes=t,t}},48420:(e,o,t)=>{Promise.resolve().then(t.bind(t,55084))},55084:(e,o,t)=>{"use strict";t.d(o,{default:()=>u});var n=t(95155),r=t(12115),s=t(98500),l=t.n(s),a=t(14051),i=t.n(a),c=t(11059);let d={fallback:"fallback","round-robin":"round-robin",fusion:"fusion",auto:"auto"};function u({initialData:e}){let[o,t]=(0,r.useState)(e?.endpointHost||"127.0.0.1:20128"),[s,a]=(0,r.useState)(null),{copied:i,copy:f}=(0,c.C)(),m=e?.providerCount??0,x=(e?.readyProviderCount??0)>0,g=e?.keyCount??0,h=e?.comboCount??0,y=e?.defaultCombo||null,b=e?.learningSummary||null,v=e?.quotas||[],j=!!y?.isAuto,E=y?.strategy||"fallback";(0,r.useEffect)(()=>{t(window.location.host||"127.0.0.1:20128")},[]),(0,r.useEffect)(()=>{let e=!1;return fetch("/api/usage/stats?period=24h").then(e=>e.json()).then(o=>{e||a(o)}).catch(()=>{}),()=>{e=!0}},[]);let C=`http://${o}/v1`,S=(0,r.useMemo)(()=>{let e=s?.totalRequests??s?.requests??0,o=s?.totalPromptTokens??0,t=s?.totalCompletionTokens??0,n=s?.totalCost??0;return[{label:"Requests \xb7 24h",value:p(e)},{label:"Tokens in",value:p(o)},{label:"Tokens out",value:p(t)},{label:"Est. cost",value:n?`$${Number(n).toFixed(2)}`:"$0.00"}]},[s]),k=(0,r.useMemo)(()=>y?j?[["Router",y.routerModel||"not configured"],["Worker pool",`${y.workerCount||0} workers`],["Objective",y.objective||"balanced"],["Exploration",y.exploration||"5%"]]:"fusion"===E?[["Panel",`${y.workerCount||0} models`],["Judge",y.judgeModel||"first model"],["Calls / request","N+1 (panel + judge)"],["Capacity switch",y.capacityAutoSwitch?"on":"off"]]:"round-robin"===E?[["Pool",`${y.workerCount||0} models`],["Rotation","spread load across models"],["Capacity switch",y.capacityAutoSwitch?"on":"off"],["On failure","try next in rotation"]]:[["Pool",`${y.workerCount||0} models`],["Order","try in listed order"],["Capacity switch",!1!==y.capacityAutoSwitch?"on":"off"],["On failure","next model"]]:[["Combos","none configured"],["Strategy","—"],["Models","—"],["Tip","Create a combo to group models"]],[y,j,E]);return(0,n.jsxs)("div",{className:"flex flex-col w-full",style:{gap:16,maxWidth:1120},children:[(0,n.jsxs)("div",{className:"flex flex-col",style:{gap:4},children:[(0,n.jsx)("span",{style:{fontSize:17,fontWeight:600,color:"#ECE4D2"},children:"Overview"}),(0,n.jsx)("span",{style:{fontSize:12,color:"#6F6653",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace"},children:"everything routing through your endpoint, at a glance"})]}),0===m&&(0,n.jsxs)("div",{style:{background:"#1E1A13",border:"1px solid #E5B454",borderRadius:12,padding:18},children:[(0,n.jsx)("div",{style:{fontSize:14,fontWeight:600,color:"#E5B454",marginBottom:8},children:"Connect your first provider to get started"}),(0,n.jsx)("div",{style:{fontSize:12,color:"#8A7F66",marginBottom:12},children:"Add an API key for any provider to start routing requests through Switchboard."}),(0,n.jsx)(l(),{href:"/dashboard/providers",style:{display:"inline-flex",alignItems:"center",gap:6,padding:"6px 14px",borderRadius:8,background:"#E5B454",color:"#1E1A13",fontSize:12,fontWeight:600,textDecoration:"none"},children:"Connect Provider"})]}),(0,n.jsxs)("div",{className:"grid gap-4 grid-cols-1 md:grid-cols-2",children:[(0,n.jsxs)("div",{className:"flex flex-col justify-between",style:{background:"#1E1A13",border:"1px solid #332C1E",borderRadius:12,padding:18},children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",style:{marginBottom:12},children:[(0,n.jsx)("span",{style:{fontSize:10.5,letterSpacing:"1.2px",color:"#8A7F66",textTransform:"uppercase",fontWeight:600},children:"Endpoint"}),(0,n.jsxs)("span",{className:"flex items-center gap-[7px]",style:{fontSize:11.5,color:x?"#74C08A":"#8A7F66",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace"},children:[(0,n.jsx)("span",{className:"console-online-dot",style:x?void 0:{background:"#6F6653",boxShadow:"none"}}),x?"online":m>0?"providers unavailable":"no providers"]})]}),(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsx)("div",{style:{fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",fontSize:16,color:"#E5B454",wordBreak:"break-all"},children:C}),(0,n.jsx)("button",{type:"button",onClick:()=>f(C,"overview_endpoint"),className:"p-1.5 rounded hover:bg-white/10 text-[#8A7F66] hover:text-[#E5B454] transition-colors shrink-0",title:"Copy endpoint URL","aria-label":"Copy endpoint URL",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[16px] leading-none",children:"overview_endpoint"===i?"check":"content_copy"})})]})]}),(0,n.jsxs)("div",{style:{fontSize:11.5,color:"#6F6653",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",marginTop:14},children:[g," API key",1===g?"":"s"," \xb7 ",m," provider",1===m?"":"s"," connected"]})]}),(0,n.jsxs)("div",{style:{background:"#1E1A13",border:"1px solid #332C1E",borderRadius:12,padding:18},children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",style:{marginBottom:12},children:[(0,n.jsx)("span",{style:{fontSize:10.5,letterSpacing:"1.2px",color:"#8A7F66",textTransform:"uppercase",fontWeight:600},children:j?"Learning":"Combos"}),(0,n.jsx)("span",{style:{fontSize:10,fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",padding:"2px 8px",borderRadius:999,textTransform:"uppercase",letterSpacing:"0.5px",background:"rgba(229,180,84,.15)",color:"#E5B454",border:"1px solid rgba(229,180,84,.4)"},children:j?b?.freezeLearning?"frozen":b?.version?`v${b.version}`:"no version yet":h?`${h} configured`:"none"})]}),(0,n.jsxs)("div",{className:"flex items-end gap-2.5",style:{marginBottom:3},children:[(0,n.jsx)("span",{style:{fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",fontSize:32,fontWeight:600,lineHeight:1,color:"#ECE4D2"},children:j?b?.evalScore!=null?Number(b.evalScore).toFixed(0):"—":String(h)}),(0,n.jsx)("span",{style:{fontSize:11,color:j?"#74C08A":"#A99E86",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",paddingBottom:3},children:j?"eval score":"combos"})]}),(0,n.jsx)("div",{style:{fontSize:11,color:"#6F6653",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",marginBottom:14},children:j?"Auto strategy \xb7 relearn from Combos → Insights":"Group models \xb7 fallback / round-robin / fusion / auto"}),(0,n.jsxs)("div",{className:"flex gap-2 items-center flex-wrap",children:[(0,n.jsx)(l(),{href:"/dashboard/combos",style:{display:"inline-flex",alignItems:"center",gap:7,background:"rgba(229,180,84,.15)",border:"1px solid rgba(229,180,84,.4)",borderRadius:7,padding:"7px 12px",fontSize:12,color:"#E5B454",fontFamily:"inherit"},children:h?"Manage combos":"Create combo"}),j&&y?.name&&(0,n.jsx)(l(),{href:`/dashboard/combos/routing?combo=${encodeURIComponent(y.name)}`,style:{display:"inline-flex",alignItems:"center",gap:7,background:"transparent",border:"1px solid #3A3221",borderRadius:7,padding:"7px 10px",fontSize:12,color:"#A99E86"},children:"Routing insights"})]})]})]}),(0,n.jsx)("div",{className:"grid gap-3 grid-cols-2 lg:grid-cols-4",children:S.map(e=>(0,n.jsxs)("div",{style:{background:"#1E1A13",border:"1px solid #332C1E",borderRadius:11,padding:15},children:[(0,n.jsx)("div",{style:{fontSize:10,letterSpacing:"0.6px",color:"#6F6653",textTransform:"uppercase",marginBottom:8},children:e.label}),(0,n.jsx)("div",{style:{fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",fontSize:21,fontWeight:600,color:"#ECE4D2"},children:e.value})]},e.label))}),(0,n.jsxs)("div",{className:"grid gap-4 items-start grid-cols-1 md:grid-cols-2",children:[(0,n.jsxs)("div",{style:{background:"#1E1A13",border:"1px solid #332C1E",borderRadius:12,padding:18},children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",style:{marginBottom:14},children:[(0,n.jsx)("span",{style:{fontSize:13,fontWeight:600,color:"#ECE4D2"},children:"Active routing"}),(0,n.jsx)(l(),{href:j&&y?.name?`/dashboard/combos/routing?combo=${encodeURIComponent(y.name)}`:"/dashboard/combos",style:{padding:"6px 12px",borderRadius:7,fontSize:11.5,border:"1px solid #3A3221",background:"transparent",color:"#A99E86"},children:j?"View insights":"Open combos"})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2.5",style:{marginBottom:14},children:[(0,n.jsx)("span",{style:{fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",fontSize:14,fontWeight:600,color:"#ECE4D2"},children:y?.name||"—"}),(0,n.jsx)("span",{style:{fontSize:10,fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",padding:"2px 8px",borderRadius:999,textTransform:"uppercase",letterSpacing:"0.5px",background:"rgba(229,180,84,.15)",color:"#E5B454",border:"1px solid rgba(229,180,84,.4)"},children:d[E]||E||"fallback"})]}),(0,n.jsx)("div",{className:"flex flex-col",children:k.map(([e,o],t,r)=>(0,n.jsxs)("div",{className:"flex items-center justify-between gap-3",style:{padding:"9px 0",borderBottom:t<r.length-1?"1px solid #241F16":"none"},children:[(0,n.jsx)("span",{style:{fontSize:12,color:"#8A7F66"},children:e}),(0,n.jsx)("span",{className:"truncate text-right",style:{fontSize:12,color:"#A99E86",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",maxWidth:"60%"},title:String(o),children:o})]},e))})]}),(0,n.jsxs)("div",{style:{background:"#1E1A13",border:"1px solid #332C1E",borderRadius:12,padding:18},children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",style:{marginBottom:16},children:[(0,n.jsx)("span",{style:{fontSize:13,fontWeight:600,color:"#ECE4D2"},children:"Quota"}),(0,n.jsxs)("span",{style:{fontSize:11,color:"#6F6653",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace"},children:[v.length||m," accounts"]})]}),(0,n.jsx)("div",{className:"flex flex-col",style:{gap:13},children:(v.length?v:[{account:"No quota data yet",pct:0}]).slice(0,6).map(e=>{let o=Math.max(0,Math.min(100,Number(e.pct)||0)),t=o>=90?"#E07070":o>=70?"#E5B454":"#74C08A";return(0,n.jsxs)("div",{className:"flex flex-col",style:{gap:5},children:[(0,n.jsxs)("div",{className:"flex justify-between items-baseline gap-2",children:[(0,n.jsx)("span",{style:{fontSize:12,color:"#ECE4D2"},children:e.account}),(0,n.jsxs)("span",{style:{fontSize:11,color:t,fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace"},children:[o,"%"]})]}),(0,n.jsx)("div",{style:{height:5,borderRadius:3,background:"#241F16",overflow:"hidden"},children:(0,n.jsx)("div",{style:{height:"100%",width:`${o}%`,borderRadius:3,background:t}})})]},e.account)})}),(0,n.jsx)(l(),{href:"/dashboard/quota",className:"inline-block mt-4",style:{fontSize:11.5,color:"#A99E86"},children:"Open quota tracker →"})]})]})]})}function p(e){let o=Number(e)||0;return o>=1e6?`${(o/1e6).toFixed(1)}M`:o>=1e3?`${(o/1e3).toFixed(1)}k`:String(Math.round(o))}u.propTypes={initialData:i().object}},82114:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},e=>{e.O(0,[8500,8441,3794,7358],()=>e(e.s=48420)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7414],{35497:(e,t,s)=>{"use strict";s.d(t,{x0:()=>w.default,Ex:()=>o.default,$n:()=>a.default,nh:()=>C.default,Zp:()=>d.default,Qv:()=>n.CardSkeleton,CK:()=>h.default,uo:()=>i.ConfirmModal,G9:()=>b.default,wI:()=>v.default,vj:()=>y.default,vE:()=>N.default,pd:()=>l.default,Mh:()=>j.default,uR:()=>p.default,Nf:()=>u.default,aF:()=>i.default,rq:()=>m.default,gw:()=>k.default,LF:()=>c.default,Wx:()=>E.default,gM:()=>g.default,Iz:()=>S.default,l6:()=>r.default,lM:()=>x.default,m_:()=>P.default,jK:()=>f.default});var a=s(92542),l=s(11910),r=s(98),d=s(84588),i=s(81127),n=s(25086);s(56319);var o=s(56061),x=s(98542);s(38587),s(21110),s(92622),s(8823),s(92173);var c=s(90882),m=s(72908),p=s(28815),h=s(45455),u=s(28058),f=s(4809);s(21931),s(80752),s(40197);var g=s(23615);s(44736);var j=s(62899);s(94230);var b=s(30815),N=s(23936),y=s(95088),v=s(73579),w=s(96748),k=s(4823),S=s(28067),P=s(97677),E=s(51825),C=s(29366);s(76361),s(91450)},71470:(e,t,s)=>{"use strict";s.d(t,{default:()=>g});var a=s(95155),l=s(12115),r=s(21742),d=s(90639),i=s(28408),n=s(32539),o=s(59656),x=s(84420),c=s(19538),m=s(35497);let p=e=>e>=1e6?`${(e/1e6).toFixed(2)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e||0),h=[{id:"today",label:"Today"},{id:"yesterday",label:"Yesterday"},{id:"last7d",label:"7 days"},{id:"last30d",label:"30 days"},{id:"all",label:"All time"}],u={applied:"Prompt exceeded threshold",below_threshold:"Below size threshold",not_profitable:"Compression not profitable",below_min_chars:"Below minimum chars",below_min_tokens:"Below minimum tokens",unsupported_model:"Model not in allowlist",unsupported_format:"Non-Claude request format",timeout:"Compression timed out",transform_error:"Transform error",passthrough:"Passthrough",disabled:"Disabled",not_installed:"Not installed"};function f({label:e,value:t,sub:s,tone:l}){return(0,a.jsxs)(m.Zp,{className:"p-4",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted uppercase tracking-wide",children:e}),(0,a.jsx)("p",{className:`text-xl font-semibold mt-1 ${l||""}`,children:t}),s&&(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:s})]})}function g(){let[e,t]=(0,l.useState)(null),[s,g]=(0,l.useState)(null),[j,b]=(0,l.useState)(null),[N,y]=(0,l.useState)(null),[v,w]=(0,l.useState)("last7d"),[k,S]=(0,l.useState)(!0),P=(0,l.useCallback)(async()=>{S(!0);try{let[e,s,a]=await Promise.all([fetch("/api/pxpipe/status",{headers:{"Cache-Control":"no-store"}}),fetch("/api/pxpipe/stats"),fetch("/api/pxpipe/logs?limit=50")]);t(await e.json()),b(await s.json()),y(await a.json());let l=await fetch("/api/pxpipe/health",{method:"POST"});g(await l.json())}catch{}finally{S(!1)}},[]);(0,l.useEffect)(()=>{P()},[P]);let E=j?.windows?.[v],C=e?e.installed?s?.healthy?"Healthy":e.running?"Running":"Stopped":"Not installed":"—";return(0,a.jsxs)("div",{className:"space-y-6 p-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"image"}),"PXPIPE Dashboard"]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("a",{href:"/dashboard/token-saver",className:"text-xs text-primary underline hover:opacity-80",children:"Token Saver settings"}),(0,a.jsx)(m.$n,{size:"sm",variant:"ghost",onClick:P,disabled:k,children:k?"Refreshing…":"Refresh"})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3",children:[(0,a.jsx)(f,{label:"Status",value:C,tone:s?.healthy?"text-success":e?.installed?"text-warning":"text-text-muted",sub:e?.enabled?"Enabled in pipeline":"Disabled in pipeline"}),(0,a.jsx)(f,{label:"Version",value:e?.version?`v${e.version}`:"—",sub:"pxpipe-proxy"}),(0,a.jsx)(f,{label:"Uptime",value:(e=>{if(!e||e<=0)return"—";let t=Math.floor(e/6e4),s=Math.floor(t/60);return s>0?`${s}h${String(t%60).padStart(2,"0")}m`:`${t}m`})(e?.uptimeMs),sub:"module loaded"}),(0,a.jsx)(f,{label:"Requests",value:E?E.requests.toLocaleString():"—"}),(0,a.jsx)(f,{label:"Compressed",value:E?E.compressed.toLocaleString():"—",tone:"text-success"}),(0,a.jsx)(f,{label:"Bypassed",value:E?E.bypassed.toLocaleString():"—"})]}),(0,a.jsxs)(m.Zp,{className:"p-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-3 mb-4",children:[(0,a.jsx)("h3",{className:"font-medium",children:"Token savings (estimated)"}),(0,a.jsx)("div",{className:"flex items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1",children:h.map(e=>(0,a.jsx)("button",{onClick:()=>w(e.id),className:`px-3 py-1 rounded-md text-xs font-medium transition-colors ${v===e.id?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:e.label},e.id))})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-center",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Original tokens"}),(0,a.jsx)("p",{className:"text-lg font-semibold",children:E?p(E.tokensBeforeEst):"—"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"After PXPIPE"}),(0,a.jsx)("p",{className:"text-lg font-semibold",children:E?p(E.tokensAfterEst):"—"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Saved"}),(0,a.jsx)("p",{className:"text-lg font-semibold text-success",children:E?p(E.tokensSavedEst):"—"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Reduction"}),(0,a.jsx)("p",{className:"text-lg font-semibold text-success",children:E?`${E.savedPct}%`:"—"})]})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-3",children:["Estimates from body size before/after imaging; billed usage per request (recorded on the Usage page) remains the ground truth. Images generated:"," ",E?E.imagesGenerated.toLocaleString():"—"," \xb7 avg compression time:"," ",E?`${E.avgCompressionMs}ms`:"—"," \xb7 errors: ",E?E.errors:"—"]})]}),(0,a.jsxs)(m.Zp,{className:"p-4",children:[(0,a.jsx)("h3",{className:"font-medium mb-3",children:"Tokens saved — last 30 days"}),j?.timeline?.some(e=>e.tokensSavedEst>0)?(0,a.jsx)(r.u,{width:"100%",height:220,children:(0,a.jsxs)(d.Q,{data:j.timeline,margin:{top:4,right:8,left:0,bottom:0},children:[(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{id:"gradPxpipe",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,a.jsx)("stop",{offset:"5%",stopColor:"#10b981",stopOpacity:.25}),(0,a.jsx)("stop",{offset:"95%",stopColor:"#10b981",stopOpacity:0})]})}),(0,a.jsx)(i.d,{strokeDasharray:"3 3",strokeOpacity:.2}),(0,a.jsx)(n.W,{dataKey:"date",tick:{fontSize:11},tickFormatter:e=>e.slice(5)}),(0,a.jsx)(o.h,{tick:{fontSize:11},tickFormatter:p,width:48}),(0,a.jsx)(x.m,{formatter:e=>[p(e),"Tokens saved"],labelFormatter:e=>e}),(0,a.jsx)(c.Gk,{type:"monotone",dataKey:"tokensSavedEst",stroke:"#10b981",fill:"url(#gradPxpipe)",strokeWidth:2})]})}):(0,a.jsx)("div",{className:"h-32 flex items-center justify-center text-text-muted text-sm",children:"No savings recorded yet — enable PXPIPE in the Token Saver and route a large Claude-format request."})]}),(0,a.jsxs)(m.Zp,{className:"p-4",children:[(0,a.jsx)("h3",{className:"font-medium mb-3",children:"History"}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"text-left text-xs text-text-muted border-b border-border",children:[(0,a.jsx)("th",{className:"py-2 pr-3",children:"Time"}),(0,a.jsx)("th",{className:"py-2 pr-3",children:"Model"}),(0,a.jsx)("th",{className:"py-2 pr-3 text-right",children:"Original"}),(0,a.jsx)("th",{className:"py-2 pr-3 text-right",children:"Compressed"}),(0,a.jsx)("th",{className:"py-2 pr-3 text-right",children:"Saved"}),(0,a.jsx)("th",{className:"py-2 pr-3 text-right",children:"%"}),(0,a.jsx)("th",{className:"py-2 pr-3 text-right",children:"Duration"}),(0,a.jsx)("th",{className:"py-2",children:"Status"})]})}),(0,a.jsxs)("tbody",{children:[(j?.recent||[]).slice(0,50).map((e,t)=>(0,a.jsxs)("tr",{className:"border-b border-border/50",children:[(0,a.jsx)("td",{className:"py-1.5 pr-3 whitespace-nowrap text-text-muted",children:new Date(e.ts).toLocaleString()}),(0,a.jsx)("td",{className:"py-1.5 pr-3 font-mono text-xs",children:e.provider?`${e.provider}/${e.model}`:e.model||"—"}),(0,a.jsx)("td",{className:"py-1.5 pr-3 text-right font-mono text-xs",children:e.applied?p(e.tokensBeforeEst||0):"—"}),(0,a.jsx)("td",{className:"py-1.5 pr-3 text-right font-mono text-xs",children:e.applied?p(e.tokensAfterEst||0):"—"}),(0,a.jsx)("td",{className:"py-1.5 pr-3 text-right font-mono text-xs text-success",children:e.applied?p(e.tokensSavedEst||0):"—"}),(0,a.jsx)("td",{className:"py-1.5 pr-3 text-right font-mono text-xs",children:e.applied?`${e.savedPct}%`:"—"}),(0,a.jsx)("td",{className:"py-1.5 pr-3 text-right font-mono text-xs",children:null!=e.durationMs?`${e.durationMs}ms`:"—"}),(0,a.jsx)("td",{className:"py-1.5",children:(0,a.jsx)("span",{className:`text-xs px-2 py-0.5 rounded ${e.applied?"bg-success/15 text-success":"transform_error"===e.reason||"timeout"===e.reason?"bg-danger/15 text-danger":"bg-warning/15 text-warning"}`,title:e.detail||"",children:e.applied?"Compressed":u[e.reason]||e.reason})})]},`${e.ts}-${t}`)),(!j?.recent||0===j.recent.length)&&(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:8,className:"py-6 text-center text-text-muted text-sm",children:"No PXPIPE activity yet"})})]})]})})]}),(0,a.jsxs)(m.Zp,{className:"p-4",id:"logs",children:[(0,a.jsx)("h3",{className:"font-medium mb-3",children:"PXPIPE Logs"}),N?.installLog?(0,a.jsx)("pre",{className:"rounded bg-black/5 dark:bg-white/5 p-3 text-xs font-mono overflow-x-auto max-h-64 overflow-y-auto whitespace-pre-wrap",children:N.installLog}):(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No install log yet."})]})]})}},91710:(e,t,s)=>{Promise.resolve().then(s.bind(s,71470))}},e=>{e.O(0,[2574,3862,782,8500,594,1321,4707,1330,8441,3794,7358],()=>e(e.s=91710)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9516],{35497:(e,t,s)=>{"use strict";s.d(t,{x0:()=>k.default,Ex:()=>o.default,$n:()=>a.default,nh:()=>R.default,Zp:()=>i.default,Qv:()=>d.CardSkeleton,CK:()=>u.default,uo:()=>l.ConfirmModal,G9:()=>y.default,wI:()=>v.default,vj:()=>N.default,vE:()=>j.default,pd:()=>r.default,Mh:()=>g.default,uR:()=>p.default,Nf:()=>h.default,aF:()=>l.default,rq:()=>m.default,gw:()=>w.default,LF:()=>x.default,Wx:()=>_.default,gM:()=>b.default,Iz:()=>C.default,l6:()=>n.default,lM:()=>c.default,m_:()=>E.default,jK:()=>f.default});var a=s(92542),r=s(11910),n=s(98),i=s(84588),l=s(81127),d=s(25086);s(56319);var o=s(56061),c=s(98542);s(38587),s(21110),s(92622),s(8823),s(92173);var x=s(90882),m=s(72908),p=s(28815),u=s(45455),h=s(28058),f=s(4809);s(21931),s(80752),s(40197);var b=s(23615);s(44736);var g=s(62899);s(94230);var y=s(30815),j=s(23936),N=s(95088),v=s(73579),k=s(96748),w=s(4823),C=s(28067),E=s(97677),_=s(51825),R=s(29366);s(76361),s(91450)},36072:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>x});var a=s(95155),r=s(12115),n=s(35497),i=s(11059),l=s(46453);function d(e,t){return t?/^https?:\/\//i.test(t)?t:`${e||""}${t.startsWith("/")?t:`/${t}`}`:""}function o({value:e,label:t="Copy link"}){let{copied:s,copy:r}=(0,i.C)(2e3);return(0,a.jsxs)("button",{type:"button",onClick:()=>r(e),className:"px-2 py-1 rounded-md bg-primary text-on-primary text-[11px] font-medium hover:bg-primary/90 transition-colors cursor-pointer shrink-0 inline-flex items-center gap-1",title:e,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:s?"check":"content_copy"}),s?"Copied!":t]})}function c({skill:e,origin:t}){let s=(0,l.Rz)(e.id),r=(0,l.EV)(e.id),i=d(t,s),x=d(t,r);return(0,a.jsxs)("div",{className:`flex items-start gap-3 p-4 rounded-[14px] border shadow-[var(--shadow-soft)] transition-colors ${e.isEntry?"border-brand-500/40 bg-brand-500/5":"border-border-subtle bg-surface hover:bg-surface-2"}`,children:[(0,a.jsx)("div",{className:`size-9 rounded-lg flex items-center justify-center shrink-0 ${e.isEntry?"bg-primary text-on-primary":"bg-primary/10 text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e.icon})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,a.jsx)("h3",{className:"font-semibold text-sm text-text-main",children:e.name}),e.isEntry&&(0,a.jsx)(n.Ex,{variant:"primary",size:"sm",children:"START HERE"}),e.endpoint&&(0,a.jsx)(n.Ex,{variant:"default",size:"sm",children:(0,a.jsx)("code",{className:"text-[10px]",children:e.endpoint})})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:e.description}),(0,a.jsxs)("div",{className:"mt-2 flex flex-col gap-1",children:[(0,a.jsxs)("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"text-[12px] text-primary hover:underline inline-flex items-center gap-1 w-fit",children:["Open skill docs",(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"open_in_new"})]}),(0,a.jsx)("code",{className:"text-[11px] font-mono text-text-subtle break-all",title:"Paste this URL to an AI agent",children:i||s})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5 shrink-0 items-end",children:[(0,a.jsx)(o,{value:i||s,label:"Copy agent URL"}),(0,a.jsxs)("a",{href:x||r,target:"_blank",rel:"noopener noreferrer",className:"px-2 py-1 rounded-md border border-border text-[11px] text-text-main hover:border-primary inline-flex items-center gap-1 transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"open_in_new"}),"Open"]})]})]})}function x(){let e=function(){let[e,t]=(0,r.useState)("");return(0,r.useEffect)(()=>{t(window.location.origin)},[]),e}(),t=d(e,(0,l.Rz)("switchboard"));return(0,a.jsxs)("div",{className:"max-w-4xl mx-auto space-y-6",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:"Skills"}),(0,a.jsx)("p",{className:"text-xs font-mono text-text-subtle",children:"agent skill links \xb7 not Media providers"})]}),(0,a.jsxs)(n.Zp,{padding:"md",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 mb-2",children:[(0,a.jsx)("div",{className:"text-xs text-text-muted",children:"Paste this to your AI:"}),(0,a.jsx)(o,{value:`Read this skill and use it: ${t||(0,l.Rz)("switchboard")}`,label:"Copy prompt"})]}),(0,a.jsxs)("div",{className:"px-3 py-2 rounded bg-surface-2 font-mono text-[12px] text-text-main break-all border border-border/50",children:["Read this skill and use it: ",t||(0,l.Rz)("switchboard")]})]}),(0,a.jsx)("div",{className:"space-y-2",children:l.J3.map(t=>(0,a.jsx)(c,{skill:t,origin:e},t.id))}),(0,a.jsx)(n.Zp,{padding:"md",className:"border-primary/20 bg-primary/5",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,a.jsxs)("div",{className:"space-y-1 max-w-xl",children:[(0,a.jsxs)("div",{className:"text-xs font-semibold text-text-main flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"sync_alt"}),"Looking for Community Skills & MCP Tool Gateways (Executor.sh)?"]}),(0,a.jsxs)("p",{className:"text-[11px] text-text-muted leading-relaxed",children:["Use the ",(0,a.jsx)("strong",{className:"text-text-main",children:"Agent Library"})," to import community skills (e.g. ",(0,a.jsx)("code",{className:"font-mono text-primary",children:"npx skills add citrolabs/ego-lite"}),") and connect MCP tool gateways like ",(0,a.jsx)("strong",{children:"Executor.sh"})," (",(0,a.jsx)("code",{className:"font-mono text-primary",children:"npx -y executor mcp"}),"), projected across Claude Code, Codex, Gemini CLI, OpenCode, and Cursor."]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 shrink-0",children:[(0,a.jsx)("a",{href:"/dashboard/agent-library?tab=catalog",className:"px-3 py-1.5 rounded-md bg-surface border border-border text-text-main text-xs font-medium hover:bg-surface-2 transition-colors inline-flex items-center gap-1",children:"Skills Catalog"}),(0,a.jsxs)("a",{href:"/dashboard/agent-library?tab=mcp",className:"px-3 py-1.5 rounded-md bg-primary text-on-primary text-xs font-medium hover:bg-primary/90 transition-colors inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"hub"}),"MCP Gateways (Executor.sh)"]})]})]})}),(0,a.jsx)(n.Zp,{padding:"md",children:(0,a.jsxs)("p",{className:"text-xs text-text-muted leading-relaxed",children:[(0,a.jsx)("strong",{className:"text-text-main",children:"Open"})," opens a readable docs page in a new tab. ",(0,a.jsx)("strong",{className:"text-text-main",children:"Copy agent URL"})," copies"," ",(0,a.jsx)("code",{className:"text-[11px]",children:"/api/skills/<id>"})," for AI agents to fetch the raw markdown."]})})]})}},46453:(e,t,s)=>{"use strict";s.d(t,{EV:()=>n,J3:()=>a,Rz:()=>r});let a=[{id:"switchboard",name:"Switchboard (Entry)",description:"Setup, model discovery, combos & Auto routing. Start here — one /v1 endpoint, multi-provider gateway.",endpoint:"/v1",icon:"hub",isEntry:!0},{id:"switchboard-chat",name:"Chat",description:"Chat / code-gen via OpenAI, Anthropic, or Responses formats — streaming, tools, combo as model.",endpoint:"/v1/chat/completions",icon:"chat"}];function r(e){return`/api/skills/${e}`}function n(e){return`/dashboard/skills/${e}`}},49137:(e,t,s)=>{Promise.resolve().then(s.bind(s,36072))}},e=>{e.O(0,[2574,3862,782,8500,594,1321,4707,1330,8441,3794,7358],()=>e(e.s=49137)),_N_E=e.O()}]);