@jheavenknows/bluerouter 5.1.62 → 5.2.2

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 (1129) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +13 -11
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/routes-manifest.json +12 -0
  5. package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page.js +2 -2
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page.js.nft.json +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page.js +3 -3
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page.js.nft.json +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page_client-reference-manifest.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +3 -3
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cluster/page.js +2 -2
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cluster/page.js.nft.json +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cluster/page_client-reference-manifest.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovider/page.js +2 -2
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovider/page.js.nft.json +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovider/page_client-reference-manifest.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovidermonitor/page.js +2 -2
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovidermonitor/page.js.nft.json +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovidermonitor/page_client-reference-manifest.js +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalquota/page.js +2 -2
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalquota/page.js.nft.json +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalquota/page_client-reference-manifest.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page.js +2 -2
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page.js.nft.json +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page_client-reference-manifest.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page.js +2 -2
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page.js.nft.json +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page_client-reference-manifest.js +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +2 -2
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/resource-monitor/page.js +2 -2
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/resource-monitor/page.js.nft.json +1 -1
  85. package/app/.next-cli-build/server/app/(dashboard)/dashboard/resource-monitor/page_client-reference-manifest.js +1 -1
  86. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  87. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  88. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  89. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
  90. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  91. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  92. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  93. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  94. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  95. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  96. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  97. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  98. package/app/.next-cli-build/server/app/_global-error/page.js +2 -2
  99. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  100. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  101. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  102. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  103. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  104. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  105. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  106. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  107. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  108. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  109. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  110. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  112. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  113. package/app/.next-cli-build/server/app/_not-found.rsc +5 -5
  114. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
  115. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  116. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +5 -5
  117. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  118. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  119. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js +1 -1
  123. package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/auth/login/route.js +2 -2
  125. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  127. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  129. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  131. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  133. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  135. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/branding/[asset]/route.js +1 -1
  137. package/app/.next-cli-build/server/app/api/branding/[asset]/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/branding/route.js +1 -1
  139. package/app/.next-cli-build/server/app/api/branding/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/branding/upload/route.js +1 -1
  141. package/app/.next-cli-build/server/app/api/branding/upload/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +2 -2
  143. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  145. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/root-ca/route.js +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/root-ca/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +1 -1
  155. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  161. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  163. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  165. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  169. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  171. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +1 -1
  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/jcode-settings/route.js +1 -1
  175. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +1 -1
  177. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +1 -1
  179. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  181. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/cli-tools/qwen-settings/route.js +1 -1
  183. package/app/.next-cli-build/server/app/api/cli-tools/qwen-settings/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/cluster/config/route.js +1 -1
  185. package/app/.next-cli-build/server/app/api/cluster/config/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/cluster/heartbeat/route.js +1 -1
  187. package/app/.next-cli-build/server/app/api/cluster/heartbeat/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/cluster/peers/[id]/command/route.js +1 -1
  189. package/app/.next-cli-build/server/app/api/cluster/peers/[id]/command/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/cluster/peers/[id]/route.js +1 -1
  191. package/app/.next-cli-build/server/app/api/cluster/peers/[id]/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/cluster/peers/route.js +1 -1
  193. package/app/.next-cli-build/server/app/api/cluster/peers/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/cluster/snapshot/route.js +2 -2
  195. package/app/.next-cli-build/server/app/api/cluster/snapshot/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/cluster/sync/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/cluster/sync/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/cluster/test/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/cluster/test/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +2 -2
  201. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/dashboard/analytics/ai-models/route.js +1 -0
  205. package/app/.next-cli-build/server/app/api/dashboard/analytics/ai-models/route.js.nft.json +1 -0
  206. package/app/.next-cli-build/server/app/api/dashboard/analytics/ai-models/route_client-reference-manifest.js +1 -0
  207. package/app/.next-cli-build/server/app/api/dashboard/analytics/analyze/route.js +47 -0
  208. package/app/.next-cli-build/server/app/api/dashboard/analytics/analyze/route.js.nft.json +1 -0
  209. package/app/.next-cli-build/server/app/api/dashboard/analytics/analyze/route_client-reference-manifest.js +1 -0
  210. package/app/.next-cli-build/server/app/api/dashboard/analytics/route.js +1 -329
  211. package/app/.next-cli-build/server/app/api/dashboard/analytics/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/dashboard/combos/route.js +1 -1
  213. package/app/.next-cli-build/server/app/api/dashboard/combos/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/dashboard/endpoint/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/dashboard/endpoint/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/dashboard/token-saver/route.js +2 -2
  223. package/app/.next-cli-build/server/app/api/dashboard/token-saver/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  225. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/keys/[id]/caveman-test/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/keys/[id]/caveman-test/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/keys/route.js +2 -2
  235. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  237. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
  241. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +2 -2
  245. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  247. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  249. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +2 -2
  251. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  253. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  255. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  265. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  269. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  277. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  279. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  283. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/api-key-models/route.js +1 -1
  285. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/api-key-models/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/import-models/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/import-models/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route.js +1 -1
  289. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/route.js +1 -1
  291. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/usage/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/usage/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/personal-cloud-providers/client/route.js +1 -1
  295. package/app/.next-cli-build/server/app/api/personal-cloud-providers/client/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/personal-cloud-providers/monitor/route.js +1 -1
  297. package/app/.next-cli-build/server/app/api/personal-cloud-providers/monitor/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/personal-cloud-providers/permissions/route.js +1 -1
  299. package/app/.next-cli-build/server/app/api/personal-cloud-providers/permissions/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/personal-cloud-providers/route.js +1 -1
  301. package/app/.next-cli-build/server/app/api/personal-cloud-providers/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/personal-cloud-providers/routing/route.js +1 -1
  303. package/app/.next-cli-build/server/app/api/personal-cloud-providers/routing/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/pricing/recalculate/route.js +1 -1
  305. package/app/.next-cli-build/server/app/api/pricing/recalculate/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  307. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/provider-health/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/provider-health/route.js.nft.json +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/route.js +1 -1
  313. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  315. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  317. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  319. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  321. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  323. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  325. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  337. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  339. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  341. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  343. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  347. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/resource-monitor/[id]/route.js +3 -3
  349. package/app/.next-cli-build/server/app/api/resource-monitor/[id]/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/resource-monitor/ai-models/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/resource-monitor/ai-models/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/resource-monitor/analyze/route.js +3 -3
  353. package/app/.next-cli-build/server/app/api/resource-monitor/analyze/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/resource-monitor/history/route.js +1 -1
  355. package/app/.next-cli-build/server/app/api/resource-monitor/history/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/resource-monitor/route.js +3 -3
  357. package/app/.next-cli-build/server/app/api/resource-monitor/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/settings/route.js +2 -2
  365. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  367. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  369. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  373. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  375. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  379. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  381. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  383. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  385. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  387. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  389. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  391. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  393. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  395. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js +1 -1
  397. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js.nft.json +1 -1
  398. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js +2 -2
  399. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js.nft.json +1 -1
  400. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  401. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  403. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  404. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  405. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  406. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  407. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  409. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  410. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  411. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  412. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  413. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  415. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  416. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  417. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  418. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  419. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  420. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  421. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  422. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  423. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  424. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  425. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  426. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  427. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  428. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  429. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  430. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  431. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  432. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  433. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  434. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  435. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  436. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  437. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  438. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  439. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  440. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  441. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  442. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  443. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  444. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  445. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  446. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  447. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  448. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  449. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  450. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  451. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  452. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  453. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  454. package/app/.next-cli-build/server/app/api/version/restart/route.js +1 -1
  455. package/app/.next-cli-build/server/app/api/version/restart/route.js.nft.json +1 -1
  456. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  457. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  458. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  459. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  460. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  461. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  462. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  463. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  464. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  465. package/app/.next-cli-build/server/app/callback.html +1 -1
  466. package/app/.next-cli-build/server/app/callback.rsc +5 -5
  467. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
  468. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  469. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +5 -5
  470. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  471. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  472. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  473. package/app/.next-cli-build/server/app/dashboard/analytics.html +1 -1
  474. package/app/.next-cli-build/server/app/dashboard/analytics.rsc +7 -7
  475. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard/analytics/__PAGE__.segment.rsc +2 -2
  476. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard/analytics.segment.rsc +1 -1
  477. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  478. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  479. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_full.segment.rsc +7 -7
  480. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_head.segment.rsc +1 -1
  481. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_index.segment.rsc +5 -5
  482. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_tree.segment.rsc +1 -1
  483. package/app/.next-cli-build/server/app/dashboard/api-keys.html +1 -1
  484. package/app/.next-cli-build/server/app/dashboard/api-keys.rsc +7 -7
  485. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard/api-keys/__PAGE__.segment.rsc +2 -2
  486. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard/api-keys.segment.rsc +1 -1
  487. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  488. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  489. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_full.segment.rsc +7 -7
  490. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_head.segment.rsc +1 -1
  491. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_index.segment.rsc +5 -5
  492. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_tree.segment.rsc +1 -1
  493. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  494. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
  495. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  496. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  497. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  498. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  499. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
  500. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  501. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +5 -5
  502. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  503. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  504. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -7
  505. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  506. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  507. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  508. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  509. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
  510. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  511. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +5 -5
  512. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  513. package/app/.next-cli-build/server/app/dashboard/cluster.html +1 -1
  514. package/app/.next-cli-build/server/app/dashboard/cluster.rsc +6 -6
  515. package/app/.next-cli-build/server/app/dashboard/cluster.segments/!KGRhc2hib2FyZCk/dashboard/cluster/__PAGE__.segment.rsc +1 -1
  516. package/app/.next-cli-build/server/app/dashboard/cluster.segments/!KGRhc2hib2FyZCk/dashboard/cluster.segment.rsc +1 -1
  517. package/app/.next-cli-build/server/app/dashboard/cluster.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  518. package/app/.next-cli-build/server/app/dashboard/cluster.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  519. package/app/.next-cli-build/server/app/dashboard/cluster.segments/_full.segment.rsc +6 -6
  520. package/app/.next-cli-build/server/app/dashboard/cluster.segments/_head.segment.rsc +1 -1
  521. package/app/.next-cli-build/server/app/dashboard/cluster.segments/_index.segment.rsc +5 -5
  522. package/app/.next-cli-build/server/app/dashboard/cluster.segments/_tree.segment.rsc +1 -1
  523. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  524. package/app/.next-cli-build/server/app/dashboard/combos.rsc +7 -7
  525. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  526. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  527. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  528. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  529. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +7 -7
  530. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  531. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +5 -5
  532. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  533. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  534. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
  535. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  536. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  537. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  538. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  539. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
  540. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  541. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +5 -5
  542. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  543. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  544. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +7 -7
  545. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  546. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  547. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  548. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  549. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  550. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +7 -7
  551. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  552. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +5 -5
  553. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  554. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  555. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +7 -7
  556. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  557. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  558. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  559. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  560. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +7 -7
  561. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  562. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +5 -5
  563. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  564. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  565. package/app/.next-cli-build/server/app/dashboard/profile.rsc +7 -7
  566. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  567. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  568. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  569. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  570. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +7 -7
  571. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  572. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +5 -5
  573. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  574. package/app/.next-cli-build/server/app/dashboard/prompt-logs.html +1 -1
  575. package/app/.next-cli-build/server/app/dashboard/prompt-logs.rsc +6 -6
  576. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs/__PAGE__.segment.rsc +1 -1
  577. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs.segment.rsc +1 -1
  578. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  579. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  580. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_full.segment.rsc +6 -6
  581. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_head.segment.rsc +1 -1
  582. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_index.segment.rsc +5 -5
  583. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_tree.segment.rsc +1 -1
  584. package/app/.next-cli-build/server/app/dashboard/provider-health.html +1 -1
  585. package/app/.next-cli-build/server/app/dashboard/provider-health.rsc +6 -6
  586. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health/__PAGE__.segment.rsc +1 -1
  587. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health.segment.rsc +1 -1
  588. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  589. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  590. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_full.segment.rsc +6 -6
  591. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_head.segment.rsc +1 -1
  592. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_index.segment.rsc +5 -5
  593. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_tree.segment.rsc +1 -1
  594. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  595. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +7 -7
  596. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  597. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  598. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  599. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  600. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  601. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +7 -7
  602. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  603. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +5 -5
  604. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  605. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  606. package/app/.next-cli-build/server/app/dashboard/providers.rsc +7 -7
  607. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  608. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  609. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  610. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  611. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +7 -7
  612. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  613. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +5 -5
  614. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  615. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  616. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +7 -7
  617. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  618. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  619. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  620. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  621. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +7 -7
  622. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  623. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +5 -5
  624. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  625. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  626. package/app/.next-cli-build/server/app/dashboard/quota.rsc +8 -8
  627. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  628. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  629. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  630. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  631. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +8 -8
  632. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  633. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +5 -5
  634. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  635. package/app/.next-cli-build/server/app/dashboard/resource-monitor.html +1 -1
  636. package/app/.next-cli-build/server/app/dashboard/resource-monitor.rsc +7 -7
  637. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/!KGRhc2hib2FyZCk/dashboard/resource-monitor/__PAGE__.segment.rsc +2 -2
  638. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/!KGRhc2hib2FyZCk/dashboard/resource-monitor.segment.rsc +1 -1
  639. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  640. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  641. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_full.segment.rsc +7 -7
  642. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_head.segment.rsc +1 -1
  643. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_index.segment.rsc +5 -5
  644. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_tree.segment.rsc +1 -1
  645. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  646. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  647. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  648. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  649. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
  650. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  651. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  652. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +5 -5
  653. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  654. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  655. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  656. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  657. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  658. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  659. package/app/.next-cli-build/server/app/dashboard/skills.rsc +7 -7
  660. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  661. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  662. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  663. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  664. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +7 -7
  665. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  666. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +5 -5
  667. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  668. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  669. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
  670. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +1 -1
  671. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  672. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  673. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  674. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
  675. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  676. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +5 -5
  677. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  678. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  679. package/app/.next-cli-build/server/app/dashboard/translator.rsc +7 -7
  680. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  681. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  682. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  683. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  684. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +7 -7
  685. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  686. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +5 -5
  687. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  688. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  689. package/app/.next-cli-build/server/app/dashboard/usage.rsc +7 -7
  690. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  691. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  692. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  693. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  694. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +7 -7
  695. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  696. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +5 -5
  697. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  698. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  699. package/app/.next-cli-build/server/app/dashboard.rsc +7 -7
  700. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  701. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  702. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  703. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
  704. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  705. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +5 -5
  706. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  707. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  708. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  709. package/app/.next-cli-build/server/app/index.html +1 -1
  710. package/app/.next-cli-build/server/app/index.rsc +5 -5
  711. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  712. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
  713. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  714. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +5 -5
  715. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  716. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  717. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  718. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  719. package/app/.next-cli-build/server/app/landing.html +1 -1
  720. package/app/.next-cli-build/server/app/landing.rsc +5 -5
  721. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
  722. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  723. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +5 -5
  724. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  725. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  726. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  727. package/app/.next-cli-build/server/app/login/page.js +2 -2
  728. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  729. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  730. package/app/.next-cli-build/server/app/login.html +1 -1
  731. package/app/.next-cli-build/server/app/login.rsc +6 -6
  732. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
  733. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  734. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +5 -5
  735. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  736. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  737. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  738. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  739. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  740. package/app/.next-cli-build/server/app/page.js +2 -2
  741. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  742. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  743. package/app/.next-cli-build/server/app-paths-manifest.json +13 -11
  744. package/app/.next-cli-build/server/chunks/2664.js +1 -0
  745. package/app/.next-cli-build/server/chunks/2731.js +375 -0
  746. package/app/.next-cli-build/server/chunks/{3248.js → 3031.js} +2 -2
  747. package/app/.next-cli-build/server/chunks/3110.js +1 -1
  748. package/app/.next-cli-build/server/chunks/402.js +1 -1
  749. package/app/.next-cli-build/server/chunks/4746.js +1 -1
  750. package/app/.next-cli-build/server/chunks/4790.js +1 -1
  751. package/app/.next-cli-build/server/chunks/5434.js +329 -0
  752. package/app/.next-cli-build/server/chunks/5810.js +384 -0
  753. package/app/.next-cli-build/server/chunks/{9479.js → 6118.js} +1 -1
  754. package/app/.next-cli-build/server/chunks/6328.js +1 -1
  755. package/app/.next-cli-build/server/chunks/6759.js +1 -1
  756. package/app/.next-cli-build/server/chunks/6811.js +1 -1
  757. package/app/.next-cli-build/server/chunks/689.js +6 -6
  758. package/app/.next-cli-build/server/chunks/6977.js +4 -233
  759. package/app/.next-cli-build/server/chunks/8352.js +2 -2
  760. package/app/.next-cli-build/server/chunks/8491.js +2 -2
  761. package/app/.next-cli-build/server/instrumentation.js +1 -1
  762. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  763. package/app/.next-cli-build/server/middleware.js +3 -3
  764. package/app/.next-cli-build/server/pages/404.html +1 -1
  765. package/app/.next-cli-build/server/pages/500.html +1 -1
  766. package/app/.next-cli-build/static/BIH1g3Yd5VQncWi8LdEE6/_buildManifest.js +1 -0
  767. package/app/.next-cli-build/static/chunks/{5263-750f758e19269333.js → 5263-16490fa9b29bdb76.js} +1 -1
  768. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/analytics/page-614fffe896b7f62a.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/resource-monitor/{page-05d2cd8e11e930dc.js → page-5f479cc10bd09c16.js} +1 -1
  770. package/app/.next-cli-build/static/chunks/app/_global-error/page-9dd8e15354833c59.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/auth/ldap/test/route-9dd8e15354833c59.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/auth/ldap/users/route-9dd8e15354833c59.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-9dd8e15354833c59.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-9dd8e15354833c59.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-9dd8e15354833c59.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-9dd8e15354833c59.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-9dd8e15354833c59.js +1 -0
  778. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-9dd8e15354833c59.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/api/branding/[asset]/route-9dd8e15354833c59.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/api/branding/route-9dd8e15354833c59.js +1 -0
  781. package/app/.next-cli-build/static/chunks/app/api/branding/upload/route-9dd8e15354833c59.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-9dd8e15354833c59.js +1 -0
  783. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-9dd8e15354833c59.js +1 -0
  784. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/autostart/route-9dd8e15354833c59.js +1 -0
  785. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/prompt-log-db/route-9dd8e15354833c59.js +1 -0
  786. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/root-ca/route-9dd8e15354833c59.js +1 -0
  787. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-9dd8e15354833c59.js +1 -0
  788. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-9dd8e15354833c59.js +1 -0
  789. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-9dd8e15354833c59.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-9dd8e15354833c59.js +1 -0
  791. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-9dd8e15354833c59.js +1 -0
  792. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-9dd8e15354833c59.js +1 -0
  793. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-9dd8e15354833c59.js +1 -0
  794. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-9dd8e15354833c59.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-9dd8e15354833c59.js +1 -0
  796. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-9dd8e15354833c59.js +1 -0
  797. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-9dd8e15354833c59.js +1 -0
  798. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-9dd8e15354833c59.js +1 -0
  799. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-9dd8e15354833c59.js +1 -0
  800. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-9dd8e15354833c59.js +1 -0
  801. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-9dd8e15354833c59.js +1 -0
  802. package/app/.next-cli-build/static/chunks/app/api/cli-tools/qwen-settings/route-9dd8e15354833c59.js +1 -0
  803. package/app/.next-cli-build/static/chunks/app/api/cluster/config/route-9dd8e15354833c59.js +1 -0
  804. package/app/.next-cli-build/static/chunks/app/api/cluster/heartbeat/route-9dd8e15354833c59.js +1 -0
  805. package/app/.next-cli-build/static/chunks/app/api/cluster/peers/[id]/command/route-9dd8e15354833c59.js +1 -0
  806. package/app/.next-cli-build/static/chunks/app/api/cluster/peers/[id]/route-9dd8e15354833c59.js +1 -0
  807. package/app/.next-cli-build/static/chunks/app/api/cluster/peers/route-9dd8e15354833c59.js +1 -0
  808. package/app/.next-cli-build/static/chunks/app/api/cluster/snapshot/route-9dd8e15354833c59.js +1 -0
  809. package/app/.next-cli-build/static/chunks/app/api/cluster/sync/route-9dd8e15354833c59.js +1 -0
  810. package/app/.next-cli-build/static/chunks/app/api/cluster/test/route-9dd8e15354833c59.js +1 -0
  811. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-9dd8e15354833c59.js +1 -0
  812. package/app/.next-cli-build/static/chunks/app/api/combos/route-9dd8e15354833c59.js +1 -0
  813. package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/ai-models/route-9dd8e15354833c59.js +1 -0
  814. package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/analyze/route-9dd8e15354833c59.js +1 -0
  815. package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/route-9dd8e15354833c59.js +1 -0
  816. package/app/.next-cli-build/static/chunks/app/api/dashboard/combos/route-9dd8e15354833c59.js +1 -0
  817. package/app/.next-cli-build/static/chunks/app/api/dashboard/endpoint/route-9dd8e15354833c59.js +1 -0
  818. package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/[id]/route-9dd8e15354833c59.js +1 -0
  819. package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/options/route-9dd8e15354833c59.js +1 -0
  820. package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/route-9dd8e15354833c59.js +1 -0
  821. package/app/.next-cli-build/static/chunks/app/api/dashboard/token-saver/route-9dd8e15354833c59.js +1 -0
  822. package/app/.next-cli-build/static/chunks/app/api/health/route-9dd8e15354833c59.js +1 -0
  823. package/app/.next-cli-build/static/chunks/app/api/init/route-9dd8e15354833c59.js +1 -0
  824. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/caveman-test/route-9dd8e15354833c59.js +1 -0
  825. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/rotate/route-9dd8e15354833c59.js +1 -0
  826. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-9dd8e15354833c59.js +1 -0
  827. package/app/.next-cli-build/static/chunks/app/api/keys/route-9dd8e15354833c59.js +1 -0
  828. package/app/.next-cli-build/static/chunks/app/api/locale/route-9dd8e15354833c59.js +1 -0
  829. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-9dd8e15354833c59.js +1 -0
  830. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-9dd8e15354833c59.js +1 -0
  831. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-9dd8e15354833c59.js +1 -0
  832. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-9dd8e15354833c59.js +1 -0
  833. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-9dd8e15354833c59.js +1 -0
  834. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-9dd8e15354833c59.js +1 -0
  835. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-9dd8e15354833c59.js +1 -0
  836. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-9dd8e15354833c59.js +1 -0
  837. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-9dd8e15354833c59.js +1 -0
  838. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-9dd8e15354833c59.js +1 -0
  839. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-9dd8e15354833c59.js +1 -0
  840. package/app/.next-cli-build/static/chunks/app/api/models/route-9dd8e15354833c59.js +1 -0
  841. package/app/.next-cli-build/static/chunks/app/api/models/test/route-9dd8e15354833c59.js +1 -0
  842. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-9dd8e15354833c59.js +1 -0
  843. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-9dd8e15354833c59.js +1 -0
  844. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-9dd8e15354833c59.js +1 -0
  845. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-9dd8e15354833c59.js +1 -0
  846. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-9dd8e15354833c59.js +1 -0
  847. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-9dd8e15354833c59.js +1 -0
  848. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-9dd8e15354833c59.js +1 -0
  849. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-9dd8e15354833c59.js +1 -0
  850. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-9dd8e15354833c59.js +1 -0
  851. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-9dd8e15354833c59.js +1 -0
  852. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/api-key-models/route-9dd8e15354833c59.js +1 -0
  853. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/import-models/route-9dd8e15354833c59.js +1 -0
  854. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route-9dd8e15354833c59.js +1 -0
  855. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/route-9dd8e15354833c59.js +1 -0
  856. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/usage/route-9dd8e15354833c59.js +1 -0
  857. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/client/route-9dd8e15354833c59.js +1 -0
  858. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/monitor/route-9dd8e15354833c59.js +1 -0
  859. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/permissions/route-9dd8e15354833c59.js +1 -0
  860. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/route-9dd8e15354833c59.js +1 -0
  861. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/routing/route-9dd8e15354833c59.js +1 -0
  862. package/app/.next-cli-build/static/chunks/app/api/pricing/recalculate/route-9dd8e15354833c59.js +1 -0
  863. package/app/.next-cli-build/static/chunks/app/api/pricing/route-9dd8e15354833c59.js +1 -0
  864. package/app/.next-cli-build/static/chunks/app/api/provider-health/route-9dd8e15354833c59.js +1 -0
  865. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-9dd8e15354833c59.js +1 -0
  866. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-9dd8e15354833c59.js +1 -0
  867. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-9dd8e15354833c59.js +1 -0
  868. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-9dd8e15354833c59.js +1 -0
  869. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-9dd8e15354833c59.js +1 -0
  870. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-9dd8e15354833c59.js +1 -0
  871. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-9dd8e15354833c59.js +1 -0
  872. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-9dd8e15354833c59.js +1 -0
  873. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-9dd8e15354833c59.js +1 -0
  874. package/app/.next-cli-build/static/chunks/app/api/providers/route-9dd8e15354833c59.js +1 -0
  875. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-9dd8e15354833c59.js +1 -0
  876. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-9dd8e15354833c59.js +1 -0
  877. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-9dd8e15354833c59.js +1 -0
  878. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-9dd8e15354833c59.js +1 -0
  879. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-9dd8e15354833c59.js +1 -0
  880. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-9dd8e15354833c59.js +1 -0
  881. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-9dd8e15354833c59.js +1 -0
  882. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-9dd8e15354833c59.js +1 -0
  883. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-9dd8e15354833c59.js +1 -0
  884. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/[id]/route-9dd8e15354833c59.js +1 -0
  885. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/ai-models/route-9dd8e15354833c59.js +1 -0
  886. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/analyze/route-9dd8e15354833c59.js +1 -0
  887. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/history/route-9dd8e15354833c59.js +1 -0
  888. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/route-9dd8e15354833c59.js +1 -0
  889. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-9dd8e15354833c59.js +1 -0
  890. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-9dd8e15354833c59.js +1 -0
  891. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-9dd8e15354833c59.js +1 -0
  892. package/app/.next-cli-build/static/chunks/app/api/settings/route-9dd8e15354833c59.js +1 -0
  893. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-9dd8e15354833c59.js +1 -0
  894. package/app/.next-cli-build/static/chunks/app/api/tags/route-9dd8e15354833c59.js +1 -0
  895. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-9dd8e15354833c59.js +1 -0
  896. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-9dd8e15354833c59.js +1 -0
  897. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-9dd8e15354833c59.js +1 -0
  898. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-9dd8e15354833c59.js +1 -0
  899. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-9dd8e15354833c59.js +1 -0
  900. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-9dd8e15354833c59.js +1 -0
  901. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-9dd8e15354833c59.js +1 -0
  902. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-9dd8e15354833c59.js +1 -0
  903. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-9dd8e15354833c59.js +1 -0
  904. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-9dd8e15354833c59.js +1 -0
  905. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-9dd8e15354833c59.js +1 -0
  906. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-9dd8e15354833c59.js +1 -0
  907. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-9dd8e15354833c59.js +1 -0
  908. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-login/route-9dd8e15354833c59.js +1 -0
  909. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-start-daemon/route-9dd8e15354833c59.js +1 -0
  910. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-9dd8e15354833c59.js +1 -0
  911. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-9dd8e15354833c59.js +1 -0
  912. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-9dd8e15354833c59.js +1 -0
  913. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-9dd8e15354833c59.js +1 -0
  914. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-9dd8e15354833c59.js +1 -0
  915. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-9dd8e15354833c59.js +1 -0
  916. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-9dd8e15354833c59.js +1 -0
  917. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-9dd8e15354833c59.js +1 -0
  918. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-9dd8e15354833c59.js +1 -0
  919. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-9dd8e15354833c59.js +1 -0
  920. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-9dd8e15354833c59.js +1 -0
  921. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-9dd8e15354833c59.js +1 -0
  922. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-9dd8e15354833c59.js +1 -0
  923. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-9dd8e15354833c59.js +1 -0
  924. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-9dd8e15354833c59.js +1 -0
  925. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-9dd8e15354833c59.js +1 -0
  926. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-9dd8e15354833c59.js +1 -0
  927. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-9dd8e15354833c59.js +1 -0
  928. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-9dd8e15354833c59.js +1 -0
  929. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-9dd8e15354833c59.js +1 -0
  930. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-9dd8e15354833c59.js +1 -0
  931. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-9dd8e15354833c59.js +1 -0
  932. package/app/.next-cli-build/static/chunks/app/api/v1/route-9dd8e15354833c59.js +1 -0
  933. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-9dd8e15354833c59.js +1 -0
  934. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-9dd8e15354833c59.js +1 -0
  935. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-9dd8e15354833c59.js +1 -0
  936. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-9dd8e15354833c59.js +1 -0
  937. package/app/.next-cli-build/static/chunks/app/api/version/restart/route-9dd8e15354833c59.js +1 -0
  938. package/app/.next-cli-build/static/chunks/app/api/version/route-9dd8e15354833c59.js +1 -0
  939. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-9dd8e15354833c59.js +1 -0
  940. package/app/.next-cli-build/static/chunks/app/api/version/update/route-9dd8e15354833c59.js +1 -0
  941. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-9dd8e15354833c59.js +1 -0
  942. package/app/.next-cli-build/static/chunks/app/page-9dd8e15354833c59.js +1 -0
  943. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-9dd8e15354833c59.js +1 -0
  944. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-9dd8e15354833c59.js +1 -0
  945. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-9dd8e15354833c59.js +1 -0
  946. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-9dd8e15354833c59.js +1 -0
  947. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-shm +0 -0
  948. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-wal +0 -0
  949. package/app/package.json +1 -1
  950. package/package.json +1 -1
  951. package/app/.next-cli-build/static/bnvY5yHUWbTyTB23sa7Ba/_buildManifest.js +0 -1
  952. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/analytics/page-c63cf50756d71ffe.js +0 -1
  953. package/app/.next-cli-build/static/chunks/app/_global-error/page-4e0a15ae7b98e3a3.js +0 -1
  954. package/app/.next-cli-build/static/chunks/app/api/auth/ldap/test/route-4e0a15ae7b98e3a3.js +0 -1
  955. package/app/.next-cli-build/static/chunks/app/api/auth/ldap/users/route-4e0a15ae7b98e3a3.js +0 -1
  956. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-4e0a15ae7b98e3a3.js +0 -1
  957. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-4e0a15ae7b98e3a3.js +0 -1
  958. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-4e0a15ae7b98e3a3.js +0 -1
  959. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-4e0a15ae7b98e3a3.js +0 -1
  960. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-4e0a15ae7b98e3a3.js +0 -1
  961. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-4e0a15ae7b98e3a3.js +0 -1
  962. package/app/.next-cli-build/static/chunks/app/api/branding/[asset]/route-4e0a15ae7b98e3a3.js +0 -1
  963. package/app/.next-cli-build/static/chunks/app/api/branding/route-4e0a15ae7b98e3a3.js +0 -1
  964. package/app/.next-cli-build/static/chunks/app/api/branding/upload/route-4e0a15ae7b98e3a3.js +0 -1
  965. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-4e0a15ae7b98e3a3.js +0 -1
  966. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-4e0a15ae7b98e3a3.js +0 -1
  967. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/autostart/route-4e0a15ae7b98e3a3.js +0 -1
  968. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/prompt-log-db/route-4e0a15ae7b98e3a3.js +0 -1
  969. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/root-ca/route-4e0a15ae7b98e3a3.js +0 -1
  970. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-4e0a15ae7b98e3a3.js +0 -1
  971. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-4e0a15ae7b98e3a3.js +0 -1
  972. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-4e0a15ae7b98e3a3.js +0 -1
  973. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-4e0a15ae7b98e3a3.js +0 -1
  974. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-4e0a15ae7b98e3a3.js +0 -1
  975. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-4e0a15ae7b98e3a3.js +0 -1
  976. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-4e0a15ae7b98e3a3.js +0 -1
  977. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-4e0a15ae7b98e3a3.js +0 -1
  978. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-4e0a15ae7b98e3a3.js +0 -1
  979. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-4e0a15ae7b98e3a3.js +0 -1
  980. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-4e0a15ae7b98e3a3.js +0 -1
  981. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-4e0a15ae7b98e3a3.js +0 -1
  982. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-4e0a15ae7b98e3a3.js +0 -1
  983. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-4e0a15ae7b98e3a3.js +0 -1
  984. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-4e0a15ae7b98e3a3.js +0 -1
  985. package/app/.next-cli-build/static/chunks/app/api/cli-tools/qwen-settings/route-4e0a15ae7b98e3a3.js +0 -1
  986. package/app/.next-cli-build/static/chunks/app/api/cluster/config/route-4e0a15ae7b98e3a3.js +0 -1
  987. package/app/.next-cli-build/static/chunks/app/api/cluster/heartbeat/route-4e0a15ae7b98e3a3.js +0 -1
  988. package/app/.next-cli-build/static/chunks/app/api/cluster/peers/[id]/command/route-4e0a15ae7b98e3a3.js +0 -1
  989. package/app/.next-cli-build/static/chunks/app/api/cluster/peers/[id]/route-4e0a15ae7b98e3a3.js +0 -1
  990. package/app/.next-cli-build/static/chunks/app/api/cluster/peers/route-4e0a15ae7b98e3a3.js +0 -1
  991. package/app/.next-cli-build/static/chunks/app/api/cluster/snapshot/route-4e0a15ae7b98e3a3.js +0 -1
  992. package/app/.next-cli-build/static/chunks/app/api/cluster/sync/route-4e0a15ae7b98e3a3.js +0 -1
  993. package/app/.next-cli-build/static/chunks/app/api/cluster/test/route-4e0a15ae7b98e3a3.js +0 -1
  994. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-4e0a15ae7b98e3a3.js +0 -1
  995. package/app/.next-cli-build/static/chunks/app/api/combos/route-4e0a15ae7b98e3a3.js +0 -1
  996. package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/route-4e0a15ae7b98e3a3.js +0 -1
  997. package/app/.next-cli-build/static/chunks/app/api/dashboard/combos/route-4e0a15ae7b98e3a3.js +0 -1
  998. package/app/.next-cli-build/static/chunks/app/api/dashboard/endpoint/route-4e0a15ae7b98e3a3.js +0 -1
  999. package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/[id]/route-4e0a15ae7b98e3a3.js +0 -1
  1000. package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/options/route-4e0a15ae7b98e3a3.js +0 -1
  1001. package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/route-4e0a15ae7b98e3a3.js +0 -1
  1002. package/app/.next-cli-build/static/chunks/app/api/dashboard/token-saver/route-4e0a15ae7b98e3a3.js +0 -1
  1003. package/app/.next-cli-build/static/chunks/app/api/health/route-4e0a15ae7b98e3a3.js +0 -1
  1004. package/app/.next-cli-build/static/chunks/app/api/init/route-4e0a15ae7b98e3a3.js +0 -1
  1005. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/caveman-test/route-4e0a15ae7b98e3a3.js +0 -1
  1006. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/rotate/route-4e0a15ae7b98e3a3.js +0 -1
  1007. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-4e0a15ae7b98e3a3.js +0 -1
  1008. package/app/.next-cli-build/static/chunks/app/api/keys/route-4e0a15ae7b98e3a3.js +0 -1
  1009. package/app/.next-cli-build/static/chunks/app/api/locale/route-4e0a15ae7b98e3a3.js +0 -1
  1010. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-4e0a15ae7b98e3a3.js +0 -1
  1011. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-4e0a15ae7b98e3a3.js +0 -1
  1012. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-4e0a15ae7b98e3a3.js +0 -1
  1013. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-4e0a15ae7b98e3a3.js +0 -1
  1014. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-4e0a15ae7b98e3a3.js +0 -1
  1015. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-4e0a15ae7b98e3a3.js +0 -1
  1016. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-4e0a15ae7b98e3a3.js +0 -1
  1017. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-4e0a15ae7b98e3a3.js +0 -1
  1018. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-4e0a15ae7b98e3a3.js +0 -1
  1019. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-4e0a15ae7b98e3a3.js +0 -1
  1020. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-4e0a15ae7b98e3a3.js +0 -1
  1021. package/app/.next-cli-build/static/chunks/app/api/models/route-4e0a15ae7b98e3a3.js +0 -1
  1022. package/app/.next-cli-build/static/chunks/app/api/models/test/route-4e0a15ae7b98e3a3.js +0 -1
  1023. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-4e0a15ae7b98e3a3.js +0 -1
  1024. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-4e0a15ae7b98e3a3.js +0 -1
  1025. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-4e0a15ae7b98e3a3.js +0 -1
  1026. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-4e0a15ae7b98e3a3.js +0 -1
  1027. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-4e0a15ae7b98e3a3.js +0 -1
  1028. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-4e0a15ae7b98e3a3.js +0 -1
  1029. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-4e0a15ae7b98e3a3.js +0 -1
  1030. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-4e0a15ae7b98e3a3.js +0 -1
  1031. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-4e0a15ae7b98e3a3.js +0 -1
  1032. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-4e0a15ae7b98e3a3.js +0 -1
  1033. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/api-key-models/route-4e0a15ae7b98e3a3.js +0 -1
  1034. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/import-models/route-4e0a15ae7b98e3a3.js +0 -1
  1035. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route-4e0a15ae7b98e3a3.js +0 -1
  1036. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/route-4e0a15ae7b98e3a3.js +0 -1
  1037. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/usage/route-4e0a15ae7b98e3a3.js +0 -1
  1038. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/client/route-4e0a15ae7b98e3a3.js +0 -1
  1039. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/monitor/route-4e0a15ae7b98e3a3.js +0 -1
  1040. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/permissions/route-4e0a15ae7b98e3a3.js +0 -1
  1041. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/route-4e0a15ae7b98e3a3.js +0 -1
  1042. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/routing/route-4e0a15ae7b98e3a3.js +0 -1
  1043. package/app/.next-cli-build/static/chunks/app/api/pricing/recalculate/route-4e0a15ae7b98e3a3.js +0 -1
  1044. package/app/.next-cli-build/static/chunks/app/api/pricing/route-4e0a15ae7b98e3a3.js +0 -1
  1045. package/app/.next-cli-build/static/chunks/app/api/provider-health/route-4e0a15ae7b98e3a3.js +0 -1
  1046. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-4e0a15ae7b98e3a3.js +0 -1
  1047. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-4e0a15ae7b98e3a3.js +0 -1
  1048. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-4e0a15ae7b98e3a3.js +0 -1
  1049. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-4e0a15ae7b98e3a3.js +0 -1
  1050. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-4e0a15ae7b98e3a3.js +0 -1
  1051. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-4e0a15ae7b98e3a3.js +0 -1
  1052. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-4e0a15ae7b98e3a3.js +0 -1
  1053. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-4e0a15ae7b98e3a3.js +0 -1
  1054. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-4e0a15ae7b98e3a3.js +0 -1
  1055. package/app/.next-cli-build/static/chunks/app/api/providers/route-4e0a15ae7b98e3a3.js +0 -1
  1056. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-4e0a15ae7b98e3a3.js +0 -1
  1057. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-4e0a15ae7b98e3a3.js +0 -1
  1058. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-4e0a15ae7b98e3a3.js +0 -1
  1059. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-4e0a15ae7b98e3a3.js +0 -1
  1060. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-4e0a15ae7b98e3a3.js +0 -1
  1061. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-4e0a15ae7b98e3a3.js +0 -1
  1062. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-4e0a15ae7b98e3a3.js +0 -1
  1063. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-4e0a15ae7b98e3a3.js +0 -1
  1064. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-4e0a15ae7b98e3a3.js +0 -1
  1065. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/[id]/route-4e0a15ae7b98e3a3.js +0 -1
  1066. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/ai-models/route-4e0a15ae7b98e3a3.js +0 -1
  1067. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/analyze/route-4e0a15ae7b98e3a3.js +0 -1
  1068. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/history/route-4e0a15ae7b98e3a3.js +0 -1
  1069. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/route-4e0a15ae7b98e3a3.js +0 -1
  1070. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-4e0a15ae7b98e3a3.js +0 -1
  1071. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-4e0a15ae7b98e3a3.js +0 -1
  1072. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-4e0a15ae7b98e3a3.js +0 -1
  1073. package/app/.next-cli-build/static/chunks/app/api/settings/route-4e0a15ae7b98e3a3.js +0 -1
  1074. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-4e0a15ae7b98e3a3.js +0 -1
  1075. package/app/.next-cli-build/static/chunks/app/api/tags/route-4e0a15ae7b98e3a3.js +0 -1
  1076. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-4e0a15ae7b98e3a3.js +0 -1
  1077. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-4e0a15ae7b98e3a3.js +0 -1
  1078. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-4e0a15ae7b98e3a3.js +0 -1
  1079. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-4e0a15ae7b98e3a3.js +0 -1
  1080. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-4e0a15ae7b98e3a3.js +0 -1
  1081. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-4e0a15ae7b98e3a3.js +0 -1
  1082. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-4e0a15ae7b98e3a3.js +0 -1
  1083. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-4e0a15ae7b98e3a3.js +0 -1
  1084. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-4e0a15ae7b98e3a3.js +0 -1
  1085. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-4e0a15ae7b98e3a3.js +0 -1
  1086. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-4e0a15ae7b98e3a3.js +0 -1
  1087. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-4e0a15ae7b98e3a3.js +0 -1
  1088. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-4e0a15ae7b98e3a3.js +0 -1
  1089. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-login/route-4e0a15ae7b98e3a3.js +0 -1
  1090. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-start-daemon/route-4e0a15ae7b98e3a3.js +0 -1
  1091. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-4e0a15ae7b98e3a3.js +0 -1
  1092. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-4e0a15ae7b98e3a3.js +0 -1
  1093. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-4e0a15ae7b98e3a3.js +0 -1
  1094. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-4e0a15ae7b98e3a3.js +0 -1
  1095. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-4e0a15ae7b98e3a3.js +0 -1
  1096. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-4e0a15ae7b98e3a3.js +0 -1
  1097. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-4e0a15ae7b98e3a3.js +0 -1
  1098. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-4e0a15ae7b98e3a3.js +0 -1
  1099. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-4e0a15ae7b98e3a3.js +0 -1
  1100. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-4e0a15ae7b98e3a3.js +0 -1
  1101. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-4e0a15ae7b98e3a3.js +0 -1
  1102. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-4e0a15ae7b98e3a3.js +0 -1
  1103. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-4e0a15ae7b98e3a3.js +0 -1
  1104. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-4e0a15ae7b98e3a3.js +0 -1
  1105. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-4e0a15ae7b98e3a3.js +0 -1
  1106. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-4e0a15ae7b98e3a3.js +0 -1
  1107. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-4e0a15ae7b98e3a3.js +0 -1
  1108. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-4e0a15ae7b98e3a3.js +0 -1
  1109. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-4e0a15ae7b98e3a3.js +0 -1
  1110. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-4e0a15ae7b98e3a3.js +0 -1
  1111. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-4e0a15ae7b98e3a3.js +0 -1
  1112. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-4e0a15ae7b98e3a3.js +0 -1
  1113. package/app/.next-cli-build/static/chunks/app/api/v1/route-4e0a15ae7b98e3a3.js +0 -1
  1114. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-4e0a15ae7b98e3a3.js +0 -1
  1115. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-4e0a15ae7b98e3a3.js +0 -1
  1116. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-4e0a15ae7b98e3a3.js +0 -1
  1117. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-4e0a15ae7b98e3a3.js +0 -1
  1118. package/app/.next-cli-build/static/chunks/app/api/version/restart/route-4e0a15ae7b98e3a3.js +0 -1
  1119. package/app/.next-cli-build/static/chunks/app/api/version/route-4e0a15ae7b98e3a3.js +0 -1
  1120. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-4e0a15ae7b98e3a3.js +0 -1
  1121. package/app/.next-cli-build/static/chunks/app/api/version/update/route-4e0a15ae7b98e3a3.js +0 -1
  1122. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-4e0a15ae7b98e3a3.js +0 -1
  1123. package/app/.next-cli-build/static/chunks/app/page-4e0a15ae7b98e3a3.js +0 -1
  1124. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-4e0a15ae7b98e3a3.js +0 -1
  1125. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-4e0a15ae7b98e3a3.js +0 -1
  1126. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-4e0a15ae7b98e3a3.js +0 -1
  1127. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-4e0a15ae7b98e3a3.js +0 -1
  1128. /package/app/.next-cli-build/static/{bnvY5yHUWbTyTB23sa7Ba → BIH1g3Yd5VQncWi8LdEE6}/_ssgManifest.js +0 -0
  1129. /package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-5.1.57-to-5.1.58-5.1.58-20260722-113541 → upgrade-5.1.61-to-5.1.62-5.1.62-20260722-130430}/data.sqlite +0 -0
