vibepulse 0.1.7 → 0.1.9

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 (146) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +2 -2
  3. package/.next/cache/.previewinfo +1 -1
  4. package/.next/cache/.rscinfo +1 -1
  5. package/.next/cache/.tsbuildinfo +1 -1
  6. package/.next/cache/config.json +3 -3
  7. package/.next/fallback-build-manifest.json +2 -2
  8. package/.next/prerender-manifest.json +3 -3
  9. package/.next/server/app/_global-error.html +2 -2
  10. package/.next/server/app/_global-error.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  16. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  17. package/.next/server/app/_not-found.html +1 -1
  18. package/.next/server/app/_not-found.rsc +2 -2
  19. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  20. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  21. package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  22. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  23. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  24. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  25. package/.next/server/app/api/sessions/[id]/archive/route.js +1 -1
  26. package/.next/server/app/api/sessions/[id]/archive/route.js.nft.json +1 -1
  27. package/.next/server/app/api/sessions/[id]/delete/route.js +1 -1
  28. package/.next/server/app/api/sessions/[id]/delete/route.js.nft.json +1 -1
  29. package/.next/server/app/api/sessions/route.js +2 -2
  30. package/.next/server/app/api/sessions/route.js.nft.json +1 -1
  31. package/.next/server/app/index.html +1 -1
  32. package/.next/server/app/index.rsc +3 -3
  33. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  34. package/.next/server/app/index.segments/_full.segment.rsc +3 -3
  35. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  36. package/.next/server/app/index.segments/_index.segment.rsc +2 -2
  37. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  38. package/.next/server/app/page_client-reference-manifest.js +1 -1
  39. package/.next/server/chunks/[root-of-the-server]__07488412._.js +1 -1
  40. package/.next/server/chunks/[root-of-the-server]__07488412._.js.map +1 -1
  41. package/.next/server/chunks/[root-of-the-server]__172a07b6._.js +1 -1
  42. package/.next/server/chunks/[root-of-the-server]__172a07b6._.js.map +1 -1
  43. package/.next/server/chunks/[root-of-the-server]__3f180efd._.js +1 -1
  44. package/.next/server/chunks/[root-of-the-server]__3f180efd._.js.map +1 -1
  45. package/.next/server/chunks/[root-of-the-server]__560e7c61._.js +1 -1
  46. package/.next/server/chunks/[root-of-the-server]__560e7c61._.js.map +1 -1
  47. package/.next/server/chunks/[root-of-the-server]__59160266._.js +1 -1
  48. package/.next/server/chunks/[root-of-the-server]__59160266._.js.map +1 -1
  49. package/.next/server/chunks/[root-of-the-server]__9f034d03._.js +2 -2
  50. package/.next/server/chunks/[root-of-the-server]__9f034d03._.js.map +1 -1
  51. package/.next/server/chunks/[root-of-the-server]__b92251ea._.js +1 -1
  52. package/.next/server/chunks/[root-of-the-server]__b92251ea._.js.map +1 -1
  53. package/.next/server/chunks/[root-of-the-server]__d00b52a5._.js +3 -0
  54. package/.next/server/chunks/[root-of-the-server]__d00b52a5._.js.map +1 -0
  55. package/.next/server/chunks/[root-of-the-server]__d5e2fdcd._.js +1 -1
  56. package/.next/server/chunks/[root-of-the-server]__d5e2fdcd._.js.map +1 -1
  57. package/.next/server/chunks/[root-of-the-server]__f234882e._.js +3 -0
  58. package/.next/server/chunks/[root-of-the-server]__f234882e._.js.map +1 -0
  59. package/.next/server/chunks/[root-of-the-server]__f85221b8._.js +3 -0
  60. package/.next/server/chunks/[root-of-the-server]__f85221b8._.js.map +1 -0
  61. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_b054aff3.js +1 -1
  62. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_b054aff3.js.map +1 -1
  63. package/.next/server/chunks/ssr/src_app_page_tsx_a7111f3e._.js +3 -3
  64. package/.next/server/chunks/ssr/src_app_page_tsx_a7111f3e._.js.map +1 -1
  65. package/.next/server/pages/404.html +1 -1
  66. package/.next/server/pages/500.html +2 -2
  67. package/.next/server/server-reference-manifest.js +1 -1
  68. package/.next/server/server-reference-manifest.json +1 -1
  69. package/.next/standalone/.next/BUILD_ID +1 -1
  70. package/.next/standalone/.next/build-manifest.json +2 -2
  71. package/.next/standalone/.next/prerender-manifest.json +3 -3
  72. package/.next/standalone/.next/server/app/_global-error.html +2 -2
  73. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  74. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  75. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  76. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  77. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  78. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  79. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  80. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  81. package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
  82. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  83. package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  84. package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  85. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  86. package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  87. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  88. package/.next/standalone/.next/server/app/api/sessions/[id]/archive/route.js +1 -1
  89. package/.next/standalone/.next/server/app/api/sessions/[id]/archive/route.js.nft.json +1 -1
  90. package/.next/standalone/.next/server/app/api/sessions/[id]/delete/route.js +1 -1
  91. package/.next/standalone/.next/server/app/api/sessions/[id]/delete/route.js.nft.json +1 -1
  92. package/.next/standalone/.next/server/app/api/sessions/route.js +2 -2
  93. package/.next/standalone/.next/server/app/api/sessions/route.js.nft.json +1 -1
  94. package/.next/standalone/.next/server/app/index.html +1 -1
  95. package/.next/standalone/.next/server/app/index.rsc +3 -3
  96. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  97. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +3 -3
  98. package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
  99. package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +2 -2
  100. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  101. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  102. package/.next/standalone/.next/server/chunks/[root-of-the-server]__07488412._.js +1 -1
  103. package/.next/standalone/.next/server/chunks/[root-of-the-server]__172a07b6._.js +1 -1
  104. package/.next/standalone/.next/server/chunks/[root-of-the-server]__3f180efd._.js +1 -1
  105. package/.next/standalone/.next/server/chunks/[root-of-the-server]__560e7c61._.js +1 -1
  106. package/.next/standalone/.next/server/chunks/[root-of-the-server]__59160266._.js +1 -1
  107. package/.next/standalone/.next/server/chunks/[root-of-the-server]__9f034d03._.js +2 -2
  108. package/.next/standalone/.next/server/chunks/[root-of-the-server]__b92251ea._.js +1 -1
  109. package/.next/standalone/.next/server/chunks/[root-of-the-server]__d00b52a5._.js +3 -0
  110. package/.next/standalone/.next/server/chunks/[root-of-the-server]__d5e2fdcd._.js +1 -1
  111. package/.next/standalone/.next/server/chunks/[root-of-the-server]__f234882e._.js +3 -0
  112. package/.next/standalone/.next/server/chunks/[root-of-the-server]__f85221b8._.js +3 -0
  113. package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_b054aff3.js +1 -1
  114. package/.next/standalone/.next/server/chunks/ssr/src_app_page_tsx_a7111f3e._.js +3 -3
  115. package/.next/standalone/.next/server/pages/404.html +1 -1
  116. package/.next/standalone/.next/server/pages/500.html +2 -2
  117. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  118. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  119. package/.next/standalone/.next/static/chunks/1bbbc95429c6dc71.css +3 -0
  120. package/.next/standalone/.next/static/chunks/39f3ba803c17ec7f.js +13 -0
  121. package/.next/standalone/package.json +1 -1
  122. package/.next/static/chunks/1bbbc95429c6dc71.css +3 -0
  123. package/.next/static/chunks/39f3ba803c17ec7f.js +13 -0
  124. package/.next/trace +1 -1
  125. package/.next/trace-build +1 -1
  126. package/README.md +0 -2
  127. package/package.json +1 -1
  128. package/.next/server/chunks/[root-of-the-server]__14df29b6._.js +0 -3
  129. package/.next/server/chunks/[root-of-the-server]__14df29b6._.js.map +0 -1
  130. package/.next/server/chunks/[root-of-the-server]__2eaddfa4._.js +0 -3
  131. package/.next/server/chunks/[root-of-the-server]__2eaddfa4._.js.map +0 -1
  132. package/.next/server/chunks/[root-of-the-server]__618c0ea7._.js +0 -3
  133. package/.next/server/chunks/[root-of-the-server]__618c0ea7._.js.map +0 -1
  134. package/.next/standalone/.next/server/chunks/[root-of-the-server]__14df29b6._.js +0 -3
  135. package/.next/standalone/.next/server/chunks/[root-of-the-server]__2eaddfa4._.js +0 -3
  136. package/.next/standalone/.next/server/chunks/[root-of-the-server]__618c0ea7._.js +0 -3
  137. package/.next/standalone/.next/static/chunks/17f4f0208a73190e.css +0 -3
  138. package/.next/standalone/.next/static/chunks/27cd09abe7141317.js +0 -13
  139. package/.next/static/chunks/17f4f0208a73190e.css +0 -3
  140. package/.next/static/chunks/27cd09abe7141317.js +0 -13
  141. /package/.next/standalone/.next/static/{nxwthzXRJllvd1zizGoUj → 41D3IUPiOJs8EAB5rYLsC}/_buildManifest.js +0 -0
  142. /package/.next/standalone/.next/static/{nxwthzXRJllvd1zizGoUj → 41D3IUPiOJs8EAB5rYLsC}/_clientMiddlewareManifest.json +0 -0
  143. /package/.next/standalone/.next/static/{nxwthzXRJllvd1zizGoUj → 41D3IUPiOJs8EAB5rYLsC}/_ssgManifest.js +0 -0
  144. /package/.next/static/{nxwthzXRJllvd1zizGoUj → 41D3IUPiOJs8EAB5rYLsC}/_buildManifest.js +0 -0
  145. /package/.next/static/{nxwthzXRJllvd1zizGoUj → 41D3IUPiOJs8EAB5rYLsC}/_clientMiddlewareManifest.json +0 -0
  146. /package/.next/static/{nxwthzXRJllvd1zizGoUj → 41D3IUPiOJs8EAB5rYLsC}/_ssgManifest.js +0 -0
