9router 0.3.48 → 0.3.49

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 (348) hide show
  1. package/app/.next/BUILD_ID +1 -1
  2. package/app/.next/app-path-routes-manifest.json +41 -41
  3. package/app/.next/build-manifest.json +2 -2
  4. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  5. package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  6. package/app/.next/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  7. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  8. package/app/.next/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  9. package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  10. package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  11. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  12. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  13. package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  14. package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  15. package/app/.next/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  16. package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  17. package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  18. package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  19. package/app/.next/server/app/_global-error.html +2 -2
  20. package/app/.next/server/app/_global-error.rsc +1 -1
  21. package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  22. package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  23. package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  24. package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  25. package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  26. package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  27. package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  28. package/app/.next/server/app/_not-found.html +1 -1
  29. package/app/.next/server/app/_not-found.rsc +3 -3
  30. package/app/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  31. package/app/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  32. package/app/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
  33. package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  34. package/app/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  35. package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  36. package/app/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  37. package/app/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  38. package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route_client-reference-manifest.js +1 -1
  39. package/app/.next/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +1 -1
  40. package/app/.next/server/app/api/cli-tools/claude-settings/route_client-reference-manifest.js +1 -1
  41. package/app/.next/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
  42. package/app/.next/server/app/api/cli-tools/copilot-settings/route_client-reference-manifest.js +1 -1
  43. package/app/.next/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +1 -1
  44. package/app/.next/server/app/api/cli-tools/openclaw-settings/route_client-reference-manifest.js +1 -1
  45. package/app/.next/server/app/api/cli-tools/opencode-settings/route_client-reference-manifest.js +1 -1
  46. package/app/.next/server/app/api/cloud/auth/route_client-reference-manifest.js +1 -1
  47. package/app/.next/server/app/api/cloud/credentials/update/route_client-reference-manifest.js +1 -1
  48. package/app/.next/server/app/api/cloud/model/resolve/route_client-reference-manifest.js +1 -1
  49. package/app/.next/server/app/api/cloud/models/alias/route_client-reference-manifest.js +1 -1
  50. package/app/.next/server/app/api/combos/[id]/route_client-reference-manifest.js +1 -1
  51. package/app/.next/server/app/api/combos/route_client-reference-manifest.js +1 -1
  52. package/app/.next/server/app/api/init/route_client-reference-manifest.js +1 -1
  53. package/app/.next/server/app/api/keys/[id]/route_client-reference-manifest.js +1 -1
  54. package/app/.next/server/app/api/keys/route_client-reference-manifest.js +1 -1
  55. package/app/.next/server/app/api/locale/route_client-reference-manifest.js +1 -1
  56. package/app/.next/server/app/api/models/alias/route_client-reference-manifest.js +1 -1
  57. package/app/.next/server/app/api/models/route.js +1 -1
  58. package/app/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
  59. package/app/.next/server/app/api/models/test/route_client-reference-manifest.js +1 -1
  60. package/app/.next/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +1 -1
  61. package/app/.next/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  62. package/app/.next/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  63. package/app/.next/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +1 -1
  64. package/app/.next/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +1 -1
  65. package/app/.next/server/app/api/oauth/iflow/cookie/route_client-reference-manifest.js +1 -1
  66. package/app/.next/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +1 -1
  67. package/app/.next/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +1 -1
  68. package/app/.next/server/app/api/oauth/kiro/social-authorize/route_client-reference-manifest.js +1 -1
  69. package/app/.next/server/app/api/oauth/kiro/social-exchange/route_client-reference-manifest.js +1 -1
  70. package/app/.next/server/app/api/pricing/route_client-reference-manifest.js +1 -1
  71. package/app/.next/server/app/api/provider-nodes/[id]/route_client-reference-manifest.js +1 -1
  72. package/app/.next/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
  73. package/app/.next/server/app/api/provider-nodes/validate/route_client-reference-manifest.js +1 -1
  74. package/app/.next/server/app/api/providers/[id]/models/route_client-reference-manifest.js +1 -1
  75. package/app/.next/server/app/api/providers/[id]/route_client-reference-manifest.js +1 -1
  76. package/app/.next/server/app/api/providers/[id]/test/route_client-reference-manifest.js +1 -1
  77. package/app/.next/server/app/api/providers/[id]/test-models/route_client-reference-manifest.js +1 -1
  78. package/app/.next/server/app/api/providers/client/route_client-reference-manifest.js +1 -1
  79. package/app/.next/server/app/api/providers/route.js +1 -1
  80. package/app/.next/server/app/api/providers/route_client-reference-manifest.js +1 -1
  81. package/app/.next/server/app/api/providers/test-batch/route_client-reference-manifest.js +1 -1
  82. package/app/.next/server/app/api/providers/validate/route_client-reference-manifest.js +1 -1
  83. package/app/.next/server/app/api/proxy-pools/[id]/route_client-reference-manifest.js +1 -1
  84. package/app/.next/server/app/api/proxy-pools/[id]/test/route_client-reference-manifest.js +1 -1
  85. package/app/.next/server/app/api/proxy-pools/route_client-reference-manifest.js +1 -1
  86. package/app/.next/server/app/api/settings/database/route_client-reference-manifest.js +1 -1
  87. package/app/.next/server/app/api/settings/proxy-test/route_client-reference-manifest.js +1 -1
  88. package/app/.next/server/app/api/settings/require-login/route_client-reference-manifest.js +1 -1
  89. package/app/.next/server/app/api/settings/route_client-reference-manifest.js +1 -1
  90. package/app/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
  91. package/app/.next/server/app/api/tags/route_client-reference-manifest.js +1 -1
  92. package/app/.next/server/app/api/translator/console-logs/route.js +1 -1
  93. package/app/.next/server/app/api/translator/console-logs/route_client-reference-manifest.js +1 -1
  94. package/app/.next/server/app/api/translator/console-logs/stream/route.js +1 -1
  95. package/app/.next/server/app/api/translator/console-logs/stream/route_client-reference-manifest.js +1 -1
  96. package/app/.next/server/app/api/translator/load/route_client-reference-manifest.js +1 -1
  97. package/app/.next/server/app/api/translator/save/route_client-reference-manifest.js +1 -1
  98. package/app/.next/server/app/api/translator/send/route_client-reference-manifest.js +1 -1
  99. package/app/.next/server/app/api/translator/translate/route_client-reference-manifest.js +1 -1
  100. package/app/.next/server/app/api/tunnel/disable/route.js +1 -1
  101. package/app/.next/server/app/api/tunnel/disable/route_client-reference-manifest.js +1 -1
  102. package/app/.next/server/app/api/tunnel/enable/route.js +1 -1
  103. package/app/.next/server/app/api/tunnel/enable/route_client-reference-manifest.js +1 -1
  104. package/app/.next/server/app/api/tunnel/status/route.js +1 -1
  105. package/app/.next/server/app/api/tunnel/status/route_client-reference-manifest.js +1 -1
  106. package/app/.next/server/app/api/usage/[connectionId]/route.js +1 -1
  107. package/app/.next/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
  108. package/app/.next/server/app/api/usage/chart/route_client-reference-manifest.js +1 -1
  109. package/app/.next/server/app/api/usage/history/route_client-reference-manifest.js +1 -1
  110. package/app/.next/server/app/api/usage/providers/route.js +1 -1
  111. package/app/.next/server/app/api/usage/providers/route_client-reference-manifest.js +1 -1
  112. package/app/.next/server/app/api/usage/request-details/route_client-reference-manifest.js +1 -1
  113. package/app/.next/server/app/api/usage/request-logs/route_client-reference-manifest.js +1 -1
  114. package/app/.next/server/app/api/usage/stats/route_client-reference-manifest.js +1 -1
  115. package/app/.next/server/app/api/usage/stream/route.js +1 -1
  116. package/app/.next/server/app/api/usage/stream/route_client-reference-manifest.js +1 -1
  117. package/app/.next/server/app/api/v1/api/chat/route.js +1 -1
  118. package/app/.next/server/app/api/v1/api/chat/route_client-reference-manifest.js +1 -1
  119. package/app/.next/server/app/api/v1/chat/completions/route.js +1 -1
  120. package/app/.next/server/app/api/v1/chat/completions/route_client-reference-manifest.js +1 -1
  121. package/app/.next/server/app/api/v1/embeddings/route.js +1 -1
  122. package/app/.next/server/app/api/v1/embeddings/route_client-reference-manifest.js +1 -1
  123. package/app/.next/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +1 -1
  124. package/app/.next/server/app/api/v1/messages/route.js +1 -1
  125. package/app/.next/server/app/api/v1/messages/route_client-reference-manifest.js +1 -1
  126. package/app/.next/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
  127. package/app/.next/server/app/api/v1/responses/route.js +1 -1
  128. package/app/.next/server/app/api/v1/responses/route_client-reference-manifest.js +1 -1
  129. package/app/.next/server/app/api/v1/route_client-reference-manifest.js +1 -1
  130. package/app/.next/server/app/api/v1beta/models/[...path]/route.js +1 -1
  131. package/app/.next/server/app/api/v1beta/models/[...path]/route_client-reference-manifest.js +1 -1
  132. package/app/.next/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
  133. package/app/.next/server/app/api/version/route.js +1 -1
  134. package/app/.next/server/app/api/version/route_client-reference-manifest.js +1 -1
  135. package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
  136. package/app/.next/server/app/callback.html +1 -1
  137. package/app/.next/server/app/callback.rsc +3 -3
  138. package/app/.next/server/app/callback.segments/_full.segment.rsc +3 -3
  139. package/app/.next/server/app/callback.segments/_head.segment.rsc +1 -1
  140. package/app/.next/server/app/callback.segments/_index.segment.rsc +3 -3
  141. package/app/.next/server/app/callback.segments/_tree.segment.rsc +1 -1
  142. package/app/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  143. package/app/.next/server/app/callback.segments/callback.segment.rsc +1 -1
  144. package/app/.next/server/app/dashboard/cli-tools.html +1 -1
  145. package/app/.next/server/app/dashboard/cli-tools.rsc +5 -5
  146. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  147. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  148. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  149. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  150. package/app/.next/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
  151. package/app/.next/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  152. package/app/.next/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
  153. package/app/.next/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  154. package/app/.next/server/app/dashboard/combos.html +1 -1
  155. package/app/.next/server/app/dashboard/combos.rsc +5 -5
  156. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  157. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  158. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  159. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  160. package/app/.next/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
  161. package/app/.next/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  162. package/app/.next/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
  163. package/app/.next/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  164. package/app/.next/server/app/dashboard/endpoint.html +1 -1
  165. package/app/.next/server/app/dashboard/endpoint.rsc +5 -5
  166. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  167. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  168. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  169. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  170. package/app/.next/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
  171. package/app/.next/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  172. package/app/.next/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
  173. package/app/.next/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  174. package/app/.next/server/app/dashboard/mitm.html +1 -1
  175. package/app/.next/server/app/dashboard/mitm.rsc +5 -5
  176. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  177. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  178. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  179. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  180. package/app/.next/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
  181. package/app/.next/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  182. package/app/.next/server/app/dashboard/mitm.segments/_index.segment.rsc +3 -3
  183. package/app/.next/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  184. package/app/.next/server/app/dashboard/profile.html +1 -1
  185. package/app/.next/server/app/dashboard/profile.rsc +5 -5
  186. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  187. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  188. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  189. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  190. package/app/.next/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
  191. package/app/.next/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  192. package/app/.next/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
  193. package/app/.next/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  194. package/app/.next/server/app/dashboard/providers/new.html +1 -1
  195. package/app/.next/server/app/dashboard/providers/new.rsc +5 -5
  196. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  197. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  198. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  199. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  200. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  201. package/app/.next/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
  202. package/app/.next/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  203. package/app/.next/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
  204. package/app/.next/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  205. package/app/.next/server/app/dashboard/providers.html +1 -1
  206. package/app/.next/server/app/dashboard/providers.rsc +5 -5
  207. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  208. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  209. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  210. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  211. package/app/.next/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
  212. package/app/.next/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  213. package/app/.next/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
  214. package/app/.next/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  215. package/app/.next/server/app/dashboard/proxy-pools.html +1 -1
  216. package/app/.next/server/app/dashboard/proxy-pools.rsc +5 -5
  217. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  218. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  219. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  220. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  221. package/app/.next/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
  222. package/app/.next/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  223. package/app/.next/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +3 -3
  224. package/app/.next/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  225. package/app/.next/server/app/dashboard/quota.html +2 -2
  226. package/app/.next/server/app/dashboard/quota.rsc +4 -4
  227. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +1 -1
  228. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  229. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  230. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  231. package/app/.next/server/app/dashboard/quota.segments/_full.segment.rsc +4 -4
  232. package/app/.next/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  233. package/app/.next/server/app/dashboard/quota.segments/_index.segment.rsc +3 -3
  234. package/app/.next/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  235. package/app/.next/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  236. package/app/.next/server/app/dashboard/settings/pricing.html +1 -1
  237. package/app/.next/server/app/dashboard/settings/pricing.rsc +3 -3
  238. package/app/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
  239. package/app/.next/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  240. package/app/.next/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
  241. package/app/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  242. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  243. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  244. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  245. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  246. package/app/.next/server/app/dashboard/translator.html +1 -1
  247. package/app/.next/server/app/dashboard/translator.rsc +5 -5
  248. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  249. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  250. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  251. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  252. package/app/.next/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
  253. package/app/.next/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  254. package/app/.next/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
  255. package/app/.next/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  256. package/app/.next/server/app/dashboard/usage.html +1 -1
  257. package/app/.next/server/app/dashboard/usage.rsc +5 -5
  258. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  259. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  260. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  261. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  262. package/app/.next/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
  263. package/app/.next/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  264. package/app/.next/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
  265. package/app/.next/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  266. package/app/.next/server/app/dashboard.html +1 -1
  267. package/app/.next/server/app/dashboard.rsc +5 -5
  268. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  269. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  270. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  271. package/app/.next/server/app/dashboard.segments/_full.segment.rsc +5 -5
  272. package/app/.next/server/app/dashboard.segments/_head.segment.rsc +1 -1
  273. package/app/.next/server/app/dashboard.segments/_index.segment.rsc +3 -3
  274. package/app/.next/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  275. package/app/.next/server/app/index.html +1 -1
  276. package/app/.next/server/app/index.rsc +3 -3
  277. package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  278. package/app/.next/server/app/index.segments/_full.segment.rsc +3 -3
  279. package/app/.next/server/app/index.segments/_head.segment.rsc +1 -1
  280. package/app/.next/server/app/index.segments/_index.segment.rsc +3 -3
  281. package/app/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  282. package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
  283. package/app/.next/server/app/landing.html +1 -1
  284. package/app/.next/server/app/landing.rsc +3 -3
  285. package/app/.next/server/app/landing.segments/_full.segment.rsc +3 -3
  286. package/app/.next/server/app/landing.segments/_head.segment.rsc +1 -1
  287. package/app/.next/server/app/landing.segments/_index.segment.rsc +3 -3
  288. package/app/.next/server/app/landing.segments/_tree.segment.rsc +1 -1
  289. package/app/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  290. package/app/.next/server/app/landing.segments/landing.segment.rsc +1 -1
  291. package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
  292. package/app/.next/server/app/login.html +1 -1
  293. package/app/.next/server/app/login.rsc +4 -4
  294. package/app/.next/server/app/login.segments/_full.segment.rsc +4 -4
  295. package/app/.next/server/app/login.segments/_head.segment.rsc +1 -1
  296. package/app/.next/server/app/login.segments/_index.segment.rsc +3 -3
  297. package/app/.next/server/app/login.segments/_tree.segment.rsc +1 -1
  298. package/app/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  299. package/app/.next/server/app/login.segments/login.segment.rsc +1 -1
  300. package/app/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  301. package/app/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  302. package/app/.next/server/app/page_client-reference-manifest.js +1 -1
  303. package/app/.next/server/app-paths-manifest.json +41 -41
  304. package/app/.next/server/chunks/1114.js +1 -1
  305. package/app/.next/server/chunks/1424.js +1 -1
  306. package/app/.next/server/chunks/289.js +1 -1
  307. package/app/.next/server/chunks/318.js +5 -5
  308. package/app/.next/server/chunks/4989.js +2 -2
  309. package/app/.next/server/chunks/5297.js +1 -1
  310. package/app/.next/server/chunks/6182.js +4 -4
  311. package/app/.next/server/chunks/8590.js +1 -1
  312. package/app/.next/server/chunks/8895.js +3 -3
  313. package/app/.next/server/chunks/9201.js +1 -1
  314. package/app/.next/server/chunks/9609.js +1 -1
  315. package/app/.next/server/pages/404.html +1 -1
  316. package/app/.next/server/pages/500.html +2 -2
  317. package/app/.next/server/server-reference-manifest.js +1 -1
  318. package/app/.next/server/server-reference-manifest.json +1 -1
  319. package/app/.next/static/chunks/{5497-e51ea33e5c739a33.js → 5497-612d09a8bc2fb0ac.js} +1 -1
  320. package/app/.next/static/chunks/{619-4c970716a5102dc3.js → 619-c4c101a6a78feeb4.js} +1 -1
  321. package/app/.next/static/chunks/app/{layout-8f69df46423ca2cf.js → layout-facb48b90c716570.js} +1 -1
  322. package/app/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
  323. package/app/node_modules/better-sqlite3/lib/database.js +90 -0
  324. package/app/node_modules/better-sqlite3/lib/index.js +3 -0
  325. package/app/node_modules/better-sqlite3/lib/methods/aggregate.js +43 -0
  326. package/app/node_modules/better-sqlite3/lib/methods/backup.js +67 -0
  327. package/app/node_modules/better-sqlite3/lib/methods/function.js +31 -0
  328. package/app/node_modules/better-sqlite3/lib/methods/inspect.js +7 -0
  329. package/app/node_modules/better-sqlite3/lib/methods/pragma.js +12 -0
  330. package/app/node_modules/better-sqlite3/lib/methods/serialize.js +16 -0
  331. package/app/node_modules/better-sqlite3/lib/methods/table.js +189 -0
  332. package/app/node_modules/better-sqlite3/lib/methods/transaction.js +78 -0
  333. package/app/node_modules/better-sqlite3/lib/methods/wrappers.js +54 -0
  334. package/app/node_modules/better-sqlite3/lib/sqlite-error.js +20 -0
  335. package/app/node_modules/better-sqlite3/lib/util.js +12 -0
  336. package/app/node_modules/better-sqlite3/package.json +59 -0
  337. package/app/node_modules/bindings/bindings.js +221 -0
  338. package/app/node_modules/bindings/package.json +28 -0
  339. package/app/node_modules/file-uri-to-path/index.js +66 -0
  340. package/app/node_modules/file-uri-to-path/package.json +32 -0
  341. package/app/package.json +2 -1
  342. package/app/src/mitm/manager.js +59 -0
  343. package/app/src/mitm/server.js +1 -1
  344. package/app/src/mitm/{server copy.js → server2.js} +188 -35
  345. package/cli.js +97 -56
  346. package/package.json +1 -1
  347. /package/app/.next/static/{eVGIe8IcaLlfBhBZM9a5U → I7Z75b-mEq-yr9pvEanD-}/_buildManifest.js +0 -0
  348. /package/app/.next/static/{eVGIe8IcaLlfBhBZM9a5U → I7Z75b-mEq-yr9pvEanD-}/_ssgManifest.js +0 -0