@@ -0,0 +1,329 @@
1
+ "use strict";exports.id=5434,exports.ids=[5434,9614],exports.modules={9588:(a,b,c)=>{c.d(b,{I8:()=>j,Tv:()=>u,UX:()=>o,aV:()=>n,bz:()=>q,hH:()=>t,oW:()=>s,s0:()=>l,ub:()=>m,vZ:()=>p});var d=c(65573),e=c(23211),f=c(89718),g=c(33792),h=c(90389);function i(a){return String(a||"").trim().toLowerCase()}function j(a){return i(a)}function k(a={}){return[a.ldapUsername,a.ldapEmail,a.ldapName,a.oidcEmail,a.oidcName,a.localUsername,a.username,a.email].map(i).filter(Boolean)}function l(a={}){let b=k(a),c=b[0]||"local",d=a.ldapName||a.ldapEmail||a.oidcName||a.oidcEmail||a.localUsername||c;return{userId:c,displayName:d,loginMethod:a.oidc?"OIDC":a.ldap?"LDAP":"Local",candidates:b}}function m(a={},b={}){var c;if(!b?.authenticated)return!1;if(b.local||!b.ldap&&!b.oidc||b.role===h.hS.ADMIN||!0===b.ldapIsAdmin)return!0;let d=Array.isArray(c=a.ldapAllowedUsers)?c.map(i).filter(Boolean):String(c||"").split(/[,\n]/).map(i).filter(Boolean);return 0!==d.length&&k(b).some(a=>d.includes(a))}function n(a={},b={}){return!(!b?.authenticated||m(a,b))&&(b.role===h.hS.MONITOR_ADMIN||!0===b.ldapIsMonitorAdmin)}function o(a={},b={}){return!(!b?.authenticated||m(a,b)||n(a,b))&&(b.role===h.hS.AI_GATEWAYS_MONITOR||!0===b.ldapIsAiGatewaysMonitor)}function p(a={},b={}){return b?.authenticated?m(a,b)?h.hS.ADMIN:n(a,b)?h.hS.MONITOR_ADMIN:o(a,b)?h.hS.AI_GATEWAYS_MONITOR:h.hS.USER:h.hS.GUEST}function q(a={}){return!0===a.isAdmin||!0===a.isMonitorAdmin}async function r(){let a=await (0,f.mt)(),b=await (0,d.UL)(),c=await (0,g.dY)(b.get("auth_token")?.value);if(!c?.authenticated)return{authenticated:!1,isAdmin:!1,isMonitorAdmin:!1,isAiGatewaysMonitor:!1,role:h.hS.GUEST,userId:"",displayName:"Guest",loginMethod:"None",settings:{...a,requireLogin:!0},session:null};let e=l(c||{}),i=p(a,c||{}),j=i===h.hS.ADMIN,k=i===h.hS.MONITOR_ADMIN,m=i===h.hS.AI_GATEWAYS_MONITOR;return{authenticated:!0,isAdmin:j,isMonitorAdmin:k,isAiGatewaysMonitor:m,role:i,canManageApiKeys:j||k,canUseMonitorAdminTabs:j||k,canViewAllAnalytics:j||k||m,...e,settings:{...a,requireLogin:!0},session:c}}async function s(){let a=await r();return a.authenticated?{access:a,response:null}:{access:a,response:e.NextResponse.json({error:"Authentication required"},{status:401})}}async function t(a={}){let{allowMonitorAdmin:b=!1}=a||{},{access:c,response:d}=await s();return d?{access:c,response:d}:c.isAdmin||b&&c.isMonitorAdmin?{access:c,response:null}:{access:c,response:e.NextResponse.json({error:"Admin access required"},{status:403})}}function u(a,b){if(!a?.authenticated||!b)return!1;if(q(a))return!0;let c=i(a.userId),d=i(b.ownerUser),e=i(b.createdByUser);return!!c&&(d===c||e===c)}},19225:(a,b,c)=>{a.exports=c(44870)},33792:(a,b,c)=>{c.d(b,{Dc:()=>p,OZ:()=>s,YK:()=>n,dY:()=>q,tm:()=>r});var d=c(86935),e=c(69614),f=c(73024),g=c.n(f),h=c(76760),i=c.n(h),j=c(77598),k=c.n(j),l=c(49120);let m=new TextEncoder().encode(function(){if(process.env.JWT_SECRET)return process.env.JWT_SECRET;let a=i().join(l.DATA_DIR,"jwt-secret");try{return g().readFileSync(a,"utf8").trim()}catch{}g().mkdirSync(l.DATA_DIR,{recursive:!0});let b=k().randomBytes(32).toString("hex");return g().writeFileSync(a,b,{mode:384}),b}());function n(a){let b="true"===process.env.AUTH_COOKIE_SECURE,c=a?.headers?.get?.("x-forwarded-proto");return b||"https"===c}async function o(a={}){return new d.P({authenticated:!0,...a}).setProtectedHeader({alg:"HS256"}).setIssuedAt().setExpirationTime("86400s").sign(m)}async function p(a){if(!a)return!1;try{return await (0,e.V)(a,m),!0}catch{return!1}}async function q(a){if(!a)return null;try{let{payload:b}=await (0,e.V)(a,m);return b}catch{return null}}async function r(a,b,c={}){let d=await o(c);a.set("auth_token",d,{httpOnly:!0,secure:n(b),sameSite:"lax",path:"/",maxAge:86400})}function s(a){a.delete("auth_token")}},38360:(a,b,c)=>{c.d(b,{kC:()=>aQ,b2:()=>aY});var d=c(36366),e=c(644),f=c(45903),g=c(97242);let h=new Set;function i(a){return String(a||"").trim()}function j(a,b=0){let c=Number(a);return Number.isFinite(c)?c:b}async function k(){return(0,f.I6)(await (0,f.L7)())}async function l(a){let b=new(await Promise.resolve().then(c.bind(c,64939))).Client({host:a.host,port:Number(a.port||5432),database:a.database,user:a.username,password:a.password,ssl:!!a.ssl&&{rejectUnauthorized:!1}});return await b.connect(),{type:"postgres",query:async(a,c=[])=>(await b.query(a,c)).rows,queryOne:async(a,c=[])=>(await b.query(a,c)).rows[0]||null,async exec(a,c=[]){await b.query(a,c)},async close(){await b.end()}}}function m(a){if("string"!=typeof a||!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/.test(a))return a;let b=new Date(a);return Number.isNaN(b.getTime())?a:b.toISOString().slice(0,23).replace("T"," ")}async function n(a){let b=await c.e(8491).then(c.t.bind(c,38491,19)),d=await b.createConnection({host:a.host,port:Number(a.port||3306),database:a.database,user:a.username,password:a.password,ssl:a.ssl?{}:void 0,dateStrings:!0,connectTimeout:3e3});return{type:"mysql",async query(a,b=[]){let[c]=await d.query(a,((a=[])=>a.map(m))(b));return c},async queryOne(a,b=[]){let[c]=await d.query(a,((a=[])=>a.map(m))(b));return c[0]||null},async exec(a,b=[]){await d.query(a,((a=[])=>a.map(m))(b))},async close(){await d.end()}}}async function o(a){if("postgres"===a.type)return l(a);if("mysql"===a.type)return n(a);throw Error(`Unsupported prompt log database type: ${a.type}`)}async function p(a){let b=await o(a);try{if("mysql"===a.type){let a=await b.query("SHOW INDEX FROM prompt_logs WHERE Key_name = 'idx_prompt_logs_created_at'").catch(()=>[]);a&&0!==a.length||await b.exec("CREATE INDEX idx_prompt_logs_created_at ON prompt_logs (created_at)")}else await b.exec("CREATE INDEX IF NOT EXISTS idx_prompt_logs_created_at ON prompt_logs (created_at)")}finally{await b.close()}}async function q(a){if(!a.enabled)return;let b=`${a.type}:${a.host||""}:${a.port||""}:${a.database||""}`;if(!h.has(b))try{await p(a),h.add(b)}catch(a){console.warn("[prompt-log-analytics] Unable to ensure indexes:",a?.message||a)}}async function r(a,b,c,d,e=50){let f=Math.max(1,Math.min(500,Number(e)||50));return await a.query(`SELECT ${c},
2
+ COUNT(*) AS requests,
3
+ SUM(CASE WHEN error_text IS NOT NULL AND error_text <> '' THEN 1
4
+ WHEN status_code IS NOT NULL AND CONCAT('', status_code) NOT LIKE '2%' THEN 1
5
+ ELSE 0 END) AS errors,
6
+ SUM(CASE WHEN (error_text IS NULL OR error_text = '') AND (status_code IS NULL OR CONCAT('', status_code) LIKE '2%') THEN 1 ELSE 0 END) AS success,
7
+ MAX(created_at) AS lastSeen
8
+ FROM prompt_logs
9
+ ${b.clause}
10
+ GROUP BY ${d}
11
+ ORDER BY requests DESC, errors DESC, lastSeen DESC
12
+ LIMIT ${f}`,b.params)}function s(a,b=null){return(a||[]).map(a=>(function(a={},b={}){let c=j(a.requests,0),d=j(a.errors,0),e=j(a.success,Math.max(0,c-d));return{key:i(a.key??a.metric_key)||"unknown",label:i(a.label||a.key||a.metric_key)||"unknown",requests:c,success:e,errors:d,errorRate:c?d/c:0,promptTokens:0,completionTokens:0,totalTokens:0,cost:0,lastSeen:i(a.lastSeen),topModels:[],topTools:[],topIps:[],...b}})(a,b?b(a):{}))}let t={createdAt:0,data:null,promise:null};async function u(){return t.promise?t.promise:t.data&&Date.now()-t.createdAt<6e5?t.data:(t.promise=(0,g.DU)().then(a=>(t={createdAt:Date.now(),data:a,promise:null},a)).catch(()=>(t.promise=null,t.data||{models:[],stages:[]})),t.promise)}async function v(a,b){let c=a.type,d=[await o(a)];try{let e=await Promise.all(Array.from({length:3},()=>o(a).catch(()=>null)));d.push(...e.filter(Boolean));let f=a=>d[a%d.length],g=function(a={},b){let c=function(a={}){return{keyword:i(a.keyword),model:i(a.model),stage:i(a.stage),sessionId:i(a.sessionId),clientIp:i(a.clientIp||a.sourceIp),sourceTool:i(a.sourceTool),dateFrom:i(a.dateFrom||a.startStored||a.startIso),dateTo:i(a.dateTo||a.endStored||a.endIso),workingTimeRanges:Array.isArray(a.workingTimeRanges)?a.workingTimeRanges:[]}}(a),d=[],e=[],f=a=>(e.push(a),"postgres"===b?`$${e.length}`:"?"),g="postgres"===b?"ILIKE":"LIKE";if(c.keyword){let a=`%${c.keyword}%`;d.push(`(${["prompt_text","response_text","error_text","model","endpoint","provider","account_name","connection_id","display_model","session_id","client_ip","client_host","client_user_agent","source_tool","source_tool_label","source_host"].map(b=>`${b} ${g} ${f(a)}`).join(" OR ")})`)}if(c.model&&d.push(`(model = ${f(c.model)} OR display_model = ${f(c.model)})`),c.stage&&d.push(`stage = ${f(c.stage)}`),c.sessionId&&d.push(`session_id = ${f(c.sessionId)}`),c.clientIp&&d.push(`client_ip ${g} ${f(`%${c.clientIp}%`)}`),c.sourceTool){let a=`%${c.sourceTool}%`;d.push(`(source_tool ${g} ${f(a)} OR source_tool_label ${g} ${f(a)} OR source_host ${g} ${f(a)})`)}let h=c.workingTimeRanges.filter(a=>a?.startIso&&a?.endIso);return h.length?d.push(`(${h.map(a=>`(created_at >= ${f(a.startIso)} AND created_at < ${f(a.endIso)})`).join(" OR ")})`):(c.dateFrom&&d.push(`created_at >= ${f(c.dateFrom)}`),c.dateTo&&d.push(`created_at < ${f(c.dateTo)}`)),{clause:d.length?`WHERE ${d.join(" AND ")}`:"",params:e,add:f}}(b,c),[h,k,l,m,n,p,q,t,v]=await Promise.all([f(0).queryOne(`SELECT COUNT(*) AS count FROM prompt_logs ${g.clause}`,g.params),r(f(1),g,"COALESCE(NULLIF(client_ip, ''), 'unknown') AS metric_key, COALESCE(NULLIF(client_ip, ''), 'unknown') AS label","COALESCE(NULLIF(client_ip, ''), 'unknown')"),r(f(2),g,"COALESCE(NULLIF(source_tool_label, ''), NULLIF(source_tool, ''), NULLIF(source_host, ''), 'unknown') AS metric_key, COALESCE(NULLIF(source_tool_label, ''), NULLIF(source_tool, ''), NULLIF(source_host, ''), 'unknown') AS label","COALESCE(NULLIF(source_tool_label, ''), NULLIF(source_tool, ''), NULLIF(source_host, ''), 'unknown')"),r(f(3),g,"COALESCE(NULLIF(session_id, ''), 'unknown') AS metric_key, COALESCE(NULLIF(session_id, ''), 'unknown') AS label","COALESCE(NULLIF(session_id, ''), 'unknown')"),r(f(0),g,"COALESCE(NULLIF(stage, ''), 'unknown') AS metric_key, COALESCE(NULLIF(stage, ''), 'unknown') AS label","COALESCE(NULLIF(stage, ''), 'unknown')"),r(f(1),g,"COALESCE(NULLIF(display_model, ''), NULLIF(model, ''), 'unknown') AS metric_key, COALESCE(NULLIF(display_model, ''), NULLIF(model, ''), 'unknown') AS label","COALESCE(NULLIF(display_model, ''), NULLIF(model, ''), 'unknown')"),r(f(2),g,"COALESCE(NULLIF(account_name, ''), NULLIF(connection_id, ''), NULLIF(provider, ''), 'unknown') AS metric_key, COALESCE(NULLIF(account_name, ''), NULLIF(connection_id, ''), NULLIF(provider, ''), 'unknown') AS label","COALESCE(NULLIF(account_name, ''), NULLIF(connection_id, ''), NULLIF(provider, ''), 'unknown')"),r(f(3),g,"CASE WHEN error_text IS NOT NULL AND error_text <> '' THEN 'error' ELSE COALESCE(CONCAT('', status_code), 'ok') END AS metric_key, CASE WHEN error_text IS NOT NULL AND error_text <> '' THEN 'error' ELSE COALESCE(CONCAT('', status_code), 'ok') END AS label","CASE WHEN error_text IS NOT NULL AND error_text <> '' THEN 'error' ELSE COALESCE(CONCAT('', status_code), 'ok') END"),u()]),w=j(h?.count,0),x=s(k),y=s(l),z=s(m),A=s(n),B=s(p),C=s(q),D=s(t);return{total:w,sampled:w,disabled:!1,missing:!1,dbInfo:{type:a.type,host:a.host,database:a.database},models:v.models||[],stages:v.stages||[],topClientIps:x,topSourceTools:y,topSessions:z,topStages:A,topModels:B,topAccounts:C,topStatuses:D}}finally{await Promise.all(d.map(a=>a.close().catch(()=>{})))}}async function w(a={}){let b=await k();if(!b.enabled)return{disabled:!0,missing:!1,total:0,sampled:0,dbInfo:{type:b.type},models:[],stages:[],topClientIps:[],topSourceTools:[],topSessions:[],topStages:[],topModels:[],topAccounts:[],topStatuses:[]};if(await q(b),"postgres"===b.type||"mysql"===b.type)return v(b,a);throw Error(`Unsupported prompt log database type: ${b.type}`)}var x=c(35901),y=c(77638);let z=new Set(["today","todayWorking","yesterday","yesterdayWorking","24h","thisWeek","lastWeek","7d","thisMonth","lastMonth","30d","60d","all","custom"]),A="today",B=process.env.DASHBOARD_ANALYTICS_TIME_ZONE||"Asia/Saigon",C=["Token Destroyer","Context Monarch","Prompt Titan","Output Overlord","Quota Crusher"],D="lower(trim(COALESCE(CAST(status AS TEXT), '')))",E=`(
13
+ ${D} GLOB 'error*'
14
+ OR ${D} GLOB 'fail*'
15
+ OR ${D} GLOB 'failed*'
16
+ OR ${D} GLOB 'timeout*'
17
+ OR ${D} GLOB 'network*'
18
+ OR ${D} GLOB 'aborted*'
19
+ OR ${D} GLOB 'abort*'
20
+ OR ${D} GLOB 'rate_limited*'
21
+ OR ${D} GLOB 'provider_error*'
22
+ OR ${D} GLOB 'gateway_error*'
23
+ OR ${D} GLOB 'parse_error*'
24
+ OR ${D} GLOB 'model_error*'
25
+ )`,F=`(
26
+ (COALESCE(statusCode, 0) BETWEEN 200 AND 299 AND NOT ${E})
27
+ OR ${D} = ''
28
+ OR ${D} IN ('ok', 'success', 'succeeded', 'complete', 'completed', 'done', '200')
29
+ OR ${D} GLOB '2[0-9][0-9]*'
30
+ OR ${D} GLOB 'ok*'
31
+ OR ${D} GLOB 'success*'
32
+ OR ${D} GLOB 'succeeded*'
33
+ OR ${D} GLOB 'complete*'
34
+ OR ${D} GLOB 'completed*'
35
+ OR ${D} GLOB 'done*'
36
+ )`,G=`(
37
+ ${D} IN ('pending', 'running', 'in_progress', 'queued', 'processing')
38
+ )`,H=`(NOT ${G})`,I=`
39
+ SUM(CASE WHEN ${H} THEN 1 ELSE 0 END) AS requests,
40
+ SUM(CASE WHEN ${H} AND ${F} THEN 1 ELSE 0 END) AS success,
41
+ SUM(CASE WHEN ${H} AND NOT ${F} THEN 1 ELSE 0 END) AS errors,
42
+ SUM(CASE WHEN ${G} THEN 1 ELSE 0 END) AS pending,
43
+ COALESCE(SUM(CASE WHEN ${H} THEN COALESCE(promptTokens, 0) ELSE 0 END), 0) AS promptTokens,
44
+ COALESCE(SUM(CASE WHEN ${H} THEN COALESCE(completionTokens, 0) ELSE 0 END), 0) AS completionTokens,
45
+ COALESCE(SUM(CASE WHEN ${H} THEN COALESCE(promptTokens, 0) + COALESCE(completionTokens, 0) ELSE 0 END), 0) AS totalTokens,
46
+ COALESCE(SUM(CASE WHEN ${H} THEN COALESCE(cachedTokens, 0) ELSE 0 END), 0) AS cachedTokens,
47
+ COALESCE(SUM(CASE WHEN ${H} THEN COALESCE(reasoningTokens, 0) ELSE 0 END), 0) AS reasoningTokens,
48
+ COALESCE(SUM(CASE WHEN ${H} THEN COALESCE(cost, 0) ELSE 0 END), 0) AS cost,
49
+ MAX(timestamp) AS lastSeen
50
+ `;function J(a){return String(a||"").trim()}function K(a){return J(a).toLowerCase()}function L(a,b=0){let c=Number(a);return Number.isFinite(c)?c:b}function M(a){let b=J(a);if(!b)return"";let c=new Date(b);return Number.isNaN(c.getTime())?"":c.toISOString()}function N(a,b){let c=new Intl.DateTimeFormat("en-CA",{timeZone:b,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).formatToParts(a),d={};for(let a of c)"literal"!==a.type&&(d[a.type]=Number(a.value));return d}function O(a,b){let c=N(a,b);return Date.UTC(c.year,c.month-1,c.day,c.hour,c.minute,c.second||0)-a.getTime()}function P(a,b,c,d,e=0,f=0,g=0,h=0){let i=new Date(Date.UTC(b,c-1,d,e,f,g,h)),j=O(i,a);return j=O(i=new Date(i.getTime()-j),a),new Date(Date.UTC(b,c-1,d,e,f,g,h)-j)}function Q(a,b){let c=N(a,b);return{year:c.year,month:c.month,day:c.day}}function R(a,b){return[{from:[8,0],to:[12,0]},{from:[13,15],to:[17,15]}].map(c=>{let d=P(b,a.year,a.month,a.day,c.from[0],c.from[1]),e=P(b,a.year,a.month,a.day,c.to[0],c.to[1]);return{start:d,end:e,startIso:d.toISOString(),endIso:e.toISOString()}})}function S(a=new Date){let b=new Date(a);return b.setHours(0,0,0,0),b}function T(a,b){let c=new Date(a);return c.setDate(c.getDate()+b),c}function U(a=new Date){let b=S(a),c=b.getDay();return T(b,0===c?-6:1-c)}function V(a=new Date){let b=new Date(a);return b.setDate(1),b.setHours(0,0,0,0),b}function W(a={}){var b;return{...function(a={}){let b=z.has(a.period)?a.period:"24h",c=function(a){let b=J(a);if(!b)return"UTC";try{return new Intl.DateTimeFormat("en-US",{timeZone:b}).format(new Date),b}catch{return"UTC"}}(a.timeZone),d=new Date(3e4*Math.floor(Date.now()/3e4)),e=null,f=d,g=[];if("custom"===b){let b=M(a.dateFrom),c=M(a.dateTo);e=new Date(b||d.getTime()-864e5),f=c?new Date(c):d}else if("today"===b)e=S(d);else if("todayWorking"===b)g=R(Q(d,c),c),e=g[0]?.start||S(d),f=g[g.length-1]?.end||d;else if("yesterday"===b){let a=S(d);e=T(a,-1),f=a}else if("yesterdayWorking"===b)g=R(function({year:a,month:b,day:c}){let d=new Date(Date.UTC(a,b-1,c));return d.setUTCDate(d.getUTCDate()+-1),{year:d.getUTCFullYear(),month:d.getUTCMonth()+1,day:d.getUTCDate()}}(Q(d,c)),c),e=g[0]?.start||T(S(d),-1),f=g[g.length-1]?.end||S(d);else if("24h"===b)e=new Date(d.getTime()-864e5);else if("thisWeek"===b)e=U(d);else if("lastWeek"===b){let a=U(d);e=T(a,-7),f=a}else if("7d"===b)e=new Date(d.getTime()-6048e5);else if("thisMonth"===b)e=V(d);else if("lastMonth"===b){let a=V(d);(e=new Date(a)).setMonth(e.getMonth()-1),f=a}else e="30d"===b?new Date(d.getTime()-2592e6):new Date(d.getTime()-5184e6);if(e&&f&&e>f){let a=e;e=f,f=a}return{period:b,timeZone:c,start:e,end:f,startIso:e?e.toISOString():"",endIso:f?f.toISOString():"",workingTimeRanges:g}}(a),provider:J(a.provider),model:J(a.model),connectionId:J(a.connectionId),status:J(a.status),endpoint:J(a.endpoint),apiKey:J(a.apiKey),clientIp:J(a.clientIp||a.sourceIp),sourceTool:J(a.sourceTool),sessionId:J(a.sessionId),keyword:J(a.keyword),maxPromptLogRows:Math.max(200,Math.min(1500,Math.floor(L(a.maxPromptLogRows,1500)))),userOwnedOnly:!0===a.userOwnedOnly||"1"===a.userOwnedOnly||"true"===a.userOwnedOnly,ownerCandidates:Array.isArray(b=a.ownerCandidates)?[...new Set(b.map(a=>K(a)).filter(Boolean))]:[...new Set(String(b||"").split(/[,\s]+/).map(a=>K(a)).filter(Boolean))],ownedAnyUserOnly:!0===a.ownedAnyUserOnly||"1"===a.ownedAnyUserOnly||"true"===a.ownedAnyUserOnly}}function X(a){let b,c=J(a);return c?(b=J(c))?b.length<=12?b:`${b.slice(0,8)}...${b.slice(-4)}`:"local-no-key":"local-no-key"}async function Y(a){try{let b=await a.all("SELECT * FROM apiKeys ORDER BY createdAt DESC")||[],c=new Map,d=new Map,e=[];for(let a of b){let b=function(a={}){let b=J(a.key),c=X(b);return{id:J(a.id),key:b,fingerprint:c,masked:c,name:J(a.name)||c,ownerUser:J(a.ownerUser||a.owner_user),createdByUser:J(a.createdByUser||a.created_by_user),machineId:J(a.machineId||a.machine_id),isActive:void 0===a.isActive||1===a.isActive||!0===a.isActive,createdAt:J(a.createdAt||a.created_at)}}(a);e.push(b),b.key&&c.set(b.key,b),d.set(b.fingerprint,b)}return{rows:b,all:e,byKey:c,byFingerprint:d}}catch{return{rows:[],all:[],byKey:new Map,byFingerprint:new Map}}}async function Z(a){let b=new Map;try{for(let c of await a.all("SELECT id, provider, name, email, isActive FROM providerConnections")||[])b.set(c.id,{id:c.id,provider:c.provider||"",name:c.name||c.email||c.id,email:c.email||"",isActive:1===c.isActive||!0===c.isActive})}catch{}try{for(let c of await a.all("SELECT id, type, name FROM providerNodes")||[]){let a=J(c.id);if(!a)continue;let d=J(c.name)||a;b.set(a,{id:a,provider:a,type:J(c.type),name:d,isProviderNode:!0})}}catch{}return b}function $(a,b=new Map){let c=J(a);if(!c)return"unknown";let d=b.get(c);if(d?.name)return d.name;let e=[...b.values()].filter(a=>a.provider===c&&a.name&&a.name!==c);return 1===e.length?e[0].name:c}function _(a){let b=L(a.errors,0),c=L(a.success,0),d=L(a.pending,0),e=L(a.requests,c+b),f=L(a.promptTokens,0),g=L(a.completionTokens,0),h=L(a.totalTokens,f+g),i=c+b||e;return{...a,requests:e,success:c,errors:b,pending:d,totalTokens:h,errorRate:i?b/i:0,avgPromptTokens:e?f/e:0,avgCompletionTokens:e?g/e:0,avgTokens:e?h/e:0}}function aa(a,b,c,d,e=!1){let f=Array.isArray(d.workingTimeRanges)?d.workingTimeRanges.filter(a=>a?.startIso&&a?.endIso):[];if(f.length){let d=e?"<=":"<";for(let e of(a.push(`(${f.map(()=>`(${c} >= ? AND ${c} ${d} ?)`).join(" OR ")})`),f))b.push(e.startIso,e.endIso);return}d.startIso&&(a.push(`${c} >= ?`),b.push(d.startIso)),d.endIso&&(a.push(`${c} ${e?"<=":"<"} ?`),b.push(d.endIso))}function ab(a,b=null,c={}){let d=[],e=[];if(aa(d,e,"timestamp",a,!1),a.provider&&"provider"!==c.skip&&(d.push("provider = ?"),e.push(a.provider)),a.model&&"model"!==c.skip&&(d.push("model = ?"),e.push(a.model)),a.connectionId&&"connectionId"!==c.skip&&(d.push("connectionId = ?"),e.push(a.connectionId)),a.status&&"status"!==c.skip&&(d.push("status = ?"),e.push(a.status)),a.endpoint&&"endpoint"!==c.skip&&(d.push("endpoint = ?"),e.push(a.endpoint)),b&&"apiKey"!==c.skip)if(b.noMatch)d.push("1 = 0");else{let a=[];if((b.keys||[]).length>0){let c=b.keys.map(()=>"?").join(", ");a.push(`(apiKey IN (${c}) OR apiKeyFingerprint IN (${c}) OR apiKeyId IN (${c}))`),e.push(...b.keys,...b.keys,...b.keys)}if(b.filter){a.push("(apiKeyFingerprint LIKE ? OR apiKeyName LIKE ? OR apiKeyOwner LIKE ? OR apiKeyId LIKE ?)");let c=`%${b.filter}%`;e.push(c,c,c,c)}b.includeLocal&&a.push("(apiKey IS NULL OR apiKey = '' OR apiKeyFingerprint = 'local-no-key')"),a.length&&d.push(`(${a.join(" OR ")})`)}let f=a.ownerScope;if(f?.enabled&&"apiKey"!==c.skip)if(f.noMatch)d.push("1 = 0");else{let a=[];if((f.identifiers||[]).length>0){let b=f.identifiers.map(()=>"?").join(", ");a.push(`(apiKey IN (${b}) OR apiKeyFingerprint IN (${b}) OR apiKeyId IN (${b}))`),e.push(...f.identifiers,...f.identifiers,...f.identifiers)}if((f.owners||[]).length>0){let b=f.owners.map(()=>"?").join(", ");a.push(`lower(COALESCE(apiKeyOwner, '')) IN (${b})`),e.push(...f.owners)}d.push(a.length?`(${a.join(" OR ")})`:"1 = 0")}if(a.clientIp&&"clientIp"!==c.skip&&(d.push("clientIpNormalized LIKE ?"),e.push(`%${a.clientIp}%`)),a.sourceTool&&"sourceTool"!==c.skip){d.push("(sourceTool LIKE ? OR sourceToolLabel LIKE ? OR sourceHost LIKE ?)");let b=`%${a.sourceTool}%`;e.push(b,b,b)}return a.sessionId&&"sessionId"!==c.skip&&(d.push("sessionId = ?"),e.push(a.sessionId)),{clause:d.length?`WHERE ${d.join(" AND ")}`:"",params:e}}function ac(a,b){return Math.floor(a/b)*b}async function ad(a,b,c){let d=ab(b,c);return await a.get(`SELECT MIN(timestamp) AS minTs, MAX(timestamp) AS maxTs FROM usageHistory ${d.clause}`,d.params)||{}}async function ae(a,b,c){let d=ab(b,c),e=await a.get(`SELECT
51
+ ${I},
52
+ COUNT(DISTINCT COALESCE(NULLIF(apiKeyId, ''), NULLIF(apiKeyFingerprint, ''), NULLIF(apiKey, ''))) AS activeApiKeys,
53
+ COUNT(DISTINCT NULLIF(provider, '')) AS activeProviders,
54
+ COUNT(DISTINCT NULLIF(model, '')) AS activeModels,
55
+ COUNT(DISTINCT NULLIF(endpoint, '')) AS activeEndpoints
56
+ FROM usageHistory
57
+ ${d.clause}`,d.params)||{},f=function(a={}){return _({requests:L(a.requests,0),success:L(a.success,0),errors:L(a.errors,0),pending:L(a.pending,0),promptTokens:L(a.promptTokens,0),completionTokens:L(a.completionTokens,0),totalTokens:L(a.totalTokens,0),cachedTokens:L(a.cachedTokens,0),reasoningTokens:L(a.reasoningTokens,0),cost:L(a.cost,0),lastSeen:a.lastSeen||""})}(e),g=b.start&&b.end?Math.max(1,(b.end.getTime()-b.start.getTime())/6e4):1;return{...f,activeApiKeys:L(e.activeApiKeys,0),activeProviders:L(e.activeProviders,0),activeModels:L(e.activeModels,0),activeEndpoints:L(e.activeEndpoints,0),requestsPerMinute:f.requests/g,tokensPerMinute:f.totalTokens/g,inputOutputRatio:f.completionTokens?f.promptTokens/f.completionTokens:f.promptTokens?null:0}}function af(a,b={}){return _({key:J(a.key)||"unknown",label:J(a.label||a.key)||"unknown",requests:L(a.requests,0),success:L(a.success,0),errors:L(a.errors,0),pending:L(a.pending,0),promptTokens:L(a.promptTokens,0),completionTokens:L(a.completionTokens,0),totalTokens:L(a.totalTokens,0),cachedTokens:L(a.cachedTokens,0),reasoningTokens:L(a.reasoningTokens,0),cost:L(a.cost,0),lastSeen:a.lastSeen||"",...b})}async function ag(a,b,c,d,e,f=[],g=50,h="requests DESC, totalTokens DESC"){let i=ab(b,c);return await a.all(`SELECT
58
+ ${d},
59
+ ${I}
60
+ FROM usageHistory
61
+ ${i.clause}
62
+ GROUP BY ${e}
63
+ ORDER BY ${h}
64
+ LIMIT ?`,[...f,...i.params,g])||[]}async function ah(a,b,c,d,e=new Map){let f=ab(b,c),g=f.clause?`${f.clause} AND ${H}`:`WHERE ${H}`,h=`COALESCE(NULLIF(${d}, ''), 'unknown')`,i=await a.all(`SELECT
65
+ COALESCE(NULLIF(apiKeyId, ''), NULLIF(apiKeyFingerprint, ''), NULLIF(apiKey, ''), 'local-no-key') AS apiKeyGroupKey,
66
+ ${h} AS itemKey,
67
+ COUNT(*) AS requests,
68
+ COALESCE(SUM(COALESCE(promptTokens, 0) + COALESCE(completionTokens, 0)), 0) AS totalTokens,
69
+ MAX(timestamp) AS lastSeen
70
+ FROM usageHistory
71
+ ${g}
72
+ GROUP BY COALESCE(NULLIF(apiKeyId, ''), NULLIF(apiKeyFingerprint, ''), NULLIF(apiKey, ''), 'local-no-key'), ${h}
73
+ ORDER BY apiKeyGroupKey ASC, requests DESC, totalTokens DESC`,f.params)||[],j=new Map;for(let a of i){let b=J(a.itemKey)||"unknown",c="provider"===d?$(b,e):b;!function(a,b,c,d=3){if(!b||!c?.key)return;let e=a.get(b)||[];e.push(c),e.sort((a,b)=>b.requests-a.requests||b.totalTokens-a.totalTokens||String(a.label).localeCompare(String(b.label))),a.set(b,e.slice(0,d))}(j,a.apiKeyGroupKey,{key:b,label:c,requests:L(a.requests,0),totalTokens:L(a.totalTokens,0),lastSeen:a.lastSeen||""})}return j}async function ai(a,b,c,d,e){let f=Array.isArray(a)?a:[a],g=ab(b,e),[h,i,j,k,l,m,n,o,p,q]=await Promise.all([ag(aS(f,0),b,e,"COALESCE(NULLIF(provider, ''), 'unknown') AS key, COALESCE(NULLIF(provider, ''), 'unknown') AS label","COALESCE(NULLIF(provider, ''), 'unknown')"),ag(aS(f,1),b,e,`
74
+ COALESCE(NULLIF(provider, ''), 'unknown') || '|' || COALESCE(NULLIF(model, ''), 'unknown') AS key,
75
+ COALESCE(NULLIF(provider, ''), 'unknown') AS provider,
76
+ COALESCE(NULLIF(model, ''), 'unknown') AS model,
77
+ COALESCE(NULLIF(model, ''), 'unknown') || ' (' || COALESCE(NULLIF(provider, ''), 'unknown') || ')' AS label
78
+ `,"COALESCE(NULLIF(provider, ''), 'unknown'), COALESCE(NULLIF(model, ''), 'unknown')"),ag(aS(f,2),b,e,`
79
+ COALESCE(NULLIF(connectionId, ''), 'unknown') AS key,
80
+ COALESCE(NULLIF(connectionId, ''), 'unknown') AS connectionId,
81
+ COALESCE(NULLIF(provider, ''), 'unknown') AS provider,
82
+ COALESCE(NULLIF(connectionId, ''), 'unknown') AS label
83
+ `,"COALESCE(NULLIF(connectionId, ''), 'unknown')"),ag(aS(f,3),b,e,"COALESCE(NULLIF(endpoint, ''), 'unknown') AS key, COALESCE(NULLIF(endpoint, ''), 'unknown') AS label","COALESCE(NULLIF(endpoint, ''), 'unknown')"),ag(aS(f,4),b,e,"COALESCE(NULLIF(apiKeyId, ''), NULLIF(apiKeyFingerprint, ''), NULLIF(apiKey, ''), 'local-no-key') AS key, COALESCE(NULLIF(apiKeyFingerprint, ''), NULLIF(apiKey, ''), 'local-no-key') AS rawApiKey, COALESCE(NULLIF(apiKeyName, ''), '') AS apiKeyName, COALESCE(NULLIF(apiKeyOwner, ''), '') AS apiKeyOwner, COALESCE(NULLIF(apiKeyId, ''), '') AS apiKeyId","COALESCE(NULLIF(apiKeyId, ''), NULLIF(apiKeyFingerprint, ''), NULLIF(apiKey, ''), 'local-no-key')"),ah(aS(f,6),b,e,"model",d),ah(aS(f,7),b,e,"provider",d),ah(aS(f,8),b,e,"endpoint",d),ag(aS(f,5),b,e,"COALESCE(NULLIF(status, ''), 'ok') AS key, COALESCE(NULLIF(status, ''), 'ok') AS label","COALESCE(NULLIF(status, ''), 'ok')"),aS(f,9).all(`SELECT
84
+ COALESCE(NULLIF(status, ''), 'error') AS status,
85
+ COALESCE(NULLIF(provider, ''), 'unknown') AS provider,
86
+ COALESCE(NULLIF(model, ''), 'unknown') AS model,
87
+ COALESCE(NULLIF(endpoint, ''), 'unknown') AS endpoint,
88
+ COALESCE(NULLIF(apiKeyId, ''), NULLIF(apiKeyFingerprint, ''), NULLIF(apiKey, ''), 'local-no-key') AS rawApiKey,
89
+ COALESCE(NULLIF(status, ''), 'error') || '|' || COALESCE(NULLIF(provider, ''), 'unknown') || '|' || COALESCE(NULLIF(model, ''), 'unknown') || '|' || COALESCE(NULLIF(endpoint, ''), 'unknown') AS key,
90
+ ${I}
91
+ FROM usageHistory
92
+ ${g.clause?`${g.clause} AND NOT ${F} AND NOT ${G}`:`WHERE NOT ${F} AND NOT ${G}`}
93
+ GROUP BY COALESCE(NULLIF(status, ''), 'error'), COALESCE(NULLIF(provider, ''), 'unknown'), COALESCE(NULLIF(model, ''), 'unknown'), COALESCE(NULLIF(endpoint, ''), 'unknown'), COALESCE(NULLIF(apiKeyId, ''), NULLIF(apiKeyFingerprint, ''), NULLIF(apiKey, ''), 'local-no-key')
94
+ ORDER BY errors DESC, requests DESC, lastSeen DESC
95
+ LIMIT ?`,[...g.params,100]).then(a=>a||[])]),r=h.map(a=>af(a,{label:$(a.key||a.label,d),provider:a.key||a.label||"unknown",topModels:[],topApiKeys:[]})),s=i.map(a=>af(a,{provider:a.provider||"",providerLabel:$(a.provider,d),model:a.model||"",label:`${a.model||"unknown"} (${$(a.provider,d)})`,topApiKeys:[]})),t=j.map(a=>{let b=d.get(a.connectionId);return af(a,{label:b?.name||a.connectionId||"unknown",provider:b?.provider||a.provider||"",providerLabel:$(b?.provider||a.provider,d),connectionId:a.connectionId||"",topModels:[]})}),u=k.map(a=>af(a)),v=l.map(a=>{let b="local-no-key"===a.rawApiKey?"":a.rawApiKey,d=c.byKey.get(b)||c.byFingerprint.get(b)||c.all.find(b=>b.id===a.apiKeyId||b.id===a.key),e=d?.fingerprint||X(b),f=a.apiKeyName||d?.name||(b?e:"Local / kh\xf4ng d\xf9ng API key");return af(a,{key:a.apiKeyId||e,label:f,name:f,fingerprint:e,apiKeyId:a.apiKeyId||d?.id||"",ownerUser:a.apiKeyOwner||d?.ownerUser||"",createdByUser:d?.createdByUser||"",isActive:d?.isActive??null,topModels:m.get(a.key)||[],topProviders:n.get(a.key)||[],topEndpoints:o.get(a.key)||[]})});return{providers:r,models:s,providerAccounts:t,endpoints:u,apiKeys:v,statuses:p.map(a=>af(a)),errors:q.map(a=>{let b="local-no-key"===a.rawApiKey?"":a.rawApiKey,e=c.byKey.get(b)||c.byFingerprint.get(b)||c.all.find(a=>a.id===b);return af(a,{label:a.status||"error",status:a.status||"error",provider:a.provider||"unknown",providerLabel:$(a.provider,d),model:a.model||"unknown",endpoint:a.endpoint||"unknown",apiKey:e?.fingerprint||X(b)})})}}async function aj(a,b,c,d={}){let e=function(a,b,c){let d=a.start?a.start.getTime():NaN,e=a.end?a.end.getTime():Date.now();if(!Number.isFinite(d)){let a=b?new Date(b).getTime():NaN,f=c?new Date(c).getTime():NaN;Number.isFinite(a)&&(d=a),Number.isFinite(f)&&(e=f)}Number.isFinite(d)||(d=e-864e5);let f=Math.max(1,e-d);return f<=216e5?3e5:f<=1296e5?36e5:f<=6912e5?216e5:f<=648e7?864e5:6048e5}(b,d.minTs,d.maxTs),f=Math.max(60,Math.floor(e/1e3)),g=b.start?b.start.getTime():new Date(d.minTs||Date.now()-864e5).getTime(),h=b.end?b.end.getTime():new Date(d.maxTs||Date.now()).getTime();Number.isFinite(g)||(g=Date.now()-864e5),Number.isFinite(h)||(h=Date.now());let i=Math.floor(((h=Math.max(g=ac(g,e),h))-g)/e)+1,j=f*(i>240?Math.ceil(i/240):1),k=1e3*j,l=ab(b,c),m=await a.all(`SELECT
96
+ ((CAST(strftime('%s', timestamp) AS INTEGER) / ?) * ?) AS bucketSec,
97
+ ${I}
98
+ FROM usageHistory
99
+ ${l.clause}
100
+ GROUP BY bucketSec
101
+ HAVING bucketSec IS NOT NULL
102
+ ORDER BY bucketSec ASC`,[j,j,...l.params])||[],n=new Map;for(let a=ac(g,k);a<=h;a+=k)n.set(a,{ts:a,label:new Date(a).toISOString(),requests:0,success:0,errors:0,pending:0,promptTokens:0,completionTokens:0,totalTokens:0,cachedTokens:0,reasoningTokens:0,cost:0});for(let a of m){let b=1e3*L(a.bucketSec,0);b&&n.set(b,{ts:b,label:new Date(b).toISOString(),requests:L(a.requests,0),success:L(a.success,0),errors:L(a.errors,0),pending:L(a.pending,0),promptTokens:L(a.promptTokens,0),completionTokens:L(a.completionTokens,0),totalTokens:L(a.totalTokens,0),cachedTokens:L(a.cachedTokens,0),reasoningTokens:L(a.reasoningTokens,0),cost:L(a.cost,0)})}return[...n.values()].sort((a,b)=>a.ts-b.ts)}function ak(a,b){if(!a.length)return null;let c=[...a].sort((a,b)=>a-b),d=Math.min(c.length-1,Math.max(0,Math.ceil(b/100*c.length)-1));return c[d]}async function al(a,b,c){try{let d=ab(b,c),e=await a.all(`SELECT latencyMs
103
+ FROM usageHistory
104
+ ${d.clause?`${d.clause} AND`:"WHERE"} latencyMs IS NOT NULL AND latencyMs > 0`,d.params)||[],f=[],g=0;for(let a of e){let b=Number(a.latencyMs);Number.isFinite(b)&&b>0&&(f.push(b),g+=b)}if(f.length>0)return f.sort((a,b)=>a-b),{samples:f.length,avgMs:g/f.length,p50Ms:an(f,50),p95Ms:an(f,95),p99Ms:an(f,99)}}catch{}let d=[];try{let c,e,f=(c=[],e=[],aa(c,e,"timestamp",b,!1),b.provider&&(c.push("provider = ?"),e.push(b.provider)),b.model&&(c.push("model = ?"),e.push(b.model)),b.connectionId&&(c.push("connectionId = ?"),e.push(b.connectionId)),b.status&&(c.push("status = ?"),e.push(b.status)),{clause:c.length?`WHERE ${c.join(" AND ")}`:"",params:e});d=await a.all(`SELECT data FROM requestDetails ${f.clause} ORDER BY timestamp DESC LIMIT ?`,[...f.params,3e3])||[]}catch{d=[]}let f=[];for(let a of d){let b=function(a){let b=a?.latency||{};for(let c of[b.totalMs,b.total_ms,b.durationMs,b.duration_ms,b.elapsedMs,b.elapsed_ms,b.responseMs,b.response_ms,b.ms,b.total,a?.durationMs,a?.latencyMs]){let a=Number(c);if(Number.isFinite(a)&&a>=0)return a}return null}((0,e.q)(a.data,{})||{});Number.isFinite(b)&&f.push(b)}let g=f.reduce((a,b)=>a+b,0);return{samples:f.length,avgMs:f.length?g/f.length:null,p50Ms:ak(f,50),p95Ms:ak(f,95),p99Ms:ak(f,99)}}function am(a,b,c={}){let d=ab(a,b,c),e=[H,F,"(COALESCE(promptTokens, 0) + COALESCE(completionTokens, 0)) > 0"];c.latencyOnly&&e.push("latencyMs IS NOT NULL AND latencyMs > 0"),c.ttftOnly&&e.push("ttftMs IS NOT NULL AND ttftMs > 0");let f=e.join(" AND ");return{clause:d.clause?`${d.clause} AND ${f}`:`WHERE ${f}`,params:d.params}}function an(a,b){if(!a.length)return null;let c=Math.min(a.length-1,Math.max(0,Math.ceil(b/100*a.length)-1));return a[c]}async function ao(a,b){let c=[];try{c=await a.all(`SELECT latencyMs, ttftMs, promptTokens, completionTokens
105
+ FROM usageHistory
106
+ ${b.clause}`,b.params)||[]}catch{return{latency:[],ttft:[],prompt:[],completion:[]}}let d=[],e=[],f=[],g=[];for(let a of c){let b=Number(a.latencyMs);Number.isFinite(b)&&b>0&&d.push(b);let c=Number(a.ttftMs);Number.isFinite(c)&&c>0&&e.push(c);let h=Number(a.promptTokens);Number.isFinite(h)&&h>0&&f.push(h);let i=Number(a.completionTokens);Number.isFinite(i)&&i>0&&g.push(i)}let h=(a,b)=>a-b;return d.sort(h),e.sort(h),f.sort(h),g.sort(h),{latency:d,ttft:e,prompt:f,completion:g}}function ap({samples:a=0,p95LatencyMs:b=0,p95TtftMs:c=0,slowRequestRate:d=0,errorRate:e=0}={}){if(!a)return{level:"none",label:"Chưa c\xf3 mẫu",tone:"slate",score:null};if(a<10)return{level:"low_sample",label:"\xcdt mẫu",tone:"amber",score:null};let f=100;return(b>0&&(b>9e4?f-=35:b>45e3?f-=20:b>15e3&&(f-=8)),c>0&&(c>45e3?f-=30:c>2e4?f-=16:c>8e3&&(f-=6)),f-=Math.min(30,Math.round(100*d)),f-=Math.min(25,Math.round(100*e)),(f=Math.max(0,Math.min(100,f)))>=85)?{level:"fast",label:"Nhanh",tone:"green",score:f}:f>=70?{level:"ok",label:"Ổn",tone:"blue",score:f}:f>=50?{level:"slow",label:"Chậm",tone:"amber",score:f}:{level:"very_slow",label:"Rất chậm",tone:"red",score:f}}async function aq(a,b,c,d={}){let e=am(b,c,{latencyOnly:!0}),f={};try{f=await a.get(`SELECT
107
+ COUNT(*) AS samples,
108
+ AVG(latencyMs) AS avgLatencyMs,
109
+ MIN(latencyMs) AS minLatencyMs,
110
+ MAX(latencyMs) AS maxLatencyMs,
111
+ AVG(CASE WHEN ttftMs > 0 THEN ttftMs END) AS avgTtftMs,
112
+ MAX(ttftMs) AS maxTtftMs,
113
+ AVG(promptTokens) AS avgPromptTokens,
114
+ MAX(promptTokens) AS maxPromptTokens,
115
+ AVG(completionTokens) AS avgCompletionTokens,
116
+ MAX(completionTokens) AS maxCompletionTokens,
117
+ SUM(promptTokens) AS totalPromptTokens,
118
+ SUM(completionTokens) AS totalCompletionTokens,
119
+ SUM(latencyMs) AS totalLatencyMs,
120
+ SUM(CASE WHEN ttftMs > 0 THEN ttftMs ELSE 0 END) AS totalTtftMs,
121
+ SUM(CASE WHEN ttftMs > 0 THEN promptTokens ELSE 0 END) AS promptTokensWithTtft,
122
+ SUM(CASE WHEN completionTokens > 0 THEN completionTokens ELSE 0 END) AS completionTokensWithLatency,
123
+ SUM(CASE WHEN completionTokens > 0 THEN latencyMs ELSE 0 END) AS latencyMsWithOutput,
124
+ SUM(CASE WHEN completionTokens > 0 AND latencyMs > ttftMs THEN completionTokens ELSE 0 END) AS completionTokensAfterTtft,
125
+ SUM(CASE WHEN completionTokens > 0 AND latencyMs > ttftMs THEN latencyMs - ttftMs ELSE 0 END) AS decodeMs,
126
+ SUM(CASE WHEN latencyMs >= ? THEN 1 ELSE 0 END) AS slowRequests,
127
+ SUM(CASE WHEN latencyMs >= ? THEN 1 ELSE 0 END) AS verySlowRequests,
128
+ SUM(CASE WHEN ttftMs >= ? THEN 1 ELSE 0 END) AS slowTtftRequests,
129
+ SUM(CASE WHEN promptTokens >= ? THEN 1 ELSE 0 END) AS longInputRequests,
130
+ SUM(CASE WHEN promptTokens >= ? THEN 1 ELSE 0 END) AS hugeInputRequests,
131
+ SUM(CASE WHEN promptTokens >= ? THEN 1 ELSE 0 END) AS extremeInputRequests
132
+ FROM usageHistory
133
+ ${e.clause}`,[45e3,9e4,2e4,3e4,5e4,7e4,...e.params])||{}}catch{f={}}let g=L(f.samples,0),h=await ao(a,e),i=h.ttft.length,j=h.prompt.length,k=h.completion.length,l=an(h.latency,50),m=an(h.latency,95),n=an(h.latency,99),o=an(h.ttft,50),p=an(h.ttft,95),q=an(h.ttft,99),r=an(h.prompt,50),s=an(h.prompt,95),t=an(h.prompt,99),u=an(h.completion,95),v=L(f.slowRequests,0),w=L(f.verySlowRequests,0),x=L(f.slowTtftRequests,0),y=L(f.longInputRequests,0),z=L(f.hugeInputRequests,0),A=L(f.extremeInputRequests,0),B=L(f.totalPromptTokens,0),C=L(f.totalLatencyMs,0),D=L(f.totalTtftMs,0),E=L(f.promptTokensWithTtft,0),F=L(f.completionTokensWithLatency,0),G=L(f.latencyMsWithOutput,0),H=L(f.completionTokensAfterTtft,0),I=L(f.decodeMs,0),J=g?v/g:0,K=g?w/g:0,M=g?y/g:0,N=g?z/g:0,O=g?A/g:0,P=ap({samples:g,p95LatencyMs:L(m,0),p95TtftMs:L(p,0),slowRequestRate:J,errorRate:L(d.errorRate,0)});return{samples:g,ttftSamples:i,inputSamples:j,outputSamples:k,label:P.label,level:P.level,tone:P.tone,score:P.score,thresholds:{slowLatencyMs:45e3,verySlowLatencyMs:9e4,slowTtftMs:2e4,longInputTokens:3e4,hugeInputTokens:5e4,extremeInputTokens:7e4},avgLatencyMs:L(f.avgLatencyMs,null),minLatencyMs:L(f.minLatencyMs,null),maxLatencyMs:L(f.maxLatencyMs,null),p50LatencyMs:l,p95LatencyMs:m,p99LatencyMs:n,avgTtftMs:L(f.avgTtftMs,null),maxTtftMs:L(f.maxTtftMs,null),p50TtftMs:o,p95TtftMs:p,p99TtftMs:q,avgPromptTokens:L(f.avgPromptTokens,0),maxPromptTokens:L(f.maxPromptTokens,0),p50PromptTokens:r,p95PromptTokens:s,p99PromptTokens:t,avgCompletionTokens:L(f.avgCompletionTokens,0),maxCompletionTokens:L(f.maxCompletionTokens,0),p95CompletionTokens:u,slowRequests:v,verySlowRequests:w,slowTtftRequests:x,longInputRequests:y,hugeInputRequests:z,extremeInputRequests:A,slowRequestRate:J,verySlowRequestRate:K,slowTtftRate:i?x/i:0,longInputRate:M,hugeInputRate:N,extremeInputRate:O,approxInputTokensPerSecond:D>0?E/(D/1e3):null,outputTokensPerSecond:G>0?F/(G/1e3):null,decodeTokensPerSecond:I>0?H/(I/1e3):null,latencyMsPer10kInputTokens:B>0?C/(B/1e4):null}}async function ar(a,b,c,d=new Map){let e=am(b,c,{latencyOnly:!0});try{let b=await a.all(`SELECT
134
+ COALESCE(NULLIF(provider, ''), 'unknown') AS provider,
135
+ COALESCE(NULLIF(model, ''), 'unknown') AS model,
136
+ latencyMs,
137
+ ttftMs,
138
+ promptTokens,
139
+ completionTokens
140
+ FROM usageHistory
141
+ ${e.clause}`,e.params)||[],c=new Map;for(let a of b){let b=`${a.provider}|${a.model}`,d=c.get(b);d||(d={provider:a.provider,model:a.model,key:b,entries:[],ttft:[],sums:{latency:0,ttft:0,ttftCount:0,prompt:0,completion:0,slow:0,slowTtft:0,longInput:0,hugeInput:0},max:{latency:0,ttft:0,prompt:0}},c.set(b,d));let e=L(a.latencyMs,0),f=L(a.ttftMs,0),g=L(a.promptTokens,0),h=L(a.completionTokens,0);d.entries.push({latency:e,prompt:g}),f>0&&(d.ttft.push(f),d.sums.ttft+=f,d.sums.ttftCount+=1),d.sums.latency+=e,d.sums.prompt+=g,d.sums.completion+=h,e>=45e3&&(d.sums.slow+=1),f>=2e4&&(d.sums.slowTtft+=1),g>=3e4&&(d.sums.longInput+=1),g>=5e4&&(d.sums.hugeInput+=1),e>d.max.latency&&(d.max.latency=e),f>d.max.ttft&&(d.max.ttft=f),g>d.max.prompt&&(d.max.prompt=g)}return[...c.values()].map(a=>{a.entries.sort((a,b)=>a.latency-b.latency),a.ttft.sort((a,b)=>a-b);let b=a.entries.length,c=c=>a.entries[Math.min(b-1,Math.max(0,Math.ceil(c/100*b)-1))]||null,d=c(50),e=c(95);return{provider:a.provider,model:a.model,key:a.key,samples:b,avgLatencyMs:b?a.sums.latency/b:null,p50LatencyMs:d?d.latency:null,p95LatencyMs:e?e.latency:null,maxLatencyMs:a.max.latency||null,avgTtftMs:a.sums.ttftCount?a.sums.ttft/a.sums.ttftCount:null,p95TtftMs:an(a.ttft,95),maxTtftMs:a.max.ttft||null,avgPromptTokens:b?a.sums.prompt/b:0,p95PromptTokensApprox:e?e.prompt:0,maxPromptTokens:a.max.prompt,avgCompletionTokens:b?a.sums.completion/b:0,totalCompletionTokens:a.sums.completion,totalLatencyMs:a.sums.latency,slowRequests:a.sums.slow,slowTtftRequests:a.sums.slowTtft,longInputRequests:a.sums.longInput,hugeInputRequests:a.sums.hugeInput}}).sort((a,b)=>b.samples-a.samples||(b.p95LatencyMs||0)-(a.p95LatencyMs||0)).slice(0,30).map(a=>{let b=L(a.samples,0),c=b?L(a.slowRequests,0)/b:0,e=b?L(a.slowTtftRequests,0)/b:0,f=b?L(a.longInputRequests,0)/b:0,g=b?L(a.hugeInputRequests,0)/b:0,h=ap({samples:b,p95LatencyMs:L(a.p95LatencyMs,0),p95TtftMs:L(a.p95TtftMs,0),slowRequestRate:c});return{key:a.key,provider:a.provider,providerLabel:$(a.provider,d),model:a.model,label:`${a.model} (${$(a.provider,d)})`,samples:b,level:h.level,labelQuality:h.label,tone:h.tone,score:h.score,avgLatencyMs:L(a.avgLatencyMs,null),p50LatencyMs:L(a.p50LatencyMs,null),p95LatencyMs:L(a.p95LatencyMs,null),maxLatencyMs:L(a.maxLatencyMs,null),avgTtftMs:L(a.avgTtftMs,null),p95TtftMs:L(a.p95TtftMs,null),maxTtftMs:L(a.maxTtftMs,null),avgPromptTokens:L(a.avgPromptTokens,0),p95PromptTokens:L(a.p95PromptTokensApprox,0),maxPromptTokens:L(a.maxPromptTokens,0),avgCompletionTokens:L(a.avgCompletionTokens,0),slowRequests:L(a.slowRequests,0),slowRequestRate:c,slowTtftRate:e,longInputRate:f,hugeInputRate:g,outputTokensPerSecond:L(a.totalLatencyMs,0)>0?L(a.totalCompletionTokens,0)/(L(a.totalLatencyMs,0)/1e3):null}})}catch(a){return console.error("[analytics] Failed to build model experience stats:",a?.message||a),[]}}async function as(a,b,c,d,e){try{let f=am(b,c,{latencyOnly:!0});return(await a.all(`SELECT id, timestamp, provider, model, connectionId, apiKey, apiKeyId, apiKeyFingerprint, apiKeyName, endpoint, clientIp, clientIpNormalized, sourceTool, sourceToolLabel, sessionId, latencyMs, ttftMs, statusCode, errorCode, errorType, promptTokens, completionTokens, cachedTokens, reasoningTokens, cost, status, tokens
142
+ FROM usageHistory
143
+ ${f.clause}
144
+ ORDER BY latencyMs DESC
145
+ LIMIT ?`,[...f.params,20])||[]).map(a=>at(a,d,e))}catch{return[]}}function at(a,b,c){let d=function(a={}){let b=(0,e.q)(a.tokens,{})||{},c=L(a.promptTokens,0)||L(b.prompt_tokens,0)||L(b.input_tokens,0),d=L(a.completionTokens,0)||L(b.completion_tokens,0)||L(b.output_tokens,0);return{promptTokens:c,completionTokens:d,totalTokens:c+d,cachedTokens:L(a.cachedTokens,0)||L(b.cached_tokens,0)||L(b.cache_read_input_tokens,0)||L(b.prompt_tokens_details?.cached_tokens,0),reasoningTokens:L(a.reasoningTokens,0)||L(b.reasoning_tokens,0)||L(b.completion_tokens_details?.reasoning_tokens,0)||L(b.output_tokens_details?.reasoning_tokens,0)}}(a),f=b.get(a.apiKey)||b.get(a.apiKeyFingerprint)||null,g=c.get(a.connectionId)||null;return{id:a.id,timestamp:a.timestamp,provider:a.provider||"",providerLabel:$(a.provider,c),model:a.model||"",connectionId:a.connectionId||"",accountName:g?.name||a.connectionId||"",apiKeyName:a.apiKeyName||f?.name||(a.apiKeyFingerprint||a.apiKey?X(a.apiKeyFingerprint||a.apiKey):"Local"),apiKeyFingerprint:a.apiKeyFingerprint||f?.fingerprint||X(a.apiKey),apiKeyId:a.apiKeyId||f?.id||"",clientIp:a.clientIpNormalized||a.clientIp||"",sourceTool:a.sourceTool||a.sourceToolLabel||"",sessionId:a.sessionId||"",latencyMs:L(a.latencyMs,0),ttftMs:L(a.ttftMs,0),statusCode:a.statusCode||null,errorCode:a.errorCode||"",errorType:a.errorType||"",endpoint:a.endpoint||"",status:a.status||"ok",promptTokens:d.promptTokens,completionTokens:d.completionTokens,totalTokens:d.totalTokens,cachedTokens:d.cachedTokens,reasoningTokens:d.reasoningTokens,cost:L(a.cost,0)}}async function au(a,b,c,d,e){let f=ab(b,c);return(await a.all(`SELECT id, timestamp, provider, model, connectionId, apiKey, apiKeyId, apiKeyFingerprint, apiKeyName, endpoint, clientIp, clientIpNormalized, sourceTool, sourceToolLabel, sessionId, latencyMs, ttftMs, statusCode, errorCode, errorType, promptTokens, completionTokens, cachedTokens, reasoningTokens, cost, status, tokens
146
+ FROM usageHistory
147
+ ${f.clause}
148
+ ORDER BY timestamp DESC
149
+ LIMIT ?`,[...f.params,50])||[]).map(a=>at(a,d,e))}async function av(a,b,c,d,e){let f=ab(b,c);return(await a.all(`SELECT id, timestamp, provider, model, connectionId, apiKey, apiKeyId, apiKeyFingerprint, apiKeyName, endpoint, clientIp, clientIpNormalized, sourceTool, sourceToolLabel, sessionId, latencyMs, ttftMs, statusCode, errorCode, errorType, promptTokens, completionTokens, cachedTokens, reasoningTokens, cost, status, tokens
150
+ FROM usageHistory
151
+ ${f.clause}
152
+ ORDER BY (COALESCE(promptTokens, 0) + COALESCE(completionTokens, 0)) DESC, timestamp DESC
153
+ LIMIT ?`,[...f.params,20])||[]).map(a=>at(a,d,e))}function aw(a,b,c=b){let d=function(a,b=a){let c=J(a);return c?{value:c,label:J(b)||c}:null}(b,c);return d&&(a.some(a=>a.value===d.value)||a.unshift(d)),a}function ax(a){return{...a,provider:"",model:"",connectionId:"",status:"",endpoint:"",apiKey:""}}async function ay(a,b,c,d=500){let e=ab(ax(b),null),f=e.clause?`${e.clause} AND`:"WHERE";return(await a.all(`SELECT DISTINCT ${c} AS value
154
+ FROM usageHistory
155
+ ${f} ${c} IS NOT NULL AND ${c} <> ''
156
+ ORDER BY ${c} ASC
157
+ LIMIT ?`,[...e.params,d])||[]).map(a=>J(a.value)).filter(Boolean)}async function az(a,b){let c=ab(ax(b),null),d=c.clause?`${c.clause} AND`:"WHERE";try{let b=await a.get(`SELECT 1 AS hasLocal
158
+ FROM usageHistory
159
+ ${d} (apiKey IS NULL OR apiKey = '')
160
+ LIMIT 1`,c.params);return!!b?.hasLocal}catch{return!1}}async function aA(a,b){let c,d,e=(global._dashboardAnalyticsOptionsCache||(global._dashboardAnalyticsOptionsCache=new Map),global._dashboardAnalyticsOptionsCache),f=(c=a=>{let b=new Date(a||0).getTime();return Number.isFinite(b)?Math.floor(b/6e5):String(a)},d=b.ownerScope,JSON.stringify({start:c(b.startIso),end:c(b.endIso),working:(b.workingTimeRanges||[]).map(a=>`${a?.startIso}|${a?.endIso}`),ownerScope:d?.enabled?{identifiers:d.identifiers||[],owners:d.owners||[],noMatch:!!d.noMatch}:null})),g=e.get(f);if(g){if(g.promise)return g.promise;if(Date.now()-g.createdAt<6e5)return g.data}let h=(async()=>{let[c,d,e,f,g,h]=await Promise.all([ay(a,b,"provider",500),ay(a,b,"model",1e3),ay(a,b,"endpoint",500),ay(a,b,"status",200),ay(a,b,"connectionId",1e3),az(a,b)]);return{providers:c,models:d,endpoints:e,statuses:f,connectionIds:g,hasLocal:h}})().then(a=>{if(e.set(f,{createdAt:Date.now(),data:a}),e.size>50){for(let[a,b]of e)if(b.createdAt&&Date.now()-b.createdAt>6e5&&e.delete(a),e.size<=50)break}return a}).catch(a=>{throw e.delete(f),a});return e.set(f,{promise:h}),h}async function aB(a,b,c,d){let{providers:e,models:f,endpoints:g,statuses:h,connectionIds:i,hasLocal:j}=await aA(a,b),k=i.map(a=>{let b=c.get(a),d=$(b?.provider||a,c),e=b?.name?`${b.name}${d&&d!==b.name?` \xb7 ${d}`:""}`:d||a;return{value:a,label:e}}),l=[];for(let a of(j&&l.push({value:"local-no-key",label:"Local / kh\xf4ng d\xf9ng API key"}),(function(a={},b={}){let c=a.all||[],d=b.ownerScope;if(!d?.enabled)return c;if(d.noMatch)return[];let e=new Set((d.identifiers||[]).map(a=>J(a)).filter(Boolean)),f=new Set((d.ids||[]).map(a=>J(a)).filter(Boolean)),g=new Set((d.fingerprints||[]).map(a=>J(a)).filter(Boolean)),h=new Set((d.owners||[]).map(a=>K(a)).filter(Boolean));return c.filter(a=>!!a&&(a.key&&e.has(a.key)||a.id&&(e.has(a.id)||f.has(a.id))||a.fingerprint&&(e.has(a.fingerprint)||g.has(a.fingerprint))||a.ownerUser&&h.has(K(a.ownerUser))))})(d,b).slice(0,500)))l.push({value:a.fingerprint,label:`${a.name||a.fingerprint}${a.ownerUser?` \xb7 ${a.ownerUser}`:""}`});aw(k,b.connectionId,b.connectionId),aw(l,b.apiKey,b.apiKey);let m=e.map(a=>({value:a,label:$(a,c)})),n=f.map(a=>({value:a,label:a})),o=g.map(a=>({value:a,label:a})),p=h.map(a=>({value:a,label:a}));return aw(m,b.provider,b.provider),aw(n,b.model,b.model),aw(o,b.endpoint,b.endpoint),aw(p,b.status,b.status),{providers:m,models:n.map(a=>a.value),endpoints:o.map(a=>a.value),statuses:p.map(a=>a.value),connections:k,apiKeys:l,clientIps:[],sourceTools:[]}}async function aC(a,b,c,d,e,f,g=new Map){let h=await aB(a,b,g,e);return h.clientIps=(d.topClientIps||[]).map(a=>a.key).filter(Boolean),h.sourceTools=(d.topSourceTools||[]).map(a=>a.key).filter(Boolean),h}let aD="COALESCE(NULLIF(apiKeyOwner, ''), NULLIF(apiKeyName, ''), NULLIF(apiKeyFingerprint, ''), NULLIF(apiKeyId, ''), NULLIF(clientIpNormalized, ''), 'local-no-key')",aE="COALESCE(NULLIF(apiKeyOwner, ''), NULLIF(apiKeyName, ''), NULLIF(apiKeyFingerprint, ''), NULLIF(clientIpNormalized, ''), 'Local / kh\xf4ng API key')";async function aF(a,b,c,d,e=new Map){if(!new Set(["model","provider","endpoint","clientIpNormalized","sourceTool"]).has(d))return new Map;let f=am(b,c),g=`COALESCE(NULLIF(${d}, ''), 'unknown')`;try{let b=await a.all(`SELECT
161
+ ${aD} AS clientKey,
162
+ ${g} AS itemKey,
163
+ COUNT(*) AS requests,
164
+ COALESCE(SUM(COALESCE(promptTokens, 0) + COALESCE(completionTokens, 0)), 0) AS totalTokens,
165
+ MAX(timestamp) AS lastSeen
166
+ FROM usageHistory
167
+ ${f.clause}
168
+ GROUP BY ${aD}, ${g}
169
+ ORDER BY clientKey ASC, requests DESC, totalTokens DESC`,f.params)||[],c=new Map;for(let a of b){let b=J(a.itemKey)||"unknown",f="provider"===d?$(b,e):b;!function(a,b,c,d=3){if(!b||!c?.key)return;let e=a.get(b)||[];e.push(c),e.sort((a,b)=>b.requests-a.requests||b.totalTokens-a.totalTokens||String(a.label).localeCompare(String(b.label))),a.set(b,e.slice(0,d))}(c,a.clientKey,{key:b,label:f,requests:L(a.requests,0),totalTokens:L(a.totalTokens,0),lastSeen:a.lastSeen||""})}return c}catch(a){return console.error("[analytics] Failed to build client top usage map:",a?.message||a),new Map}}function aG(a={},b={}){let c=L(a.requests,0),d=L(a.success,c),e=L(a.errors,0),f=L(a.promptTokens,0),g=L(a.completionTokens,0),h=L(a.totalTokens,f+g),i=L(a.p95PromptTokens,0),j=L(a.p95LatencyMs,null),k=c?e/c:0,l=c?L(a.longInputRequests,0)/c:0,m=c?L(a.hugeInputRequests,0)/c:0,n=c?L(a.extremeInputRequests,0)/c:0,o=c?L(a.slowRequests,0)/c:0,p=function({requests:a=0,p95PromptTokens:b=0,p95LatencyMs:c=0,longInputRate:d=0,errorRate:e=0}={}){return a?b>=7e4||d>=.5||c>=9e4?{level:"critical",label:"Rất nặng",tone:"red"}:b>=5e4||d>=.3||c>=45e3||e>=.2?{level:"high",label:"Nặng",tone:"amber"}:b>=3e4||d>=.1||e>=.05?{level:"medium",label:"Cần theo d\xf5i",tone:"blue"}:{level:"normal",label:"Ổn",tone:"green"}:{level:"none",label:"Chưa c\xf3 mẫu",tone:"slate"}}({requests:c,p95PromptTokens:i,p95LatencyMs:L(j,0),longInputRate:l,errorRate:k});return{key:J(a.clientKey)||"unknown",label:J(a.clientLabel||a.clientKey)||"unknown",ownerUser:J(a.ownerUser),apiKeyName:J(a.apiKeyName),apiKeyFingerprint:J(a.apiKeyFingerprint),primaryClientIp:J(a.primaryClientIp),primarySourceTool:J(a.primarySourceTool),apiKeyCount:L(a.apiKeyCount,0),sourceIpCount:L(a.sourceIpCount,0),sourceToolCount:L(a.sourceToolCount,0),sessionCount:L(a.sessionCount,0),requests:c,success:d,errors:e,errorRate:k,promptTokens:f,completionTokens:g,totalTokens:h,cost:L(a.cost,0),avgPromptTokens:c?f/c:0,avgCompletionTokens:c?g/c:0,avgTokens:c?h/c:0,p50PromptTokens:L(a.p50PromptTokens,0),p95PromptTokens:i,maxPromptTokens:L(a.maxPromptTokens,0),avgLatencyMs:L(a.avgLatencyMs,null),p95LatencyMs:j,maxLatencyMs:L(a.maxLatencyMs,null),avgTtftMs:L(a.avgTtftMs,null),p95TtftMs:L(a.p95TtftMs,null),longInputRequests:L(a.longInputRequests,0),hugeInputRequests:L(a.hugeInputRequests,0),extremeInputRequests:L(a.extremeInputRequests,0),slowRequests:L(a.slowRequests,0),slowTtftRequests:L(a.slowTtftRequests,0),longInputRate:l,hugeInputRate:m,extremeInputRate:n,slowRequestRate:o,slowTtftRate:c?L(a.slowTtftRequests,0)/c:0,outputTokensPerSecond:L(a.totalLatencyMs,0)>0?g/(L(a.totalLatencyMs,0)/1e3):null,level:p.level,pressureLabel:p.label,tone:p.tone,lastSeen:a.lastSeen||"",...b}}async function aH(a,b,c){let d=am(b,c);try{return await a.all(`SELECT
170
+ COALESCE(NULLIF(apiKeyId, ''), NULLIF(apiKeyFingerprint, ''), NULLIF(apiKey, ''), 'local-no-key') AS apiKeyGroupKey,
171
+ COALESCE(NULLIF(apiKeyName, ''), NULLIF(apiKeyOwner, ''), NULLIF(apiKeyFingerprint, ''), 'Local / kh\xf4ng API key') AS apiKeyGroupLabel,
172
+ COALESCE(NULLIF(clientIpNormalized, ''), NULLIF(clientIp, ''), 'unknown') AS sourceIpGroupKey,
173
+ ${aD} AS clientKey,
174
+ ${aE} AS clientLabel,
175
+ COALESCE(NULLIF(apiKeyId, ''), NULLIF(apiKeyFingerprint, ''), NULLIF(apiKey, ''), '') AS apiKeyStable,
176
+ COALESCE(NULLIF(apiKeyName, ''), '') AS apiKeyName,
177
+ COALESCE(NULLIF(apiKeyOwner, ''), '') AS apiKeyOwner,
178
+ COALESCE(NULLIF(apiKeyFingerprint, ''), '') AS apiKeyFingerprint,
179
+ COALESCE(NULLIF(clientIpNormalized, ''), NULLIF(clientIp, ''), '') AS clientIpStable,
180
+ COALESCE(NULLIF(clientIpNormalized, ''), '') AS clientIpNorm,
181
+ COALESCE(NULLIF(sourceTool, ''), NULLIF(sourceToolLabel, ''), '') AS sourceToolStable,
182
+ COALESCE(NULLIF(provider, ''), 'unknown') AS providerStable,
183
+ COALESCE(NULLIF(model, ''), 'unknown') AS modelStable,
184
+ COALESCE(NULLIF(sessionId, ''), '') AS sessionId,
185
+ timestamp,
186
+ COALESCE(promptTokens, 0) AS promptTokens,
187
+ COALESCE(completionTokens, 0) AS completionTokens,
188
+ COALESCE(latencyMs, 0) AS latencyMs,
189
+ COALESCE(ttftMs, 0) AS ttftMs,
190
+ COALESCE(cost, 0) AS cost
191
+ FROM usageHistory
192
+ ${d.clause}`,d.params)||[]}catch(a){return console.error("[analytics] Failed to load client usage rows:",a?.message||a),[]}}function aI(a,b){let c=J(b);return c&&c>a?c:a}function aJ(a,{dimension:b="apiKey",order:c="tokens",limit:d=25}={}){let e="sourceIp"===b,f=new Map;for(let b of a){let a=e?b.sourceIpGroupKey:b.apiKeyGroupKey;if(!a||"unknown"===a)continue;let c=f.get(a);c||(c={key:a,label:"",apiKeyName:"",apiKeyOwner:"",apiKeyFingerprint:"",primaryClientIp:"",primarySourceTool:"",requests:0,promptTokens:0,completionTokens:0,totalTokens:0,cost:0,promptArr:[],totalArr:[],maxPromptTokens:0,maxTotalTokens:0,longInputRequests:0,hugeInputRequests:0,extremeInputRequests:0,heavyRequests:0,apiKeySet:new Set,ipSet:new Set,toolSet:new Set,providerSet:new Set,modelSet:new Set,lastSeen:""},f.set(a,c));let d=L(b.promptTokens,0),g=L(b.completionTokens,0),h=d+g;c.label=aI(c.label,e?b.sourceIpGroupKey:b.apiKeyGroupLabel),c.apiKeyName=aI(c.apiKeyName,b.apiKeyName),c.apiKeyOwner=aI(c.apiKeyOwner,b.apiKeyOwner),c.apiKeyFingerprint=aI(c.apiKeyFingerprint,b.apiKeyFingerprint),c.primaryClientIp=aI(c.primaryClientIp,b.clientIpStable),c.primarySourceTool=aI(c.primarySourceTool,b.sourceToolStable),c.requests+=1,c.promptTokens+=d,c.completionTokens+=g,c.totalTokens+=h,c.cost+=L(b.cost,0),c.promptArr.push(d),c.totalArr.push(h),d>c.maxPromptTokens&&(c.maxPromptTokens=d),h>c.maxTotalTokens&&(c.maxTotalTokens=h),d>=3e4&&(c.longInputRequests+=1),d>=5e4&&(c.hugeInputRequests+=1),d>=7e4&&(c.extremeInputRequests+=1),(d>=3e4||h>=3e4)&&(c.heavyRequests+=1),c.apiKeySet.add(J(b.apiKeyStable)||"local-no-key"),J(b.clientIpStable)&&c.ipSet.add(J(b.clientIpStable)),J(b.sourceToolStable)&&c.toolSet.add(J(b.sourceToolStable)),J(b.providerStable)&&c.providerSet.add(J(b.providerStable)),J(b.modelStable)&&c.modelSet.add(J(b.modelStable)),c.lastSeen=aI(c.lastSeen,b.timestamp)}let g="heavy"===c?(a,b)=>b.heavyRequests-a.heavyRequests||b.maxPromptTokens-a.maxPromptTokens||b.promptTokens-a.promptTokens||b.totalTokens-a.totalTokens||b.requests-a.requests:(a,b)=>b.totalTokens-a.totalTokens||b.promptTokens-a.promptTokens||b.requests-a.requests||b.maxPromptTokens-a.maxPromptTokens;return[...f.values()].sort(g).slice(0,d).map(a=>(a.promptArr.sort((a,b)=>a-b),a.totalArr.sort((a,b)=>a-b),function(a={},b={}){let c=L(a.requests,0),d=L(a.promptTokens,0),e=L(a.completionTokens,0),f=L(a.totalTokens,d+e);return{key:J(a.key||a.groupKey)||"unknown",label:J(a.label||a.groupLabel||a.key||a.groupKey)||"unknown",requests:c,promptTokens:d,completionTokens:e,totalTokens:f,cost:L(a.cost,0),avgPromptTokens:c?d/c:0,avgCompletionTokens:c?e/c:0,avgTokens:c?f/c:0,p95PromptTokens:L(a.p95PromptTokens,0),maxPromptTokens:L(a.maxPromptTokens,0),p95TotalTokens:L(a.p95TotalTokens,0),maxTotalTokens:L(a.maxTotalTokens,0),longInputRequests:L(a.longInputRequests,0),hugeInputRequests:L(a.hugeInputRequests,0),extremeInputRequests:L(a.extremeInputRequests,0),heavyRequests:L(a.heavyRequests,0),longInputRate:c?L(a.longInputRequests,0)/c:0,hugeInputRate:c?L(a.hugeInputRequests,0)/c:0,extremeInputRate:c?L(a.extremeInputRequests,0)/c:0,heavyRequestRate:c?L(a.heavyRequests,0)/c:0,apiKeyCount:L(a.apiKeyCount,0),sourceIpCount:L(a.sourceIpCount,0),sourceToolCount:L(a.sourceToolCount,0),modelCount:L(a.modelCount,0),providerCount:L(a.providerCount,0),lastSeen:a.lastSeen||"",...b}}({key:a.key,label:a.label,requests:a.requests,success:a.requests,errors:0,promptTokens:a.promptTokens,completionTokens:a.completionTokens,totalTokens:a.totalTokens,cost:a.cost,p95PromptTokens:an(a.promptArr,95),maxPromptTokens:a.maxPromptTokens,p95TotalTokens:an(a.totalArr,95),maxTotalTokens:a.maxTotalTokens,longInputRequests:a.longInputRequests,hugeInputRequests:a.hugeInputRequests,extremeInputRequests:a.extremeInputRequests,heavyRequests:a.heavyRequests,apiKeyCount:a.apiKeySet.size,sourceIpCount:a.ipSet.size,sourceToolCount:a.toolSet.size,providerCount:a.providerSet.size,modelCount:a.modelSet.size,lastSeen:a.lastSeen},{apiKeyName:a.apiKeyName,apiKeyOwner:a.apiKeyOwner,apiKeyFingerprint:a.apiKeyFingerprint,primaryClientIp:a.primaryClientIp,primarySourceTool:a.primarySourceTool})))}async function aK(a,b,c){let d=ab(b,c);try{return(await a.all(`SELECT
193
+ ${aD} AS clientKey,
194
+ ${aE} AS clientLabel,
195
+ COALESCE(NULLIF(apiKeyOwner, ''), '') AS ownerUser,
196
+ COALESCE(NULLIF(apiKeyName, ''), '') AS apiKeyName,
197
+ COALESCE(NULLIF(apiKeyFingerprint, ''), '') AS apiKeyFingerprint,
198
+ MAX(clientIpNormalized) AS primaryClientIp,
199
+ MAX(COALESCE(NULLIF(sourceTool, ''), NULLIF(sourceToolLabel, ''))) AS primarySourceTool,
200
+ SUM(CASE WHEN ${H} THEN 1 ELSE 0 END) AS requests,
201
+ SUM(CASE WHEN ${H} AND ${F} THEN 1 ELSE 0 END) AS success,
202
+ SUM(CASE WHEN ${H} AND NOT ${F} THEN 1 ELSE 0 END) AS errors,
203
+ SUM(CASE WHEN ${H} THEN COALESCE(promptTokens, 0) ELSE 0 END) AS promptTokens,
204
+ SUM(CASE WHEN ${H} THEN COALESCE(completionTokens, 0) ELSE 0 END) AS completionTokens,
205
+ SUM(CASE WHEN ${H} THEN COALESCE(promptTokens, 0) + COALESCE(completionTokens, 0) ELSE 0 END) AS totalTokens,
206
+ MAX(timestamp) AS lastSeen
207
+ FROM usageHistory
208
+ ${d.clause}
209
+ GROUP BY ${aD}
210
+ HAVING errors > 0
211
+ ORDER BY errors DESC, requests DESC
212
+ LIMIT ?`,[...d.params,25])||[]).map(a=>aG(a))}catch(a){return console.error("[analytics] Failed to build problem clients:",a?.message||a),[]}}let aL=[{key:"lt2k",label:"<2k",max:2e3},{key:"2k_10k",label:"2k-10k",max:1e4},{key:"10k_30k",label:"10k-30k",max:3e4},{key:"30k_50k",label:"30k-50k",max:5e4},{key:"50k_70k",label:"50k-70k",max:7e4},{key:"gte70k",label:">=70k",max:1/0}];async function aM(a,b,c){let d=ab(b,c),e={clause:d.clause?`${d.clause} AND ${H}`:`WHERE ${H}`,params:d.params};try{let b=await a.get(`SELECT
213
+ COUNT(*) AS totalRequests,
214
+ SUM(CASE WHEN thinkingEnabled = 1 THEN 1 ELSE 0 END) AS thinkingOnRequests,
215
+ SUM(CASE WHEN thinkingEnabled = 0 THEN 1 ELSE 0 END) AS thinkingOffRequests,
216
+ SUM(CASE WHEN thinkingEnabled IS NULL THEN 1 ELSE 0 END) AS unknownRequests,
217
+ SUM(CASE WHEN thinkingAutoOff = 1 THEN 1 ELSE 0 END) AS autoOffRequests,
218
+ SUM(CASE WHEN forceThinkingOffAboveChars > 0 THEN 1 ELSE 0 END) AS thresholdConfiguredRequests,
219
+ AVG(CASE WHEN promptChars > 0 THEN promptChars END) AS avgPromptChars,
220
+ MAX(promptChars) AS maxPromptChars,
221
+ AVG(CASE WHEN thinkingAutoOff = 1 AND promptChars > 0 THEN promptChars END) AS avgAutoOffPromptChars
222
+ FROM usageHistory
223
+ ${e.clause}`,e.params)||{},c=await a.all(`SELECT COALESCE(NULLIF(thinkingAutoOffReason, ''), 'unknown') AS reason,
224
+ COUNT(*) AS requests,
225
+ AVG(CASE WHEN promptChars > 0 THEN promptChars END) AS avgPromptChars,
226
+ MAX(promptChars) AS maxPromptChars
227
+ FROM usageHistory
228
+ ${e.clause} AND thinkingAutoOff = 1
229
+ GROUP BY COALESCE(NULLIF(thinkingAutoOffReason, ''), 'unknown')
230
+ ORDER BY requests DESC
231
+ LIMIT 10`,e.params)||[],d=await a.all(`SELECT provider, model,
232
+ COUNT(*) AS requests,
233
+ SUM(CASE WHEN thinkingEnabled = 1 THEN 1 ELSE 0 END) AS thinkingOnRequests,
234
+ SUM(CASE WHEN thinkingEnabled = 0 THEN 1 ELSE 0 END) AS thinkingOffRequests,
235
+ SUM(CASE WHEN thinkingAutoOff = 1 THEN 1 ELSE 0 END) AS autoOffRequests,
236
+ AVG(CASE WHEN promptChars > 0 THEN promptChars END) AS avgPromptChars,
237
+ MAX(promptChars) AS maxPromptChars
238
+ FROM usageHistory
239
+ ${e.clause}
240
+ GROUP BY provider, model
241
+ HAVING requests > 0
242
+ ORDER BY autoOffRequests DESC, requests DESC
243
+ LIMIT 20`,e.params)||[],f=L(b.totalRequests,0),g=L(b.autoOffRequests,0),h=L(b.thinkingOnRequests,0),i=L(b.thinkingOffRequests,0),j=L(b.unknownRequests,0),k=L(b.thresholdConfiguredRequests,0);return{totalRequests:f,thinkingOnRequests:h,thinkingOffRequests:i,unknownRequests:j,autoOffRequests:g,thresholdConfiguredRequests:k,thinkingOnRate:f?h/f:0,thinkingOffRate:f?i/f:0,unknownRate:f?j/f:0,autoOffRate:f?g/f:0,autoOffEligibleHitRate:k?g/k:0,avgPromptChars:L(b.avgPromptChars,0),maxPromptChars:L(b.maxPromptChars,0),avgAutoOffPromptChars:L(b.avgAutoOffPromptChars,0),byReason:c.map(a=>({reason:a.reason||"unknown",requests:L(a.requests,0),share:g?L(a.requests,0)/g:0,avgPromptChars:L(a.avgPromptChars,0),maxPromptChars:L(a.maxPromptChars,0)})),byModel:d.map(a=>{let b=L(a.requests,0),c=L(a.autoOffRequests,0);return{provider:a.provider||"",model:a.model||"",requests:b,thinkingOnRequests:L(a.thinkingOnRequests,0),thinkingOffRequests:L(a.thinkingOffRequests,0),autoOffRequests:c,autoOffRate:b?c/b:0,avgPromptChars:L(a.avgPromptChars,0),maxPromptChars:L(a.maxPromptChars,0)}})}}catch(a){return console.error("[analytics] Failed to build thinking analytics:",a?.message||a),{totalRequests:0,thinkingOnRequests:0,thinkingOffRequests:0,unknownRequests:0,autoOffRequests:0,thresholdConfiguredRequests:0,thinkingOnRate:0,thinkingOffRate:0,unknownRate:0,autoOffRate:0,autoOffEligibleHitRate:0,byReason:[],byModel:[]}}}async function aN(a,b,c){let d=ab(b,c),e={clause:d.clause?`${d.clause} AND ${H}`:`WHERE ${H}`,params:d.params},f="CASE WHEN COALESCE(promptChars, 0) > 0 THEN promptChars ELSE COALESCE(promptTokens, 0) END";try{let b=await a.get(`SELECT
244
+ COUNT(*) AS totalRequests,
245
+ SUM(CASE WHEN ${f} >= 30000 THEN 1 ELSE 0 END) AS gte30kRequests,
246
+ SUM(CASE WHEN ${f} >= 50000 THEN 1 ELSE 0 END) AS gte50kRequests,
247
+ SUM(CASE WHEN ${f} >= 100000 THEN 1 ELSE 0 END) AS gte100kRequests,
248
+ AVG(CASE WHEN ${f} > 0 THEN ${f} END) AS avgRequestSize,
249
+ MAX(${f}) AS maxRequestSize,
250
+ AVG(CASE WHEN ${f} >= 30000 THEN latencyMs END) AS avgLargeLatencyMs,
251
+ AVG(CASE WHEN ${f} >= 30000 THEN ttftMs END) AS avgLargeTtftMs,
252
+ SUM(CASE WHEN ${f} >= 30000 THEN promptTokens ELSE 0 END) AS largePromptTokens,
253
+ SUM(CASE WHEN ${f} >= 30000 THEN completionTokens ELSE 0 END) AS largeCompletionTokens
254
+ FROM usageHistory
255
+ ${e.clause}`,e.params)||{},c=await a.all(`WITH base AS (
256
+ SELECT
257
+ CASE
258
+ WHEN ${f} < 30000 THEN '<30k'
259
+ WHEN ${f} < 50000 THEN '30k-50k'
260
+ WHEN ${f} < 100000 THEN '50k-100k'
261
+ ELSE '>=100k'
262
+ END AS label,
263
+ CASE
264
+ WHEN ${f} < 30000 THEN 1
265
+ WHEN ${f} < 50000 THEN 2
266
+ WHEN ${f} < 100000 THEN 3
267
+ ELSE 4
268
+ END AS sortOrder,
269
+ ${f} AS requestSize,
270
+ promptTokens,
271
+ completionTokens,
272
+ latencyMs,
273
+ ttftMs,
274
+ thinkingAutoOff
275
+ FROM usageHistory
276
+ ${e.clause}
277
+ )
278
+ SELECT label,
279
+ sortOrder,
280
+ COUNT(*) AS requests,
281
+ AVG(CASE WHEN requestSize > 0 THEN requestSize END) AS avgRequestSize,
282
+ MAX(requestSize) AS maxRequestSize,
283
+ AVG(latencyMs) AS avgLatencyMs,
284
+ AVG(CASE WHEN ttftMs > 0 THEN ttftMs END) AS avgTtftMs,
285
+ SUM(promptTokens) AS promptTokens,
286
+ SUM(completionTokens) AS completionTokens,
287
+ SUM(CASE WHEN thinkingAutoOff = 1 THEN 1 ELSE 0 END) AS autoOffRequests
288
+ FROM base
289
+ GROUP BY label, sortOrder
290
+ ORDER BY sortOrder ASC`,e.params)||[],d=L(b.totalRequests,0),g=L(b.gte30kRequests,0),h=L(b.gte50kRequests,0),i=L(b.gte100kRequests,0);return{totalRequests:d,gte30kRequests:g,gte50kRequests:h,gte100kRequests:i,gte30kRate:d?g/d:0,gte50kRate:d?h/d:0,gte100kRate:d?i/d:0,avgRequestSize:L(b.avgRequestSize,0),maxRequestSize:L(b.maxRequestSize,0),avgLargeLatencyMs:L(b.avgLargeLatencyMs,null),avgLargeTtftMs:L(b.avgLargeTtftMs,null),largePromptTokens:L(b.largePromptTokens,0),largeCompletionTokens:L(b.largeCompletionTokens,0),buckets:c.map(a=>{let b=L(a.requests,0),c=L(a.autoOffRequests,0);return{label:a.label,requests:b,share:d?b/d:0,avgRequestSize:L(a.avgRequestSize,0),maxRequestSize:L(a.maxRequestSize,0),avgLatencyMs:L(a.avgLatencyMs,null),avgTtftMs:L(a.avgTtftMs,null),promptTokens:L(a.promptTokens,0),completionTokens:L(a.completionTokens,0),autoOffRequests:c,autoOffRate:b?c/b:0}})}}catch(a){return console.error("[analytics] Failed to build large context analytics:",a?.message||a),{totalRequests:0,gte30kRequests:0,gte50kRequests:0,gte100kRequests:0,gte30kRate:0,gte50kRate:0,gte100kRate:0,buckets:[]}}}async function aO(a,b,c,d={},e=new Map){let[f,g,h,i,j,k,l]=await Promise.all([aH(a,b,c),aK(a,b,c),aF(a,b,c,"model",e),aF(a,b,c,"provider",e),aF(a,b,c,"endpoint",e),aF(a,b,c,"clientIpNormalized",e),aF(a,b,c,"sourceTool",e)]),m=function(a,b={}){let c=new Map;for(let b of a){let a=b.clientKey;if(!a)continue;let d=c.get(a);d||(d={clientKey:a,clientLabel:"",ownerUser:"",apiKeyName:"",apiKeyFingerprint:"",primaryClientIp:"",primarySourceTool:"",apiKeySet:new Set,ipSet:new Set,toolSet:new Set,sessionSet:new Set,requests:0,promptTokens:0,completionTokens:0,totalTokens:0,cost:0,promptArr:[],latencyArr:[],ttftArr:[],maxPromptTokens:0,maxLatencyMs:0,ttftSum:0,longInputRequests:0,hugeInputRequests:0,extremeInputRequests:0,slowRequests:0,slowTtftRequests:0,totalLatencyMs:0,lastSeen:""},c.set(a,d));let e=L(b.promptTokens,0),f=L(b.completionTokens,0),g=L(b.latencyMs,0),h=L(b.ttftMs,0);d.clientLabel=aI(d.clientLabel,b.clientLabel),d.ownerUser=aI(d.ownerUser,b.apiKeyOwner),d.apiKeyName=aI(d.apiKeyName,b.apiKeyName),d.apiKeyFingerprint=aI(d.apiKeyFingerprint,b.apiKeyFingerprint),d.primaryClientIp=aI(d.primaryClientIp,b.clientIpNorm),d.primarySourceTool=aI(d.primarySourceTool,b.sourceToolStable),J(b.apiKeyStable)&&d.apiKeySet.add(J(b.apiKeyStable)),J(b.clientIpNorm)&&d.ipSet.add(J(b.clientIpNorm)),J(b.sourceToolStable)&&d.toolSet.add(J(b.sourceToolStable)),J(b.sessionId)&&d.sessionSet.add(J(b.sessionId)),d.requests+=1,d.promptTokens+=e,d.completionTokens+=f,d.totalTokens+=e+f,d.cost+=L(b.cost,0),d.promptArr.push(e),d.latencyArr.push(g),h>0&&(d.ttftArr.push(h),d.ttftSum+=h),e>d.maxPromptTokens&&(d.maxPromptTokens=e),g>d.maxLatencyMs&&(d.maxLatencyMs=g),e>=3e4&&(d.longInputRequests+=1),e>=5e4&&(d.hugeInputRequests+=1),e>=7e4&&(d.extremeInputRequests+=1),g>=45e3&&(d.slowRequests+=1),h>=2e4&&(d.slowTtftRequests+=1),d.totalLatencyMs+=g,d.lastSeen=aI(d.lastSeen,b.timestamp)}return[...c.values()].sort((a,b)=>b.promptTokens-a.promptTokens||b.totalTokens-a.totalTokens||b.requests-a.requests).slice(0,25).map(a=>(a.promptArr.sort((a,b)=>a-b),a.latencyArr.sort((a,b)=>a-b),a.ttftArr.sort((a,b)=>a-b),aG({clientKey:a.clientKey,clientLabel:a.clientLabel,ownerUser:a.ownerUser,apiKeyName:a.apiKeyName,apiKeyFingerprint:a.apiKeyFingerprint,primaryClientIp:a.primaryClientIp,primarySourceTool:a.primarySourceTool,apiKeyCount:a.apiKeySet.size,sourceIpCount:a.ipSet.size,sourceToolCount:a.toolSet.size,sessionCount:a.sessionSet.size,requests:a.requests,success:a.requests,errors:0,promptTokens:a.promptTokens,completionTokens:a.completionTokens,totalTokens:a.totalTokens,cost:a.cost,avgPromptTokens:a.requests?a.promptTokens/a.requests:0,p50PromptTokens:an(a.promptArr,50),p95PromptTokens:an(a.promptArr,95),maxPromptTokens:a.maxPromptTokens,avgLatencyMs:a.requests?a.totalLatencyMs/a.requests:null,p95LatencyMs:an(a.latencyArr,95),maxLatencyMs:a.maxLatencyMs||null,avgTtftMs:a.ttftArr.length?a.ttftSum/a.ttftArr.length:null,p95TtftMs:an(a.ttftArr,95),longInputRequests:a.longInputRequests,hugeInputRequests:a.hugeInputRequests,extremeInputRequests:a.extremeInputRequests,slowRequests:a.slowRequests,slowTtftRequests:a.slowTtftRequests,totalLatencyMs:a.totalLatencyMs,lastSeen:a.lastSeen},{topModels:b.topModelsByClient?.get(a.clientKey)||[],topProviders:b.topProvidersByClient?.get(a.clientKey)||[],topEndpoints:b.topEndpointsByClient?.get(a.clientKey)||[],topIps:b.topIpsByClient?.get(a.clientKey)||[],topTools:b.topToolsByClient?.get(a.clientKey)||[]})))}(f,{topModelsByClient:h,topProvidersByClient:i,topEndpointsByClient:j,topIpsByClient:k,topToolsByClient:l}),n=aJ(f,{dimension:"apiKey",order:"tokens",limit:25}),o=aJ(f,{dimension:"sourceIp",order:"tokens",limit:25}),p=aJ(f,{dimension:"sourceIp",order:"heavy",limit:25}),q=function(a){let b=aL.map(a=>({...a,requests:0,promptTokens:0,completionTokens:0,totalTokens:0,maxPromptTokens:0,latencyArr:[],ttftArr:[],latencySum:0,ttftSum:0}));for(let c of a){let a=L(c.promptTokens,0),d=L(c.completionTokens,0),e=L(c.latencyMs,0),f=L(c.ttftMs,0),g=b.find(b=>a<b.max)||b[b.length-1];g.requests+=1,g.promptTokens+=a,g.completionTokens+=d,g.totalTokens+=a+d,a>g.maxPromptTokens&&(g.maxPromptTokens=a),g.latencyArr.push(e),g.latencySum+=e,f>0&&(g.ttftArr.push(f),g.ttftSum+=f)}let c=a.length;return b.filter(a=>a.requests>0).map(a=>(a.latencyArr.sort((a,b)=>a-b),a.ttftArr.sort((a,b)=>a-b),{key:a.key,label:a.label,requests:a.requests,share:c?a.requests/c:0,promptTokens:a.promptTokens,completionTokens:a.completionTokens,totalTokens:a.totalTokens,avgPromptTokens:a.requests?a.promptTokens/a.requests:0,maxPromptTokens:a.maxPromptTokens,avgLatencyMs:a.requests?a.latencySum/a.requests:null,p95LatencyMs:an(a.latencyArr,95),maxLatencyMs:a.latencyArr.length?a.latencyArr[a.latencyArr.length-1]:null,avgTtftMs:a.ttftArr.length?a.ttftSum/a.ttftArr.length:null,p95TtftMs:an(a.ttftArr,95)}))}(f),r=m[0]||null,s=n[0]||null,t=o[0]||null,u=p[0]||null,v=m.reduce((a,b)=>a+L(b.totalTokens,0),0),w=L(d.totalTokens,0),x=r&&w?L(r.totalTokens,0)/w:0,y=s&&w?L(s.totalTokens,0)/w:0,z=t&&w?L(t.totalTokens,0)/w:0,A=q.filter(a=>["30k-50k","50k-70k",">=70k"].includes(a.label)).reduce((a,b)=>a+L(b.share,0),0),B=q.find(a=>">=70k"===a.label)||null;return{summary:{trackedUsers:m.length,topUserLabel:r?.label||"-",topUserTokens:r?.totalTokens||0,topUserTokenShare:x,topUsersTokenShare:w?v/w:0,topApiKeyLabel:s?.label||"-",topApiKeyTokens:s?.totalTokens||0,topApiKeyTokenShare:y,topSourceIpLabel:t?.label||"-",topSourceIpTokens:t?.totalTokens||0,topSourceIpTokenShare:z,topSourceIpHeavyLabel:u?.label||"-",topSourceIpHeavyRequests:u?.heavyRequests||0,longInputBucketShare:A,extremeInputShare:B?.share||0,problemClients:g.length},topHeavyUsers:m,topProblemClients:g,topApiKeysByTokens:n,topSourceIpsByTokens:o,topSourceIpsByHeavyRequests:p,inputBuckets:q}}function aP(a){let b=String(a??"");return/[",\n\r]/.test(b)?`"${b.replace(/"/g,'""')}"`:b}function aQ(a){return(function(a){let b=[];for(let[c,d]of(b.push(["section","key","label","requests","success","errors","errorRate","inputTokens","outputTokens","totalTokens","cost","lastSeen"]),[["providers",a.groups.providers],["models",a.groups.models],["providerAccounts",a.groups.providerAccounts],["apiKeys",a.groups.apiKeys],["endpoints",a.groups.endpoints],["clientIps",a.promptLogs.topClientIps],["sourceTools",a.promptLogs.topSourceTools],["requestErrors",a.requestErrors?.topErrors||a.groups.errors],["modelExperience",a.experience?.byModel||[]],["clientHeavyUsers",a.clientRequests?.topHeavyUsers||[]],["clientTopApiKeysByTokens",a.clientRequests?.topApiKeysByTokens||[]],["clientTopSourceIpsByTokens",a.clientRequests?.topSourceIpsByTokens||[]],["clientTopSourceIpsByHeavyRequests",a.clientRequests?.topSourceIpsByHeavyRequests||[]],["clientProblemClients",a.clientRequests?.topProblemClients||[]],["inputBuckets",a.clientRequests?.inputBuckets||[]]]))for(let a of d||[])b.push([c,a.key||"",a.label||a.name||"",a.requests||0,a.success||0,a.errors||0,a.errorRate||0,a.promptTokens||0,a.completionTokens||0,a.totalTokens||0,a.cost||0,a.lastSeen||""]);return b})(a).map(a=>a.map(aP).join(",")).join("\n")}async function aR(a,b=4){let c=[a].filter(Boolean),d=Math.max(0,Math.max(1,Math.min(6,Number(b)||4))-c.length);if(d<=0)return c;for(let a of(await Promise.all(Array.from({length:d},async()=>{try{return await (0,y.d9)()}catch(a){return console.warn("[dashboardAnalytics] Extra MySQL analytics connection unavailable:",a?.message||a),null}}))))a&&c.push(a);return c}function aS(a,b=0){return Array.isArray(a)&&0!==a.length?a[Math.abs(b)%a.length]||a[0]:null}async function aT(a=[]){let b=[...new Set((a||[]).filter(Boolean))];await Promise.all(b.map(a=>a?.close?.().catch(()=>{})))}function aU(a={}){return{rows:[],generatedAt:"",nextRefreshAt:"",refreshEveryMs:9e5,period:A,periodLabel:"H\xf4m nay",status:"warming",...a}}function aV(){return global._dashboardTokenLeaderboard||(global._dashboardTokenLeaderboard={data:aU(),refreshPromise:null,timerStarted:!1,lastError:""}),global._dashboardTokenLeaderboard}async function aW(){let a=W({period:A,timeZone:B}),b=await (0,y.d9)(),c=[b];try{c=await aR(b,1);let d=aS(c,0),e=am(a,null),f=await d.get(`SELECT
291
+ SUM(COALESCE(promptTokens, 0) + COALESCE(completionTokens, 0)) AS totalTokens,
292
+ COUNT(*) AS requests
293
+ FROM usageHistory
294
+ ${e.clause}`,e.params)||{},g=L(f.totalTokens,0),h=await d.all(`WITH base AS (
295
+ SELECT
296
+ COALESCE(NULLIF(apiKeyOwner, ''), NULLIF(apiKeyName, ''), NULLIF(apiKeyFingerprint, ''), NULLIF(apiKeyId, ''), 'local-no-key') AS groupKey,
297
+ COALESCE(NULLIF(apiKeyOwner, ''), '') AS ownerUser,
298
+ COALESCE(NULLIF(apiKeyName, ''), '') AS apiKeyName,
299
+ COALESCE(NULLIF(apiKeyFingerprint, ''), '') AS apiKeyFingerprint,
300
+ COALESCE(NULLIF(apiKeyId, ''), NULLIF(apiKeyFingerprint, ''), NULLIF(apiKey, ''), 'local-no-key') AS apiKeyStable,
301
+ COALESCE(NULLIF(clientIpNormalized, ''), NULLIF(clientIp, ''), '') AS clientIpStable,
302
+ COALESCE(NULLIF(provider, ''), 'unknown') AS providerStable,
303
+ COALESCE(NULLIF(model, ''), 'unknown') AS modelStable,
304
+ timestamp,
305
+ COALESCE(promptTokens, 0) AS promptTokens,
306
+ COALESCE(completionTokens, 0) AS completionTokens,
307
+ COALESCE(cost, 0) AS cost
308
+ FROM usageHistory
309
+ ${e.clause}
310
+ )
311
+ SELECT
312
+ groupKey AS key,
313
+ MAX(ownerUser) AS ownerUser,
314
+ MAX(apiKeyName) AS apiKeyName,
315
+ MAX(apiKeyFingerprint) AS apiKeyFingerprint,
316
+ COUNT(*) AS requests,
317
+ SUM(promptTokens) AS promptTokens,
318
+ SUM(completionTokens) AS completionTokens,
319
+ SUM(promptTokens + completionTokens) AS totalTokens,
320
+ SUM(cost) AS cost,
321
+ COUNT(DISTINCT NULLIF(apiKeyStable, '')) AS apiKeyCount,
322
+ COUNT(DISTINCT NULLIF(clientIpStable, '')) AS sourceIpCount,
323
+ COUNT(DISTINCT modelStable) AS modelCount,
324
+ COUNT(DISTINCT providerStable) AS providerCount,
325
+ MAX(timestamp) AS lastSeen
326
+ FROM base
327
+ GROUP BY groupKey
328
+ ORDER BY totalTokens DESC, requests DESC
329
+ LIMIT ?`,[...e.params,5])||[];return{rows:function(a=[],b=0){return a.map((a,c)=>{let d=c+1,e=L(a.promptTokens,0),f=L(a.completionTokens,0),g=L(a.totalTokens,e+f),h=J(a.ownerUser),i=J(a.apiKeyName),j=J(a.apiKeyFingerprint);return{key:J(a.key)||`${d}`,rank:d,title:C[c]||"Token Royalty",ownerUser:h,label:h||i||j||"Local / kh\xf4ng API key",apiKeyName:i,apiKeyFingerprint:j,requests:L(a.requests,0),promptTokens:e,completionTokens:f,totalTokens:g,cost:L(a.cost,0),apiKeyCount:L(a.apiKeyCount,0),modelCount:L(a.modelCount,0),providerCount:L(a.providerCount,0),sourceIpCount:L(a.sourceIpCount,0),lastSeen:a.lastSeen||"",tokenShare:b?g/b:0}})}(h,g),generatedAt:new Date().toISOString(),nextRefreshAt:new Date(Date.now()+9e5).toISOString(),refreshEveryMs:9e5,period:A,periodLabel:"H\xf4m nay",status:"ready",totalTokens:g,totalRequests:L(f.requests,0)}}finally{await aT(c)}}async function aX(){let a=aV();return a.refreshPromise||(a.refreshPromise=aW().then(b=>(a.data=b,a.lastError="",b)).catch(b=>{let c=b?.message||String(b);return a.lastError=c,a.data=aU({status:a.data?.rows?.length?"stale":"error",error:c}),console.error("[analytics] Failed to refresh token leaderboard:",c),a.data}).finally(()=>{a.refreshPromise=null})),a.refreshPromise}async function aY(a={}){let b=JSON.stringify(W(a)),c=(global._dashboardAnalyticsV2Cache||(global._dashboardAnalyticsV2Cache=new Map),global._dashboardAnalyticsV2Cache),d=c.get(b);if(d&&Date.now()-d.createdAt<3e4){let a=Date.now()-d.createdAt;return aZ&&console.log(`[analytics-timing] cache HIT (age=${a}ms)`),{...d.data,cacheState:"hit",cacheAgeMs:a}}let e=(global._dashboardAnalyticsInflight||(global._dashboardAnalyticsInflight=new Map),global._dashboardAnalyticsInflight),f=e.get(b);if(f)return aZ&&console.log("[analytics-timing] joined in-flight computation"),f.then(a=>({...a,cacheState:"joined"}));aZ&&console.log(`[analytics-timing] cache MISS, computing. key=${b.slice(0,200)}`);let g=a$(a,b,c).finally(()=>{e.delete(b)});return e.set(b,g),g.then(a=>({...a,cacheState:"fresh"}))}let aZ="0"!==process.env.DASHBOARD_ANALYTICS_TIMING;async function a$(a,b,c){let e,f,g,{timed:h,report:i,totalMs:j}=(e=Date.now(),f=[],{timed:(a,b)=>{let c=Date.now();return Promise.resolve(b).finally(()=>{f.push({name:a,ms:Date.now()-c})})},report:()=>{if(!aZ)return;let a=f.sort((a,b)=>b.ms-a.ms).map(a=>`${a.name}=${a.ms}ms`).join(" | ");console.log(`[analytics-timing] total=${g()}ms | ${a}`)},totalMs:g=()=>Date.now()-e}),k=W(a),l=await (0,d.c)(),m=await (0,y.d9)().catch(a=>(console.error("[dashboardAnalytics] MySQL observability query adapter unavailable; SQLite fallback is disabled:",a?.message||a),null));if(!m)throw Error("MySQL observability is not configured or unavailable; SQLite analytics fallback is disabled.");let n=[m];try{n=await h("openAdapters",aR(m,6));let a=aS(n,0),[d,e]=await h("configLoad",Promise.all([Y(l),Z(l)])),f=k.userOwnedOnly?function(a=[],b={}){let c=[...new Set((a||[]).map(a=>K(a)).filter(Boolean))];if(0===c.length)return{enabled:!0,noMatch:!0,owners:[],identifiers:[],ids:[],fingerprints:[]};let d=new Set(c),e=new Set,f=new Set,g=new Set;for(let a of b.all||[]){let b=K(a.ownerUser);b&&d.has(b)&&(a.key&&e.add(a.key),a.id&&(e.add(a.id),f.add(a.id)),a.fingerprint&&(e.add(a.fingerprint),g.add(a.fingerprint)))}return{enabled:!0,noMatch:0===e.size,owners:c,identifiers:[...e],ids:[...f],fingerprints:[...g]}}(k.ownerCandidates,d):k.ownedAnyUserOnly?function(a={}){let b=new Set,c=new Set,d=new Set,e=new Set;for(let f of a.all||[]){let a=K(f.ownerUser);a&&(b.add(a),f.key&&c.add(f.key),f.id&&(c.add(f.id),d.add(f.id)),f.fingerprint&&(c.add(f.fingerprint),e.add(f.fingerprint)))}return{enabled:!0,noMatch:0===c.size&&0===b.size,owners:[...b],identifiers:[...c],ids:[...d],fingerprints:[...e]}}(d):null,g=f?{...k,ownerScope:f}:k,o=function(a,b){let c=K(a);if(!c)return null;let d=[],e=!1;for(let a of(["local","local-no-key","no-key","khong-key","kh\xf4ng-key","kh\xf4ng d\xf9ng api key"].some(a=>a.includes(c)||c.includes(a))&&(e=!0),b.all||[]))[a.key,a.id,a.name,a.ownerUser,a.createdByUser,a.machineId,a.fingerprint,a.masked].some(a=>K(a).includes(c))&&a.key&&d.push(a.key);return a.length>=16&&!d.includes(a)&&d.push(a),{keys:[...new Set(d)],includeLocal:e,noMatch:0===d.length&&!e,filter:c}}(g.apiKey,d),p=g.userOwnedOnly||g.ownedAnyUserOnly?Promise.resolve(function(a="disabled"){return{disabled:!0,reason:a,missing:!1,total:0,sampled:0,dbInfo:{},models:[],stages:[],topClientIps:[],topSourceTools:[],topSessions:[],topStages:[],topModels:[],topAccounts:[],topStatuses:[]}}("user_owned_scope_no_api_key_columns")):w({keyword:g.keyword,model:g.model,sourceTool:g.sourceTool,clientIp:g.clientIp,sessionId:g.sessionId,dateFrom:g.startIso,dateTo:g.endIso,workingTimeRanges:g.workingTimeRanges}),q=(0,x.Wl)({keyword:g.keyword,provider:g.provider,model:g.model,connectionId:g.connectionId,endpoint:g.endpoint,apiKey:g.apiKey,apiKeyScope:f,status:g.status,sourceTool:g.sourceTool,clientIp:g.clientIp,sessionId:g.sessionId,dateFrom:g.startIso,dateTo:g.endIso,workingTimeRanges:g.workingTimeRanges}),[r,s,t,u,v,y]=await Promise.all([h("rangeBounds",ad(aS(n,0),g,o)),h("overview",ae(aS(n,1),g,o)),h("groups",ai(n,g,d,e,o)),h("latency",al(aS(n,3),g,o)),h("promptLogStats",p),h("requestErrorStats",q)]),z=function(a={},b=new Map){if(!a||"object"!=typeof a)return a;let c=a=>Array.isArray(a)?a.map(a=>(function(a={},b=new Map){if(!a||"object"!=typeof a)return a;let c=J(a.provider||a.errorSource||a.providerId),d=J(a.providerLabel)||$(c,b),e={...a};for(let a of["sample","sampleMessage","errorMessage","errorMessageShort","message","details"])"string"==typeof e[a]&&(e[a]=function(a,b,c){let d="string"==typeof a?a:"";return d&&b&&c&&b!==c?d.split(b).join(c):a}(e[a],c,d));return{...e,provider:c,providerLabel:d,label:J(e.label)||d||c||"unknown"}})(a,b)):[];return{...a,topErrors:c(a.topErrors),topServerErrors:c(a.topServerErrors),topClientErrors:c(a.topClientErrors),topRateLimitErrors:c(a.topRateLimitErrors),errorDistribution:c(a.errorDistribution),byFaultOwner:c(a.byFaultOwner),byProvider:c(a.byProvider)}}(y,e),A=z?.summary||{};s.rawErrorEvents=L(z?.total,0),s.serverErrorEvents=L(A.serverImpacting,0),s.gatewayErrorEvents=L(A.gateway,0),s.upstreamErrorEvents=L(A.upstream,0),s.clientErrorEvents=L(A.client,0),s.rateLimitErrorEvents=L(A.rateLimit,0),s.unknownErrorEvents=L(A.unknown,0),s.serverErrorRate=s.requests?s.serverErrorEvents/s.requests:0,s.clientErrorRate=s.requests?s.clientErrorEvents/s.requests:0,s.rateLimitErrorRate=s.requests?s.rateLimitErrorEvents/s.requests:0,z?.topErrors?.length&&(t.errors=z.topErrors);let B=new Map([...d.byKey.entries(),...d.byFingerprint.entries()]),[C,D,E,F,G,H,I]=await Promise.all([h("experience",aq(aS(n,0),g,o,s)),h("clientRequests",aO(aS(n,1),g,o,s,e)),h("thinking",aM(aS(n,2),g,o)),h("largeContext",aN(aS(n,3),g,o)),h("timeSeries",aj(aS(n,2),g,o,r)),h("recentUsage",au(aS(n,3),g,o,B,e)),h("heavyRequests",av(aS(n,0),g,o,B,e))]),[M,N]=await Promise.all([h("modelExperience",ar(aS(n,1),g,o,e)),h("slowRequests",as(aS(n,2),g,o,B,e))]);C.byModel=M,C.slowestRequests=N,s.userExperienceScore=C.score,s.userExperienceLabel=C.label,s.slowRequestRate=C.slowRequestRate,s.longInputRate=C.longInputRate,s.thinkingAutoOffRate=E.autoOffRate||0,s.largeContextRate=F.gte50kRate||0,s.topHeavyUser=D.summary?.topUserLabel||"",s.topHeavyUserTokenShare=D.summary?.topUserTokenShare||0,s.extremeInputShare=D.summary?.extremeInputShare||0;let O=await h("options",aC(a,g,t,v,d,o,e)),P=function({overview:a,groups:b,promptLogStats:c,requestErrorStats:d,experience:e,clientRequests:f}){let g=[],h=d?.summary||{},i=L(h.serverImpacting,0),j=L(h.client,0),k=L(h.rateLimit,0),l=L(a.serverErrorRate,a.requests?i/a.requests:0),m=L(a.clientErrorRate,a.requests?j/a.requests:0);a.requests>=10&&i>=3&&l>=.05?g.push({level:l>=.15?"danger":"warning",title:"Tỷ lệ lỗi server/provider cao",detail:`${i.toLocaleString("vi-VN")} lỗi server-impacting (${(100*l).toFixed(1)}% request) trong khoảng thời gian đang lọc. Ưu ti\xean kiểm tra upstream/provider, gateway, timeout v\xe0 5xx.`}):a.requests>=10&&a.errorRate>=.2&&m>=.1?g.push({level:"warning",title:"Nhiều lỗi do client/request",detail:`${j.toLocaleString("vi-VN")} lỗi được ph\xe2n loại l\xe0 client-side (${(100*m).toFixed(1)}% request): sai endpoint/model/auth/body/context. Kh\xf4ng n\xean t\xednh nh\xf3m n\xe0y như lỗi server.`}):a.requests>=10&&a.errorRate>=.2&&g.push({level:"warning",title:"Tỷ lệ lỗi tổng cao",detail:`Tổng lỗi usage l\xe0 ${(100*a.errorRate).toFixed(1)}%, nhưng lỗi server-impacting chỉ ${(100*l).toFixed(1)}%. Xem ph\xe2n loại client/server b\xean dưới trước khi kết luận provider hỏng.`}),k>=5&&a.requests>0&&k/a.requests>=.05&&g.push({level:"warning",title:"Rate limit / quota đ\xe1ng ch\xfa \xfd",detail:`${k.toLocaleString("vi-VN")} lỗi rate-limit/quota trong khoảng lọc. Kiểm tra policy API key, quota provider hoặc ph\xe2n tải model.`});let n=b.apiKeys?.[0];n&&a.totalTokens>0&&n.totalTokens/a.totalTokens>=.5&&g.push({level:"warning",title:"Một API key d\xf9ng phần lớn token",detail:`${n.name||n.fingerprint} đang d\xf9ng ${(n.totalTokens/a.totalTokens*100).toFixed(1)}% tổng token.`});let o=c?.topClientIps?.[0];o&&c.total>0&&o.requests/c.total>=.5&&o.requests>=20&&g.push({level:"warning",title:"Một IP chiếm phần lớn request prompt log",detail:`${o.label} chiếm ${(o.requests/c.total*100).toFixed(1)}% prompt logs trong to\xe0n bộ dữ liệu khớp bộ lọc.`});let p=d?.topServerErrors?.[0];return p&&p.requests>=5&&g.push({level:p.requests>=20?"danger":"warning",title:"Provider/Gateway c\xf3 lỗi cần xử l\xfd",detail:`${p.providerLabel||p.provider||p.errorSource||"unknown"}/${p.model||"unknown"} c\xf3 ${p.requests.toLocaleString("vi-VN")} lỗi ${p.errorType||p.status||"server-impacting"}.`}),e?.samples>=10&&L(e.slowRequestRate,0)>=.2&&g.push({level:e.slowRequestRate>=.4?"danger":"warning",title:"Nhiều request phản hồi chậm",detail:`${(100*e.slowRequestRate).toFixed(1)}% request th\xe0nh c\xf4ng c\xf3 latency >= 45s. Kiểm tra request input d\xe0i, chờ slot/upstream queue v\xe0 tải model server.`}),e?.samples>=10&&L(e.longInputRate,0)>=.3&&g.push({level:"warning",title:"Tỷ lệ request input d\xe0i cao",detail:`${(100*e.longInputRate).toFixed(1)}% request c\xf3 input >= 30k token. Với VS Code/agent, P95/P99 latency cao c\xf3 thể chủ yếu do prompt eval v\xe0 chờ slot, kh\xf4ng phải do output chậm.`}),f?.summary?.topUserTokenShare>=.35&&g.push({level:f.summary.topUserTokenShare>=.6?"danger":"warning",title:"Token usage tập trung v\xe0o một user/API key",detail:`${f.summary.topUserLabel||"Một client"} đang chiếm ${(100*f.summary.topUserTokenShare).toFixed(1)}% tổng token trong khoảng lọc. N\xean kiểm tra quota, workflow VS Code/agent v\xe0 request input d\xe0i của client n\xe0y.`}),f?.summary?.extremeInputShare>=.1&&g.push({level:f.summary.extremeInputShare>=.25?"danger":"warning",title:"Nhiều request cực d\xe0i >=70k token",detail:`${(100*f.summary.extremeInputShare).toFixed(1)}% request th\xe0nh c\xf4ng c\xf3 input >=70k token. Đ\xe2y l\xe0 nh\xf3m dễ k\xe9o TTFT/P95/P99 l\xean cao v\xe0 l\xe0m request nhỏ phải chờ slot.`}),g}({overview:s,groups:t,promptLogStats:v,requestErrorStats:z,experience:C,clientRequests:D}),Q={generatedAt:new Date().toISOString(),computeMs:j(),analyticsVersion:"v3.6-token-leaderboard",filters:{period:g.period,startIso:g.startIso,endIso:g.endIso,provider:g.provider,model:g.model,connectionId:g.connectionId,status:g.status,endpoint:g.endpoint,apiKey:g.apiKey,clientIp:g.clientIp,sourceTool:g.sourceTool,sessionId:g.sessionId,keyword:g.keyword,userOwnedOnly:g.userOwnedOnly,ownedAnyUserOnly:g.ownedAnyUserOnly},overview:s,latency:u,experience:C,clientRequests:D,tokenLeaderboard:(!function(){let a=aV();if(a.timerStarted)return;a.timerStarted=!0;let b=setTimeout(()=>{aX().catch(()=>{})},1e3);b.unref?.();let c=setInterval(()=>{aX().catch(()=>{})},9e5);c.unref?.()}(),aV().data||aU()),thinkingAnalytics:E,largeContextAnalytics:F,timeSeries:G,groups:t,promptLogs:v,requestErrors:z,anomalies:P,recentUsage:H,heavyRequests:I,options:O,qualityNotes:[]};if(await aT(n),c.set(b,{createdAt:Date.now(),data:Q}),c.size>100){for(let[a,b]of c)if(Date.now()-b.createdAt>3e4&&c.delete(a),c.size<=100)break}return i(),Q}catch(a){throw await aT(n),i(),console.error("[dashboardAnalytics] MySQL observability query failed; SQLite fallback is disabled:",a?.message||a),a}}},50122:(a,b,c)=>{c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},69614:(a,b,c)=>{c.d(b,{V:()=>p});var d=c(88888),e=c(91356),f=c(99129),g=c(73575),h=c(41570),i=c(19035),j=c(24762),k=c(80308),l=c(11980);async function m(a,b,c){if(!(0,i.Gv)(a))throw new f.Ye("Flattened JWS must be an object");if(void 0===a.protected&&void 0===a.header)throw new f.Ye('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==a.protected&&"string"!=typeof a.protected)throw new f.Ye("JWS Protected Header incorrect type");if(void 0===a.payload)throw new f.Ye("JWS Payload missing");if("string"!=typeof a.signature)throw new f.Ye("JWS Signature missing or incorrect type");if(void 0!==a.header&&!(0,i.Gv)(a.header))throw new f.Ye("JWS Unprotected Header incorrect type");let m={};if(a.protected)try{let b=(0,d.D)(a.protected);m=JSON.parse(g.D0.decode(b))}catch{throw new f.Ye("JWS Protected Header is invalid")}if(!(0,i.fz)(m,a.header))throw new f.Ye("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let n={...m,...a.header},o=(0,k.n)(f.Ye,new Map([["b64",!0]]),c?.crit,m,n),p=!0;if(o.has("b64")&&"boolean"!=typeof(p=m.b64))throw new f.Ye('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:q}=n;if("string"!=typeof q||!q)throw new f.Ye('JWS "alg" (Algorithm) Header Parameter missing or invalid');let r=c&&function(a,b){if(void 0!==b&&(!Array.isArray(b)||b.some(a=>"string"!=typeof a)))throw TypeError(`"${a}" option must be an array of strings`);if(b)return new Set(b)}("algorithms",c.algorithms);if(r&&!r.has(q))throw new f.Rb('"alg" (Algorithm) Header Parameter value not allowed');if(p){if("string"!=typeof a.payload)throw new f.Ye("JWS Payload must be a string")}else if("string"!=typeof a.payload&&!(a.payload instanceof Uint8Array))throw new f.Ye("JWS Payload must be a string or an Uint8Array instance");let s=!1;"function"==typeof b&&(b=await b(m,a),s=!0),(0,j.y)(q,b,"verify");let t=(0,g.xW)(void 0!==a.protected?(0,g.lF)(a.protected):new Uint8Array,(0,g.lF)("."),"string"==typeof a.payload?p?(0,g.lF)(a.payload):g.Rd.encode(a.payload):a.payload),u=(0,h.h2)(a.signature,"signature",f.Ye),v=await (0,l.l)(b,q);if(!await (0,e.MX)(q,v,u,t))throw new f.h2;let w={payload:p?(0,h.h2)(a.payload,"payload",f.Ye):"string"==typeof a.payload?g.Rd.encode(a.payload):a.payload};return(void 0!==a.protected&&(w.protectedHeader=m),void 0!==a.header&&(w.unprotectedHeader=a.header),s)?{...w,key:v}:w}async function n(a,b,c){if(a instanceof Uint8Array&&(a=g.D0.decode(a)),"string"!=typeof a)throw new f.Ye("Compact JWS must be a string or Uint8Array");let{0:d,1:e,2:h,length:i}=a.split(".");if(3!==i)throw new f.Ye("Invalid Compact JWS");let j=await m({payload:e,protected:d,signature:h},b,c),k={payload:j.payload,protectedHeader:j.protectedHeader};return"function"==typeof b?{...k,key:j.key}:k}var o=c(17347);async function p(a,b,c){let d=await n(a,b,c);if(d.protectedHeader.crit?.includes("b64")&&!1===d.protectedHeader.b64)throw new f.Dp("JWTs MUST NOT use unencoded payload");let e={payload:(0,o.k6)(d.protectedHeader,d.payload,c),protectedHeader:d.protectedHeader};return"function"==typeof b?{...e,key:d.key}:e}},90389:(a,b,c)=>{c.d(b,{hS:()=>d});let d=Object.freeze({ADMIN:"admin",MONITOR_ADMIN:"monitor_admin",AI_GATEWAYS_MONITOR:"ai_gateways_monitor",USER:"user",GUEST:"guest"});Object.freeze([{href:"/dashboard/endpoint",label:"Endpoint",icon:"api"},{href:"/dashboard/api-keys",label:"API Keys",icon:"vpn_key"},{href:"/dashboard/usage",label:"Usage",icon:"bar_chart"},{href:"/dashboard/analytics",label:"Analytics",icon:"monitoring"},{href:"/dashboard/quota",label:"Quota Tracker",icon:"data_usage"},{href:"/dashboard/prompt-logs",label:"Prompt Logs",icon:"manage_search"}]),Object.freeze(["/dashboard","/dashboard/endpoint","/dashboard/api-keys","/dashboard/usage","/dashboard/analytics","/dashboard/quota","/dashboard/prompt-logs"])},92280:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},94755:(a,b,c)=>{c.d(b,{A:()=>i});var d=c(77598);let e={randomUUID:d.randomUUID},f=new Uint8Array(256),g=f.length;var h=c(50122);let i=function(a,b,c){if(e.randomUUID&&!b&&!a)return e.randomUUID();var i=a,j=c;let k=(i=i||{}).random??i.rng?.()??(g>f.length-16&&((0,d.randomFillSync)(f),g=0),f.slice(g,g+=16));if(k.length<16)throw Error("Random bytes length must be >= 16");if(k[6]=15&k[6]|64,k[8]=63&k[8]|128,b){if((j=j||0)<0||j+16>b.length)throw RangeError(`UUID byte range ${j}:${j+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[j+a]=k[a];return b}return(0,h.k)(k)}}};