package/.next/trace CHANGED
@@ -1 +1 @@
1
- [{"name":"generate-buildid","duration":185,"timestamp":178086803,"id":4,"parentId":1,"tags":{},"startTime":1773061869490,"traceId":"7b26767ba8da19fb"},{"name":"load-custom-routes","duration":267,"timestamp":178087091,"id":5,"parentId":1,"tags":{},"startTime":1773061869490,"traceId":"7b26767ba8da19fb"},{"name":"create-dist-dir","duration":181,"timestamp":178087381,"id":6,"parentId":1,"tags":{},"startTime":1773061869491,"traceId":"7b26767ba8da19fb"},{"name":"clean","duration":186,"timestamp":178087931,"id":7,"parentId":1,"tags":{},"startTime":1773061869491,"traceId":"7b26767ba8da19fb"},{"name":"create-pages-mapping","duration":182,"timestamp":178134673,"id":8,"parentId":1,"tags":{},"startTime":1773061869538,"traceId":"7b26767ba8da19fb"},{"name":"collect-app-files","duration":2641,"timestamp":178134890,"id":9,"parentId":1,"tags":{},"startTime":1773061869538,"traceId":"7b26767ba8da19fb"},{"name":"create-app-mapping","duration":2641,"timestamp":178137560,"id":10,"parentId":1,"tags":{},"startTime":1773061869541,"traceId":"7b26767ba8da19fb"},{"name":"create-app-layouts","duration":97,"timestamp":178140272,"id":11,"parentId":1,"tags":{},"startTime":1773061869544,"traceId":"7b26767ba8da19fb"},{"name":"collect-default-files","duration":656,"timestamp":178145543,"id":13,"parentId":1,"tags":{},"startTime":1773061869549,"traceId":"7b26767ba8da19fb"},{"name":"generate-route-types","duration":14393,"timestamp":178141755,"id":12,"parentId":1,"tags":{},"startTime":1773061869545,"traceId":"7b26767ba8da19fb"},{"name":"public-dir-conflict-check","duration":75,"timestamp":178156185,"id":14,"parentId":1,"tags":{},"startTime":1773061869560,"traceId":"7b26767ba8da19fb"},{"name":"generate-routes-manifest","duration":1985,"timestamp":178156310,"id":15,"parentId":1,"tags":{},"startTime":1773061869560,"traceId":"7b26767ba8da19fb"},{"name":"run-turbopack","duration":6228401,"timestamp":178161427,"id":17,"parentId":1,"tags":{},"startTime":1773061869565,"traceId":"7b26767ba8da19fb"},{"name":"run-typescript","duration":4354122,"timestamp":184401751,"id":19,"parentId":1,"tags":{},"startTime":1773061875805,"traceId":"7b26767ba8da19fb"},{"name":"generate-required-server-files","duration":1169,"timestamp":188756234,"id":21,"parentId":1,"tags":{},"startTime":1773061880160,"traceId":"7b26767ba8da19fb"},{"name":"check-static-error-page","duration":2305,"timestamp":188807056,"id":23,"parentId":22,"tags":{},"startTime":1773061880210,"traceId":"7b26767ba8da19fb"},{"name":"is-page-static","duration":226709,"timestamp":188812168,"id":40,"parentId":25,"tags":{},"startTime":1773061880216,"traceId":"7b26767ba8da19fb"},{"name":"check-page","duration":230556,"timestamp":188808423,"id":25,"parentId":22,"tags":{"page":"/_global-error"},"startTime":1773061880212,"traceId":"7b26767ba8da19fb"},{"name":"is-page-static","duration":277474,"timestamp":188812306,"id":41,"parentId":26,"tags":{},"startTime":1773061880216,"traceId":"7b26767ba8da19fb"},{"name":"check-page","duration":281245,"timestamp":188808584,"id":26,"parentId":22,"tags":{"page":"/api/opencode-config"},"startTime":1773061880212,"traceId":"7b26767ba8da19fb"},{"name":"is-page-static","duration":287024,"timestamp":188811927,"id":39,"parentId":24,"tags":{},"startTime":1773061880215,"traceId":"7b26767ba8da19fb"},{"name":"check-page","duration":291263,"timestamp":188807727,"id":24,"parentId":22,"tags":{"page":"/_not-found"},"startTime":1773061880211,"traceId":"7b26767ba8da19fb"},{"name":"is-page-static","duration":291517,"timestamp":188812570,"id":43,"parentId":28,"tags":{},"startTime":1773061880216,"traceId":"7b26767ba8da19fb"},{"name":"check-page","duration":295457,"timestamp":188808661,"id":28,"parentId":22,"tags":{"page":"/api/opencode-events"},"startTime":1773061880212,"traceId":"7b26767ba8da19fb"},{"name":"is-page-static","duration":304458,"timestamp":188812765,"id":45,"parentId":30,"tags":{},"startTime":1773061880216,"traceId":"7b26767ba8da19fb"},{"name":"check-page","duration":308505,"timestamp":188808770,"id":30,"parentId":22,"tags":{"page":"/api/profiles/[id]/apply"},"startTime":1773061880212,"traceId":"7b26767ba8da19fb"},{"name":"is-page-static","duration":307237,"timestamp":188812841,"id":46,"parentId":31,"tags":{},"startTime":1773061880216,"traceId":"7b26767ba8da19fb"},{"name":"check-page","duration":311296,"timestamp":188808809,"id":31,"parentId":22,"tags":{"page":"/api/profiles/[id]"},"startTime":1773061880212,"traceId":"7b26767ba8da19fb"},{"name":"is-page-static","duration":309276,"timestamp":188813029,"id":47,"parentId":32,"tags":{},"startTime":1773061880216,"traceId":"7b26767ba8da19fb"},{"name":"check-page","duration":313480,"timestamp":188808849,"id":32,"parentId":22,"tags":{"page":"/api/profiles"},"startTime":1773061880212,"traceId":"7b26767ba8da19fb"},{"name":"is-page-static","duration":311734,"timestamp":188813108,"id":48,"parentId":33,"tags":{},"startTime":1773061880216,"traceId":"7b26767ba8da19fb"},{"name":"check-page","duration":316034,"timestamp":188808899,"id":33,"parentId":22,"tags":{"page":"/api/sessions/[id]/archive"},"startTime":1773061880212,"traceId":"7b26767ba8da19fb"},{"name":"is-page-static","duration":314258,"timestamp":188813163,"id":49,"parentId":34,"tags":{},"startTime":1773061880216,"traceId":"7b26767ba8da19fb"},{"name":"check-page","duration":318499,"timestamp":188808943,"id":34,"parentId":22,"tags":{"page":"/api/sessions/[id]/delete"},"startTime":1773061880212,"traceId":"7b26767ba8da19fb"},{"name":"is-page-static","duration":316590,"timestamp":188813193,"id":50,"parentId":35,"tags":{},"startTime":1773061880217,"traceId":"7b26767ba8da19fb"},{"name":"check-page","duration":320823,"timestamp":188808981,"id":35,"parentId":22,"tags":{"page":"/api/sessions/[id]"},"startTime":1773061880212,"traceId":"7b26767ba8da19fb"},{"name":"is-page-static","duration":320268,"timestamp":188812505,"id":42,"parentId":27,"tags":{},"startTime":1773061880216,"traceId":"7b26767ba8da19fb"},{"name":"check-page","duration":324165,"timestamp":188808629,"id":27,"parentId":22,"tags":{"page":"/api/opencode-config/status"},"startTime":1773061880212,"traceId":"7b26767ba8da19fb"},{"name":"is-page-static","duration":319786,"timestamp":188813262,"id":51,"parentId":36,"tags":{},"startTime":1773061880217,"traceId":"7b26767ba8da19fb"},{"name":"check-page","duration":324020,"timestamp":188809045,"id":36,"parentId":22,"tags":{"page":"/api/sessions"},"startTime":1773061880212,"traceId":"7b26767ba8da19fb"},{"name":"is-page-static","duration":329134,"timestamp":188812635,"id":44,"parentId":29,"tags":{},"startTime":1773061880216,"traceId":"7b26767ba8da19fb"},{"name":"check-page","duration":333072,"timestamp":188808719,"id":29,"parentId":22,"tags":{"page":"/api/opencode-models"},"startTime":1773061880212,"traceId":"7b26767ba8da19fb"},{"name":"is-page-static","duration":332316,"timestamp":188813291,"id":52,"parentId":37,"tags":{},"startTime":1773061880217,"traceId":"7b26767ba8da19fb"},{"name":"check-page","duration":336548,"timestamp":188809083,"id":37,"parentId":22,"tags":{"page":"/favicon.ico"},"startTime":1773061880212,"traceId":"7b26767ba8da19fb"},{"name":"is-page-static","duration":339418,"timestamp":188816995,"id":53,"parentId":38,"tags":{},"startTime":1773061880220,"traceId":"7b26767ba8da19fb"},{"name":"check-page","duration":347308,"timestamp":188809125,"id":38,"parentId":22,"tags":{"page":"/"},"startTime":1773061880212,"traceId":"7b26767ba8da19fb"},{"name":"static-check","duration":349946,"timestamp":188806515,"id":22,"parentId":1,"tags":{},"startTime":1773061880210,"traceId":"7b26767ba8da19fb"},{"name":"write-routes-manifest","duration":256,"timestamp":189156951,"id":55,"parentId":1,"tags":{},"startTime":1773061880560,"traceId":"7b26767ba8da19fb"},{"name":"load-dotenv","duration":26,"timestamp":189163260,"id":58,"parentId":57,"tags":{},"startTime":1773061880567,"traceId":"7b26767ba8da19fb"},{"name":"run-export-path-map","duration":357,"timestamp":189165079,"id":59,"parentId":57,"tags":{},"startTime":1773061880568,"traceId":"7b26767ba8da19fb"},{"name":"next-export","duration":152776,"timestamp":189162424,"id":57,"parentId":1,"tags":{},"startTime":1773061880566,"traceId":"7b26767ba8da19fb"},{"name":"move-exported-app-not-found-","duration":321,"timestamp":189316779,"id":60,"parentId":56,"tags":{},"startTime":1773061880720,"traceId":"7b26767ba8da19fb"},{"name":"move-exported-app-global-error-","duration":215,"timestamp":189317150,"id":61,"parentId":56,"tags":{},"startTime":1773061880720,"traceId":"7b26767ba8da19fb"},{"name":"static-generation","duration":158817,"timestamp":189159508,"id":56,"parentId":1,"tags":{},"startTime":1773061880563,"traceId":"7b26767ba8da19fb"},{"name":"write-routes-manifest","duration":175,"timestamp":189318478,"id":62,"parentId":1,"tags":{},"startTime":1773061880722,"traceId":"7b26767ba8da19fb"},{"name":"write-standalone-directory","duration":213959,"timestamp":189322666,"id":64,"parentId":1,"tags":{},"startTime":1773061880726,"traceId":"7b26767ba8da19fb"},{"name":"output-standalone","duration":214118,"timestamp":189322538,"id":63,"parentId":1,"tags":{},"startTime":1773061880726,"traceId":"7b26767ba8da19fb"},{"name":"print-tree-view","duration":1953,"timestamp":189536759,"id":65,"parentId":1,"tags":{},"startTime":1773061880940,"traceId":"7b26767ba8da19fb"},{"name":"telemetry-flush","duration":63,"timestamp":189538727,"id":66,"parentId":1,"tags":{},"startTime":1773061880942,"traceId":"7b26767ba8da19fb"},{"name":"next-build","duration":11648591,"timestamp":177890212,"id":1,"tags":{"buildMode":"default","version":"16.1.6","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1773061869294,"traceId":"7b26767ba8da19fb"}]
1
+ [{"name":"generate-buildid","duration":220,"timestamp":175055848,"id":4,"parentId":1,"tags":{},"startTime":1773472418548,"traceId":"0c9131a559f155e7"},{"name":"load-custom-routes","duration":281,"timestamp":175056169,"id":5,"parentId":1,"tags":{},"startTime":1773472418548,"traceId":"0c9131a559f155e7"},{"name":"create-dist-dir","duration":213,"timestamp":175056474,"id":6,"parentId":1,"tags":{},"startTime":1773472418549,"traceId":"0c9131a559f155e7"},{"name":"clean","duration":187,"timestamp":175057135,"id":7,"parentId":1,"tags":{},"startTime":1773472418549,"traceId":"0c9131a559f155e7"},{"name":"create-pages-mapping","duration":256,"timestamp":175104221,"id":8,"parentId":1,"tags":{},"startTime":1773472418596,"traceId":"0c9131a559f155e7"},{"name":"collect-app-files","duration":2647,"timestamp":175104516,"id":9,"parentId":1,"tags":{},"startTime":1773472418597,"traceId":"0c9131a559f155e7"},{"name":"create-app-mapping","duration":1834,"timestamp":175107191,"id":10,"parentId":1,"tags":{},"startTime":1773472418599,"traceId":"0c9131a559f155e7"},{"name":"create-app-layouts","duration":117,"timestamp":175109049,"id":11,"parentId":1,"tags":{},"startTime":1773472418601,"traceId":"0c9131a559f155e7"},{"name":"collect-default-files","duration":1611,"timestamp":175114555,"id":13,"parentId":1,"tags":{},"startTime":1773472418607,"traceId":"0c9131a559f155e7"},{"name":"generate-route-types","duration":23931,"timestamp":175110723,"id":12,"parentId":1,"tags":{},"startTime":1773472418603,"traceId":"0c9131a559f155e7"},{"name":"public-dir-conflict-check","duration":84,"timestamp":175134759,"id":14,"parentId":1,"tags":{},"startTime":1773472418627,"traceId":"0c9131a559f155e7"},{"name":"generate-routes-manifest","duration":2158,"timestamp":175134896,"id":15,"parentId":1,"tags":{},"startTime":1773472418627,"traceId":"0c9131a559f155e7"},{"name":"run-turbopack","duration":6566364,"timestamp":175140133,"id":17,"parentId":1,"tags":{},"startTime":1773472418632,"traceId":"0c9131a559f155e7"},{"name":"run-typescript","duration":4606527,"timestamp":181711238,"id":19,"parentId":1,"tags":{},"startTime":1773472425203,"traceId":"0c9131a559f155e7"},{"name":"generate-required-server-files","duration":1250,"timestamp":186318198,"id":21,"parentId":1,"tags":{},"startTime":1773472429810,"traceId":"0c9131a559f155e7"},{"name":"check-static-error-page","duration":2982,"timestamp":186375232,"id":23,"parentId":22,"tags":{},"startTime":1773472429867,"traceId":"0c9131a559f155e7"},{"name":"is-page-static","duration":238245,"timestamp":186381556,"id":39,"parentId":25,"tags":{},"startTime":1773472429874,"traceId":"0c9131a559f155e7"},{"name":"check-page","duration":242750,"timestamp":186377152,"id":25,"parentId":22,"tags":{"page":"/_global-error"},"startTime":1773472429869,"traceId":"0c9131a559f155e7"},{"name":"is-page-static","duration":300218,"timestamp":186382088,"id":41,"parentId":27,"tags":{},"startTime":1773472429874,"traceId":"0c9131a559f155e7"},{"name":"check-page","duration":304968,"timestamp":186377383,"id":27,"parentId":22,"tags":{"page":"/api/opencode-config/status"},"startTime":1773472429870,"traceId":"0c9131a559f155e7"},{"name":"is-page-static","duration":302275,"timestamp":186382295,"id":42,"parentId":28,"tags":{},"startTime":1773472429875,"traceId":"0c9131a559f155e7"},{"name":"check-page","duration":307166,"timestamp":186377429,"id":28,"parentId":22,"tags":{"page":"/api/opencode-events"},"startTime":1773472429870,"traceId":"0c9131a559f155e7"},{"name":"is-page-static","duration":322578,"timestamp":186381951,"id":40,"parentId":26,"tags":{},"startTime":1773472429874,"traceId":"0c9131a559f155e7"},{"name":"check-page","duration":327240,"timestamp":186377320,"id":26,"parentId":22,"tags":{"page":"/api/opencode-config"},"startTime":1773472429870,"traceId":"0c9131a559f155e7"},{"name":"is-page-static","duration":328867,"timestamp":186382359,"id":43,"parentId":29,"tags":{},"startTime":1773472429875,"traceId":"0c9131a559f155e7"},{"name":"check-page","duration":333785,"timestamp":186377463,"id":29,"parentId":22,"tags":{"page":"/api/opencode-models"},"startTime":1773472429870,"traceId":"0c9131a559f155e7"},{"name":"is-page-static","duration":329437,"timestamp":186382539,"id":45,"parentId":31,"tags":{},"startTime":1773472429875,"traceId":"0c9131a559f155e7"},{"name":"check-page","duration":334499,"timestamp":186377542,"id":31,"parentId":22,"tags":{"page":"/api/profiles/[id]"},"startTime":1773472429870,"traceId":"0c9131a559f155e7"},{"name":"is-page-static","duration":335724,"timestamp":186382414,"id":44,"parentId":30,"tags":{},"startTime":1773472429875,"traceId":"0c9131a559f155e7"},{"name":"check-page","duration":340660,"timestamp":186377500,"id":30,"parentId":22,"tags":{"page":"/api/profiles/[id]/apply"},"startTime":1773472429870,"traceId":"0c9131a559f155e7"},{"name":"is-page-static","duration":342419,"timestamp":186382781,"id":48,"parentId":35,"tags":{},"startTime":1773472429875,"traceId":"0c9131a559f155e7"},{"name":"check-page","duration":347527,"timestamp":186377742,"id":35,"parentId":22,"tags":{"page":"/api/sessions/[id]"},"startTime":1773472429870,"traceId":"0c9131a559f155e7"},{"name":"is-page-static","duration":345250,"timestamp":186382590,"id":46,"parentId":33,"tags":{},"startTime":1773472429875,"traceId":"0c9131a559f155e7"},{"name":"check-page","duration":350225,"timestamp":186377644,"id":33,"parentId":22,"tags":{"page":"/api/sessions/[id]/archive"},"startTime":1773472429870,"traceId":"0c9131a559f155e7"},{"name":"is-page-static","duration":348217,"timestamp":186382851,"id":50,"parentId":32,"tags":{},"startTime":1773472429875,"traceId":"0c9131a559f155e7"},{"name":"check-page","duration":353500,"timestamp":186377591,"id":32,"parentId":22,"tags":{"page":"/api/profiles"},"startTime":1773472429870,"traceId":"0c9131a559f155e7"},{"name":"is-page-static","duration":352343,"timestamp":186382822,"id":49,"parentId":34,"tags":{},"startTime":1773472429875,"traceId":"0c9131a559f155e7"},{"name":"check-page","duration":357487,"timestamp":186377698,"id":34,"parentId":22,"tags":{"page":"/api/sessions/[id]/delete"},"startTime":1773472429870,"traceId":"0c9131a559f155e7"},{"name":"is-page-static","duration":353742,"timestamp":186382942,"id":51,"parentId":36,"tags":{},"startTime":1773472429875,"traceId":"0c9131a559f155e7"},{"name":"check-page","duration":358921,"timestamp":186377781,"id":36,"parentId":22,"tags":{"page":"/api/sessions"},"startTime":1773472429870,"traceId":"0c9131a559f155e7"},{"name":"is-page-static","duration":353723,"timestamp":186384255,"id":52,"parentId":37,"tags":{},"startTime":1773472429877,"traceId":"0c9131a559f155e7"},{"name":"check-page","duration":360209,"timestamp":186377821,"id":37,"parentId":22,"tags":{"page":"/favicon.ico"},"startTime":1773472429870,"traceId":"0c9131a559f155e7"},{"name":"is-page-static","duration":371033,"timestamp":186382727,"id":47,"parentId":24,"tags":{},"startTime":1773472429875,"traceId":"0c9131a559f155e7"},{"name":"check-page","duration":377672,"timestamp":186376117,"id":24,"parentId":22,"tags":{"page":"/_not-found"},"startTime":1773472429868,"traceId":"0c9131a559f155e7"},{"name":"is-page-static","duration":373945,"timestamp":186388817,"id":53,"parentId":38,"tags":{},"startTime":1773472429881,"traceId":"0c9131a559f155e7"},{"name":"check-page","duration":384914,"timestamp":186377864,"id":38,"parentId":22,"tags":{"page":"/"},"startTime":1773472429870,"traceId":"0c9131a559f155e7"},{"name":"static-check","duration":388259,"timestamp":186374545,"id":22,"parentId":1,"tags":{},"startTime":1773472429867,"traceId":"0c9131a559f155e7"},{"name":"write-routes-manifest","duration":283,"timestamp":186763388,"id":55,"parentId":1,"tags":{},"startTime":1773472430256,"traceId":"0c9131a559f155e7"},{"name":"load-dotenv","duration":27,"timestamp":186770865,"id":58,"parentId":57,"tags":{},"startTime":1773472430263,"traceId":"0c9131a559f155e7"},{"name":"run-export-path-map","duration":401,"timestamp":186772891,"id":59,"parentId":57,"tags":{},"startTime":1773472430265,"traceId":"0c9131a559f155e7"},{"name":"next-export","duration":180334,"timestamp":186769889,"id":57,"parentId":1,"tags":{},"startTime":1773472430262,"traceId":"0c9131a559f155e7"},{"name":"move-exported-app-not-found-","duration":443,"timestamp":186951744,"id":60,"parentId":56,"tags":{},"startTime":1773472430444,"traceId":"0c9131a559f155e7"},{"name":"move-exported-app-global-error-","duration":352,"timestamp":186952262,"id":61,"parentId":56,"tags":{},"startTime":1773472430445,"traceId":"0c9131a559f155e7"},{"name":"static-generation","duration":187534,"timestamp":186766349,"id":56,"parentId":1,"tags":{},"startTime":1773472430259,"traceId":"0c9131a559f155e7"},{"name":"write-routes-manifest","duration":265,"timestamp":186954077,"id":62,"parentId":1,"tags":{},"startTime":1773472430446,"traceId":"0c9131a559f155e7"},{"name":"write-standalone-directory","duration":204204,"timestamp":186958580,"id":64,"parentId":1,"tags":{},"startTime":1773472430451,"traceId":"0c9131a559f155e7"},{"name":"output-standalone","duration":204354,"timestamp":186958447,"id":63,"parentId":1,"tags":{},"startTime":1773472430451,"traceId":"0c9131a559f155e7"},{"name":"print-tree-view","duration":2194,"timestamp":187162918,"id":65,"parentId":1,"tags":{},"startTime":1773472430655,"traceId":"0c9131a559f155e7"},{"name":"telemetry-flush","duration":56,"timestamp":187165122,"id":66,"parentId":1,"tags":{},"startTime":1773472430657,"traceId":"0c9131a559f155e7"},{"name":"next-build","duration":12319419,"timestamp":174845770,"id":1,"tags":{"buildMode":"default","version":"16.1.6","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1773472418338,"traceId":"0c9131a559f155e7"}]
package/.next/trace-build CHANGED
@@ -1 +1 @@
1
- [{"name":"run-turbopack","duration":6228401,"timestamp":178161427,"id":17,"parentId":1,"tags":{},"startTime":1773061869565,"traceId":"7b26767ba8da19fb"},{"name":"run-typescript","duration":4354122,"timestamp":184401751,"id":19,"parentId":1,"tags":{},"startTime":1773061875805,"traceId":"7b26767ba8da19fb"},{"name":"static-check","duration":349946,"timestamp":188806515,"id":22,"parentId":1,"tags":{},"startTime":1773061880210,"traceId":"7b26767ba8da19fb"},{"name":"static-generation","duration":158817,"timestamp":189159508,"id":56,"parentId":1,"tags":{},"startTime":1773061880563,"traceId":"7b26767ba8da19fb"},{"name":"output-standalone","duration":214118,"timestamp":189322538,"id":63,"parentId":1,"tags":{},"startTime":1773061880726,"traceId":"7b26767ba8da19fb"},{"name":"telemetry-flush","duration":63,"timestamp":189538727,"id":66,"parentId":1,"tags":{},"startTime":1773061880942,"traceId":"7b26767ba8da19fb"},{"name":"next-build","duration":11648591,"timestamp":177890212,"id":1,"tags":{"buildMode":"default","version":"16.1.6","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1773061869294,"traceId":"7b26767ba8da19fb"}]
1
+ [{"name":"run-turbopack","duration":6566364,"timestamp":175140133,"id":17,"parentId":1,"tags":{},"startTime":1773472418632,"traceId":"0c9131a559f155e7"},{"name":"run-typescript","duration":4606527,"timestamp":181711238,"id":19,"parentId":1,"tags":{},"startTime":1773472425203,"traceId":"0c9131a559f155e7"},{"name":"static-check","duration":388259,"timestamp":186374545,"id":22,"parentId":1,"tags":{},"startTime":1773472429867,"traceId":"0c9131a559f155e7"},{"name":"static-generation","duration":187534,"timestamp":186766349,"id":56,"parentId":1,"tags":{},"startTime":1773472430259,"traceId":"0c9131a559f155e7"},{"name":"output-standalone","duration":204354,"timestamp":186958447,"id":63,"parentId":1,"tags":{},"startTime":1773472430451,"traceId":"0c9131a559f155e7"},{"name":"telemetry-flush","duration":56,"timestamp":187165122,"id":66,"parentId":1,"tags":{},"startTime":1773472430657,"traceId":"0c9131a559f155e7"},{"name":"next-build","duration":12319419,"timestamp":174845770,"id":1,"tags":{"buildMode":"default","version":"16.1.6","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1773472418338,"traceId":"0c9131a559f155e7"}]
package/README.md CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/vibepulse)](https://www.npmjs.com/package/vibepulse)
4
4
 
5
- Current version: **0.1.7**
6
-
7
5
  A tiny dashboard that sits in your browser tab — tired of switching IDE tabs just to check which OpenCode sessions finished.
8
6
 
9
7
  ![VibePulse README cover](./public/readme-cover.png)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibepulse",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "private": false,
5
5
  "description": "Real-time dashboard for monitoring and managing OpenCode sessions",
6
6
  "repository": {
@@ -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(e){return Array.from(new Set(e.filter(e=>Number.isInteger(e)&&e>0&&e<=65535))).sort((e,t)=>e-t)}function o(){let e=n([...function(){try{let e=(0,t.execSync)("lsof -nP -iTCP -sTCP:LISTEN",{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).split("\n"),r=[];for(let t of e){let e=t.trim();if(!e||e.startsWith("COMMAND"))continue;let n=e.split(/\s+/),o=n[0]?.toLowerCase();if("opencode"!==o)continue;let i=e.match(/:(\d+)\s+\(LISTEN\)/);if(!i)continue;let a=parseInt(i[1],10);Number.isFinite(a)&&r.push(a)}return r}catch{return[]}}(),...function(){try{return[...(0,t.execSync)("ps -axo command",{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).matchAll(/\bopencode\b[^\n]*\b--port(?:=|\s+)(\d+)\b/g)].map(e=>parseInt(e[1],10)).filter(e=>Number.isFinite(e))}catch{return[]}}()]);for(let t of e)r.add(t);return n([...e,...Array.from(r)])}function i(){let e=function(){try{let e=(0,t.execSync)("ps -axo pid=,command=",{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}),r=[];for(let t of e.split("\n")){let e=t.trim();if(!e)continue;let n=e.match(/^(\d+)\s+(.+)$/);if(!n)continue;let o=parseInt(n[1],10),i=n[2];Number.isFinite(o)&&/\bopencode\b/.test(i)&&(/\b--port(?:=|\s+)\d+\b/.test(i)||r.push(o))}return Array.from(new Set(r))}catch{return[]}}();if(!e.length)return[];let r=[],n=new Set;for(let o of e){let e=function(e){try{let r=(0,t.execSync)(`lsof -nP -a -p ${e} -d cwd -Fn`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).split("\n").find(e=>e.startsWith("n")&&e.length>1);if(!r)return null;return r.slice(1)}catch{return null}}(o);if(!e)continue;let i=`${o}:${e}`;n.has(i)||(n.add(i),r.push({pid:o,cwd:e}))}return r}e.s(["discoverOpencodePorts",()=>o,"discoverOpencodeProcessCwdsWithoutPort",()=>i])},12080,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),o=e.i(59756),i=e.i(61916),a=e.i(74677),s=e.i(69741),l=e.i(16795),d=e.i(87718),u=e.i(95169),c=e.i(47587),p=e.i(66012),h=e.i(70101),f=e.i(26937),x=e.i(10372),v=e.i(93695);e.i(52474);var g=e.i(220),m=e.i(99686);async function R(e,{params:t}){let{id:r}=await t,n=(0,m.discoverOpencodePorts)();if(!n.length)return Response.json({error:"OpenCode server not found"},{status:503});for(let e of n)try{let t=`http://localhost:${e}`,n=await fetch(`${t}/session/${r}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({time:{archived:Date.now()}})});if(n.ok)return Response.json({success:!0});console.error(`Failed to archive session on port ${e}:`,await n.text())}catch(t){console.error(`Failed to archive session on port ${e}:`,t)}return Response.json({error:"Session not found"},{status:404})}e.s(["POST",()=>R],844);var w=e.i(844);let y=new t.AppRouteRouteModule({definition:{kind:r.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:w}),{workAsyncStorage:C,workUnitAsyncStorage:E,serverHooks:b}=y;function A(){return(0,n.patchFetch)({workAsyncStorage:C,workUnitAsyncStorage:E})}async function P(e,t,n){y.isDev&&(0,o.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let m="/api/sessions/[id]/archive/route";m=m.replace(/\/index$/,"")||"/";let R=await y.prepare(e,t,{srcPage:m,multiZoneDraftMode:!1});if(!R)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:w,params:C,nextConfig:E,parsedUrl:b,isDraftMode:A,prerenderManifest:P,routerServerContext:S,isOnDemandRevalidate:N,revalidateOnlyGenerated:T,resolvedPathname:O,clientReferenceManifest:_,serverActionsManifest:I}=R,k=(0,s.normalizeAppPath)(m),q=!!(P.dynamicRoutes[k]||P.routes[O]),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(q&&!A){let e=!!P.routes[O],t=P.dynamicRoutes[k];if(t&&!1===t.fallback&&!e){if(E.experimental.adapterPath)return await j();throw new v.NoFallbackError}}let H=null;!q||y.isDev||A||(H="/index"===(H=O)?"/":H);let $=!0===y.isDev||!q,U=q&&!$;I&&_&&(0,a.setManifestsSingleton)({page:m,clientReferenceManifest:_,serverActionsManifest:I});let D=e.method||"GET",F=(0,i.getTracer)(),M=F.getActiveScopeSpan(),K={params:C,prerenderManifest:P,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:$,incrementalCache:(0,o.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:E.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,o)=>y.onRequestError(e,t,n,o,S)},sharedContext:{buildId:w}},L=new l.NodeNextRequest(e),B=new l.NodeNextResponse(t),W=d.NextRequestAdapter.fromNodeNextRequest(L,(0,d.signalFromNodeResponse)(t));try{let a=async e=>y.handle(W,K).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} ${m}`)}),s=!!(0,o.getRequestMeta)(e,"minimalMode"),l=async o=>{var i,l;let d=async({previousCacheEntry:r})=>{try{if(!s&&N&&T&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await a(o);e.fetchMetrics=K.renderOpts.fetchMetrics;let l=K.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let d=K.renderOpts.collectedTags;if(!q)return await (0,p.sendResponse)(L,B,i,K.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(i.headers);d&&(t[x.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=x.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,n=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=x.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 y.onRequestError(e,t,{routerKind:"App Router",routePath:m,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:N})},!1,S),t}},u=await y.handleResponse({req:e,nextConfig:E,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:P,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:T,responseGenerator:d,waitUntil:n.waitUntil,isMinimalMode:s});if(!q)return null;if((null==u||null==(i=u.value)?void 0:i.kind)!==g.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",N?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let v=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return s&&q||v.delete(x.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||v.get("Cache-Control")||v.set("Cache-Control",(0,f.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(L,B,new Response(u.value.body,{headers:v,status:u.value.status||200})),null};M?await l(M):await F.withPropagatedContext(e.headers,()=>F.trace(u.BaseServerSpan.handleRequest,{spanName:`${D} ${m}`,kind:i.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},l))}catch(t){if(t instanceof v.NoFallbackError||await y.onRequestError(e,t,{routerKind:"App Router",routePath:k,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:N})},!1,S),q)throw t;return await (0,p.sendResponse)(L,B,new Response(null,{status:500})),null}}e.s(["handler",()=>P,"patchFetch",()=>A,"routeModule",()=>y,"serverHooks",()=>b,"workAsyncStorage",()=>C,"workUnitAsyncStorage",()=>E],12080)}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__14df29b6._.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/lib/opencodeDiscovery.ts","../../../src/app/api/sessions/%5Bid%5D/archive/route.ts","../../../node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["import { execSync } from 'child_process';\n\nconst knownPorts = new Set<number>();\n\nexport type OpencodeProcessCwd = {\n pid: number;\n cwd: string;\n};\n\nfunction toUniqueSortedPorts(ports: number[]): number[] {\n return Array.from(\n new Set(ports.filter((port) => Number.isInteger(port) && port > 0 && port <= 65535))\n ).sort((a, b) => a - b);\n}\n\nfunction getPortsFromLsof(): number[] {\n try {\n const output = execSync('lsof -nP -iTCP -sTCP:LISTEN', {\n encoding: 'utf-8',\n stdio: ['ignore', 'pipe', 'ignore'],\n });\n const lines = output.split('\\n');\n const ports: number[] = [];\n\n for (const line of lines) {\n const trimmed = line.trim();\n if (!trimmed || trimmed.startsWith('COMMAND')) {\n continue;\n }\n\n const parts = trimmed.split(/\\s+/);\n const command = parts[0]?.toLowerCase();\n if (command !== 'opencode') {\n continue;\n }\n\n const match = trimmed.match(/:(\\d+)\\s+\\(LISTEN\\)/);\n if (!match) {\n continue;\n }\n\n const port = parseInt(match[1], 10);\n if (Number.isFinite(port)) {\n ports.push(port);\n }\n }\n\n return ports;\n } catch {\n return [];\n }\n}\n\nfunction getPortsFromProcessArgs(): number[] {\n try {\n const output = execSync('ps -axo command', {\n encoding: 'utf-8',\n stdio: ['ignore', 'pipe', 'ignore'],\n });\n const matches = [...output.matchAll(/\\bopencode\\b[^\\n]*\\b--port(?:=|\\s+)(\\d+)\\b/g)];\n return matches\n .map((match) => parseInt(match[1], 10))\n .filter((port) => Number.isFinite(port));\n } catch {\n return [];\n }\n}\n\nexport function discoverOpencodePorts(): number[] {\n const discoveredPorts = toUniqueSortedPorts([\n ...getPortsFromLsof(),\n ...getPortsFromProcessArgs(),\n ]);\n\n for (const port of discoveredPorts) {\n knownPorts.add(port);\n }\n\n return toUniqueSortedPorts([\n ...discoveredPorts,\n ...Array.from(knownPorts),\n ]);\n}\n\nfunction getOpencodePidsWithoutPortFlag(): number[] {\n try {\n const output = execSync('ps -axo pid=,command=', {\n encoding: 'utf-8',\n stdio: ['ignore', 'pipe', 'ignore'],\n });\n\n const pids: number[] = [];\n const lines = output.split('\\n');\n\n for (const line of lines) {\n const trimmed = line.trim();\n if (!trimmed) continue;\n\n const match = trimmed.match(/^(\\d+)\\s+(.+)$/);\n if (!match) continue;\n\n const pid = parseInt(match[1], 10);\n const command = match[2];\n\n if (!Number.isFinite(pid)) continue;\n if (!/\\bopencode\\b/.test(command)) continue;\n if (/\\b--port(?:=|\\s+)\\d+\\b/.test(command)) continue;\n\n pids.push(pid);\n }\n\n return Array.from(new Set(pids));\n } catch {\n return [];\n }\n}\n\nfunction getCwdForPid(pid: number): string | null {\n try {\n const output = execSync(`lsof -nP -a -p ${pid} -d cwd -Fn`, {\n encoding: 'utf-8',\n stdio: ['ignore', 'pipe', 'ignore'],\n });\n\n const cwdLine = output\n .split('\\n')\n .find((line) => line.startsWith('n') && line.length > 1);\n\n if (!cwdLine) return null;\n return cwdLine.slice(1);\n } catch {\n return null;\n }\n}\n\nexport function discoverOpencodeProcessCwdsWithoutPort(): OpencodeProcessCwd[] {\n const pids = getOpencodePidsWithoutPortFlag();\n if (!pids.length) return [];\n\n const processes: OpencodeProcessCwd[] = [];\n const seen = new Set<string>();\n\n for (const pid of pids) {\n const cwd = getCwdForPid(pid);\n if (!cwd) continue;\n\n const key = `${pid}:${cwd}`;\n if (seen.has(key)) continue;\n seen.add(key);\n processes.push({ pid, cwd });\n }\n\n return processes;\n}\n","import { discoverOpencodePorts } from '@/lib/opencodeDiscovery';\n\nexport async function POST(_: Request, { params }: { params: Promise<{ id: string }> }) {\n const { id: sessionId } = await params;\n const ports = discoverOpencodePorts();\n if (!ports.length) {\n return Response.json(\n { error: 'OpenCode server not found' },\n { status: 503 }\n );\n }\n for (const port of ports) {\n try {\n const baseUrl = `http://localhost:${port}`;\n const response = await fetch(`${baseUrl}/session/${sessionId}`, {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({ time: { archived: Date.now() } })\n });\n if (response.ok) {\n return Response.json({ success: true });\n }\n console.error(`Failed to archive session on port ${port}:`, await response.text());\n } catch (error) {\n console.error(`Failed to archive session on port ${port}:`, error);\n }\n }\n\n return Response.json(\n { error: 'Session not found' },\n { status: 404 }\n );\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"standalone\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/sessions/[id]/archive/route\",\n pathname: \"/api/sessions/[id]/archive\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/src/app/api/sessions/[id]/archive/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/sessions/[id]/archive/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.experimental.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":[],"mappings":"64BAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OAEA,IAAM,EAAa,IAAI,IAOvB,SAAS,EAAoB,CAAe,EAC1C,OAAO,MAAM,IAAI,CACf,IAAI,IAAI,EAAM,MAAM,CAAC,AAAC,GAAS,OAAO,SAAS,CAAC,IAAS,EAAO,GAAK,GAAQ,SAC7E,IAAI,CAAC,CAAC,EAAG,IAAM,EAAI,EACvB,CAuDO,SAAS,IACd,IAAM,EAAkB,EAAoB,IAtD9C,AAuDO,SAvDE,EACP,GAAI,CAKF,IAAM,EAAQ,AAJC,CAAA,EAAA,EAAA,QAAA,AAAQ,EAAC,8BAA+B,CACrD,SAAU,QACV,MAAO,CAAC,SAAU,OAAQ,SAAS,AACrC,GACqB,KAAK,CAAC,MACrB,EAAkB,EAAE,CAE1B,IAAK,IAAM,KAAQ,EAAO,CACxB,IAAM,EAAU,EAAK,IAAI,GACzB,GAAI,CAAC,GAAW,EAAQ,UAAU,CAAC,WACjC,CAD6C,QAI/C,IAAM,EAAQ,EAAQ,KAAK,CAAC,OACtB,EAAU,CAAK,CAAC,EAAE,EAAE,cAC1B,GAAgB,YAAY,CAAxB,EACF,SAGF,IAAM,EAAQ,EAAQ,KAAK,CAAC,uBAC5B,GAAI,CAAC,EACH,KADU,IAIZ,IAAM,EAAO,SAAS,CAA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AAE,IAAI,EAAO,KAAK,CAAC,EAAA,cAAc,CAAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GACvB,AAD0B,CAE9B,EAAG,GAEf,CAAE,MAAO,EAAK,CAeV,GAdM,aAAe,EAAA,eAAe,EAEhC,CAFmC,KAE7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAAG,AATgB,EASJ,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[2]}
@@ -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(e){return Array.from(new Set(e.filter(e=>Number.isInteger(e)&&e>0&&e<=65535))).sort((e,t)=>e-t)}function i(){let e=n([...function(){try{let e=(0,t.execSync)("lsof -nP -iTCP -sTCP:LISTEN",{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).split("\n"),r=[];for(let t of e){let e=t.trim();if(!e||e.startsWith("COMMAND"))continue;let n=e.split(/\s+/),i=n[0]?.toLowerCase();if("opencode"!==i)continue;let o=e.match(/:(\d+)\s+\(LISTEN\)/);if(!o)continue;let s=parseInt(o[1],10);Number.isFinite(s)&&r.push(s)}return r}catch{return[]}}(),...function(){try{return[...(0,t.execSync)("ps -axo command",{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).matchAll(/\bopencode\b[^\n]*\b--port(?:=|\s+)(\d+)\b/g)].map(e=>parseInt(e[1],10)).filter(e=>Number.isFinite(e))}catch{return[]}}()]);for(let t of e)r.add(t);return n([...e,...Array.from(r)])}function o(){let e=function(){try{let e=(0,t.execSync)("ps -axo pid=,command=",{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}),r=[];for(let t of e.split("\n")){let e=t.trim();if(!e)continue;let n=e.match(/^(\d+)\s+(.+)$/);if(!n)continue;let i=parseInt(n[1],10),o=n[2];Number.isFinite(i)&&/\bopencode\b/.test(o)&&(/\b--port(?:=|\s+)\d+\b/.test(o)||r.push(i))}return Array.from(new Set(r))}catch{return[]}}();if(!e.length)return[];let r=[],n=new Set;for(let i of e){let e=function(e){try{let r=(0,t.execSync)(`lsof -nP -a -p ${e} -d cwd -Fn`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).split("\n").find(e=>e.startsWith("n")&&e.length>1);if(!r)return null;return r.slice(1)}catch{return null}}(i);if(!e)continue;let o=`${i}:${e}`;n.has(o)||(n.add(o),r.push({pid:i,cwd:e}))}return r}e.s(["discoverOpencodePorts",()=>i,"discoverOpencodeProcessCwdsWithoutPort",()=>o])},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),o=e.i(89196);let s=(0,n.join)((0,i.homedir)(),".config","opencode"),c=(0,n.join)(s,"oh-my-opencode.jsonc");function a(e=c){try{return(0,r.existsSync)(e)}catch{return!1}}async function l(e=c){try{let r=await (0,t.readFile)(e,"utf-8");return(0,o.parse)(r,null,!1)}catch{return{}}}async function p(e,i=c){try{let s=(0,n.join)(i,"..");(0,r.existsSync)(s)||(0,r.mkdirSync)(s,{recursive:!0});let c=(0,o.stringify)(e,null,2);await (0,t.writeFile)(i,c,"utf-8")}catch(e){throw Error(`Failed to write config: ${e}`)}}e.s(["CONFIG_PATH",0,c,"detectConfig",()=>a,"readConfig",()=>l,"writeConfig",()=>p])}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__2eaddfa4._.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/lib/opencodeDiscovery.ts","../../../src/lib/opencodeConfig.ts"],"sourcesContent":["import { execSync } from 'child_process';\n\nconst knownPorts = new Set<number>();\n\nexport type OpencodeProcessCwd = {\n pid: number;\n cwd: string;\n};\n\nfunction toUniqueSortedPorts(ports: number[]): number[] {\n return Array.from(\n new Set(ports.filter((port) => Number.isInteger(port) && port > 0 && port <= 65535))\n ).sort((a, b) => a - b);\n}\n\nfunction getPortsFromLsof(): number[] {\n try {\n const output = execSync('lsof -nP -iTCP -sTCP:LISTEN', {\n encoding: 'utf-8',\n stdio: ['ignore', 'pipe', 'ignore'],\n });\n const lines = output.split('\\n');\n const ports: number[] = [];\n\n for (const line of lines) {\n const trimmed = line.trim();\n if (!trimmed || trimmed.startsWith('COMMAND')) {\n continue;\n }\n\n const parts = trimmed.split(/\\s+/);\n const command = parts[0]?.toLowerCase();\n if (command !== 'opencode') {\n continue;\n }\n\n const match = trimmed.match(/:(\\d+)\\s+\\(LISTEN\\)/);\n if (!match) {\n continue;\n }\n\n const port = parseInt(match[1], 10);\n if (Number.isFinite(port)) {\n ports.push(port);\n }\n }\n\n return ports;\n } catch {\n return [];\n }\n}\n\nfunction getPortsFromProcessArgs(): number[] {\n try {\n const output = execSync('ps -axo command', {\n encoding: 'utf-8',\n stdio: ['ignore', 'pipe', 'ignore'],\n });\n const matches = [...output.matchAll(/\\bopencode\\b[^\\n]*\\b--port(?:=|\\s+)(\\d+)\\b/g)];\n return matches\n .map((match) => parseInt(match[1], 10))\n .filter((port) => Number.isFinite(port));\n } catch {\n return [];\n }\n}\n\nexport function discoverOpencodePorts(): number[] {\n const discoveredPorts = toUniqueSortedPorts([\n ...getPortsFromLsof(),\n ...getPortsFromProcessArgs(),\n ]);\n\n for (const port of discoveredPorts) {\n knownPorts.add(port);\n }\n\n return toUniqueSortedPorts([\n ...discoveredPorts,\n ...Array.from(knownPorts),\n ]);\n}\n\nfunction getOpencodePidsWithoutPortFlag(): number[] {\n try {\n const output = execSync('ps -axo pid=,command=', {\n encoding: 'utf-8',\n stdio: ['ignore', 'pipe', 'ignore'],\n });\n\n const pids: number[] = [];\n const lines = output.split('\\n');\n\n for (const line of lines) {\n const trimmed = line.trim();\n if (!trimmed) continue;\n\n const match = trimmed.match(/^(\\d+)\\s+(.+)$/);\n if (!match) continue;\n\n const pid = parseInt(match[1], 10);\n const command = match[2];\n\n if (!Number.isFinite(pid)) continue;\n if (!/\\bopencode\\b/.test(command)) continue;\n if (/\\b--port(?:=|\\s+)\\d+\\b/.test(command)) continue;\n\n pids.push(pid);\n }\n\n return Array.from(new Set(pids));\n } catch {\n return [];\n }\n}\n\nfunction getCwdForPid(pid: number): string | null {\n try {\n const output = execSync(`lsof -nP -a -p ${pid} -d cwd -Fn`, {\n encoding: 'utf-8',\n stdio: ['ignore', 'pipe', 'ignore'],\n });\n\n const cwdLine = output\n .split('\\n')\n .find((line) => line.startsWith('n') && line.length > 1);\n\n if (!cwdLine) return null;\n return cwdLine.slice(1);\n } catch {\n return null;\n }\n}\n\nexport function discoverOpencodeProcessCwdsWithoutPort(): OpencodeProcessCwd[] {\n const pids = getOpencodePidsWithoutPortFlag();\n if (!pids.length) return [];\n\n const processes: OpencodeProcessCwd[] = [];\n const seen = new Set<string>();\n\n for (const pid of pids) {\n const cwd = getCwdForPid(pid);\n if (!cwd) continue;\n\n const key = `${pid}:${cwd}`;\n if (seen.has(key)) continue;\n seen.add(key);\n processes.push({ pid, cwd });\n }\n\n return processes;\n}\n","import { readFile, writeFile } from 'fs/promises';\nimport { existsSync, mkdirSync } from 'fs';\nimport { join } from 'path';\nimport { homedir } from 'os';\nimport { parse, stringify } from 'comment-json';\n\nexport const CONFIG_DIR = join(homedir(), '.config', 'opencode');\nexport const CONFIG_PATH = join(CONFIG_DIR, 'oh-my-opencode.jsonc');\n\nexport type OpenCodeConfig = {\n agents?: Record<string, unknown>;\n [key: string]: unknown;\n};\n\nexport function detectConfig(configPath: string = CONFIG_PATH): boolean {\n try {\n return existsSync(configPath);\n } catch {\n return false;\n }\n}\n\nexport async function readConfig(configPath: string = CONFIG_PATH): Promise<OpenCodeConfig> {\n try {\n const content = await readFile(configPath, 'utf-8');\n const config = parse(content, null, false) as OpenCodeConfig;\n return config;\n } catch {\n return {};\n }\n}\n\nexport async function writeConfig(\n config: OpenCodeConfig, \n configPath: string = CONFIG_PATH\n): Promise<void> {\n try {\n const configDir = join(configPath, '..');\n if (!existsSync(configDir)) {\n mkdirSync(configDir, { recursive: true });\n }\n\n const content = stringify(config, null, 2);\n await writeFile(configPath, content, 'utf-8');\n } catch (error) {\n throw new Error(`Failed to write config: ${error}`);\n }\n}\n"],"names":[],"mappings":"64BAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OAEA,IAAM,EAAa,IAAI,IAOvB,SAAS,EAAoB,CAAe,EAC1C,OAAO,MAAM,IAAI,CACf,IAAI,IAAI,EAAM,MAAM,CAAE,AAAD,GAAU,OAAO,SAAS,CAAC,IAAS,EAAO,GAAK,GAAQ,SAC7E,IAAI,CAAC,CAAC,EAAG,IAAM,EAAI,EACvB,CAuDO,SAAS,IACd,IAAM,EAAkB,EAAoB,IAtD9C,AAuDO,SAv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/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(e){return Array.from(new Set(e.filter(e=>Number.isInteger(e)&&e>0&&e<=65535))).sort((e,t)=>e-t)}function o(){let e=n([...function(){try{let e=(0,t.execSync)("lsof -nP -iTCP -sTCP:LISTEN",{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).split("\n"),r=[];for(let t of e){let e=t.trim();if(!e||e.startsWith("COMMAND"))continue;let n=e.split(/\s+/),o=n[0]?.toLowerCase();if("opencode"!==o)continue;let i=e.match(/:(\d+)\s+\(LISTEN\)/);if(!i)continue;let a=parseInt(i[1],10);Number.isFinite(a)&&r.push(a)}return r}catch{return[]}}(),...function(){try{return[...(0,t.execSync)("ps -axo command",{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).matchAll(/\bopencode\b[^\n]*\b--port(?:=|\s+)(\d+)\b/g)].map(e=>parseInt(e[1],10)).filter(e=>Number.isFinite(e))}catch{return[]}}()]);for(let t of e)r.add(t);return n([...e,...Array.from(r)])}function i(){let e=function(){try{let e=(0,t.execSync)("ps -axo pid=,command=",{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}),r=[];for(let t of e.split("\n")){let e=t.trim();if(!e)continue;let n=e.match(/^(\d+)\s+(.+)$/);if(!n)continue;let o=parseInt(n[1],10),i=n[2];Number.isFinite(o)&&/\bopencode\b/.test(i)&&(/\b--port(?:=|\s+)\d+\b/.test(i)||r.push(o))}return Array.from(new Set(r))}catch{return[]}}();if(!e.length)return[];let r=[],n=new Set;for(let o of e){let e=function(e){try{let r=(0,t.execSync)(`lsof -nP -a -p ${e} -d cwd -Fn`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).split("\n").find(e=>e.startsWith("n")&&e.length>1);if(!r)return null;return r.slice(1)}catch{return null}}(o);if(!e)continue;let i=`${o}:${e}`;n.has(i)||(n.add(i),r.push({pid:o,cwd:e}))}return r}e.s(["discoverOpencodePorts",()=>o,"discoverOpencodeProcessCwdsWithoutPort",()=>i])},21445,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),o=e.i(59756),i=e.i(61916),a=e.i(74677),s=e.i(69741),l=e.i(16795),d=e.i(87718),u=e.i(95169),c=e.i(47587),p=e.i(66012),h=e.i(70101),f=e.i(26937),x=e.i(10372),g=e.i(93695);e.i(52474);var R=e.i(220);e.i(39354);var m=e.i(34959),v=e.i(99686);async function w(e,{params:t}){let{id:r}=await t,n=(0,v.discoverOpencodePorts)();if(!n.length)return Response.json({error:"OpenCode server not found"},{status:503});for(let e of n)try{let t=(0,m.createOpencodeClient)({baseUrl:`http://localhost:${e}`});return await t.session.delete({path:{id:r}}),Response.json({success:!0})}catch{}return Response.json({error:"Session not found"},{status:404})}e.s(["POST",()=>w],45247);var y=e.i(45247);let E=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/sessions/[id]/delete/route",pathname:"/api/sessions/[id]/delete",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/sessions/[id]/delete/route.ts",nextConfigOutput:"standalone",userland:y}),{workAsyncStorage:C,workUnitAsyncStorage:b,serverHooks:A}=E;function P(){return(0,n.patchFetch)({workAsyncStorage:C,workUnitAsyncStorage:b})}async function S(e,t,n){E.isDev&&(0,o.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let m="/api/sessions/[id]/delete/route";m=m.replace(/\/index$/,"")||"/";let v=await E.prepare(e,t,{srcPage:m,multiZoneDraftMode:!1});if(!v)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:w,params:y,nextConfig:C,parsedUrl:b,isDraftMode:A,prerenderManifest:P,routerServerContext:S,isOnDemandRevalidate:N,revalidateOnlyGenerated:T,resolvedPathname:O,clientReferenceManifest:_,serverActionsManifest:I}=v,q=(0,s.normalizeAppPath)(m),k=!!(P.dynamicRoutes[q]||P.routes[O]),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(k&&!A){let e=!!P.routes[O],t=P.dynamicRoutes[q];if(t&&!1===t.fallback&&!e){if(C.experimental.adapterPath)return await j();throw new g.NoFallbackError}}let H=null;!k||E.isDev||A||(H="/index"===(H=O)?"/":H);let U=!0===E.isDev||!k,D=k&&!U;I&&_&&(0,a.setManifestsSingleton)({page:m,clientReferenceManifest:_,serverActionsManifest:I});let M=e.method||"GET",$=(0,i.getTracer)(),F=$.getActiveScopeSpan(),K={params:y,prerenderManifest:P,renderOpts:{experimental:{authInterrupts:!!C.experimental.authInterrupts},cacheComponents:!!C.cacheComponents,supportsDynamicResponse:U,incrementalCache:(0,o.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:C.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,o)=>E.onRequestError(e,t,n,o,S)},sharedContext:{buildId:w}},L=new l.NodeNextRequest(e),B=new l.NodeNextResponse(t),W=d.NextRequestAdapter.fromNodeNextRequest(L,(0,d.signalFromNodeResponse)(t));try{let a=async e=>E.handle(W,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")!==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=`${M} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${M} ${m}`)}),s=!!(0,o.getRequestMeta)(e,"minimalMode"),l=async o=>{var i,l;let d=async({previousCacheEntry:r})=>{try{if(!s&&N&&T&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await a(o);e.fetchMetrics=K.renderOpts.fetchMetrics;let l=K.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let d=K.renderOpts.collectedTags;if(!k)return await (0,p.sendResponse)(L,B,i,K.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(i.headers);d&&(t[x.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=x.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,n=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=x.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:R.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 E.onRequestError(e,t,{routerKind:"App Router",routePath:m,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:N})},!1,S),t}},u=await E.handleResponse({req:e,nextConfig:C,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:P,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:T,responseGenerator:d,waitUntil:n.waitUntil,isMinimalMode:s});if(!k)return null;if((null==u||null==(i=u.value)?void 0:i.kind)!==R.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",N?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let g=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return s&&k||g.delete(x.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||g.get("Cache-Control")||g.set("Cache-Control",(0,f.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(L,B,new Response(u.value.body,{headers:g,status:u.value.status||200})),null};F?await l(F):await $.withPropagatedContext(e.headers,()=>$.trace(u.BaseServerSpan.handleRequest,{spanName:`${M} ${m}`,kind:i.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},l))}catch(t){if(t instanceof g.NoFallbackError||await E.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:N})},!1,S),k)throw t;return await (0,p.sendResponse)(L,B,new Response(null,{status:500})),null}}e.s(["handler",()=>S,"patchFetch",()=>P,"routeModule",()=>E,"serverHooks",()=>A,"workAsyncStorage",()=>C,"workUnitAsyncStorage",()=>b],21445)}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__618c0ea7._.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/lib/opencodeDiscovery.ts","../../../node_modules/next/dist/esm/build/templates/app-route.js","../../../src/app/api/sessions/%5Bid%5D/delete/route.ts"],"sourcesContent":["import { execSync } from 'child_process';\n\nconst knownPorts = new Set<number>();\n\nexport type OpencodeProcessCwd = {\n pid: number;\n cwd: string;\n};\n\nfunction toUniqueSortedPorts(ports: number[]): number[] {\n return Array.from(\n new Set(ports.filter((port) => Number.isInteger(port) && port > 0 && port <= 65535))\n ).sort((a, b) => a - b);\n}\n\nfunction getPortsFromLsof(): number[] {\n try {\n const output = execSync('lsof -nP -iTCP -sTCP:LISTEN', {\n encoding: 'utf-8',\n stdio: ['ignore', 'pipe', 'ignore'],\n });\n const lines = output.split('\\n');\n const ports: number[] = [];\n\n for (const line of lines) {\n const trimmed = line.trim();\n if (!trimmed || trimmed.startsWith('COMMAND')) {\n continue;\n }\n\n const parts = trimmed.split(/\\s+/);\n const command = parts[0]?.toLowerCase();\n if (command !== 'opencode') {\n continue;\n }\n\n const match = trimmed.match(/:(\\d+)\\s+\\(LISTEN\\)/);\n if (!match) {\n continue;\n }\n\n const port = parseInt(match[1], 10);\n if (Number.isFinite(port)) {\n ports.push(port);\n }\n }\n\n return ports;\n } catch {\n return [];\n }\n}\n\nfunction getPortsFromProcessArgs(): number[] {\n try {\n const output = execSync('ps -axo command', {\n encoding: 'utf-8',\n stdio: ['ignore', 'pipe', 'ignore'],\n });\n const matches = [...output.matchAll(/\\bopencode\\b[^\\n]*\\b--port(?:=|\\s+)(\\d+)\\b/g)];\n return matches\n .map((match) => parseInt(match[1], 10))\n .filter((port) => Number.isFinite(port));\n } catch {\n return [];\n }\n}\n\nexport function discoverOpencodePorts(): number[] {\n const discoveredPorts = toUniqueSortedPorts([\n ...getPortsFromLsof(),\n ...getPortsFromProcessArgs(),\n ]);\n\n for (const port of discoveredPorts) {\n knownPorts.add(port);\n }\n\n return toUniqueSortedPorts([\n ...discoveredPorts,\n ...Array.from(knownPorts),\n ]);\n}\n\nfunction getOpencodePidsWithoutPortFlag(): number[] {\n try {\n const output = execSync('ps -axo pid=,command=', {\n encoding: 'utf-8',\n stdio: ['ignore', 'pipe', 'ignore'],\n });\n\n const pids: number[] = [];\n const lines = output.split('\\n');\n\n for (const line of lines) {\n const trimmed = line.trim();\n if (!trimmed) continue;\n\n const match = trimmed.match(/^(\\d+)\\s+(.+)$/);\n if (!match) continue;\n\n const pid = parseInt(match[1], 10);\n const command = match[2];\n\n if (!Number.isFinite(pid)) continue;\n if (!/\\bopencode\\b/.test(command)) continue;\n if (/\\b--port(?:=|\\s+)\\d+\\b/.test(command)) continue;\n\n pids.push(pid);\n }\n\n return Array.from(new Set(pids));\n } catch {\n return [];\n }\n}\n\nfunction getCwdForPid(pid: number): string | null {\n try {\n const output = execSync(`lsof -nP -a -p ${pid} -d cwd -Fn`, {\n encoding: 'utf-8',\n stdio: ['ignore', 'pipe', 'ignore'],\n });\n\n const cwdLine = output\n .split('\\n')\n .find((line) => line.startsWith('n') && line.length > 1);\n\n if (!cwdLine) return null;\n return cwdLine.slice(1);\n } catch {\n return null;\n }\n}\n\nexport function discoverOpencodeProcessCwdsWithoutPort(): OpencodeProcessCwd[] {\n const pids = getOpencodePidsWithoutPortFlag();\n if (!pids.length) return [];\n\n const processes: OpencodeProcessCwd[] = [];\n const seen = new Set<string>();\n\n for (const pid of pids) {\n const cwd = getCwdForPid(pid);\n if (!cwd) continue;\n\n const key = `${pid}:${cwd}`;\n if (seen.has(key)) continue;\n seen.add(key);\n processes.push({ pid, cwd });\n }\n\n return processes;\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"standalone\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/sessions/[id]/delete/route\",\n pathname: \"/api/sessions/[id]/delete\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/src/app/api/sessions/[id]/delete/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/sessions/[id]/delete/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.experimental.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n","import { createOpencodeClient } from '@opencode-ai/sdk';\nimport { discoverOpencodePorts } from '@/lib/opencodeDiscovery';\n\nexport async function POST(_: Request, { params }: { params: Promise<{ id: string }> }) {\n const { id: sessionId } = await params;\n const ports = discoverOpencodePorts();\n if (!ports.length) {\n return Response.json(\n { error: 'OpenCode server not found' },\n { status: 503 }\n );\n }\n for (const port of ports) {\n try {\n const client = createOpencodeClient({ baseUrl: `http://localhost:${port}` });\n await client.session.delete({ path: { id: sessionId } });\n return Response.json({ success: true });\n } catch {\n }\n }\n\n return Response.json(\n { error: 'Session not found' },\n { status: 404 }\n );\n}\n"],"names":[],"mappings":"64BAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OAEA,IAAM,EAAa,IAAI,IAOvB,SAAS,EAAoB,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.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(e){return Array.from(new Set(e.filter(e=>Number.isInteger(e)&&e>0&&e<=65535))).sort((e,t)=>e-t)}function o(){let e=n([...function(){try{let e=(0,t.execSync)("lsof -nP -iTCP -sTCP:LISTEN",{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).split("\n"),r=[];for(let t of e){let e=t.trim();if(!e||e.startsWith("COMMAND"))continue;let n=e.split(/\s+/),o=n[0]?.toLowerCase();if("opencode"!==o)continue;let i=e.match(/:(\d+)\s+\(LISTEN\)/);if(!i)continue;let a=parseInt(i[1],10);Number.isFinite(a)&&r.push(a)}return r}catch{return[]}}(),...function(){try{return[...(0,t.execSync)("ps -axo command",{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).matchAll(/\bopencode\b[^\n]*\b--port(?:=|\s+)(\d+)\b/g)].map(e=>parseInt(e[1],10)).filter(e=>Number.isFinite(e))}catch{return[]}}()]);for(let t of e)r.add(t);return n([...e,...Array.from(r)])}function i(){let e=function(){try{let e=(0,t.execSync)("ps -axo pid=,command=",{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}),r=[];for(let t of e.split("\n")){let e=t.trim();if(!e)continue;let n=e.match(/^(\d+)\s+(.+)$/);if(!n)continue;let o=parseInt(n[1],10),i=n[2];Number.isFinite(o)&&/\bopencode\b/.test(i)&&(/\b--port(?:=|\s+)\d+\b/.test(i)||r.push(o))}return Array.from(new Set(r))}catch{return[]}}();if(!e.length)return[];let r=[],n=new Set;for(let o of e){let e=function(e){try{let r=(0,t.execSync)(`lsof -nP -a -p ${e} -d cwd -Fn`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).split("\n").find(e=>e.startsWith("n")&&e.length>1);if(!r)return null;return r.slice(1)}catch{return null}}(o);if(!e)continue;let i=`${o}:${e}`;n.has(i)||(n.add(i),r.push({pid:o,cwd:e}))}return r}e.s(["discoverOpencodePorts",()=>o,"discoverOpencodeProcessCwdsWithoutPort",()=>i])},12080,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),o=e.i(59756),i=e.i(61916),a=e.i(74677),s=e.i(69741),l=e.i(16795),d=e.i(87718),u=e.i(95169),c=e.i(47587),p=e.i(66012),h=e.i(70101),f=e.i(26937),x=e.i(10372),v=e.i(93695);e.i(52474);var g=e.i(220),m=e.i(99686);async function R(e,{params:t}){let{id:r}=await t,n=(0,m.discoverOpencodePorts)();if(!n.length)return Response.json({error:"OpenCode server not found"},{status:503});for(let e of n)try{let t=`http://localhost:${e}`,n=await fetch(`${t}/session/${r}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({time:{archived:Date.now()}})});if(n.ok)return Response.json({success:!0});console.error(`Failed to archive session on port ${e}:`,await n.text())}catch(t){console.error(`Failed to archive session on port ${e}:`,t)}return Response.json({error:"Session not found"},{status:404})}e.s(["POST",()=>R],844);var w=e.i(844);let y=new t.AppRouteRouteModule({definition:{kind:r.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:w}),{workAsyncStorage:C,workUnitAsyncStorage:E,serverHooks:b}=y;function A(){return(0,n.patchFetch)({workAsyncStorage:C,workUnitAsyncStorage:E})}async function P(e,t,n){y.isDev&&(0,o.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let m="/api/sessions/[id]/archive/route";m=m.replace(/\/index$/,"")||"/";let R=await y.prepare(e,t,{srcPage:m,multiZoneDraftMode:!1});if(!R)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:w,params:C,nextConfig:E,parsedUrl:b,isDraftMode:A,prerenderManifest:P,routerServerContext:S,isOnDemandRevalidate:N,revalidateOnlyGenerated:T,resolvedPathname:O,clientReferenceManifest:_,serverActionsManifest:I}=R,k=(0,s.normalizeAppPath)(m),q=!!(P.dynamicRoutes[k]||P.routes[O]),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(q&&!A){let e=!!P.routes[O],t=P.dynamicRoutes[k];if(t&&!1===t.fallback&&!e){if(E.experimental.adapterPath)return await j();throw new v.NoFallbackError}}let H=null;!q||y.isDev||A||(H="/index"===(H=O)?"/":H);let $=!0===y.isDev||!q,U=q&&!$;I&&_&&(0,a.setManifestsSingleton)({page:m,clientReferenceManifest:_,serverActionsManifest:I});let D=e.method||"GET",F=(0,i.getTracer)(),M=F.getActiveScopeSpan(),K={params:C,prerenderManifest:P,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:$,incrementalCache:(0,o.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:E.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,o)=>y.onRequestError(e,t,n,o,S)},sharedContext:{buildId:w}},L=new l.NodeNextRequest(e),B=new l.NodeNextResponse(t),W=d.NextRequestAdapter.fromNodeNextRequest(L,(0,d.signalFromNodeResponse)(t));try{let a=async e=>y.handle(W,K).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} ${m}`)}),s=!!(0,o.getRequestMeta)(e,"minimalMode"),l=async o=>{var i,l;let d=async({previousCacheEntry:r})=>{try{if(!s&&N&&T&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await a(o);e.fetchMetrics=K.renderOpts.fetchMetrics;let l=K.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let d=K.renderOpts.collectedTags;if(!q)return await (0,p.sendResponse)(L,B,i,K.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(i.headers);d&&(t[x.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=x.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,n=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=x.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 y.onRequestError(e,t,{routerKind:"App Router",routePath:m,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:N})},!1,S),t}},u=await y.handleResponse({req:e,nextConfig:E,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:P,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:T,responseGenerator:d,waitUntil:n.waitUntil,isMinimalMode:s});if(!q)return null;if((null==u||null==(i=u.value)?void 0:i.kind)!==g.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",N?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let v=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return s&&q||v.delete(x.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||v.get("Cache-Control")||v.set("Cache-Control",(0,f.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(L,B,new Response(u.value.body,{headers:v,status:u.value.status||200})),null};M?await l(M):await F.withPropagatedContext(e.headers,()=>F.trace(u.BaseServerSpan.handleRequest,{spanName:`${D} ${m}`,kind:i.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},l))}catch(t){if(t instanceof v.NoFallbackError||await y.onRequestError(e,t,{routerKind:"App Router",routePath:k,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:N})},!1,S),q)throw t;return await (0,p.sendResponse)(L,B,new Response(null,{status:500})),null}}e.s(["handler",()=>P,"patchFetch",()=>A,"routeModule",()=>y,"serverHooks",()=>b,"workAsyncStorage",()=>C,"workUnitAsyncStorage",()=>E],12080)}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__14df29b6._.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(e){return Array.from(new Set(e.filter(e=>Number.isInteger(e)&&e>0&&e<=65535))).sort((e,t)=>e-t)}function i(){let e=n([...function(){try{let e=(0,t.execSync)("lsof -nP -iTCP -sTCP:LISTEN",{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).split("\n"),r=[];for(let t of e){let e=t.trim();if(!e||e.startsWith("COMMAND"))continue;let n=e.split(/\s+/),i=n[0]?.toLowerCase();if("opencode"!==i)continue;let o=e.match(/:(\d+)\s+\(LISTEN\)/);if(!o)continue;let s=parseInt(o[1],10);Number.isFinite(s)&&r.push(s)}return r}catch{return[]}}(),...function(){try{return[...(0,t.execSync)("ps -axo command",{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).matchAll(/\bopencode\b[^\n]*\b--port(?:=|\s+)(\d+)\b/g)].map(e=>parseInt(e[1],10)).filter(e=>Number.isFinite(e))}catch{return[]}}()]);for(let t of e)r.add(t);return n([...e,...Array.from(r)])}function o(){let e=function(){try{let e=(0,t.execSync)("ps -axo pid=,command=",{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}),r=[];for(let t of e.split("\n")){let e=t.trim();if(!e)continue;let n=e.match(/^(\d+)\s+(.+)$/);if(!n)continue;let i=parseInt(n[1],10),o=n[2];Number.isFinite(i)&&/\bopencode\b/.test(o)&&(/\b--port(?:=|\s+)\d+\b/.test(o)||r.push(i))}return Array.from(new Set(r))}catch{return[]}}();if(!e.length)return[];let r=[],n=new Set;for(let i of e){let e=function(e){try{let r=(0,t.execSync)(`lsof -nP -a -p ${e} -d cwd -Fn`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).split("\n").find(e=>e.startsWith("n")&&e.length>1);if(!r)return null;return r.slice(1)}catch{return null}}(i);if(!e)continue;let o=`${i}:${e}`;n.has(o)||(n.add(o),r.push({pid:i,cwd:e}))}return r}e.s(["discoverOpencodePorts",()=>i,"discoverOpencodeProcessCwdsWithoutPort",()=>o])},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),o=e.i(89196);let s=(0,n.join)((0,i.homedir)(),".config","opencode"),c=(0,n.join)(s,"oh-my-opencode.jsonc");function a(e=c){try{return(0,r.existsSync)(e)}catch{return!1}}async function l(e=c){try{let r=await (0,t.readFile)(e,"utf-8");return(0,o.parse)(r,null,!1)}catch{return{}}}async function p(e,i=c){try{let s=(0,n.join)(i,"..");(0,r.existsSync)(s)||(0,r.mkdirSync)(s,{recursive:!0});let c=(0,o.stringify)(e,null,2);await (0,t.writeFile)(i,c,"utf-8")}catch(e){throw Error(`Failed to write config: ${e}`)}}e.s(["CONFIG_PATH",0,c,"detectConfig",()=>a,"readConfig",()=>l,"writeConfig",()=>p])}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__2eaddfa4._.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(e){return Array.from(new Set(e.filter(e=>Number.isInteger(e)&&e>0&&e<=65535))).sort((e,t)=>e-t)}function o(){let e=n([...function(){try{let e=(0,t.execSync)("lsof -nP -iTCP -sTCP:LISTEN",{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).split("\n"),r=[];for(let t of e){let e=t.trim();if(!e||e.startsWith("COMMAND"))continue;let n=e.split(/\s+/),o=n[0]?.toLowerCase();if("opencode"!==o)continue;let i=e.match(/:(\d+)\s+\(LISTEN\)/);if(!i)continue;let a=parseInt(i[1],10);Number.isFinite(a)&&r.push(a)}return r}catch{return[]}}(),...function(){try{return[...(0,t.execSync)("ps -axo command",{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).matchAll(/\bopencode\b[^\n]*\b--port(?:=|\s+)(\d+)\b/g)].map(e=>parseInt(e[1],10)).filter(e=>Number.isFinite(e))}catch{return[]}}()]);for(let t of e)r.add(t);return n([...e,...Array.from(r)])}function i(){let e=function(){try{let e=(0,t.execSync)("ps -axo pid=,command=",{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}),r=[];for(let t of e.split("\n")){let e=t.trim();if(!e)continue;let n=e.match(/^(\d+)\s+(.+)$/);if(!n)continue;let o=parseInt(n[1],10),i=n[2];Number.isFinite(o)&&/\bopencode\b/.test(i)&&(/\b--port(?:=|\s+)\d+\b/.test(i)||r.push(o))}return Array.from(new Set(r))}catch{return[]}}();if(!e.length)return[];let r=[],n=new Set;for(let o of e){let e=function(e){try{let r=(0,t.execSync)(`lsof -nP -a -p ${e} -d cwd -Fn`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).split("\n").find(e=>e.startsWith("n")&&e.length>1);if(!r)return null;return r.slice(1)}catch{return null}}(o);if(!e)continue;let i=`${o}:${e}`;n.has(i)||(n.add(i),r.push({pid:o,cwd:e}))}return r}e.s(["discoverOpencodePorts",()=>o,"discoverOpencodeProcessCwdsWithoutPort",()=>i])},21445,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),o=e.i(59756),i=e.i(61916),a=e.i(74677),s=e.i(69741),l=e.i(16795),d=e.i(87718),u=e.i(95169),c=e.i(47587),p=e.i(66012),h=e.i(70101),f=e.i(26937),x=e.i(10372),g=e.i(93695);e.i(52474);var R=e.i(220);e.i(39354);var m=e.i(34959),v=e.i(99686);async function w(e,{params:t}){let{id:r}=await t,n=(0,v.discoverOpencodePorts)();if(!n.length)return Response.json({error:"OpenCode server not found"},{status:503});for(let e of n)try{let t=(0,m.createOpencodeClient)({baseUrl:`http://localhost:${e}`});return await t.session.delete({path:{id:r}}),Response.json({success:!0})}catch{}return Response.json({error:"Session not found"},{status:404})}e.s(["POST",()=>w],45247);var y=e.i(45247);let E=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/sessions/[id]/delete/route",pathname:"/api/sessions/[id]/delete",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/sessions/[id]/delete/route.ts",nextConfigOutput:"standalone",userland:y}),{workAsyncStorage:C,workUnitAsyncStorage:b,serverHooks:A}=E;function P(){return(0,n.patchFetch)({workAsyncStorage:C,workUnitAsyncStorage:b})}async function S(e,t,n){E.isDev&&(0,o.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let m="/api/sessions/[id]/delete/route";m=m.replace(/\/index$/,"")||"/";let v=await E.prepare(e,t,{srcPage:m,multiZoneDraftMode:!1});if(!v)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:w,params:y,nextConfig:C,parsedUrl:b,isDraftMode:A,prerenderManifest:P,routerServerContext:S,isOnDemandRevalidate:N,revalidateOnlyGenerated:T,resolvedPathname:O,clientReferenceManifest:_,serverActionsManifest:I}=v,q=(0,s.normalizeAppPath)(m),k=!!(P.dynamicRoutes[q]||P.routes[O]),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(k&&!A){let e=!!P.routes[O],t=P.dynamicRoutes[q];if(t&&!1===t.fallback&&!e){if(C.experimental.adapterPath)return await j();throw new g.NoFallbackError}}let H=null;!k||E.isDev||A||(H="/index"===(H=O)?"/":H);let U=!0===E.isDev||!k,D=k&&!U;I&&_&&(0,a.setManifestsSingleton)({page:m,clientReferenceManifest:_,serverActionsManifest:I});let M=e.method||"GET",$=(0,i.getTracer)(),F=$.getActiveScopeSpan(),K={params:y,prerenderManifest:P,renderOpts:{experimental:{authInterrupts:!!C.experimental.authInterrupts},cacheComponents:!!C.cacheComponents,supportsDynamicResponse:U,incrementalCache:(0,o.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:C.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,o)=>E.onRequestError(e,t,n,o,S)},sharedContext:{buildId:w}},L=new l.NodeNextRequest(e),B=new l.NodeNextResponse(t),W=d.NextRequestAdapter.fromNodeNextRequest(L,(0,d.signalFromNodeResponse)(t));try{let a=async e=>E.handle(W,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")!==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=`${M} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${M} ${m}`)}),s=!!(0,o.getRequestMeta)(e,"minimalMode"),l=async o=>{var i,l;let d=async({previousCacheEntry:r})=>{try{if(!s&&N&&T&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await a(o);e.fetchMetrics=K.renderOpts.fetchMetrics;let l=K.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let d=K.renderOpts.collectedTags;if(!k)return await (0,p.sendResponse)(L,B,i,K.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(i.headers);d&&(t[x.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=x.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,n=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=x.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:R.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 E.onRequestError(e,t,{routerKind:"App Router",routePath:m,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:N})},!1,S),t}},u=await E.handleResponse({req:e,nextConfig:C,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:P,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:T,responseGenerator:d,waitUntil:n.waitUntil,isMinimalMode:s});if(!k)return null;if((null==u||null==(i=u.value)?void 0:i.kind)!==R.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",N?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let g=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return s&&k||g.delete(x.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||g.get("Cache-Control")||g.set("Cache-Control",(0,f.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(L,B,new Response(u.value.body,{headers:g,status:u.value.status||200})),null};F?await l(F):await $.withPropagatedContext(e.headers,()=>$.trace(u.BaseServerSpan.handleRequest,{spanName:`${M} ${m}`,kind:i.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},l))}catch(t){if(t instanceof g.NoFallbackError||await E.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:N})},!1,S),k)throw t;return await (0,p.sendResponse)(L,B,new Response(null,{status:500})),null}}e.s(["handler",()=>S,"patchFetch",()=>P,"routeModule",()=>E,"serverHooks",()=>A,"workAsyncStorage",()=>C,"workUnitAsyncStorage",()=>b],21445)}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__618c0ea7._.js.map