@@ -3,6 +3,50 @@ const fs = require("fs");
3
3
  const path = require("path");
4
4
  const dns = require("dns");
5
5
  const { promisify } = require("util");
6
+ const Database = require("better-sqlite3");
7
+
8
+ const CURSOR_GLOBAL_DB = path.join(
9
+ process.env.HOME,
10
+ "Library/Application Support/Cursor/User/globalStorage/state.vscdb"
11
+ );
12
+
13
+ // Read full conversation from Cursor global DB
14
+ function readConversationFromDb(conversationId) {
15
+ try {
16
+ const db = new Database(CURSOR_GLOBAL_DB, { readonly: true, fileMustExist: true });
17
+ const stmt = db.prepare("SELECT value FROM cursorDiskKV WHERE key=?");
18
+
19
+ const row = stmt.get(`composerData:${conversationId}`);
20
+ if (!row) { db.close(); return null; }
21
+
22
+ const composer = JSON.parse(row.value);
23
+ const headers = composer.fullConversationHeadersOnly || [];
24
+ const name = composer.name || "";
25
+
26
+ const messages = [];
27
+ for (const h of headers) {
28
+ const brow = stmt.get(`bubbleId:${conversationId}:${h.bubbleId}`);
29
+ if (!brow) continue;
30
+ const bubble = JSON.parse(brow.value);
31
+ const role = h.type === 1 ? "user" : "assistant";
32
+ const text = (bubble.text || "").trim();
33
+ const ts = bubble.createdAt || null;
34
+
35
+ // Tool call bubble (no text but has toolFormerData)
36
+ const tool = bubble.toolFormerData && bubble.toolFormerData.name
37
+ ? { name: bubble.toolFormerData.name, args: bubble.toolFormerData.rawArgs || null, status: bubble.toolFormerData.status || null }
38
+ : null;
39
+
40
+ if (!text && !tool) continue;
41
+ messages.push({ role, text: text || null, tool, ts });
42
+ }
43
+
44
+ db.close();
45
+ return { name, totalMessages: headers.length, messages };
46
+ } catch (e) {
47
+ return { error: e.message };
48
+ }
49
+ }
6
50
 
