vibepulse 0.2.2 → 0.3.1-beta

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 (424) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +1 -0
  3. package/.next/build-manifest.json +2 -2
  4. package/.next/cache/.previewinfo +1 -1
  5. package/.next/cache/.rscinfo +1 -1
  6. package/.next/cache/.tsbuildinfo +1 -1
  7. package/.next/cache/config.json +3 -3
  8. package/.next/fallback-build-manifest.json +2 -2
  9. package/.next/prerender-manifest.json +3 -3
  10. package/.next/routes-manifest.json +8 -0
  11. package/.next/server/app/_global-error/page.js +1 -1
  12. package/.next/server/app/_global-error/page.js.nft.json +1 -1
  13. package/.next/server/app/_global-error.html +2 -2
  14. package/.next/server/app/_global-error.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  16. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  17. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  18. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  19. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  20. package/.next/server/app/_not-found/page.js +1 -1
  21. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  22. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  23. package/.next/server/app/_not-found.html +1 -1
  24. package/.next/server/app/_not-found.rsc +2 -2
  25. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  26. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  27. package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  28. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  29. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  30. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  31. package/.next/server/app/api/node/events/route.js +2 -2
  32. package/.next/server/app/api/node/events/route.js.nft.json +1 -1
  33. package/.next/server/app/api/node/sessions/[id]/delete/route.js +2 -2
  34. package/.next/server/app/api/node/sessions/[id]/delete/route.js.nft.json +1 -1
  35. package/.next/server/app/api/node/sessions/[id]/open-editor/route.js +2 -2
  36. package/.next/server/app/api/node/sessions/[id]/open-editor/route.js.nft.json +1 -1
  37. package/.next/server/app/api/node/sessions/route.js +6 -4
  38. package/.next/server/app/api/node/sessions/route.js.nft.json +1 -1
  39. package/.next/server/app/api/nodes/route.js +2 -2
  40. package/.next/server/app/api/nodes/route.js.nft.json +1 -1
  41. package/.next/server/app/api/opencode-config/route.js +2 -2
  42. package/.next/server/app/api/opencode-config/route.js.nft.json +1 -1
  43. package/.next/server/app/api/opencode-config/status/route.js +2 -2
  44. package/.next/server/app/api/opencode-config/status/route.js.nft.json +1 -1
  45. package/.next/server/app/api/opencode-events/route.js +3 -3
  46. package/.next/server/app/api/opencode-events/route.js.nft.json +1 -1
  47. package/.next/server/app/api/profiles/[id]/apply/route.js +2 -2
  48. package/.next/server/app/api/profiles/[id]/apply/route.js.nft.json +1 -1
  49. package/.next/server/app/api/profiles/[id]/export/route.js +2 -2
  50. package/.next/server/app/api/profiles/[id]/export/route.js.nft.json +1 -1
  51. package/.next/server/app/api/profiles/[id]/route.js +2 -2
  52. package/.next/server/app/api/profiles/[id]/route.js.nft.json +1 -1
  53. package/.next/server/app/api/profiles/import/route.js +2 -2
  54. package/.next/server/app/api/profiles/import/route.js.nft.json +1 -1
  55. package/.next/server/app/api/profiles/route.js +2 -2
  56. package/.next/server/app/api/profiles/route.js.nft.json +1 -1
  57. package/.next/server/app/api/sessions/[id]/archive/route.js +3 -2
  58. package/.next/server/app/api/sessions/[id]/archive/route.js.nft.json +1 -1
  59. package/.next/server/app/api/sessions/[id]/delete/route.js +4 -3
  60. package/.next/server/app/api/sessions/[id]/delete/route.js.nft.json +1 -1
  61. package/.next/server/app/api/sessions/[id]/open-editor/route.js +2 -2
  62. package/.next/server/app/api/sessions/[id]/open-editor/route.js.nft.json +1 -1
  63. package/.next/server/app/api/sessions/[id]/restore/route/app-paths-manifest.json +3 -0
  64. package/.next/server/app/api/sessions/[id]/restore/route/build-manifest.json +11 -0
  65. package/.next/server/app/api/sessions/[id]/restore/route/server-reference-manifest.json +4 -0
  66. package/.next/server/app/api/sessions/[id]/restore/route.js +8 -0
  67. package/.next/server/app/api/sessions/[id]/restore/route.js.map +5 -0
  68. package/.next/server/app/api/sessions/[id]/restore/route.js.nft.json +1 -0
  69. package/.next/server/app/api/sessions/[id]/restore/route_client-reference-manifest.js +2 -0
  70. package/.next/server/app/api/sessions/[id]/route.js +2 -2
  71. package/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
  72. package/.next/server/app/api/sessions/route.js +5 -3
  73. package/.next/server/app/api/sessions/route.js.nft.json +1 -1
  74. package/.next/server/app/index.html +1 -1
  75. package/.next/server/app/index.rsc +3 -3
  76. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  77. package/.next/server/app/index.segments/_full.segment.rsc +3 -3
  78. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  79. package/.next/server/app/index.segments/_index.segment.rsc +2 -2
  80. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  81. package/.next/server/app/page_client-reference-manifest.js +1 -1
  82. package/.next/server/app-paths-manifest.json +1 -0
  83. package/.next/server/chunks/[root-of-the-server]__005eb0c5._.js +3 -0
  84. package/.next/server/chunks/[root-of-the-server]__005eb0c5._.js.map +1 -0
  85. package/.next/server/chunks/[root-of-the-server]__09e90d57._.js +3 -0
  86. package/.next/server/chunks/[root-of-the-server]__09e90d57._.js.map +1 -0
  87. package/.next/server/chunks/[root-of-the-server]__18dd0ce9._.js +3 -0
  88. package/.next/server/chunks/[root-of-the-server]__18dd0ce9._.js.map +1 -0
  89. package/.next/server/chunks/[root-of-the-server]__19468536._.js +3 -0
  90. package/.next/server/chunks/[root-of-the-server]__19468536._.js.map +1 -0
  91. package/.next/server/chunks/[root-of-the-server]__1b87ec42._.js +1 -1
  92. package/.next/server/chunks/[root-of-the-server]__1b87ec42._.js.map +1 -1
  93. package/.next/server/chunks/[root-of-the-server]__2b912935._.js +3 -0
  94. package/.next/server/chunks/[root-of-the-server]__2b912935._.js.map +1 -0
  95. package/.next/server/chunks/[root-of-the-server]__303d3bac._.js +3 -0
  96. package/.next/server/chunks/[root-of-the-server]__303d3bac._.js.map +1 -0
  97. package/.next/server/chunks/[root-of-the-server]__3fac2b91._.js +5 -0
  98. package/.next/server/chunks/[root-of-the-server]__3fac2b91._.js.map +1 -0
  99. package/.next/server/chunks/[root-of-the-server]__43440b8d._.js +3 -0
  100. package/.next/server/chunks/[root-of-the-server]__43440b8d._.js.map +1 -0
  101. package/.next/server/chunks/[root-of-the-server]__438f8bbe._.js +3 -0
  102. package/.next/server/chunks/[root-of-the-server]__438f8bbe._.js.map +1 -0
  103. package/.next/server/chunks/[root-of-the-server]__4a0bfb55._.js +3 -0
  104. package/.next/server/chunks/[root-of-the-server]__4a0bfb55._.js.map +1 -0
  105. package/.next/server/chunks/[root-of-the-server]__534c3949._.js +3 -0
  106. package/.next/server/chunks/[root-of-the-server]__534c3949._.js.map +1 -0
  107. package/.next/server/chunks/[root-of-the-server]__59160266._.js +1 -1
  108. package/.next/server/chunks/[root-of-the-server]__59160266._.js.map +1 -1
  109. package/.next/server/chunks/[root-of-the-server]__6f812da0._.js +3 -0
  110. package/.next/server/chunks/[root-of-the-server]__6f812da0._.js.map +1 -0
  111. package/.next/server/chunks/[root-of-the-server]__71aac504._.js +3 -0
  112. package/.next/server/chunks/[root-of-the-server]__71aac504._.js.map +1 -0
  113. package/.next/server/chunks/[root-of-the-server]__907a8bf2._.js +3 -0
  114. package/.next/server/chunks/[root-of-the-server]__907a8bf2._.js.map +1 -0
  115. package/.next/server/chunks/[root-of-the-server]__92089220._.js +3 -0
  116. package/.next/server/chunks/[root-of-the-server]__92089220._.js.map +1 -0
  117. package/.next/server/chunks/[root-of-the-server]__9b7bc2d0._.js +3 -0
  118. package/.next/server/chunks/[root-of-the-server]__9b7bc2d0._.js.map +1 -0
  119. package/.next/server/chunks/[root-of-the-server]__b2640944._.js +3 -0
  120. package/.next/server/chunks/[root-of-the-server]__b2640944._.js.map +1 -0
  121. package/.next/server/chunks/[root-of-the-server]__c2267cf1._.js +3 -0
  122. package/.next/server/chunks/[root-of-the-server]__c2267cf1._.js.map +1 -0
  123. package/.next/server/chunks/[root-of-the-server]__d7f7e6dd._.js +3 -0
  124. package/.next/server/chunks/{[root-of-the-server]__6924c09d._.js.map → [root-of-the-server]__d7f7e6dd._.js.map} +1 -1
  125. package/.next/server/chunks/[root-of-the-server]__d8e61048._.js +1 -1
  126. package/.next/server/chunks/[root-of-the-server]__d8e61048._.js.map +1 -1
  127. package/.next/server/chunks/[root-of-the-server]__f6d0d488._.js +3 -0
  128. package/.next/server/chunks/{[root-of-the-server]__192ed2f4._.js.map → [root-of-the-server]__f6d0d488._.js.map} +1 -1
  129. package/.next/server/chunks/[root-of-the-server]__fa559e1e._.js +3 -0
  130. package/.next/server/chunks/[root-of-the-server]__fa559e1e._.js.map +1 -0
  131. package/.next/server/chunks/_next-internal_server_app_api_sessions_[id]_restore_route_actions_af7d6b6c.js +3 -0
  132. package/.next/server/chunks/_next-internal_server_app_api_sessions_[id]_restore_route_actions_af7d6b6c.js.map +1 -0
  133. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_7e181e75.js +1 -1
  134. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_7e181e75.js.map +1 -1
  135. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_aca45402.js +1 -1
  136. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_aca45402.js.map +1 -1
  137. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_b054aff3.js +1 -1
  138. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_b054aff3.js.map +1 -1
  139. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_fa835ac3.js +2 -2
  140. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_fa835ac3.js.map +1 -1
  141. package/.next/server/chunks/src_lib_opencodeConfig_ts_8e209941._.js +3 -0
  142. package/.next/server/chunks/src_lib_opencodeConfig_ts_8e209941._.js.map +1 -0
  143. package/.next/server/chunks/src_lib_session-providers_claudeCode_ts_0f9590ed._.js +3 -0
  144. package/.next/server/chunks/src_lib_session-providers_claudeCode_ts_0f9590ed._.js.map +1 -0
  145. package/.next/server/chunks/ssr/{[root-of-the-server]__631e12d0._.js → [root-of-the-server]__c91a8380._.js} +2 -2
  146. package/.next/server/chunks/ssr/{[root-of-the-server]__631e12d0._.js.map → [root-of-the-server]__c91a8380._.js.map} +1 -1
  147. package/.next/server/chunks/ssr/src_app_page_tsx_a7111f3e._.js +3 -3
  148. package/.next/server/chunks/ssr/src_app_page_tsx_a7111f3e._.js.map +1 -1
  149. package/.next/server/pages/404.html +1 -1
  150. package/.next/server/pages/500.html +2 -2
  151. package/.next/server/server-reference-manifest.js +1 -1
  152. package/.next/server/server-reference-manifest.json +1 -1
  153. package/.next/standalone/.next/BUILD_ID +1 -1
  154. package/.next/standalone/.next/app-path-routes-manifest.json +1 -0
  155. package/.next/standalone/.next/build-manifest.json +2 -2
  156. package/.next/standalone/.next/prerender-manifest.json +3 -3
  157. package/.next/standalone/.next/routes-manifest.json +8 -0
  158. package/.next/standalone/.next/server/app/_global-error/page.js +1 -1
  159. package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
  160. package/.next/standalone/.next/server/app/_global-error.html +2 -2
  161. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  162. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  163. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  164. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  165. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  166. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  167. package/.next/standalone/.next/server/app/_not-found/page.js +1 -1
  168. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  169. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  170. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  171. package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
  172. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  173. package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  174. package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  175. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  176. package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  177. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  178. package/.next/standalone/.next/server/app/api/node/events/route.js +2 -2
  179. package/.next/standalone/.next/server/app/api/node/events/route.js.nft.json +1 -1
  180. package/.next/standalone/.next/server/app/api/node/sessions/[id]/delete/route.js +2 -2
  181. package/.next/standalone/.next/server/app/api/node/sessions/[id]/delete/route.js.nft.json +1 -1
  182. package/.next/standalone/.next/server/app/api/node/sessions/[id]/open-editor/route.js +2 -2
  183. package/.next/standalone/.next/server/app/api/node/sessions/[id]/open-editor/route.js.nft.json +1 -1
  184. package/.next/standalone/.next/server/app/api/node/sessions/route.js +6 -4
  185. package/.next/standalone/.next/server/app/api/node/sessions/route.js.nft.json +1 -1
  186. package/.next/standalone/.next/server/app/api/nodes/route.js +2 -2
  187. package/.next/standalone/.next/server/app/api/nodes/route.js.nft.json +1 -1
  188. package/.next/standalone/.next/server/app/api/opencode-config/route.js +2 -2
  189. package/.next/standalone/.next/server/app/api/opencode-config/route.js.nft.json +1 -1
  190. package/.next/standalone/.next/server/app/api/opencode-config/status/route.js +2 -2
  191. package/.next/standalone/.next/server/app/api/opencode-config/status/route.js.nft.json +1 -1
  192. package/.next/standalone/.next/server/app/api/opencode-events/route.js +3 -3
  193. package/.next/standalone/.next/server/app/api/opencode-events/route.js.nft.json +1 -1
  194. package/.next/standalone/.next/server/app/api/profiles/[id]/apply/route.js +2 -2
  195. package/.next/standalone/.next/server/app/api/profiles/[id]/apply/route.js.nft.json +1 -1
  196. package/.next/standalone/.next/server/app/api/profiles/[id]/export/route.js +2 -2
  197. package/.next/standalone/.next/server/app/api/profiles/[id]/export/route.js.nft.json +1 -1
  198. package/.next/standalone/.next/server/app/api/profiles/[id]/route.js +2 -2
  199. package/.next/standalone/.next/server/app/api/profiles/[id]/route.js.nft.json +1 -1
  200. package/.next/standalone/.next/server/app/api/profiles/import/route.js +2 -2
  201. package/.next/standalone/.next/server/app/api/profiles/import/route.js.nft.json +1 -1
  202. package/.next/standalone/.next/server/app/api/profiles/route.js +2 -2
  203. package/.next/standalone/.next/server/app/api/profiles/route.js.nft.json +1 -1
  204. package/.next/standalone/.next/server/app/api/sessions/[id]/archive/route.js +3 -2
  205. package/.next/standalone/.next/server/app/api/sessions/[id]/archive/route.js.nft.json +1 -1
  206. package/.next/standalone/.next/server/app/api/sessions/[id]/delete/route.js +4 -3
  207. package/.next/standalone/.next/server/app/api/sessions/[id]/delete/route.js.nft.json +1 -1
  208. package/.next/standalone/.next/server/app/api/sessions/[id]/open-editor/route.js +2 -2
  209. package/.next/standalone/.next/server/app/api/sessions/[id]/open-editor/route.js.nft.json +1 -1
  210. package/.next/standalone/.next/server/app/api/sessions/[id]/restore/route/app-paths-manifest.json +3 -0
  211. package/.next/standalone/.next/server/app/api/sessions/[id]/restore/route/build-manifest.json +11 -0
  212. package/.next/standalone/.next/server/app/api/sessions/[id]/restore/route/server-reference-manifest.json +4 -0
  213. package/.next/standalone/.next/server/app/api/sessions/[id]/restore/route.js +8 -0
  214. package/.next/standalone/.next/server/app/api/sessions/[id]/restore/route.js.map +5 -0
  215. package/.next/standalone/.next/server/app/api/sessions/[id]/restore/route.js.nft.json +1 -0
  216. package/.next/standalone/.next/server/app/api/sessions/[id]/restore/route_client-reference-manifest.js +2 -0
  217. package/.next/standalone/.next/server/app/api/sessions/[id]/route.js +2 -2
  218. package/.next/standalone/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
  219. package/.next/standalone/.next/server/app/api/sessions/route.js +5 -3
  220. package/.next/standalone/.next/server/app/api/sessions/route.js.nft.json +1 -1
  221. package/.next/standalone/.next/server/app/index.html +1 -1
  222. package/.next/standalone/.next/server/app/index.rsc +3 -3
  223. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  224. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +3 -3
  225. package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
  226. package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +2 -2
  227. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  228. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  229. package/.next/standalone/.next/server/app-paths-manifest.json +1 -0
  230. package/.next/standalone/.next/server/chunks/[root-of-the-server]__005eb0c5._.js +3 -0
  231. package/.next/standalone/.next/server/chunks/[root-of-the-server]__09e90d57._.js +3 -0
  232. package/.next/standalone/.next/server/chunks/[root-of-the-server]__18dd0ce9._.js +3 -0
  233. package/.next/standalone/.next/server/chunks/[root-of-the-server]__19468536._.js +3 -0
  234. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1b87ec42._.js +1 -1
  235. package/.next/standalone/.next/server/chunks/[root-of-the-server]__2b912935._.js +3 -0
  236. package/.next/standalone/.next/server/chunks/[root-of-the-server]__303d3bac._.js +3 -0
  237. package/.next/standalone/.next/server/chunks/[root-of-the-server]__3fac2b91._.js +5 -0
  238. package/.next/standalone/.next/server/chunks/[root-of-the-server]__43440b8d._.js +3 -0
  239. package/.next/standalone/.next/server/chunks/[root-of-the-server]__438f8bbe._.js +3 -0
  240. package/.next/standalone/.next/server/chunks/[root-of-the-server]__4a0bfb55._.js +3 -0
  241. package/.next/standalone/.next/server/chunks/[root-of-the-server]__534c3949._.js +3 -0
  242. package/.next/standalone/.next/server/chunks/[root-of-the-server]__59160266._.js +1 -1
  243. package/.next/standalone/.next/server/chunks/[root-of-the-server]__6f812da0._.js +3 -0
  244. package/.next/standalone/.next/server/chunks/[root-of-the-server]__71aac504._.js +3 -0
  245. package/.next/standalone/.next/server/chunks/[root-of-the-server]__907a8bf2._.js +3 -0
  246. package/.next/standalone/.next/server/chunks/[root-of-the-server]__92089220._.js +3 -0
  247. package/.next/standalone/.next/server/chunks/[root-of-the-server]__9b7bc2d0._.js +3 -0
  248. package/.next/standalone/.next/server/chunks/[root-of-the-server]__b2640944._.js +3 -0
  249. package/.next/standalone/.next/server/chunks/[root-of-the-server]__c2267cf1._.js +3 -0
  250. package/.next/standalone/.next/server/chunks/[root-of-the-server]__d7f7e6dd._.js +3 -0
  251. package/.next/standalone/.next/server/chunks/[root-of-the-server]__d8e61048._.js +1 -1
  252. package/.next/standalone/.next/server/chunks/[root-of-the-server]__f6d0d488._.js +3 -0
  253. package/.next/standalone/.next/server/chunks/[root-of-the-server]__fa559e1e._.js +3 -0
  254. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_sessions_[id]_restore_route_actions_af7d6b6c.js +3 -0
  255. package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_7e181e75.js +1 -1
  256. package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_aca45402.js +1 -1
  257. package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_b054aff3.js +1 -1
  258. package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_fa835ac3.js +2 -2
  259. package/.next/standalone/.next/server/chunks/src_lib_opencodeConfig_ts_8e209941._.js +3 -0
  260. package/.next/standalone/.next/server/chunks/src_lib_session-providers_claudeCode_ts_0f9590ed._.js +3 -0
  261. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__631e12d0._.js → [root-of-the-server]__c91a8380._.js} +2 -2
  262. package/.next/standalone/.next/server/chunks/ssr/src_app_page_tsx_a7111f3e._.js +3 -3
  263. package/.next/standalone/.next/server/pages/404.html +1 -1
  264. package/.next/standalone/.next/server/pages/500.html +2 -2
  265. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  266. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  267. package/.next/standalone/.next/static/chunks/9e790b67c80f853c.js +13 -0
  268. package/.next/standalone/.next/static/chunks/c3dc8cd80979c971.css +3 -0
  269. package/.next/standalone/AGENTS.md +4 -0
  270. package/.next/standalone/README.md +54 -5
  271. package/.next/standalone/check-hsql.mjs +1 -1
  272. package/.next/standalone/docs/session-status-detection.md +36 -0
  273. package/.next/standalone/docs/superpowers/specs/2026-04-09-claude-capability-alignment-design.md +39 -0
  274. package/.next/standalone/eslint.config.mjs +1 -0
  275. package/.next/standalone/package-lock.json +74 -13
  276. package/.next/standalone/package.json +2 -2
  277. package/.next/standalone/src/app/api/node/events/route.ts +3 -3
  278. package/.next/standalone/src/app/api/node/sessions/[id]/archive/route.test.ts +60 -1
  279. package/.next/standalone/src/app/api/node/sessions/[id]/archive/route.ts +77 -22
  280. package/.next/standalone/src/app/api/node/sessions/[id]/delete/route.ts +6 -5
  281. package/.next/standalone/src/app/api/node/sessions/[id]/open-editor/route.ts +6 -5
  282. package/.next/standalone/src/app/api/node/sessions/route.test.ts +282 -0
  283. package/.next/standalone/src/app/api/node/sessions/route.ts +156 -30
  284. package/.next/standalone/src/app/api/opencode-config/route.test.ts +613 -0
  285. package/.next/standalone/src/app/api/opencode-config/route.ts +336 -185
  286. package/.next/standalone/src/app/api/opencode-events/route.test.ts +77 -1
  287. package/.next/standalone/src/app/api/opencode-events/route.ts +3 -3
  288. package/.next/standalone/src/app/api/opencode-models/route.test.ts +19 -0
  289. package/.next/standalone/src/app/api/opencode-models/route.ts +4 -1
  290. package/.next/standalone/src/app/api/profiles/[id]/apply/route.test.ts +227 -0
  291. package/.next/standalone/src/app/api/profiles/[id]/apply/route.ts +13 -9
  292. package/.next/standalone/src/app/api/sessions/[id]/archive/route.test.ts +126 -0
  293. package/.next/standalone/src/app/api/sessions/[id]/archive/route.ts +47 -12
  294. package/.next/standalone/src/app/api/sessions/[id]/delete/route.test.ts +140 -0
  295. package/.next/standalone/src/app/api/sessions/[id]/delete/route.ts +51 -16
  296. package/.next/standalone/src/app/api/sessions/[id]/open-editor/route.test.ts +74 -0
  297. package/.next/standalone/src/app/api/sessions/[id]/open-editor/route.ts +22 -2
  298. package/.next/standalone/src/app/api/sessions/[id]/restore/route.test.ts +186 -0
  299. package/.next/standalone/src/app/api/sessions/[id]/restore/route.ts +184 -0
  300. package/.next/standalone/src/app/api/sessions/[id]/route.ts +3 -3
  301. package/.next/standalone/src/app/api/sessions/route.test.ts +1955 -100
  302. package/.next/standalone/src/app/api/sessions/route.ts +361 -986
  303. package/.next/standalone/src/components/KanbanBoard.test.tsx +307 -1
  304. package/.next/standalone/src/components/KanbanBoard.tsx +106 -19
  305. package/.next/standalone/src/components/ProjectCard.test.tsx +420 -6
  306. package/.next/standalone/src/components/ProjectCard.tsx +238 -86
  307. package/.next/standalone/src/components/SessionCard.test.tsx +259 -8
  308. package/.next/standalone/src/components/SessionCard.tsx +182 -76
  309. package/.next/standalone/src/components/opencode-config/AgentConfigForm.test.tsx +141 -1
  310. package/.next/standalone/src/components/opencode-config/AgentConfigForm.tsx +99 -7
  311. package/.next/standalone/src/components/opencode-config/GeneralSettingsForm.test.tsx +11 -0
  312. package/.next/standalone/src/components/opencode-config/GeneralSettingsForm.tsx +41 -2
  313. package/.next/standalone/src/components/opencode-config/categories/CategoriesManager.tsx +3 -1
  314. package/.next/standalone/src/components/opencode-config/categories/CategoryConfigForm.test.tsx +106 -8
  315. package/.next/standalone/src/components/opencode-config/categories/CategoryConfigForm.tsx +82 -5
  316. package/.next/standalone/src/hooks/useHostSources.test.ts +0 -41
  317. package/.next/standalone/src/hooks/useOpencodeSync.test.ts +321 -1
  318. package/.next/standalone/src/hooks/useOpencodeSync.ts +16 -12
  319. package/.next/standalone/src/lib/claudeSessionOverrides.test.ts +75 -0
  320. package/.next/standalone/src/lib/claudeSessionOverrides.ts +169 -0
  321. package/.next/standalone/src/lib/fixtures/opencode-config/oh-my-openagent.v4.jsonc +70 -0
  322. package/.next/standalone/src/lib/fixtures/opencode-config/oh-my-openagent.v4.secret-like.jsonc +21 -0
  323. package/.next/standalone/src/lib/fixtures/opencode-config/oh-my-opencode.v3.jsonc +17 -0
  324. package/.next/standalone/src/lib/opencodeConfig.test.ts +430 -3
  325. package/.next/standalone/src/lib/opencodeConfig.ts +157 -4
  326. package/.next/standalone/src/lib/opencodeDiscovery.test.ts +241 -0
  327. package/.next/standalone/src/lib/opencodeDiscovery.ts +164 -9
  328. package/.next/standalone/src/lib/profiles/share.test.ts +92 -0
  329. package/.next/standalone/src/lib/profiles/share.ts +1 -0
  330. package/.next/standalone/src/lib/profiles/storage.test.ts +77 -1
  331. package/.next/standalone/src/lib/profiles/storage.ts +10 -9
  332. package/.next/standalone/src/lib/session-providers/claudeCode.test.ts +2288 -0
  333. package/.next/standalone/src/lib/session-providers/claudeCode.ts +1083 -0
  334. package/.next/standalone/src/lib/session-providers/localAggregator.test.ts +322 -0
  335. package/.next/standalone/src/lib/session-providers/localAggregator.ts +302 -0
  336. package/.next/standalone/src/lib/session-providers/opencodeProvider.test.ts +170 -0
  337. package/.next/standalone/src/lib/session-providers/opencodeProvider.ts +721 -0
  338. package/.next/standalone/src/lib/session-providers/opencodeSdkCompat.ts +92 -0
  339. package/.next/standalone/src/lib/session-providers/providerIds.test.ts +337 -0
  340. package/.next/standalone/src/lib/session-providers/providerIds.ts +176 -0
  341. package/.next/standalone/src/lib/session-providers/types.ts +131 -0
  342. package/.next/standalone/src/lib/transform.test.ts +253 -0
  343. package/.next/standalone/src/lib/transform.ts +96 -37
  344. package/.next/standalone/src/types/index.ts +23 -17
  345. package/.next/standalone/src/types/opencodeConfig.ts +55 -0
  346. package/.next/static/chunks/9e790b67c80f853c.js +13 -0
  347. package/.next/static/chunks/c3dc8cd80979c971.css +3 -0
  348. package/.next/trace +1 -1
  349. package/.next/trace-build +1 -1
  350. package/.next/types/routes.d.ts +2 -1
  351. package/.next/types/validator.ts +9 -0
  352. package/README.md +54 -5
  353. package/package.json +2 -2
  354. package/.next/server/chunks/[root-of-the-server]__1211da38._.js +0 -3
  355. package/.next/server/chunks/[root-of-the-server]__1211da38._.js.map +0 -1
  356. package/.next/server/chunks/[root-of-the-server]__192ed2f4._.js +0 -3
  357. package/.next/server/chunks/[root-of-the-server]__2b526e7a._.js +0 -3
  358. package/.next/server/chunks/[root-of-the-server]__2b526e7a._.js.map +0 -1
  359. package/.next/server/chunks/[root-of-the-server]__2f981540._.js +0 -3
  360. package/.next/server/chunks/[root-of-the-server]__2f981540._.js.map +0 -1
  361. package/.next/server/chunks/[root-of-the-server]__3745b314._.js +0 -3
  362. package/.next/server/chunks/[root-of-the-server]__3745b314._.js.map +0 -1
  363. package/.next/server/chunks/[root-of-the-server]__56690af0._.js +0 -3
  364. package/.next/server/chunks/[root-of-the-server]__56690af0._.js.map +0 -1
  365. package/.next/server/chunks/[root-of-the-server]__56f5f249._.js +0 -3
  366. package/.next/server/chunks/[root-of-the-server]__56f5f249._.js.map +0 -1
  367. package/.next/server/chunks/[root-of-the-server]__59175de4._.js +0 -3
  368. package/.next/server/chunks/[root-of-the-server]__59175de4._.js.map +0 -1
  369. package/.next/server/chunks/[root-of-the-server]__64fffc02._.js +0 -3
  370. package/.next/server/chunks/[root-of-the-server]__64fffc02._.js.map +0 -1
  371. package/.next/server/chunks/[root-of-the-server]__6924c09d._.js +0 -3
  372. package/.next/server/chunks/[root-of-the-server]__6c428a24._.js +0 -3
  373. package/.next/server/chunks/[root-of-the-server]__6c428a24._.js.map +0 -1
  374. package/.next/server/chunks/[root-of-the-server]__73a00b88._.js +0 -3
  375. package/.next/server/chunks/[root-of-the-server]__73a00b88._.js.map +0 -1
  376. package/.next/server/chunks/[root-of-the-server]__7e757f50._.js +0 -3
  377. package/.next/server/chunks/[root-of-the-server]__7e757f50._.js.map +0 -1
  378. package/.next/server/chunks/[root-of-the-server]__89c5eeab._.js +0 -3
  379. package/.next/server/chunks/[root-of-the-server]__89c5eeab._.js.map +0 -1
  380. package/.next/server/chunks/[root-of-the-server]__8da6c5a8._.js +0 -3
  381. package/.next/server/chunks/[root-of-the-server]__8da6c5a8._.js.map +0 -1
  382. package/.next/server/chunks/[root-of-the-server]__b796d06c._.js +0 -3
  383. package/.next/server/chunks/[root-of-the-server]__b796d06c._.js.map +0 -1
  384. package/.next/server/chunks/[root-of-the-server]__c2ce5c0f._.js +0 -3
  385. package/.next/server/chunks/[root-of-the-server]__c2ce5c0f._.js.map +0 -1
  386. package/.next/server/chunks/[root-of-the-server]__db285678._.js +0 -3
  387. package/.next/server/chunks/[root-of-the-server]__db285678._.js.map +0 -1
  388. package/.next/server/chunks/[root-of-the-server]__e00a9200._.js +0 -5
  389. package/.next/server/chunks/[root-of-the-server]__e00a9200._.js.map +0 -1
  390. package/.next/server/chunks/[root-of-the-server]__e5df5e5f._.js +0 -3
  391. package/.next/server/chunks/[root-of-the-server]__e5df5e5f._.js.map +0 -1
  392. package/.next/server/chunks/[root-of-the-server]__edbc8d9e._.js +0 -3
  393. package/.next/server/chunks/[root-of-the-server]__edbc8d9e._.js.map +0 -1
  394. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1211da38._.js +0 -3
  395. package/.next/standalone/.next/server/chunks/[root-of-the-server]__192ed2f4._.js +0 -3
  396. package/.next/standalone/.next/server/chunks/[root-of-the-server]__2b526e7a._.js +0 -3
  397. package/.next/standalone/.next/server/chunks/[root-of-the-server]__2f981540._.js +0 -3
  398. package/.next/standalone/.next/server/chunks/[root-of-the-server]__3745b314._.js +0 -3
  399. package/.next/standalone/.next/server/chunks/[root-of-the-server]__56690af0._.js +0 -3
  400. package/.next/standalone/.next/server/chunks/[root-of-the-server]__56f5f249._.js +0 -3
  401. package/.next/standalone/.next/server/chunks/[root-of-the-server]__59175de4._.js +0 -3
  402. package/.next/standalone/.next/server/chunks/[root-of-the-server]__64fffc02._.js +0 -3
  403. package/.next/standalone/.next/server/chunks/[root-of-the-server]__6924c09d._.js +0 -3
  404. package/.next/standalone/.next/server/chunks/[root-of-the-server]__6c428a24._.js +0 -3
  405. package/.next/standalone/.next/server/chunks/[root-of-the-server]__73a00b88._.js +0 -3
  406. package/.next/standalone/.next/server/chunks/[root-of-the-server]__7e757f50._.js +0 -3
  407. package/.next/standalone/.next/server/chunks/[root-of-the-server]__89c5eeab._.js +0 -3
  408. package/.next/standalone/.next/server/chunks/[root-of-the-server]__8da6c5a8._.js +0 -3
  409. package/.next/standalone/.next/server/chunks/[root-of-the-server]__b796d06c._.js +0 -3
  410. package/.next/standalone/.next/server/chunks/[root-of-the-server]__c2ce5c0f._.js +0 -3
  411. package/.next/standalone/.next/server/chunks/[root-of-the-server]__db285678._.js +0 -3
  412. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e00a9200._.js +0 -5
  413. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e5df5e5f._.js +0 -3
  414. package/.next/standalone/.next/server/chunks/[root-of-the-server]__edbc8d9e._.js +0 -3
  415. package/.next/standalone/.next/static/chunks/65d5354ba0add961.js +0 -13
  416. package/.next/standalone/.next/static/chunks/f42202943f6742e5.css +0 -3
  417. package/.next/static/chunks/65d5354ba0add961.js +0 -13
  418. package/.next/static/chunks/f42202943f6742e5.css +0 -3
  419. /package/.next/standalone/.next/static/{5kq9DtuBFVxu4jsgmL5Q- → 0WaQ6UjiNBgvh531pJVh0}/_buildManifest.js +0 -0
  420. /package/.next/standalone/.next/static/{5kq9DtuBFVxu4jsgmL5Q- → 0WaQ6UjiNBgvh531pJVh0}/_clientMiddlewareManifest.json +0 -0
  421. /package/.next/standalone/.next/static/{5kq9DtuBFVxu4jsgmL5Q- → 0WaQ6UjiNBgvh531pJVh0}/_ssgManifest.js +0 -0
  422. /package/.next/static/{5kq9DtuBFVxu4jsgmL5Q- → 0WaQ6UjiNBgvh531pJVh0}/_buildManifest.js +0 -0
  423. /package/.next/static/{5kq9DtuBFVxu4jsgmL5Q- → 0WaQ6UjiNBgvh531pJVh0}/_clientMiddlewareManifest.json +0 -0
  424. /package/.next/static/{5kq9DtuBFVxu4jsgmL5Q- → 0WaQ6UjiNBgvh531pJVh0}/_ssgManifest.js +0 -0
