@jheavenknows/bluerouter 1.0.53 → 1.0.54

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 (893) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +5 -5
  3. package/app/.next-cli-build/build-manifest.json +3 -3
  4. package/app/.next-cli-build/prerender-manifest.json +3 -3
  5. package/app/.next-cli-build/required-server-files.json +4 -4
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +3 -3
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/ollama-nodes/page.js +2 -2
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/ollama-nodes/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/ollama-nodes/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page.js +2 -2
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page.js +2 -2
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/virtual-combos/page.js +2 -2
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/virtual-combos/page.js.nft.json +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/virtual-combos/page_client-reference-manifest.js +1 -1
  81. package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  82. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  83. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  84. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  85. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  86. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  87. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  88. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  89. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  90. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  91. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  92. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  93. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  94. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  95. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  96. package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  97. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  98. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  99. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
  100. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  101. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  102. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  103. package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js +1 -1
  104. package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/api/auth/ldap/test/route_client-reference-manifest.js +1 -1
  106. package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js +1 -1
  107. package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/ldap/users/route_client-reference-manifest.js +1 -1
  109. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  110. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  112. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  115. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  116. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route_client-reference-manifest.js +1 -1
  118. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  119. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/oidc/start/route_client-reference-manifest.js +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/auth/oidc/test/route_client-reference-manifest.js +1 -1
  124. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  125. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +4 -4
  128. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route_client-reference-manifest.js +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  131. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route_client-reference-manifest.js +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route_client-reference-manifest.js +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route_client-reference-manifest.js +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/root-ca/route.js +2 -2
  140. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/root-ca/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/root-ca/route_client-reference-manifest.js +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  146. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route_client-reference-manifest.js +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  149. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route_client-reference-manifest.js +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  155. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route_client-reference-manifest.js +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  158. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route_client-reference-manifest.js +1 -1
  160. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  161. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route_client-reference-manifest.js +1 -1
  163. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  164. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route_client-reference-manifest.js +1 -1
  166. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  167. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route_client-reference-manifest.js +1 -1
  169. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  170. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +1 -1
  172. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  173. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route_client-reference-manifest.js +1 -1
  175. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  176. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route_client-reference-manifest.js +1 -1
  178. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  179. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route_client-reference-manifest.js +1 -1
  181. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  182. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route_client-reference-manifest.js +1 -1
  184. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  185. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route_client-reference-manifest.js +1 -1
  187. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/combos/[id]/route_client-reference-manifest.js +1 -1
  190. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  191. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/combos/route_client-reference-manifest.js +1 -1
  193. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js +2 -2
  194. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route_client-reference-manifest.js +1 -1
  196. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js +2 -2
  197. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route_client-reference-manifest.js +1 -1
  199. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/health/route_client-reference-manifest.js +1 -1
  202. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/init/route_client-reference-manifest.js +1 -1
  205. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/keys/[id]/route_client-reference-manifest.js +1 -1
  208. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/keys/route_client-reference-manifest.js +1 -1
  211. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/locale/route_client-reference-manifest.js +1 -1
  214. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route_client-reference-manifest.js +1 -1
  217. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +5 -5
  218. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route_client-reference-manifest.js +1 -1
  220. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route_client-reference-manifest.js +1 -1
  223. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route_client-reference-manifest.js +1 -1
  226. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route_client-reference-manifest.js +1 -1
  229. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route_client-reference-manifest.js +1 -1
  232. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route_client-reference-manifest.js +1 -1
  235. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  236. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/models/alias/route_client-reference-manifest.js +1 -1
  238. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/models/availability/route_client-reference-manifest.js +1 -1
  241. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  242. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/models/custom/route_client-reference-manifest.js +1 -1
  244. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/models/disabled/route_client-reference-manifest.js +1 -1
  247. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/models/route_client-reference-manifest.js +1 -1
  250. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  251. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/models/test/route_client-reference-manifest.js +1 -1
  253. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +1 -1
  256. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route_client-reference-manifest.js +1 -1
  259. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  260. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +1 -1
  262. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +1 -1
  265. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route_client-reference-manifest.js +1 -1
  268. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route_client-reference-manifest.js +1 -1
  271. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +1 -1
  274. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +1 -1
  277. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route_client-reference-manifest.js +1 -1
  280. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route_client-reference-manifest.js +1 -1
  283. package/app/.next-cli-build/server/app/api/ollama-model-memory/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/ollama-model-memory/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/ollama-model-memory/route_client-reference-manifest.js +1 -1
  286. package/app/.next-cli-build/server/app/api/ollama-nodes/[id]/install/route.js +147 -16
  287. package/app/.next-cli-build/server/app/api/ollama-nodes/[id]/install/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/ollama-nodes/[id]/install/route_client-reference-manifest.js +1 -1
  289. package/app/.next-cli-build/server/app/api/ollama-nodes/[id]/reservations/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/ollama-nodes/[id]/reservations/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/ollama-nodes/[id]/reservations/route_client-reference-manifest.js +1 -1
  292. package/app/.next-cli-build/server/app/api/ollama-nodes/[id]/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/ollama-nodes/[id]/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/ollama-nodes/[id]/route_client-reference-manifest.js +1 -1
  295. package/app/.next-cli-build/server/app/api/ollama-nodes/[id]/status/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/ollama-nodes/[id]/status/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/ollama-nodes/[id]/status/route_client-reference-manifest.js +1 -1
  298. package/app/.next-cli-build/server/app/api/ollama-nodes/route.js +1 -1
  299. package/app/.next-cli-build/server/app/api/ollama-nodes/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/ollama-nodes/route_client-reference-manifest.js +1 -1
  301. package/app/.next-cli-build/server/app/api/ollama-routing-targets/route.js +1 -1
  302. package/app/.next-cli-build/server/app/api/ollama-routing-targets/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/ollama-routing-targets/route_client-reference-manifest.js +1 -1
  304. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  305. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/pricing/route_client-reference-manifest.js +1 -1
  307. package/app/.next-cli-build/server/app/api/provider-health/route.js +1 -1
  308. package/app/.next-cli-build/server/app/api/provider-health/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/provider-health/route_client-reference-manifest.js +1 -1
  310. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  311. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route_client-reference-manifest.js +1 -1
  313. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  314. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
  316. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  317. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route_client-reference-manifest.js +1 -1
  319. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  320. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/providers/[id]/models/route_client-reference-manifest.js +1 -1
  322. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  323. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/providers/[id]/route_client-reference-manifest.js +1 -1
  325. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  326. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/providers/[id]/test/route_client-reference-manifest.js +1 -1
  328. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route_client-reference-manifest.js +1 -1
  331. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  332. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/providers/client/route_client-reference-manifest.js +1 -1
  334. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route_client-reference-manifest.js +1 -1
  337. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/providers/route_client-reference-manifest.js +1 -1
  340. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/providers/suggested-models/route_client-reference-manifest.js +1 -1
  343. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  344. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/providers/test-batch/route_client-reference-manifest.js +1 -1
  346. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/providers/validate/route_client-reference-manifest.js +1 -1
  349. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  350. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  351. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route_client-reference-manifest.js +1 -1
  352. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route_client-reference-manifest.js +1 -1
  355. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  356. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  357. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route_client-reference-manifest.js +1 -1
  358. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  359. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route_client-reference-manifest.js +1 -1
  361. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  362. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  363. package/app/.next-cli-build/server/app/api/proxy-pools/route_client-reference-manifest.js +1 -1
  364. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  365. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route_client-reference-manifest.js +1 -1
  367. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  368. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  369. package/app/.next-cli-build/server/app/api/settings/database/route_client-reference-manifest.js +1 -1
  370. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/settings/proxy-test/route_client-reference-manifest.js +1 -1
  373. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  374. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  375. package/app/.next-cli-build/server/app/api/settings/require-login/route_client-reference-manifest.js +1 -1
  376. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/settings/route_client-reference-manifest.js +1 -1
  379. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  380. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  381. package/app/.next-cli-build/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
  382. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  383. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/tags/route_client-reference-manifest.js +1 -1
  385. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  386. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  387. package/app/.next-cli-build/server/app/api/translator/console-logs/route_client-reference-manifest.js +1 -1
  388. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  389. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route_client-reference-manifest.js +1 -1
  391. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  392. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  393. package/app/.next-cli-build/server/app/api/translator/load/route_client-reference-manifest.js +1 -1
  394. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/translator/save/route_client-reference-manifest.js +1 -1
  397. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  398. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  399. package/app/.next-cli-build/server/app/api/translator/send/route_client-reference-manifest.js +1 -1
  400. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  401. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/translator/translate/route_client-reference-manifest.js +1 -1
  403. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  404. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  405. package/app/.next-cli-build/server/app/api/tunnel/disable/route_client-reference-manifest.js +1 -1
  406. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  407. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/api/tunnel/enable/route_client-reference-manifest.js +1 -1
  409. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  410. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  411. package/app/.next-cli-build/server/app/api/tunnel/status/route_client-reference-manifest.js +1 -1
  412. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  413. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route_client-reference-manifest.js +1 -1
  415. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  416. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  417. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route_client-reference-manifest.js +1 -1
  418. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  419. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  420. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route_client-reference-manifest.js +1 -1
  421. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  422. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  423. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route_client-reference-manifest.js +1 -1
  424. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js +1 -1
  425. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js.nft.json +1 -1
  426. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route_client-reference-manifest.js +1 -1
  427. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js +2 -2
  428. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js.nft.json +1 -1
  429. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route_client-reference-manifest.js +1 -1
  430. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  431. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  432. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
  433. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  434. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  435. package/app/.next-cli-build/server/app/api/usage/chart/route_client-reference-manifest.js +1 -1
  436. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  437. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  438. package/app/.next-cli-build/server/app/api/usage/history/route_client-reference-manifest.js +1 -1
  439. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  440. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  441. package/app/.next-cli-build/server/app/api/usage/providers/route_client-reference-manifest.js +1 -1
  442. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  443. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  444. package/app/.next-cli-build/server/app/api/usage/request-details/route_client-reference-manifest.js +1 -1
  445. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  446. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  447. package/app/.next-cli-build/server/app/api/usage/request-logs/route_client-reference-manifest.js +1 -1
  448. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  449. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  450. package/app/.next-cli-build/server/app/api/usage/stats/route_client-reference-manifest.js +1 -1
  451. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  452. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  453. package/app/.next-cli-build/server/app/api/usage/stream/route_client-reference-manifest.js +1 -1
  454. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  455. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  456. package/app/.next-cli-build/server/app/api/v1/api/chat/route_client-reference-manifest.js +1 -1
  457. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  458. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  459. package/app/.next-cli-build/server/app/api/v1/audio/speech/route_client-reference-manifest.js +1 -1
  460. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  461. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  462. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route_client-reference-manifest.js +1 -1
  463. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  464. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  465. package/app/.next-cli-build/server/app/api/v1/audio/voices/route_client-reference-manifest.js +1 -1
  466. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  467. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  468. package/app/.next-cli-build/server/app/api/v1/chat/completions/route_client-reference-manifest.js +1 -1
  469. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  470. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  471. package/app/.next-cli-build/server/app/api/v1/embeddings/route_client-reference-manifest.js +1 -1
  472. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  473. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  474. package/app/.next-cli-build/server/app/api/v1/images/generations/route_client-reference-manifest.js +1 -1
  475. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  476. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  477. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +1 -1
  478. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  479. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  480. package/app/.next-cli-build/server/app/api/v1/messages/route_client-reference-manifest.js +1 -1
  481. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  482. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  483. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route_client-reference-manifest.js +1 -1
  484. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  485. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  486. package/app/.next-cli-build/server/app/api/v1/models/info/route_client-reference-manifest.js +1 -1
  487. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  488. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  489. package/app/.next-cli-build/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
  490. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  491. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  492. package/app/.next-cli-build/server/app/api/v1/responses/compact/route_client-reference-manifest.js +1 -1
  493. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  494. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  495. package/app/.next-cli-build/server/app/api/v1/responses/route_client-reference-manifest.js +1 -1
  496. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  497. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  498. package/app/.next-cli-build/server/app/api/v1/route_client-reference-manifest.js +1 -1
  499. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  500. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  501. package/app/.next-cli-build/server/app/api/v1/search/route_client-reference-manifest.js +1 -1
  502. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  503. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  504. package/app/.next-cli-build/server/app/api/v1/web/fetch/route_client-reference-manifest.js +1 -1
  505. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  506. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  507. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route_client-reference-manifest.js +1 -1
  508. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  509. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  510. package/app/.next-cli-build/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
  511. package/app/.next-cli-build/server/app/api/version/restart/route.js +1 -1
  512. package/app/.next-cli-build/server/app/api/version/restart/route.js.nft.json +1 -1
  513. package/app/.next-cli-build/server/app/api/version/restart/route_client-reference-manifest.js +1 -1
  514. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  515. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  516. package/app/.next-cli-build/server/app/api/version/route_client-reference-manifest.js +1 -1
  517. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  518. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  519. package/app/.next-cli-build/server/app/api/version/shutdown/route_client-reference-manifest.js +1 -1
  520. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  521. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  522. package/app/.next-cli-build/server/app/api/version/update/route_client-reference-manifest.js +1 -1
  523. package/app/.next-cli-build/server/app/api/virtual-combos/[id]/route.js +1 -1
  524. package/app/.next-cli-build/server/app/api/virtual-combos/[id]/route.js.nft.json +1 -1
  525. package/app/.next-cli-build/server/app/api/virtual-combos/[id]/route_client-reference-manifest.js +1 -1
  526. package/app/.next-cli-build/server/app/api/virtual-combos/route.js +1 -1
  527. package/app/.next-cli-build/server/app/api/virtual-combos/route.js.nft.json +1 -1
  528. package/app/.next-cli-build/server/app/api/virtual-combos/route_client-reference-manifest.js +1 -1
  529. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  530. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  531. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  532. package/app/.next-cli-build/server/app/callback.html +1 -1
  533. package/app/.next-cli-build/server/app/callback.rsc +5 -5
  534. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
  535. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  536. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +4 -4
  537. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  538. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +2 -2
  539. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  540. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  541. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
  542. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  543. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  544. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  545. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  546. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
  547. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  548. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
  549. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  550. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  551. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -7
  552. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  553. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  554. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  555. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  556. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
  557. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  558. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
  559. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  560. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  561. package/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
  562. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  563. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  564. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  565. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  566. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
  567. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  568. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
  569. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  570. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  571. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +8 -8
  572. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +3 -3
  573. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  574. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  575. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  576. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +8 -8
  577. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  578. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
  579. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  580. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  581. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
  582. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  583. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  584. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  585. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  586. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  587. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
  588. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  589. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
  590. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  591. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  592. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
  593. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  594. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  595. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  596. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  597. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  598. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  599. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
  600. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  601. package/app/.next-cli-build/server/app/dashboard/ollama-nodes.html +1 -1
  602. package/app/.next-cli-build/server/app/dashboard/ollama-nodes.rsc +6 -6
  603. package/app/.next-cli-build/server/app/dashboard/ollama-nodes.segments/!KGRhc2hib2FyZCk/dashboard/ollama-nodes/__PAGE__.segment.rsc +2 -2
  604. package/app/.next-cli-build/server/app/dashboard/ollama-nodes.segments/!KGRhc2hib2FyZCk/dashboard/ollama-nodes.segment.rsc +1 -1
  605. package/app/.next-cli-build/server/app/dashboard/ollama-nodes.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  606. package/app/.next-cli-build/server/app/dashboard/ollama-nodes.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  607. package/app/.next-cli-build/server/app/dashboard/ollama-nodes.segments/_full.segment.rsc +6 -6
  608. package/app/.next-cli-build/server/app/dashboard/ollama-nodes.segments/_head.segment.rsc +1 -1
  609. package/app/.next-cli-build/server/app/dashboard/ollama-nodes.segments/_index.segment.rsc +4 -4
  610. package/app/.next-cli-build/server/app/dashboard/ollama-nodes.segments/_tree.segment.rsc +2 -2
  611. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  612. package/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
  613. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  614. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  615. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  616. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  617. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
  618. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  619. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
  620. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  621. package/app/.next-cli-build/server/app/dashboard/prompt-logs.html +1 -1
  622. package/app/.next-cli-build/server/app/dashboard/prompt-logs.rsc +6 -6
  623. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs/__PAGE__.segment.rsc +2 -2
  624. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs.segment.rsc +1 -1
  625. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  626. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  627. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_full.segment.rsc +6 -6
  628. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_head.segment.rsc +1 -1
  629. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_index.segment.rsc +4 -4
  630. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_tree.segment.rsc +2 -2
  631. package/app/.next-cli-build/server/app/dashboard/provider-health.html +1 -1
  632. package/app/.next-cli-build/server/app/dashboard/provider-health.rsc +6 -6
  633. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health/__PAGE__.segment.rsc +2 -2
  634. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health.segment.rsc +1 -1
  635. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  636. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  637. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_full.segment.rsc +6 -6
  638. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_head.segment.rsc +1 -1
  639. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_index.segment.rsc +4 -4
  640. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_tree.segment.rsc +2 -2
  641. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  642. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
  643. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  644. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  645. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  646. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  647. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  648. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
  649. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  650. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
  651. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  652. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  653. package/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
  654. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  655. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  656. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  657. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  658. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
  659. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  660. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
  661. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  662. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  663. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
  664. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  665. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  666. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  667. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  668. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
  669. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  670. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
  671. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  672. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  673. package/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
  674. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  675. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  676. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  677. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  678. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
  679. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  680. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
  681. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  682. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  683. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  684. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  685. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  686. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
  687. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  688. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  689. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  690. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  691. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
  692. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  693. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  694. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  695. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  696. package/app/.next-cli-build/server/app/dashboard/skills.rsc +6 -6
  697. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  698. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  699. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  700. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  701. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +6 -6
  702. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  703. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +4 -4
  704. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  705. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  706. package/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
  707. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  708. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  709. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  710. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  711. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
  712. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  713. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
  714. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  715. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  716. package/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
  717. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  718. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  719. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  720. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  721. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
  722. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  723. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
  724. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  725. package/app/.next-cli-build/server/app/dashboard/virtual-combos.html +2 -2
  726. package/app/.next-cli-build/server/app/dashboard/virtual-combos.rsc +6 -6
  727. package/app/.next-cli-build/server/app/dashboard/virtual-combos.segments/!KGRhc2hib2FyZCk/dashboard/virtual-combos/__PAGE__.segment.rsc +2 -2
  728. package/app/.next-cli-build/server/app/dashboard/virtual-combos.segments/!KGRhc2hib2FyZCk/dashboard/virtual-combos.segment.rsc +1 -1
  729. package/app/.next-cli-build/server/app/dashboard/virtual-combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  730. package/app/.next-cli-build/server/app/dashboard/virtual-combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  731. package/app/.next-cli-build/server/app/dashboard/virtual-combos.segments/_full.segment.rsc +6 -6
  732. package/app/.next-cli-build/server/app/dashboard/virtual-combos.segments/_head.segment.rsc +1 -1
  733. package/app/.next-cli-build/server/app/dashboard/virtual-combos.segments/_index.segment.rsc +4 -4
  734. package/app/.next-cli-build/server/app/dashboard/virtual-combos.segments/_tree.segment.rsc +2 -2
  735. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  736. package/app/.next-cli-build/server/app/dashboard.rsc +7 -7
  737. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  738. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  739. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  740. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
  741. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  742. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +4 -4
  743. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  744. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  745. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  746. package/app/.next-cli-build/server/app/index.html +1 -1
  747. package/app/.next-cli-build/server/app/index.rsc +4 -4
  748. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  749. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  750. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  751. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +4 -4
  752. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  753. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  754. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  755. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  756. package/app/.next-cli-build/server/app/landing.html +1 -1
  757. package/app/.next-cli-build/server/app/landing.rsc +5 -5
  758. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
  759. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  760. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +4 -4
  761. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  762. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
  763. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  764. package/app/.next-cli-build/server/app/login/page.js +2 -2
  765. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  766. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  767. package/app/.next-cli-build/server/app/login.html +1 -1
  768. package/app/.next-cli-build/server/app/login.rsc +5 -5
  769. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  770. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  771. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +4 -4
  772. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  773. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  774. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  775. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  776. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  777. package/app/.next-cli-build/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  778. package/app/.next-cli-build/server/app/page.js +2 -2
  779. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  780. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  781. package/app/.next-cli-build/server/app-paths-manifest.json +5 -5
  782. package/app/.next-cli-build/server/chunks/2769.js +1 -1
  783. package/app/.next-cli-build/server/chunks/3110.js +1 -1
  784. package/app/.next-cli-build/server/chunks/319.js +3 -3
  785. package/app/.next-cli-build/server/chunks/4746.js +1 -1
  786. package/app/.next-cli-build/server/chunks/5852.js +1 -1
  787. package/app/.next-cli-build/server/chunks/6604.js +7 -0
  788. package/app/.next-cli-build/server/chunks/7130.js +1 -0
  789. package/app/.next-cli-build/server/chunks/7153.js +1 -1
  790. package/app/.next-cli-build/server/chunks/7197.js +1 -1
  791. package/app/.next-cli-build/server/chunks/7774.js +6 -6
  792. package/app/.next-cli-build/server/chunks/7965.js +1 -1
  793. package/app/.next-cli-build/server/chunks/8491.js +2 -2
  794. package/app/.next-cli-build/server/chunks/8520.js +1 -1
  795. package/app/.next-cli-build/server/chunks/8895.js +1 -1
  796. package/app/.next-cli-build/server/chunks/9253.js +1 -0
  797. package/app/.next-cli-build/server/chunks/9447.js +1 -1
  798. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  799. package/app/.next-cli-build/server/middleware.js +4 -4
  800. package/app/.next-cli-build/server/pages/404.html +1 -1
  801. package/app/.next-cli-build/server/pages/500.html +1 -1
  802. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  803. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  804. package/app/.next-cli-build/static/chunks/{1321-5ef553cf7914ae11.js → 1321-d7b76de5f4e9daf2.js} +1 -1
  805. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-0337bade7cc4bb54.js → page-1b2283499089d7dc.js} +1 -1
  806. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-1adaf9be4107d227.js +1 -0
  807. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-d8b42a4e1ae60f65.js → page-85cb2bafe0526c5d.js} +1 -1
  808. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-fa7f1ff2429b81f1.js +1 -0
  809. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/{page-c3640ed1577b33be.js → page-d26b9256cf41fb19.js} +1 -1
  810. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/{page-3154819acdf116e6.js → page-e0b4284d8e973996.js} +1 -1
  811. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-d943cf31dab4f2ca.js → page-4377fb8d824f5bde.js} +2 -2
  812. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-95c158c771a04cee.js → page-0c0be38249c23b67.js} +1 -1
  813. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-784e3c876b7be38f.js → page-b2b612e7dedabef1.js} +2 -2
  814. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-d797bc6e0016a832.js → page-356120709e5a1a94.js} +1 -1
  815. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-161edd90803b7184.js +1 -0
  816. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/ollama-nodes/page-3e97343c80613dec.js +1 -0
  817. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-5e2bec66810c6089.js +1 -0
  818. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-e4e65b72b72489e7.js +1 -0
  819. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/prompt-logs/{page-d92181d9443fbccc.js → page-51f32ade40c03a33.js} +1 -1
  820. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/provider-health/{page-362bbf660a9b7a90.js → page-1ad19698b1534460.js} +1 -1
  821. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-70cb77100361d775.js → page-322409a7d067a9ba.js} +1 -1
  822. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-75089627b58b62a8.js → page-009821d1edc5606b.js} +1 -1
  823. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-ac3c52c3590019b2.js → page-0cf8abbb69a8a288.js} +1 -1
  824. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-7b8d25d6ac984272.js → page-0e356884dbb16e9e.js} +2 -2
  825. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-383255c4b63ebf3b.js +1 -0
  826. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-84e359aafb683d81.js → page-de03c9c19092784e.js} +1 -1
  827. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-ceeba7e47ca79a6e.js → page-fdac9423efa73ccd.js} +1 -1
  828. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-738b345152864d51.js → page-a4e4500cdae96c24.js} +1 -1
  829. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/virtual-combos/{page-5c280ae46214bd5a.js → page-3175d0b06abbb400.js} +1 -1
  830. package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-4d4168ada31e1c18.js → layout-3a946e00857971ef.js} +1 -1
  831. package/app/.next-cli-build/static/chunks/app/_not-found/{page-49d97bcbe2f44252.js → page-858db954e7c2a6ea.js} +1 -1
  832. package/app/.next-cli-build/static/chunks/app/callback/{page-9b9bbcd8b2b1992b.js → page-92792dba9359010b.js} +1 -1
  833. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-7f531843e0dca84d.js +1 -0
  834. package/app/.next-cli-build/static/chunks/app/landing/{page-7d550a4fdc74c753.js → page-657d33ccb95c2759.js} +1 -1
  835. package/app/.next-cli-build/static/chunks/app/{layout-bd4974e3335b6dc6.js → layout-39f1f36912db26e1.js} +1 -1
  836. package/app/.next-cli-build/static/chunks/app/login/{page-00b62bdd78002be3.js → page-5134676839e72d1b.js} +1 -1
  837. package/app/.next-cli-build/static/chunks/{framework-711ef29bc66f648c.js → framework-b8f729f35b3f9ad7.js} +1 -1
  838. package/app/.next-cli-build/static/chunks/main-app-0a27584eea53a4b0.js +1 -0
  839. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/global-error-ee20097265e1e7ed.js +1 -0
  840. package/app/.next-cli-build/static/css/7c50b64c9b7c7390.css +1 -0
  841. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-shm +0 -0
  842. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-wal +0 -0
  843. package/app/cli/.build-home/AppData/Roaming/bluerouter/jwt-secret +1 -1
  844. package/app/cli/.build-home/AppData/Roaming/bluerouter/machine-id +1 -1
  845. package/app/cli/.build-home/AppData/Roaming/nextjs-nodejs/Config/config.json +3 -3
  846. package/app/node_modules/react/cjs/react.development.js +1 -1
  847. package/app/node_modules/react/cjs/react.production.js +1 -1
  848. package/app/node_modules/react/package.json +1 -1
  849. package/app/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js +1 -1
  850. package/app/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.js +1 -1
  851. package/app/node_modules/react-dom/cjs/react-dom-server.browser.production.js +3 -3
  852. package/app/node_modules/react-dom/cjs/react-dom-server.edge.production.js +3 -3
  853. package/app/node_modules/react-dom/cjs/react-dom-server.node.production.js +3 -3
  854. package/app/node_modules/react-dom/cjs/react-dom.production.js +1 -1
  855. package/app/node_modules/react-dom/package.json +2 -2
  856. package/app/package.json +2 -2
  857. package/app/public/sw.js +22 -22
  858. package/app/server.js +1 -1
  859. package/app/src/lib/db/adapters/betterSqliteAdapter.js +55 -55
  860. package/app/src/lib/db/adapters/bunSqliteAdapter.js +63 -63
  861. package/app/src/lib/db/adapters/nodeSqliteAdapter.js +84 -84
  862. package/app/src/lib/db/adapters/sqljsAdapter.js +115 -115
  863. package/app/src/lib/db/migrate.js +286 -286
  864. package/app/src/lib/oauth/services/xai.js +238 -238
  865. package/app/src/shared/utils/apiKey.js +98 -98
  866. package/package.json +1 -1
  867. package/src/cli/menus/apiKeys.js +233 -233
  868. package/src/cli/menus/combos.js +477 -477
  869. package/src/cli/menus/providers.js +845 -845
  870. package/src/cli/tray/trayWin.js +89 -89
  871. package/src/cli/utils/clipboard.js +30 -30
  872. package/src/cli/utils/display.js +156 -156
  873. package/src/cli/utils/endpoint.js +32 -32
  874. package/src/cli/utils/format.js +125 -125
  875. package/src/cli/utils/input.js +156 -156
  876. package/src/cli/utils/menuHelper.js +156 -156
  877. package/src/cli/utils/modelSelector.js +136 -136
  878. package/app/.next-cli-build/server/chunks/476.js +0 -7
  879. package/app/.next-cli-build/server/chunks/9526.js +0 -1
  880. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-db7807f40ca534e6.js +0 -1
  881. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-390aa31a6095d7ce.js +0 -1
  882. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-702e0cf44d2ad7e5.js +0 -1
  883. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/ollama-nodes/page-bac475308728333b.js +0 -1
  884. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-4cdbbceec96a49fe.js +0 -1
  885. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-b223dca149e57c72.js +0 -1
  886. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-eb63022ded49a729.js +0 -1
  887. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-1c664ab9c6951012.js +0 -1
  888. package/app/.next-cli-build/static/chunks/main-app-2f687e2b0501c574.js +0 -1
  889. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/global-error-c3196a49c3084faa.js +0 -1
  890. package/app/.next-cli-build/static/css/faf8f3171226b301.css +0 -1
  891. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/upgrade-1.0.52-to-1.0.53-1.0.53-20260527-171653/data.sqlite +0 -0
  892. /package/app/.next-cli-build/static/{QSbdGxh8toy2LcHGBDqR0 → XswS5OH82Am6l7l-uHSAg}/_buildManifest.js +0 -0
  893. /package/app/.next-cli-build/static/{QSbdGxh8toy2LcHGBDqR0 → XswS5OH82Am6l7l-uHSAg}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8334],{1902:(e,t,s)=>{Promise.resolve().then(s.bind(s,22662))},22662:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>b});var a=s(95155),l=s(73321),r=s(12115),i=s(98500),n=s.n(i),o=s(35497),c=s(57250),d=s(52679);let m=/^[a-zA-Z0-9_.\-]+$/,x={webSearch:"Web Search",webFetch:"Web Fetch",image:"Text to Image",tts:"Text To Speech"},h={webSearch:"/v1/search",webFetch:"/v1/web/fetch",image:"/v1/images/generations",tts:"/v1/audio/speech"},u={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 p(e){return"webSearch"===e||"webFetch"===e?"/dashboard/media-providers/web":`/dashboard/media-providers/${e}`}function b(){let{id:e}=(0,l.useParams)(),t=(0,l.useRouter)(),[s,i]=(0,r.useState)(null),[b,f]=(0,r.useState)(!0),[j,g]=(0,r.useState)(""),[w,y]=(0,r.useState)(""),[v,N]=(0,r.useState)([]),[k,S]=(0,r.useState)(!1),[U,$]=(0,r.useState)(!1),[C,O]=(0,r.useState)([]),[_,T]=(0,r.useState)(!1),[R,A]=(0,r.useState)(null),[L,P]=(0,r.useState)(""),[E,z]=(0,r.useState)(""),[D,F]=(0,r.useState)([]),[M,I]=(0,r.useState)({}),J=async()=>{try{let[t,s,a,l,r,n]=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/keys",{cache:"no-store"}),fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/alias",{cache:"no-store"})]);if(n.ok&&I((await n.json()).aliases||{}),l.ok){let e=await l.json();z((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}if(r.ok&&F((await r.json()).connections||[]),!t.ok){i(null),f(!1);return}let o=await t.json();i(o),g(o.name),N(o.models||[]);let c=s.ok?await s.json():{};S(c.comboStrategies?.[o.name]?.fallbackStrategy==="round-robin");let d=a.ok?await a.json():[];O(d.filter(e=>"string"==typeof e&&e.includes(o.name)).slice(0,50))}catch{}f(!1)};(0,r.useEffect)(()=>{J()},[e]);let W=e=>e.trim()?m.test(e)?(y(""),!0):(y("Only letters, numbers, -, _ and ."),!1):(y("Name is required"),!1),H=async t=>{let s=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return!!s.ok||(alert((await s.json()).error||"Failed to save"),!1)},Z=async()=>{!W(j)||j===s.name||await H({name:j})&&await J()},q=async e=>{let t=e?.value||e;if(!t||v.includes(t))return;let s=[...v,t];N(s),await H({models:s})},B=async e=>{let t=e?.value||e;if(!t||!v.includes(t))return;let s=v.filter(e=>e!==t);N(s),await H({models:s})},Y=async e=>{let t=v.filter((t,s)=>s!==e);N(t),await H({models:t})},G=async(e,t)=>{let s=[...v],a=e+t;a<0||a>=s.length||([s[e],s[a]]=[s[a],s[e]],N(s),await H({models:s}))},K=async e=>{S(e);let t=await fetch("/api/settings",{cache:"no-store"}),a={...(t.ok?await t.json():{}).comboStrategies||{}};e?a[s.name]={fallbackStrategy:"round-robin"}:delete a[s.name],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:a})})},Q=async()=>{!confirm(`Delete combo "${s.name}"?`)||(await fetch(`/api/combos/${e}`,{method:"DELETE"})).ok&&t.push(p(s.kind))},V=async()=>{if(T(!0),A(null),P(""),R?.audioUrl)try{URL.revokeObjectURL(R.audioUrl)}catch{}if(R?.imageUrl?.startsWith("blob:"))try{URL.revokeObjectURL(R.imageUrl)}catch{}let e=Date.now();try{let t=h[s.kind],a=u[s.kind](s.name),l={"Content-Type":"application/json"};E&&(l.Authorization=`Bearer ${E}`);let r=await fetch(`/api${t}`,{method:"POST",headers:l,body:JSON.stringify(a)}),i=Date.now()-e;if(!r.ok){let e=await r.json().catch(()=>({}));P(e?.error?.message||e?.error||`HTTP ${r.status}`),A({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();A({imageUrl:URL.createObjectURL(e),latencyMs:i});return}if(n.startsWith("audio/")||"application/octet-stream"===n){let e=await r.blob();A({audioUrl:URL.createObjectURL(e),latencyMs:i});return}let o=await r.json(),c=o?.data?.[0],d=c?.b64_json?`data:image/png;base64,${c.b64_json}`:c?.url||"";A({json:JSON.stringify(function e(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(e);let s={};for(let[a,l]of Object.entries(t))s[a]="b64_json"===a&&"string"==typeof l&&l.length>100?`<${l.length} chars base64>`:e(l);return s}(o),null,2),imageUrl:d,latencyMs:i})}catch(e){P(e.message||"Network error")}T(!1)};if(b)return(0,a.jsx)("div",{className:"text-text-muted text-sm",children:"Loading..."});if(!s)return(0,l.notFound)();let X=x[s.kind]||d.rj.find(e=>e.id===s.kind)?.label||"Combo",ee=h[s.kind],et=s.kind&&u[s.kind]?u[s.kind](s.name):null,es=ee?`curl -X POST http://localhost:20128${ee} \\
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8334],{22662:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>b});var a=s(95155),l=s(73321),r=s(12115),i=s(98500),n=s.n(i),o=s(35497),c=s(57250),d=s(52679);let m=/^[a-zA-Z0-9_.\-]+$/,x={webSearch:"Web Search",webFetch:"Web Fetch",image:"Text to Image",tts:"Text To Speech"},h={webSearch:"/v1/search",webFetch:"/v1/web/fetch",image:"/v1/images/generations",tts:"/v1/audio/speech"},u={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 p(e){return"webSearch"===e||"webFetch"===e?"/dashboard/media-providers/web":`/dashboard/media-providers/${e}`}function b(){let{id:e}=(0,l.useParams)(),t=(0,l.useRouter)(),[s,i]=(0,r.useState)(null),[b,f]=(0,r.useState)(!0),[j,g]=(0,r.useState)(""),[w,y]=(0,r.useState)(""),[v,N]=(0,r.useState)([]),[k,S]=(0,r.useState)(!1),[U,$]=(0,r.useState)(!1),[C,O]=(0,r.useState)([]),[_,T]=(0,r.useState)(!1),[R,A]=(0,r.useState)(null),[L,P]=(0,r.useState)(""),[E,z]=(0,r.useState)(""),[D,F]=(0,r.useState)([]),[M,I]=(0,r.useState)({}),J=async()=>{try{let[t,s,a,l,r,n]=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/keys",{cache:"no-store"}),fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/alias",{cache:"no-store"})]);if(n.ok&&I((await n.json()).aliases||{}),l.ok){let e=await l.json();z((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}if(r.ok&&F((await r.json()).connections||[]),!t.ok){i(null),f(!1);return}let o=await t.json();i(o),g(o.name),N(o.models||[]);let c=s.ok?await s.json():{};S(c.comboStrategies?.[o.name]?.fallbackStrategy==="round-robin");let d=a.ok?await a.json():[];O(d.filter(e=>"string"==typeof e&&e.includes(o.name)).slice(0,50))}catch{}f(!1)};(0,r.useEffect)(()=>{J()},[e]);let W=e=>e.trim()?m.test(e)?(y(""),!0):(y("Only letters, numbers, -, _ and ."),!1):(y("Name is required"),!1),H=async t=>{let s=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return!!s.ok||(alert((await s.json()).error||"Failed to save"),!1)},Z=async()=>{!W(j)||j===s.name||await H({name:j})&&await J()},q=async e=>{let t=e?.value||e;if(!t||v.includes(t))return;let s=[...v,t];N(s),await H({models:s})},B=async e=>{let t=e?.value||e;if(!t||!v.includes(t))return;let s=v.filter(e=>e!==t);N(s),await H({models:s})},Y=async e=>{let t=v.filter((t,s)=>s!==e);N(t),await H({models:t})},G=async(e,t)=>{let s=[...v],a=e+t;a<0||a>=s.length||([s[e],s[a]]=[s[a],s[e]],N(s),await H({models:s}))},K=async e=>{S(e);let t=await fetch("/api/settings",{cache:"no-store"}),a={...(t.ok?await t.json():{}).comboStrategies||{}};e?a[s.name]={fallbackStrategy:"round-robin"}:delete a[s.name],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:a})})},Q=async()=>{!confirm(`Delete combo "${s.name}"?`)||(await fetch(`/api/combos/${e}`,{method:"DELETE"})).ok&&t.push(p(s.kind))},V=async()=>{if(T(!0),A(null),P(""),R?.audioUrl)try{URL.revokeObjectURL(R.audioUrl)}catch{}if(R?.imageUrl?.startsWith("blob:"))try{URL.revokeObjectURL(R.imageUrl)}catch{}let e=Date.now();try{let t=h[s.kind],a=u[s.kind](s.name),l={"Content-Type":"application/json"};E&&(l.Authorization=`Bearer ${E}`);let r=await fetch(`/api${t}`,{method:"POST",headers:l,body:JSON.stringify(a)}),i=Date.now()-e;if(!r.ok){let e=await r.json().catch(()=>({}));P(e?.error?.message||e?.error||`HTTP ${r.status}`),A({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();A({imageUrl:URL.createObjectURL(e),latencyMs:i});return}if(n.startsWith("audio/")||"application/octet-stream"===n){let e=await r.blob();A({audioUrl:URL.createObjectURL(e),latencyMs:i});return}let o=await r.json(),c=o?.data?.[0],d=c?.b64_json?`data:image/png;base64,${c.b64_json}`:c?.url||"";A({json:JSON.stringify(function e(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(e);let s={};for(let[a,l]of Object.entries(t))s[a]="b64_json"===a&&"string"==typeof l&&l.length>100?`<${l.length} chars base64>`:e(l);return s}(o),null,2),imageUrl:d,latencyMs:i})}catch(e){P(e.message||"Network error")}T(!1)};if(b)return(0,a.jsx)("div",{className:"text-text-muted text-sm",children:"Loading..."});if(!s)return(0,l.notFound)();let X=x[s.kind]||d.rj.find(e=>e.id===s.kind)?.label||"Combo",ee=h[s.kind],et=s.kind&&u[s.kind]?u[s.kind](s.name):null,es=ee?`curl -X POST http://localhost:20128${ee} \\
2
2
  -H "Content-Type: application/json" \\
3
3
  -H "Authorization: Bearer ${E||"YOUR_KEY"}" \\
4
- -d '${JSON.stringify(et)}'`:"",ea=p(s.kind);return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)(n(),{href:ea,className:"text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined",children:"arrow_back"})}),(0,a.jsx)("div",{className:"size-10 rounded-lg bg-primary/10 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"layers"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[X," Combo"]}),(0,a.jsx)("code",{className:"text-lg font-semibold font-mono",children:s.name})]})]}),(0,a.jsx)(o.$n,{variant:"outline",icon:"delete",onClick:Q,className:"text-red-500 border-red-200 hover:bg-red-50",children:"Delete"})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Settings"}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.pd,{label:"Combo Name",value:j,onChange:e=>{g(e.target.value),W(e.target.value)},onBlur:Z,error:w}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and ."})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Rotate providers across requests instead of strict fallback order."})]}),(0,a.jsx)(o.lM,{checked:k,onChange:K})]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Providers"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Tried in order (top-down) or rotated when round-robin is on."})]}),(0,a.jsx)(o.$n,{size:"sm",icon:"add",onClick:()=>$(!0),children:"Add Provider"})]}),0===v.length?(0,a.jsx)("div",{className:"text-center py-6 border border-dashed border-border rounded-lg text-text-muted text-sm",children:"No providers yet."}):(0,a.jsx)("div",{className:"flex flex-col gap-2",children:v.map((e,t)=>{let{providerId:s,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=d.Q2[s];return(0,a.jsxs)("div",{className:"flex items-center gap-3 p-2 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted w-5 text-center",children:t+1}),(0,a.jsx)(c.A,{src:`/providers/${s}.png`,alt:r?.name||s,size:24,className:"object-contain rounded shrink-0",fallbackText:r?.textIcon||s.slice(0,2).toUpperCase(),fallbackColor:r?.color}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-sm font-medium truncate",children:r?.name||s}),l&&(0,a.jsx)("code",{className:"text-[10px] text-text-muted font-mono truncate block",children:l})]}),(0,a.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,a.jsx)("button",{onClick:()=>G(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"}`,title:"Move up",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})}),(0,a.jsx)("button",{onClick:()=>G(t,1),disabled:t===v.length-1,className:`p-1 rounded ${t===v.length-1?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move down",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_downward"})}),(0,a.jsx)("button",{onClick:()=>Y(t),className:"p-1 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:"Remove",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]})]},`${e}-${t}`)})})]}),s.kind&&ee&&(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Test Example"}),(0,a.jsx)(o.$n,{size:"sm",icon:"play_arrow",onClick:V,disabled:_||0===v.length,children:_?"Running...":"Run"})]}),(0,a.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:es}),L&&(0,a.jsx)("p",{className:"mt-3 text-xs text-red-500 break-words",children:L}),R&&(0,a.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[null!=R.latencyMs&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted",children:["⚡ ",R.latencyMs,"ms"]}),R.imageUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:R.imageUrl,download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("img",{src:R.imageUrl,alt:"Generated",className:"max-w-full rounded-lg border border-border"})]}),R.audioUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:R.audioUrl,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("audio",{controls:!0,src:R.audioUrl,className:"w-full"})]}),R.json&&(0,a.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:R.json})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Usage Logs"}),0===C.length?(0,a.jsx)("p",{className:"text-xs text-text-muted italic",children:"No usage yet."}):(0,a.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:C.join("\n")})]}),(0,a.jsx)(o.rq,{isOpen:U,onClose:()=>$(!1),onSelect:q,onDeselect:B,activeProviders:D,modelAliases:M,title:`Add ${X} Model`,kindFilter:s.kind,addedModelValues:v,closeOnSelect:!1})]})}}},e=>{e.O(0,[2574,3862,1051,1321,5497,8441,3794,7358],()=>e(e.s=1902)),_N_E=e.O()}]);
4
+ -d '${JSON.stringify(et)}'`:"",ea=p(s.kind);return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)(n(),{href:ea,className:"text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined",children:"arrow_back"})}),(0,a.jsx)("div",{className:"size-10 rounded-lg bg-primary/10 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"layers"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[X," Combo"]}),(0,a.jsx)("code",{className:"text-lg font-semibold font-mono",children:s.name})]})]}),(0,a.jsx)(o.$n,{variant:"outline",icon:"delete",onClick:Q,className:"text-red-500 border-red-200 hover:bg-red-50",children:"Delete"})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Settings"}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.pd,{label:"Combo Name",value:j,onChange:e=>{g(e.target.value),W(e.target.value)},onBlur:Z,error:w}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and ."})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Rotate providers across requests instead of strict fallback order."})]}),(0,a.jsx)(o.lM,{checked:k,onChange:K})]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Providers"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Tried in order (top-down) or rotated when round-robin is on."})]}),(0,a.jsx)(o.$n,{size:"sm",icon:"add",onClick:()=>$(!0),children:"Add Provider"})]}),0===v.length?(0,a.jsx)("div",{className:"text-center py-6 border border-dashed border-border rounded-lg text-text-muted text-sm",children:"No providers yet."}):(0,a.jsx)("div",{className:"flex flex-col gap-2",children:v.map((e,t)=>{let{providerId:s,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=d.Q2[s];return(0,a.jsxs)("div",{className:"flex items-center gap-3 p-2 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted w-5 text-center",children:t+1}),(0,a.jsx)(c.A,{src:`/providers/${s}.png`,alt:r?.name||s,size:24,className:"object-contain rounded shrink-0",fallbackText:r?.textIcon||s.slice(0,2).toUpperCase(),fallbackColor:r?.color}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-sm font-medium truncate",children:r?.name||s}),l&&(0,a.jsx)("code",{className:"text-[10px] text-text-muted font-mono truncate block",children:l})]}),(0,a.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,a.jsx)("button",{onClick:()=>G(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"}`,title:"Move up",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})}),(0,a.jsx)("button",{onClick:()=>G(t,1),disabled:t===v.length-1,className:`p-1 rounded ${t===v.length-1?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move down",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_downward"})}),(0,a.jsx)("button",{onClick:()=>Y(t),className:"p-1 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:"Remove",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]})]},`${e}-${t}`)})})]}),s.kind&&ee&&(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Test Example"}),(0,a.jsx)(o.$n,{size:"sm",icon:"play_arrow",onClick:V,disabled:_||0===v.length,children:_?"Running...":"Run"})]}),(0,a.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:es}),L&&(0,a.jsx)("p",{className:"mt-3 text-xs text-red-500 break-words",children:L}),R&&(0,a.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[null!=R.latencyMs&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted",children:["⚡ ",R.latencyMs,"ms"]}),R.imageUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:R.imageUrl,download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("img",{src:R.imageUrl,alt:"Generated",className:"max-w-full rounded-lg border border-border"})]}),R.audioUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:R.audioUrl,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("audio",{controls:!0,src:R.audioUrl,className:"w-full"})]}),R.json&&(0,a.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:R.json})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Usage Logs"}),0===C.length?(0,a.jsx)("p",{className:"text-xs text-text-muted italic",children:"No usage yet."}):(0,a.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:C.join("\n")})]}),(0,a.jsx)(o.rq,{isOpen:U,onClose:()=>$(!1),onSelect:q,onDeselect:B,activeProviders:D,modelAliases:M,title:`Add ${X} Model`,kindFilter:s.kind,addedModelValues:v,closeOnSelect:!1})]})}},70878:(e,t,s)=>{Promise.resolve().then(s.bind(s,22662))}},e=>{e.O(0,[2574,3862,1051,1321,5497,8441,3794,7358],()=>e(e.s=70878)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9260],{11283:(e,s,t)=>{Promise.resolve().then(t.bind(t,71088))},71088:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>b});var r=t(95155),a=t(98500),i=t.n(a),l=t(12115),o=t(73321),c=t(35497),n=t(57250),d=t(52679);function m(e){let s=Object.entries(e).some(([e,s])=>e.startsWith("modelLock_")&&s&&new Date(s).getTime()>Date.now());return"unavailable"!==e.testStatus||s?e.testStatus:"active"}function x({provider:e,kind:s,connections:t}){let a=d.Q2[e.id],l=!!a?.noAuth,o=t.filter(s=>s.provider===e.id),h=o.filter(e=>{let s=m(e);return"active"===s||"success"===s}).length,p=o.filter(e=>{let s=m(e);return"error"===s||"expired"===s||"unavailable"===s}).length,b=o.length,u=b>0&&o.every(e=>!1===e.isActive);return(0,r.jsx)(i(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,r.jsx)(c.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${u?"opacity-50":""}`,children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,r.jsx)(n.A,{src:`/providers/${e.id}.png`,alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,r.jsx)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:l?(0,r.jsx)(c.Ex,{variant:"success",size:"sm",children:"Ready"}):u?(0,r.jsx)(c.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===b?(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,r.jsxs)(r.Fragment,{children:[h>0&&(0,r.jsxs)(c.Ex,{variant:"success",size:"sm",dot:!0,children:[h," Connected"]}),p>0&&(0,r.jsxs)(c.Ex,{variant:"error",size:"sm",dot:!0,children:[p," Error"]}),0===h&&0===p&&(0,r.jsxs)(c.Ex,{variant:"default",size:"sm",children:[b," Added"]})]})})]})]})})})}function h({combos:e}){return 0===e.length?(0,r.jsx)("p",{className:"text-xs text-text-muted italic",children:"No combos yet."}):(0,r.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,r.jsx)(i(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,r.jsx)(c.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,r.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1 sm:shrink-0",children:[e.models.slice(0,6).map((e,s)=>{let t="string"==typeof e?e.split("/")[0]:"",a=d.Q2[t];return(0,r.jsx)("div",{title:a?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${a?.color??"#888"}15`},children:(0,r.jsx)(n.A,{src:`/providers/${t}.png`,alt:a?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:a?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:a?.color})},`${e}-${s}`)}),e.models.length>6&&(0,r.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,r.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function p({title:e,icon:s,kind:t,providers:a,connections:i,combos:l,onCreateCombo:o}){return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary",children:s}),(0,r.jsx)("h2",{className:"text-base font-semibold",children:e}),(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:["(",a.length," providers \xb7 ",l.length," combos)"]})]}),(0,r.jsx)(c.$n,{size:"sm",icon:"add",onClick:o,children:"Create Combo"})]}),l.length>0&&(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(h,{combos:l})}),0===a.length?(0,r.jsx)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl text-text-muted text-sm",children:"No providers."}):(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:a.map(e=>(0,r.jsx)(x,{provider:e,kind:t,connections:i},e.id))})]})}function b(){let e=(0,o.useRouter)(),[s,t]=(0,l.useState)([]),[a,i]=(0,l.useState)([]),c=async()=>{try{let[e,s]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/combos",{cache:"no-store"})]);e.ok&&t((await e.json()).connections||[]),s.ok&&i((await s.json()).combos||[])}catch{}};(0,l.useEffect)(()=>{c()},[]);let n=(0,d.o5)("webSearch"),m=(0,d.o5)("webFetch"),x=a.filter(e=>"webSearch"===e.kind),h=a.filter(e=>"webFetch"===e.kind),b=async s=>{let t="webSearch"===s?"search-combo":"fetch-combo",r=t,i=1,l=new Set(a.map(e=>e.name));for(;l.has(r);)r=`${t}-${i++}`;let o=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:r,models:[],kind:s})});if(o.ok){let s=await o.json();e.push(`/dashboard/media-providers/combo/${s.id}`)}else alert((await o.json()).error||"Failed to create combo")};return(0,r.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,r.jsx)(p,{title:"Web Search",icon:"search",kind:"webSearch",providers:n,connections:s,combos:x,onCreateCombo:()=>b("webSearch")}),(0,r.jsx)("div",{className:"border-t border-border"}),(0,r.jsx)(p,{title:"Web Fetch",icon:"travel_explore",kind:"webFetch",providers:m,connections:s,combos:h,onCreateCombo:()=>b("webFetch")})]})}}},e=>{e.O(0,[2574,3862,1051,1321,5497,8441,3794,7358],()=>e(e.s=11283)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9260],{41347:(e,s,t)=>{Promise.resolve().then(t.bind(t,71088))},71088:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>b});var r=t(95155),a=t(98500),i=t.n(a),l=t(12115),o=t(73321),c=t(35497),n=t(57250),d=t(52679);function m(e){let s=Object.entries(e).some(([e,s])=>e.startsWith("modelLock_")&&s&&new Date(s).getTime()>Date.now());return"unavailable"!==e.testStatus||s?e.testStatus:"active"}function x({provider:e,kind:s,connections:t}){let a=d.Q2[e.id],l=!!a?.noAuth,o=t.filter(s=>s.provider===e.id),h=o.filter(e=>{let s=m(e);return"active"===s||"success"===s}).length,p=o.filter(e=>{let s=m(e);return"error"===s||"expired"===s||"unavailable"===s}).length,b=o.length,u=b>0&&o.every(e=>!1===e.isActive);return(0,r.jsx)(i(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,r.jsx)(c.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${u?"opacity-50":""}`,children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,r.jsx)(n.A,{src:`/providers/${e.id}.png`,alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,r.jsx)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:l?(0,r.jsx)(c.Ex,{variant:"success",size:"sm",children:"Ready"}):u?(0,r.jsx)(c.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===b?(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,r.jsxs)(r.Fragment,{children:[h>0&&(0,r.jsxs)(c.Ex,{variant:"success",size:"sm",dot:!0,children:[h," Connected"]}),p>0&&(0,r.jsxs)(c.Ex,{variant:"error",size:"sm",dot:!0,children:[p," Error"]}),0===h&&0===p&&(0,r.jsxs)(c.Ex,{variant:"default",size:"sm",children:[b," Added"]})]})})]})]})})})}function h({combos:e}){return 0===e.length?(0,r.jsx)("p",{className:"text-xs text-text-muted italic",children:"No combos yet."}):(0,r.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,r.jsx)(i(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,r.jsx)(c.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,r.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1 sm:shrink-0",children:[e.models.slice(0,6).map((e,s)=>{let t="string"==typeof e?e.split("/")[0]:"",a=d.Q2[t];return(0,r.jsx)("div",{title:a?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${a?.color??"#888"}15`},children:(0,r.jsx)(n.A,{src:`/providers/${t}.png`,alt:a?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:a?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:a?.color})},`${e}-${s}`)}),e.models.length>6&&(0,r.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,r.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function p({title:e,icon:s,kind:t,providers:a,connections:i,combos:l,onCreateCombo:o}){return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary",children:s}),(0,r.jsx)("h2",{className:"text-base font-semibold",children:e}),(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:["(",a.length," providers \xb7 ",l.length," combos)"]})]}),(0,r.jsx)(c.$n,{size:"sm",icon:"add",onClick:o,children:"Create Combo"})]}),l.length>0&&(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(h,{combos:l})}),0===a.length?(0,r.jsx)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl text-text-muted text-sm",children:"No providers."}):(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:a.map(e=>(0,r.jsx)(x,{provider:e,kind:t,connections:i},e.id))})]})}function b(){let e=(0,o.useRouter)(),[s,t]=(0,l.useState)([]),[a,i]=(0,l.useState)([]),c=async()=>{try{let[e,s]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/combos",{cache:"no-store"})]);e.ok&&t((await e.json()).connections||[]),s.ok&&i((await s.json()).combos||[])}catch{}};(0,l.useEffect)(()=>{c()},[]);let n=(0,d.o5)("webSearch"),m=(0,d.o5)("webFetch"),x=a.filter(e=>"webSearch"===e.kind),h=a.filter(e=>"webFetch"===e.kind),b=async s=>{let t="webSearch"===s?"search-combo":"fetch-combo",r=t,i=1,l=new Set(a.map(e=>e.name));for(;l.has(r);)r=`${t}-${i++}`;let o=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:r,models:[],kind:s})});if(o.ok){let s=await o.json();e.push(`/dashboard/media-providers/combo/${s.id}`)}else alert((await o.json()).error||"Failed to create combo")};return(0,r.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,r.jsx)(p,{title:"Web Search",icon:"search",kind:"webSearch",providers:n,connections:s,combos:x,onCreateCombo:()=>b("webSearch")}),(0,r.jsx)("div",{className:"border-t border-border"}),(0,r.jsx)(p,{title:"Web Fetch",icon:"travel_explore",kind:"webFetch",providers:m,connections:s,combos:h,onCreateCombo:()=>b("webFetch")})]})}}},e=>{e.O(0,[2574,3862,1051,1321,5497,8441,3794,7358],()=>e(e.s=41347)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6607],{2276:(e,s,a)=>{Promise.resolve().then(a.bind(a,55987))},55987:(e,s,a)=>{"use strict";a.d(s,{default:()=>b});var t=a(95155),l=a(12115),r=a(3534),o=a(28777),n=a(52679),i=a(38719),d=a(35497);let c={enabled:!1,type:"sqlite",sqlitePath:"",host:"",port:"",database:"",username:"",password:"",ssl:!1,createDatabase:!1,logClientRequest:!0,logSourceRequest:!0,logTargetRequest:!0,logProviderResponse:!1,logErrors:!0,retentionDays:30};function g({label:e,value:s,onChange:a,type:l="text",placeholder:r="",disabled:o=!1}){return(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)("span",{className:"text-text-muted",children:e}),(0,t.jsx)("input",{type:l,value:s||"",placeholder:r,disabled:o,onChange:e=>a(e.target.value),className:"w-full rounded border border-border bg-surface px-2 py-1.5 text-xs text-text-main focus:outline-none focus:ring-1 focus:ring-primary/50 disabled:opacity-50"})]})}function u({label:e,checked:s,onChange:a,disabled:l=!1}){return(0,t.jsxs)("label",{className:"flex items-center gap-2 text-xs text-text-main",children:[(0,t.jsx)("input",{type:"checkbox",checked:!!s,disabled:l,onChange:e=>a(e.target.checked)}),e]})}function p(){let[e,s]=(0,l.useState)(c),[a,r]=(0,l.useState)(!1),[o,n]=(0,l.useState)(null),[i,p]=(0,l.useState)(null),b=e=>s(s=>({...s,...e})),x=async()=>{r(!0),p(null);try{let e=await fetch("/api/cli-tools/antigravity-mitm/prompt-log-db"),a=await e.json();if(!e.ok)throw Error(a.error||"Failed to load config");s({...c,...a.config||{}})}catch(e){p(e.message||"Failed to load config")}finally{r(!1)}};(0,l.useEffect)(()=>{x()},[]);let h=async()=>{r(!0),p(null),n(null);try{let a=await fetch("/api/cli-tools/antigravity-mitm/prompt-log-db",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({config:e})}),t=await a.json();if(!a.ok)throw Error(t.error||"Failed to save config");s({...c,...t.config||{}}),n("Saved")}catch(e){p(e.message||"Failed to save config")}finally{r(!1)}},m=async s=>{r(!0),p(null),n(null);try{let a=await fetch("/api/cli-tools/antigravity-mitm/prompt-log-db",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:s,config:e})}),t=await a.json();if(!a.ok)throw Error(t.error||"Action failed");n(t.message||t.init?.message||"OK")}catch(e){p(e.message||"Action failed")}finally{r(!1)}},y="sqlite"===e.type,f="postgres"===e.type||"mysql"===e.type;return(0,t.jsx)(d.Zp,{title:"Prompt Log Database",subtitle:"Store MITM/Copilot prompt logs in a queryable database",icon:"database",children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)(d.Ex,{variant:e.enabled?"success":"default",children:e.enabled?"Enabled":"Disabled"}),(0,t.jsx)("span",{className:"text-xs text-text-muted",children:"File logs still remain available under DATA_DIR/logs/requests."})]}),(0,t.jsx)("div",{className:"rounded-lg border border-yellow-500/30 bg-yellow-500/10 p-3 text-xs text-yellow-700 dark:text-yellow-300",children:"Prompt logs may contain source code, selected code, internal URLs, and user prompts. Protect the database and set retention according to your policy."}),(0,t.jsxs)("div",{className:"grid gap-3 md:grid-cols-2",children:[(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)("span",{className:"text-text-muted",children:"Database type"}),(0,t.jsxs)("select",{value:e.type,disabled:a,onChange:s=>{let a=s.target.value;b({type:a,port:"postgres"===a?e.port||"5432":"mysql"===a?e.port||"3306":e.port})},className:"w-full rounded border border-border bg-surface px-2 py-1.5 text-xs text-text-main focus:outline-none focus:ring-1 focus:ring-primary/50",children:[(0,t.jsx)("option",{value:"sqlite",children:"SQLite local"}),(0,t.jsx)("option",{value:"postgres",children:"PostgreSQL"}),(0,t.jsx)("option",{value:"mysql",children:"MySQL / MariaDB"})]})]}),(0,t.jsx)(g,{label:"Retention days",type:"number",value:String(e.retentionDays||30),onChange:e=>b({retentionDays:Number(e)||30}),disabled:a})]}),y&&(0,t.jsx)(g,{label:"SQLite path",value:e.sqlitePath||"",placeholder:"/var/lib/bluerouter/logs/promptLogs.sqlite",onChange:e=>b({sqlitePath:e}),disabled:a}),f&&(0,t.jsxs)("div",{className:"grid gap-3 md:grid-cols-2",children:[(0,t.jsx)(g,{label:"Host",value:e.host,placeholder:"127.0.0.1",onChange:e=>b({host:e}),disabled:a}),(0,t.jsx)(g,{label:"Port",value:e.port,placeholder:"postgres"===e.type?"5432":"3306",onChange:e=>b({port:e}),disabled:a}),(0,t.jsx)(g,{label:"Database",value:e.database,placeholder:"bluerouter_logs",onChange:e=>b({database:e}),disabled:a}),(0,t.jsx)(g,{label:"Username",value:e.username,placeholder:"bluerouter",onChange:e=>b({username:e}),disabled:a}),(0,t.jsx)(g,{label:"Password",type:"password",value:e.password,placeholder:"Leave as ******** to keep existing password",onChange:e=>b({password:e}),disabled:a}),(0,t.jsxs)("div",{className:"flex flex-col justify-end gap-2",children:[(0,t.jsx)(u,{label:"Use SSL",checked:e.ssl,onChange:e=>b({ssl:e}),disabled:a}),(0,t.jsx)(u,{label:"Create database if missing",checked:e.createDatabase,onChange:e=>b({createDatabase:e}),disabled:a})]})]}),(0,t.jsxs)("div",{className:"grid gap-2 rounded-lg border border-border bg-surface/40 p-3 md:grid-cols-2",children:[(0,t.jsx)(u,{label:"Enable database prompt logging",checked:e.enabled,onChange:e=>b({enabled:e}),disabled:a}),(0,t.jsx)(u,{label:"Log client request",checked:e.logClientRequest,onChange:e=>b({logClientRequest:e}),disabled:a}),(0,t.jsx)(u,{label:"Log normalized/source request",checked:e.logSourceRequest,onChange:e=>b({logSourceRequest:e}),disabled:a}),(0,t.jsx)(u,{label:"Log target/provider request",checked:e.logTargetRequest,onChange:e=>b({logTargetRequest:e}),disabled:a}),(0,t.jsx)(u,{label:"Log provider response",checked:e.logProviderResponse,onChange:e=>b({logProviderResponse:e}),disabled:a}),(0,t.jsx)(u,{label:"Log errors",checked:e.logErrors,onChange:e=>b({logErrors:e}),disabled:a})]}),f&&(0,t.jsxs)("div",{className:"rounded-lg border border-blue-500/30 bg-blue-500/10 p-3 text-xs text-blue-700 dark:text-blue-300",children:["PostgreSQL requires npm package ",(0,t.jsx)("code",{children:"pg"}),". MySQL/MariaDB requires ",(0,t.jsx)("code",{children:"mysql2"}),". Run ",(0,t.jsx)("code",{children:"npm install pg mysql2"})," before build if you use external databases."]}),o&&(0,t.jsx)("div",{className:"rounded-lg border border-green-500/30 bg-green-500/10 p-2 text-xs text-green-600",children:o}),i&&(0,t.jsx)("div",{className:"rounded-lg border border-red-500/30 bg-red-500/10 p-2 text-xs text-red-500",children:i}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(d.$n,{size:"sm",variant:"secondary",onClick:x,loading:a,children:"Reload"}),(0,t.jsx)(d.$n,{size:"sm",variant:"secondary",onClick:()=>m("test"),loading:a,children:"Test connection"}),(0,t.jsx)(d.$n,{size:"sm",variant:"secondary",onClick:()=>m("init"),loading:a,children:"Initialize schema"}),(0,t.jsx)(d.$n,{size:"sm",onClick:h,loading:a,children:"Save"}),(0,t.jsx)(d.$n,{size:"sm",variant:"success",onClick:()=>m("save-and-init"),loading:a,children:"Save & initialize"})]})]})})}function b(){let[e,s]=(0,l.useState)([]),[a,d]=(0,l.useState)([]),[c,g]=(0,l.useState)({}),[u,b]=(0,l.useState)(!1),[x,h]=(0,l.useState)(null),[m,y]=(0,l.useState)({running:!1,certExists:!1,dnsStatus:{},hasCachedPassword:!1});(0,l.useEffect)(()=>{f(),j(),v(),w()},[]);let f=async()=>{try{let e=await fetch("/api/providers");if(e.ok){let a=await e.json();s(a.connections||[])}}catch{}},j=async()=>{try{let e=await fetch("/api/keys");if(e.ok){let s=await e.json();d(s.keys||[])}}catch{}},v=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let s=await e.json();g(s.aliases||{})}}catch{}},w=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();b(s.cloudEnabled||!1)}}catch{}},C=()=>e.filter(e=>!1!==e.isActive),S=Object.entries(r.wn);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"rounded-lg border border-yellow-500/30 bg-yellow-500/10 p-4 text-sm text-yellow-700 dark:text-yellow-300",children:[(0,t.jsx)("span",{className:"material-symbols-rounded align-middle text-base",children:"warning"})," ","⚠️ MITM intercepts HTTPS traffic of IDE tools (Antigravity, GitHub Copilot, Kiro) via local CA to redirect requests to your providers. May violate ToS → account ban. Use at your own risk."]}),(0,t.jsx)(i.tA,{apiKeys:a,cloudEnabled:u,onStatusChange:y}),(0,t.jsx)(i.k0,{serverRunning:m.running,onChanged:e=>y(s=>({...s,certExists:e?.certExists??s.certExists}))}),(0,t.jsx)(p,{}),S.map(([e,s])=>(0,t.jsx)(i.kn,{tool:{...s,id:e},isExpanded:x===e,onToggle:()=>h(x===e?null:e),serverRunning:m.running,dnsActive:m.dnsStatus?.[e]||!1,hasCachedPassword:m.hasCachedPassword||!1,needsSudoPassword:!1!==m.needsSudoPassword,isWin:!0===m.isWin,apiKeys:a,activeProviders:C(),hasActiveProviders:C().some(e=>(0,o.KC)(e.provider).length>0||(0,n.mq)(e.provider)||(0,n.gb)(e.provider)),modelAliases:c,cloudEnabled:u,onDnsChange:e=>y(s=>({...s,dnsStatus:e.dnsStatus??s.dnsStatus}))},e))]})}}},e=>{e.O(0,[2574,3862,1051,5772,1321,5497,4404,8441,3794,7358],()=>e(e.s=2276)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1088],{82898:(e,t,a)=>{Promise.resolve().then(a.bind(a,99296))},99296:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>P});var s=a(95155),l=a(12115),r=a(35497),n=a(65921);let d=["minRamFreeMb","minVramFreeMb","loadedRamFreeMb","loadedVramFreeMb","safetyMarginMb"],i={minRamFreeMb:"Wake RAM MB (sleep)",minVramFreeMb:"Wake VRAM MB (sleep)",loadedRamFreeMb:"Loaded RAM MB (loaded)",loadedVramFreeMb:"Loaded VRAM MB (loaded)",safetyMarginMb:"Safety MB (buffer)"},o={minRamFreeMb:"RAM free needed before waking a sleeping model",minVramFreeMb:"VRAM free needed before waking a sleeping model",loadedRamFreeMb:"Extra RAM needed when the model is already loaded",loadedVramFreeMb:"Extra VRAM needed when the model is already loaded",safetyMarginMb:"Buffer added to both wake and loaded checks"},c={model:"",minRamFreeMb:"4096",minVramFreeMb:"0",loadedRamFreeMb:"1024",loadedVramFreeMb:"0",safetyMarginMb:"1024"},m={model:"",overrideEnabled:!1,minRamFreeMb:"",minVramFreeMb:"",loadedRamFreeMb:"",loadedVramFreeMb:"",safetyMarginMb:""};function u(e){return null!=e&&""!==String(e).trim()}function x(e){return u(e)?String(e):""}function p(e){return Array.isArray(e)?[...new Set(e.map(Number).filter(e=>Number.isFinite(e)&&e>0))]:[...new Set(String(e||"11434").split(/[\s,;]+/).map(e=>Number(e)).filter(e=>Number.isFinite(e)&&e>0))]}function h(e,t={}){let a=Number(e)||Number(t.port)||11434;return{id:t.id||`ollama-${a}`,name:t.name||`Ollama :${a}`,port:a,enabled:!1!==t.enabled,gpuMode:t.gpuMode||"auto",gpuIndices:Array.isArray(t.gpuIndices)?t.gpuIndices.map(Number).filter(Number.isFinite):[],allowMultiGpuSplit:!0===t.allowMultiGpuSplit,tags:Array.isArray(t.tags)?t.tags:[],modelMemoryRequirements:t.modelMemoryRequirements||{}}}function b(e=[],t="11434"){let a=p(t),s=new Map((e||[]).map(e=>[Number(e.port),e]));return a.map(e=>h(e,s.get(Number(e))||{}))}function f(e={},{overrideRows:t=!1}={}){return Object.entries(e||{}).map(([e,a])=>({model:e,overrideEnabled:!t||a?.enabled!==!1,minRamFreeMb:x(a?.minRamFreeMb),minVramFreeMb:x(a?.minVramFreeMb),loadedRamFreeMb:x(a?.loadedRamFreeMb),loadedVramFreeMb:x(a?.loadedVramFreeMb),safetyMarginMb:x(a?.safetyMarginMb)}))}function g(e=[]){let t={};for(let a of e){let e=String(a.model||"").trim();if(!e||!0!==a.overrideEnabled)continue;let s={enabled:!0};for(let e of d)u(a[e])&&(s[e]=Math.max(0,Number(a[e]||0)));t[e]=s}return t}function j(e,t=[]){let a=new Map;for(let e of t||[])e&&a.set(e,{...m,model:e,overrideEnabled:!1});for(let t of f(e?.modelMemoryRequirements||{},{overrideRows:!0})){let e=String(t.model||"").trim();e&&a.set(e,{...m,...t,model:e,overrideEnabled:!1!==t.overrideEnabled})}return[...a.values()].sort((e,t)=>String(e.model).localeCompare(String(t.model)))}function v(){return{name:"",host:"",sshUser:"root",sshPort:22,useSudo:!1,agentPort:19999,agentToken:"",ollamaPorts:"11434",refreshIntervalMs:15e3,ufwAllowFrom:"",enabled:!0,useGlobalModelMemory:!0,instances:[h(11434)],notes:""}}function N(e){if(!e)return"Never";let t=new Date(e);return Number.isNaN(t.getTime())?"Never":t.toLocaleString()}function y(e){let t=Number(e||0);return Number.isFinite(t)?t>=1024?`${(t/1024).toFixed(1)} GB`:`${Math.round(t)} MB`:"-"}function w(e){return[...new Set(e?.models||[])].sort()}function M(e,t){let a=Number(t?.port);return(e?.lastStatus?.instances||[]).find(e=>Number(e.port)===a)||null}function S(e,t){let a=Array.isArray(t?.detectedGpuIndices)?t.detectedGpuIndices:[];return t?t.pid?a.length?`${a.map(t=>{var a;let s;return a=e?.lastStatus,(s=(a?.hardware?.gpus||[]).find(e=>Number(e.index)===Number(t)))?`GPU ${s.index} \xb7 ${s.name} \xb7 ${y(s.vramFreeMb)} free`:`GPU ${t}`}).join(" | ")} \xb7 PID ${t.pid} \xb7 ${y(t.detectedGpuVramUsedMb)} used by process`:`PID ${t.pid} detected, no GPU process`:"No listener PID detected":"No status yet"}function k({row:e,globalRule:t,useGlobal:a}){if(e.overrideEnabled){let t=d.filter(t=>u(e[t])).length;return(0,s.jsxs)(r.Ex,{variant:"warning",children:["override ",t,"/5"]})}return a&&t?(0,s.jsx)(r.Ex,{variant:"success",children:"global"}):!a&&t?(0,s.jsx)(r.Ex,{variant:"default",children:"default/preset"}):(0,s.jsx)(r.Ex,{variant:"default",children:"default"})}function C({value:e,onChange:t,disabled:a,globalValue:l,globalEnabled:r}){let n=u(e),d=u(l)?l:"preset";return(0,s.jsxs)("div",{className:"min-w-[145px]",children:[(0,s.jsx)("input",{value:e??"",disabled:a,placeholder:u(l)?String(l):"inherit",onChange:e=>t(e.target.value),className:`w-full rounded-md border border-border px-2 py-1.5 text-xs outline-none focus:border-primary ${a?"bg-surface-2 text-text-muted":"bg-background text-text-main"}`}),(0,s.jsxs)("div",{className:`mt-1 truncate text-[10px] ${n?"text-blue-600":"text-text-muted"}`,children:[r?"Global":"Default",": ",d,n?" \xb7 override":` \xb7 using ${r?"global":"default"}`]})]})}function P(){let e=(0,n.i)(),[t,a]=(0,l.useState)([]),[m,u]=(0,l.useState)([]),[x,h]=(0,l.useState)(null),[P,E]=(0,l.useState)(!0),[$,A]=(0,l.useState)("nodes"),[G,I]=(0,l.useState)(!1),[R,F]=(0,l.useState)(!1),[U,O]=(0,l.useState)(null),[V,D]=(0,l.useState)(null),[T,q]=(0,l.useState)(v()),[B,L]=(0,l.useState)(""),[H,z]=(0,l.useState)(""),[_,W]=(0,l.useState)(""),[J,Z]=(0,l.useState)(null),[Q,K]=(0,l.useState)(!1),[X,Y]=(0,l.useState)(!1),[ee,et]=(0,l.useState)(null),ea=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/ollama-model-memory",{cache:"no-store"}),t=await e.json();e.ok&&(u(f(t.requirements||t.modelMemoryRequirements||{})),h(t.updatedAt||null))}catch{e.error("Failed to load global model memory map")}},[e]),es=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/ollama-nodes",{cache:"no-store"}),t=await e.json();e.ok&&a(t.nodes||[])}catch{e.error("Failed to load Ollama nodes")}finally{E(!1)}},[e]),el=(0,l.useCallback)(async(t,a=!1)=>{Z(t);try{let s=await fetch(`/api/ollama-nodes/${t}/status`,{method:"POST"}),l=await s.json();s.ok||a||e.error(l.error||"Refresh failed"),await es(),s.ok&&!a&&e.success("Status refreshed")}catch{a||e.error("Refresh failed")}finally{Z(null)}},[es,e]);(0,l.useEffect)(()=>{ea(),es()},[ea,es]),(0,l.useEffect)(()=>{let e=setInterval(()=>{let e=Date.now();for(let a of t){if(!a.enabled)continue;let t=a.lastStatusAt?new Date(a.lastStatusAt).getTime():0,s=Math.max(5e3,Number(a.refreshIntervalMs||15e3));(!t||e-t>=s)&&el(a.id,!0)}},5e3);return()=>clearInterval(e)},[t,el]);let er=(0,l.useMemo)(()=>t.filter(e=>e.lastStatus?.ok&&!e.lastError).length,[t]),en=()=>{O(null),q(v()),I(!0)},ed=e=>q(t=>({...t,...e})),ei=(e,t)=>{q(a=>({...a,instances:(a.instances||[]).map((a,s)=>s===e?{...a,...t}:a)}))},eo=(e,t,a,s)=>{q(l=>{let r=[...l.instances||[]],n={...r[e]},d=U?M(U,n):null,i=j(n,w(d));return i[t]={...i[t],[a]:s},n.modelMemoryRequirements=g(i),r[e]=n,{...l,instances:r}})},ec=async()=>{if(!T.host.trim())return void e.warning("Host/IP is required");K(!0);try{let t={...T,ollamaPorts:p(T.ollamaPorts),instances:b(T.instances,T.ollamaPorts)},a=await fetch(U?`/api/ollama-nodes/${U.id}`:"/api/ollama-nodes",{method:U?"PUT":"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),s=await a.json();if(!a.ok)throw Error(s.error||"Save failed");I(!1),await es(),e.success(U?"Ollama node updated":"Ollama node added")}catch(t){e.error(t.message||"Save failed")}finally{K(!1)}},em=async()=>{if(V){Z(V.id),W("Installing...\n");try{let t=await fetch(`/api/ollama-nodes/${V.id}/install`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sshPassword:B,sudoPassword:H,ufwAllowFrom:V.ufwAllowFrom})}),a=await t.json(),s=a.result?[a.result.stdout,a.result.stderr].filter(Boolean).join("\n"):a.error||"";if(W(s),!t.ok)throw Error(a.error||"Install failed");e.success("Agent installed"),await el(V.id,!0)}catch(t){e.error(t.message||"Install failed")}finally{Z(null)}}},eu=(e,t,a)=>u(s=>s.map((s,l)=>l===e?{...s,[t]:a}:s)),ex=async()=>{Y(!0);try{let t=await fetch("/api/ollama-model-memory",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({requirements:function(e=[]){let t={};for(let a of e){let e=String(a.model||"").trim();if(e)for(let s of(t[e]={},d))t[e][s]=Math.max(0,Number(a[s]||0))}return t}(m)})}),a=await t.json();if(!t.ok)throw Error(a.error||"Save global map failed");h(a.updatedAt||new Date().toISOString()),e.success("Global model memory map saved"),await es()}catch(t){e.error(t.message||"Save global map failed")}finally{Y(!1)}};return P?(0,s.jsx)(r.Qv,{}):(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-2xl font-semibold text-text-main",children:"Ollama Nodes"}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Remote install and monitor LAN Ollama agents, including port → PID → GPU mapping."})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsxs)(r.Ex,{children:["Total: ",t.length]}),(0,s.jsxs)(r.Ex,{variant:"success",children:["Online: ",er]}),(0,s.jsx)(r.$n,{icon:"add",onClick:en,children:"Add Ollama Node"})]})]}),(0,s.jsxs)("div",{className:"rounded-2xl border border-border bg-surface-1 p-1",children:[(0,s.jsx)("button",{type:"button",onClick:()=>A("nodes"),className:`rounded-xl px-4 py-2 text-sm ${"nodes"===$?"bg-primary text-white":"text-text-muted hover:bg-surface-2"}`,children:"Nodes"}),(0,s.jsx)("button",{type:"button",onClick:()=>A("global"),className:`rounded-xl px-4 py-2 text-sm ${"global"===$?"bg-primary text-white":"text-text-muted hover:bg-surface-2"}`,children:"Global Model Memory Map"})]}),"global"===$?(0,s.jsxs)(r.Zp,{className:"p-5",children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-wrap items-start justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Global Model Memory Map"}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Shared RAM/VRAM thresholds. Instance overrides win first, then node override, then global/default."}),(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Patterns with * are supported. Last saved: ",N(x)]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)(r.$n,{variant:"secondary",icon:"add",onClick:()=>u(e=>[...e,{...c}]),children:"Add Rule"}),(0,s.jsx)(r.$n,{variant:"secondary",icon:"download",onClick:()=>{let a=function(e=[]){let t=[],a=new Set;for(let s of e)for(let e of function(e){let t=new Set;for(let a of e?.lastStatus?.instances||[])for(let e of a.models||[])t.add(e);for(let a of e?.lastStatus?.ollama?.models||[])t.add(a);return[...t].sort()}(s))t.push(e),a.add(e);return{raw:t,unique:[...a].sort()}}(t);if(!a.unique.length)return e.warning("No detected models found yet. Refresh one or more nodes first.");let s=new Set(m.map(e=>String(e.model||"").trim()).filter(Boolean)),l=a.unique.filter(e=>!s.has(e)).map(e=>({...c,model:e}));if(!l.length)return e.success(`Detected ${a.raw.length} entries, ${a.unique.length} unique. All already exist in the global map.`);u(e=>[...e,...l]),e.success(`Detected ${a.raw.length} entries, ${a.unique.length} unique. Added ${l.length}.`)},children:"Import Detected"}),(0,s.jsx)(r.$n,{loading:X,onClick:ex,children:X?"Saving...":"Save Global Map"})]})]}),(0,s.jsx)("div",{className:"overflow-x-auto rounded-xl border border-border",children:(0,s.jsxs)("table",{className:"w-full min-w-[1080px] text-left text-sm",children:[(0,s.jsx)("thead",{className:"bg-surface-2 text-xs uppercase text-text-muted",children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"px-3 py-2",children:"Model / Pattern"}),d.map(e=>(0,s.jsxs)("th",{className:"px-3 py-2",children:[(0,s.jsx)("div",{children:i[e]}),(0,s.jsx)("div",{className:"normal-case text-[10px] opacity-70",children:o[e]})]},e)),(0,s.jsx)("th",{className:"px-3 py-2 text-right",children:"Action"})]})}),(0,s.jsx)("tbody",{children:m.map((e,t)=>(0,s.jsxs)("tr",{className:"border-t border-border",children:[(0,s.jsx)("td",{className:"px-3 py-2",children:(0,s.jsx)("input",{value:e.model,onChange:e=>eu(t,"model",e.target.value),placeholder:"qwen3:8b or gemma*",className:"w-full rounded-md border border-border bg-background px-2 py-1.5 font-mono text-xs outline-none focus:border-primary"})}),d.map(a=>(0,s.jsx)("td",{className:"px-3 py-2",children:(0,s.jsx)("input",{value:e[a]??"",onChange:e=>eu(t,a,e.target.value),className:"w-32 rounded-md border border-border bg-background px-2 py-1.5 text-xs outline-none focus:border-primary"})},a)),(0,s.jsx)("td",{className:"px-3 py-2 text-right",children:(0,s.jsx)("button",{type:"button",onClick:()=>u(e=>e.filter((e,a)=>a!==t)),className:"rounded-md px-2 py-1 text-red-500 hover:bg-red-500/10",children:(0,s.jsx)("span",{className:"material-icons text-base",children:"delete"})})})]},`${e.model}-${t}`))})]})})]}):0===t.length?(0,s.jsxs)(r.Zp,{className:"p-8 text-center",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"No Ollama nodes yet"}),(0,s.jsx)(r.$n,{className:"mt-4",icon:"add",onClick:en,children:"Add Ollama Node"})]}):(0,s.jsx)("div",{className:"grid gap-4",children:t.map(t=>{let a=t.lastStatus||{},l=t.lastEvaluation||{},n=a.hardware?.gpus||[],d=a.hardware?.ram||{};return(0,s.jsxs)(r.Zp,{className:"p-5",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:t.name}),(0,s.jsx)(r.Ex,{variant:t.lastError?"error":t.lastStatus?.ok?"success":"default",children:t.lastError?"error":a.ok?"online":"unknown"}),l.hasBlockedSleepingModels?(0,s.jsx)(r.Ex,{variant:"error",children:"blocked sleeping models"}):null,(0,s.jsx)(r.Ex,{variant:t.enabled?"success":"default",children:t.enabled?"enabled":"disabled"})]}),(0,s.jsxs)("p",{className:"mt-1 text-sm text-text-muted",children:[t.host,":",t.agentPort," \xb7 Ollama ports ",(t.ollamaPorts||[]).join(", ")," \xb7 Refresh ",t.refreshIntervalMs,"ms"]}),(0,s.jsxs)("p",{className:"mt-1 text-xs text-text-muted",children:["Last status: ",N(t.lastStatusAt),t.lastError?` \xb7 ${t.lastError}`:""]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)(r.$n,{size:"sm",variant:"secondary",icon:"refresh",onClick:()=>el(t.id),disabled:J===t.id,children:J===t.id?"Working...":"Refresh"}),(0,s.jsx)(r.$n,{size:"sm",variant:"secondary",icon:"terminal",onClick:()=>{D(t),L(""),z(""),W(""),F(!0)},children:"Install Agent"}),(0,s.jsx)(r.$n,{size:"sm",variant:"ghost",icon:"edit",onClick:()=>{let e,a;return e=(t.ollamaPorts||[11434]).join(","),a=b(Array.isArray(t.instances)?t.instances:[],e),void(O(t),q({...v(),...t,ollamaPorts:e,instances:a,useGlobalModelMemory:!1!==t.useGlobalModelMemory}),I(!0))},children:"Edit"}),(0,s.jsx)(r.$n,{size:"sm",variant:"ghost",icon:"delete",onClick:()=>et({title:"Delete Ollama Node",message:`Delete node "${t.name}"?`,onConfirm:async()=>{et(null),(await fetch(`/api/ollama-nodes/${t.id}`,{method:"DELETE"})).ok?(await es(),e.success("Node deleted")):e.error("Delete failed")}}),children:"Delete"})]})]}),(0,s.jsxs)("div",{className:"mt-4 grid gap-4 md:grid-cols-2",children:[(0,s.jsxs)("div",{className:"rounded-xl border border-border p-4",children:[(0,s.jsx)("div",{className:"text-sm text-text-muted",children:"RAM"}),(0,s.jsxs)("div",{className:"mt-1 text-xl font-semibold text-text-main",children:[y(d.availableMb)," free"]}),(0,s.jsxs)("div",{className:"text-sm text-text-muted",children:["Total ",y(d.totalMb)," \xb7 Used ",d.usedPercent??"-","%"]})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-border p-4",children:[(0,s.jsx)("div",{className:"text-sm text-text-muted",children:"GPU"}),n.length?n.map(e=>(0,s.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-sm",children:[(0,s.jsxs)("span",{className:"font-medium text-text-main",children:["GPU ",e.index," \xb7 ",e.name]}),(0,s.jsxs)(r.Ex,{children:["VRAM ",y(e.vramFreeMb)," / ",y(e.vramTotalMb)," free"]}),(0,s.jsxs)(r.Ex,{children:["GPU ",e.gpuUsagePercent,"%"]}),(0,s.jsxs)(r.Ex,{variant:Number(e.temperatureC)>=80?"error":"success",children:[e.temperatureC,"\xb0C"]})]},e.index)):(0,s.jsx)("div",{className:"mt-2 text-sm text-text-muted",children:"No NVIDIA GPU detected"})]})]}),(0,s.jsx)("div",{className:"mt-4 space-y-3",children:(l.instances||a.instances||[]).map(e=>(0,s.jsxs)("div",{className:"rounded-xl border border-border p-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsxs)("h3",{className:"font-semibold text-text-main",children:["Ollama :",e.port||"default"]}),(0,s.jsx)(r.Ex,{variant:e.alive?"success":"error",children:e.alive?"alive":"down"}),(0,s.jsxs)(r.Ex,{variant:e.detectedGpuIndices?.length?"success":"default",children:["Detected GPU: ",e.detectedGpuIndices?.length?e.detectedGpuIndices.map(e=>`GPU ${e}`).join(", "):"none"]}),e.pid?(0,s.jsxs)(r.Ex,{children:["PID ",e.pid]}):null,e.detectedGpuVramUsedMb?(0,s.jsxs)(r.Ex,{children:[y(e.detectedGpuVramUsedMb)," process VRAM"]}):null,(0,s.jsx)("span",{className:"text-xs text-text-muted",children:e.baseUrl})]}),(0,s.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:S(t,e)}),e.hardwareScope?(0,s.jsxs)("p",{className:"mt-1 text-xs text-text-muted",children:["Routing GPU scope: ",e.hardwareScope.gpuIndices?.length?e.hardwareScope.gpuIndices.map(e=>`GPU ${e}`).join(", "):"none"," \xb7 source ",e.hardwareScope.source]}):null,e.modelReadiness?.length?(0,s.jsx)("div",{className:"mt-3 grid gap-2 md:grid-cols-2 xl:grid-cols-3",children:e.modelReadiness.map(e=>{var t;return(0,s.jsxs)("div",{className:"rounded-lg bg-surface-2 p-3 text-sm",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("span",{className:"font-mono text-xs text-text-main",children:e.model}),(0,s.jsx)(r.Ex,{variant:e.loaded?"success":"default",children:e.loaded?"loaded":"sleeping"}),(0,s.jsx)(r.Ex,{variant:(t=e.status)?t.includes("insufficient")||t.includes("low")?"error":t.includes("unconfigured")?"warning":"success":"default",children:e.status}),(0,s.jsx)(r.Ex,{variant:e.ruleSource?.includes("override")?"warning":"global"===e.ruleSource?"success":"default",children:e.ruleSource||"none"}),e.loadedMatch?(0,s.jsx)(r.Ex,{children:e.loadedMatch}):null]}),(0,s.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:e.reason})]},e.model)})}):(0,s.jsx)("div",{className:"mt-3 text-sm text-text-muted",children:"No models reported for this instance."})]},e.id||e.port||e.baseUrl))})]},t.id)})}),(0,s.jsx)(r.aF,{isOpen:G,onClose:()=>I(!1),title:U?"Edit Ollama Node":"Add Ollama Node",size:"full",className:"w-[calc(100vw-32px)] max-w-none xl:w-[96vw]",footer:(0,s.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,s.jsx)(r.$n,{onClick:ec,loading:Q,children:Q?"Saving...":"Save"}),(0,s.jsx)(r.$n,{variant:"ghost",onClick:()=>I(!1),disabled:Q,children:"Cancel"})]}),children:(0,s.jsxs)("div",{className:"max-h-[75vh] space-y-5 overflow-y-auto pr-2",children:[(0,s.jsxs)("div",{className:"grid gap-3 md:grid-cols-3",children:[(0,s.jsx)(r.pd,{label:"Name",value:T.name,onChange:e=>ed({name:e.target.value}),placeholder:"5090 node"}),(0,s.jsx)(r.pd,{label:"Host/IP",value:T.host,onChange:e=>ed({host:e.target.value}),placeholder:"172.16.6.13"}),(0,s.jsx)(r.pd,{label:"SSH User",value:T.sshUser,onChange:e=>ed({sshUser:e.target.value}),placeholder:"root or fujinet"}),(0,s.jsx)(r.pd,{label:"SSH Port",value:T.sshPort,onChange:e=>ed({sshPort:e.target.value}),placeholder:"22"}),(0,s.jsx)(r.pd,{label:"Agent Port",value:T.agentPort,onChange:e=>ed({agentPort:e.target.value}),placeholder:"19999"}),(0,s.jsx)(r.pd,{label:"Agent Token",value:T.agentToken,onChange:e=>ed({agentToken:e.target.value}),placeholder:"auto if empty"}),(0,s.jsx)(r.pd,{label:"Ollama Ports",value:T.ollamaPorts,onChange:e=>{var t;return t=e.target.value,void q(e=>({...e,ollamaPorts:t,instances:b(e.instances,t)}))},placeholder:"11434,11435"}),(0,s.jsx)(r.pd,{label:"Refresh Interval MS",value:T.refreshIntervalMs,onChange:e=>ed({refreshIntervalMs:e.target.value}),placeholder:"15000"}),(0,s.jsx)(r.pd,{label:"UFW Allow From",value:T.ufwAllowFrom,onChange:e=>ed({ufwAllowFrom:e.target.value}),placeholder:"172.16.0.0/12"})]}),(0,s.jsxs)("div",{className:"grid gap-3 md:grid-cols-2",children:[(0,s.jsx)("div",{className:"rounded-xl border border-border p-4",children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"font-semibold text-text-main",children:"Use sudo"}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Enable when SSH user is not root but has sudo rights."})]}),(0,s.jsx)(r.lM,{checked:!!T.useSudo,onChange:()=>ed({useSudo:!T.useSudo})})]})}),(0,s.jsx)("div",{className:"rounded-xl border border-border p-4",children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"font-semibold text-text-main",children:"Use Global Model Memory Map"}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"When off, routing still uses built-in defaults instead of zero."})]}),(0,s.jsx)(r.lM,{checked:!1!==T.useGlobalModelMemory,onChange:()=>ed({useGlobalModelMemory:!1===T.useGlobalModelMemory})})]})})]}),(0,s.jsx)("div",{className:"space-y-4",children:(T.instances||[]).map((e,t)=>{let a,l=U?M(U,e):null,n=U?(a=Number(e?.port),(U?.lastEvaluation?.instances||[]).find(e=>Number(e.port)===a)||null):null,c=j(e,w(l));return(0,s.jsxs)("div",{className:"rounded-xl border border-border p-4",children:[(0,s.jsxs)("div",{className:"mb-3 flex flex-wrap items-start justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsxs)("h3",{className:"font-semibold text-text-main",children:["Ollama Instance :",e.port]}),(0,s.jsx)(r.Ex,{variant:e.enabled?"success":"default",children:e.enabled?"enabled":"disabled"}),(0,s.jsxs)(r.Ex,{variant:l?.detectedGpuIndices?.length?"success":"default",children:["Detected GPU: ",l?.detectedGpuIndices?.length?l.detectedGpuIndices.map(e=>`GPU ${e}`).join(", "):"none"]}),l?.pid?(0,s.jsxs)(r.Ex,{children:["PID ",l.pid]}):null]}),(0,s.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:S(U,l)}),n?.hardwareScope?(0,s.jsxs)("p",{className:"mt-1 text-xs text-text-muted",children:["Effective routing scope: ",n.hardwareScope.gpuIndices?.length?n.hardwareScope.gpuIndices.map(e=>`GPU ${e}`).join(", "):"none"," \xb7 ",n.hardwareScope.source]}):null]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:(0,s.jsx)(r.$n,{size:"sm",variant:"secondary",icon:"add",onClick:()=>{q(e=>{let a=[...e.instances||[]],s={...a[t]};return s.modelMemoryRequirements={...s.modelMemoryRequirements||{},[`custom-${Date.now()}`]:{enabled:!0}},a[t]=s,{...e,instances:a}})},children:"Add Override"})})]}),(0,s.jsxs)("div",{className:"grid gap-3 md:grid-cols-4",children:[(0,s.jsx)("div",{className:"rounded-xl bg-surface-2 p-3",children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsx)("span",{className:"text-sm font-medium text-text-main",children:"Instance enabled"}),(0,s.jsx)(r.lM,{checked:!1!==e.enabled,onChange:()=>ei(t,{enabled:!1===e.enabled})})]})}),(0,s.jsxs)("label",{className:"block text-sm",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"GPU Mode"}),(0,s.jsxs)("select",{value:e.gpuMode||"auto",onChange:e=>ei(t,{gpuMode:e.target.value}),className:"mt-1 w-full rounded-md border border-border bg-background px-2 py-2 text-sm outline-none focus:border-primary",children:[(0,s.jsx)("option",{value:"auto",children:"Auto: detected GPU, then best GPU"}),(0,s.jsx)("option",{value:"cpu",children:"CPU only"}),(0,s.jsx)("option",{value:"specific",children:"Specific GPU indices"}),(0,s.jsx)("option",{value:"all",children:"All GPUs"})]})]}),(0,s.jsx)(r.pd,{label:"GPU Indices",value:(e.gpuIndices||[]).join(","),onChange:e=>{var a;return ei(t,{gpuIndices:Array.isArray(a=e.target.value)?[...new Set(a.map(Number).filter(e=>Number.isInteger(e)&&e>=0))]:[...new Set(String(a||"").split(/[\s,;]+/).map(e=>Number(e)).filter(e=>Number.isInteger(e)&&e>=0))]})},placeholder:"0 or 0,1"}),(0,s.jsxs)("div",{className:"rounded-xl bg-surface-2 p-3",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsx)("span",{className:"text-sm font-medium text-text-main",children:"Allow multi-GPU split"}),(0,s.jsx)(r.lM,{checked:!!e.allowMultiGpuSplit,onChange:()=>ei(t,{allowMultiGpuSplit:!e.allowMultiGpuSplit})})]}),(0,s.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Only enable if this instance/model can split across GPUs."})]})]}),(0,s.jsx)("div",{className:"mt-3 overflow-x-auto rounded-xl border border-border",children:(0,s.jsxs)("table",{className:"w-full min-w-[1320px] text-left text-sm",children:[(0,s.jsx)("thead",{className:"bg-surface-2 text-xs uppercase text-text-muted",children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"px-3 py-2",children:"Model / Pattern"}),(0,s.jsx)("th",{className:"px-3 py-2",children:"Override"}),(0,s.jsx)("th",{className:"px-3 py-2",children:"Source"}),d.map(e=>(0,s.jsxs)("th",{className:"px-3 py-2",children:[(0,s.jsx)("div",{children:i[e]}),(0,s.jsx)("div",{className:"normal-case text-[10px] opacity-70",children:o[e]})]},e)),(0,s.jsx)("th",{className:"px-3 py-2 text-right",children:"Action"})]})}),(0,s.jsxs)("tbody",{children:[c.map((e,a)=>{let l=function(e=[],t){let a=String(t||"").trim();if(!a)return null;let s=e.find(e=>String(e.model||"")===a);if(s)return{row:s,key:s.model,matchType:"exact"};let l=a.toLowerCase(),r=e.find(e=>String(e.model||"").toLowerCase()===l);if(r)return{row:r,key:r.model,matchType:"case-insensitive"};let n=e.find(e=>{let t;return String(e.model||"").includes("*")&&(t=String(e.model||"").split("*").map(e=>e.replace(/[|\\{}()[\]^$+?.]/g,"\\$&")).join(".*"),RegExp(`^${t}$`,"i")).test(a)});return n?{row:n,key:n.model,matchType:"wildcard"}:null}(m,e.model),n=!0!==e.overrideEnabled;return(0,s.jsxs)("tr",{className:"border-t border-border",children:[(0,s.jsxs)("td",{className:"px-3 py-2 align-top",children:[(0,s.jsx)("input",{value:e.model,onChange:e=>eo(t,a,"model",e.target.value),placeholder:"qwen3:8b",className:"w-full rounded-md border border-border bg-background px-2 py-1.5 font-mono text-xs outline-none focus:border-primary"}),l?.matchType==="wildcard"?(0,s.jsxs)("div",{className:"mt-1 text-[10px] text-text-muted",children:["Matched global pattern: ",l.key]}):null]}),(0,s.jsx)("td",{className:"px-3 py-2 align-top",children:(0,s.jsx)(r.lM,{checked:!0===e.overrideEnabled,onChange:()=>eo(t,a,"overrideEnabled",!0!==e.overrideEnabled)})}),(0,s.jsx)("td",{className:"px-3 py-2 align-top",children:(0,s.jsx)(k,{row:e,globalRule:l?.row,useGlobal:!1!==T.useGlobalModelMemory})}),d.map(r=>(0,s.jsx)("td",{className:"px-3 py-2 align-top",children:(0,s.jsx)(C,{value:e[r]??"",disabled:n,globalValue:l?.row?.[r],globalEnabled:!1!==T.useGlobalModelMemory,onChange:e=>eo(t,a,r,e)})},r)),(0,s.jsx)("td",{className:"px-3 py-2 text-right align-top",children:(0,s.jsx)("button",{type:"button",onClick:()=>ei(t,{modelMemoryRequirements:g(c.filter((e,t)=>t!==a))}),className:"rounded-md px-2 py-1 text-red-500 hover:bg-red-500/10",children:(0,s.jsx)("span",{className:"material-icons text-base",children:"delete"})})})]},`${e.model}-${a}`)}),c.length?null:(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:9,className:"px-3 py-6 text-center text-sm text-text-muted",children:"No detected models yet. Refresh node after agent install."})})]})]})})]},`${e.port}-${t}`)})})]})}),(0,s.jsx)(r.aF,{isOpen:R,onClose:()=>F(!1),title:`Install agent: ${V?.name||""}`,children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)("div",{className:"rounded-xl border border-amber-300 bg-amber-50 p-3 text-sm text-amber-800",children:"Passwords are used only for this install request and are not stored."}),(0,s.jsx)(r.pd,{label:"SSH Password",value:B,onChange:e=>L(e.target.value),type:"password",placeholder:"leave empty for SSH key"}),V?.useSudo?(0,s.jsx)(r.pd,{label:"Sudo Password",value:H,onChange:e=>z(e.target.value),type:"password",placeholder:"leave empty to reuse SSH password"}):null,(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(r.$n,{onClick:em,disabled:J===V?.id,children:J===V?.id?"Installing...":"Install / Update Agent"}),(0,s.jsx)(r.$n,{variant:"ghost",onClick:()=>F(!1),disabled:J===V?.id,children:"Close"})]}),_?(0,s.jsx)("pre",{className:"max-h-64 overflow-auto rounded-xl bg-surface-2 p-3 text-xs text-text-main",children:_}):null]})}),(0,s.jsx)(r.uo,{isOpen:!!ee,onClose:()=>et(null),onConfirm:ee?.onConfirm,title:ee?.title||"Confirm",message:ee?.message,variant:"danger"})]})}}},e=>{e.O(0,[2574,3862,1051,1321,5497,8441,3794,7358],()=>e(e.s=82898)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6337],{18032:(e,s,_)=>{Promise.resolve().then(_.bind(_,95907))}},e=>{e.O(0,[2574,3862,1051,1321,5497,5907,8441,3794,7358],()=>e(e.s=18032)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{7973:(e,s,a)=>{Promise.resolve().then(a.bind(a,64561))},64561:(e,s,a)=>{"use strict";a.r(s),a.d(s,{default:()=>n});var t=a(95155),l=a(12115);function r({status:e}){return e?.message?(0,t.jsx)("p",{className:`rounded-xl border px-3 py-2 text-sm ${"success"===e.type?"border-green-500/30 bg-green-500/10 text-green-700 dark:text-green-300":"border-red-500/30 bg-red-500/10 text-red-600 dark:text-red-300"}`,children:e.message}):null}function d({label:e,hint:s,children:a}){return(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"mb-1 block text-sm font-medium text-text-main",children:e}),a,s&&(0,t.jsx)("span",{className:"mt-1 block text-xs leading-relaxed text-text-muted",children:s})]})}function i(e){return(0,t.jsx)("input",{...e,className:`w-full rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:border-primary ${e.className||""}`})}function o({title:e,desc:s,checked:a,onChange:l,disabled:r}){return(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4 rounded-xl border border-border bg-background/60 p-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-semibold text-text-main",children:e}),s&&(0,t.jsx)("p",{className:"mt-1 text-xs leading-relaxed text-text-muted",children:s})]}),(0,t.jsx)("button",{type:"button",disabled:r,onClick:()=>l(!a),className:`relative mt-0.5 h-6 w-11 rounded-full transition disabled:opacity-50 ${a?"bg-primary":"bg-border"}`,children:(0,t.jsx)("span",{className:`absolute top-1 h-4 w-4 rounded-full bg-white transition ${a?"left-6":"left-1"}`})})]})}function n(){let[e,s]=(0,l.useState)({}),[a,n]=(0,l.useState)(!0),[c,m]=(0,l.useState)({current:"",new:"",confirm:""}),[p,u]=(0,l.useState)({type:"",message:""}),[x,b]=(0,l.useState)(!1),[h,g]=(0,l.useState)(!1),[y,j]=(0,l.useState)({type:"",message:""}),f=(0,l.useRef)(null),[w,v]=(0,l.useState)("admin"),[N,A]=(0,l.useState)({type:"",message:""}),[D,C]=(0,l.useState)({ldapEnabled:!1,ldapUrl:"",ldapBindDn:"",ldapBindPassword:"",ldapBaseDn:"",ldapUserSearchFilter:"(|(sAMAccountName={{username}})(userPrincipalName={{username}})(mail={{username}}))",ldapUserNameAttribute:"sAMAccountName",ldapUserDisplayAttribute:"displayName",ldapUserEmailAttribute:"mail",ldapAllowedUsers:[],ldapAllowAnyUser:!1,ldapTlsRejectUnauthorized:!0,ldapConnectTimeoutMs:8e3}),[U,S]=(0,l.useState)({type:"",message:""}),[L,k]=(0,l.useState)(!1),[P,I]=(0,l.useState)(!1),[O,B]=(0,l.useState)(""),[E,F]=(0,l.useState)([]),[M,R]=(0,l.useState)(!1),[T,q]=(0,l.useState)({authMode:"password",oidcIssuerUrl:"",oidcClientId:"",oidcScopes:"openid profile email",oidcLoginLabel:"Sign in with OIDC"}),[$,_]=(0,l.useState)(""),[W,z]=(0,l.useState)({type:"",message:""}),[J,K]=(0,l.useState)(!1),[H,G]=(0,l.useState)(!1),Q=async()=>{n(!0);try{let e=await fetch("/api/settings",{cache:"no-store"}),a=await e.json();s(a),v(a.localLoginUsername||"admin"),C({ldapEnabled:!0===a.ldapEnabled,ldapUrl:a.ldapUrl||"",ldapBindDn:a.ldapBindDn||"",ldapBindPassword:"",ldapBaseDn:a.ldapBaseDn||"",ldapUserSearchFilter:a.ldapUserSearchFilter||"(|(sAMAccountName={{username}})(userPrincipalName={{username}})(mail={{username}}))",ldapUserNameAttribute:a.ldapUserNameAttribute||"sAMAccountName",ldapUserDisplayAttribute:a.ldapUserDisplayAttribute||"displayName",ldapUserEmailAttribute:a.ldapUserEmailAttribute||"mail",ldapAllowedUsers:Array.isArray(a.ldapAllowedUsers)?a.ldapAllowedUsers:[],ldapAllowAnyUser:!0===a.ldapAllowAnyUser,ldapTlsRejectUnauthorized:!1!==a.ldapTlsRejectUnauthorized,ldapConnectTimeoutMs:a.ldapConnectTimeoutMs||8e3}),q({authMode:a.authMode||"password",oidcIssuerUrl:a.oidcIssuerUrl||"",oidcClientId:a.oidcClientId||"",oidcScopes:a.oidcScopes||"openid profile email",oidcLoginLabel:a.oidcLoginLabel||"Sign in with OIDC"}),("oidc"===a.authMode||"both"===a.authMode)&&G(!0)}catch(e){console.log("Failed to fetch settings:",e)}finally{n(!1)}};(0,l.useEffect)(()=>{Q()},[]);let V=async e=>{let a=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),t=await a.json().catch(()=>({}));if(!a.ok)throw Error(t.error||"Failed to save settings");return s(e=>({...e,...t})),t},X=async e=>{try{let a=await V({requireLogin:e});s(e=>({...e,requireLogin:a.requireLogin}))}catch(e){console.log("Failed to update require login:",e)}},Y=async e=>{e.preventDefault(),A({type:"",message:""});try{let e=await V({localLoginUsername:w});v(e.localLoginUsername||w||"admin"),A({type:"success",message:"Local account name saved."})}catch(e){A({type:"error",message:e.message})}},Z=async e=>{if(e.preventDefault(),c.new!==c.confirm)return void u({type:"error",message:"Passwords do not match"});b(!0),u({type:"",message:""});try{await V({currentPassword:c.current,newPassword:c.new}),u({type:"success",message:"Password updated successfully"}),m({current:"",new:"",confirm:""})}catch(e){u({type:"error",message:e.message||"Failed to update password"})}finally{b(!1)}},ee=async()=>{g(!0),j({type:"",message:""});try{let e=await fetch("/api/settings/database");if(!e.ok){let s=await e.json().catch(()=>({}));throw Error(s.error||"Failed to export database")}let s=await e.json(),a=JSON.stringify(s,null,2),t=new Blob([a],{type:"application/json"}),l=URL.createObjectURL(t),r=document.createElement("a"),d=new Date().toISOString().replace(/[.:]/g,"-");r.href=l,r.download=`bluerouter-backup-${d}.json`,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(l),j({type:"success",message:"Database backup downloaded."})}catch(e){j({type:"error",message:e.message||"Failed to export database."})}finally{g(!1)}},es=async e=>{let s=e.target.files?.[0];if(s){g(!0),j({type:"",message:""});try{let e=await s.text(),a=JSON.parse(e),t=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),l=await t.json().catch(()=>({}));if(!t.ok)throw Error(l.error||"Failed to import database");await Q(),j({type:"success",message:"Database imported successfully."})}catch(e){j({type:"error",message:e.message||"Invalid backup file."})}finally{f.current&&(f.current.value=""),g(!1)}}},ea=(e,s)=>{C(a=>({...a,[e]:s}))},et=async e=>{e?.preventDefault?.(),k(!0),S({type:"",message:""});try{let e={...D,ldapAllowedUsers:D.ldapAllowedUsers};e.ldapBindPassword||delete e.ldapBindPassword;let s=await V(e);C(e=>({...e,ldapBindPassword:"",ldapEnabled:!0===s.ldapEnabled,ldapAllowedUsers:Array.isArray(s.ldapAllowedUsers)?s.ldapAllowedUsers:e.ldapAllowedUsers})),S({type:"success",message:"LDAP settings saved."})}catch(e){S({type:"error",message:e.message||"Failed to save LDAP settings"})}finally{k(!1)}},el=async()=>{I(!0),S({type:"",message:""});try{await et();let e=await fetch("/api/auth/ldap/test",{method:"POST"}),s=await e.json().catch(()=>({}));e.ok&&s.ok?S({type:"success",message:s.message||"LDAP connection OK."}):S({type:"error",message:s.error||"LDAP test failed."})}catch(e){S({type:"error",message:e.message||"LDAP test failed."})}finally{I(!1)}},er=async()=>{R(!0),S({type:"",message:""});try{await et();let e=await fetch(`/api/auth/ldap/users?q=${encodeURIComponent(O)}`,{cache:"no-store"}),s=await e.json().catch(()=>({}));e.ok?(F(s.users||[]),S({type:"success",message:`Loaded ${(s.users||[]).length} LDAP user(s).`})):S({type:"error",message:s.error||"Failed to load LDAP users."})}catch(e){S({type:"error",message:e.message||"Failed to load LDAP users."})}finally{R(!1)}},ed=e=>{let s=String(e||"").trim();s&&C(e=>{let a=new Set(e.ldapAllowedUsers||[]);return a.has(s)?a.delete(s):a.add(s),{...e,ldapAllowedUsers:[...a]}})},ei=async(s=T.authMode||"password")=>{let a=T.oidcIssuerUrl.trim(),t=T.oidcClientId.trim(),l=T.oidcScopes.trim(),r=T.oidcLoginLabel.trim(),d=$.trim();if("password"!==s&&(!a||!t||!d)&&!e.oidcConfigured)return void z({type:"error",message:"Issuer URL, client ID, and client secret are required to enable OIDC."});K(!0),z({type:"",message:""});try{let e={authMode:s,oidcIssuerUrl:a,oidcClientId:t,oidcScopes:l||"openid profile email",oidcLoginLabel:r||"Sign in with OIDC"};d&&(e.oidcClientSecret=d);let i=await V(e);q({authMode:i.authMode||s,oidcIssuerUrl:i.oidcIssuerUrl||a,oidcClientId:i.oidcClientId||t,oidcScopes:i.oidcScopes||l||"openid profile email",oidcLoginLabel:i.oidcLoginLabel||r||"Sign in with OIDC"}),_(""),z({type:"success",message:"OIDC settings saved."})}catch(e){z({type:"error",message:e.message||"Failed to save OIDC settings"})}finally{K(!1)}};return a?(0,t.jsx)("div",{className:"p-6 text-text-muted",children:"Loading settings..."}):(0,t.jsxs)("div",{className:"flex w-full max-w-none flex-col gap-6 px-3 py-4 md:px-4 md:py-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold text-text-main",children:"Settings"}),(0,t.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Configure local dashboard login, LDAP/Active Directory login, and OIDC login."})]}),(0,t.jsxs)("section",{className:"rounded-2xl border border-border bg-surface p-5 shadow-sm",children:[(0,t.jsxs)("div",{className:"mb-4 flex items-start gap-3",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-primary",children:"shield"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Dashboard Login"}),(0,t.jsx)("p",{className:"text-sm text-text-muted",children:"Local account remains available even when LDAP is enabled."})]})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(o,{title:"Require login",desc:"When ON, dashboard requires local, LDAP, or OIDC login. When OFF, dashboard opens without login.",checked:!1!==e.requireLogin,onChange:X,disabled:a}),(0,t.jsxs)("form",{onSubmit:Y,className:"rounded-xl border border-border bg-background/60 p-4",children:[(0,t.jsx)("h3",{className:"mb-3 text-sm font-semibold text-text-main",children:"Local account"}),(0,t.jsxs)("div",{className:"grid gap-3 sm:grid-cols-[1fr_auto]",children:[(0,t.jsx)(d,{label:"Account name",hint:"Default is admin. Old password-only login still works as local login.",children:(0,t.jsx)(i,{value:w,onChange:e=>v(e.target.value)})}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsx)("button",{type:"submit",className:"w-full rounded-xl bg-primary px-4 py-2 text-sm font-semibold text-white sm:w-auto",children:"Save account"})})]}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(r,{status:N})})]}),!1!==e.requireLogin&&(0,t.jsxs)("form",{onSubmit:Z,className:"rounded-xl border border-border bg-background/60 p-4",children:[(0,t.jsx)("h3",{className:"mb-3 text-sm font-semibold text-text-main",children:"Local password"}),(0,t.jsxs)("div",{className:"grid gap-3 md:grid-cols-3",children:[e.hasPassword&&(0,t.jsx)(d,{label:"Current password",children:(0,t.jsx)(i,{type:"password",value:c.current,onChange:e=>m({...c,current:e.target.value}),required:!0})}),(0,t.jsx)(d,{label:"New password",children:(0,t.jsx)(i,{type:"password",value:c.new,onChange:e=>m({...c,new:e.target.value}),required:!0})}),(0,t.jsx)(d,{label:"Confirm new password",children:(0,t.jsx)(i,{type:"password",value:c.confirm,onChange:e=>m({...c,confirm:e.target.value}),required:!0})})]}),(0,t.jsxs)("div",{className:"mt-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,t.jsx)(r,{status:p}),(0,t.jsx)("button",{disabled:x,className:"rounded-xl bg-primary px-4 py-2 text-sm font-semibold text-white disabled:opacity-50",children:e.hasPassword?"Update Password":"Set Password"})]})]})]})]}),(0,t.jsxs)("section",{className:"rounded-2xl border border-border bg-surface p-5 shadow-sm",children:[(0,t.jsxs)("div",{className:"mb-4 flex items-start gap-3",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-primary",children:"database"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Database Backup"}),(0,t.jsx)("p",{className:"text-sm text-text-muted",children:"Export or restore the local bluerouter configuration database."})]})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-background/60 p-4",children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)("p",{className:"text-sm font-semibold text-text-main",children:"Database Location"}),(0,t.jsx)("p",{className:"mt-1 font-mono text-xs text-text-muted",children:"~/.bluerouter/db/data.sqlite"})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,t.jsx)("button",{type:"button",onClick:ee,disabled:h,className:"rounded-xl bg-primary px-4 py-2 text-sm font-semibold text-white disabled:opacity-50",children:"Download Backup"}),(0,t.jsx)("button",{type:"button",onClick:()=>f.current?.click(),disabled:h,className:"rounded-xl border border-border px-4 py-2 text-sm font-semibold text-text-main hover:border-primary/50 disabled:opacity-50",children:"Import Backup"}),(0,t.jsx)("input",{ref:f,type:"file",accept:"application/json,.json",className:"hidden",onChange:es})]}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(r,{status:y})})]})]}),(0,t.jsxs)("section",{className:"rounded-2xl border border-border bg-surface p-5 shadow-sm",children:[(0,t.jsxs)("div",{className:"mb-4 flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-primary",children:"corporate_fare"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"LDAP / Active Directory Login"}),(0,t.jsx)("p",{className:"text-sm text-text-muted",children:"Bind to Windows AD/LDAP, search users from a Base DN, and choose who can log in."})]})]}),(0,t.jsx)("button",{type:"button",onClick:()=>ea("ldapEnabled",!D.ldapEnabled),className:`rounded-xl px-3 py-2 text-sm font-semibold ${D.ldapEnabled?"bg-primary text-white":"border border-border text-text-muted"}`,children:D.ldapEnabled?"Enabled":"Disabled"})]}),(0,t.jsxs)("form",{onSubmit:et,className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid gap-3 lg:grid-cols-2",children:[(0,t.jsx)(d,{label:"LDAP URL",hint:"Example: ldap://dc01.company.local:389 or ldaps://dc01.company.local:636",children:(0,t.jsx)(i,{value:D.ldapUrl,onChange:e=>ea("ldapUrl",e.target.value),placeholder:"ldap://dc01.company.local:389"})}),(0,t.jsx)(d,{label:"Base DN",hint:"Path to search users. Example: DC=company,DC=local",children:(0,t.jsx)(i,{value:D.ldapBaseDn,onChange:e=>ea("ldapBaseDn",e.target.value),placeholder:"DC=company,DC=local"})}),(0,t.jsx)(d,{label:"Bind DN",hint:"Service account used to search users. Example: CN=svc-bluerouter,OU=Service Accounts,DC=company,DC=local",children:(0,t.jsx)(i,{value:D.ldapBindDn,onChange:e=>ea("ldapBindDn",e.target.value),placeholder:"CN=svc-bluerouter,OU=Service Accounts,DC=company,DC=local"})}),(0,t.jsx)(d,{label:"Bind password",hint:e.ldapHasBindPassword?"Saved. Enter a new value only if you want to replace it.":"Required to enable LDAP.",children:(0,t.jsx)(i,{type:"password",value:D.ldapBindPassword,onChange:e=>ea("ldapBindPassword",e.target.value),placeholder:e.ldapHasBindPassword?"Saved — leave blank to keep":"Service account password"})})]}),(0,t.jsxs)("div",{className:"grid gap-3 lg:grid-cols-2",children:[(0,t.jsx)(d,{label:"User search filter",hint:"Use {{username}} placeholder. Works with sAMAccountName, UPN, or mail by default.",children:(0,t.jsx)(i,{value:D.ldapUserSearchFilter,onChange:e=>ea("ldapUserSearchFilter",e.target.value)})}),(0,t.jsx)(d,{label:"Login username attribute",hint:"AD usually uses sAMAccountName. UPN style can use userPrincipalName.",children:(0,t.jsx)(i,{value:D.ldapUserNameAttribute,onChange:e=>ea("ldapUserNameAttribute",e.target.value)})}),(0,t.jsx)(d,{label:"Display name attribute",children:(0,t.jsx)(i,{value:D.ldapUserDisplayAttribute,onChange:e=>ea("ldapUserDisplayAttribute",e.target.value)})}),(0,t.jsx)(d,{label:"Email attribute",children:(0,t.jsx)(i,{value:D.ldapUserEmailAttribute,onChange:e=>ea("ldapUserEmailAttribute",e.target.value)})})]}),(0,t.jsxs)("div",{className:"grid gap-3 lg:grid-cols-2",children:[(0,t.jsx)(o,{title:"Require valid TLS certificate",desc:"Keep ON for production LDAPS. Turn OFF only for self-signed test servers.",checked:D.ldapTlsRejectUnauthorized,onChange:e=>ea("ldapTlsRejectUnauthorized",e)}),(0,t.jsx)(o,{title:"Allow any LDAP user",desc:"When OFF, only selected users below can log in.",checked:D.ldapAllowAnyUser,onChange:e=>ea("ldapAllowAnyUser",e)})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-background/60 p-4",children:[(0,t.jsxs)("div",{className:"mb-3 flex flex-col gap-3 lg:flex-row lg:items-end lg:justify-between",children:[(0,t.jsx)(d,{label:"Search LDAP users",hint:"Search and select users allowed to log in. Save settings after selecting.",children:(0,t.jsx)(i,{value:O,onChange:e=>B(e.target.value)})}),(0,t.jsx)("button",{type:"button",onClick:er,disabled:M,className:"rounded-xl border border-border px-4 py-2 text-sm font-semibold text-text-main hover:border-primary/50 disabled:opacity-50",children:M?"Loading...":"Load users"})]}),E.length>0&&(0,t.jsx)("div",{className:"max-h-72 overflow-auto rounded-xl border border-border",children:E.map(e=>{let s=D.ldapAllowedUsers.includes(e.username);return(0,t.jsxs)("button",{type:"button",onClick:()=>ed(e.username),className:`flex w-full items-center justify-between gap-3 border-b border-border px-3 py-2 text-left text-sm last:border-b-0 ${s?"bg-primary/10":"bg-background hover:bg-surface"}`,children:[(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"block font-medium text-text-main",children:e.displayName||e.username}),(0,t.jsxs)("span",{className:"block text-xs text-text-muted",children:[e.username," ",e.email?`\xb7 ${e.email}`:""]})]}),(0,t.jsx)("span",{className:`material-symbols-outlined text-[18px] ${s?"text-primary":"text-text-muted"}`,children:s?"check_circle":"radio_button_unchecked"})]},`${e.dn}-${e.username}`)})}),(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsxs)("p",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-text-muted",children:["Selected LDAP users (",D.ldapAllowedUsers.length,")"]}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:0===D.ldapAllowedUsers.length?(0,t.jsx)("span",{className:"text-xs text-text-muted",children:"No users selected."}):D.ldapAllowedUsers.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>ed(e),className:"rounded-full border border-primary/30 bg-primary/10 px-3 py-1 text-xs text-primary",children:[e," \xd7"]},e))})]})]}),(0,t.jsx)(r,{status:U}),(0,t.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:justify-end",children:[(0,t.jsx)("button",{type:"button",onClick:el,disabled:P||L,className:"rounded-xl border border-border px-4 py-2 text-sm font-semibold text-text-main hover:border-primary/50 disabled:opacity-50",children:P?"Testing...":"Save & test LDAP"}),(0,t.jsx)("button",{type:"submit",disabled:L,className:"rounded-xl bg-primary px-4 py-2 text-sm font-semibold text-white disabled:opacity-50",children:L?"Saving...":"Save LDAP settings"})]})]})]}),(0,t.jsxs)("section",{className:"rounded-2xl border border-border bg-surface p-5 shadow-sm",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>G(e=>!e),className:"flex w-full items-center justify-between gap-3 text-left",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-primary",children:"lock_open"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"OIDC Dashboard Login"}),(0,t.jsx)("p",{className:"text-sm text-text-muted",children:"oidc"===e.authMode?"OIDC active":"both"===e.authMode?"Password + OIDC active":"Optional SSO via Authentik/Keycloak/Google"})]})]}),(0,t.jsx)("span",{className:"material-symbols-outlined",children:H?"expand_less":"expand_more"})]}),H&&(0,t.jsxs)("div",{className:"mt-4 space-y-4",children:[(0,t.jsx)("div",{className:"grid gap-3 md:grid-cols-3",children:[{value:"password",title:"Password/LDAP",desc:"Keep local and LDAP login."},{value:"oidc",title:"OIDC only",desc:"Disable local/LDAP login when configured."},{value:"both",title:"Both",desc:"Allow either OIDC or local/LDAP."}].map(e=>{let s=T.authMode===e.value;return(0,t.jsxs)("button",{type:"button",onClick:()=>q(s=>({...s,authMode:e.value})),className:`rounded-xl border p-3 text-left ${s?"border-primary bg-primary/10":"border-border bg-background hover:border-primary/40"}`,children:[(0,t.jsx)("span",{className:"block text-sm font-semibold text-text-main",children:e.title}),(0,t.jsx)("span",{className:"mt-1 block text-xs text-text-muted",children:e.desc})]},e.value)})}),(0,t.jsxs)("div",{className:"grid gap-3 lg:grid-cols-2",children:[(0,t.jsx)(d,{label:"Issuer URL",children:(0,t.jsx)(i,{value:T.oidcIssuerUrl,onChange:e=>q({...T,oidcIssuerUrl:e.target.value})})}),(0,t.jsx)(d,{label:"Client ID",children:(0,t.jsx)(i,{value:T.oidcClientId,onChange:e=>q({...T,oidcClientId:e.target.value})})}),(0,t.jsx)(d,{label:"Client Secret",hint:"Write-only after saving. Leave blank to keep existing secret.",children:(0,t.jsx)(i,{type:"password",value:$,onChange:e=>_(e.target.value)})}),(0,t.jsx)(d,{label:"Scopes",children:(0,t.jsx)(i,{value:T.oidcScopes,onChange:e=>q({...T,oidcScopes:e.target.value})})}),(0,t.jsx)(d,{label:"Login Button Label",children:(0,t.jsx)(i,{value:T.oidcLoginLabel,onChange:e=>q({...T,oidcLoginLabel:e.target.value})})})]}),(0,t.jsx)(r,{status:W}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)("button",{type:"button",onClick:()=>ei(),disabled:J,className:"rounded-xl bg-primary px-4 py-2 text-sm font-semibold text-white disabled:opacity-50",children:J?"Saving...":"Save OIDC settings"})})]})]})]})}}},e=>{e.O(0,[8441,3794,7358],()=>e(e.s=7973)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7692],{55478:(e,t,r)=>{"use strict";r.d(t,{default:()=>g});var s=r(95155),a=r(12115);let l={client:"Client request",source:"Source request",openai:"OpenAI normalized",target:"Provider request",provider_response:"Provider response",error:"Error"},o={client:"bg-blue-500/10 text-blue-600 border-blue-500/20",source:"bg-cyan-500/10 text-cyan-600 border-cyan-500/20",openai:"bg-purple-500/10 text-purple-600 border-purple-500/20",target:"bg-orange-500/10 text-orange-600 border-orange-500/20",provider_response:"bg-green-500/10 text-green-600 border-green-500/20",error:"bg-red-500/10 text-red-600 border-red-500/20"};function d(e){if(!e)return"-";try{let t=function(e){if(!e)return"";if(e instanceof Date)return e.toISOString();let t=String(e).trim();if(!t)return"";let r=t.replace(" ","T");return/(?:Z|[+-]\d{2}:?\d{2})$/i.test(r)?r:`${r}Z`}(e),r=new Date(t);if(Number.isNaN(r.getTime()))return String(e);return r.toLocaleString("vi-VN",{timeZone:"Asia/Ho_Chi_Minh",day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}catch{return e}}function n(e,t=240){let r=String(e||"").replace(/\s+/g," ").trim();return r.length>t?`${r.slice(0,t)}...`:r}function i(e){let t=String(e||"").trim();if(!t)return"";try{return new URL(t).hostname||""}catch{return t.replace(/^https?:\/\//,"").replace(/\/.*$/,"").replace(/:\d+$/,"")}}function x(e){return e?.provider_name||e?.provider_label||e?.provider_id||e?.provider||i(e?.provider_url)||i(e?.endpoint)||""}function c(e){if(e?.display_model)return e.display_model;let t=e?.model||"-",r=x(e);return!r||"-"===t||String(t).startsWith(`${r}/`)?t:`${r}/${t}`}function m({value:e}){let t=function(e){if(!e)return null;if("object"==typeof e)return e;try{return JSON.parse(e)}catch{return null}}(e),r=t?JSON.stringify(t,null,2):String(e||"");return(0,s.jsx)("pre",{className:"max-h-[58vh] overflow-auto rounded-2xl bg-zinc-950 p-4 text-xs leading-relaxed text-zinc-100 shadow-inner",children:r||"No JSON"})}function p({value:e,empty:t="No content"}){return(0,s.jsx)("pre",{className:"max-h-[58vh] overflow-auto whitespace-pre-wrap break-words rounded-2xl border border-zinc-200 bg-white p-4 font-mono text-xs leading-relaxed text-zinc-950 shadow-sm dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100",children:e||t})}function u({label:e,value:t}){return(0,s.jsxs)("div",{className:"rounded-2xl border border-border bg-surface p-4 shadow-sm",children:[(0,s.jsx)("div",{className:"text-xs uppercase tracking-wide text-text-muted",children:e}),(0,s.jsx)("div",{className:"mt-1 text-2xl font-semibold text-text-main",children:t})]})}function b({stage:e}){let t=o[e]||"bg-surface text-text-main border-border";return(0,s.jsx)("span",{className:`inline-flex items-center rounded-full border px-2.5 py-1 text-xs font-medium ${t}`,children:l[e]||e||"-"})}function h({label:e,value:t}){return(0,s.jsxs)("div",{className:"rounded-2xl border border-zinc-200 bg-white p-4 shadow-sm dark:border-zinc-700 dark:bg-zinc-950",children:[(0,s.jsx)("div",{className:"text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:e}),(0,s.jsx)("pre",{className:"mt-2 whitespace-pre-wrap break-words font-mono text-xs leading-relaxed text-text-main",children:t||"-"})]})}function g(){let[e,t]=(0,a.useState)({keyword:"",model:"",stage:"",sourceTool:"",clientIp:"",sessionId:"",dateFrom:"",dateTo:"",limit:"50",offset:"0"}),[r,o]=(0,a.useState)([]),[i,g]=(0,a.useState)([]),[f,j]=(0,a.useState)([]),[N,v]=(0,a.useState)(0),[w,y]=(0,a.useState)(null),[k,_]=(0,a.useState)(""),[z,S]=(0,a.useState)(""),[C,I]=(0,a.useState)(!1),[P,T]=(0,a.useState)(null),[E,M]=(0,a.useState)("prompt"),$=(0,a.useMemo)(()=>{let t=Number(e.limit||50);return Math.floor(Number(e.offset||0)/t)+1},[e.limit,e.offset]),D=(0,a.useCallback)(async()=>{I(!0),S(""),_("");try{let t=new URLSearchParams;Object.entries(e).forEach(([e,r])=>{String(r||"").trim()&&t.set(e,String(r).trim())});let r=await fetch(`/api/dashboard/prompt-logs?${t}`),s=await r.json();if(!r.ok)throw Error(s.error||"Failed to load prompt logs");o(s.rows||[]),g(s.models||[]),j(s.stages||[]),v(s.total||0),y(s.dbInfo||null),s.disabled&&_("Database prompt logging is disabled. Enable it in Dashboard -> MITM -> Prompt Log Database."),s.missing&&_("Prompt log database/table has no data yet, or SQLite file does not exist.")}catch(e){S(e.message||"Failed to load prompt logs")}finally{I(!1)}},[e]);(0,a.useEffect)(()=>{D()},[D]);let F=e=>{t(t=>({...t,...e,offset:void 0!==e.offset?e.offset:"0"}))},q=async e=>{S("");try{let t=await fetch(`/api/dashboard/prompt-logs/${encodeURIComponent(e)}`),r=await t.json();if(!t.ok)throw Error(r.error||"Failed to load detail");T(r.row),M("prompt")}catch(e){S(e.message||"Failed to load detail")}},O=async e=>{await navigator.clipboard.writeText(String(e||""))},L=async()=>{P?.id&&confirm("Delete this prompt log row?")&&(await fetch(`/api/dashboard/prompt-logs/${encodeURIComponent(P.id)}`,{method:"DELETE"})).ok&&(T(null),D())};return(0,s.jsxs)("div",{className:"flex w-full max-w-none flex-col gap-5 p-3 md:p-4 lg:p-6",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 md:flex-row md:items-end md:justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-2xl font-semibold text-text-main",children:"Prompt Logs"}),(0,s.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Search Copilot/MITM prompts across the currently configured prompt log database."})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)("a",{href:"/dashboard/mitm",className:"rounded-xl border border-border px-3 py-2 text-sm hover:bg-surface",children:"MITM Settings"}),(0,s.jsx)("button",{onClick:D,disabled:C,className:"rounded-xl bg-primary px-3 py-2 text-sm font-medium text-white disabled:opacity-50",children:C?"Loading...":"Refresh"})]})]}),k&&(0,s.jsx)("div",{className:"rounded-2xl border border-yellow-500/30 bg-yellow-500/10 p-4 text-sm text-yellow-700 dark:text-yellow-300",children:k}),z&&(0,s.jsx)("div",{className:"rounded-2xl border border-red-500/30 bg-red-500/10 p-4 text-sm text-red-500",children:z}),(0,s.jsxs)("div",{className:"grid gap-4 md:grid-cols-4",children:[(0,s.jsx)(u,{label:"Matching rows",value:N}),(0,s.jsx)(u,{label:"Loaded rows",value:r.length}),(0,s.jsx)(u,{label:"Page",value:$}),(0,s.jsx)(u,{label:"Database",value:w?.type||"-"})]}),w&&(0,s.jsxs)("div",{className:"rounded-2xl border border-border bg-surface p-3 text-xs text-text-muted",children:["DB: ",(0,s.jsx)("code",{children:w.type}),w.sqlitePath?(0,s.jsxs)(s.Fragment,{children:[" ","\xb7 Path: ",(0,s.jsx)("code",{children:w.sqlitePath})]}):null,w.host?(0,s.jsxs)(s.Fragment,{children:[" ","\xb7 Host: ",(0,s.jsx)("code",{children:w.host})]}):null,w.database?(0,s.jsxs)(s.Fragment,{children:[" ","\xb7 Database: ",(0,s.jsx)("code",{children:w.database})]}):null]}),(0,s.jsx)("div",{className:"rounded-2xl border border-border bg-surface p-4 shadow-sm",children:(0,s.jsxs)("div",{className:"grid gap-3 md:grid-cols-4 xl:grid-cols-6",children:[(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Keyword"}),(0,s.jsx)("input",{value:e.keyword,onChange:e=>F({keyword:e.target.value}),placeholder:"prompt, code, model, error...",className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30"})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Model"}),(0,s.jsxs)("select",{value:e.model,onChange:e=>F({model:e.target.value}),className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30",children:[(0,s.jsx)("option",{value:"",children:"All models"}),i.map(e=>(0,s.jsx)("option",{value:e,children:e},e))]})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Stage"}),(0,s.jsxs)("select",{value:e.stage,onChange:e=>F({stage:e.target.value}),className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30",children:[(0,s.jsx)("option",{value:"",children:"All stages"}),f.map(e=>(0,s.jsx)("option",{value:e,children:l[e]||e},e))]})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Tool"}),(0,s.jsx)("input",{value:e.sourceTool,onChange:e=>F({sourceTool:e.target.value}),placeholder:"copilot, antigravity...",className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30"})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Client IP"}),(0,s.jsx)("input",{value:e.clientIp,onChange:e=>F({clientIp:e.target.value}),placeholder:"172.16.253.1",className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30"})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Session ID"}),(0,s.jsx)("input",{value:e.sessionId,onChange:e=>F({sessionId:e.target.value}),placeholder:"session id",className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30"})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"From"}),(0,s.jsx)("input",{type:"datetime-local",value:e.dateFrom,onChange:e=>F({dateFrom:e.target.value}),className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30"})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"To"}),(0,s.jsx)("input",{type:"datetime-local",value:e.dateTo,onChange:e=>F({dateTo:e.target.value}),className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30"})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Limit"}),(0,s.jsxs)("select",{value:e.limit,onChange:e=>F({limit:e.target.value}),className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30",children:[(0,s.jsx)("option",{value:"25",children:"25"}),(0,s.jsx)("option",{value:"50",children:"50"}),(0,s.jsx)("option",{value:"100",children:"100"}),(0,s.jsx)("option",{value:"200",children:"200"})]})]}),(0,s.jsxs)("div",{className:"flex items-end gap-2",children:[(0,s.jsx)("button",{onClick:()=>t({keyword:"",model:"",stage:"",sourceTool:"",clientIp:"",sessionId:"",dateFrom:"",dateTo:"",limit:"50",offset:"0"}),className:"rounded-xl border border-border px-3 py-2 text-sm hover:bg-background",children:"Reset"}),(0,s.jsx)("button",{onClick:D,className:"rounded-xl bg-primary px-3 py-2 text-sm font-medium text-white",children:"Search"})]})]})}),(0,s.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-border bg-surface shadow-sm",children:[(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)("table",{className:"w-full min-w-[1450px] text-left text-sm",children:[(0,s.jsx)("thead",{className:"border-b border-border bg-background/60 text-xs uppercase tracking-wide text-text-muted",children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"w-[150px] px-4 py-3",children:"Time"}),(0,s.jsx)("th",{className:"w-[130px] px-4 py-3",children:"Stage"}),(0,s.jsx)("th",{className:"w-[150px] px-4 py-3",children:"Tool"}),(0,s.jsx)("th",{className:"w-[130px] px-4 py-3",children:"Client IP"}),(0,s.jsx)("th",{className:"w-[110px] px-4 py-3",children:"Model"}),(0,s.jsx)("th",{className:"w-[190px] px-4 py-3",children:"Session"}),(0,s.jsx)("th",{className:"w-[390px] px-4 py-3",children:"Prompt preview"}),(0,s.jsx)("th",{className:"w-[130px] px-4 py-3",children:"Status/Error"}),(0,s.jsx)("th",{className:"sticky right-0 z-20 w-[95px] bg-background/95 px-4 py-3 text-right shadow-[-8px_0_12px_-12px_rgba(0,0,0,0.45)]",children:"Action"})]})}),(0,s.jsxs)("tbody",{children:[0===r.length&&(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:9,className:"px-4 py-10 text-center text-text-muted",children:"No prompt logs found."})}),r.map(e=>(0,s.jsxs)("tr",{className:"border-b border-border/70 hover:bg-background/50",children:[(0,s.jsx)("td",{className:"whitespace-nowrap px-4 py-3 text-xs text-text-muted",children:d(e.created_at)}),(0,s.jsx)("td",{className:"px-4 py-3",children:(0,s.jsx)(b,{stage:e.stage})}),(0,s.jsx)("td",{className:"px-4 py-3",children:(0,s.jsx)("span",{className:"inline-flex max-w-[180px] items-center truncate rounded-full border border-border bg-surface/70 px-2.5 py-1 text-xs font-medium text-text-main",children:e.source_tool_label||e.source_tool||e.source_format||"-"})}),(0,s.jsx)("td",{className:"max-w-[150px] truncate px-4 py-3 font-mono text-xs text-text-muted",children:e.client_ip||"-"}),(0,s.jsx)("td",{className:"max-w-[260px] truncate px-4 py-3 font-mono text-xs",title:c(e),children:c(e)}),(0,s.jsx)("td",{className:"max-w-[180px] truncate px-4 py-3 font-mono text-xs text-text-muted",children:e.session_id||"-"}),(0,s.jsx)("td",{className:"min-w-[360px] px-4 py-3 text-xs",children:n(e.prompt_preview,420)||(0,s.jsx)("span",{className:"text-text-muted",children:"No prompt text"})}),(0,s.jsx)("td",{className:"max-w-[220px] px-4 py-3 text-xs",children:e.error_text?(0,s.jsx)("span",{className:"text-red-500",children:n(e.error_text,160)}):e.status_code||(0,s.jsx)("span",{className:"text-text-muted",children:"-"})}),(0,s.jsx)("td",{className:"sticky right-0 z-10 bg-surface px-4 py-3 text-right shadow-[-8px_0_12px_-12px_rgba(0,0,0,0.35)]",children:(0,s.jsx)("button",{onClick:()=>q(e.id),className:"rounded-lg bg-primary px-3 py-1.5 text-xs font-medium text-white",children:"View"})})]},e.id))]})]})}),(0,s.jsxs)("div",{className:"flex items-center justify-between border-t border-border p-3 text-sm",children:[(0,s.jsxs)("div",{className:"text-text-muted",children:["Showing ",r.length," of ",N,". Page ",$,"."]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("button",{onClick:()=>{let r=Number(e.limit||50),s=Number(e.offset||0);t(e=>({...e,offset:String(Math.max(0,s-r))}))},disabled:0>=Number(e.offset||0),className:"rounded-xl border border-border px-3 py-1.5 disabled:opacity-50",children:"Previous"}),(0,s.jsx)("button",{onClick:()=>{let r=Number(e.limit||50),s=Number(e.offset||0);s+r>=N||t(e=>({...e,offset:String(s+r)}))},disabled:Number(e.offset||0)+Number(e.limit||50)>=N,className:"rounded-xl border border-border px-3 py-1.5 disabled:opacity-50",children:"Next"})]})]})]}),P&&(0,s.jsx)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/55 p-3 md:p-6",children:(0,s.jsxs)("div",{className:"flex h-[92vh] w-[96vw] max-w-none flex-col overflow-hidden rounded-3xl border border-zinc-200 bg-white shadow-2xl dark:border-zinc-700 dark:bg-zinc-950",children:[(0,s.jsxs)("div",{className:"flex flex-none items-start justify-between gap-4 border-b border-zinc-200 bg-white px-5 py-4 dark:border-zinc-700 dark:bg-zinc-950",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Prompt Log Detail"}),(0,s.jsx)(b,{stage:P.stage})]}),(0,s.jsxs)("div",{className:"mt-1 truncate text-xs text-text-muted",children:[d(P.created_at)," \xb7 ",c(P)," \xb7"," ",P.session_id||"-"]})]}),(0,s.jsx)("button",{onClick:()=>T(null),className:"rounded-xl border border-zinc-200 bg-white px-3 py-2 text-sm font-medium text-zinc-900 shadow-sm hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100 dark:hover:bg-zinc-800",children:"Close"})]}),(0,s.jsxs)("div",{className:"grid min-h-0 flex-1 grid-cols-1 overflow-hidden bg-zinc-100 dark:bg-zinc-900 lg:grid-cols-[340px_1fr]",children:[(0,s.jsx)("aside",{className:"min-h-0 overflow-y-auto border-b border-zinc-200 bg-zinc-100 p-4 dark:border-zinc-700 dark:bg-zinc-900 lg:border-b-0 lg:border-r",children:(0,s.jsxs)("div",{className:"grid gap-3",children:[(0,s.jsx)(h,{label:"ID",value:P.id}),(0,s.jsx)(h,{label:"Session",value:P.session_id}),(0,s.jsx)(h,{label:"Model",value:c(P)}),(0,s.jsx)(h,{label:"Provider",value:x(P)||P.provider_url||P.endpoint}),(0,s.jsx)(h,{label:"Source Tool",value:P.source_tool_label||P.source_tool||P.source_format}),(0,s.jsx)(h,{label:"Source Host",value:P.source_host}),(0,s.jsx)(h,{label:"Client IP",value:P.client_ip}),(0,s.jsx)(h,{label:"Client Port",value:P.client_port}),(0,s.jsx)(h,{label:"Client Host",value:P.client_host}),(0,s.jsx)(h,{label:"User Agent",value:P.client_user_agent}),(0,s.jsx)(h,{label:"Endpoint",value:P.endpoint||P.provider_url}),(0,s.jsx)(h,{label:"Source -> Target",value:`${P.source_format||"-"} -> ${P.target_format||"-"}`}),(0,s.jsx)(h,{label:"Status / Error",value:P.error_text||P.status_code||"-"}),(0,s.jsxs)("div",{className:"grid gap-2 pt-2",children:[(0,s.jsx)("button",{onClick:()=>O(P.prompt_text),className:"rounded-xl border border-zinc-200 bg-white px-3 py-2 text-sm font-medium text-zinc-900 shadow-sm hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100 dark:hover:bg-zinc-800",children:"Copy prompt"}),(0,s.jsx)("button",{onClick:()=>O(P.full_request_json),className:"rounded-xl border border-zinc-200 bg-white px-3 py-2 text-sm font-medium text-zinc-900 shadow-sm hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100 dark:hover:bg-zinc-800",children:"Copy request JSON"}),(0,s.jsx)("button",{onClick:L,className:"rounded-xl border border-red-500/40 bg-red-500/10 px-3 py-2 text-sm font-medium text-red-500 shadow-inner hover:bg-red-500/20",children:"Delete row"})]})]})}),(0,s.jsxs)("main",{className:"flex min-h-0 flex-col overflow-hidden bg-zinc-50 dark:bg-zinc-950",children:[(0,s.jsx)("div",{className:"flex flex-none gap-2 overflow-x-auto border-b border-zinc-200 bg-white px-4 py-3 dark:border-zinc-700 dark:bg-zinc-950",children:[["prompt","Prompt"],["request","Request JSON"],["response","Response"],["meta","Metadata"]].map(([e,t])=>(0,s.jsx)("button",{onClick:()=>M(e),className:`whitespace-nowrap rounded-xl px-3 py-2 text-sm ${E===e?"bg-primary text-white shadow-sm":"border border-border bg-surface text-text-main hover:bg-background"}`,children:t},e))}),(0,s.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto bg-zinc-50 p-4 dark:bg-zinc-950",children:["prompt"===E&&(0,s.jsxs)("section",{children:[(0,s.jsx)("h3",{className:"mb-2 text-sm font-semibold text-text-main",children:"Extracted prompt text"}),(0,s.jsx)(p,{value:P.prompt_text,empty:"No prompt text"})]}),"request"===E&&(0,s.jsxs)("section",{children:[(0,s.jsx)("h3",{className:"mb-2 text-sm font-semibold text-text-main",children:"Full request JSON"}),(0,s.jsx)(m,{value:P.full_request_json})]}),"response"===E&&(0,s.jsxs)("section",{children:[(0,s.jsx)("h3",{className:"mb-2 text-sm font-semibold text-text-main",children:"Response text"}),(0,s.jsx)(p,{value:P.response_text,empty:"No response text stored for this stage"})]}),"meta"===E&&(0,s.jsxs)("section",{children:[(0,s.jsx)("h3",{className:"mb-2 text-sm font-semibold text-text-main",children:"Metadata JSON"}),(0,s.jsx)(m,{value:P.meta_json})]})]})]})]})]})})]})}},80905:(e,t,r)=>{Promise.resolve().then(r.bind(r,55478))}},e=>{e.O(0,[8441,3794,7358],()=>e(e.s=80905)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7692],{55478:(e,t,r)=>{"use strict";r.d(t,{default:()=>g});var s=r(95155),a=r(12115);let l={client:"Client request",source:"Source request",openai:"OpenAI normalized",target:"Provider request",provider_response:"Provider response",error:"Error"},o={client:"bg-blue-500/10 text-blue-600 border-blue-500/20",source:"bg-cyan-500/10 text-cyan-600 border-cyan-500/20",openai:"bg-purple-500/10 text-purple-600 border-purple-500/20",target:"bg-orange-500/10 text-orange-600 border-orange-500/20",provider_response:"bg-green-500/10 text-green-600 border-green-500/20",error:"bg-red-500/10 text-red-600 border-red-500/20"};function d(e){if(!e)return"-";try{let t=function(e){if(!e)return"";if(e instanceof Date)return e.toISOString();let t=String(e).trim();if(!t)return"";let r=t.replace(" ","T");return/(?:Z|[+-]\d{2}:?\d{2})$/i.test(r)?r:`${r}Z`}(e),r=new Date(t);if(Number.isNaN(r.getTime()))return String(e);return r.toLocaleString("vi-VN",{timeZone:"Asia/Ho_Chi_Minh",day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}catch{return e}}function n(e,t=240){let r=String(e||"").replace(/\s+/g," ").trim();return r.length>t?`${r.slice(0,t)}...`:r}function i(e){let t=String(e||"").trim();if(!t)return"";try{return new URL(t).hostname||""}catch{return t.replace(/^https?:\/\//,"").replace(/\/.*$/,"").replace(/:\d+$/,"")}}function x(e){return e?.provider_name||e?.provider_label||e?.provider_id||e?.provider||i(e?.provider_url)||i(e?.endpoint)||""}function c(e){if(e?.display_model)return e.display_model;let t=e?.model||"-",r=x(e);return!r||"-"===t||String(t).startsWith(`${r}/`)?t:`${r}/${t}`}function m({value:e}){let t=function(e){if(!e)return null;if("object"==typeof e)return e;try{return JSON.parse(e)}catch{return null}}(e),r=t?JSON.stringify(t,null,2):String(e||"");return(0,s.jsx)("pre",{className:"max-h-[58vh] overflow-auto rounded-2xl bg-zinc-950 p-4 text-xs leading-relaxed text-zinc-100 shadow-inner",children:r||"No JSON"})}function p({value:e,empty:t="No content"}){return(0,s.jsx)("pre",{className:"max-h-[58vh] overflow-auto whitespace-pre-wrap break-words rounded-2xl border border-zinc-200 bg-white p-4 font-mono text-xs leading-relaxed text-zinc-950 shadow-sm dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100",children:e||t})}function u({label:e,value:t}){return(0,s.jsxs)("div",{className:"rounded-2xl border border-border bg-surface p-4 shadow-sm",children:[(0,s.jsx)("div",{className:"text-xs uppercase tracking-wide text-text-muted",children:e}),(0,s.jsx)("div",{className:"mt-1 text-2xl font-semibold text-text-main",children:t})]})}function b({stage:e}){let t=o[e]||"bg-surface text-text-main border-border";return(0,s.jsx)("span",{className:`inline-flex items-center rounded-full border px-2.5 py-1 text-xs font-medium ${t}`,children:l[e]||e||"-"})}function h({label:e,value:t}){return(0,s.jsxs)("div",{className:"rounded-2xl border border-zinc-200 bg-white p-4 shadow-sm dark:border-zinc-700 dark:bg-zinc-950",children:[(0,s.jsx)("div",{className:"text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:e}),(0,s.jsx)("pre",{className:"mt-2 whitespace-pre-wrap break-words font-mono text-xs leading-relaxed text-text-main",children:t||"-"})]})}function g(){let[e,t]=(0,a.useState)({keyword:"",model:"",stage:"",sourceTool:"",clientIp:"",sessionId:"",dateFrom:"",dateTo:"",limit:"50",offset:"0"}),[r,o]=(0,a.useState)([]),[i,g]=(0,a.useState)([]),[f,j]=(0,a.useState)([]),[N,v]=(0,a.useState)(0),[w,y]=(0,a.useState)(null),[k,_]=(0,a.useState)(""),[z,S]=(0,a.useState)(""),[C,I]=(0,a.useState)(!1),[P,T]=(0,a.useState)(null),[E,M]=(0,a.useState)("prompt"),$=(0,a.useMemo)(()=>{let t=Number(e.limit||50);return Math.floor(Number(e.offset||0)/t)+1},[e.limit,e.offset]),D=(0,a.useCallback)(async()=>{I(!0),S(""),_("");try{let t=new URLSearchParams;Object.entries(e).forEach(([e,r])=>{String(r||"").trim()&&t.set(e,String(r).trim())});let r=await fetch(`/api/dashboard/prompt-logs?${t}`),s=await r.json();if(!r.ok)throw Error(s.error||"Failed to load prompt logs");o(s.rows||[]),g(s.models||[]),j(s.stages||[]),v(s.total||0),y(s.dbInfo||null),s.disabled&&_("Database prompt logging is disabled. Enable it in Dashboard -> MITM -> Prompt Log Database."),s.missing&&_("Prompt log database/table has no data yet, or SQLite file does not exist.")}catch(e){S(e.message||"Failed to load prompt logs")}finally{I(!1)}},[e]);(0,a.useEffect)(()=>{D()},[D]);let F=e=>{t(t=>({...t,...e,offset:void 0!==e.offset?e.offset:"0"}))},q=async e=>{S("");try{let t=await fetch(`/api/dashboard/prompt-logs/${encodeURIComponent(e)}`),r=await t.json();if(!t.ok)throw Error(r.error||"Failed to load detail");T(r.row),M("prompt")}catch(e){S(e.message||"Failed to load detail")}},O=async e=>{await navigator.clipboard.writeText(String(e||""))},L=async()=>{P?.id&&confirm("Delete this prompt log row?")&&(await fetch(`/api/dashboard/prompt-logs/${encodeURIComponent(P.id)}`,{method:"DELETE"})).ok&&(T(null),D())};return(0,s.jsxs)("div",{className:"flex w-full max-w-none flex-col gap-5 p-3 md:p-4 lg:p-6",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 md:flex-row md:items-end md:justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-2xl font-semibold text-text-main",children:"Prompt Logs"}),(0,s.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Search Copilot/MITM prompts across the currently configured prompt log database."})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)("a",{href:"/dashboard/mitm",className:"rounded-xl border border-border px-3 py-2 text-sm hover:bg-surface",children:"MITM Settings"}),(0,s.jsx)("button",{onClick:D,disabled:C,className:"rounded-xl bg-primary px-3 py-2 text-sm font-medium text-white disabled:opacity-50",children:C?"Loading...":"Refresh"})]})]}),k&&(0,s.jsx)("div",{className:"rounded-2xl border border-yellow-500/30 bg-yellow-500/10 p-4 text-sm text-yellow-700 dark:text-yellow-300",children:k}),z&&(0,s.jsx)("div",{className:"rounded-2xl border border-red-500/30 bg-red-500/10 p-4 text-sm text-red-500",children:z}),(0,s.jsxs)("div",{className:"grid gap-4 md:grid-cols-4",children:[(0,s.jsx)(u,{label:"Matching rows",value:N}),(0,s.jsx)(u,{label:"Loaded rows",value:r.length}),(0,s.jsx)(u,{label:"Page",value:$}),(0,s.jsx)(u,{label:"Database",value:w?.type||"-"})]}),w&&(0,s.jsxs)("div",{className:"rounded-2xl border border-border bg-surface p-3 text-xs text-text-muted",children:["DB: ",(0,s.jsx)("code",{children:w.type}),w.sqlitePath?(0,s.jsxs)(s.Fragment,{children:[" ","\xb7 Path: ",(0,s.jsx)("code",{children:w.sqlitePath})]}):null,w.host?(0,s.jsxs)(s.Fragment,{children:[" ","\xb7 Host: ",(0,s.jsx)("code",{children:w.host})]}):null,w.database?(0,s.jsxs)(s.Fragment,{children:[" ","\xb7 Database: ",(0,s.jsx)("code",{children:w.database})]}):null]}),(0,s.jsx)("div",{className:"rounded-2xl border border-border bg-surface p-4 shadow-sm",children:(0,s.jsxs)("div",{className:"grid gap-3 md:grid-cols-4 xl:grid-cols-6",children:[(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Keyword"}),(0,s.jsx)("input",{value:e.keyword,onChange:e=>F({keyword:e.target.value}),placeholder:"prompt, code, model, error...",className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30"})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Model"}),(0,s.jsxs)("select",{value:e.model,onChange:e=>F({model:e.target.value}),className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30",children:[(0,s.jsx)("option",{value:"",children:"All models"}),i.map(e=>(0,s.jsx)("option",{value:e,children:e},e))]})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Stage"}),(0,s.jsxs)("select",{value:e.stage,onChange:e=>F({stage:e.target.value}),className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30",children:[(0,s.jsx)("option",{value:"",children:"All stages"}),f.map(e=>(0,s.jsx)("option",{value:e,children:l[e]||e},e))]})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Tool"}),(0,s.jsx)("input",{value:e.sourceTool,onChange:e=>F({sourceTool:e.target.value}),placeholder:"copilot, antigravity...",className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30"})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Client IP"}),(0,s.jsx)("input",{value:e.clientIp,onChange:e=>F({clientIp:e.target.value}),placeholder:"172.16.253.1",className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30"})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Session ID"}),(0,s.jsx)("input",{value:e.sessionId,onChange:e=>F({sessionId:e.target.value}),placeholder:"session id",className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30"})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"From"}),(0,s.jsx)("input",{type:"datetime-local",value:e.dateFrom,onChange:e=>F({dateFrom:e.target.value}),className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30"})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"To"}),(0,s.jsx)("input",{type:"datetime-local",value:e.dateTo,onChange:e=>F({dateTo:e.target.value}),className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30"})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Limit"}),(0,s.jsxs)("select",{value:e.limit,onChange:e=>F({limit:e.target.value}),className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30",children:[(0,s.jsx)("option",{value:"25",children:"25"}),(0,s.jsx)("option",{value:"50",children:"50"}),(0,s.jsx)("option",{value:"100",children:"100"}),(0,s.jsx)("option",{value:"200",children:"200"})]})]}),(0,s.jsxs)("div",{className:"flex items-end gap-2",children:[(0,s.jsx)("button",{onClick:()=>t({keyword:"",model:"",stage:"",sourceTool:"",clientIp:"",sessionId:"",dateFrom:"",dateTo:"",limit:"50",offset:"0"}),className:"rounded-xl border border-border px-3 py-2 text-sm hover:bg-background",children:"Reset"}),(0,s.jsx)("button",{onClick:D,className:"rounded-xl bg-primary px-3 py-2 text-sm font-medium text-white",children:"Search"})]})]})}),(0,s.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-border bg-surface shadow-sm",children:[(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)("table",{className:"w-full min-w-[1450px] text-left text-sm",children:[(0,s.jsx)("thead",{className:"border-b border-border bg-background/60 text-xs uppercase tracking-wide text-text-muted",children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"w-[150px] px-4 py-3",children:"Time"}),(0,s.jsx)("th",{className:"w-[130px] px-4 py-3",children:"Stage"}),(0,s.jsx)("th",{className:"w-[150px] px-4 py-3",children:"Tool"}),(0,s.jsx)("th",{className:"w-[130px] px-4 py-3",children:"Client IP"}),(0,s.jsx)("th",{className:"w-[110px] px-4 py-3",children:"Model"}),(0,s.jsx)("th",{className:"w-[190px] px-4 py-3",children:"Session"}),(0,s.jsx)("th",{className:"w-[390px] px-4 py-3",children:"Prompt preview"}),(0,s.jsx)("th",{className:"w-[130px] px-4 py-3",children:"Status/Error"}),(0,s.jsx)("th",{className:"sticky right-0 z-20 w-[95px] bg-background/95 px-4 py-3 text-right shadow-[-8px_0_12px_-12px_rgba(0,0,0,0.45)]",children:"Action"})]})}),(0,s.jsxs)("tbody",{children:[0===r.length&&(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:9,className:"px-4 py-10 text-center text-text-muted",children:"No prompt logs found."})}),r.map(e=>(0,s.jsxs)("tr",{className:"border-b border-border/70 hover:bg-background/50",children:[(0,s.jsx)("td",{className:"whitespace-nowrap px-4 py-3 text-xs text-text-muted",children:d(e.created_at)}),(0,s.jsx)("td",{className:"px-4 py-3",children:(0,s.jsx)(b,{stage:e.stage})}),(0,s.jsx)("td",{className:"px-4 py-3",children:(0,s.jsx)("span",{className:"inline-flex max-w-[180px] items-center truncate rounded-full border border-border bg-surface/70 px-2.5 py-1 text-xs font-medium text-text-main",children:e.source_tool_label||e.source_tool||e.source_format||"-"})}),(0,s.jsx)("td",{className:"max-w-[150px] truncate px-4 py-3 font-mono text-xs text-text-muted",children:e.client_ip||"-"}),(0,s.jsx)("td",{className:"max-w-[260px] truncate px-4 py-3 font-mono text-xs",title:c(e),children:c(e)}),(0,s.jsx)("td",{className:"max-w-[180px] truncate px-4 py-3 font-mono text-xs text-text-muted",children:e.session_id||"-"}),(0,s.jsx)("td",{className:"min-w-[360px] px-4 py-3 text-xs",children:n(e.prompt_preview,420)||(0,s.jsx)("span",{className:"text-text-muted",children:"No prompt text"})}),(0,s.jsx)("td",{className:"max-w-[220px] px-4 py-3 text-xs",children:e.error_text?(0,s.jsx)("span",{className:"text-red-500",children:n(e.error_text,160)}):e.status_code||(0,s.jsx)("span",{className:"text-text-muted",children:"-"})}),(0,s.jsx)("td",{className:"sticky right-0 z-10 bg-surface px-4 py-3 text-right shadow-[-8px_0_12px_-12px_rgba(0,0,0,0.35)]",children:(0,s.jsx)("button",{onClick:()=>q(e.id),className:"rounded-lg bg-primary px-3 py-1.5 text-xs font-medium text-white",children:"View"})})]},e.id))]})]})}),(0,s.jsxs)("div",{className:"flex items-center justify-between border-t border-border p-3 text-sm",children:[(0,s.jsxs)("div",{className:"text-text-muted",children:["Showing ",r.length," of ",N,". Page ",$,"."]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("button",{onClick:()=>{let r=Number(e.limit||50),s=Number(e.offset||0);t(e=>({...e,offset:String(Math.max(0,s-r))}))},disabled:0>=Number(e.offset||0),className:"rounded-xl border border-border px-3 py-1.5 disabled:opacity-50",children:"Previous"}),(0,s.jsx)("button",{onClick:()=>{let r=Number(e.limit||50),s=Number(e.offset||0);s+r>=N||t(e=>({...e,offset:String(s+r)}))},disabled:Number(e.offset||0)+Number(e.limit||50)>=N,className:"rounded-xl border border-border px-3 py-1.5 disabled:opacity-50",children:"Next"})]})]})]}),P&&(0,s.jsx)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/55 p-3 md:p-6",children:(0,s.jsxs)("div",{className:"flex h-[92vh] w-[96vw] max-w-none flex-col overflow-hidden rounded-3xl border border-zinc-200 bg-white shadow-2xl dark:border-zinc-700 dark:bg-zinc-950",children:[(0,s.jsxs)("div",{className:"flex flex-none items-start justify-between gap-4 border-b border-zinc-200 bg-white px-5 py-4 dark:border-zinc-700 dark:bg-zinc-950",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Prompt Log Detail"}),(0,s.jsx)(b,{stage:P.stage})]}),(0,s.jsxs)("div",{className:"mt-1 truncate text-xs text-text-muted",children:[d(P.created_at)," \xb7 ",c(P)," \xb7"," ",P.session_id||"-"]})]}),(0,s.jsx)("button",{onClick:()=>T(null),className:"rounded-xl border border-zinc-200 bg-white px-3 py-2 text-sm font-medium text-zinc-900 shadow-sm hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100 dark:hover:bg-zinc-800",children:"Close"})]}),(0,s.jsxs)("div",{className:"grid min-h-0 flex-1 grid-cols-1 overflow-hidden bg-zinc-100 dark:bg-zinc-900 lg:grid-cols-[340px_1fr]",children:[(0,s.jsx)("aside",{className:"min-h-0 overflow-y-auto border-b border-zinc-200 bg-zinc-100 p-4 dark:border-zinc-700 dark:bg-zinc-900 lg:border-b-0 lg:border-r",children:(0,s.jsxs)("div",{className:"grid gap-3",children:[(0,s.jsx)(h,{label:"ID",value:P.id}),(0,s.jsx)(h,{label:"Session",value:P.session_id}),(0,s.jsx)(h,{label:"Model",value:c(P)}),(0,s.jsx)(h,{label:"Provider",value:x(P)||P.provider_url||P.endpoint}),(0,s.jsx)(h,{label:"Source Tool",value:P.source_tool_label||P.source_tool||P.source_format}),(0,s.jsx)(h,{label:"Source Host",value:P.source_host}),(0,s.jsx)(h,{label:"Client IP",value:P.client_ip}),(0,s.jsx)(h,{label:"Client Port",value:P.client_port}),(0,s.jsx)(h,{label:"Client Host",value:P.client_host}),(0,s.jsx)(h,{label:"User Agent",value:P.client_user_agent}),(0,s.jsx)(h,{label:"Endpoint",value:P.endpoint||P.provider_url}),(0,s.jsx)(h,{label:"Source -> Target",value:`${P.source_format||"-"} -> ${P.target_format||"-"}`}),(0,s.jsx)(h,{label:"Status / Error",value:P.error_text||P.status_code||"-"}),(0,s.jsxs)("div",{className:"grid gap-2 pt-2",children:[(0,s.jsx)("button",{onClick:()=>O(P.prompt_text),className:"rounded-xl border border-zinc-200 bg-white px-3 py-2 text-sm font-medium text-zinc-900 shadow-sm hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100 dark:hover:bg-zinc-800",children:"Copy prompt"}),(0,s.jsx)("button",{onClick:()=>O(P.full_request_json),className:"rounded-xl border border-zinc-200 bg-white px-3 py-2 text-sm font-medium text-zinc-900 shadow-sm hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100 dark:hover:bg-zinc-800",children:"Copy request JSON"}),(0,s.jsx)("button",{onClick:L,className:"rounded-xl border border-red-500/40 bg-red-500/10 px-3 py-2 text-sm font-medium text-red-500 shadow-inner hover:bg-red-500/20",children:"Delete row"})]})]})}),(0,s.jsxs)("main",{className:"flex min-h-0 flex-col overflow-hidden bg-zinc-50 dark:bg-zinc-950",children:[(0,s.jsx)("div",{className:"flex flex-none gap-2 overflow-x-auto border-b border-zinc-200 bg-white px-4 py-3 dark:border-zinc-700 dark:bg-zinc-950",children:[["prompt","Prompt"],["request","Request JSON"],["response","Response"],["meta","Metadata"]].map(([e,t])=>(0,s.jsx)("button",{onClick:()=>M(e),className:`whitespace-nowrap rounded-xl px-3 py-2 text-sm ${E===e?"bg-primary text-white shadow-sm":"border border-border bg-surface text-text-main hover:bg-background"}`,children:t},e))}),(0,s.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto bg-zinc-50 p-4 dark:bg-zinc-950",children:["prompt"===E&&(0,s.jsxs)("section",{children:[(0,s.jsx)("h3",{className:"mb-2 text-sm font-semibold text-text-main",children:"Extracted prompt text"}),(0,s.jsx)(p,{value:P.prompt_text,empty:"No prompt text"})]}),"request"===E&&(0,s.jsxs)("section",{children:[(0,s.jsx)("h3",{className:"mb-2 text-sm font-semibold text-text-main",children:"Full request JSON"}),(0,s.jsx)(m,{value:P.full_request_json})]}),"response"===E&&(0,s.jsxs)("section",{children:[(0,s.jsx)("h3",{className:"mb-2 text-sm font-semibold text-text-main",children:"Response text"}),(0,s.jsx)(p,{value:P.response_text,empty:"No response text stored for this stage"})]}),"meta"===E&&(0,s.jsxs)("section",{children:[(0,s.jsx)("h3",{className:"mb-2 text-sm font-semibold text-text-main",children:"Metadata JSON"}),(0,s.jsx)(m,{value:P.meta_json})]})]})]})]})]})})]})}},79705:(e,t,r)=>{Promise.resolve().then(r.bind(r,55478))}},e=>{e.O(0,[8441,3794,7358],()=>e(e.s=79705)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7136],{1104:(e,t,r)=>{Promise.resolve().then(r.bind(r,88884))},88884:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});var s=r(95155),a=r(12115);function l({children:e,className:t=""}){return(0,s.jsx)("span",{className:`inline-flex items-center rounded-full border px-2 py-0.5 text-xs font-semibold ${t}`,children:e})}function d({icon:e,label:t,value:r,hint:a}){return(0,s.jsx)("div",{className:"rounded-2xl border border-border bg-surface p-4 shadow-sm",children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("span",{className:"material-symbols-outlined rounded-xl bg-primary/10 p-2 text-primary",children:e}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:t}),(0,s.jsx)("p",{className:"mt-1 text-2xl font-bold text-text-main",children:r}),a?(0,s.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:a}):null]})]})})}function n(){let[e,t]=(0,a.useState)(null),[r,n]=(0,a.useState)(!0),[o,i]=(0,a.useState)(!1),[x,c]=(0,a.useState)(""),m=async()=>{try{c("");let e=await fetch("/api/provider-health",{cache:"no-store"}),r=await e.json();if(!e.ok)throw Error(r.error||"Failed to load provider health");t(r)}catch(e){c(e.message||"Failed to load provider health")}finally{n(!1)}},h=async()=>{i(!0),await m(),i(!1)},p=async()=>{if(confirm("Reset all in-memory provider health state?")){i(!0);try{let e=await fetch("/api/provider-health",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"reset"})}),r=await e.json();if(!e.ok)throw Error(r.error||"Failed to reset health state");t(r)}catch(e){c(e.message||"Failed to reset health state")}finally{i(!1)}}};(0,a.useEffect)(()=>{m();let e=setInterval(m,5e3);return()=>clearInterval(e)},[]);let u=e?.targets||[],b=e?.totals||{},g=(0,a.useMemo)(()=>[...u].sort((e,t)=>"open"===e.circuit!=("open"===t.circuit)?"open"===e.circuit?1:-1:(e.score||0)-(t.score||0)),[u]);return(0,s.jsxs)("div",{className:"mx-auto flex w-full max-w-7xl flex-col gap-6",children:[(0,s.jsxs)("div",{className:"flex flex-col justify-between gap-4 rounded-3xl border border-border bg-surface p-6 shadow-sm lg:flex-row lg:items-center",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"mb-2 flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary",children:"monitor_heart"}),(0,s.jsx)("span",{className:"text-xs font-bold uppercase tracking-widest text-primary",children:"Passive runtime monitor"})]}),(0,s.jsx)("h1",{className:"text-3xl font-bold text-text-main",children:"Provider Health"}),(0,s.jsx)("p",{className:"mt-2 max-w-3xl text-sm text-text-muted",children:"Tracks combo targets from real user chat/completion API calls only. No background /api/tags or generate probes are sent, so sleeping Ollama models are not woken by the monitor."})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:h,disabled:o,className:"rounded-xl bg-primary px-4 py-2 text-sm font-semibold text-white shadow-sm disabled:opacity-60",children:o?"Refreshing...":"Refresh"}),(0,s.jsx)("button",{type:"button",onClick:p,disabled:o,className:"rounded-xl border border-border px-4 py-2 text-sm font-semibold text-text-main hover:border-primary/50 disabled:opacity-60",children:"Reset state"})]})]}),x?(0,s.jsx)("div",{className:"rounded-2xl border border-red-500/30 bg-red-500/10 p-4 text-sm text-red-600 dark:text-red-400",children:x}):null,(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-4",children:[(0,s.jsx)(d,{icon:"hub",label:"Targets",value:b.targets||0,hint:"Targets seen in real API calls"}),(0,s.jsx)(d,{icon:"check_circle",label:"Healthy",value:b.healthy||0,hint:"Closed circuit and usable"}),(0,s.jsx)(d,{icon:"error",label:"Open circuits",value:b.open||0,hint:"Skipped until cooldown expires"}),(0,s.jsx)(d,{icon:"bolt",label:"In flight",value:b.inFlight||0,hint:`Max per target: ${e?.config?.maxInFlightPerTarget||"-"}`})]}),(0,s.jsxs)("div",{className:"rounded-2xl border border-border bg-surface p-5 shadow-sm",children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col justify-between gap-2 sm:flex-row sm:items-center",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Health Targets"}),(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["Mode: ",e?.mode||"passive-runtime"," \xb7 Learned from real API calls"]})]}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Auto-refresh every 5s"})]}),r?(0,s.jsx)("div",{className:"rounded-xl border border-border bg-background/50 p-8 text-center text-sm text-text-muted",children:"Loading provider health..."}):0===g.length?(0,s.jsx)("div",{className:"rounded-xl border border-border bg-background/50 p-8 text-center text-sm text-text-muted",children:"No runtime health targets yet. Send a real chat/completion request through a combo or auto/* route to collect passive health data."}):(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)("table",{className:"min-w-full text-left text-sm",children:[(0,s.jsx)("thead",{className:"border-b border-border text-xs uppercase tracking-wide text-text-muted",children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"px-3 py-3",children:"Target"}),(0,s.jsx)("th",{className:"px-3 py-3",children:"State"}),(0,s.jsx)("th",{className:"px-3 py-3",children:"Circuit"}),(0,s.jsx)("th",{className:"px-3 py-3",children:"Latency"}),(0,s.jsx)("th",{className:"px-3 py-3",children:"In flight"}),(0,s.jsx)("th",{className:"px-3 py-3",children:"Failures"}),(0,s.jsx)("th",{className:"px-3 py-3",children:"Cooldown"}),(0,s.jsx)("th",{className:"px-3 py-3",children:"Last request"})]})}),(0,s.jsx)("tbody",{children:g.map(e=>{var t,r;let a;return(0,s.jsxs)("tr",{className:"border-b border-border/60 last:border-0",children:[(0,s.jsxs)("td",{className:"max-w-[360px] px-3 py-3",children:[(0,s.jsx)("p",{className:"truncate font-semibold text-text-main",title:e.label||e.providerLabel||e.key,children:e.label||e.providerLabel||e.key}),(0,s.jsx)("p",{className:"truncate font-mono text-xs text-text-muted",title:e.endpoint||"",children:e.endpoint||"-"}),(0,s.jsx)("p",{className:"truncate font-mono text-[11px] text-text-muted",title:e.key,children:e.key})]}),(0,s.jsx)("td",{className:"px-3 py-3",children:(0,s.jsx)(l,{className:"healthy"===(t=e.state)?"border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400":"degraded"===t?"border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400":"overloaded"===t?"border-orange-500/30 bg-orange-500/10 text-orange-600 dark:text-orange-400":"down"===t||"model_unavailable"===t?"border-red-500/30 bg-red-500/10 text-red-600 dark:text-red-400":"border-border bg-surface-2 text-text-muted",children:e.state||"unknown"})}),(0,s.jsx)("td",{className:"px-3 py-3",children:(0,s.jsx)(l,{className:"closed"===(r=e.circuit)?"border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400":"half_open"===r?"border-blue-500/30 bg-blue-500/10 text-blue-600 dark:text-blue-400":"open"===r?"border-red-500/30 bg-red-500/10 text-red-600 dark:text-red-400":"border-border bg-surface-2 text-text-muted",children:e.circuit||"closed"})}),(0,s.jsx)("td",{className:"px-3 py-3 font-mono text-xs text-text-main",children:e.avgLatencyMs?`${Math.round(e.avgLatencyMs)}ms avg`:e.latencyMs?`${Math.round(e.latencyMs)}ms`:"-"}),(0,s.jsx)("td",{className:"px-3 py-3 font-mono text-xs text-text-main",children:e.inFlight||0}),(0,s.jsxs)("td",{className:"px-3 py-3 font-mono text-xs text-text-main",children:[e.consecutiveFailures||0," consecutive"]}),(0,s.jsx)("td",{className:"px-3 py-3 font-mono text-xs text-text-main",children:e.cooldownRemainingMs?!Number.isFinite(a=Number(e.cooldownRemainingMs||0))||a<=0?"0s":a<1e3?`${Math.round(a)}ms`:a<6e4?`${Math.round(a/1e3)}s`:`${Math.round(a/6e4)}m`:"-"}),(0,s.jsxs)("td",{className:"px-3 py-3 text-xs text-text-muted",children:[function(e){if(!e)return"-";try{return new Date(e).toLocaleString()}catch{return"-"}}(e.lastRequestAt||e.updatedAt),e.lastError?(0,s.jsx)("p",{className:"mt-1 max-w-[260px] truncate text-[11px] text-red-500",title:e.lastError,children:e.lastError}):null]})]},e.key)})})]})})]})]})}}},e=>{e.O(0,[8441,3794,7358],()=>e(e.s=1104)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7136],{72e3:(e,t,r)=>{Promise.resolve().then(r.bind(r,88884))},88884:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});var s=r(95155),a=r(12115);function l({children:e,className:t=""}){return(0,s.jsx)("span",{className:`inline-flex items-center rounded-full border px-2 py-0.5 text-xs font-semibold ${t}`,children:e})}function d({icon:e,label:t,value:r,hint:a}){return(0,s.jsx)("div",{className:"rounded-2xl border border-border bg-surface p-4 shadow-sm",children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("span",{className:"material-symbols-outlined rounded-xl bg-primary/10 p-2 text-primary",children:e}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:t}),(0,s.jsx)("p",{className:"mt-1 text-2xl font-bold text-text-main",children:r}),a?(0,s.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:a}):null]})]})})}function n(){let[e,t]=(0,a.useState)(null),[r,n]=(0,a.useState)(!0),[o,i]=(0,a.useState)(!1),[x,c]=(0,a.useState)(""),m=async()=>{try{c("");let e=await fetch("/api/provider-health",{cache:"no-store"}),r=await e.json();if(!e.ok)throw Error(r.error||"Failed to load provider health");t(r)}catch(e){c(e.message||"Failed to load provider health")}finally{n(!1)}},h=async()=>{i(!0),await m(),i(!1)},p=async()=>{if(confirm("Reset all in-memory provider health state?")){i(!0);try{let e=await fetch("/api/provider-health",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"reset"})}),r=await e.json();if(!e.ok)throw Error(r.error||"Failed to reset health state");t(r)}catch(e){c(e.message||"Failed to reset health state")}finally{i(!1)}}};(0,a.useEffect)(()=>{m();let e=setInterval(m,5e3);return()=>clearInterval(e)},[]);let u=e?.targets||[],b=e?.totals||{},g=(0,a.useMemo)(()=>[...u].sort((e,t)=>"open"===e.circuit!=("open"===t.circuit)?"open"===e.circuit?1:-1:(e.score||0)-(t.score||0)),[u]);return(0,s.jsxs)("div",{className:"mx-auto flex w-full max-w-7xl flex-col gap-6",children:[(0,s.jsxs)("div",{className:"flex flex-col justify-between gap-4 rounded-3xl border border-border bg-surface p-6 shadow-sm lg:flex-row lg:items-center",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"mb-2 flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary",children:"monitor_heart"}),(0,s.jsx)("span",{className:"text-xs font-bold uppercase tracking-widest text-primary",children:"Passive runtime monitor"})]}),(0,s.jsx)("h1",{className:"text-3xl font-bold text-text-main",children:"Provider Health"}),(0,s.jsx)("p",{className:"mt-2 max-w-3xl text-sm text-text-muted",children:"Tracks combo targets from real user chat/completion API calls only. No background /api/tags or generate probes are sent, so sleeping Ollama models are not woken by the monitor."})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:h,disabled:o,className:"rounded-xl bg-primary px-4 py-2 text-sm font-semibold text-white shadow-sm disabled:opacity-60",children:o?"Refreshing...":"Refresh"}),(0,s.jsx)("button",{type:"button",onClick:p,disabled:o,className:"rounded-xl border border-border px-4 py-2 text-sm font-semibold text-text-main hover:border-primary/50 disabled:opacity-60",children:"Reset state"})]})]}),x?(0,s.jsx)("div",{className:"rounded-2xl border border-red-500/30 bg-red-500/10 p-4 text-sm text-red-600 dark:text-red-400",children:x}):null,(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-4",children:[(0,s.jsx)(d,{icon:"hub",label:"Targets",value:b.targets||0,hint:"Targets seen in real API calls"}),(0,s.jsx)(d,{icon:"check_circle",label:"Healthy",value:b.healthy||0,hint:"Closed circuit and usable"}),(0,s.jsx)(d,{icon:"error",label:"Open circuits",value:b.open||0,hint:"Skipped until cooldown expires"}),(0,s.jsx)(d,{icon:"bolt",label:"In flight",value:b.inFlight||0,hint:`Max per target: ${e?.config?.maxInFlightPerTarget||"-"}`})]}),(0,s.jsxs)("div",{className:"rounded-2xl border border-border bg-surface p-5 shadow-sm",children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col justify-between gap-2 sm:flex-row sm:items-center",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Health Targets"}),(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["Mode: ",e?.mode||"passive-runtime"," \xb7 Learned from real API calls"]})]}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Auto-refresh every 5s"})]}),r?(0,s.jsx)("div",{className:"rounded-xl border border-border bg-background/50 p-8 text-center text-sm text-text-muted",children:"Loading provider health..."}):0===g.length?(0,s.jsx)("div",{className:"rounded-xl border border-border bg-background/50 p-8 text-center text-sm text-text-muted",children:"No runtime health targets yet. Send a real chat/completion request through a combo or auto/* route to collect passive health data."}):(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)("table",{className:"min-w-full text-left text-sm",children:[(0,s.jsx)("thead",{className:"border-b border-border text-xs uppercase tracking-wide text-text-muted",children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"px-3 py-3",children:"Target"}),(0,s.jsx)("th",{className:"px-3 py-3",children:"State"}),(0,s.jsx)("th",{className:"px-3 py-3",children:"Circuit"}),(0,s.jsx)("th",{className:"px-3 py-3",children:"Latency"}),(0,s.jsx)("th",{className:"px-3 py-3",children:"In flight"}),(0,s.jsx)("th",{className:"px-3 py-3",children:"Failures"}),(0,s.jsx)("th",{className:"px-3 py-3",children:"Cooldown"}),(0,s.jsx)("th",{className:"px-3 py-3",children:"Last request"})]})}),(0,s.jsx)("tbody",{children:g.map(e=>{var t,r;let a;return(0,s.jsxs)("tr",{className:"border-b border-border/60 last:border-0",children:[(0,s.jsxs)("td",{className:"max-w-[360px] px-3 py-3",children:[(0,s.jsx)("p",{className:"truncate font-semibold text-text-main",title:e.label||e.providerLabel||e.key,children:e.label||e.providerLabel||e.key}),(0,s.jsx)("p",{className:"truncate font-mono text-xs text-text-muted",title:e.endpoint||"",children:e.endpoint||"-"}),(0,s.jsx)("p",{className:"truncate font-mono text-[11px] text-text-muted",title:e.key,children:e.key})]}),(0,s.jsx)("td",{className:"px-3 py-3",children:(0,s.jsx)(l,{className:"healthy"===(t=e.state)?"border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400":"degraded"===t?"border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400":"overloaded"===t?"border-orange-500/30 bg-orange-500/10 text-orange-600 dark:text-orange-400":"down"===t||"model_unavailable"===t?"border-red-500/30 bg-red-500/10 text-red-600 dark:text-red-400":"border-border bg-surface-2 text-text-muted",children:e.state||"unknown"})}),(0,s.jsx)("td",{className:"px-3 py-3",children:(0,s.jsx)(l,{className:"closed"===(r=e.circuit)?"border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400":"half_open"===r?"border-blue-500/30 bg-blue-500/10 text-blue-600 dark:text-blue-400":"open"===r?"border-red-500/30 bg-red-500/10 text-red-600 dark:text-red-400":"border-border bg-surface-2 text-text-muted",children:e.circuit||"closed"})}),(0,s.jsx)("td",{className:"px-3 py-3 font-mono text-xs text-text-main",children:e.avgLatencyMs?`${Math.round(e.avgLatencyMs)}ms avg`:e.latencyMs?`${Math.round(e.latencyMs)}ms`:"-"}),(0,s.jsx)("td",{className:"px-3 py-3 font-mono text-xs text-text-main",children:e.inFlight||0}),(0,s.jsxs)("td",{className:"px-3 py-3 font-mono text-xs text-text-main",children:[e.consecutiveFailures||0," consecutive"]}),(0,s.jsx)("td",{className:"px-3 py-3 font-mono text-xs text-text-main",children:e.cooldownRemainingMs?!Number.isFinite(a=Number(e.cooldownRemainingMs||0))||a<=0?"0s":a<1e3?`${Math.round(a)}ms`:a<6e4?`${Math.round(a/1e3)}s`:`${Math.round(a/6e4)}m`:"-"}),(0,s.jsxs)("td",{className:"px-3 py-3 text-xs text-text-muted",children:[function(e){if(!e)return"-";try{return new Date(e).toLocaleString()}catch{return"-"}}(e.lastRequestAt||e.updatedAt),e.lastError?(0,s.jsx)("p",{className:"mt-1 max-w-[260px] truncate text-[11px] text-red-500",title:e.lastError,children:e.lastError}):null]})]},e.key)})})]})})]})]})}}},e=>{e.O(0,[8441,3794,7358],()=>e(e.s=72e3)),_N_E=e.O()}]);