7
51
  const INTERNAL_REQUEST_HEADER = { name: "x-request-source", value: "local" };
8
52
 
@@ -27,6 +71,8 @@ const CURSOR_JSONL = path.join(CURSOR_LOG_DIR, "cursor_messages.jsonl");
27
71
  const CURSOR_ENDPOINTS = [
28
72
  "/agent.v1.AgentService/RunPoll",
29
73
  "/aiserver.v1.BidiService/BidiAppend",
74
+ "/agent.v1.AgentService/Run",
75
+ "/agent.v1.AgentService/RunSSE",
30
76
  ];
31
77
 
32
78
  /**
@@ -265,29 +311,67 @@ function decodeBidiAppend(buf) {
265
311
  return result;
266
312
  }
267
313
 
268
- // AgentClientMessage oneof: f1=AgentRunRequest, f4=ConversationAction, f7=ClientHeartbeat
314
+ // AgentClientMessage oneof: f1=AgentRunRequest, f2=ExecClientMessage, f3=KvClientMessage, f4=ConversationAction, f5=ExecClientControlMessage, f6=InteractionResponse, f7=ClientHeartbeat
269
315
  function decodeAgentClientMsg(buf) {
270
316
  const fields = protoWalkFields(buf);
271
317
  for (const f of fields) {
272
- if (!f.data) continue;
273
- if (f.field === 1) return { type: "AgentRunRequest", ...decodeAgentRunRequest(f.data) };
274
- if (f.field === 4) return { type: "ConversationAction", ...decodeConversationAction(f.data) };
318
+ // f7=ClientHeartbeat: wire-type 2 but empty (len=0), data is Buffer(0)
275
319
  if (f.field === 7) return { type: "ClientHeartbeat" };
276
- if (f.field === 2) return { type: "ExecClientMessage" };
320
+ if (f.data === undefined || f.data === null) continue;
321
+ if (f.field === 1 && f.data.length > 0) return { type: "AgentRunRequest", ...decodeAgentRunRequest(f.data) };
322
+ if (f.field === 2 && f.data.length > 0) return { type: "ExecClientMessage", ...decodeExecClientMessage(f.data) };
323
+ if (f.field === 3) return { type: "KvClientMessage" };
324
+ if (f.field === 4 && f.data.length > 0) return { type: "ConversationAction", ...decodeConversationAction(f.data) };
325
+ if (f.field === 5) return { type: "ExecClientControlMessage" };
326
+ if (f.field === 6) return { type: "InteractionResponse" };
277
327
  }
278
328
  return { type: "unknown" };
279
329
  }
280
330
 
281
- // AgentRunRequest: f1=conversation_state, f2=action, f3=model_details, f5=conversation_id
331
+ // AgentRunRequest: f1=conversation_state, f2=action, f3=model_details, f4=mcp_tools, f5=conversation_id, f6=mcp_file_system_options, f7=skill_options
282
332
  function decodeAgentRunRequest(buf) {
283
333
  const fields = protoWalkFields(buf);
284
334
  const result = {};
285
335
 
286
336
  for (const f of fields) {
337
+ if (f.field === 1 && f.data) result.state = decodeConversationState(f.data);
338
+ if (f.field === 2 && f.data) result.action = decodeConversationAction(f.data);
287
339
  if (f.field === 3 && f.data) result.model = decodeModelDetails(f.data);
340
+ if (f.field === 4 && f.data) result.mcpTools = decodeMcpTools(f.data);
288
341
  if (f.field === 5 && f.data) result.conversationId = protoStr(f.data);
289
- if (f.field === 2 && f.data) result.action = decodeConversationAction(f.data);
290
- if (f.field === 1 && f.data) result.state = decodeConversationState(f.data);
342
+ }
343
+ return result;
344
+ }
345
+
346
+ // McpTools: f1=repeated McpDescriptor (f1=serverName, f2=repeated tools)
347
+ function decodeMcpTools(buf) {
348
+ const fields = protoWalkFields(buf);
349
+ const descriptors = [];
350
+ for (const f of fields) {
351
+ if (f.field === 1 && f.data) {
352
+ const inner = protoWalkFields(f.data);
353
+ const name = inner.find(x => x.field === 1 && x.data);
354
+ const tools = inner.filter(x => x.field === 2 && x.data).map(t => {
355
+ const tf = protoWalkFields(t.data);
356
+ const tname = tf.find(x => x.field === 1 && x.data);
357
+ return tname ? protoStr(tname.data) : null;
358
+ }).filter(Boolean);
359
+ descriptors.push({ server: name ? protoStr(name.data) : null, tools });
360
+ }
361
+ }
362
+ return descriptors;
363
+ }
364
+
365
+ // ExecClientMessage: f1=id(uint32), f2=shellResult, f3=writeResult, etc.
366
+ function decodeExecClientMessage(buf) {
367
+ const fields = protoWalkFields(buf);
368
+ const result = { id: null, execId: null, resultType: "unknown" };
369
+ for (const f of fields) {
370
+ if (f.field === 1 && f.value !== undefined) result.id = f.value;
371
+ if (f.field === 15 && f.data) result.execId = protoStr(f.data);
372
+ // Detect result type by field number (oneof)
373
+ const resultTypes = { 2: "shellResult", 3: "writeResult", 4: "deleteResult", 5: "grepResult", 7: "readResult", 8: "lsResult", 9: "diagnosticsResult", 10: "requestContextResult", 11: "mcpResult", 14: "shellStream", 16: "backgroundShellSpawnResult" };
374
+ if (f.data && resultTypes[f.field]) result.resultType = resultTypes[f.field];
291
375
  }
292
376
  return result;
293
377
  }
@@ -307,15 +391,19 @@ function decodeModelDetails(buf) {
307
391
  return result;
308
392
  }
309
393
 
310
- // ConversationAction: f1 → f1 → f1=text, f2=uuid, f8=lexical_json
311
- // f1 → f2 → repeated f2=turns, f7=selected_context, f23=system_prompt
394
+ // ConversationAction: f1=StartChatAction → f1=userMsg{f1=text,f2=uuid,f8=lexical}, f2=history{f2=contextFiles,f7=tools}
312
395
  function decodeConversationAction(buf) {
313
396
  const result = {};
314
397
  const topFields = protoWalkFields(buf);
315
398
 
316
- // action.f1 wrapper
317
- const f1 = topFields.find(f => f.field === 1 && f.data);
318
- if (!f1) return result;
399
+ // action.f1 = StartChatAction wrapper
400
+ const f1 = topFields.find(f => f.field === 1 && f.data && f.data.length > 0);
401
+ if (!f1) {
402
+ // No StartChatAction — show which fields are present for debugging
403
+ const presentFields = topFields.map(f => `f${f.field}`);
404
+ if (presentFields.length > 0) result._fields = presentFields;
405
+ return result;
406
+ }
319
407
  const f1Fields = protoWalkFields(f1.data);
320
408
 
321
409
  // ── User message: action.f1.f1 ──────────────────────────────
@@ -422,61 +510,126 @@ function protoTreeToObj(buf, depth = 0) {
422
510
  }
423
511
  }
424
512
  return result;
425
-
426
- return result;
427
513
  }
428
514
 
429
- // ConversationStateStructure: f1=root_prompt_messages_json(bytes[]), f8=turns(bytes[])
515
+ // ConversationStateStructure: f1=root_prompt_messages_json(encrypted bytes), f3=todos, f8=turns, f10=mode
430
516
  function decodeConversationState(buf) {
431
517
  const fields = protoWalkFields(buf);
432
- const messages = [], turns = [];
518
+ const turns = [], todos = [];
519
+ let mode = null, messageCount = 0;
433
520
  for (const f of fields) {
521
+ if (f.field === 10 && f.value !== undefined) {
522
+ const modes = ["unspecified", "agent", "ask", "plan", "debug", "triage"];
523
+ mode = modes[f.value] || `mode_${f.value}`;
524
+ }
434
525
  if (!f.data) continue;
435
526
  if (f.field === 1) {
436
- // root_prompt_messages_json — each is a bytes field containing JSON string
437
- const s = protoStr(f.data);
438
- if (s) { try { messages.push(JSON.parse(s)); } catch { messages.push(s.substring(0, 500)); } }
527
+ // Encrypted bytes — just count, cannot decode
528
+ messageCount++;
439
529
  } else if (f.field === 8) {
440
- // turns — bytes, try get readable strings
530
+ // f8 = repeated bytes (ConversationTurn OR encrypted blob)
531
+ // Encrypted turns: binary blobs that don't parse as valid proto strings
532
+ if (f.data.length === 32) continue; // 32-byte encrypted blob
441
533
  const inner = protoWalkFields(f.data);
442
- const strs = inner.filter(x => x.data && protoStr(x.data)).map(x => protoStr(x.data)).filter(s => s.length > 5);
443
- if (strs.length) turns.push(strs.slice(0, 5));
534
+ const strs = inner.filter(x => x.data).map(x => protoStr(x.data)).filter(s => s && s.length > 3);
535
+ if (strs.length) turns.push(strs.slice(0, 3));
536
+ } else if (f.field === 3) {
537
+ // f3 = repeated bytes (TodoItem OR encrypted blob)
538
+ // Encrypted: 32-byte binary (shows as 64-char hex in protoStr-reject path)
539
+ // TodoItem: f1=id(str), f2=content(str), f3=status(varint)
540
+ if (f.data.length === 32) {
541
+ // 32 bytes = encrypted blob, skip
542
+ continue;
543
+ }
544
+ const inner = protoWalkFields(f.data);
545
+ const id = inner.find(x => x.field === 1 && x.data);
546
+ const content = inner.find(x => x.field === 2 && x.data);
547
+ const status = inner.find(x => x.field === 3 && x.value !== undefined);
548
+ const idStr = id ? protoStr(id.data) : null;
549
+ const contentStr = content ? protoStr(content.data) : null;
550
+ // If neither id nor content is readable string, it's encrypted
551
+ if (!idStr && !contentStr) continue;
552
+ const statusMap = ["unspecified", "pending", "in_progress", "completed", "cancelled"];
553
+ todos.push({
554
+ id: idStr,
555
+ content: contentStr,
556
+ status: status ? (statusMap[status.value] || `status_${status.value}`) : null,
557
+ });
444
558
  }
445
559
  }
446
- return { messages: messages.slice(0, 10), turns: turns.slice(0, 5) };
560
+ return { mode, messageCount, turns: turns.slice(0, 5), todos: todos.slice(0, 20) };
447
561
  }
448
562
 
449
563
  // ── Save per-chat JSON file ────────────────────────────────────
450
564
  function saveCursorLogFull(url, headers, buf) {
451
565
  try {
452
- if (!url.includes("BidiAppend") || buf.length < 2 || buf[0] !== 0x1f || buf[1] !== 0x8b) return;
566
+ if (buf.length < 5) return;
453
567
 
454
- const decompressed = zlib.gunzipSync(buf);
568
+ const isBidiAppend = url.includes("BidiAppend");
569
+ const isRunPoll = url.includes("RunPoll");
570
+ if (!isBidiAppend && !isRunPoll) return;
455
571
 
572
+ // Decompress if gzip, otherwise use raw
573
+ let raw;
574
+ const isGzip = buf[0] === 0x1f && buf[1] === 0x8b;
575
+ if (isGzip) {
576
+ raw = zlib.gunzipSync(buf);
577
+ } else {
578
+ // Try strip Connect-RPC envelope if present (flag byte + 4-byte length)
579
+ raw = (buf[0] === 0x00 || buf[0] === 0x01) ? buf.slice(5) : buf;
580
+ }
456
581
 
457
- const decoded = decodeBidiAppend(decompressed);
582
+ const endpoint = isBidiAppend ? "BidiAppend" : "RunPoll";
583
+ let decoded = {};
584
+ let userMessage = null;
458
585
 
459
- const action = decoded?.agentMsg?.action || {};
460
- const userMessage = action.textFull || action.text || null;
586
+ if (isBidiAppend) {
587
+ decoded = decodeBidiAppend(raw);
588
+ const action = decoded?.agentMsg?.action || {};
589
+ userMessage = action.textFull || action.text || null;
590
+ } else {
591
+ // RunPoll: BidiPollRequest — f1=requestId{f1=uuid}, f2=startRequest
592
+ const fields = protoWalkFields(raw);
593
+ for (const f of fields) {
594
+ if (f.field === 1 && f.data) {
595
+ const inner = protoWalkFields(f.data);
596
+ const id = inner.find(x => x.field === 1 && x.data);
597
+ decoded.requestId = id ? protoStr(id.data) : null;
598
+ }
599
+ if (f.field === 2) decoded.startRequest = f.value === 1;
600
+ }
601
+ }
602
+
603
+ // Fetch conversation history from local Cursor DB when AgentRunRequest detected
604
+ const conversationId = decoded?.agentMsg?.conversationId || null;
605
+ let conversation = null;
606
+ if (conversationId && decoded?.agentMsg?.type === "AgentRunRequest") {
607
+ conversation = readConversationFromDb(conversationId);
608
+ }
461
609
 
462
610
  const ts = new Date().toISOString().replace(/[:.]/g, "-");
463
- const base = path.join(CURSOR_LOG_DIR, ts);
611
+ const base = path.join(CURSOR_LOG_DIR, `${ts}_${endpoint}`);
464
612
 
465
613
  // _chat.json — structured decoded
466
614
  fs.writeFileSync(`${base}_chat.json`, JSON.stringify({
467
615
  ts: new Date().toISOString(),
468
- version: headers["x-cursor-client-version"],
469
- sizeGzip: buf.length,
470
- sizeRaw: decompressed.length,
616
+ endpoint,
617
+ version: headers["x-cursor-client-version"] || null,
618
+ encoding: isGzip ? "gzip" : "raw",
619
+ sizeIn: buf.length,
620
+ sizeRaw: raw.length,
471
621
  userMessage,
472
622
  decoded,
623
+ conversation,
473
624
  }, null, 2));
474
625
 
475
626
  // _decoded.json — full proto tree, no filtering
476
- const tree = protoTreeToObj(decompressed);
627
+ const tree = protoTreeToObj(raw);
477
628
  fs.writeFileSync(`${base}_decoded.json`, JSON.stringify(tree, null, 2));
478
629
 
479
- console.log(`[CURSOR] ${ts}_chat.json | type=${decoded?.agentMsg?.type} | msg=${userMessage || "(none)"}`);
630
+ const agentType = decoded?.agentMsg?.type || decoded?.requestId || "(none)";
631
+ const convName = conversation?.name ? ` | conv="${conversation.name}" (${conversation.totalMessages} msgs)` : "";
632
+ console.log(`[CURSOR] ${endpoint} | type=${agentType} | msg=${userMessage || "(none)"}${convName} | ${isGzip ? "gzip" : "raw"} ${buf.length}B`);
480
633
  } catch (e) {
481
634
  console.error(`[CURSOR] decode error: ${e.message}`);
482
635
  }
package/cli.js CHANGED
@@ -123,17 +123,17 @@ function killAllAppProcesses() {
123
123
  if (platform === "win32") {
124
124
  // Windows: use tasklist + findstr (works on all Windows versions)
125
125
  try {
126
- const output = execSync('tasklist /FO CSV /V 2>nul | findstr /I "node"', {
126
+ const output = execSync('tasklist /FO CSV /V 2>nul | findstr /I "node"', {
127
127
  encoding: 'utf8',
128
128
  shell: true,
129
129
  windowsHide: true,
130
130
  timeout: 5000
131
131
  });
132
132
  const lines = output.split('\n').filter(l => l.trim());
133
-
133
+
134
134
  lines.forEach(line => {
135
- const isAppProcess = line.toLowerCase().includes("9router") ||
136
- line.toLowerCase().includes("next-server");
135
+ const isAppProcess = line.toLowerCase().includes("9router") ||
136
+ line.toLowerCase().includes("next-server");
137
137
  if (isAppProcess) {
138
138
  // CSV format: "name","pid",...
139
139
  const match = line.match(/"node\.exe","(\d+)"/i);
@@ -148,12 +148,12 @@ function killAllAppProcesses() {
148
148
  } else {
149
149
  // macOS/Linux: use ps to find all matching processes
150
150
  try {
151
- const output = execSync('ps aux 2>/dev/null', {
151
+ const output = execSync('ps aux 2>/dev/null', {
152
152
  encoding: 'utf8',
153
153
  timeout: 5000
154
154
  });
155
155
  const lines = output.split('\n');
156
-
156
+
157
157
  lines.forEach(line => {
158
158
  const isAppProcess = line.includes("9router") || line.includes("next-server");
159
159
  if (isAppProcess) {
@@ -182,7 +182,7 @@ function killAllAppProcesses() {
182
182
  // Process already dead or can't kill - continue
183
183
  }
184
184
  });
185
-
185
+
186
186
  // Wait for processes to fully terminate
187
187
  setTimeout(() => resolve(), 1000);
188
188
  } else {
@@ -204,11 +204,11 @@ function killProcessOnPort(port) {
204
204
 
205
205
  if (platform === "win32") {
206
206
  try {
207
- const output = execSync(`netstat -ano | findstr :${port}`, {
208
- encoding: 'utf8',
207
+ const output = execSync(`netstat -ano | findstr :${port}`, {
208
+ encoding: 'utf8',
209
209
  shell: true,
210
210
  windowsHide: true,
211
- timeout: 5000
211
+ timeout: 5000
212
212
  }).trim();
213
213
  const lines = output.split('\n').filter(l => l.includes('LISTENING'));
214
214
  if (lines.length > 0) {
@@ -221,9 +221,9 @@ function killProcessOnPort(port) {
221
221
  } else {
222
222
  // macOS/Linux
223
223
  try {
224
- const pidOutput = execSync(`lsof -ti:${port}`, {
225
- encoding: 'utf8',
226
- stdio: ['pipe', 'pipe', 'ignore']
224
+ const pidOutput = execSync(`lsof -ti:${port}`, {
225
+ encoding: 'utf8',
226
+ stdio: ['pipe', 'pipe', 'ignore']
227
227
  }).trim();
228
228
  if (pidOutput) {
229
229
  pid = pidOutput.split('\n')[0];
@@ -250,12 +250,12 @@ function isRestrictedEnvironment() {
250
250
  if (process.env.CODESPACES === "true" || process.env.GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN) {
251
251
  return "GitHub Codespaces";
252
252
  }
253
-
253
+
254
254
  // Check for Docker
255
255
  if (fs.existsSync("/.dockerenv") || (fs.existsSync("/proc/1/cgroup") && fs.readFileSync("/proc/1/cgroup", "utf8").includes("docker"))) {
256
256
  return "Docker";
257
257
  }
258
-
258
+
259
259
  return null;
260
260
  }
261
261
 
@@ -380,7 +380,7 @@ fi
380
380
  function openBrowser(url) {
381
381
  const platform = process.platform;
382
382
  let cmd;
383
-
383
+
384
384
  if (platform === "darwin") {
385
385
  cmd = `open "${url}"`;
386
386
  } else if (platform === "win32") {
@@ -388,7 +388,7 @@ function openBrowser(url) {
388
388
  } else {
389
389
  cmd = `xdg-open "${url}"`;
390
390
  }
391
-
391
+
392
392
  exec(cmd, (err) => {
393
393
  if (err) {
394
394
  console.log(`Open browser manually: ${url}`);
@@ -420,11 +420,11 @@ async function showInterfaceMenu(latestVersion) {
420
420
  const { selectMenu } = require("./src/cli/utils/input");
421
421
  const { clearScreen } = require("./src/cli/utils/display");
422
422
  const { getEndpoint } = require("./src/cli/utils/endpoint");
423
-
423
+
424
424
  clearScreen();
425
-
425
+
426
426
  const displayHost = host === DEFAULT_HOST ? "localhost" : host;
427
-
427
+
428
428
  // Detect tunnel/local mode for server URL display
429
429
  let serverUrl;
430
430
  try {
@@ -433,26 +433,26 @@ async function showInterfaceMenu(latestVersion) {
433
433
  } catch (e) {
434
434
  serverUrl = `http://${displayHost}:${port}`;
435
435
  }
436
-
436
+
437
437
  const subtitle = `šŸš€ Server: \x1b[32m${serverUrl}\x1b[0m`;
438
-
438
+
439
439
  const menuItems = [];
440
-
440
+
441
441
  if (latestVersion) {
442
442
  menuItems.push({ label: `Update to v${latestVersion} (current: v${pkg.version})`, icon: "⬆" });
443
443
  }
444
-
444
+
445
445
  menuItems.push(
446
446
  { label: "Web UI (Open in Browser)", icon: "🌐" },
447
447
  { label: "Terminal UI (Interactive CLI)", icon: "šŸ’»" },
448
448
  { label: "Hide to Tray (Background)", icon: "šŸ””" },
449
449
  { label: "Exit", icon: "🚪" }
450
450
  );
451
-
451
+
452
452
  const selected = await selectMenu(`Choose Interface (v${pkg.version})`, menuItems, 0, subtitle);
453
-
453
+
454
454
  const offset = latestVersion ? 1 : 0;
455
-
455
+
456
456
  if (latestVersion && selected === 0) return "update";
457
457
  if (selected === offset) return "web";
458
458
  if (selected === offset + 1) return "terminal";
@@ -460,20 +460,31 @@ async function showInterfaceMenu(latestVersion) {
460
460
  return "exit";
461
461
  }
462
462
 
463
+ const MAX_RESTARTS = 5;
464
+ const RESTART_RESET_MS = 30000; // Reset counter if alive > 30s
465
+
463
466
  function startServer(latestVersion) {
464
467
  const displayHost = host === DEFAULT_HOST ? "localhost" : host;
465
468
  const url = `http://${displayHost}:${port}/dashboard`;
466
469
 
467
- const server = spawn(RUNTIME, [serverPath], {
468
- cwd: standaloneDir,
469
- stdio: showLog ? "inherit" : "ignore",
470
- detached: true,
471
- env: {
472
- ...process.env,
473
- PORT: port.toString(),
474
- HOSTNAME: host
475
- }
476
- });
470
+ let restartCount = 0;
471
+ let serverStartTime = Date.now();
472
+
473
+ function spawnServer() {
474
+ serverStartTime = Date.now();
475
+ return spawn(RUNTIME, [serverPath], {
476
+ cwd: standaloneDir,
477
+ stdio: showLog ? "inherit" : "ignore",
478
+ detached: true,
479
+ env: {
480
+ ...process.env,
481
+ PORT: port.toString(),
482
+ HOSTNAME: host
483
+ }
484
+ });
485
+ }
486
+
487
+ let server = spawnServer();
477
488
 
478
489
  // Cleanup function - force kill server process
479
490
  let isCleaningUp = false;
@@ -485,14 +496,14 @@ function startServer(latestVersion) {
485
496
  try {
486
497
  const { killTray } = require("./src/cli/tray/tray");
487
498
  killTray();
488
- } catch (e) {}
499
+ } catch (e) { }
489
500
  // Kill server process directly
490
501
  if (server.pid) {
491
502
  process.kill(server.pid, "SIGKILL");
492
503
  }
493
504
  // Also try to kill process group
494
505
  process.kill(-server.pid, "SIGKILL");
495
- } catch (e) {}
506
+ } catch (e) { }
496
507
  }
497
508
 
498
509
  // Suppress all errors during shutdown (systray lib throws JSON parse errors)
@@ -546,13 +557,13 @@ function startServer(latestVersion) {
546
557
  if (trayMode) {
547
558
  console.log(`\nšŸš€ ${pkg.name} v${pkg.version}`);
548
559
  console.log(`Server: http://${displayHost}:${port}`);
549
-
560
+
550
561
  setTimeout(() => {
551
562
  initTrayIcon();
552
563
  console.log("\nšŸ’” Router is now running in system tray. Close this terminal if you want.");
553
564
  console.log(" Right-click tray icon to open dashboard or quit.\n");
554
565
  }, 2000);
555
-
566
+
556
567
  return;
557
568
  }
558
569
 
@@ -560,11 +571,11 @@ function startServer(latestVersion) {
560
571
  setTimeout(async () => {
561
572
  // Start tray icon alongside TUI
562
573
  initTrayIcon();
563
-
574
+
564
575
  try {
565
576
  while (true) {
566
577
  const choice = await showInterfaceMenu(latestVersion);
567
-
578
+
568
579
  if (choice === "update") {
569
580
  cleanup();
570
581
  performUpdate();
@@ -583,7 +594,7 @@ function startServer(latestVersion) {
583
594
  // Hide to tray - spawn detached background process
584
595
  const { clearScreen } = require("./src/cli/utils/display");
585
596
  clearScreen();
586
-
597
+
587
598
  // Enable auto startup on OS boot
588
599
  try {
589
600
  const { enableAutoStart } = require("./src/cli/tray/autostart");
@@ -591,8 +602,8 @@ function startServer(latestVersion) {
591
602
  if (enabled) {
592
603
  console.log("āœ… Auto-start enabled (will run on OS boot)");
593
604
  }
594
- } catch (e) {}
595
-
605
+ } catch (e) { }
606
+
596
607
  // Spawn new detached process with --tray flag
597
608
  const bgProcess = spawn(process.execPath, [__filename, "--tray", "--skip-update", "-p", port.toString()], {
598
609
  detached: true,
@@ -600,13 +611,13 @@ function startServer(latestVersion) {
600
611
  env: { ...process.env }
601
612
  });
602
613
  bgProcess.unref();
603
-
614
+
604
615
  console.log(`\nšŸ”” 9Router is now running in background (PID: ${bgProcess.pid})`);
605
616
  console.log(` Server: http://${displayHost}:${port}`);
606
617
  console.log(`\nšŸ’” You can close this terminal. Right-click tray icon to:`);
607
618
  console.log(` • Open Dashboard`);
608
619
  console.log(` • Quit\n`);
609
-
620
+
610
621
  // Exit current process - background process takes over
611
622
  cleanup();
612
623
  process.exit(0);
@@ -624,13 +635,43 @@ function startServer(latestVersion) {
624
635
  }
625
636
  }, 3000);
626
637
 
627
- server.on("error", (err) => {
628
- console.error("Failed to start server:", err.message);
629
- cleanup();
630
- process.exit(1);
631
- });
638
+ function attachServerEvents() {
639
+ server.on("error", (err) => {
640
+ console.error("Failed to start server:", err.message);
641
+ if (!isShuttingDown) tryRestart();
642
+ else { cleanup(); process.exit(1); }
643
+ });
632
644
 
633
- server.on("close", (code) => {
634
- process.exit(code || 0);
635
- });
645
+ server.on("close", (code) => {
646
+ if (isShuttingDown || code === 0) {
647
+ process.exit(code || 0);
648
+ return;
649
+ }
650
+ tryRestart(code);
651
+ });
652
+ }
653
+
654
+ function tryRestart(code) {
655
+ const aliveMs = Date.now() - serverStartTime;
656
+ // Reset counter if last run was stable
657
+ if (aliveMs >= RESTART_RESET_MS) restartCount = 0;
658
+
659
+ if (restartCount >= MAX_RESTARTS) {
660
+ console.error(`\nāŒ Server crashed ${MAX_RESTARTS} times. Giving up.`);
661
+ cleanup();
662
+ process.exit(1);
663
+ return;
664
+ }
665
+
666
+ restartCount++;
667
+ const delay = Math.min(1000 * restartCount, 10000);
668
+ console.error(`\nāš ļø Server exited (code=${code ?? "unknown"}). Restarting in ${delay / 1000}s... (${restartCount}/${MAX_RESTARTS})`);
669
+
670
+ setTimeout(() => {
671
+ server = spawnServer();
672
+ attachServerEvents();
673
+ }, delay);
674
+ }
675
+
676
+ attachServerEvents();
636
677
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "9router",
3
- "version": "0.3.48",
3
+ "version": "0.3.49",
4
4
  "description": "9Router CLI - Start and manage 9Router server",
5
5
  "bin": {
6
6
  "9router": "./cli.js"