@@ -1,3 +0,0 @@
1
- module.exports=[74533,(e,t,n)=>{t.exports=e.x("node:child_process",()=>require("node:child_process"))},39354,34959,e=>{"use strict";e.s([],34616);let t=async(e,t)=>{let n="function"==typeof t?await t(e):t;if(n)return"bearer"===e.scheme?`Bearer ${n}`:"basic"===e.scheme?`Basic ${btoa(n)}`:n},n={bodySerializer:e=>JSON.stringify(e,(e,t)=>"bigint"==typeof t?t.toString():t)},r=({allowReserved:e,explode:t,name:n,style:r,value:i})=>{if(!t){let t=(e?i:i.map(e=>encodeURIComponent(e))).join((e=>{switch(e){case"form":default:return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20"}})(r));switch(r){case"label":return`.${t}`;case"matrix":return`;${n}=${t}`;case"simple":return t;default:return`${n}=${t}`}}let l=(e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}})(r),a=i.map(t=>"label"===r||"simple"===r?e?t:encodeURIComponent(t):s({allowReserved:e,name:n,value:t})).join(l);return"label"===r||"matrix"===r?l+a:a},s=({allowReserved:e,name:t,value:n})=>{if(null==n)return"";if("object"==typeof n)throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?n:encodeURIComponent(n)}`},i=({allowReserved:e,explode:t,name:n,style:r,value:i,valueOnly:l})=>{if(i instanceof Date)return l?i.toISOString():`${n}=${i.toISOString()}`;if("deepObject"!==r&&!t){let t=[];Object.entries(i).forEach(([n,r])=>{t=[...t,n,e?r:encodeURIComponent(r)]});let s=t.join(",");switch(r){case"form":return`${n}=${s}`;case"label":return`.${s}`;case"matrix":return`;${n}=${s}`;default:return s}}let a=(e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}})(r),c=Object.entries(i).map(([t,i])=>s({allowReserved:e,name:"deepObject"===r?`${n}[${t}]`:t,value:i})).join(a);return"label"===r||"matrix"===r?a+c:c},l=/\{[^{}]+\}/g,a=({allowReserved:e,array:t,object:n}={})=>l=>{let a=[];if(l&&"object"==typeof l)for(let c in l){let o=l[c];if(null!=o)if(Array.isArray(o)){let n=r({allowReserved:e,explode:!0,name:c,style:"form",value:o,...t});n&&a.push(n)}else if("object"==typeof o){let t=i({allowReserved:e,explode:!0,name:c,style:"deepObject",value:o,...n});t&&a.push(t)}else{let t=s({allowReserved:e,name:c,value:o});t&&a.push(t)}}return a.join("&")},c=(e,t)=>!!t&&!!(e.headers.has(t)||e.query?.[t]||e.headers.get("Cookie")?.includes(`${t}=`)),o=async({security:e,...n})=>{for(let r of e){if(c(n,r.name))continue;let e=await t(r,n.auth);if(!e)continue;let s=r.name??"Authorization";switch(r.in){case"query":n.query||(n.query={}),n.query[s]=e;break;case"cookie":n.headers.append("Cookie",`${s}=${e}`);break;default:n.headers.set(s,e)}}},u=e=>(({baseUrl:e,path:t,query:n,querySerializer:a,url:c})=>{let o=(e??"")+(c.startsWith("/")?c:`/${c}`);t&&(o=(({path:e,url:t})=>{let n=t,a=t.match(l);if(a)for(let t of a){let l=!1,a=t.substring(1,t.length-1),c="simple";a.endsWith("*")&&(l=!0,a=a.substring(0,a.length-1)),a.startsWith(".")?(a=a.substring(1),c="label"):a.startsWith(";")&&(a=a.substring(1),c="matrix");let o=e[a];if(null==o)continue;if(Array.isArray(o)){n=n.replace(t,r({explode:l,name:a,style:c,value:o}));continue}if("object"==typeof o){n=n.replace(t,i({explode:l,name:a,style:c,value:o,valueOnly:!0}));continue}if("matrix"===c){n=n.replace(t,`;${s({name:a,value:o})}`);continue}let u=encodeURIComponent("label"===c?`.${o}`:o);n=n.replace(t,u)}return n})({path:t,url:o}));let u=n?a(n):"";return u.startsWith("?")&&(u=u.substring(1)),u&&(o+=`?${u}`),o})({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:"function"==typeof e.querySerializer?e.querySerializer:a(e.querySerializer),url:e.url}),h=(e,t)=>{let n={...e,...t};return n.baseUrl?.endsWith("/")&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=p(e.headers,t.headers),n},p=(...e)=>{let t=new Headers;for(let n of e)if(n&&"object"==typeof n)for(let[e,r]of n instanceof Headers?n.entries():Object.entries(n))if(null===r)t.delete(e);else if(Array.isArray(r))for(let n of r)t.append(e,n);else void 0!==r&&t.set(e,"object"==typeof r?JSON.stringify(r):r);return t};class d{_fns;constructor(){this._fns=[]}clear(){this._fns=[]}getInterceptorIndex(e){return"number"==typeof e?this._fns[e]?e:-1:this._fns.indexOf(e)}exists(e){let t=this.getInterceptorIndex(e);return!!this._fns[t]}eject(e){let t=this.getInterceptorIndex(e);this._fns[t]&&(this._fns[t]=null)}update(e,t){let n=this.getInterceptorIndex(e);return!!this._fns[n]&&(this._fns[n]=t,e)}use(e){return this._fns=[...this._fns,e],this._fns.length-1}}let f=a({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),y={"Content-Type":"application/json"},_=(e={})=>({...n,headers:y,parseAs:"auto",querySerializer:f,...e}),m=(e={})=>{let t=h(_(),e),n=()=>({...t}),r={error:new d,request:new d,response:new d},s=async e=>{let n={...t,...e,fetch:e.fetch??t.fetch??globalThis.fetch,headers:p(t.headers,e.headers),serializedBody:void 0};n.security&&await o({...n,security:n.security}),n.requestValidator&&await n.requestValidator(n),n.body&&n.bodySerializer&&(n.serializedBody=n.bodySerializer(n.body)),(void 0===n.serializedBody||""===n.serializedBody)&&n.headers.delete("Content-Type");let r=u(n);return{opts:n,url:r}},i=async e=>{let t,{opts:n,url:i}=await s(e),l=new Request(i,{redirect:"follow",...n,body:n.serializedBody});for(let e of r.request._fns)e&&(l=await e(l,n));let a=n.fetch,c=await a(l);for(let e of r.response._fns)e&&(c=await e(c,l,n));let o={request:l,response:c};if(c.ok){let e;if(204===c.status||"0"===c.headers.get("Content-Length"))return"data"===n.responseStyle?{}:{data:{},...o};let t=("auto"===n.parseAs?(e=>{if(!e)return"stream";let t=e.split(";")[0]?.trim();if(t){if(t.startsWith("application/json")||t.endsWith("+json"))return"json";if("multipart/form-data"===t)return"formData";if(["application/","audio/","image/","video/"].some(e=>t.startsWith(e)))return"blob";if(t.startsWith("text/"))return"text"}})(c.headers.get("Content-Type")):n.parseAs)??"json";switch(t){case"arrayBuffer":case"blob":case"formData":case"json":case"text":e=await c[t]();break;case"stream":return"data"===n.responseStyle?c.body:{data:c.body,...o}}return"json"===t&&(n.responseValidator&&await n.responseValidator(e),n.responseTransformer&&(e=await n.responseTransformer(e))),"data"===n.responseStyle?e:{data:e,...o}}let u=await c.text();try{t=JSON.parse(u)}catch{}let h=t??u,p=h;for(let e of r.error._fns)e&&(p=await e(h,c,l,n));if(p=p||{},n.throwOnError)throw p;return"data"===n.responseStyle?void 0:{error:p,...o}},l=e=>{let t=t=>i({...t,method:e});return t.sse=async t=>{let{opts:n,url:r}=await s(t);return(({onSseError:e,onSseEvent:t,responseTransformer:n,responseValidator:r,sseDefaultRetryDelay:s,sseMaxRetryAttempts:i,sseMaxRetryDelay:l,sseSleepFn:a,url:c,...o})=>{let u,h=a??(e=>new Promise(t=>setTimeout(t,e)));return{stream:async function*(){let a=s??3e3,p=0,d=o.signal??new AbortController().signal;for(;!d.aborted;){p++;let s=o.headers instanceof Headers?o.headers:new Headers(o.headers);void 0!==u&&s.set("Last-Event-ID",u);try{let e=await fetch(c,{...o,headers:s,signal:d});if(!e.ok)throw Error(`SSE failed: ${e.status} ${e.statusText}`);if(!e.body)throw Error("No body in SSE response");let i=e.body.pipeThrough(new TextDecoderStream).getReader(),l="",h=()=>{try{i.cancel()}catch{}};d.addEventListener("abort",h);try{for(;;){let{done:e,value:s}=await i.read();if(e)break;let c=(l+=s).split("\n\n");for(let e of(l=c.pop()??"",c)){let s,i,l=e.split("\n"),c=[];for(let e of l)if(e.startsWith("data:"))c.push(e.replace(/^data:\s*/,""));else if(e.startsWith("event:"))s=e.replace(/^event:\s*/,"");else if(e.startsWith("id:"))u=e.replace(/^id:\s*/,"");else if(e.startsWith("retry:")){let t=Number.parseInt(e.replace(/^retry:\s*/,""),10);Number.isNaN(t)||(a=t)}let o=!1;if(c.length){let e=c.join("\n");try{i=JSON.parse(e),o=!0}catch{i=e}}o&&(r&&await r(i),n&&(i=await n(i))),t?.({data:i,event:s,id:u,retry:a}),c.length&&(yield i)}}}finally{d.removeEventListener("abort",h),i.releaseLock()}break}catch(n){if(e?.(n),void 0!==i&&p>=i)break;let t=Math.min(a*2**(p-1),l??3e4);await h(t)}}}()}})({...n,body:n.body,headers:n.headers,method:e,url:r})},t};return{buildUrl:u,connect:l("CONNECT"),delete:l("DELETE"),get:l("GET"),getConfig:n,head:l("HEAD"),interceptors:r,options:l("OPTIONS"),patch:l("PATCH"),post:l("POST"),put:l("PUT"),request:i,setConfig:e=>(t=h(t,e),n()),trace:l("TRACE")}};Object.entries({$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"});let b=m(_({baseUrl:"http://localhost:4096"}));class g{_client=b;constructor(e){e?.client&&(this._client=e.client)}}class w extends g{event(e){return(e?.client??this._client).get.sse({url:"/global/event",...e})}}class j extends g{list(e){return(e?.client??this._client).get({url:"/project",...e})}current(e){return(e?.client??this._client).get({url:"/project/current",...e})}}class x extends g{list(e){return(e?.client??this._client).get({url:"/pty",...e})}create(e){return(e?.client??this._client).post({url:"/pty",...e,headers:{"Content-Type":"application/json",...e?.headers}})}remove(e){return(e.client??this._client).delete({url:"/pty/{id}",...e})}get(e){return(e.client??this._client).get({url:"/pty/{id}",...e})}update(e){return(e.client??this._client).put({url:"/pty/{id}",...e,headers:{"Content-Type":"application/json",...e.headers}})}connect(e){return(e.client??this._client).get({url:"/pty/{id}/connect",...e})}}class C extends g{get(e){return(e?.client??this._client).get({url:"/config",...e})}update(e){return(e?.client??this._client).patch({url:"/config",...e,headers:{"Content-Type":"application/json",...e?.headers}})}providers(e){return(e?.client??this._client).get({url:"/config/providers",...e})}}class T extends g{ids(e){return(e?.client??this._client).get({url:"/experimental/tool/ids",...e})}list(e){return(e.client??this._client).get({url:"/experimental/tool",...e})}}class v extends g{dispose(e){return(e?.client??this._client).post({url:"/instance/dispose",...e})}}class S extends g{get(e){return(e?.client??this._client).get({url:"/path",...e})}}class $ extends g{get(e){return(e?.client??this._client).get({url:"/vcs",...e})}}class I extends g{list(e){return(e?.client??this._client).get({url:"/session",...e})}create(e){return(e?.client??this._client).post({url:"/session",...e,headers:{"Content-Type":"application/json",...e?.headers}})}status(e){return(e?.client??this._client).get({url:"/session/status",...e})}delete(e){return(e.client??this._client).delete({url:"/session/{id}",...e})}get(e){return(e.client??this._client).get({url:"/session/{id}",...e})}update(e){return(e.client??this._client).patch({url:"/session/{id}",...e,headers:{"Content-Type":"application/json",...e.headers}})}children(e){return(e.client??this._client).get({url:"/session/{id}/children",...e})}todo(e){return(e.client??this._client).get({url:"/session/{id}/todo",...e})}init(e){return(e.client??this._client).post({url:"/session/{id}/init",...e,headers:{"Content-Type":"application/json",...e.headers}})}fork(e){return(e.client??this._client).post({url:"/session/{id}/fork",...e,headers:{"Content-Type":"application/json",...e.headers}})}abort(e){return(e.client??this._client).post({url:"/session/{id}/abort",...e})}unshare(e){return(e.client??this._client).delete({url:"/session/{id}/share",...e})}share(e){return(e.client??this._client).post({url:"/session/{id}/share",...e})}diff(e){return(e.client??this._client).get({url:"/session/{id}/diff",...e})}summarize(e){return(e.client??this._client).post({url:"/session/{id}/summarize",...e,headers:{"Content-Type":"application/json",...e.headers}})}messages(e){return(e.client??this._client).get({url:"/session/{id}/message",...e})}prompt(e){return(e.client??this._client).post({url:"/session/{id}/message",...e,headers:{"Content-Type":"application/json",...e.headers}})}message(e){return(e.client??this._client).get({url:"/session/{id}/message/{messageID}",...e})}promptAsync(e){return(e.client??this._client).post({url:"/session/{id}/prompt_async",...e,headers:{"Content-Type":"application/json",...e.headers}})}command(e){return(e.client??this._client).post({url:"/session/{id}/command",...e,headers:{"Content-Type":"application/json",...e.headers}})}shell(e){return(e.client??this._client).post({url:"/session/{id}/shell",...e,headers:{"Content-Type":"application/json",...e.headers}})}revert(e){return(e.client??this._client).post({url:"/session/{id}/revert",...e,headers:{"Content-Type":"application/json",...e.headers}})}unrevert(e){return(e.client??this._client).post({url:"/session/{id}/unrevert",...e})}}class O extends g{list(e){return(e?.client??this._client).get({url:"/command",...e})}}class q extends g{authorize(e){return(e.client??this._client).post({url:"/provider/{id}/oauth/authorize",...e,headers:{"Content-Type":"application/json",...e.headers}})}callback(e){return(e.client??this._client).post({url:"/provider/{id}/oauth/callback",...e,headers:{"Content-Type":"application/json",...e.headers}})}}class z extends g{list(e){return(e?.client??this._client).get({url:"/provider",...e})}auth(e){return(e?.client??this._client).get({url:"/provider/auth",...e})}oauth=new q({client:this._client})}class k extends g{text(e){return(e.client??this._client).get({url:"/find",...e})}files(e){return(e.client??this._client).get({url:"/find/file",...e})}symbols(e){return(e.client??this._client).get({url:"/find/symbol",...e})}}class E extends g{list(e){return(e.client??this._client).get({url:"/file",...e})}read(e){return(e.client??this._client).get({url:"/file/content",...e})}status(e){return(e?.client??this._client).get({url:"/file/status",...e})}}class A extends g{log(e){return(e?.client??this._client).post({url:"/log",...e,headers:{"Content-Type":"application/json",...e?.headers}})}agents(e){return(e?.client??this._client).get({url:"/agent",...e})}}class U extends g{remove(e){return(e.client??this._client).delete({url:"/mcp/{name}/auth",...e})}start(e){return(e.client??this._client).post({url:"/mcp/{name}/auth",...e})}callback(e){return(e.client??this._client).post({url:"/mcp/{name}/auth/callback",...e,headers:{"Content-Type":"application/json",...e.headers}})}authenticate(e){return(e.client??this._client).post({url:"/mcp/{name}/auth/authenticate",...e})}set(e){return(e.client??this._client).put({url:"/auth/{id}",...e,headers:{"Content-Type":"application/json",...e.headers}})}}class W extends g{status(e){return(e?.client??this._client).get({url:"/mcp",...e})}add(e){return(e?.client??this._client).post({url:"/mcp",...e,headers:{"Content-Type":"application/json",...e?.headers}})}connect(e){return(e.client??this._client).post({url:"/mcp/{name}/connect",...e})}disconnect(e){return(e.client??this._client).post({url:"/mcp/{name}/disconnect",...e})}auth=new U({client:this._client})}class D extends g{status(e){return(e?.client??this._client).get({url:"/lsp",...e})}}class N extends g{status(e){return(e?.client??this._client).get({url:"/formatter",...e})}}class P extends g{next(e){return(e?.client??this._client).get({url:"/tui/control/next",...e})}response(e){return(e?.client??this._client).post({url:"/tui/control/response",...e,headers:{"Content-Type":"application/json",...e?.headers}})}}class R extends g{appendPrompt(e){return(e?.client??this._client).post({url:"/tui/append-prompt",...e,headers:{"Content-Type":"application/json",...e?.headers}})}openHelp(e){return(e?.client??this._client).post({url:"/tui/open-help",...e})}openSessions(e){return(e?.client??this._client).post({url:"/tui/open-sessions",...e})}openThemes(e){return(e?.client??this._client).post({url:"/tui/open-themes",...e})}openModels(e){return(e?.client??this._client).post({url:"/tui/open-models",...e})}submitPrompt(e){return(e?.client??this._client).post({url:"/tui/submit-prompt",...e})}clearPrompt(e){return(e?.client??this._client).post({url:"/tui/clear-prompt",...e})}executeCommand(e){return(e?.client??this._client).post({url:"/tui/execute-command",...e,headers:{"Content-Type":"application/json",...e?.headers}})}showToast(e){return(e?.client??this._client).post({url:"/tui/show-toast",...e,headers:{"Content-Type":"application/json",...e?.headers}})}publish(e){return(e?.client??this._client).post({url:"/tui/publish",...e,headers:{"Content-Type":"application/json",...e?.headers}})}control=new P({client:this._client})}class B extends g{subscribe(e){return(e?.client??this._client).get.sse({url:"/event",...e})}}class H extends g{postSessionIdPermissionsPermissionId(e){return(e.client??this._client).post({url:"/session/{id}/permissions/{permissionID}",...e,headers:{"Content-Type":"application/json",...e.headers}})}global=new w({client:this._client});project=new j({client:this._client});pty=new x({client:this._client});config=new C({client:this._client});tool=new T({client:this._client});instance=new v({client:this._client});path=new S({client:this._client});vcs=new $({client:this._client});session=new I({client:this._client});command=new O({client:this._client});provider=new z({client:this._client});find=new k({client:this._client});file=new E({client:this._client});app=new A({client:this._client});mcp=new W({client:this._client});lsp=new D({client:this._client});formatter=new N({client:this._client});tui=new R({client:this._client});auth=new U({client:this._client});event=new B({client:this._client})}function L(e){return e?.fetch||(e={...e,fetch:e=>(e.timeout=!1,fetch(e))}),e?.directory&&(e.headers={...e.headers,"x-opencode-directory":encodeURIComponent(e.directory)}),new H({client:m(e)})}e.s(["createOpencodeClient",()=>L],28856),e.i(74533),e.s([],39354),e.i(28856),e.i(34616),e.s(["createOpencodeClient",()=>L],34959)}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__edbc8d9e._.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../node_modules/%40opencode-ai/sdk/dist/gen/core/serverSentEvents.gen.js","../../../node_modules/%40opencode-ai/sdk/dist/gen/core/auth.gen.js","../../../node_modules/%40opencode-ai/sdk/dist/gen/core/bodySerializer.gen.js","../../../node_modules/%40opencode-ai/sdk/dist/gen/core/pathSerializer.gen.js","../../../node_modules/%40opencode-ai/sdk/dist/gen/core/utils.gen.js","../../../node_modules/%40opencode-ai/sdk/dist/gen/client/utils.gen.js","../../../node_modules/%40opencode-ai/sdk/dist/gen/client/client.gen.js","../../../node_modules/%40opencode-ai/sdk/dist/gen/core/params.gen.js","../../../node_modules/%40opencode-ai/sdk/dist/gen/client.gen.js","../../../node_modules/%40opencode-ai/sdk/dist/gen/sdk.gen.js","../../../node_modules/%40opencode-ai/sdk/dist/client.js","../../../node_modules/%40opencode-ai/sdk/dist/server.js","../../../node_modules/%40opencode-ai/sdk/dist/index.js"],"sourcesContent":["// This file is auto-generated by @hey-api/openapi-ts\nexport const createSseClient = ({ onSseError, onSseEvent, responseTransformer, responseValidator, sseDefaultRetryDelay, sseMaxRetryAttempts, sseMaxRetryDelay, sseSleepFn, url, ...options }) => {\n let lastEventId;\n const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));\n const createStream = async function* () {\n let retryDelay = sseDefaultRetryDelay ?? 3000;\n let attempt = 0;\n const signal = options.signal ?? new AbortController().signal;\n while (true) {\n if (signal.aborted)\n break;\n attempt++;\n const headers = options.headers instanceof Headers\n ? options.headers\n : new Headers(options.headers);\n if (lastEventId !== undefined) {\n headers.set(\"Last-Event-ID\", lastEventId);\n }\n try {\n const response = await fetch(url, { ...options, headers, signal });\n if (!response.ok)\n throw new Error(`SSE failed: ${response.status} ${response.statusText}`);\n if (!response.body)\n throw new Error(\"No body in SSE response\");\n const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();\n let buffer = \"\";\n const abortHandler = () => {\n try {\n reader.cancel();\n }\n catch {\n // noop\n }\n };\n signal.addEventListener(\"abort\", abortHandler);\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done)\n break;\n buffer += value;\n const chunks = buffer.split(\"\\n\\n\");\n buffer = chunks.pop() ?? \"\";\n for (const chunk of chunks) {\n const lines = chunk.split(\"\\n\");\n const dataLines = [];\n let eventName;\n for (const line of lines) {\n if (line.startsWith(\"data:\")) {\n dataLines.push(line.replace(/^data:\\s*/, \"\"));\n }\n else if (line.startsWith(\"event:\")) {\n eventName = line.replace(/^event:\\s*/, \"\");\n }\n else if (line.startsWith(\"id:\")) {\n lastEventId = line.replace(/^id:\\s*/, \"\");\n }\n else if (line.startsWith(\"retry:\")) {\n const parsed = Number.parseInt(line.replace(/^retry:\\s*/, \"\"), 10);\n if (!Number.isNaN(parsed)) {\n retryDelay = parsed;\n }\n }\n }\n let data;\n let parsedJson = false;\n if (dataLines.length) {\n const rawData = dataLines.join(\"\\n\");\n try {\n data = JSON.parse(rawData);\n parsedJson = true;\n }\n catch {\n data = rawData;\n }\n }\n if (parsedJson) {\n if (responseValidator) {\n await responseValidator(data);\n }\n if (responseTransformer) {\n data = await responseTransformer(data);\n }\n }\n onSseEvent?.({\n data,\n event: eventName,\n id: lastEventId,\n retry: retryDelay,\n });\n if (dataLines.length) {\n yield data;\n }\n }\n }\n }\n finally {\n signal.removeEventListener(\"abort\", abortHandler);\n reader.releaseLock();\n }\n break; // exit loop on normal completion\n }\n catch (error) {\n // connection failed or aborted; retry after delay\n onSseError?.(error);\n if (sseMaxRetryAttempts !== undefined && attempt >= sseMaxRetryAttempts) {\n break; // stop after firing error\n }\n // exponential backoff: double retry each attempt, cap at 30s\n const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 30000);\n await sleep(backoff);\n }\n }\n };\n const stream = createStream();\n return { stream };\n};\n","// This file is auto-generated by @hey-api/openapi-ts\nexport const getAuthToken = async (auth, callback) => {\n const token = typeof callback === \"function\" ? await callback(auth) : callback;\n if (!token) {\n return;\n }\n if (auth.scheme === \"bearer\") {\n return `Bearer ${token}`;\n }\n if (auth.scheme === \"basic\") {\n return `Basic ${btoa(token)}`;\n }\n return token;\n};\n","// This file is auto-generated by @hey-api/openapi-ts\nconst serializeFormDataPair = (data, key, value) => {\n if (typeof value === \"string\" || value instanceof Blob) {\n data.append(key, value);\n }\n else if (value instanceof Date) {\n data.append(key, value.toISOString());\n }\n else {\n data.append(key, JSON.stringify(value));\n }\n};\nconst serializeUrlSearchParamsPair = (data, key, value) => {\n if (typeof value === \"string\") {\n data.append(key, value);\n }\n else {\n data.append(key, JSON.stringify(value));\n }\n};\nexport const formDataBodySerializer = {\n bodySerializer: (body) => {\n const data = new FormData();\n Object.entries(body).forEach(([key, value]) => {\n if (value === undefined || value === null) {\n return;\n }\n if (Array.isArray(value)) {\n value.forEach((v) => serializeFormDataPair(data, key, v));\n }\n else {\n serializeFormDataPair(data, key, value);\n }\n });\n return data;\n },\n};\nexport const jsonBodySerializer = {\n bodySerializer: (body) => JSON.stringify(body, (_key, value) => (typeof value === \"bigint\" ? value.toString() : value)),\n};\nexport const urlSearchParamsBodySerializer = {\n bodySerializer: (body) => {\n const data = new URLSearchParams();\n Object.entries(body).forEach(([key, value]) => {\n if (value === undefined || value === null) {\n return;\n }\n if (Array.isArray(value)) {\n value.forEach((v) => serializeUrlSearchParamsPair(data, key, v));\n }\n else {\n serializeUrlSearchParamsPair(data, key, value);\n }\n });\n return data.toString();\n },\n};\n","// This file is auto-generated by @hey-api/openapi-ts\nexport const separatorArrayExplode = (style) => {\n switch (style) {\n case \"label\":\n return \".\";\n case \"matrix\":\n return \";\";\n case \"simple\":\n return \",\";\n default:\n return \"&\";\n }\n};\nexport const separatorArrayNoExplode = (style) => {\n switch (style) {\n case \"form\":\n return \",\";\n case \"pipeDelimited\":\n return \"|\";\n case \"spaceDelimited\":\n return \"%20\";\n default:\n return \",\";\n }\n};\nexport const separatorObjectExplode = (style) => {\n switch (style) {\n case \"label\":\n return \".\";\n case \"matrix\":\n return \";\";\n case \"simple\":\n return \",\";\n default:\n return \"&\";\n }\n};\nexport const serializeArrayParam = ({ allowReserved, explode, name, style, value, }) => {\n if (!explode) {\n const joinedValues = (allowReserved ? value : value.map((v) => encodeURIComponent(v))).join(separatorArrayNoExplode(style));\n switch (style) {\n case \"label\":\n return `.${joinedValues}`;\n case \"matrix\":\n return `;${name}=${joinedValues}`;\n case \"simple\":\n return joinedValues;\n default:\n return `${name}=${joinedValues}`;\n }\n }\n const separator = separatorArrayExplode(style);\n const joinedValues = value\n .map((v) => {\n if (style === \"label\" || style === \"simple\") {\n return allowReserved ? v : encodeURIComponent(v);\n }\n return serializePrimitiveParam({\n allowReserved,\n name,\n value: v,\n });\n })\n .join(separator);\n return style === \"label\" || style === \"matrix\" ? separator + joinedValues : joinedValues;\n};\nexport const serializePrimitiveParam = ({ allowReserved, name, value }) => {\n if (value === undefined || value === null) {\n return \"\";\n }\n if (typeof value === \"object\") {\n throw new Error(\"Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.\");\n }\n return `${name}=${allowReserved ? value : encodeURIComponent(value)}`;\n};\nexport const serializeObjectParam = ({ allowReserved, explode, name, style, value, valueOnly, }) => {\n if (value instanceof Date) {\n return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`;\n }\n if (style !== \"deepObject\" && !explode) {\n let values = [];\n Object.entries(value).forEach(([key, v]) => {\n values = [...values, key, allowReserved ? v : encodeURIComponent(v)];\n });\n const joinedValues = values.join(\",\");\n switch (style) {\n case \"form\":\n return `${name}=${joinedValues}`;\n case \"label\":\n return `.${joinedValues}`;\n case \"matrix\":\n return `;${name}=${joinedValues}`;\n default:\n return joinedValues;\n }\n }\n const separator = separatorObjectExplode(style);\n const joinedValues = Object.entries(value)\n .map(([key, v]) => serializePrimitiveParam({\n allowReserved,\n name: style === \"deepObject\" ? `${name}[${key}]` : key,\n value: v,\n }))\n .join(separator);\n return style === \"label\" || style === \"matrix\" ? separator + joinedValues : joinedValues;\n};\n","// This file is auto-generated by @hey-api/openapi-ts\nimport { serializeArrayParam, serializeObjectParam, serializePrimitiveParam, } from \"./pathSerializer.gen.js\";\nexport const PATH_PARAM_RE = /\\{[^{}]+\\}/g;\nexport const defaultPathSerializer = ({ path, url: _url }) => {\n let url = _url;\n const matches = _url.match(PATH_PARAM_RE);\n if (matches) {\n for (const match of matches) {\n let explode = false;\n let name = match.substring(1, match.length - 1);\n let style = \"simple\";\n if (name.endsWith(\"*\")) {\n explode = true;\n name = name.substring(0, name.length - 1);\n }\n if (name.startsWith(\".\")) {\n name = name.substring(1);\n style = \"label\";\n }\n else if (name.startsWith(\";\")) {\n name = name.substring(1);\n style = \"matrix\";\n }\n const value = path[name];\n if (value === undefined || value === null) {\n continue;\n }\n if (Array.isArray(value)) {\n url = url.replace(match, serializeArrayParam({ explode, name, style, value }));\n continue;\n }\n if (typeof value === \"object\") {\n url = url.replace(match, serializeObjectParam({\n explode,\n name,\n style,\n value: value,\n valueOnly: true,\n }));\n continue;\n }\n if (style === \"matrix\") {\n url = url.replace(match, `;${serializePrimitiveParam({\n name,\n value: value,\n })}`);\n continue;\n }\n const replaceValue = encodeURIComponent(style === \"label\" ? `.${value}` : value);\n url = url.replace(match, replaceValue);\n }\n }\n return url;\n};\nexport const getUrl = ({ baseUrl, path, query, querySerializer, url: _url, }) => {\n const pathUrl = _url.startsWith(\"/\") ? _url : `/${_url}`;\n let url = (baseUrl ?? \"\") + pathUrl;\n if (path) {\n url = defaultPathSerializer({ path, url });\n }\n let search = query ? querySerializer(query) : \"\";\n if (search.startsWith(\"?\")) {\n search = search.substring(1);\n }\n if (search) {\n url += `?${search}`;\n }\n return url;\n};\n","// This file is auto-generated by @hey-api/openapi-ts\nimport { getAuthToken } from \"../core/auth.gen.js\";\nimport { jsonBodySerializer } from \"../core/bodySerializer.gen.js\";\nimport { serializeArrayParam, serializeObjectParam, serializePrimitiveParam } from \"../core/pathSerializer.gen.js\";\nimport { getUrl } from \"../core/utils.gen.js\";\nexport const createQuerySerializer = ({ allowReserved, array, object } = {}) => {\n const querySerializer = (queryParams) => {\n const search = [];\n if (queryParams && typeof queryParams === \"object\") {\n for (const name in queryParams) {\n const value = queryParams[name];\n if (value === undefined || value === null) {\n continue;\n }\n if (Array.isArray(value)) {\n const serializedArray = serializeArrayParam({\n allowReserved,\n explode: true,\n name,\n style: \"form\",\n value,\n ...array,\n });\n if (serializedArray)\n search.push(serializedArray);\n }\n else if (typeof value === \"object\") {\n const serializedObject = serializeObjectParam({\n allowReserved,\n explode: true,\n name,\n style: \"deepObject\",\n value: value,\n ...object,\n });\n if (serializedObject)\n search.push(serializedObject);\n }\n else {\n const serializedPrimitive = serializePrimitiveParam({\n allowReserved,\n name,\n value: value,\n });\n if (serializedPrimitive)\n search.push(serializedPrimitive);\n }\n }\n }\n return search.join(\"&\");\n };\n return querySerializer;\n};\n/**\n * Infers parseAs value from provided Content-Type header.\n */\nexport const getParseAs = (contentType) => {\n if (!contentType) {\n // If no Content-Type header is provided, the best we can do is return the raw response body,\n // which is effectively the same as the 'stream' option.\n return \"stream\";\n }\n const cleanContent = contentType.split(\";\")[0]?.trim();\n if (!cleanContent) {\n return;\n }\n if (cleanContent.startsWith(\"application/json\") || cleanContent.endsWith(\"+json\")) {\n return \"json\";\n }\n if (cleanContent === \"multipart/form-data\") {\n return \"formData\";\n }\n if ([\"application/\", \"audio/\", \"image/\", \"video/\"].some((type) => cleanContent.startsWith(type))) {\n return \"blob\";\n }\n if (cleanContent.startsWith(\"text/\")) {\n return \"text\";\n }\n return;\n};\nconst checkForExistence = (options, name) => {\n if (!name) {\n return false;\n }\n if (options.headers.has(name) || options.query?.[name] || options.headers.get(\"Cookie\")?.includes(`${name}=`)) {\n return true;\n }\n return false;\n};\nexport const setAuthParams = async ({ security, ...options }) => {\n for (const auth of security) {\n if (checkForExistence(options, auth.name)) {\n continue;\n }\n const token = await getAuthToken(auth, options.auth);\n if (!token) {\n continue;\n }\n const name = auth.name ?? \"Authorization\";\n switch (auth.in) {\n case \"query\":\n if (!options.query) {\n options.query = {};\n }\n options.query[name] = token;\n break;\n case \"cookie\":\n options.headers.append(\"Cookie\", `${name}=${token}`);\n break;\n case \"header\":\n default:\n options.headers.set(name, token);\n break;\n }\n }\n};\nexport const buildUrl = (options) => getUrl({\n baseUrl: options.baseUrl,\n path: options.path,\n query: options.query,\n querySerializer: typeof options.querySerializer === \"function\"\n ? options.querySerializer\n : createQuerySerializer(options.querySerializer),\n url: options.url,\n});\nexport const mergeConfigs = (a, b) => {\n const config = { ...a, ...b };\n if (config.baseUrl?.endsWith(\"/\")) {\n config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1);\n }\n config.headers = mergeHeaders(a.headers, b.headers);\n return config;\n};\nexport const mergeHeaders = (...headers) => {\n const mergedHeaders = new Headers();\n for (const header of headers) {\n if (!header || typeof header !== \"object\") {\n continue;\n }\n const iterator = header instanceof Headers ? header.entries() : Object.entries(header);\n for (const [key, value] of iterator) {\n if (value === null) {\n mergedHeaders.delete(key);\n }\n else if (Array.isArray(value)) {\n for (const v of value) {\n mergedHeaders.append(key, v);\n }\n }\n else if (value !== undefined) {\n // assume object headers are meant to be JSON stringified, i.e. their\n // content value in OpenAPI specification is 'application/json'\n mergedHeaders.set(key, typeof value === \"object\" ? JSON.stringify(value) : value);\n }\n }\n }\n return mergedHeaders;\n};\nclass Interceptors {\n _fns;\n constructor() {\n this._fns = [];\n }\n clear() {\n this._fns = [];\n }\n getInterceptorIndex(id) {\n if (typeof id === \"number\") {\n return this._fns[id] ? id : -1;\n }\n else {\n return this._fns.indexOf(id);\n }\n }\n exists(id) {\n const index = this.getInterceptorIndex(id);\n return !!this._fns[index];\n }\n eject(id) {\n const index = this.getInterceptorIndex(id);\n if (this._fns[index]) {\n this._fns[index] = null;\n }\n }\n update(id, fn) {\n const index = this.getInterceptorIndex(id);\n if (this._fns[index]) {\n this._fns[index] = fn;\n return id;\n }\n else {\n return false;\n }\n }\n use(fn) {\n this._fns = [...this._fns, fn];\n return this._fns.length - 1;\n }\n}\n// do not add `Middleware` as return type so we can use _fns internally\nexport const createInterceptors = () => ({\n error: new Interceptors(),\n request: new Interceptors(),\n response: new Interceptors(),\n});\nconst defaultQuerySerializer = createQuerySerializer({\n allowReserved: false,\n array: {\n explode: true,\n style: \"form\",\n },\n object: {\n explode: true,\n style: \"deepObject\",\n },\n});\nconst defaultHeaders = {\n \"Content-Type\": \"application/json\",\n};\nexport const createConfig = (override = {}) => ({\n ...jsonBodySerializer,\n headers: defaultHeaders,\n parseAs: \"auto\",\n querySerializer: defaultQuerySerializer,\n ...override,\n});\n","// This file is auto-generated by @hey-api/openapi-ts\nimport { createSseClient } from \"../core/serverSentEvents.gen.js\";\nimport { buildUrl, createConfig, createInterceptors, getParseAs, mergeConfigs, mergeHeaders, setAuthParams, } from \"./utils.gen.js\";\nexport const createClient = (config = {}) => {\n let _config = mergeConfigs(createConfig(), config);\n const getConfig = () => ({ ..._config });\n const setConfig = (config) => {\n _config = mergeConfigs(_config, config);\n return getConfig();\n };\n const interceptors = createInterceptors();\n const beforeRequest = async (options) => {\n const opts = {\n ..._config,\n ...options,\n fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,\n headers: mergeHeaders(_config.headers, options.headers),\n serializedBody: undefined,\n };\n if (opts.security) {\n await setAuthParams({\n ...opts,\n security: opts.security,\n });\n }\n if (opts.requestValidator) {\n await opts.requestValidator(opts);\n }\n if (opts.body && opts.bodySerializer) {\n opts.serializedBody = opts.bodySerializer(opts.body);\n }\n // remove Content-Type header if body is empty to avoid sending invalid requests\n if (opts.serializedBody === undefined || opts.serializedBody === \"\") {\n opts.headers.delete(\"Content-Type\");\n }\n const url = buildUrl(opts);\n return { opts, url };\n };\n const request = async (options) => {\n // @ts-expect-error\n const { opts, url } = await beforeRequest(options);\n const requestInit = {\n redirect: \"follow\",\n ...opts,\n body: opts.serializedBody,\n };\n let request = new Request(url, requestInit);\n for (const fn of interceptors.request._fns) {\n if (fn) {\n request = await fn(request, opts);\n }\n }\n // fetch must be assigned here, otherwise it would throw the error:\n // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation\n const _fetch = opts.fetch;\n let response = await _fetch(request);\n for (const fn of interceptors.response._fns) {\n if (fn) {\n response = await fn(response, request, opts);\n }\n }\n const result = {\n request,\n response,\n };\n if (response.ok) {\n if (response.status === 204 || response.headers.get(\"Content-Length\") === \"0\") {\n return opts.responseStyle === \"data\"\n ? {}\n : {\n data: {},\n ...result,\n };\n }\n const parseAs = (opts.parseAs === \"auto\" ? getParseAs(response.headers.get(\"Content-Type\")) : opts.parseAs) ?? \"json\";\n let data;\n switch (parseAs) {\n case \"arrayBuffer\":\n case \"blob\":\n case \"formData\":\n case \"json\":\n case \"text\":\n data = await response[parseAs]();\n break;\n case \"stream\":\n return opts.responseStyle === \"data\"\n ? response.body\n : {\n data: response.body,\n ...result,\n };\n }\n if (parseAs === \"json\") {\n if (opts.responseValidator) {\n await opts.responseValidator(data);\n }\n if (opts.responseTransformer) {\n data = await opts.responseTransformer(data);\n }\n }\n return opts.responseStyle === \"data\"\n ? data\n : {\n data,\n ...result,\n };\n }\n const textError = await response.text();\n let jsonError;\n try {\n jsonError = JSON.parse(textError);\n }\n catch {\n // noop\n }\n const error = jsonError ?? textError;\n let finalError = error;\n for (const fn of interceptors.error._fns) {\n if (fn) {\n finalError = (await fn(error, response, request, opts));\n }\n }\n finalError = finalError || {};\n if (opts.throwOnError) {\n throw finalError;\n }\n // TODO: we probably want to return error and improve types\n return opts.responseStyle === \"data\"\n ? undefined\n : {\n error: finalError,\n ...result,\n };\n };\n const makeMethod = (method) => {\n const fn = (options) => request({ ...options, method });\n fn.sse = async (options) => {\n const { opts, url } = await beforeRequest(options);\n return createSseClient({\n ...opts,\n body: opts.body,\n headers: opts.headers,\n method,\n url,\n });\n };\n return fn;\n };\n return {\n buildUrl,\n connect: makeMethod(\"CONNECT\"),\n delete: makeMethod(\"DELETE\"),\n get: makeMethod(\"GET\"),\n getConfig,\n head: makeMethod(\"HEAD\"),\n interceptors,\n options: makeMethod(\"OPTIONS\"),\n patch: makeMethod(\"PATCH\"),\n post: makeMethod(\"POST\"),\n put: makeMethod(\"PUT\"),\n request,\n setConfig,\n trace: makeMethod(\"TRACE\"),\n };\n};\n","// This file is auto-generated by @hey-api/openapi-ts\nconst extraPrefixesMap = {\n $body_: \"body\",\n $headers_: \"headers\",\n $path_: \"path\",\n $query_: \"query\",\n};\nconst extraPrefixes = Object.entries(extraPrefixesMap);\nconst buildKeyMap = (fields, map) => {\n if (!map) {\n map = new Map();\n }\n for (const config of fields) {\n if (\"in\" in config) {\n if (config.key) {\n map.set(config.key, {\n in: config.in,\n map: config.map,\n });\n }\n }\n else if (config.args) {\n buildKeyMap(config.args, map);\n }\n }\n return map;\n};\nconst stripEmptySlots = (params) => {\n for (const [slot, value] of Object.entries(params)) {\n if (value && typeof value === \"object\" && !Object.keys(value).length) {\n delete params[slot];\n }\n }\n};\nexport const buildClientParams = (args, fields) => {\n const params = {\n body: {},\n headers: {},\n path: {},\n query: {},\n };\n const map = buildKeyMap(fields);\n let config;\n for (const [index, arg] of args.entries()) {\n if (fields[index]) {\n config = fields[index];\n }\n if (!config) {\n continue;\n }\n if (\"in\" in config) {\n if (config.key) {\n const field = map.get(config.key);\n const name = field.map || config.key;\n params[field.in][name] = arg;\n }\n else {\n params.body = arg;\n }\n }\n else {\n for (const [key, value] of Object.entries(arg ?? {})) {\n const field = map.get(key);\n if (field) {\n const name = field.map || key;\n params[field.in][name] = value;\n }\n else {\n const extra = extraPrefixes.find(([prefix]) => key.startsWith(prefix));\n if (extra) {\n const [prefix, slot] = extra;\n params[slot][key.slice(prefix.length)] = value;\n }\n else {\n for (const [slot, allowed] of Object.entries(config.allowExtra ?? {})) {\n if (allowed) {\n ;\n params[slot][key] = value;\n break;\n }\n }\n }\n }\n }\n }\n }\n stripEmptySlots(params);\n return params;\n};\n","// This file is auto-generated by @hey-api/openapi-ts\nimport { createClient, createConfig } from \"./client/index.js\";\nexport const client = createClient(createConfig({\n baseUrl: \"http://localhost:4096\",\n}));\n","// This file is auto-generated by @hey-api/openapi-ts\nimport { client as _heyApiClient } from \"./client.gen.js\";\nclass _HeyApiClient {\n _client = _heyApiClient;\n constructor(args) {\n if (args?.client) {\n this._client = args.client;\n }\n }\n}\nclass Global extends _HeyApiClient {\n /**\n * Get events\n */\n event(options) {\n return (options?.client ?? this._client).get.sse({\n url: \"/global/event\",\n ...options,\n });\n }\n}\nclass Project extends _HeyApiClient {\n /**\n * List all projects\n */\n list(options) {\n return (options?.client ?? this._client).get({\n url: \"/project\",\n ...options,\n });\n }\n /**\n * Get the current project\n */\n current(options) {\n return (options?.client ?? this._client).get({\n url: \"/project/current\",\n ...options,\n });\n }\n}\nclass Pty extends _HeyApiClient {\n /**\n * List all PTY sessions\n */\n list(options) {\n return (options?.client ?? this._client).get({\n url: \"/pty\",\n ...options,\n });\n }\n /**\n * Create a new PTY session\n */\n create(options) {\n return (options?.client ?? this._client).post({\n url: \"/pty\",\n ...options,\n headers: {\n \"Content-Type\": \"application/json\",\n ...options?.headers,\n },\n });\n }\n /**\n * Remove a PTY session\n */\n remove(options) {\n return (options.client ?? this._client).delete({\n url: \"/pty/{id}\",\n ...options,\n });\n }\n /**\n * Get PTY session info\n */\n get(options) {\n return (options.client ?? this._client).get({\n url: \"/pty/{id}\",\n ...options,\n });\n }\n /**\n * Update PTY session\n */\n update(options) {\n return (options.client ?? this._client).put({\n url: \"/pty/{id}\",\n ...options,\n headers: {\n \"Content-Type\": \"application/json\",\n ...options.headers,\n },\n });\n }\n /**\n * Connect to a PTY session\n */\n connect(options) {\n return (options.client ?? this._client).get({\n url: \"/pty/{id}/connect\",\n ...options,\n });\n }\n}\nclass Config extends _HeyApiClient {\n /**\n * Get config info\n */\n get(options) {\n return (options?.client ?? this._client).get({\n url: \"/config\",\n ...options,\n });\n }\n /**\n * Update config\n */\n update(options) {\n return (options?.client ?? this._client).patch({\n url: \"/config\",\n ...options,\n headers: {\n \"Content-Type\": \"application/json\",\n ...options?.headers,\n },\n });\n }\n /**\n * List all providers\n */\n providers(options) {\n return (options?.client ?? this._client).get({\n url: \"/config/providers\",\n ...options,\n });\n }\n}\nclass Tool extends _HeyApiClient {\n /**\n * List all tool IDs (including built-in and dynamically registered)\n */\n ids(options) {\n return (options?.client ?? this._client).get({\n url: \"/experimental/tool/ids\",\n ...options,\n });\n }\n /**\n * List tools with JSON schema parameters for a provider/model\n */\n list(options) {\n return (options.client ?? this._client).get({\n url: \"/experimental/tool\",\n ...options,\n });\n }\n}\nclass Instance extends _HeyApiClient {\n /**\n * Dispose the current instance\n */\n dispose(options) {\n return (options?.client ?? this._client).post({\n url: \"/instance/dispose\",\n ...options,\n });\n }\n}\nclass Path extends _HeyApiClient {\n /**\n * Get the current path\n */\n get(options) {\n return (options?.client ?? this._client).get({\n url: \"/path\",\n ...options,\n });\n }\n}\nclass Vcs extends _HeyApiClient {\n /**\n * Get VCS info for the current instance\n */\n get(options) {\n return (options?.client ?? this._client).get({\n url: \"/vcs\",\n ...options,\n });\n }\n}\nclass Session extends _HeyApiClient {\n /**\n * List all sessions\n */\n list(options) {\n return (options?.client ?? this._client).get({\n url: \"/session\",\n ...options,\n });\n }\n /**\n * Create a new session\n */\n create(options) {\n return (options?.client ?? this._client).post({\n url: \"/session\",\n ...options,\n headers: {\n \"Content-Type\": \"application/json\",\n ...options?.headers,\n },\n });\n }\n /**\n * Get session status\n */\n status(options) {\n return (options?.client ?? this._client).get({\n url: \"/session/status\",\n ...options,\n });\n }\n /**\n * Delete a session and all its data\n */\n delete(options) {\n return (options.client ?? this._client).delete({\n url: \"/session/{id}\",\n ...options,\n });\n }\n /**\n * Get session\n */\n get(options) {\n return (options.client ?? this._client).get({\n url: \"/session/{id}\",\n ...options,\n });\n }\n /**\n * Update session properties\n */\n update(options) {\n return (options.client ?? this._client).patch({\n url: \"/session/{id}\",\n ...options,\n headers: {\n \"Content-Type\": \"application/json\",\n ...options.headers,\n },\n });\n }\n /**\n * Get a session's children\n */\n children(options) {\n return (options.client ?? this._client).get({\n url: \"/session/{id}/children\",\n ...options,\n });\n }\n /**\n * Get the todo list for a session\n */\n todo(options) {\n return (options.client ?? this._client).get({\n url: \"/session/{id}/todo\",\n ...options,\n });\n }\n /**\n * Analyze the app and create an AGENTS.md file\n */\n init(options) {\n return (options.client ?? this._client).post({\n url: \"/session/{id}/init\",\n ...options,\n headers: {\n \"Content-Type\": \"application/json\",\n ...options.headers,\n },\n });\n }\n /**\n * Fork an existing session at a specific message\n */\n fork(options) {\n return (options.client ?? this._client).post({\n url: \"/session/{id}/fork\",\n ...options,\n headers: {\n \"Content-Type\": \"application/json\",\n ...options.headers,\n },\n });\n }\n /**\n * Abort a session\n */\n abort(options) {\n return (options.client ?? this._client).post({\n url: \"/session/{id}/abort\",\n ...options,\n });\n }\n /**\n * Unshare the session\n */\n unshare(options) {\n return (options.client ?? this._client).delete({\n url: \"/session/{id}/share\",\n ...options,\n });\n }\n /**\n * Share a session\n */\n share(options) {\n return (options.client ?? this._client).post({\n url: \"/session/{id}/share\",\n ...options,\n });\n }\n /**\n * Get the diff for this session\n */\n diff(options) {\n return (options.client ?? this._client).get({\n url: \"/session/{id}/diff\",\n ...options,\n });\n }\n /**\n * Summarize the session\n */\n summarize(options) {\n return (options.client ?? this._client).post({\n url: \"/session/{id}/summarize\",\n ...options,\n headers: {\n \"Content-Type\": \"application/json\",\n ...options.headers,\n },\n });\n }\n /**\n * List messages for a session\n */\n messages(options) {\n return (options.client ?? this._client).get({\n url: \"/session/{id}/message\",\n ...options,\n });\n }\n /**\n * Create and send a new message to a session\n */\n prompt(options) {\n return (options.client ?? this._client).post({\n url: \"/session/{id}/message\",\n ...options,\n headers: {\n \"Content-Type\": \"application/json\",\n ...options.headers,\n },\n });\n }\n /**\n * Get a message from a session\n */\n message(options) {\n return (options.client ?? this._client).get({\n url: \"/session/{id}/message/{messageID}\",\n ...options,\n });\n }\n /**\n * Create and send a new message to a session, start if needed and return immediately\n */\n promptAsync(options) {\n return (options.client ?? this._client).post({\n url: \"/session/{id}/prompt_async\",\n ...options,\n headers: {\n \"Content-Type\": \"application/json\",\n ...options.headers,\n },\n });\n }\n /**\n * Send a new command to a session\n */\n command(options) {\n return (options.client ?? this._client).post({\n url: \"/session/{id}/command\",\n ...options,\n headers: {\n \"Content-Type\": \"application/json\",\n ...options.headers,\n },\n });\n }\n /**\n * Run a shell command\n */\n shell(options) {\n return (options.client ?? this._client).post({\n url: \"/session/{id}/shell\",\n ...options,\n headers: {\n \"Content-Type\": \"application/json\",\n ...options.headers,\n },\n });\n }\n /**\n * Revert a message\n */\n revert(options) {\n return (options.client ?? this._client).post({\n url: \"/session/{id}/revert\",\n ...options,\n headers: {\n \"Content-Type\": \"application/json\",\n ...options.headers,\n },\n });\n }\n /**\n * Restore all reverted messages\n */\n unrevert(options) {\n return (options.client ?? this._client).post({\n url: \"/session/{id}/unrevert\",\n ...options,\n });\n }\n}\nclass Command extends _HeyApiClient {\n /**\n * List all commands\n */\n list(options) {\n return (options?.client ?? this._client).get({\n url: \"/command\",\n ...options,\n });\n }\n}\nclass Oauth extends _HeyApiClient {\n /**\n * Authorize a provider using OAuth\n */\n authorize(options) {\n return (options.client ?? this._client).post({\n url: \"/provider/{id}/oauth/authorize\",\n ...options,\n headers: {\n \"Content-Type\": \"application/json\",\n ...options.headers,\n },\n });\n }\n /**\n * Handle OAuth callback for a provider\n */\n callback(options) {\n return (options.client ?? this._client).post({\n url: \"/provider/{id}/oauth/callback\",\n ...options,\n headers: {\n \"Content-Type\": \"application/json\",\n ...options.headers,\n },\n });\n }\n}\nclass Provider extends _HeyApiClient {\n /**\n * List all providers\n */\n list(options) {\n return (options?.client ?? this._client).get({\n url: \"/provider\",\n ...options,\n });\n }\n /**\n * Get provider authentication methods\n */\n auth(options) {\n return (options?.client ?? this._client).get({\n url: \"/provider/auth\",\n ...options,\n });\n }\n oauth = new Oauth({ client: this._client });\n}\nclass Find extends _HeyApiClient {\n /**\n * Find text in files\n */\n text(options) {\n return (options.client ?? this._client).get({\n url: \"/find\",\n ...options,\n });\n }\n /**\n * Find files\n */\n files(options) {\n return (options.client ?? this._client).get({\n url: \"/find/file\",\n ...options,\n });\n }\n /**\n * Find workspace symbols\n */\n symbols(options) {\n return (options.client ?? this._client).get({\n url: \"/find/symbol\",\n ...options,\n });\n }\n}\nclass File extends _HeyApiClient {\n /**\n * List files and directories\n */\n list(options) {\n return (options.client ?? this._client).get({\n url: \"/file\",\n ...options,\n });\n }\n /**\n * Read a file\n */\n read(options) {\n return (options.client ?? this._client).get({\n url: \"/file/content\",\n ...options,\n });\n }\n /**\n * Get file status\n */\n status(options) {\n return (options?.client ?? this._client).get({\n url: \"/file/status\",\n ...options,\n });\n }\n}\nclass App extends _HeyApiClient {\n /**\n * Write a log entry to the server logs\n */\n log(options) {\n return (options?.client ?? this._client).post({\n url: \"/log\",\n ...options,\n headers: {\n \"Content-Type\": \"application/json\",\n ...options?.headers,\n },\n });\n }\n /**\n * List all agents\n */\n agents(options) {\n return (options?.client ?? this._client).get({\n url: \"/agent\",\n ...options,\n });\n }\n}\nclass Auth extends _HeyApiClient {\n /**\n * Remove OAuth credentials for an MCP server\n */\n remove(options) {\n return (options.client ?? this._client).delete({\n url: \"/mcp/{name}/auth\",\n ...options,\n });\n }\n /**\n * Start OAuth authentication flow for an MCP server\n */\n start(options) {\n return (options.client ?? this._client).post({\n url: \"/mcp/{name}/auth\",\n ...options,\n });\n }\n /**\n * Complete OAuth authentication with authorization code\n */\n callback(options) {\n return (options.client ?? this._client).post({\n url: \"/mcp/{name}/auth/callback\",\n ...options,\n headers: {\n \"Content-Type\": \"application/json\",\n ...options.headers,\n },\n });\n }\n /**\n * Start OAuth flow and wait for callback (opens browser)\n */\n authenticate(options) {\n return (options.client ?? this._client).post({\n url: \"/mcp/{name}/auth/authenticate\",\n ...options,\n });\n }\n /**\n * Set authentication credentials\n */\n set(options) {\n return (options.client ?? this._client).put({\n url: \"/auth/{id}\",\n ...options,\n headers: {\n \"Content-Type\": \"application/json\",\n ...options.headers,\n },\n });\n }\n}\nclass Mcp extends _HeyApiClient {\n /**\n * Get MCP server status\n */\n status(options) {\n return (options?.client ?? this._client).get({\n url: \"/mcp\",\n ...options,\n });\n }\n /**\n * Add MCP server dynamically\n */\n add(options) {\n return (options?.client ?? this._client).post({\n url: \"/mcp\",\n ...options,\n headers: {\n \"Content-Type\": \"application/json\",\n ...options?.headers,\n },\n });\n }\n /**\n * Connect an MCP server\n */\n connect(options) {\n return (options.client ?? this._client).post({\n url: \"/mcp/{name}/connect\",\n ...options,\n });\n }\n /**\n * Disconnect an MCP server\n */\n disconnect(options) {\n return (options.client ?? this._client).post({\n url: \"/mcp/{name}/disconnect\",\n ...options,\n });\n }\n auth = new Auth({ client: this._client });\n}\nclass Lsp extends _HeyApiClient {\n /**\n * Get LSP server status\n */\n status(options) {\n return (options?.client ?? this._client).get({\n url: \"/lsp\",\n ...options,\n });\n }\n}\nclass Formatter extends _HeyApiClient {\n /**\n * Get formatter status\n */\n status(options) {\n return (options?.client ?? this._client).get({\n url: \"/formatter\",\n ...options,\n });\n }\n}\nclass Control extends _HeyApiClient {\n /**\n * Get the next TUI request from the queue\n */\n next(options) {\n return (options?.client ?? this._client).get({\n url: \"/tui/control/next\",\n ...options,\n });\n }\n /**\n * Submit a response to the TUI request queue\n */\n response(options) {\n return (options?.client ?? this._client).post({\n url: \"/tui/control/response\",\n ...options,\n headers: {\n \"Content-Type\": \"application/json\",\n ...options?.headers,\n },\n });\n }\n}\nclass Tui extends _HeyApiClient {\n /**\n * Append prompt to the TUI\n */\n appendPrompt(options) {\n return (options?.client ?? this._client).post({\n url: \"/tui/append-prompt\",\n ...options,\n headers: {\n \"Content-Type\": \"application/json\",\n ...options?.headers,\n },\n });\n }\n /**\n * Open the help dialog\n */\n openHelp(options) {\n return (options?.client ?? this._client).post({\n url: \"/tui/open-help\",\n ...options,\n });\n }\n /**\n * Open the session dialog\n */\n openSessions(options) {\n return (options?.client ?? this._client).post({\n url: \"/tui/open-sessions\",\n ...options,\n });\n }\n /**\n * Open the theme dialog\n */\n openThemes(options) {\n return (options?.client ?? this._client).post({\n url: \"/tui/open-themes\",\n ...options,\n });\n }\n /**\n * Open the model dialog\n */\n openModels(options) {\n return (options?.client ?? this._client).post({\n url: \"/tui/open-models\",\n ...options,\n });\n }\n /**\n * Submit the prompt\n */\n submitPrompt(options) {\n return (options?.client ?? this._client).post({\n url: \"/tui/submit-prompt\",\n ...options,\n });\n }\n /**\n * Clear the prompt\n */\n clearPrompt(options) {\n return (options?.client ?? this._client).post({\n url: \"/tui/clear-prompt\",\n ...options,\n });\n }\n /**\n * Execute a TUI command (e.g. agent_cycle)\n */\n executeCommand(options) {\n return (options?.client ?? this._client).post({\n url: \"/tui/execute-command\",\n ...options,\n headers: {\n \"Content-Type\": \"application/json\",\n ...options?.headers,\n },\n });\n }\n /**\n * Show a toast notification in the TUI\n */\n showToast(options) {\n return (options?.client ?? this._client).post({\n url: \"/tui/show-toast\",\n ...options,\n headers: {\n \"Content-Type\": \"application/json\",\n ...options?.headers,\n },\n });\n }\n /**\n * Publish a TUI event\n */\n publish(options) {\n return (options?.client ?? this._client).post({\n url: \"/tui/publish\",\n ...options,\n headers: {\n \"Content-Type\": \"application/json\",\n ...options?.headers,\n },\n });\n }\n control = new Control({ client: this._client });\n}\nclass Event extends _HeyApiClient {\n /**\n * Get events\n */\n subscribe(options) {\n return (options?.client ?? this._client).get.sse({\n url: \"/event\",\n ...options,\n });\n }\n}\nexport class OpencodeClient extends _HeyApiClient {\n /**\n * Respond to a permission request\n */\n postSessionIdPermissionsPermissionId(options) {\n return (options.client ?? this._client).post({\n url: \"/session/{id}/permissions/{permissionID}\",\n ...options,\n headers: {\n \"Content-Type\": \"application/json\",\n ...options.headers,\n },\n });\n }\n global = new Global({ client: this._client });\n project = new Project({ client: this._client });\n pty = new Pty({ client: this._client });\n config = new Config({ client: this._client });\n tool = new Tool({ client: this._client });\n instance = new Instance({ client: this._client });\n path = new Path({ client: this._client });\n vcs = new Vcs({ client: this._client });\n session = new Session({ client: this._client });\n command = new Command({ client: this._client });\n provider = new Provider({ client: this._client });\n find = new Find({ client: this._client });\n file = new File({ client: this._client });\n app = new App({ client: this._client });\n mcp = new Mcp({ client: this._client });\n lsp = new Lsp({ client: this._client });\n formatter = new Formatter({ client: this._client });\n tui = new Tui({ client: this._client });\n auth = new Auth({ client: this._client });\n event = new Event({ client: this._client });\n}\n","export * from \"./gen/types.gen.js\";\nimport { createClient } from \"./gen/client/client.gen.js\";\nimport { OpencodeClient } from \"./gen/sdk.gen.js\";\nexport { OpencodeClient };\nexport function createOpencodeClient(config) {\n if (!config?.fetch) {\n const customFetch = (req) => {\n // @ts-ignore\n req.timeout = false;\n return fetch(req);\n };\n config = {\n ...config,\n fetch: customFetch,\n };\n }\n if (config?.directory) {\n config.headers = {\n ...config.headers,\n \"x-opencode-directory\": encodeURIComponent(config.directory),\n };\n }\n const client = createClient(config);\n return new OpencodeClient({ client });\n}\n","import { spawn } from \"node:child_process\";\nexport async function createOpencodeServer(options) {\n options = Object.assign({\n hostname: \"127.0.0.1\",\n port: 4096,\n timeout: 5000,\n }, options ?? {});\n const args = [`serve`, `--hostname=${options.hostname}`, `--port=${options.port}`];\n if (options.config?.logLevel)\n args.push(`--log-level=${options.config.logLevel}`);\n const proc = spawn(`opencode`, args, {\n signal: options.signal,\n env: {\n ...process.env,\n OPENCODE_CONFIG_CONTENT: JSON.stringify(options.config ?? {}),\n },\n });\n const url = await new Promise((resolve, reject) => {\n const id = setTimeout(() => {\n reject(new Error(`Timeout waiting for server to start after ${options.timeout}ms`));\n }, options.timeout);\n let output = \"\";\n proc.stdout?.on(\"data\", (chunk) => {\n output += chunk.toString();\n const lines = output.split(\"\\n\");\n for (const line of lines) {\n if (line.startsWith(\"opencode server listening\")) {\n const match = line.match(/on\\s+(https?:\\/\\/[^\\s]+)/);\n if (!match) {\n throw new Error(`Failed to parse server url from output: ${line}`);\n }\n clearTimeout(id);\n resolve(match[1]);\n return;\n }\n }\n });\n proc.stderr?.on(\"data\", (chunk) => {\n output += chunk.toString();\n });\n proc.on(\"exit\", (code) => {\n clearTimeout(id);\n let msg = `Server exited with code ${code}`;\n if (output.trim()) {\n msg += `\\nServer output: ${output}`;\n }\n reject(new Error(msg));\n });\n proc.on(\"error\", (error) => {\n clearTimeout(id);\n reject(error);\n });\n if (options.signal) {\n options.signal.addEventListener(\"abort\", () => {\n clearTimeout(id);\n reject(new Error(\"Aborted\"));\n });\n }\n });\n return {\n url,\n close() {\n proc.kill();\n },\n };\n}\nexport function createOpencodeTui(options) {\n const args = [];\n if (options?.project) {\n args.push(`--project=${options.project}`);\n }\n if (options?.model) {\n args.push(`--model=${options.model}`);\n }\n if (options?.session) {\n args.push(`--session=${options.session}`);\n }\n if (options?.agent) {\n args.push(`--agent=${options.agent}`);\n }\n const proc = spawn(`opencode`, args, {\n signal: options?.signal,\n stdio: \"inherit\",\n env: {\n ...process.env,\n OPENCODE_CONFIG_CONTENT: JSON.stringify(options?.config ?? {}),\n },\n });\n return {\n close() {\n proc.kill();\n },\n };\n}\n","export * from \"./client.js\";\nexport * from \"./server.js\";\nimport { createOpencodeClient } from \"./client.js\";\nimport { createOpencodeServer } from \"./server.js\";\nexport async function createOpencode(options) {\n const server = await createOpencodeServer({\n ...options,\n });\n const client = createOpencodeClient({\n baseUrl: server.url,\n });\n return {\n client,\n server,\n };\n}\n"],"names":[],"mappings":"kJCCO,IAAM,EAAe,MAAO,EAAM,KACrC,IAAM,EAA4B,YAApB,OAAO,EAA0B,MAAM,EAAS,GAAQ,EACtE,GAAK,CAAD,MAAQ,CAGZ,AAAI,AAAgB,UAAU,GAArB,MAAM,CACJ,CAAC,OAAO,EAAE,EAAA,CAAO,CAER,AAAhB,SAAyB,GAApB,MAAM,CACJ,CAAC,MAAM,EAAE,KAAK,GAAA,CAAQ,CAE1B,CACX,ECwBa,EAAqB,CAC9B,eAAiB,AAAD,GAAU,KAAK,SAAS,CAAC,EAAM,CAAC,EAAM,IAA4B,UAAjB,OAAO,EAAqB,EAAM,QAAQ,GAAK,EACpH,ECFa,EAAsB,CAAC,eAAE,CAAa,SAAE,CAAO,MAAE,CAAI,OAAE,CAAK,OAAE,CAAK,CAAG,IAC/E,GAAI,CAAC,EAAS,CACV,IAAM,EAAe,CAAC,EAAgB,EAAQ,EAAM,GAAG,CAAC,AAAC,GAAM,mBAAmB,GAAA,CAAG,CAAE,IAAI,CAAC,CA1B5D,AAAD,IACnC,OAAQ,GACJ,IAAK,OAML,QALI,MAAO,GACX,KAAK,gBACD,MAAO,GACX,KAAK,iBACD,MAAO,KAGf,EACJ,EAe4H,IACpH,OAAQ,GACJ,IAAK,QACD,MAAO,CAAC,CAAC,EAAE,EAAA,CAAc,AAC7B,KAAK,SACD,MAAO,CAAC,CAAC,EAAE,EAAK,CAAC,EAAE,EAAA,CAAc,AACrC,KAAK,SACD,OAAO,CACX,SACI,MAAO,CAAA,EAAG,EAAK,CAAC,EAAE,EAAA,CAAc,AACxC,CACJ,CACA,IAAM,EAAY,CAlDe,AAAC,IAClC,OAAQ,GACJ,IAAK,QACD,MAAO,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OAAO,AAAC,EAAG,CACxC,IAAM,IAAI,EAAI,CAAE,OAAQ,IAAI,CAAC,OAAO,AAAC,EAAG,CACxC,UAAY,IAAI,EAAU,CAAE,OAAQ,IAAI,CAAC,OAAO,AAAC,EAAG,CACpD,IAAM,IAAI,EAAI,CAAE,OAAQ,IAAI,CAAC,OAAQ,AAAD,EAAI,CACxC,KAAO,IAAI,EAAK,CAAE,OAAQ,IAAI,CAAC,OAAO,AAAC,EAAG,CAC1C,MAAQ,IAAI,EAAM,CAAE,OAAQ,IAAI,CAAC,OAAO,AAAC,EAAG,AAChD,CC52BO,SAAS,EAAqB,CAAM,EAmBvC,OAlBK,GAAQ,OAAO,CAMhB,EAAS,CACL,GAAG,CAAM,CACT,MAPgB,AAAC,CAOV,GALP,EAAI,OAAO,EAAG,EACP,MAAM,IAKjB,EAEA,GAAQ,WAAW,CACnB,EAAO,OAAO,CAAG,CACb,GAAG,EAAO,OAAO,CACjB,uBAAwB,mBAAmB,EAAO,SAAS,EAC/D,EAGG,IAAI,EAAe,CAAE,OADb,EAAa,EACO,EACvC,2CCxBA,EAAA,CAAA,CAAA","ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12]}
@@ -1,3 +0,0 @@
1
- module.exports=[81951,e=>{"use strict";e.s(["RUNTIME_ROLE_ENV_VAR",0,"VIBEPULSE_RUNTIME_ROLE"])},68817,e=>{"use strict";var t=e.i(81951);let r="x-vibepulse-node-version",n={unauthorized:401,unsupported_node_version:426,node_misconfigured:503,upstream_unreachable:503,upstream_timeout:504};function o(e){return"string"!=typeof e?null:e.trim()||null}function s(e,t){let n=new Headers(t);n.set(r,"1");let s=o(e??null);return s&&n.set("authorization",`Bearer ${s}`),n}function i(e,t){return{ok:!1,reason:e,protocolVersion:"1",..."node_misconfigured"===e||"upstream_unreachable"===e||"upstream_timeout"===e?{degraded:!0}:{},...t??{}}}function a(e,t){return Response.json(i(e,t),{status:n[e]})}function u(e){return Response.json(e.body,{status:e.status})}function l(e,s={}){if("node"!==(s.runtimeRole??s.env?.[t.RUNTIME_ROLE_ENV_VAR]??process.env[t.RUNTIME_ROLE_ENV_VAR]))return{ok:!1,status:n.node_misconfigured,body:i("node_misconfigured")};let a=o(s.expectedToken)??function(e=process.env){return o(e.VIBEPULSE_NODE_TOKEN)}(s.env??process.env);if("1"!==e.headers.get(r))return{ok:!1,status:n.unsupported_node_version,body:i("unsupported_node_version")};if(a){var u;let t,r=(u=e.headers.get("authorization"),t=u?.match(/^Bearer\s+(.+)$/i),o(t?.[1]));if(!r||r!==a)return{ok:!1,status:n.unauthorized,body:i("unauthorized")}}return{ok:!0}}e.s(["NODE_PROTOCOL_VERSION",0,"1","createNodeFailureResponse",()=>a,"createNodeRequestHeaders",()=>s,"guardNodeRequest",()=>l,"toNodeRequestGuardResponse",()=>u])},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},33405,(e,t,r)=>{t.exports=e.x("child_process",()=>require("child_process"))},99686,e=>{"use strict";var t=e.i(33405);let r=new Set;function n(){let e=Number(process.env.OPENCODE_DISCOVERY_TIMEOUT_MS);return Number.isFinite(e)&&e>0?e:5e3}function o(e){if(!(e instanceof Error))return!1;let t=e.message.toLowerCase();return"ETIMEDOUT"===e.code||t.includes("timed out")||t.includes("etimedout")}function s(e){let t=e.deadlineMs-Date.now();return t<=0?(e.timedOut=!0,null):Math.max(1,Math.min(e.timeoutMs,t))}function i(e){return Array.from(new Set(e.filter(e=>Number.isInteger(e)&&e>0&&e<=65535))).sort((e,t)=>e-t)}function a(){let e=n(),a={timedOut:!1,timeoutMs:e,deadlineMs:Date.now()+e},u=i([...function(e){try{let r=s(e);if(null===r)return[];let n=(0,t.execSync)("lsof -nP -iTCP -sTCP:LISTEN",{encoding:"utf-8",stdio:["ignore","pipe","ignore"],timeout:r}).split("\n"),o=[];for(let e of n){let t=e.trim();if(!t||t.startsWith("COMMAND"))continue;let r=t.split(/\s+/),n=r[0]?.toLowerCase();if("opencode"!==n)continue;let s=t.match(/:(\d+)\s+\(LISTEN\)/);if(!s)continue;let i=parseInt(s[1],10);Number.isFinite(i)&&o.push(i)}return o}catch(t){return o(t)&&(e.timedOut=!0),[]}}(a),...function(e){try{let r=s(e);if(null===r)return[];return[...(0,t.execSync)("ps -axo command",{encoding:"utf-8",stdio:["ignore","pipe","ignore"],timeout:r}).matchAll(/\bopencode\b[^\n]*\b--port(?:=|\s+)(\d+)\b/g)].map(e=>parseInt(e[1],10)).filter(e=>Number.isFinite(e))}catch(t){return o(t)&&(e.timedOut=!0),[]}}(a)]);for(let e of u)r.add(e);return{ports:i([...u,...Array.from(r)]),timedOut:a.timedOut}}function u(){let e=n(),r={timedOut:!1,timeoutMs:e,deadlineMs:Date.now()+e},i=function(e){try{let r=s(e);if(null===r)return[];let n=(0,t.execSync)("ps -axo pid=,command=",{encoding:"utf-8",stdio:["ignore","pipe","ignore"],timeout:r}),o=[];for(let e of n.split("\n")){let t=e.trim();if(!t)continue;let r=t.match(/^(\d+)\s+(.+)$/);if(!r)continue;let n=parseInt(r[1],10),s=r[2];Number.isFinite(n)&&/\bopencode\b/.test(s)&&(/\b--port(?:=|\s+)\d+\b/.test(s)||o.push(n))}return Array.from(new Set(o))}catch(t){return o(t)&&(e.timedOut=!0),[]}}(r);if(!i.length)return{processes:[],timedOut:r.timedOut};let a=[],u=new Set;for(let e of i){let n=function(e,r){try{let n=s(r);if(null===n)return null;let o=(0,t.execSync)(`lsof -nP -a -p ${e} -d cwd -Fn`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"],timeout:n}).split("\n").find(e=>e.startsWith("n")&&e.length>1);if(!o)return null;return o.slice(1)}catch(e){return o(e)&&(r.timedOut=!0),null}}(e,r);if(!n)continue;let i=`${e}:${n}`;u.has(i)||(u.add(i),a.push({pid:e,cwd:n}))}return{processes:a,timedOut:r.timedOut}}e.s(["discoverOpencodePortsWithMeta",()=>a,"discoverOpencodeProcessCwdsWithoutPortWithMeta",()=>u])},74579,e=>{"use strict";let t=new Map,r=new Map;function n(e){for(let[t,n]of r)e-n>6e5&&r.delete(t);if(r.size<=5e3)return;let t=r.size-5e3,n=Array.from(r.entries()).sort((e,t)=>e[1]-t[1]);for(let e=0;e<t;e++){let[t]=n[e]??[];if(!t)break;r.delete(t)}}function o(e){for(let[r,n]of t)e-n.markedAt>12096e5&&t.delete(r);if(t.size<=5e3)return;let r=t.size-5e3,n=Array.from(t.entries()).sort((e,t)=>e[1].lastSeenAt-t[1].lastSeenAt);for(let e=0;e<r;e++){let[r]=n[e]??[];if(!r)break;t.delete(r)}}function s(e,r=Date.now()){let n=t.get(e);t.set(e,{markedAt:n?.markedAt??r,lastSeenAt:r}),o(r)}function i(e){t.delete(e)}function a(e,t=Date.now()){r.set(e,t),n(t)}function u(e){r.delete(e)}function l(e,t=Date.now()){let n=r.get(e);return"number"==typeof n&&(t-n>6e5?(r.delete(e),!1):(r.delete(e),!0))}function d(e=Date.now()){n(e)}function c(e,r=Date.now()){let n=t.get(e);return!!n&&(r-n.markedAt>12096e5?(t.delete(e),!1):(t.set(e,{...n,lastSeenAt:r}),!0))}function p(e=Date.now()){o(e)}e.s(["clearSessionForceUnarchived",()=>i,"clearSessionStickyStatusBlocked",()=>u,"markSessionForceUnarchived",()=>s,"markSessionStickyStatusBlocked",()=>a,"pruneSessionForceUnarchived",()=>p,"pruneSessionStickyStatusBlocked",()=>d,"shouldForceSessionUnarchived",()=>c,"takeSessionStickyStatusBlocked",()=>l])},98234,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),o=e.i(59756),s=e.i(61916),i=e.i(74677),a=e.i(69741),u=e.i(16795),l=e.i(87718),d=e.i(95169),c=e.i(47587),p=e.i(66012),f=e.i(70101),m=e.i(26937),h=e.i(10372),R=e.i(93695);e.i(52474);var g=e.i(220);e.i(39354);var v=e.i(34959),x=e.i(99686),E=e.i(68817),w=e.i(74579);async function y(e,{params:t}){let r,n=(0,E.guardNodeRequest)(e);if(!n.ok)return(0,E.toNodeRequestGuardResponse)(n);let{id:o}=await t,s=!(r=o.trim())||r.includes(":")?null:r;if(!s)return Response.json({error:"Invalid node session id"},{status:400});let{ports:i,timedOut:a}=(0,x.discoverOpencodePortsWithMeta)();if(!i.length)return(0,E.createNodeFailureResponse)(a?"upstream_timeout":"upstream_unreachable",{role:"node",upstream:{kind:"opencode",reachable:!1}});let u=[];for(let e of i)try{let t=(0,v.createOpencodeClient)({baseUrl:`http://localhost:${e}`});return await t.session.delete({path:{id:s}}),(0,w.clearSessionForceUnarchived)(s),(0,w.clearSessionStickyStatusBlocked)(s),Response.json({success:!0})}catch(e){u.push(e)}let l=u[u.length-1]?.message;return u.length>0&&u.every(e=>/not found|404/i.test(e.message))?Response.json({error:"Session not found",reason:"session_not_found",message:l},{status:404}):Response.json({error:"Failed to delete session",message:l,portsTried:i.length},{status:500})}e.s(["POST",()=>y,"dynamic",0,"force-dynamic"],11575);var S=e.i(11575);let _=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/node/sessions/[id]/delete/route",pathname:"/api/node/sessions/[id]/delete",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/node/sessions/[id]/delete/route.ts",nextConfigOutput:"standalone",userland:S}),{workAsyncStorage:O,workUnitAsyncStorage:b,serverHooks:N}=_;function A(){return(0,n.patchFetch)({workAsyncStorage:O,workUnitAsyncStorage:b})}async function k(e,t,n){_.isDev&&(0,o.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let v="/api/node/sessions/[id]/delete/route";v=v.replace(/\/index$/,"")||"/";let x=await _.prepare(e,t,{srcPage:v,multiZoneDraftMode:!1});if(!x)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:E,params:w,nextConfig:y,parsedUrl:S,isDraftMode:O,prerenderManifest:b,routerServerContext:N,isOnDemandRevalidate:A,revalidateOnlyGenerated:k,resolvedPathname:C,clientReferenceManifest:T,serverActionsManifest:P}=x,I=(0,a.normalizeAppPath)(v),M=!!(b.dynamicRoutes[I]||b.routes[C]),U=async()=>((null==N?void 0:N.render404)?await N.render404(e,t,S,!1):t.end("This page could not be found"),null);if(M&&!O){let e=!!b.routes[C],t=b.dynamicRoutes[I];if(t&&!1===t.fallback&&!e){if(y.experimental.adapterPath)return await U();throw new R.NoFallbackError}}let D=null;!M||_.isDev||O||(D="/index"===(D=C)?"/":D);let q=!0===_.isDev||!M,j=M&&!q;P&&T&&(0,i.setManifestsSingleton)({page:v,clientReferenceManifest:T,serverActionsManifest:P});let F=e.method||"GET",H=(0,s.getTracer)(),L=H.getActiveScopeSpan(),$={params:w,prerenderManifest:b,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts},cacheComponents:!!y.cacheComponents,supportsDynamicResponse:q,incrementalCache:(0,o.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:y.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,o)=>_.onRequestError(e,t,n,o,N)},sharedContext:{buildId:E}},B=new u.NodeNextRequest(e),V=new u.NodeNextResponse(t),z=l.NextRequestAdapter.fromNodeNextRequest(B,(0,l.signalFromNodeResponse)(t));try{let i=async e=>_.handle(z,$).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=H.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${F} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${F} ${v}`)}),a=!!(0,o.getRequestMeta)(e,"minimalMode"),u=async o=>{var s,u;let l=async({previousCacheEntry:r})=>{try{if(!a&&A&&k&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(o);e.fetchMetrics=$.renderOpts.fetchMetrics;let u=$.renderOpts.pendingWaitUntil;u&&n.waitUntil&&(n.waitUntil(u),u=void 0);let l=$.renderOpts.collectedTags;if(!M)return await (0,p.sendResponse)(B,V,s,$.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(s.headers);l&&(t[h.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==$.renderOpts.collectedRevalidate&&!($.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&$.renderOpts.collectedRevalidate,n=void 0===$.renderOpts.collectedExpire||$.renderOpts.collectedExpire>=h.INFINITE_CACHE?void 0:$.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await _.onRequestError(e,t,{routerKind:"App Router",routePath:v,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:j,isOnDemandRevalidate:A})},!1,N),t}},d=await _.handleResponse({req:e,nextConfig:y,cacheKey:D,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:b,isRoutePPREnabled:!1,isOnDemandRevalidate:A,revalidateOnlyGenerated:k,responseGenerator:l,waitUntil:n.waitUntil,isMinimalMode:a});if(!M)return null;if((null==d||null==(s=d.value)?void 0:s.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(u=d.value)?void 0:u.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});a||t.setHeader("x-nextjs-cache",A?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),O&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let R=(0,f.fromNodeOutgoingHttpHeaders)(d.value.headers);return a&&M||R.delete(h.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||R.get("Cache-Control")||R.set("Cache-Control",(0,m.getCacheControlHeader)(d.cacheControl)),await (0,p.sendResponse)(B,V,new Response(d.value.body,{headers:R,status:d.value.status||200})),null};L?await u(L):await H.withPropagatedContext(e.headers,()=>H.trace(d.BaseServerSpan.handleRequest,{spanName:`${F} ${v}`,kind:s.SpanKind.SERVER,attributes:{"http.method":F,"http.target":e.url}},u))}catch(t){if(t instanceof R.NoFallbackError||await _.onRequestError(e,t,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:j,isOnDemandRevalidate:A})},!1,N),M)throw t;return await (0,p.sendResponse)(B,V,new Response(null,{status:500})),null}}e.s(["handler",()=>k,"patchFetch",()=>A,"routeModule",()=>_,"serverHooks",()=>N,"workAsyncStorage",()=>O,"workUnitAsyncStorage",()=>b],98234)}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__1211da38._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},81951,e=>{"use strict";e.s(["RUNTIME_ROLE_ENV_VAR",0,"VIBEPULSE_RUNTIME_ROLE"])},54799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},82414,e=>{"use strict";var t=e.i(22734),r=e.i(24868),n=e.i(46786),o=e.i(14747),a=e.i(54799),s=e.i(89196);let i=(0,o.join)((0,n.homedir)(),".config","vibepulse"),d=(0,o.join)(i,"nodes.jsonc");class l extends Error{code;constructor(e,t){super(t),this.name="NodeRegistryError",this.code=e}}function u(e){let t=e.trim();if(!t)return{ok:!1,error:"empty"};try{let e=new URL(t);if("http:"!==e.protocol&&"https:"!==e.protocol)return{ok:!1,error:"unsupported_protocol"};if(e.username||e.password)return{ok:!1,error:"credentials_not_allowed"};return{ok:!0,normalizedBaseUrl:(e.search="",e.hash="",e.toString().replace(/\/+$/,""))}}catch{return{ok:!1,error:"invalid"}}}function c(e){if(!e||"object"!=typeof e||"string"!=typeof e.nodeId||"string"!=typeof e.nodeLabel||"string"!=typeof e.baseUrl||"boolean"!=typeof e.enabled||"string"!=typeof e.token||"string"!=typeof e.createdAt||"string"!=typeof e.updatedAt)return null;let t=u(e.baseUrl);if(!t.ok)return null;let r=e.nodeId.trim(),n=e.nodeLabel.trim();return r&&n?{nodeId:r,nodeLabel:n,baseUrl:t.normalizedBaseUrl,enabled:e.enabled,token:e.token.trim(),createdAt:e.createdAt,updatedAt:e.updatedAt}:null}function p(){(0,t.existsSync)(i)||(0,t.mkdirSync)(i,{recursive:!0})}function f(){return{version:1,nodes:[]}}async function b(){try{if(p(),!(0,t.existsSync)(d)){let e=f();return await h(e),e}let e=await (0,r.readFile)(d,"utf-8"),n=(0,s.parse)(e,null,!1);if(!n||"object"!=typeof n||!Array.isArray(n.nodes))return f();let o=n.nodes.map(c).filter(e=>null!==e),a=[],i=new Set;for(let e of o)i.has(e.baseUrl)||(i.add(e.baseUrl),a.push(e));return{version:"number"==typeof n.version?n.version:1,nodes:a}}catch{return f()}}async function h(e){p();let t=(0,s.stringify)(e,null,2);await (0,r.writeFile)(d,t,"utf-8")}function y(e){return{nodeId:e.nodeId,nodeLabel:e.nodeLabel,baseUrl:e.baseUrl,enabled:e.enabled,createdAt:e.createdAt,updatedAt:e.updatedAt,tokenConfigured:e.token.trim().length>0}}function w(e){if("string"!=typeof e||""===e.trim())throw new l("node_label_required","nodeLabel is required and must be a non-empty string");return e.trim()}function x(e){if("string"!=typeof e||""===e.trim())throw new l("node_id_required","nodeId is required and must be a non-empty string");return e.trim()}function g(e){if(null==e)return"";if("string"!=typeof e)throw new l("invalid_token","token must be a string when provided");return e.trim()}function v(e){if("boolean"!=typeof e)throw new l("invalid_enabled","enabled must be a boolean");return e}function R(e){if("string"!=typeof e)throw new l("invalid_base_url","baseUrl must be a string");let t=u(e);if(!t.ok)throw new l("invalid_base_url",`baseUrl validation failed: ${t.error}`);return t.normalizedBaseUrl}function m(e,t,r){if(e.find(e=>e.baseUrl===t&&e.nodeId!==r))throw new l("duplicate_base_url",`A node with baseUrl '${t}' already exists`)}async function E(){return[...(await b()).nodes]}async function N(){return(await E()).map(y)}async function _(e){let t=w(e.nodeLabel),r=R(e.baseUrl),n=g(e.token),o=void 0===e.enabled||v(e.enabled),s=await b();m(s.nodes,r);let i=new Date().toISOString(),d={nodeId:(0,a.randomUUID)(),nodeLabel:t,baseUrl:r,enabled:o,token:n,createdAt:i,updatedAt:i};return s.nodes.push(d),await h(s),y(d)}async function A(e,t){let r=x(e);if(void 0===t.nodeLabel&&void 0===t.baseUrl&&void 0===t.token&&void 0===t.enabled)throw new l("no_updates","At least one update field is required");let n=await b(),o=n.nodes.findIndex(e=>e.nodeId===r);if(-1===o)throw new l("node_not_found",`Node '${r}' not found`);let a=n.nodes[o],s=void 0===t.nodeLabel?a.nodeLabel:w(t.nodeLabel),i=void 0===t.baseUrl?a.baseUrl:R(t.baseUrl),d=void 0===t.token?a.token:g(t.token),u=void 0===t.enabled?a.enabled:v(t.enabled);m(n.nodes,i,a.nodeId);let c={...a,nodeLabel:s,baseUrl:i,token:d,enabled:u,updatedAt:new Date().toISOString()};return n.nodes[o]=c,await h(n),y(c)}async function U(e,t){let r=x(e),n=await b(),o=n.nodes.findIndex(e=>e.nodeId===r);if(-1===o)throw new l("node_not_found",`Node '${r}' not found`);let a=n.nodes[o],s=void 0===t?!a.enabled:v(t),i={...a,enabled:s,updatedAt:new Date().toISOString()};return n.nodes[o]=i,await h(n),y(i)}async function I(e){let t=x(e),r=await b(),n=r.nodes.filter(e=>e.nodeId!==t);return n.length!==r.nodes.length&&(r.nodes=n,await h(r),!0)}e.s(["NodeRegistryError",()=>l,"createNode",()=>_,"deleteNode",()=>I,"listNodeRecords",()=>E,"listNodes",()=>N,"toggleNode",()=>U,"updateNode",()=>A])},90551,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),o=e.i(59756),a=e.i(61916),s=e.i(74677),i=e.i(69741),d=e.i(16795),l=e.i(87718),u=e.i(95169),c=e.i(47587),p=e.i(66012),f=e.i(70101),b=e.i(26937),h=e.i(10372),y=e.i(93695);e.i(52474);var w=e.i(220),x=e.i(89171),g=e.i(82414),v=e.i(81951);function R(){return"node"===process.env[v.RUNTIME_ROLE_ENV_VAR]?x.NextResponse.json({error:"Route unavailable in node mode"},{status:404}):null}function m(e,t){if(e instanceof g.NodeRegistryError){let t="node_not_found"===e.code?{status:404,payload:{error:e.message,code:e.code}}:"duplicate_base_url"===e.code?{status:409,payload:{error:e.message,code:e.code}}:{status:400,payload:{error:e.message,code:e.code}};return x.NextResponse.json(t.payload,{status:t.status})}return console.error(t,e),x.NextResponse.json({error:"Internal server error"},{status:500})}async function E(e){try{let t=await e.json();if(!t||"object"!=typeof t||Array.isArray(t))return null;return t}catch{return null}}async function N(){let e=R();if(e)return e;try{let e=await (0,g.listNodes)();return x.NextResponse.json({nodes:e})}catch(e){return m(e,"Error listing nodes:")}}async function _(e){let t=R();if(t)return t;let r=await E(e);if(!r)return x.NextResponse.json({error:"Invalid request body"},{status:400});try{let e=await (0,g.createNode)({nodeLabel:r.nodeLabel,baseUrl:r.baseUrl,token:r.token,enabled:r.enabled});return x.NextResponse.json({node:e},{status:201})}catch(e){return m(e,"Error creating node:")}}async function A(e){let t=R();if(t)return t;let r=await E(e);if(!r)return x.NextResponse.json({error:"Invalid request body"},{status:400});try{let e=await (0,g.updateNode)(r.nodeId,{nodeLabel:r.nodeLabel,baseUrl:r.baseUrl,token:r.token,enabled:r.enabled});return x.NextResponse.json({node:e})}catch(e){return m(e,"Error updating node:")}}async function U(e){let t=R();if(t)return t;let r=await E(e);if(!r)return x.NextResponse.json({error:"Invalid request body"},{status:400});try{let e=await (0,g.toggleNode)(r.nodeId,r.enabled);return x.NextResponse.json({node:e})}catch(e){return m(e,"Error toggling node:")}}async function I(e){let t=R();if(t)return t;let r=await E(e);if(!r)return x.NextResponse.json({error:"Invalid request body"},{status:400});try{if(!await (0,g.deleteNode)(r.nodeId))return x.NextResponse.json({error:`Node '${String(r.nodeId)}' not found`,code:"node_not_found"},{status:404});return x.NextResponse.json({deleted:!0,nodeId:r.nodeId})}catch(e){return m(e,"Error deleting node:")}}e.s(["DELETE",()=>I,"GET",()=>N,"PATCH",()=>U,"POST",()=>_,"PUT",()=>A],7251);var k=e.i(7251);let j=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/nodes/route",pathname:"/api/nodes",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/nodes/route.ts",nextConfigOutput:"standalone",userland:k}),{workAsyncStorage:C,workUnitAsyncStorage:S,serverHooks:T}=j;function q(){return(0,n.patchFetch)({workAsyncStorage:C,workUnitAsyncStorage:S})}async function O(e,t,n){j.isDev&&(0,o.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let x="/api/nodes/route";x=x.replace(/\/index$/,"")||"/";let g=await j.prepare(e,t,{srcPage:x,multiZoneDraftMode:!1});if(!g)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:v,params:R,nextConfig:m,parsedUrl:E,isDraftMode:N,prerenderManifest:_,routerServerContext:A,isOnDemandRevalidate:U,revalidateOnlyGenerated:I,resolvedPathname:k,clientReferenceManifest:C,serverActionsManifest:S}=g,T=(0,i.normalizeAppPath)(x),q=!!(_.dynamicRoutes[T]||_.routes[k]),O=async()=>((null==A?void 0:A.render404)?await A.render404(e,t,E,!1):t.end("This page could not be found"),null);if(q&&!N){let e=!!_.routes[k],t=_.dynamicRoutes[T];if(t&&!1===t.fallback&&!e){if(m.experimental.adapterPath)return await O();throw new y.NoFallbackError}}let P=null;!q||j.isDev||N||(P="/index"===(P=k)?"/":P);let L=!0===j.isDev||!q,D=q&&!L;S&&C&&(0,s.setManifestsSingleton)({page:x,clientReferenceManifest:C,serverActionsManifest:S});let H=e.method||"GET",M=(0,a.getTracer)(),$=M.getActiveScopeSpan(),F={params:R,prerenderManifest:_,renderOpts:{experimental:{authInterrupts:!!m.experimental.authInterrupts},cacheComponents:!!m.cacheComponents,supportsDynamicResponse:L,incrementalCache:(0,o.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:m.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,o)=>j.onRequestError(e,t,n,o,A)},sharedContext:{buildId:v}},B=new d.NodeNextRequest(e),K=new d.NodeNextResponse(t),V=l.NextRequestAdapter.fromNodeNextRequest(B,(0,l.signalFromNodeResponse)(t));try{let s=async e=>j.handle(V,F).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=M.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${H} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${H} ${x}`)}),i=!!(0,o.getRequestMeta)(e,"minimalMode"),d=async o=>{var a,d;let l=async({previousCacheEntry:r})=>{try{if(!i&&U&&I&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await s(o);e.fetchMetrics=F.renderOpts.fetchMetrics;let d=F.renderOpts.pendingWaitUntil;d&&n.waitUntil&&(n.waitUntil(d),d=void 0);let l=F.renderOpts.collectedTags;if(!q)return await (0,p.sendResponse)(B,K,a,F.renderOpts.pendingWaitUntil),null;{let e=await a.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(a.headers);l&&(t[h.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==F.renderOpts.collectedRevalidate&&!(F.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&F.renderOpts.collectedRevalidate,n=void 0===F.renderOpts.collectedExpire||F.renderOpts.collectedExpire>=h.INFINITE_CACHE?void 0:F.renderOpts.collectedExpire;return{value:{kind:w.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await j.onRequestError(e,t,{routerKind:"App Router",routePath:x,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:U})},!1,A),t}},u=await j.handleResponse({req:e,nextConfig:m,cacheKey:P,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:_,isRoutePPREnabled:!1,isOnDemandRevalidate:U,revalidateOnlyGenerated:I,responseGenerator:l,waitUntil:n.waitUntil,isMinimalMode:i});if(!q)return null;if((null==u||null==(a=u.value)?void 0:a.kind)!==w.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(d=u.value)?void 0:d.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});i||t.setHeader("x-nextjs-cache",U?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),N&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let y=(0,f.fromNodeOutgoingHttpHeaders)(u.value.headers);return i&&q||y.delete(h.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||y.get("Cache-Control")||y.set("Cache-Control",(0,b.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(B,K,new Response(u.value.body,{headers:y,status:u.value.status||200})),null};$?await d($):await M.withPropagatedContext(e.headers,()=>M.trace(u.BaseServerSpan.handleRequest,{spanName:`${H} ${x}`,kind:a.SpanKind.SERVER,attributes:{"http.method":H,"http.target":e.url}},d))}catch(t){if(t instanceof y.NoFallbackError||await j.onRequestError(e,t,{routerKind:"App Router",routePath:T,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:U})},!1,A),q)throw t;return await (0,p.sendResponse)(B,K,new Response(null,{status:500})),null}}e.s(["handler",()=>O,"patchFetch",()=>q,"routeModule",()=>j,"serverHooks",()=>T,"workAsyncStorage",()=>C,"workUnitAsyncStorage",()=>S],90551)}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__192ed2f4._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[81951,e=>{"use strict";e.s(["RUNTIME_ROLE_ENV_VAR",0,"VIBEPULSE_RUNTIME_ROLE"])},68817,e=>{"use strict";var t=e.i(81951);let n="x-vibepulse-node-version",r={unauthorized:401,unsupported_node_version:426,node_misconfigured:503,upstream_unreachable:503,upstream_timeout:504};function o(e){return"string"!=typeof e?null:e.trim()||null}function i(e,t){let r=new Headers(t);r.set(n,"1");let i=o(e??null);return i&&r.set("authorization",`Bearer ${i}`),r}function s(e,t){return{ok:!1,reason:e,protocolVersion:"1",..."node_misconfigured"===e||"upstream_unreachable"===e||"upstream_timeout"===e?{degraded:!0}:{},...t??{}}}function d(e,t){return Response.json(s(e,t),{status:r[e]})}function a(e){return Response.json(e.body,{status:e.status})}function u(e,i={}){if("node"!==(i.runtimeRole??i.env?.[t.RUNTIME_ROLE_ENV_VAR]??process.env[t.RUNTIME_ROLE_ENV_VAR]))return{ok:!1,status:r.node_misconfigured,body:s("node_misconfigured")};let d=o(i.expectedToken)??function(e=process.env){return o(e.VIBEPULSE_NODE_TOKEN)}(i.env??process.env);if("1"!==e.headers.get(n))return{ok:!1,status:r.unsupported_node_version,body:s("unsupported_node_version")};if(d){var a;let t,n=(a=e.headers.get("authorization"),t=a?.match(/^Bearer\s+(.+)$/i),o(t?.[1]));if(!n||n!==d)return{ok:!1,status:r.unauthorized,body:s("unauthorized")}}return{ok:!0}}e.s(["NODE_PROTOCOL_VERSION",0,"1","createNodeFailureResponse",()=>d,"createNodeRequestHeaders",()=>i,"guardNodeRequest",()=>u,"toNodeRequestGuardResponse",()=>a])},33405,(e,t,n)=>{t.exports=e.x("child_process",()=>require("child_process"))},99686,e=>{"use strict";var t=e.i(33405);let n=new Set;function r(){let e=Number(process.env.OPENCODE_DISCOVERY_TIMEOUT_MS);return Number.isFinite(e)&&e>0?e:5e3}function o(e){if(!(e instanceof Error))return!1;let t=e.message.toLowerCase();return"ETIMEDOUT"===e.code||t.includes("timed out")||t.includes("etimedout")}function i(e){let t=e.deadlineMs-Date.now();return t<=0?(e.timedOut=!0,null):Math.max(1,Math.min(e.timeoutMs,t))}function s(e){return Array.from(new Set(e.filter(e=>Number.isInteger(e)&&e>0&&e<=65535))).sort((e,t)=>e-t)}function d(){let e=r(),d={timedOut:!1,timeoutMs:e,deadlineMs:Date.now()+e},a=s([...function(e){try{let n=i(e);if(null===n)return[];let r=(0,t.execSync)("lsof -nP -iTCP -sTCP:LISTEN",{encoding:"utf-8",stdio:["ignore","pipe","ignore"],timeout:n}).split("\n"),o=[];for(let e of r){let t=e.trim();if(!t||t.startsWith("COMMAND"))continue;let n=t.split(/\s+/),r=n[0]?.toLowerCase();if("opencode"!==r)continue;let i=t.match(/:(\d+)\s+\(LISTEN\)/);if(!i)continue;let s=parseInt(i[1],10);Number.isFinite(s)&&o.push(s)}return o}catch(t){return o(t)&&(e.timedOut=!0),[]}}(d),...function(e){try{let n=i(e);if(null===n)return[];return[...(0,t.execSync)("ps -axo command",{encoding:"utf-8",stdio:["ignore","pipe","ignore"],timeout:n}).matchAll(/\bopencode\b[^\n]*\b--port(?:=|\s+)(\d+)\b/g)].map(e=>parseInt(e[1],10)).filter(e=>Number.isFinite(e))}catch(t){return o(t)&&(e.timedOut=!0),[]}}(d)]);for(let e of a)n.add(e);return{ports:s([...a,...Array.from(n)]),timedOut:d.timedOut}}function a(){let e=r(),n={timedOut:!1,timeoutMs:e,deadlineMs:Date.now()+e},s=function(e){try{let n=i(e);if(null===n)return[];let r=(0,t.execSync)("ps -axo pid=,command=",{encoding:"utf-8",stdio:["ignore","pipe","ignore"],timeout:n}),o=[];for(let e of r.split("\n")){let t=e.trim();if(!t)continue;let n=t.match(/^(\d+)\s+(.+)$/);if(!n)continue;let r=parseInt(n[1],10),i=n[2];Number.isFinite(r)&&/\bopencode\b/.test(i)&&(/\b--port(?:=|\s+)\d+\b/.test(i)||o.push(r))}return Array.from(new Set(o))}catch(t){return o(t)&&(e.timedOut=!0),[]}}(n);if(!s.length)return{processes:[],timedOut:n.timedOut};let d=[],a=new Set;for(let e of s){let r=function(e,n){try{let r=i(n);if(null===r)return null;let o=(0,t.execSync)(`lsof -nP -a -p ${e} -d cwd -Fn`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"],timeout:r}).split("\n").find(e=>e.startsWith("n")&&e.length>1);if(!o)return null;return o.slice(1)}catch(e){return o(e)&&(n.timedOut=!0),null}}(e,n);if(!r)continue;let s=`${e}:${r}`;a.has(s)||(a.add(s),d.push({pid:e,cwd:r}))}return{processes:d,timedOut:n.timedOut}}e.s(["discoverOpencodePortsWithMeta",()=>d,"discoverOpencodeProcessCwdsWithoutPortWithMeta",()=>a])},93695,(e,t,n)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},32319,(e,t,n)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},18622,(e,t,n)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,n)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},70406,(e,t,n)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},14747,(e,t,n)=>{t.exports=e.x("path",()=>require("path"))},54799,(e,t,n)=>{t.exports=e.x("crypto",()=>require("crypto"))},82414,e=>{"use strict";var t=e.i(22734),n=e.i(24868),r=e.i(46786),o=e.i(14747),i=e.i(54799),s=e.i(89196);let d=(0,o.join)((0,r.homedir)(),".config","vibepulse"),a=(0,o.join)(d,"nodes.jsonc");class u extends Error{code;constructor(e,t){super(t),this.name="NodeRegistryError",this.code=e}}function l(e){let t=e.trim();if(!t)return{ok:!1,error:"empty"};try{let e=new URL(t);if("http:"!==e.protocol&&"https:"!==e.protocol)return{ok:!1,error:"unsupported_protocol"};if(e.username||e.password)return{ok:!1,error:"credentials_not_allowed"};return{ok:!0,normalizedBaseUrl:(e.search="",e.hash="",e.toString().replace(/\/+$/,""))}}catch{return{ok:!1,error:"invalid"}}}function c(e){if(!e||"object"!=typeof e||"string"!=typeof e.nodeId||"string"!=typeof e.nodeLabel||"string"!=typeof e.baseUrl||"boolean"!=typeof e.enabled||"string"!=typeof e.token||"string"!=typeof e.createdAt||"string"!=typeof e.updatedAt)return null;let t=l(e.baseUrl);if(!t.ok)return null;let n=e.nodeId.trim(),r=e.nodeLabel.trim();return n&&r?{nodeId:n,nodeLabel:r,baseUrl:t.normalizedBaseUrl,enabled:e.enabled,token:e.token.trim(),createdAt:e.createdAt,updatedAt:e.updatedAt}:null}function p(){(0,t.existsSync)(d)||(0,t.mkdirSync)(d,{recursive:!0})}function f(){return{version:1,nodes:[]}}async function m(){try{if(p(),!(0,t.existsSync)(a)){let e=f();return await b(e),e}let e=await (0,n.readFile)(a,"utf-8"),r=(0,s.parse)(e,null,!1);if(!r||"object"!=typeof r||!Array.isArray(r.nodes))return f();let o=r.nodes.map(c).filter(e=>null!==e),i=[],d=new Set;for(let e of o)d.has(e.baseUrl)||(d.add(e.baseUrl),i.push(e));return{version:"number"==typeof r.version?r.version:1,nodes:i}}catch{return f()}}async function b(e){p();let t=(0,s.stringify)(e,null,2);await (0,n.writeFile)(a,t,"utf-8")}function h(e){return{nodeId:e.nodeId,nodeLabel:e.nodeLabel,baseUrl:e.baseUrl,enabled:e.enabled,createdAt:e.createdAt,updatedAt:e.updatedAt,tokenConfigured:e.token.trim().length>0}}function y(e){if("string"!=typeof e||""===e.trim())throw new u("node_label_required","nodeLabel is required and must be a non-empty string");return e.trim()}function g(e){if("string"!=typeof e||""===e.trim())throw new u("node_id_required","nodeId is required and must be a non-empty string");return e.trim()}function w(e){if(null==e)return"";if("string"!=typeof e)throw new u("invalid_token","token must be a string when provided");return e.trim()}function _(e){if("boolean"!=typeof e)throw new u("invalid_enabled","enabled must be a boolean");return e}function x(e){if("string"!=typeof e)throw new u("invalid_base_url","baseUrl must be a string");let t=l(e);if(!t.ok)throw new u("invalid_base_url",`baseUrl validation failed: ${t.error}`);return t.normalizedBaseUrl}function v(e,t,n){if(e.find(e=>e.baseUrl===t&&e.nodeId!==n))throw new u("duplicate_base_url",`A node with baseUrl '${t}' already exists`)}async function N(){return[...(await m()).nodes]}async function O(){return(await N()).map(h)}async function k(e){let t=y(e.nodeLabel),n=x(e.baseUrl),r=w(e.token),o=void 0===e.enabled||_(e.enabled),s=await m();v(s.nodes,n);let d=new Date().toISOString(),a={nodeId:(0,i.randomUUID)(),nodeLabel:t,baseUrl:n,enabled:o,token:r,createdAt:d,updatedAt:d};return s.nodes.push(a),await b(s),h(a)}async function I(e,t){let n=g(e);if(void 0===t.nodeLabel&&void 0===t.baseUrl&&void 0===t.token&&void 0===t.enabled)throw new u("no_updates","At least one update field is required");let r=await m(),o=r.nodes.findIndex(e=>e.nodeId===n);if(-1===o)throw new u("node_not_found",`Node '${n}' not found`);let i=r.nodes[o],s=void 0===t.nodeLabel?i.nodeLabel:y(t.nodeLabel),d=void 0===t.baseUrl?i.baseUrl:x(t.baseUrl),a=void 0===t.token?i.token:w(t.token),l=void 0===t.enabled?i.enabled:_(t.enabled);v(r.nodes,d,i.nodeId);let c={...i,nodeLabel:s,baseUrl:d,token:a,enabled:l,updatedAt:new Date().toISOString()};return r.nodes[o]=c,await b(r),h(c)}async function E(e,t){let n=g(e),r=await m(),o=r.nodes.findIndex(e=>e.nodeId===n);if(-1===o)throw new u("node_not_found",`Node '${n}' not found`);let i=r.nodes[o],s=void 0===t?!i.enabled:_(t),d={...i,enabled:s,updatedAt:new Date().toISOString()};return r.nodes[o]=d,await b(r),h(d)}async function U(e){let t=g(e),n=await m(),r=n.nodes.filter(e=>e.nodeId!==t);return r.length!==n.nodes.length&&(n.nodes=r,await b(n),!0)}e.s(["NodeRegistryError",()=>u,"createNode",()=>k,"deleteNode",()=>U,"listNodeRecords",()=>N,"listNodes",()=>O,"toggleNode",()=>E,"updateNode",()=>I])}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__2b526e7a._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[586,e=>{"use strict";function t(e,t){if(!e||""===e.trim())throw Error("Invalid hostId: cannot be empty");if(!t||""===t.trim())throw Error("Invalid sessionId: cannot be empty");if(e.includes(":")||t.includes(":"))throw Error("Invalid hostId or sessionId: colon character not allowed");return`${e}:${t}`}function n(e){if("string"!=typeof e)throw Error("Invalid sourceKey: must be a string");let t=e.split(":");if(2!==t.length)throw Error("Invalid sourceKey: must contain exactly one colon separator");let[n,r]=t,o=n.trim(),i=r.trim();if(""===o||""===i)throw Error("Invalid sourceKey: hostId and sessionId cannot be empty");return{hostId:o,sessionId:i}}function r(e){if("string"!=typeof e)throw Error("Invalid action session id: must be a string");let t=e.trim();if(""===t)throw Error("Invalid action session id: cannot be empty");if(!t.includes(":"))return{hostId:"local",sessionId:t,isRemote:!1};let{hostId:r,sessionId:o}=n(t);return{hostId:r,sessionId:o,isRemote:"local"!==r}}function o(e){try{let t=r(e);return t.isRemote?null:t.sessionId}catch{return null}}e.s(["composeSourceKey",()=>t,"parseActionSessionReference",()=>r,"parseSourceKey",()=>n,"resolveLocalActionSessionId",()=>o])},93695,(e,t,n)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},32319,(e,t,n)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},18622,(e,t,n)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,n)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},70406,(e,t,n)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},14747,(e,t,n)=>{t.exports=e.x("path",()=>require("path"))},54799,(e,t,n)=>{t.exports=e.x("crypto",()=>require("crypto"))},82414,e=>{"use strict";var t=e.i(22734),n=e.i(24868),r=e.i(46786),o=e.i(14747),i=e.i(54799),s=e.i(89196);let a=(0,o.join)((0,r.homedir)(),".config","vibepulse"),d=(0,o.join)(a,"nodes.jsonc");class l extends Error{code;constructor(e,t){super(t),this.name="NodeRegistryError",this.code=e}}function u(e){let t=e.trim();if(!t)return{ok:!1,error:"empty"};try{let e=new URL(t);if("http:"!==e.protocol&&"https:"!==e.protocol)return{ok:!1,error:"unsupported_protocol"};if(e.username||e.password)return{ok:!1,error:"credentials_not_allowed"};return{ok:!0,normalizedBaseUrl:(e.search="",e.hash="",e.toString().replace(/\/+$/,""))}}catch{return{ok:!1,error:"invalid"}}}function c(e){if(!e||"object"!=typeof e||"string"!=typeof e.nodeId||"string"!=typeof e.nodeLabel||"string"!=typeof e.baseUrl||"boolean"!=typeof e.enabled||"string"!=typeof e.token||"string"!=typeof e.createdAt||"string"!=typeof e.updatedAt)return null;let t=u(e.baseUrl);if(!t.ok)return null;let n=e.nodeId.trim(),r=e.nodeLabel.trim();return n&&r?{nodeId:n,nodeLabel:r,baseUrl:t.normalizedBaseUrl,enabled:e.enabled,token:e.token.trim(),createdAt:e.createdAt,updatedAt:e.updatedAt}:null}function p(){(0,t.existsSync)(a)||(0,t.mkdirSync)(a,{recursive:!0})}function f(){return{version:1,nodes:[]}}async function h(){try{if(p(),!(0,t.existsSync)(d)){let e=f();return await m(e),e}let e=await (0,n.readFile)(d,"utf-8"),r=(0,s.parse)(e,null,!1);if(!r||"object"!=typeof r||!Array.isArray(r.nodes))return f();let o=r.nodes.map(c).filter(e=>null!==e),i=[],a=new Set;for(let e of o)a.has(e.baseUrl)||(a.add(e.baseUrl),i.push(e));return{version:"number"==typeof r.version?r.version:1,nodes:i}}catch{return f()}}async function m(e){p();let t=(0,s.stringify)(e,null,2);await (0,n.writeFile)(d,t,"utf-8")}function v(e){return{nodeId:e.nodeId,nodeLabel:e.nodeLabel,baseUrl:e.baseUrl,enabled:e.enabled,createdAt:e.createdAt,updatedAt:e.updatedAt,tokenConfigured:e.token.trim().length>0}}function b(e){if("string"!=typeof e||""===e.trim())throw new l("node_label_required","nodeLabel is required and must be a non-empty string");return e.trim()}function w(e){if("string"!=typeof e||""===e.trim())throw new l("node_id_required","nodeId is required and must be a non-empty string");return e.trim()}function y(e){if(null==e)return"";if("string"!=typeof e)throw new l("invalid_token","token must be a string when provided");return e.trim()}function g(e){if("boolean"!=typeof e)throw new l("invalid_enabled","enabled must be a boolean");return e}function R(e){if("string"!=typeof e)throw new l("invalid_base_url","baseUrl must be a string");let t=u(e);if(!t.ok)throw new l("invalid_base_url",`baseUrl validation failed: ${t.error}`);return t.normalizedBaseUrl}function _(e,t,n){if(e.find(e=>e.baseUrl===t&&e.nodeId!==n))throw new l("duplicate_base_url",`A node with baseUrl '${t}' already exists`)}async function x(){return[...(await h()).nodes]}async function E(){return(await x()).map(v)}async function S(e){let t=b(e.nodeLabel),n=R(e.baseUrl),r=y(e.token),o=void 0===e.enabled||g(e.enabled),s=await h();_(s.nodes,n);let a=new Date().toISOString(),d={nodeId:(0,i.randomUUID)(),nodeLabel:t,baseUrl:n,enabled:o,token:r,createdAt:a,updatedAt:a};return s.nodes.push(d),await m(s),v(d)}async function I(e,t){let n=w(e);if(void 0===t.nodeLabel&&void 0===t.baseUrl&&void 0===t.token&&void 0===t.enabled)throw new l("no_updates","At least one update field is required");let r=await h(),o=r.nodes.findIndex(e=>e.nodeId===n);if(-1===o)throw new l("node_not_found",`Node '${n}' not found`);let i=r.nodes[o],s=void 0===t.nodeLabel?i.nodeLabel:b(t.nodeLabel),a=void 0===t.baseUrl?i.baseUrl:R(t.baseUrl),d=void 0===t.token?i.token:y(t.token),u=void 0===t.enabled?i.enabled:g(t.enabled);_(r.nodes,a,i.nodeId);let c={...i,nodeLabel:s,baseUrl:a,token:d,enabled:u,updatedAt:new Date().toISOString()};return r.nodes[o]=c,await m(r),v(c)}async function A(e,t){let n=w(e),r=await h(),o=r.nodes.findIndex(e=>e.nodeId===n);if(-1===o)throw new l("node_not_found",`Node '${n}' not found`);let i=r.nodes[o],s=void 0===t?!i.enabled:g(t),a={...i,enabled:s,updatedAt:new Date().toISOString()};return r.nodes[o]=a,await m(r),v(a)}async function k(e){let t=w(e),n=await h(),r=n.nodes.filter(e=>e.nodeId!==t);return r.length!==n.nodes.length&&(n.nodes=r,await m(n),!0)}e.s(["NodeRegistryError",()=>l,"createNode",()=>S,"deleteNode",()=>k,"listNodeRecords",()=>x,"listNodes",()=>E,"toggleNode",()=>A,"updateNode",()=>I])},81951,e=>{"use strict";e.s(["RUNTIME_ROLE_ENV_VAR",0,"VIBEPULSE_RUNTIME_ROLE"])},68817,e=>{"use strict";var t=e.i(81951);let n="x-vibepulse-node-version",r={unauthorized:401,unsupported_node_version:426,node_misconfigured:503,upstream_unreachable:503,upstream_timeout:504};function o(e){return"string"!=typeof e?null:e.trim()||null}function i(e,t){let r=new Headers(t);r.set(n,"1");let i=o(e??null);return i&&r.set("authorization",`Bearer ${i}`),r}function s(e,t){return{ok:!1,reason:e,protocolVersion:"1",..."node_misconfigured"===e||"upstream_unreachable"===e||"upstream_timeout"===e?{degraded:!0}:{},...t??{}}}function a(e,t){return Response.json(s(e,t),{status:r[e]})}function d(e){return Response.json(e.body,{status:e.status})}function l(e,i={}){if("node"!==(i.runtimeRole??i.env?.[t.RUNTIME_ROLE_ENV_VAR]??process.env[t.RUNTIME_ROLE_ENV_VAR]))return{ok:!1,status:r.node_misconfigured,body:s("node_misconfigured")};let a=o(i.expectedToken)??function(e=process.env){return o(e.VIBEPULSE_NODE_TOKEN)}(i.env??process.env);if("1"!==e.headers.get(n))return{ok:!1,status:r.unsupported_node_version,body:s("unsupported_node_version")};if(a){var d;let t,n=(d=e.headers.get("authorization"),t=d?.match(/^Bearer\s+(.+)$/i),o(t?.[1]));if(!n||n!==a)return{ok:!1,status:r.unauthorized,body:s("unauthorized")}}return{ok:!0}}e.s(["NODE_PROTOCOL_VERSION",0,"1","createNodeFailureResponse",()=>a,"createNodeRequestHeaders",()=>i,"guardNodeRequest",()=>l,"toNodeRequestGuardResponse",()=>d])},33405,(e,t,n)=>{t.exports=e.x("child_process",()=>require("child_process"))},99686,e=>{"use strict";var t=e.i(33405);let n=new Set;function r(){let e=Number(process.env.OPENCODE_DISCOVERY_TIMEOUT_MS);return Number.isFinite(e)&&e>0?e:5e3}function o(e){if(!(e instanceof Error))return!1;let t=e.message.toLowerCase();return"ETIMEDOUT"===e.code||t.includes("timed out")||t.includes("etimedout")}function i(e){let t=e.deadlineMs-Date.now();return t<=0?(e.timedOut=!0,null):Math.max(1,Math.min(e.timeoutMs,t))}function s(e){return Array.from(new Set(e.filter(e=>Number.isInteger(e)&&e>0&&e<=65535))).sort((e,t)=>e-t)}function a(){let e=r(),a={timedOut:!1,timeoutMs:e,deadlineMs:Date.now()+e},d=s([...function(e){try{let n=i(e);if(null===n)return[];let r=(0,t.execSync)("lsof -nP -iTCP -sTCP:LISTEN",{encoding:"utf-8",stdio:["ignore","pipe","ignore"],timeout:n}).split("\n"),o=[];for(let e of r){let t=e.trim();if(!t||t.startsWith("COMMAND"))continue;let n=t.split(/\s+/),r=n[0]?.toLowerCase();if("opencode"!==r)continue;let i=t.match(/:(\d+)\s+\(LISTEN\)/);if(!i)continue;let s=parseInt(i[1],10);Number.isFinite(s)&&o.push(s)}return o}catch(t){return o(t)&&(e.timedOut=!0),[]}}(a),...function(e){try{let n=i(e);if(null===n)return[];return[...(0,t.execSync)("ps -axo command",{encoding:"utf-8",stdio:["ignore","pipe","ignore"],timeout:n}).matchAll(/\bopencode\b[^\n]*\b--port(?:=|\s+)(\d+)\b/g)].map(e=>parseInt(e[1],10)).filter(e=>Number.isFinite(e))}catch(t){return o(t)&&(e.timedOut=!0),[]}}(a)]);for(let e of d)n.add(e);return{ports:s([...d,...Array.from(n)]),timedOut:a.timedOut}}function d(){let e=r(),n={timedOut:!1,timeoutMs:e,deadlineMs:Date.now()+e},s=function(e){try{let n=i(e);if(null===n)return[];let r=(0,t.execSync)("ps -axo pid=,command=",{encoding:"utf-8",stdio:["ignore","pipe","ignore"],timeout:n}),o=[];for(let e of r.split("\n")){let t=e.trim();if(!t)continue;let n=t.match(/^(\d+)\s+(.+)$/);if(!n)continue;let r=parseInt(n[1],10),i=n[2];Number.isFinite(r)&&/\bopencode\b/.test(i)&&(/\b--port(?:=|\s+)\d+\b/.test(i)||o.push(r))}return Array.from(new Set(o))}catch(t){return o(t)&&(e.timedOut=!0),[]}}(n);if(!s.length)return{processes:[],timedOut:n.timedOut};let a=[],d=new Set;for(let e of s){let r=function(e,n){try{let r=i(n);if(null===r)return null;let o=(0,t.execSync)(`lsof -nP -a -p ${e} -d cwd -Fn`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"],timeout:r}).split("\n").find(e=>e.startsWith("n")&&e.length>1);if(!o)return null;return o.slice(1)}catch(e){return o(e)&&(n.timedOut=!0),null}}(e,n);if(!r)continue;let s=`${e}:${r}`;d.has(s)||(d.add(s),a.push({pid:e,cwd:r}))}return{processes:a,timedOut:n.timedOut}}e.s(["discoverOpencodePortsWithMeta",()=>a,"discoverOpencodeProcessCwdsWithoutPortWithMeta",()=>d])},74579,e=>{"use strict";let t=new Map,n=new Map;function r(e){for(let[t,r]of n)e-r>6e5&&n.delete(t);if(n.size<=5e3)return;let t=n.size-5e3,r=Array.from(n.entries()).sort((e,t)=>e[1]-t[1]);for(let e=0;e<t;e++){let[t]=r[e]??[];if(!t)break;n.delete(t)}}function o(e){for(let[n,r]of t)e-r.markedAt>12096e5&&t.delete(n);if(t.size<=5e3)return;let n=t.size-5e3,r=Array.from(t.entries()).sort((e,t)=>e[1].lastSeenAt-t[1].lastSeenAt);for(let e=0;e<n;e++){let[n]=r[e]??[];if(!n)break;t.delete(n)}}function i(e,n=Date.now()){let r=t.get(e);t.set(e,{markedAt:r?.markedAt??n,lastSeenAt:n}),o(n)}function s(e){t.delete(e)}function a(e,t=Date.now()){n.set(e,t),r(t)}function d(e){n.delete(e)}function l(e,t=Date.now()){let r=n.get(e);return"number"==typeof r&&(t-r>6e5?(n.delete(e),!1):(n.delete(e),!0))}function u(e=Date.now()){r(e)}function c(e,n=Date.now()){let r=t.get(e);return!!r&&(n-r.markedAt>12096e5?(t.delete(e),!1):(t.set(e,{...r,lastSeenAt:n}),!0))}function p(e=Date.now()){o(e)}e.s(["clearSessionForceUnarchived",()=>s,"clearSessionStickyStatusBlocked",()=>d,"markSessionForceUnarchived",()=>i,"markSessionStickyStatusBlocked",()=>a,"pruneSessionForceUnarchived",()=>p,"pruneSessionStickyStatusBlocked",()=>u,"shouldForceSessionUnarchived",()=>c,"takeSessionStickyStatusBlocked",()=>l])},12080,e=>{"use strict";var t=e.i(47909),n=e.i(74017),r=e.i(96250),o=e.i(59756),i=e.i(61916),s=e.i(74677),a=e.i(69741),d=e.i(16795),l=e.i(87718),u=e.i(95169),c=e.i(47587),p=e.i(66012),f=e.i(70101),h=e.i(26937),m=e.i(10372),v=e.i(93695);e.i(52474);var b=e.i(220),w=e.i(99686),y=e.i(586),g=e.i(82414),R=e.i(68817),_=e.i(74579);function x(){return Response.json({error:"Invalid action session id",reason:"invalid_action_session_id"},{status:400})}function E(){return Response.json({error:"Session not found",reason:"session_not_found"},{status:404})}function S(e,t,n="archive_request_failed"){return Response.json({error:"Failed to archive session",reason:n,...t?{message:t}:{}},{status:e})}async function I(e,t){let n=(await (0,g.listNodeRecords)()).find(t=>t.nodeId===e);if(!n||!n.enabled)return E();let r=new AbortController,o=!1,i=setTimeout(()=>{o=!0,r.abort()},5e3);try{let e=await fetch(`${n.baseUrl}/api/node/sessions/${t}/archive`,{method:"POST",headers:(0,R.createNodeRequestHeaders)(n.token),signal:r.signal});if(e.ok)return Response.json({success:!0});let o=await e.json().catch(()=>({}));return Response.json({error:"Remote archive failed",reason:"string"==typeof o.reason?o.reason:`node_request_failed_${e.status}`},{status:e.status})}catch{return Response.json({error:o?"Remote node request timed out":"Remote node request failed",reason:o?"upstream_timeout":"upstream_unreachable"},{status:o?504:503})}finally{clearTimeout(i)}}async function A(e,{params:t}){let n,{id:r}=await t,o=(0,y.resolveLocalActionSessionId)(r);if(!o)try{let e=(0,y.parseActionSessionReference)(r);if(e.isRemote)return I(e.hostId,e.sessionId)}catch{return x()}if(!o)return x();let{ports:i,timedOut:s}=(0,w.discoverOpencodePortsWithMeta)();if(!i.length)return s?Response.json({error:"OpenCode discovery timed out"},{status:503}):Response.json({error:"OpenCode server not found"},{status:503});let a=!1,d=null,l="archive_request_failed";for(let e of i)try{let t=`http://localhost:${e}`,r=await fetch(`${t}/session/${o}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({time:{archived:Date.now()}})});if(r.ok)return(0,_.clearSessionForceUnarchived)(o),(0,_.markSessionStickyStatusBlocked)(o),Response.json({success:!0});let i=await r.text();if(console.error(`Failed to archive session on port ${e}:`,i),404===r.status){a=!0;continue}d=r.status,n=i||void 0,l="archive_request_failed"}catch(t){console.error(`Failed to archive session on port ${e}:`,t),d=503,n=t instanceof Error?t.message:String(t),l="upstream_unreachable"}return null!==d?S(d,n,l):a?E():S(500)}e.s(["POST",()=>A],844);var k=e.i(844);let O=new t.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/sessions/[id]/archive/route",pathname:"/api/sessions/[id]/archive",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/sessions/[id]/archive/route.ts",nextConfigOutput:"standalone",userland:k}),{workAsyncStorage:N,workUnitAsyncStorage:U,serverHooks:C}=O;function T(){return(0,r.patchFetch)({workAsyncStorage:N,workUnitAsyncStorage:U})}async function P(e,t,r){O.isDev&&(0,o.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/api/sessions/[id]/archive/route";w=w.replace(/\/index$/,"")||"/";let y=await O.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:g,params:R,nextConfig:_,parsedUrl:x,isDraftMode:E,prerenderManifest:S,routerServerContext:I,isOnDemandRevalidate:A,revalidateOnlyGenerated:k,resolvedPathname:N,clientReferenceManifest:U,serverActionsManifest:C}=y,T=(0,a.normalizeAppPath)(w),P=!!(S.dynamicRoutes[T]||S.routes[N]),q=async()=>((null==I?void 0:I.render404)?await I.render404(e,t,x,!1):t.end("This page could not be found"),null);if(P&&!E){let e=!!S.routes[N],t=S.dynamicRoutes[T];if(t&&!1===t.fallback&&!e){if(_.experimental.adapterPath)return await q();throw new v.NoFallbackError}}let j=null;!P||O.isDev||E||(j="/index"===(j=N)?"/":j);let D=!0===O.isDev||!P,M=P&&!D;C&&U&&(0,s.setManifestsSingleton)({page:w,clientReferenceManifest:U,serverActionsManifest:C});let L=e.method||"GET",$=(0,i.getTracer)(),F=$.getActiveScopeSpan(),H={params:R,prerenderManifest:S,renderOpts:{experimental:{authInterrupts:!!_.experimental.authInterrupts},cacheComponents:!!_.cacheComponents,supportsDynamicResponse:D,incrementalCache:(0,o.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:_.cacheLife,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,n,r,o)=>O.onRequestError(e,t,r,o,I)},sharedContext:{buildId:g}},B=new d.NodeNextRequest(e),K=new d.NodeNextResponse(t),V=l.NextRequestAdapter.fromNodeNextRequest(B,(0,l.signalFromNodeResponse)(t));try{let s=async e=>O.handle(V,H).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let n=$.getRootSpanAttributes();if(!n)return;if(n.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${n.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=n.get("next.route");if(r){let t=`${L} ${r}`;e.setAttributes({"next.route":r,"http.route":r,"next.span_name":t}),e.updateName(t)}else e.updateName(`${L} ${w}`)}),a=!!(0,o.getRequestMeta)(e,"minimalMode"),d=async o=>{var i,d;let l=async({previousCacheEntry:n})=>{try{if(!a&&A&&k&&!n)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await s(o);e.fetchMetrics=H.renderOpts.fetchMetrics;let d=H.renderOpts.pendingWaitUntil;d&&r.waitUntil&&(r.waitUntil(d),d=void 0);let l=H.renderOpts.collectedTags;if(!P)return await (0,p.sendResponse)(B,K,i,H.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(i.headers);l&&(t[m.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let n=void 0!==H.renderOpts.collectedRevalidate&&!(H.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&H.renderOpts.collectedRevalidate,r=void 0===H.renderOpts.collectedExpire||H.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:H.renderOpts.collectedExpire;return{value:{kind:b.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:n,expire:r}}}}catch(t){throw(null==n?void 0:n.isStale)&&await O.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:A})},!1,I),t}},u=await O.handleResponse({req:e,nextConfig:_,cacheKey:j,routeKind:n.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:S,isRoutePPREnabled:!1,isOnDemandRevalidate:A,revalidateOnlyGenerated:k,responseGenerator:l,waitUntil:r.waitUntil,isMinimalMode:a});if(!P)return null;if((null==u||null==(i=u.value)?void 0:i.kind)!==b.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(d=u.value)?void 0:d.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});a||t.setHeader("x-nextjs-cache",A?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),E&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let v=(0,f.fromNodeOutgoingHttpHeaders)(u.value.headers);return a&&P||v.delete(m.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||v.get("Cache-Control")||v.set("Cache-Control",(0,h.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(B,K,new Response(u.value.body,{headers:v,status:u.value.status||200})),null};F?await d(F):await $.withPropagatedContext(e.headers,()=>$.trace(u.BaseServerSpan.handleRequest,{spanName:`${L} ${w}`,kind:i.SpanKind.SERVER,attributes:{"http.method":L,"http.target":e.url}},d))}catch(t){if(t instanceof v.NoFallbackError||await O.onRequestError(e,t,{routerKind:"App Router",routePath:T,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:A})},!1,I),P)throw t;return await (0,p.sendResponse)(B,K,new Response(null,{status:500})),null}}e.s(["handler",()=>P,"patchFetch",()=>T,"routeModule",()=>O,"serverHooks",()=>C,"workAsyncStorage",()=>N,"workUnitAsyncStorage",()=>U],12080)}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__2f981540._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[81951,e=>{"use strict";e.s(["RUNTIME_ROLE_ENV_VAR",0,"VIBEPULSE_RUNTIME_ROLE"])},68817,e=>{"use strict";var t=e.i(81951);let n="x-vibepulse-node-version",r={unauthorized:401,unsupported_node_version:426,node_misconfigured:503,upstream_unreachable:503,upstream_timeout:504};function o(e){return"string"!=typeof e?null:e.trim()||null}function s(e,t){let r=new Headers(t);r.set(n,"1");let s=o(e??null);return s&&r.set("authorization",`Bearer ${s}`),r}function a(e,t){return{ok:!1,reason:e,protocolVersion:"1",..."node_misconfigured"===e||"upstream_unreachable"===e||"upstream_timeout"===e?{degraded:!0}:{},...t??{}}}function i(e,t){return Response.json(a(e,t),{status:r[e]})}function d(e){return Response.json(e.body,{status:e.status})}function l(e,s={}){if("node"!==(s.runtimeRole??s.env?.[t.RUNTIME_ROLE_ENV_VAR]??process.env[t.RUNTIME_ROLE_ENV_VAR]))return{ok:!1,status:r.node_misconfigured,body:a("node_misconfigured")};let i=o(s.expectedToken)??function(e=process.env){return o(e.VIBEPULSE_NODE_TOKEN)}(s.env??process.env);if("1"!==e.headers.get(n))return{ok:!1,status:r.unsupported_node_version,body:a("unsupported_node_version")};if(i){var d;let t,n=(d=e.headers.get("authorization"),t=d?.match(/^Bearer\s+(.+)$/i),o(t?.[1]));if(!n||n!==i)return{ok:!1,status:r.unauthorized,body:a("unauthorized")}}return{ok:!0}}e.s(["NODE_PROTOCOL_VERSION",0,"1","createNodeFailureResponse",()=>i,"createNodeRequestHeaders",()=>s,"guardNodeRequest",()=>l,"toNodeRequestGuardResponse",()=>d])},586,e=>{"use strict";function t(e,t){if(!e||""===e.trim())throw Error("Invalid hostId: cannot be empty");if(!t||""===t.trim())throw Error("Invalid sessionId: cannot be empty");if(e.includes(":")||t.includes(":"))throw Error("Invalid hostId or sessionId: colon character not allowed");return`${e}:${t}`}function n(e){if("string"!=typeof e)throw Error("Invalid sourceKey: must be a string");let t=e.split(":");if(2!==t.length)throw Error("Invalid sourceKey: must contain exactly one colon separator");let[n,r]=t,o=n.trim(),s=r.trim();if(""===o||""===s)throw Error("Invalid sourceKey: hostId and sessionId cannot be empty");return{hostId:o,sessionId:s}}function r(e){if("string"!=typeof e)throw Error("Invalid action session id: must be a string");let t=e.trim();if(""===t)throw Error("Invalid action session id: cannot be empty");if(!t.includes(":"))return{hostId:"local",sessionId:t,isRemote:!1};let{hostId:r,sessionId:o}=n(t);return{hostId:r,sessionId:o,isRemote:"local"!==r}}function o(e){try{let t=r(e);return t.isRemote?null:t.sessionId}catch{return null}}e.s(["composeSourceKey",()=>t,"parseActionSessionReference",()=>r,"parseSourceKey",()=>n,"resolveLocalActionSessionId",()=>o])},93695,(e,t,n)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},32319,(e,t,n)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},18622,(e,t,n)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,n)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},70406,(e,t,n)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},14747,(e,t,n)=>{t.exports=e.x("path",()=>require("path"))},54799,(e,t,n)=>{t.exports=e.x("crypto",()=>require("crypto"))},82414,e=>{"use strict";var t=e.i(22734),n=e.i(24868),r=e.i(46786),o=e.i(14747),s=e.i(54799),a=e.i(89196);let i=(0,o.join)((0,r.homedir)(),".config","vibepulse"),d=(0,o.join)(i,"nodes.jsonc");class l extends Error{code;constructor(e,t){super(t),this.name="NodeRegistryError",this.code=e}}function u(e){let t=e.trim();if(!t)return{ok:!1,error:"empty"};try{let e=new URL(t);if("http:"!==e.protocol&&"https:"!==e.protocol)return{ok:!1,error:"unsupported_protocol"};if(e.username||e.password)return{ok:!1,error:"credentials_not_allowed"};return{ok:!0,normalizedBaseUrl:(e.search="",e.hash="",e.toString().replace(/\/+$/,""))}}catch{return{ok:!1,error:"invalid"}}}function c(e){if(!e||"object"!=typeof e||"string"!=typeof e.nodeId||"string"!=typeof e.nodeLabel||"string"!=typeof e.baseUrl||"boolean"!=typeof e.enabled||"string"!=typeof e.token||"string"!=typeof e.createdAt||"string"!=typeof e.updatedAt)return null;let t=u(e.baseUrl);if(!t.ok)return null;let n=e.nodeId.trim(),r=e.nodeLabel.trim();return n&&r?{nodeId:n,nodeLabel:r,baseUrl:t.normalizedBaseUrl,enabled:e.enabled,token:e.token.trim(),createdAt:e.createdAt,updatedAt:e.updatedAt}:null}function p(){(0,t.existsSync)(i)||(0,t.mkdirSync)(i,{recursive:!0})}function f(){return{version:1,nodes:[]}}async function h(){try{if(p(),!(0,t.existsSync)(d)){let e=f();return await m(e),e}let e=await (0,n.readFile)(d,"utf-8"),r=(0,a.parse)(e,null,!1);if(!r||"object"!=typeof r||!Array.isArray(r.nodes))return f();let o=r.nodes.map(c).filter(e=>null!==e),s=[],i=new Set;for(let e of o)i.has(e.baseUrl)||(i.add(e.baseUrl),s.push(e));return{version:"number"==typeof r.version?r.version:1,nodes:s}}catch{return f()}}async function m(e){p();let t=(0,a.stringify)(e,null,2);await (0,n.writeFile)(d,t,"utf-8")}function b(e){return{nodeId:e.nodeId,nodeLabel:e.nodeLabel,baseUrl:e.baseUrl,enabled:e.enabled,createdAt:e.createdAt,updatedAt:e.updatedAt,tokenConfigured:e.token.trim().length>0}}function w(e){if("string"!=typeof e||""===e.trim())throw new l("node_label_required","nodeLabel is required and must be a non-empty string");return e.trim()}function y(e){if("string"!=typeof e||""===e.trim())throw new l("node_id_required","nodeId is required and must be a non-empty string");return e.trim()}function v(e){if(null==e)return"";if("string"!=typeof e)throw new l("invalid_token","token must be a string when provided");return e.trim()}function R(e){if("boolean"!=typeof e)throw new l("invalid_enabled","enabled must be a boolean");return e}function g(e){if("string"!=typeof e)throw new l("invalid_base_url","baseUrl must be a string");let t=u(e);if(!t.ok)throw new l("invalid_base_url",`baseUrl validation failed: ${t.error}`);return t.normalizedBaseUrl}function _(e,t,n){if(e.find(e=>e.baseUrl===t&&e.nodeId!==n))throw new l("duplicate_base_url",`A node with baseUrl '${t}' already exists`)}async function x(){return[...(await h()).nodes]}async function E(){return(await x()).map(b)}async function I(e){let t=w(e.nodeLabel),n=g(e.baseUrl),r=v(e.token),o=void 0===e.enabled||R(e.enabled),a=await h();_(a.nodes,n);let i=new Date().toISOString(),d={nodeId:(0,s.randomUUID)(),nodeLabel:t,baseUrl:n,enabled:o,token:r,createdAt:i,updatedAt:i};return a.nodes.push(d),await m(a),b(d)}async function A(e,t){let n=y(e);if(void 0===t.nodeLabel&&void 0===t.baseUrl&&void 0===t.token&&void 0===t.enabled)throw new l("no_updates","At least one update field is required");let r=await h(),o=r.nodes.findIndex(e=>e.nodeId===n);if(-1===o)throw new l("node_not_found",`Node '${n}' not found`);let s=r.nodes[o],a=void 0===t.nodeLabel?s.nodeLabel:w(t.nodeLabel),i=void 0===t.baseUrl?s.baseUrl:g(t.baseUrl),d=void 0===t.token?s.token:v(t.token),u=void 0===t.enabled?s.enabled:R(t.enabled);_(r.nodes,i,s.nodeId);let c={...s,nodeLabel:a,baseUrl:i,token:d,enabled:u,updatedAt:new Date().toISOString()};return r.nodes[o]=c,await m(r),b(c)}async function N(e,t){let n=y(e),r=await h(),o=r.nodes.findIndex(e=>e.nodeId===n);if(-1===o)throw new l("node_not_found",`Node '${n}' not found`);let s=r.nodes[o],a=void 0===t?!s.enabled:R(t),i={...s,enabled:a,updatedAt:new Date().toISOString()};return r.nodes[o]=i,await m(r),b(i)}async function k(e){let t=y(e),n=await h(),r=n.nodes.filter(e=>e.nodeId!==t);return r.length!==n.nodes.length&&(n.nodes=r,await m(n),!0)}e.s(["NodeRegistryError",()=>l,"createNode",()=>I,"deleteNode",()=>k,"listNodeRecords",()=>x,"listNodes",()=>E,"toggleNode",()=>N,"updateNode",()=>A])},32798,e=>{"use strict";var t=e.i(47909),n=e.i(74017),r=e.i(96250),o=e.i(59756),s=e.i(61916),a=e.i(74677),i=e.i(69741),d=e.i(16795),l=e.i(87718),u=e.i(95169),c=e.i(47587),p=e.i(66012),f=e.i(70101),h=e.i(26937),m=e.i(10372),b=e.i(93695);e.i(52474);var w=e.i(220),y=e.i(586),v=e.i(82414),R=e.i(68817);function g(){return Response.json({error:"Invalid action session id",reason:"invalid_action_session_id"},{status:400})}async function _(e,{params:t}){let n,{id:r}=await t;try{n=(0,y.parseActionSessionReference)(r)}catch{return g()}if(!n.isRemote)return g();let o=await e.json().catch(()=>({})),s=(await (0,v.listNodeRecords)()).find(e=>e.nodeId===n.hostId);if(!s||!s.enabled)return Response.json({error:"Session not found",reason:"session_not_found"},{status:404});let a=new AbortController,i=!1,d=setTimeout(()=>{i=!0,a.abort()},5e3);try{let e=await fetch(`${s.baseUrl}/api/node/sessions/${n.sessionId}/open-editor`,{method:"POST",headers:(0,R.createNodeRequestHeaders)(s.token,{"Content-Type":"application/json"}),body:JSON.stringify(o),signal:a.signal}),t=await e.json().catch(()=>({}));if(!e.ok){let n="string"==typeof t.reason?t.reason:`node_request_failed_${e.status}`;return Response.json({error:"string"==typeof t.error?t.error:"Remote open-editor failed",reason:n,..."string"==typeof t.message?{message:t.message}:{}},{status:e.status})}return Response.json(t,{status:e.status})}catch{return Response.json({error:i?"Remote node request timed out":"Remote node request failed",reason:i?"upstream_timeout":"upstream_unreachable"},{status:i?504:503})}finally{clearTimeout(d)}}e.s(["POST",()=>_],91749);var x=e.i(91749);let E=new t.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/sessions/[id]/open-editor/route",pathname:"/api/sessions/[id]/open-editor",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/sessions/[id]/open-editor/route.ts",nextConfigOutput:"standalone",userland:x}),{workAsyncStorage:I,workUnitAsyncStorage:A,serverHooks:N}=E;function k(){return(0,r.patchFetch)({workAsyncStorage:I,workUnitAsyncStorage:A})}async function U(e,t,r){E.isDev&&(0,o.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let y="/api/sessions/[id]/open-editor/route";y=y.replace(/\/index$/,"")||"/";let v=await E.prepare(e,t,{srcPage:y,multiZoneDraftMode:!1});if(!v)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:R,params:g,nextConfig:_,parsedUrl:x,isDraftMode:I,prerenderManifest:A,routerServerContext:N,isOnDemandRevalidate:k,revalidateOnlyGenerated:U,resolvedPathname:S,clientReferenceManifest:C,serverActionsManifest:O}=v,T=(0,i.normalizeAppPath)(y),q=!!(A.dynamicRoutes[T]||A.routes[S]),j=async()=>((null==N?void 0:N.render404)?await N.render404(e,t,x,!1):t.end("This page could not be found"),null);if(q&&!I){let e=!!A.routes[S],t=A.dynamicRoutes[T];if(t&&!1===t.fallback&&!e){if(_.experimental.adapterPath)return await j();throw new b.NoFallbackError}}let P=null;!q||E.isDev||I||(P="/index"===(P=S)?"/":P);let L=!0===E.isDev||!q,$=q&&!L;O&&C&&(0,a.setManifestsSingleton)({page:y,clientReferenceManifest:C,serverActionsManifest:O});let H=e.method||"GET",D=(0,s.getTracer)(),M=D.getActiveScopeSpan(),K={params:g,prerenderManifest:A,renderOpts:{experimental:{authInterrupts:!!_.experimental.authInterrupts},cacheComponents:!!_.cacheComponents,supportsDynamicResponse:L,incrementalCache:(0,o.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:_.cacheLife,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,n,r,o)=>E.onRequestError(e,t,r,o,N)},sharedContext:{buildId:R}},V=new d.NodeNextRequest(e),B=new d.NodeNextResponse(t),F=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(t));try{let a=async e=>E.handle(F,K).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let n=D.getRootSpanAttributes();if(!n)return;if(n.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${n.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=n.get("next.route");if(r){let t=`${H} ${r}`;e.setAttributes({"next.route":r,"http.route":r,"next.span_name":t}),e.updateName(t)}else e.updateName(`${H} ${y}`)}),i=!!(0,o.getRequestMeta)(e,"minimalMode"),d=async o=>{var s,d;let l=async({previousCacheEntry:n})=>{try{if(!i&&k&&U&&!n)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await a(o);e.fetchMetrics=K.renderOpts.fetchMetrics;let d=K.renderOpts.pendingWaitUntil;d&&r.waitUntil&&(r.waitUntil(d),d=void 0);let l=K.renderOpts.collectedTags;if(!q)return await (0,p.sendResponse)(V,B,s,K.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(s.headers);l&&(t[m.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let n=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,r=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:w.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:n,expire:r}}}}catch(t){throw(null==n?void 0:n.isStale)&&await E.onRequestError(e,t,{routerKind:"App Router",routePath:y,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:k})},!1,N),t}},u=await E.handleResponse({req:e,nextConfig:_,cacheKey:P,routeKind:n.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:k,revalidateOnlyGenerated:U,responseGenerator:l,waitUntil:r.waitUntil,isMinimalMode:i});if(!q)return null;if((null==u||null==(s=u.value)?void 0:s.kind)!==w.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(d=u.value)?void 0:d.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});i||t.setHeader("x-nextjs-cache",k?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),I&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let b=(0,f.fromNodeOutgoingHttpHeaders)(u.value.headers);return i&&q||b.delete(m.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||b.get("Cache-Control")||b.set("Cache-Control",(0,h.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(V,B,new Response(u.value.body,{headers:b,status:u.value.status||200})),null};M?await d(M):await D.withPropagatedContext(e.headers,()=>D.trace(u.BaseServerSpan.handleRequest,{spanName:`${H} ${y}`,kind:s.SpanKind.SERVER,attributes:{"http.method":H,"http.target":e.url}},d))}catch(t){if(t instanceof b.NoFallbackError||await E.onRequestError(e,t,{routerKind:"App Router",routePath:T,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:k})},!1,N),q)throw t;return await (0,p.sendResponse)(V,B,new Response(null,{status:500})),null}}e.s(["handler",()=>U,"patchFetch",()=>k,"routeModule",()=>E,"serverHooks",()=>N,"workAsyncStorage",()=>I,"workUnitAsyncStorage",()=>A],32798)}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__3745b314._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[24725,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},93695,(e,r,t)=>{r.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},32319,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},18622,(e,r,t)=>{r.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},70406,(e,r,t)=>{r.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},14747,(e,r,t)=>{r.exports=e.x("path",()=>require("path"))},57181,e=>{"use strict";var r=e.i(24868),t=e.i(22734),n=e.i(14747),o=e.i(46786),s=e.i(89196);let i=(0,n.join)((0,o.homedir)(),".config","opencode"),a=(0,n.join)(i,"oh-my-openagent.jsonc"),p=(0,n.join)(i,"oh-my-opencode.jsonc"),c="https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/v3.15.2/assets/oh-my-opencode.schema.json";function d(e){let r="object"!=typeof e||null===e||Array.isArray(e)?{}:{...e};return{...r,openEditorTargetMode:"hub"===r.openEditorTargetMode?"hub":"remote"}}function x(e=a){return e!==a?e:(0,t.existsSync)(a)?a:(0,t.existsSync)(p)?p:a}function l(e=a){try{return(0,t.existsSync)(x(e))}catch{return!1}}async function u(e=a){try{let t=await (0,r.readFile)(x(e),"utf-8");return(0,s.parse)(t,null,!1)}catch{return{}}}async function y(e,o=a){try{let i=(0,n.join)(o,"..");(0,t.existsSync)(i)||(0,t.mkdirSync)(i,{recursive:!0});let p=o===a?{...e,$schema:e.$schema||c}:e,d=(0,s.stringify)(p,null,2);await (0,r.writeFile)(o,d,"utf-8")}catch(e){throw Error(`Failed to write config: ${e}`)}}e.s(["OH_MY_OPENAGENT_CONFIG_SCHEMA",0,c,"detectConfig",()=>l,"normalizeVibePulseConfig",()=>d,"readConfig",()=>u,"resolveConfigPath",()=>x,"writeConfig",()=>y])}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__56690af0._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},33405,(e,t,r)=>{t.exports=e.x("child_process",()=>require("child_process"))},99686,e=>{"use strict";var t=e.i(33405);let r=new Set;function n(){let e=Number(process.env.OPENCODE_DISCOVERY_TIMEOUT_MS);return Number.isFinite(e)&&e>0?e:5e3}function o(e){if(!(e instanceof Error))return!1;let t=e.message.toLowerCase();return"ETIMEDOUT"===e.code||t.includes("timed out")||t.includes("etimedout")}function i(e){let t=e.deadlineMs-Date.now();return t<=0?(e.timedOut=!0,null):Math.max(1,Math.min(e.timeoutMs,t))}function s(e){return Array.from(new Set(e.filter(e=>Number.isInteger(e)&&e>0&&e<=65535))).sort((e,t)=>e-t)}function a(){let e=n(),a={timedOut:!1,timeoutMs:e,deadlineMs:Date.now()+e},l=s([...function(e){try{let r=i(e);if(null===r)return[];let n=(0,t.execSync)("lsof -nP -iTCP -sTCP:LISTEN",{encoding:"utf-8",stdio:["ignore","pipe","ignore"],timeout:r}).split("\n"),o=[];for(let e of n){let t=e.trim();if(!t||t.startsWith("COMMAND"))continue;let r=t.split(/\s+/),n=r[0]?.toLowerCase();if("opencode"!==n)continue;let i=t.match(/:(\d+)\s+\(LISTEN\)/);if(!i)continue;let s=parseInt(i[1],10);Number.isFinite(s)&&o.push(s)}return o}catch(t){return o(t)&&(e.timedOut=!0),[]}}(a),...function(e){try{let r=i(e);if(null===r)return[];return[...(0,t.execSync)("ps -axo command",{encoding:"utf-8",stdio:["ignore","pipe","ignore"],timeout:r}).matchAll(/\bopencode\b[^\n]*\b--port(?:=|\s+)(\d+)\b/g)].map(e=>parseInt(e[1],10)).filter(e=>Number.isFinite(e))}catch(t){return o(t)&&(e.timedOut=!0),[]}}(a)]);for(let e of l)r.add(e);return{ports:s([...l,...Array.from(r)]),timedOut:a.timedOut}}function l(){let e=n(),r={timedOut:!1,timeoutMs:e,deadlineMs:Date.now()+e},s=function(e){try{let r=i(e);if(null===r)return[];let n=(0,t.execSync)("ps -axo pid=,command=",{encoding:"utf-8",stdio:["ignore","pipe","ignore"],timeout:r}),o=[];for(let e of n.split("\n")){let t=e.trim();if(!t)continue;let r=t.match(/^(\d+)\s+(.+)$/);if(!r)continue;let n=parseInt(r[1],10),i=r[2];Number.isFinite(n)&&/\bopencode\b/.test(i)&&(/\b--port(?:=|\s+)\d+\b/.test(i)||o.push(n))}return Array.from(new Set(o))}catch(t){return o(t)&&(e.timedOut=!0),[]}}(r);if(!s.length)return{processes:[],timedOut:r.timedOut};let a=[],l=new Set;for(let e of s){let n=function(e,r){try{let n=i(r);if(null===n)return null;let o=(0,t.execSync)(`lsof -nP -a -p ${e} -d cwd -Fn`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"],timeout:n}).split("\n").find(e=>e.startsWith("n")&&e.length>1);if(!o)return null;return o.slice(1)}catch(e){return o(e)&&(r.timedOut=!0),null}}(e,r);if(!n)continue;let s=`${e}:${n}`;l.has(s)||(l.add(s),a.push({pid:e,cwd:n}))}return{processes:a,timedOut:r.timedOut}}e.s(["discoverOpencodePortsWithMeta",()=>a,"discoverOpencodeProcessCwdsWithoutPortWithMeta",()=>l])},586,e=>{"use strict";function t(e,t){if(!e||""===e.trim())throw Error("Invalid hostId: cannot be empty");if(!t||""===t.trim())throw Error("Invalid sessionId: cannot be empty");if(e.includes(":")||t.includes(":"))throw Error("Invalid hostId or sessionId: colon character not allowed");return`${e}:${t}`}function r(e){if("string"!=typeof e)throw Error("Invalid sourceKey: must be a string");let t=e.split(":");if(2!==t.length)throw Error("Invalid sourceKey: must contain exactly one colon separator");let[r,n]=t,o=r.trim(),i=n.trim();if(""===o||""===i)throw Error("Invalid sourceKey: hostId and sessionId cannot be empty");return{hostId:o,sessionId:i}}function n(e){if("string"!=typeof e)throw Error("Invalid action session id: must be a string");let t=e.trim();if(""===t)throw Error("Invalid action session id: cannot be empty");if(!t.includes(":"))return{hostId:"local",sessionId:t,isRemote:!1};let{hostId:n,sessionId:o}=r(t);return{hostId:n,sessionId:o,isRemote:"local"!==n}}function o(e){try{let t=n(e);return t.isRemote?null:t.sessionId}catch{return null}}e.s(["composeSourceKey",()=>t,"parseActionSessionReference",()=>n,"parseSourceKey",()=>r,"resolveLocalActionSessionId",()=>o])},96279,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),o=e.i(59756),i=e.i(61916),s=e.i(74677),a=e.i(69741),l=e.i(16795),u=e.i(87718),d=e.i(95169),c=e.i(47587),p=e.i(66012),h=e.i(70101),f=e.i(26937),m=e.i(10372),x=e.i(93695);e.i(52474);var g=e.i(220);e.i(39354);var R=e.i(34959),v=e.i(99686),E=e.i(586);async function y(e,{params:t}){let{id:r}=await t,n=function(e){if(!e.includes(":"))return e;try{let{hostId:t,sessionId:r}=(0,E.parseSourceKey)(e);return"local"===t?r:null}catch{return null}}(r);if(!n)return Response.json({error:"Session not found"},{status:404});let{ports:o,timedOut:i}=(0,v.discoverOpencodePortsWithMeta)();if(!o.length)return i?Response.json({error:"OpenCode discovery timed out",hint:"Host process discovery exceeded timeout. Retry shortly, or increase OPENCODE_DISCOVERY_TIMEOUT_MS."},{status:503}):Response.json({error:"OpenCode server not found",hint:"Make sure OpenCode is running with an exposed API port. Example: opencode --port <PORT> (VibePulse auto-detects active ports)."},{status:503});try{for(let e of o)try{let t=(0,R.createOpencodeClient)({baseUrl:`http://localhost:${e}`}),r=await t.session.get({path:{id:n}});if(r.data)return Response.json({session:r.data})}catch{}return Response.json({error:"Session not found"},{status:404})}catch(e){return console.error("Error fetching session:",e),Response.json({error:"Failed to fetch session",details:e instanceof Error?e.message:String(e),hint:"Make sure OpenCode is running with an exposed API port. Example: opencode --port <PORT> (VibePulse auto-detects active ports)."},{status:500})}}e.s(["GET",()=>y],13346);var w=e.i(13346);let O=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/sessions/[id]/route",pathname:"/api/sessions/[id]",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/sessions/[id]/route.ts",nextConfigOutput:"standalone",userland:w}),{workAsyncStorage:b,workUnitAsyncStorage:C,serverHooks:I}=O;function S(){return(0,n.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:C})}async function P(e,t,n){O.isDev&&(0,o.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let R="/api/sessions/[id]/route";R=R.replace(/\/index$/,"")||"/";let v=await O.prepare(e,t,{srcPage:R,multiZoneDraftMode:!1});if(!v)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:E,params:y,nextConfig:w,parsedUrl:b,isDraftMode:C,prerenderManifest:I,routerServerContext:S,isOnDemandRevalidate:P,revalidateOnlyGenerated:A,resolvedPathname:T,clientReferenceManifest:N,serverActionsManifest:M}=v,_=(0,a.normalizeAppPath)(R),D=!!(I.dynamicRoutes[_]||I.routes[T]),j=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,b,!1):t.end("This page could not be found"),null);if(D&&!C){let e=!!I.routes[T],t=I.dynamicRoutes[_];if(t&&!1===t.fallback&&!e){if(w.experimental.adapterPath)return await j();throw new x.NoFallbackError}}let k=null;!D||O.isDev||C||(k="/index"===(k=T)?"/":k);let q=!0===O.isDev||!D,U=D&&!q;M&&N&&(0,s.setManifestsSingleton)({page:R,clientReferenceManifest:N,serverActionsManifest:M});let H=e.method||"GET",$=(0,i.getTracer)(),F=$.getActiveScopeSpan(),K={params:y,prerenderManifest:I,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:q,incrementalCache:(0,o.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:w.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,o)=>O.onRequestError(e,t,n,o,S)},sharedContext:{buildId:E}},L=new l.NodeNextRequest(e),W=new l.NodeNextResponse(t),V=u.NextRequestAdapter.fromNodeNextRequest(L,(0,u.signalFromNodeResponse)(t));try{let s=async e=>O.handle(V,K).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=$.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${H} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${H} ${R}`)}),a=!!(0,o.getRequestMeta)(e,"minimalMode"),l=async o=>{var i,l;let u=async({previousCacheEntry:r})=>{try{if(!a&&P&&A&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await s(o);e.fetchMetrics=K.renderOpts.fetchMetrics;let l=K.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let u=K.renderOpts.collectedTags;if(!D)return await (0,p.sendResponse)(L,W,i,K.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(i.headers);u&&(t[m.NEXT_CACHE_TAGS_HEADER]=u),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,n=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await O.onRequestError(e,t,{routerKind:"App Router",routePath:R,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:P})},!1,S),t}},d=await O.handleResponse({req:e,nextConfig:w,cacheKey:k,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:I,isRoutePPREnabled:!1,isOnDemandRevalidate:P,revalidateOnlyGenerated:A,responseGenerator:u,waitUntil:n.waitUntil,isMinimalMode:a});if(!D)return null;if((null==d||null==(i=d.value)?void 0:i.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(l=d.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});a||t.setHeader("x-nextjs-cache",P?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),C&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let x=(0,h.fromNodeOutgoingHttpHeaders)(d.value.headers);return a&&D||x.delete(m.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||x.get("Cache-Control")||x.set("Cache-Control",(0,f.getCacheControlHeader)(d.cacheControl)),await (0,p.sendResponse)(L,W,new Response(d.value.body,{headers:x,status:d.value.status||200})),null};F?await l(F):await $.withPropagatedContext(e.headers,()=>$.trace(d.BaseServerSpan.handleRequest,{spanName:`${H} ${R}`,kind:i.SpanKind.SERVER,attributes:{"http.method":H,"http.target":e.url}},l))}catch(t){if(t instanceof x.NoFallbackError||await O.onRequestError(e,t,{routerKind:"App Router",routePath:_,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:P})},!1,S),D)throw t;return await (0,p.sendResponse)(L,W,new Response(null,{status:500})),null}}e.s(["handler",()=>P,"patchFetch",()=>S,"routeModule",()=>O,"serverHooks",()=>I,"workAsyncStorage",()=>b,"workUnitAsyncStorage",()=>C],96279)}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__56f5f249._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},57181,e=>{"use strict";var t=e.i(24868),r=e.i(22734),n=e.i(14747),i=e.i(46786),a=e.i(89196);let o=(0,n.join)((0,i.homedir)(),".config","opencode"),s=(0,n.join)(o,"oh-my-openagent.jsonc"),l=(0,n.join)(o,"oh-my-opencode.jsonc"),d="https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/v3.15.2/assets/oh-my-opencode.schema.json";function u(e){let t="object"!=typeof e||null===e||Array.isArray(e)?{}:{...e};return{...t,openEditorTargetMode:"hub"===t.openEditorTargetMode?"hub":"remote"}}function p(e=s){return e!==s?e:(0,r.existsSync)(s)?s:(0,r.existsSync)(l)?l:s}function c(e=s){try{return(0,r.existsSync)(p(e))}catch{return!1}}async function f(e=s){try{let r=await (0,t.readFile)(p(e),"utf-8");return(0,a.parse)(r,null,!1)}catch{return{}}}async function m(e,i=s){try{let o=(0,n.join)(i,"..");(0,r.existsSync)(o)||(0,r.mkdirSync)(o,{recursive:!0});let l=i===s?{...e,$schema:e.$schema||d}:e,u=(0,a.stringify)(l,null,2);await (0,t.writeFile)(i,u,"utf-8")}catch(e){throw Error(`Failed to write config: ${e}`)}}e.s(["OH_MY_OPENAGENT_CONFIG_SCHEMA",0,d,"detectConfig",()=>c,"normalizeVibePulseConfig",()=>u,"readConfig",()=>f,"resolveConfigPath",()=>p,"writeConfig",()=>m])},53977,e=>{"use strict";var t=e.i(24868),r=e.i(22734),n=e.i(14747),i=e.i(46786),a=e.i(89196),o=e.i(57181);let s=(0,n.join)((0,i.homedir)(),".config","opencode","profiles"),l=(0,n.join)(s,"index.json"),d=[{id:"balanced",name:"Balanced",emoji:"⚖️",description:"Balanced multi-model orchestration optimized for general coding tasks",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),isBuiltIn:!0}],u={balanced:{agents:{sisyphus:{model:"anthropic/claude-opus-4-6",variant:"max",temperature:.2,top_p:.9},oracle:{model:"openai/gpt-5.4",variant:"high",temperature:.2,top_p:.9},prometheus:{model:"anthropic/claude-opus-4-6",variant:"max",temperature:.2,top_p:.9},metis:{model:"anthropic/claude-opus-4-6",variant:"max",temperature:.2,top_p:.9},momus:{model:"openai/gpt-5.4",variant:"medium",temperature:.2,top_p:.9},atlas:{model:"anthropic/claude-sonnet-4-6",temperature:.2,top_p:.9},hephaestus:{model:"openai/gpt-5.4",variant:"medium",temperature:.2,top_p:.9},librarian:{model:"minimax-m2.7",temperature:.3,top_p:.9},explore:{model:"grok-code-fast-1",temperature:.1,top_p:.9},"multimodal-looker":{model:"openai/gpt-5.4",variant:"medium",temperature:.2,top_p:.9},"frontend-ui-ux":{model:"google/gemini-3.1-pro",variant:"high",temperature:.3,top_p:.9}},categories:{"visual-engineering":{model:"google/gemini-3.1-pro",variant:"high"},ultrabrain:{model:"openai/gpt-5.4",variant:"xhigh"},deep:{model:"openai/gpt-5.4",variant:"medium"},artistry:{model:"google/gemini-3.1-pro",variant:"high"},quick:{model:"openai/gpt-5.4-mini",temperature:.1},"unspecified-low":{model:"anthropic/claude-sonnet-4-6",temperature:.2},"unspecified-high":{model:"anthropic/claude-opus-4-6",variant:"max",temperature:.2},writing:{model:"google/gemini-3-flash",temperature:.3}}}};function p(){(0,r.existsSync)(s)||(0,r.mkdirSync)(s,{recursive:!0})}function c(e){return(0,n.join)(s,`${e}.json`)}function f(e){if(!e||"object"!=typeof e)return{$schema:o.OH_MY_OPENAGENT_CONFIG_SCHEMA,agents:{}};let t=e.agents&&"object"==typeof e.agents?e.agents:{},r=e.categories&&"object"==typeof e.categories?e.categories:void 0;return{$schema:"string"==typeof e.$schema&&e.$schema.trim().length>0?e.$schema:o.OH_MY_OPENAGENT_CONFIG_SCHEMA,agents:t,categories:r}}function m(){return{version:1,profiles:[...d],activeProfileId:null,lastModified:new Date().toISOString()}}async function g(){let e=new Set(d.map(e=>e.id));for(let n of["coding","writing","debug","minimal"])if(!e.has(n)){let e=c(n);(0,r.existsSync)(e)&&await (0,t.unlink)(e)}for(let e of d){let t=u[e.id]||{agents:{}};await R(e.id,t)}}async function h(){return y(!0)}async function x(){return y(!1)}async function y(e){try{if(p(),!(0,r.existsSync)(l)){let e=m();return await w(e),await g(),e}let e=await (0,t.readFile)(l,"utf-8"),n=(0,a.parse)(e,null,!1),i=!1;for(let e of d)n.profiles.some(t=>t.id===e.id)||(n.profiles.push(e),i=!0);let o=new Set(d.map(e=>e.id)),s=n.profiles.length;return n.profiles=n.profiles.filter(e=>!e.isBuiltIn||o.has(e.id)),n.profiles.length!==s&&(i=!0),await g(),i&&(n.lastModified=new Date().toISOString(),await w(n)),n}catch(t){if(!e)throw t;return m()}}async function w(e){p(),e.lastModified=new Date().toISOString();let r=(0,a.stringify)(e,null,2);await (0,t.writeFile)(l,r,"utf-8")}async function v(e){try{let n=c(e);if(!(0,r.existsSync)(n))return{$schema:o.OH_MY_OPENAGENT_CONFIG_SCHEMA,agents:{}};let i=await (0,t.readFile)(n,"utf-8"),s=(0,a.parse)(i,null,!1),l=f(s);if(!s||"object"!=typeof s||"string"!=typeof s.$schema)try{await R(e,l)}catch{}return l}catch{return{$schema:o.OH_MY_OPENAGENT_CONFIG_SCHEMA,agents:{}}}}async function R(e,r){p();let n=c(e),i=(0,a.stringify)(f(r),null,2);await (0,t.writeFile)(n,i,"utf-8")}async function E(e){let n=(await h()).profiles.find(t=>t.id===e);if(n?.isBuiltIn){let t=u[e]||{agents:{}};return await R(e,t),!0}let i=c(e);return!!(0,r.existsSync)(i)&&(await (0,t.unlink)(i),!0)}async function P(e){return(await h()).profiles.find(t=>t.id===e)}async function C(e){let t=await h();t.activeProfileId=e,await w(t)}e.s(["deleteProfileConfig",()=>E,"getProfileById",()=>P,"readProfileConfig",()=>v,"readProfileIndex",()=>h,"readProfileIndexStrict",()=>x,"setActiveProfileId",()=>C,"writeProfileConfig",()=>R,"writeProfileIndex",()=>w])},30754,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),i=e.i(59756),a=e.i(61916),o=e.i(74677),s=e.i(69741),l=e.i(16795),d=e.i(87718),u=e.i(95169),p=e.i(47587),c=e.i(66012),f=e.i(70101),m=e.i(26937),g=e.i(10372),h=e.i(93695);e.i(52474);var x=e.i(220),y=e.i(89171),w=e.i(53977);async function v(e,{params:t}){try{let{id:e}=await t,r=await (0,w.getProfileById)(e);if(!r)return y.NextResponse.json({error:"Profile not found"},{status:404});let n=await (0,w.readProfileConfig)(e);return y.NextResponse.json({profile:r,config:n})}catch(e){return console.error("Error reading profile:",e),y.NextResponse.json({error:"Internal server error"},{status:500})}}async function R(e,{params:t}){try{let{id:r}=await t,n=await (0,w.getProfileById)(r);if(!n)return y.NextResponse.json({error:"Profile not found"},{status:404});let i=await e.json();if(!i||"object"!=typeof i)return y.NextResponse.json({error:"Invalid request body"},{status:400});let a=i.profile||i,{name:o,description:s,emoji:l}=a,d=i.config||a.config;if(void 0!==o){if("string"!=typeof o||""===o.trim())return y.NextResponse.json({error:"name must be a non-empty string"},{status:400});n.name=o.trim()}void 0!==s&&(n.description=s?.trim()||void 0),void 0!==l&&(n.emoji=l||"⚙️"),n.updatedAt=new Date().toISOString();let u=await (0,w.readProfileIndex)(),p=u.profiles.findIndex(e=>e.id===r);if(-1===p)return y.NextResponse.json({error:"Profile not found in index"},{status:404});return u.profiles[p]=n,await (0,w.writeProfileIndex)(u),d&&"object"==typeof d&&await (0,w.writeProfileConfig)(r,{agents:d.agents||{},categories:d.categories}),y.NextResponse.json({profile:n})}catch(e){return console.error("Error updating profile:",e),y.NextResponse.json({error:"Internal server error"},{status:500})}}async function E(e,{params:t}){try{let{id:e}=await t,r=await (0,w.getProfileById)(e);if(!r)return y.NextResponse.json({error:"Profile not found"},{status:404});if(r.isBuiltIn)return await (0,w.deleteProfileConfig)(e),y.NextResponse.json({message:"Built-in profile reset to defaults",profile:r});let n=await (0,w.readProfileIndex)();return n.profiles=n.profiles.filter(t=>t.id!==e),n.activeProfileId===e&&(n.activeProfileId=null),await (0,w.writeProfileIndex)(n),await (0,w.deleteProfileConfig)(e),y.NextResponse.json({message:"Profile deleted successfully"})}catch(e){return console.error("Error deleting profile:",e),y.NextResponse.json({error:"Internal server error"},{status:500})}}e.s(["DELETE",()=>E,"GET",()=>v,"PUT",()=>R],44170);var P=e.i(44170);let C=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/profiles/[id]/route",pathname:"/api/profiles/[id]",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/profiles/[id]/route.ts",nextConfigOutput:"standalone",userland:P}),{workAsyncStorage:j,workUnitAsyncStorage:I,serverHooks:N}=C;function _(){return(0,n.patchFetch)({workAsyncStorage:j,workUnitAsyncStorage:I})}async function S(e,t,n){C.isDev&&(0,i.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let y="/api/profiles/[id]/route";y=y.replace(/\/index$/,"")||"/";let w=await C.prepare(e,t,{srcPage:y,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:v,params:R,nextConfig:E,parsedUrl:P,isDraftMode:j,prerenderManifest:I,routerServerContext:N,isOnDemandRevalidate:_,revalidateOnlyGenerated:S,resolvedPathname:b,clientReferenceManifest:A,serverActionsManifest:O}=w,T=(0,s.normalizeAppPath)(y),k=!!(I.dynamicRoutes[T]||I.routes[b]),H=async()=>((null==N?void 0:N.render404)?await N.render404(e,t,P,!1):t.end("This page could not be found"),null);if(k&&!j){let e=!!I.routes[b],t=I.dynamicRoutes[T];if(t&&!1===t.fallback&&!e){if(E.experimental.adapterPath)return await H();throw new h.NoFallbackError}}let M=null;!k||C.isDev||j||(M="/index"===(M=b)?"/":M);let q=!0===C.isDev||!k,$=k&&!q;O&&A&&(0,o.setManifestsSingleton)({page:y,clientReferenceManifest:A,serverActionsManifest:O});let D=e.method||"GET",F=(0,a.getTracer)(),U=F.getActiveScopeSpan(),B={params:R,prerenderManifest:I,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:q,incrementalCache:(0,i.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:E.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,i)=>C.onRequestError(e,t,n,i,N)},sharedContext:{buildId:v}},G=new l.NodeNextRequest(e),K=new l.NodeNextResponse(t),L=d.NextRequestAdapter.fromNodeNextRequest(G,(0,d.signalFromNodeResponse)(t));try{let o=async e=>C.handle(L,B).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=F.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${D} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${D} ${y}`)}),s=!!(0,i.getRequestMeta)(e,"minimalMode"),l=async i=>{var a,l;let d=async({previousCacheEntry:r})=>{try{if(!s&&_&&S&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await o(i);e.fetchMetrics=B.renderOpts.fetchMetrics;let l=B.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let d=B.renderOpts.collectedTags;if(!k)return await (0,c.sendResponse)(G,K,a,B.renderOpts.pendingWaitUntil),null;{let e=await a.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(a.headers);d&&(t[g.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==B.renderOpts.collectedRevalidate&&!(B.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&B.renderOpts.collectedRevalidate,n=void 0===B.renderOpts.collectedExpire||B.renderOpts.collectedExpire>=g.INFINITE_CACHE?void 0:B.renderOpts.collectedExpire;return{value:{kind:x.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await C.onRequestError(e,t,{routerKind:"App Router",routePath:y,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:_})},!1,N),t}},u=await C.handleResponse({req:e,nextConfig:E,cacheKey:M,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:I,isRoutePPREnabled:!1,isOnDemandRevalidate:_,revalidateOnlyGenerated:S,responseGenerator:d,waitUntil:n.waitUntil,isMinimalMode:s});if(!k)return null;if((null==u||null==(a=u.value)?void 0:a.kind)!==x.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(l=u.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});s||t.setHeader("x-nextjs-cache",_?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),j&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let h=(0,f.fromNodeOutgoingHttpHeaders)(u.value.headers);return s&&k||h.delete(g.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||h.get("Cache-Control")||h.set("Cache-Control",(0,m.getCacheControlHeader)(u.cacheControl)),await (0,c.sendResponse)(G,K,new Response(u.value.body,{headers:h,status:u.value.status||200})),null};U?await l(U):await F.withPropagatedContext(e.headers,()=>F.trace(u.BaseServerSpan.handleRequest,{spanName:`${D} ${y}`,kind:a.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},l))}catch(t){if(t instanceof h.NoFallbackError||await C.onRequestError(e,t,{routerKind:"App Router",routePath:T,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:_})},!1,N),k)throw t;return await (0,c.sendResponse)(G,K,new Response(null,{status:500})),null}}e.s(["handler",()=>S,"patchFetch",()=>_,"routeModule",()=>C,"serverHooks",()=>N,"workAsyncStorage",()=>j,"workUnitAsyncStorage",()=>I],30754)}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__59175de4._.js.map