@seqyuan/annovibe 0.8.87 → 0.8.88

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 (248) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +12 -10
  3. package/.next/build-manifest.json +2 -2
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/required-server-files.js +1 -1
  6. package/.next/required-server-files.json +1 -1
  7. package/.next/routes-manifest.json +16 -0
  8. package/.next/server/app/_global-error/page.js +3 -3
  9. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  10. package/.next/server/app/_global-error.html +1 -1
  11. package/.next/server/app/_global-error.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  16. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  17. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  18. package/.next/server/app/_not-found/page.js +2 -2
  19. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  20. package/.next/server/app/_not-found.html +1 -1
  21. package/.next/server/app/_not-found.rsc +1 -1
  22. package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  23. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  24. package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  25. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  26. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  27. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  28. package/.next/server/app/api/agent/[id]/events/route.js +2 -2
  29. package/.next/server/app/api/agent/[id]/route.js +1 -1
  30. package/.next/server/app/api/agent/new/route.js +1 -1
  31. package/.next/server/app/api/agent/runtime/route.js +1 -1
  32. package/.next/server/app/api/apps/[id]/[[...path]]/route.js +2 -2
  33. package/.next/server/app/api/apps/route.js +2 -2
  34. package/.next/server/app/api/auth/all-providers/route.js +1 -1
  35. package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
  36. package/.next/server/app/api/auth/login/[provider]/route.js +2 -2
  37. package/.next/server/app/api/auth/login/route.js +1 -1
  38. package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
  39. package/.next/server/app/api/auth/providers/route.js +1 -1
  40. package/.next/server/app/api/auth/status/route.js +1 -1
  41. package/.next/server/app/api/auth/totp/route.js +1 -1
  42. package/.next/server/app/api/default-cwd/route.js +1 -1
  43. package/.next/server/app/api/files/[...path]/route.js +1 -1
  44. package/.next/server/app/api/harness/route.js +1 -1
  45. package/.next/server/app/api/home/route.js +1 -1
  46. package/.next/server/app/api/im/cancel/route.js +1 -1
  47. package/.next/server/app/api/im/gateway-status/route.js +2 -2
  48. package/.next/server/app/api/im/gateway-token/route.js +1 -1
  49. package/.next/server/app/api/im/project/route.js +1 -1
  50. package/.next/server/app/api/im/projects/route.js +2 -2
  51. package/.next/server/app/api/im/session-ids/route.js +1 -1
  52. package/.next/server/app/api/im/turn/route.js +2 -2
  53. package/.next/server/app/api/images/upload/route.js +1 -1
  54. package/.next/server/app/api/internal/runtime/route.js +1 -1
  55. package/.next/server/app/api/memory/dismiss/route.js +2 -2
  56. package/.next/server/app/api/memory/promote/route.js +2 -2
  57. package/.next/server/app/api/models/route.js +1 -1
  58. package/.next/server/app/api/models-config/discover/route.js +1 -1
  59. package/.next/server/app/api/models-config/route.js +1 -1
  60. package/.next/server/app/api/models-config/test/route.js +1 -1
  61. package/.next/server/app/api/plot-kernels/route.js +1 -1
  62. package/.next/server/app/api/plot-kernels/save/route.js +1 -1
  63. package/.next/server/app/api/plot-kernels/status/route.js +1 -1
  64. package/.next/server/app/api/plot-kernels/stop/route.js +1 -1
  65. package/.next/server/app/api/projects/browse/route.js +1 -1
  66. package/.next/server/app/api/projects/route.js +2 -2
  67. package/.next/server/app/api/search/route.js +1 -1
  68. package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
  69. package/.next/server/app/api/sessions/[id]/kernel-state/route.js +1 -1
  70. package/.next/server/app/api/sessions/[id]/plan/route.js +2 -2
  71. package/.next/server/app/api/sessions/[id]/route.js +1 -1
  72. package/.next/server/app/api/sessions/[id]/workbench-artifact/route.js +1 -0
  73. package/.next/server/app/api/sessions/[id]/workbench-artifact/route_client-reference-manifest.js +1 -0
  74. package/.next/server/app/api/sessions/[id]/workbench-review/route.js +1 -0
  75. package/.next/server/app/api/sessions/[id]/workbench-review/route_client-reference-manifest.js +1 -0
  76. package/.next/server/app/api/sessions/new/route.js +1 -1
  77. package/.next/server/app/api/sessions/route.js +2 -2
  78. package/.next/server/app/api/settings/route.js +1 -1
  79. package/.next/server/app/api/skills/install/route.js +2 -2
  80. package/.next/server/app/api/skills/route.js +2 -2
  81. package/.next/server/app/api/skills/search/route.js +1 -1
  82. package/.next/server/app/api/soul/route.js +1 -1
  83. package/.next/server/app/api/subagents/status/route.js +1 -1
  84. package/.next/server/app/api/version/route.js +1 -1
  85. package/.next/server/app/favicon.ico/route.js +1 -1
  86. package/.next/server/app/icon.svg/route.js +1 -1
  87. package/.next/server/app/index.html +1 -1
  88. package/.next/server/app/index.rsc +2 -2
  89. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  90. package/.next/server/app/index.segments/_full.segment.rsc +2 -2
  91. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  92. package/.next/server/app/index.segments/_index.segment.rsc +1 -1
  93. package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  94. package/.next/server/app/login/page.js +2 -2
  95. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  96. package/.next/server/app/login.html +1 -1
  97. package/.next/server/app/login.rsc +1 -1
  98. package/.next/server/app/login.segments/_full.segment.rsc +1 -1
  99. package/.next/server/app/login.segments/_head.segment.rsc +1 -1
  100. package/.next/server/app/login.segments/_index.segment.rsc +1 -1
  101. package/.next/server/app/login.segments/_tree.segment.rsc +1 -1
  102. package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
  103. package/.next/server/app/login.segments/login.segment.rsc +1 -1
  104. package/.next/server/app/page.js +24 -6
  105. package/.next/server/app/page_client-reference-manifest.js +1 -1
  106. package/.next/server/app/smoke/page.js +3 -3
  107. package/.next/server/app/smoke/page_client-reference-manifest.js +1 -1
  108. package/.next/server/app/smoke.html +2 -2
  109. package/.next/server/app/smoke.rsc +2 -2
  110. package/.next/server/app/smoke.segments/_full.segment.rsc +2 -2
  111. package/.next/server/app/smoke.segments/_head.segment.rsc +1 -1
  112. package/.next/server/app/smoke.segments/_index.segment.rsc +1 -1
  113. package/.next/server/app/smoke.segments/_tree.segment.rsc +1 -1
  114. package/.next/server/app/smoke.segments/smoke/__PAGE__.segment.rsc +2 -2
  115. package/.next/server/app/smoke.segments/smoke.segment.rsc +1 -1
  116. package/.next/server/app-paths-manifest.json +12 -10
  117. package/.next/server/chunks/1494.js +1 -1
  118. package/.next/server/chunks/7914.js +1 -1
  119. package/.next/server/middleware-build-manifest.js +1 -1
  120. package/.next/server/pages/404.html +1 -1
  121. package/.next/server/pages/500.html +1 -1
  122. package/.next/server/server-reference-manifest.json +1 -1
  123. package/.next/static/chunks/9901-e83ccdcdba85df74.js +281 -0
  124. package/.next/static/chunks/app/_global-error/page-8ad668871a6e9fed.js +1 -0
  125. package/.next/static/chunks/app/api/agent/[id]/events/route-8ad668871a6e9fed.js +1 -0
  126. package/.next/static/chunks/app/api/agent/[id]/route-8ad668871a6e9fed.js +1 -0
  127. package/.next/static/chunks/app/api/agent/new/route-8ad668871a6e9fed.js +1 -0
  128. package/.next/static/chunks/app/api/agent/runtime/route-8ad668871a6e9fed.js +1 -0
  129. package/.next/static/chunks/app/api/apps/[id]/[[...path]]/route-8ad668871a6e9fed.js +1 -0
  130. package/.next/static/chunks/app/api/apps/route-8ad668871a6e9fed.js +1 -0
  131. package/.next/static/chunks/app/api/auth/all-providers/route-8ad668871a6e9fed.js +1 -0
  132. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-8ad668871a6e9fed.js +1 -0
  133. package/.next/static/chunks/app/api/auth/login/[provider]/route-8ad668871a6e9fed.js +1 -0
  134. package/.next/static/chunks/app/api/auth/login/route-8ad668871a6e9fed.js +1 -0
  135. package/.next/static/chunks/app/api/auth/logout/[provider]/route-8ad668871a6e9fed.js +1 -0
  136. package/.next/static/chunks/app/api/auth/providers/route-8ad668871a6e9fed.js +1 -0
  137. package/.next/static/chunks/app/api/auth/status/route-8ad668871a6e9fed.js +1 -0
  138. package/.next/static/chunks/app/api/auth/totp/route-8ad668871a6e9fed.js +1 -0
  139. package/.next/static/chunks/app/api/default-cwd/route-8ad668871a6e9fed.js +1 -0
  140. package/.next/static/chunks/app/api/files/[...path]/route-8ad668871a6e9fed.js +1 -0
  141. package/.next/static/chunks/app/api/harness/route-8ad668871a6e9fed.js +1 -0
  142. package/.next/static/chunks/app/api/home/route-8ad668871a6e9fed.js +1 -0
  143. package/.next/static/chunks/app/api/im/cancel/route-8ad668871a6e9fed.js +1 -0
  144. package/.next/static/chunks/app/api/im/gateway-status/route-8ad668871a6e9fed.js +1 -0
  145. package/.next/static/chunks/app/api/im/gateway-token/route-8ad668871a6e9fed.js +1 -0
  146. package/.next/static/chunks/app/api/im/project/route-8ad668871a6e9fed.js +1 -0
  147. package/.next/static/chunks/app/api/im/projects/route-8ad668871a6e9fed.js +1 -0
  148. package/.next/static/chunks/app/api/im/session-ids/route-8ad668871a6e9fed.js +1 -0
  149. package/.next/static/chunks/app/api/im/turn/route-8ad668871a6e9fed.js +1 -0
  150. package/.next/static/chunks/app/api/images/upload/route-8ad668871a6e9fed.js +1 -0
  151. package/.next/static/chunks/app/api/internal/runtime/route-8ad668871a6e9fed.js +1 -0
  152. package/.next/static/chunks/app/api/memory/dismiss/route-8ad668871a6e9fed.js +1 -0
  153. package/.next/static/chunks/app/api/memory/promote/route-8ad668871a6e9fed.js +1 -0
  154. package/.next/static/chunks/app/api/models/route-8ad668871a6e9fed.js +1 -0
  155. package/.next/static/chunks/app/api/models-config/discover/route-8ad668871a6e9fed.js +1 -0
  156. package/.next/static/chunks/app/api/models-config/route-8ad668871a6e9fed.js +1 -0
  157. package/.next/static/chunks/app/api/models-config/test/route-8ad668871a6e9fed.js +1 -0
  158. package/.next/static/chunks/app/api/plot-kernels/route-8ad668871a6e9fed.js +1 -0
  159. package/.next/static/chunks/app/api/plot-kernels/save/route-8ad668871a6e9fed.js +1 -0
  160. package/.next/static/chunks/app/api/plot-kernels/status/route-8ad668871a6e9fed.js +1 -0
  161. package/.next/static/chunks/app/api/plot-kernels/stop/route-8ad668871a6e9fed.js +1 -0
  162. package/.next/static/chunks/app/api/projects/browse/route-8ad668871a6e9fed.js +1 -0
  163. package/.next/static/chunks/app/api/projects/route-8ad668871a6e9fed.js +1 -0
  164. package/.next/static/chunks/app/api/search/route-8ad668871a6e9fed.js +1 -0
  165. package/.next/static/chunks/app/api/sessions/[id]/context/route-8ad668871a6e9fed.js +1 -0
  166. package/.next/static/chunks/app/api/sessions/[id]/kernel-state/route-8ad668871a6e9fed.js +1 -0
  167. package/.next/static/chunks/app/api/sessions/[id]/plan/route-8ad668871a6e9fed.js +1 -0
  168. package/.next/static/chunks/app/api/sessions/[id]/route-8ad668871a6e9fed.js +1 -0
  169. package/.next/static/chunks/app/api/sessions/[id]/workbench-artifact/route-8ad668871a6e9fed.js +1 -0
  170. package/.next/static/chunks/app/api/sessions/[id]/workbench-review/route-8ad668871a6e9fed.js +1 -0
  171. package/.next/static/chunks/app/api/sessions/new/route-8ad668871a6e9fed.js +1 -0
  172. package/.next/static/chunks/app/api/sessions/route-8ad668871a6e9fed.js +1 -0
  173. package/.next/static/chunks/app/api/settings/route-8ad668871a6e9fed.js +1 -0
  174. package/.next/static/chunks/app/api/skills/install/route-8ad668871a6e9fed.js +1 -0
  175. package/.next/static/chunks/app/api/skills/route-8ad668871a6e9fed.js +1 -0
  176. package/.next/static/chunks/app/api/skills/search/route-8ad668871a6e9fed.js +1 -0
  177. package/.next/static/chunks/app/api/soul/route-8ad668871a6e9fed.js +1 -0
  178. package/.next/static/chunks/app/api/subagents/status/route-8ad668871a6e9fed.js +1 -0
  179. package/.next/static/chunks/app/api/version/route-8ad668871a6e9fed.js +1 -0
  180. package/.next/static/chunks/app/favicon.ico/route-8ad668871a6e9fed.js +1 -0
  181. package/.next/static/chunks/app/{page-e922626375cd59b0.js → page-b1b1a279b17fbcf6.js} +27 -9
  182. package/.next/static/chunks/next/dist/client/components/builtin/app-error-8ad668871a6e9fed.js +1 -0
  183. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-8ad668871a6e9fed.js +1 -0
  184. package/.next/static/chunks/next/dist/client/components/builtin/not-found-8ad668871a6e9fed.js +1 -0
  185. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-8ad668871a6e9fed.js +1 -0
  186. package/package.json +1 -1
  187. package/.next/static/chunks/9901-eb16ea7a0737ac0d.js +0 -281
  188. package/.next/static/chunks/app/_global-error/page-5a6ec8da473b874d.js +0 -1
  189. package/.next/static/chunks/app/api/agent/[id]/events/route-5a6ec8da473b874d.js +0 -1
  190. package/.next/static/chunks/app/api/agent/[id]/route-5a6ec8da473b874d.js +0 -1
  191. package/.next/static/chunks/app/api/agent/new/route-5a6ec8da473b874d.js +0 -1
  192. package/.next/static/chunks/app/api/agent/runtime/route-5a6ec8da473b874d.js +0 -1
  193. package/.next/static/chunks/app/api/apps/[id]/[[...path]]/route-5a6ec8da473b874d.js +0 -1
  194. package/.next/static/chunks/app/api/apps/route-5a6ec8da473b874d.js +0 -1
  195. package/.next/static/chunks/app/api/auth/all-providers/route-5a6ec8da473b874d.js +0 -1
  196. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-5a6ec8da473b874d.js +0 -1
  197. package/.next/static/chunks/app/api/auth/login/[provider]/route-5a6ec8da473b874d.js +0 -1
  198. package/.next/static/chunks/app/api/auth/login/route-5a6ec8da473b874d.js +0 -1
  199. package/.next/static/chunks/app/api/auth/logout/[provider]/route-5a6ec8da473b874d.js +0 -1
  200. package/.next/static/chunks/app/api/auth/providers/route-5a6ec8da473b874d.js +0 -1
  201. package/.next/static/chunks/app/api/auth/status/route-5a6ec8da473b874d.js +0 -1
  202. package/.next/static/chunks/app/api/auth/totp/route-5a6ec8da473b874d.js +0 -1
  203. package/.next/static/chunks/app/api/default-cwd/route-5a6ec8da473b874d.js +0 -1
  204. package/.next/static/chunks/app/api/files/[...path]/route-5a6ec8da473b874d.js +0 -1
  205. package/.next/static/chunks/app/api/harness/route-5a6ec8da473b874d.js +0 -1
  206. package/.next/static/chunks/app/api/home/route-5a6ec8da473b874d.js +0 -1
  207. package/.next/static/chunks/app/api/im/cancel/route-5a6ec8da473b874d.js +0 -1
  208. package/.next/static/chunks/app/api/im/gateway-status/route-5a6ec8da473b874d.js +0 -1
  209. package/.next/static/chunks/app/api/im/gateway-token/route-5a6ec8da473b874d.js +0 -1
  210. package/.next/static/chunks/app/api/im/project/route-5a6ec8da473b874d.js +0 -1
  211. package/.next/static/chunks/app/api/im/projects/route-5a6ec8da473b874d.js +0 -1
  212. package/.next/static/chunks/app/api/im/session-ids/route-5a6ec8da473b874d.js +0 -1
  213. package/.next/static/chunks/app/api/im/turn/route-5a6ec8da473b874d.js +0 -1
  214. package/.next/static/chunks/app/api/images/upload/route-5a6ec8da473b874d.js +0 -1
  215. package/.next/static/chunks/app/api/internal/runtime/route-5a6ec8da473b874d.js +0 -1
  216. package/.next/static/chunks/app/api/memory/dismiss/route-5a6ec8da473b874d.js +0 -1
  217. package/.next/static/chunks/app/api/memory/promote/route-5a6ec8da473b874d.js +0 -1
  218. package/.next/static/chunks/app/api/models/route-5a6ec8da473b874d.js +0 -1
  219. package/.next/static/chunks/app/api/models-config/discover/route-5a6ec8da473b874d.js +0 -1
  220. package/.next/static/chunks/app/api/models-config/route-5a6ec8da473b874d.js +0 -1
  221. package/.next/static/chunks/app/api/models-config/test/route-5a6ec8da473b874d.js +0 -1
  222. package/.next/static/chunks/app/api/plot-kernels/route-5a6ec8da473b874d.js +0 -1
  223. package/.next/static/chunks/app/api/plot-kernels/save/route-5a6ec8da473b874d.js +0 -1
  224. package/.next/static/chunks/app/api/plot-kernels/status/route-5a6ec8da473b874d.js +0 -1
  225. package/.next/static/chunks/app/api/plot-kernels/stop/route-5a6ec8da473b874d.js +0 -1
  226. package/.next/static/chunks/app/api/projects/browse/route-5a6ec8da473b874d.js +0 -1
  227. package/.next/static/chunks/app/api/projects/route-5a6ec8da473b874d.js +0 -1
  228. package/.next/static/chunks/app/api/search/route-5a6ec8da473b874d.js +0 -1
  229. package/.next/static/chunks/app/api/sessions/[id]/context/route-5a6ec8da473b874d.js +0 -1
  230. package/.next/static/chunks/app/api/sessions/[id]/kernel-state/route-5a6ec8da473b874d.js +0 -1
  231. package/.next/static/chunks/app/api/sessions/[id]/plan/route-5a6ec8da473b874d.js +0 -1
  232. package/.next/static/chunks/app/api/sessions/[id]/route-5a6ec8da473b874d.js +0 -1
  233. package/.next/static/chunks/app/api/sessions/new/route-5a6ec8da473b874d.js +0 -1
  234. package/.next/static/chunks/app/api/sessions/route-5a6ec8da473b874d.js +0 -1
  235. package/.next/static/chunks/app/api/settings/route-5a6ec8da473b874d.js +0 -1
  236. package/.next/static/chunks/app/api/skills/install/route-5a6ec8da473b874d.js +0 -1
  237. package/.next/static/chunks/app/api/skills/route-5a6ec8da473b874d.js +0 -1
  238. package/.next/static/chunks/app/api/skills/search/route-5a6ec8da473b874d.js +0 -1
  239. package/.next/static/chunks/app/api/soul/route-5a6ec8da473b874d.js +0 -1
  240. package/.next/static/chunks/app/api/subagents/status/route-5a6ec8da473b874d.js +0 -1
  241. package/.next/static/chunks/app/api/version/route-5a6ec8da473b874d.js +0 -1
  242. package/.next/static/chunks/app/favicon.ico/route-5a6ec8da473b874d.js +0 -1
  243. package/.next/static/chunks/next/dist/client/components/builtin/app-error-5a6ec8da473b874d.js +0 -1
  244. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-5a6ec8da473b874d.js +0 -1
  245. package/.next/static/chunks/next/dist/client/components/builtin/not-found-5a6ec8da473b874d.js +0 -1
  246. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-5a6ec8da473b874d.js +0 -1
  247. /package/.next/static/{q4RzxkB9gq0zMg9cPLMOM → Iw3iDO0nWfJfb0AL4Vv2f}/_buildManifest.js +0 -0
  248. /package/.next/static/{q4RzxkB9gq0zMg9cPLMOM → Iw3iDO0nWfJfb0AL4Vv2f}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (()=>{var a={};a.id=1921,a.ids=[1921],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{"use strict";a.exports=require("os")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},79748:a=>{"use strict";a.exports=require("fs/promises")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},86710:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>I,patchFetch:()=>H,routeModule:()=>D,serverHooks:()=>G,workAsyncStorage:()=>E,workUnitAsyncStorage:()=>F});var d={};c.r(d),c.d(d,{GET:()=>C});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(79748),x=c(29021),y=c(21820),z=c(33873),A=c.n(z);async function B(){if("win32"!==process.platform)return[];let a=[];for(let b=65;b<=90;b+=1){let c=`${String.fromCharCode(b)}:\\`;try{await (0,w.access)(c,x.constants.R_OK),a.push(c)}catch{}}return a}async function C(a){let b=a.nextUrl.searchParams.get("dir")||(0,y.homedir)(),c=A().resolve(b);try{await (0,w.access)(c,x.constants.R_OK)}catch{return v.NextResponse.json({error:"Directory does not exist or cannot be read"},{status:404})}try{let a=(await (0,w.readdir)(c,{withFileTypes:!0})).filter(a=>a.isDirectory()&&!a.name.startsWith(".")).map(a=>({name:a.name,path:A().join(c,a.name)})).sort((a,b)=>a.name.localeCompare(b.name));return v.NextResponse.json({current:c,parent:A().dirname(c)!==c?A().dirname(c):null,directories:a,drives:await B()})}catch{return v.NextResponse.json({error:"Cannot read directory"},{status:500})}}let D=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/projects/browse/route",pathname:"/api/projects/browse",filename:"route",bundlePath:"app/api/projects/browse/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/projects/browse/route.ts",nextConfigOutput:"",userland:d}),{workAsyncStorage:E,workUnitAsyncStorage:F,serverHooks:G}=D;function H(){return(0,g.patchFetch)({workAsyncStorage:E,workUnitAsyncStorage:F})}async function I(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),D.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/projects/browse/route";"/index"===d&&(d="/");let e=await D.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:z,routerServerContext:A,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(z.dynamicRoutes[H]||z.routes[E]),J=async()=>((null==A?void 0:A.render404)?await A.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!z.routes[E],b=z.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||D.isDev||y||(K="/index"===(K=E)?"/":K);let L=!0===D.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==A?void 0:A.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await D.getIncrementalCache(a,w,z,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:z.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>D.onRequestError(a,b,d,e,A)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>D.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&B&&C&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await D.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),b}},k=await D.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:z,isRoutePPREnabled:!1,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",B?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await D.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=86710));module.exports=c})();
1
+ (()=>{var a={};a.id=1921,a.ids=[1921],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{"use strict";a.exports=require("os")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33733:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>I,patchFetch:()=>H,routeModule:()=>D,serverHooks:()=>G,workAsyncStorage:()=>E,workUnitAsyncStorage:()=>F});var d={};c.r(d),c.d(d,{GET:()=>C});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(79748),x=c(29021),y=c(21820),z=c(33873),A=c.n(z);async function B(){if("win32"!==process.platform)return[];let a=[];for(let b=65;b<=90;b+=1){let c=`${String.fromCharCode(b)}:\\`;try{await (0,w.access)(c,x.constants.R_OK),a.push(c)}catch{}}return a}async function C(a){let b=a.nextUrl.searchParams.get("dir")||(0,y.homedir)(),c=A().resolve(b);try{await (0,w.access)(c,x.constants.R_OK)}catch{return v.NextResponse.json({error:"Directory does not exist or cannot be read"},{status:404})}try{let a=(await (0,w.readdir)(c,{withFileTypes:!0})).filter(a=>a.isDirectory()&&!a.name.startsWith(".")).map(a=>({name:a.name,path:A().join(c,a.name)})).sort((a,b)=>a.name.localeCompare(b.name));return v.NextResponse.json({current:c,parent:A().dirname(c)!==c?A().dirname(c):null,directories:a,drives:await B()})}catch{return v.NextResponse.json({error:"Cannot read directory"},{status:500})}}let D=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/projects/browse/route",pathname:"/api/projects/browse",filename:"route",bundlePath:"app/api/projects/browse/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/projects/browse/route.ts",nextConfigOutput:"",userland:d}),{workAsyncStorage:E,workUnitAsyncStorage:F,serverHooks:G}=D;function H(){return(0,g.patchFetch)({workAsyncStorage:E,workUnitAsyncStorage:F})}async function I(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),D.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/projects/browse/route";"/index"===d&&(d="/");let e=await D.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:z,routerServerContext:A,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(z.dynamicRoutes[H]||z.routes[E]),J=async()=>((null==A?void 0:A.render404)?await A.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!z.routes[E],b=z.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||D.isDev||y||(K="/index"===(K=E)?"/":K);let L=!0===D.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==A?void 0:A.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await D.getIncrementalCache(a,w,z,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:z.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>D.onRequestError(a,b,d,e,A)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>D.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&B&&C&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await D.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),b}},k=await D.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:z,isRoutePPREnabled:!1,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",B?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await D.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},79748:a=>{"use strict";a.exports=require("fs/promises")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=33733));module.exports=c})();
@@ -1,3 +1,3 @@
1
- (()=>{var a={};a.id=64,a.ids=[64],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},11460:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{H5:()=>x,Oz:()=>z,RD:()=>u,hF:()=>t,m3:()=>y,oB:()=>v,oE:()=>w});var e=c(29021),f=c(33873),g=c(40402),h=a([g]);g=(h.then?(await h)():h)[0];let A=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});function i(){return(0,f.join)((0,g.$M)(),"annovibe-projects.json")}function j(a){return a.trim().replace(/[\\/]+$/,"")||a.trim()}function k(a){let b=j(a);return(0,f.basename)(b)||b||"No Project"}function l(){let a=i();try{let b=JSON.parse((0,e.readFileSync)(a,"utf8")),c={},d=b.projects&&"object"==typeof b.projects?b.projects:{};for(let[a,b]of Object.entries(d)){if(!b||"object"!=typeof b)continue;let d=j("string"==typeof b.cwd?b.cwd:a);d&&(c[d]={cwd:d,..."string"==typeof b.name?{name:b.name}:{},..."boolean"==typeof b.hidden?{hidden:b.hidden}:{},..."boolean"==typeof b.pinned?{pinned:b.pinned}:{},..."number"==typeof b.sortOrder&&Number.isFinite(b.sortOrder)?{sortOrder:b.sortOrder}:{},..."string"==typeof b.addedAt?{addedAt:b.addedAt}:{},..."string"==typeof b.lastAccessed?{lastAccessed:b.lastAccessed}:{}})}return{version:2,manualOrder:!0===b.manualOrder,projects:c}}catch{return{version:2,manualOrder:!1,projects:{}}}}function m(a){let b=i();(0,e.mkdirSync)((0,f.dirname)(b),{recursive:!0}),(0,e.writeFileSync)(b,JSON.stringify(a,null,2),"utf8")}function n(a){try{return(0,e.statSync)(a).isDirectory()}catch{return!1}}function o(a,b){let c=A.compare(a.displayName,b.displayName);return 0!==c?c:a.cwd.localeCompare(b.cwd)}function p(a,b,c){let d=!0===a.pinned,e=!0===b.pinned;if(d!==e)return d?-1:1;if(c){let c="number"==typeof a.sortOrder&&Number.isFinite(a.sortOrder)?a.sortOrder:null,d="number"==typeof b.sortOrder&&Number.isFinite(b.sortOrder)?b.sortOrder:null;if(null!==c&&null!==d&&c!==d)return c-d;if(null!==c)return -1;if(null!==d)return 1}return o({displayName:a.name?.trim()||k(a.cwd),cwd:a.cwd},{displayName:b.name?.trim()||k(b.cwd),cwd:b.cwd})}function q(a){let b=-1;for(let c of Object.values(a.projects))"number"==typeof c.sortOrder&&Number.isFinite(c.sortOrder)&&(b=Math.max(b,c.sortOrder));return b+1}function r(a,b){let c=j(b),d=new Date().toISOString(),e=a.projects[c],f={cwd:c,addedAt:e?.addedAt??d,lastAccessed:e?.lastAccessed??d,...e?.name?{name:e.name}:{},..."boolean"==typeof e?.hidden?{hidden:e.hidden}:{},..."boolean"==typeof e?.pinned?{pinned:e.pinned}:{},..."number"==typeof e?.sortOrder&&Number.isFinite(e.sortOrder)?{sortOrder:e.sortOrder}:{}};return a.projects[c]=f,f}function s(a,b){a.manualOrder=!0;let c=new Set,d=0;for(let e of b){let b=j(e);if(!b||c.has(b))continue;let f=r(a,b);f.hidden=!1,f.sortOrder=d++,c.add(b)}for(let b of Object.values(a.projects).filter(a=>!a.hidden&&!c.has(a.cwd)).sort((a,b)=>p(a,b,!0)))b.sortOrder=d++}async function t(a={}){let b=!1!==a.includeSessions,[c,d]=await Promise.all([b?(0,g.dQ)():Promise.resolve([]),Promise.resolve(l())]),f=function(a){let b=new Map;for(let c of a){let a=j(c.cwd||"");if(!a)continue;let d=b.get(a)??{count:0,last:null,created:null};d.count+=1,(!d.last||c.modified>d.last)&&(d.last=c.modified),(!d.created||c.created<d.created)&&(d.created=c.created),b.set(a,d)}return b}(c),h=new Set([...f.keys(),...Object.keys(d.projects)]),i=[];for(let b of h){let c=d.projects[b];if(c?.hidden&&!a.includeHidden)continue;let g=f.get(b),h=g&&c?"both":g?"session":"manual",j=c?.lastAccessed&&(!g?.last||c.lastAccessed>g.last)?c.lastAccessed:g?.last??c?.lastAccessed??null;i.push({cwd:b,name:c?.name,displayName:c?.name?.trim()||k(b),chatCount:g?.count??0,lastAccessed:j,created:g?.created??c?.addedAt??null,hidden:c?.hidden,pinned:c?.pinned??!1,sortOrder:"number"==typeof c?.sortOrder&&Number.isFinite(c.sortOrder)?c.sortOrder:null,exists:!!(0,e.existsSync)(b)&&n(b),source:h})}return i.sort((a,b)=>{let c=!0===a.pinned,e=!0===b.pinned;if(c!==e)return c?-1:1;if(d.manualOrder){let c="number"==typeof a.sortOrder&&Number.isFinite(a.sortOrder)?a.sortOrder:null,d="number"==typeof b.sortOrder&&Number.isFinite(b.sortOrder)?b.sortOrder:null;if(null!==c&&null!==d&&c!==d)return c-d;if(null!==c)return -1;if(null!==d)return 1}return o(a,b)}),i}function u(a,b={}){let c=j(a);if(!c)throw Error("cwd is required");let d=l(),e=new Date().toISOString(),f=d.projects[c],g={cwd:c,addedAt:f?.addedAt??e,lastAccessed:e,...f?.name?{name:f.name}:{},...f?.pinned===!0?{pinned:!0}:{},..."number"==typeof f?.sortOrder&&Number.isFinite(f.sortOrder)?{sortOrder:f.sortOrder}:{},hidden:b.hidden??!1};if(d.manualOrder&&void 0===g.sortOrder&&!g.hidden&&(g.sortOrder=q(d)),void 0!==b.name){let a=b.name?.trim()??"";a&&(g.name=a)}return d.projects[c]=g,m(d),{cwd:c,name:g.name,displayName:g.name?.trim()||k(c),chatCount:0,lastAccessed:g.lastAccessed??null,created:g.addedAt??null,hidden:g.hidden,pinned:g.pinned??!1,sortOrder:"number"==typeof g.sortOrder&&Number.isFinite(g.sortOrder)?g.sortOrder:null,exists:n(c),source:"manual"}}function v(a,b){let c=j(a),d=b.trim();if(!c)throw Error("cwd is required");let e=l(),f=e.projects[c];e.projects[c]={cwd:c,addedAt:f?.addedAt??new Date().toISOString(),lastAccessed:new Date().toISOString(),...d?{name:d}:{},...f?.pinned===!0?{pinned:!0}:{},..."number"==typeof f?.sortOrder&&Number.isFinite(f.sortOrder)?{sortOrder:f.sortOrder}:{},hidden:f?.hidden??!1},m(e)}function w(a){let b=j(a);if(!b)throw Error("cwd is required");let c=l();delete c.projects[b],m(c)}function x(a){let b=j(a);if(!b)return;let c=l(),d=c.projects[b],e={cwd:b,addedAt:d?.addedAt??new Date().toISOString(),lastAccessed:new Date().toISOString(),...d?.name?{name:d.name}:{},...d?.pinned===!0?{pinned:!0}:{},..."number"==typeof d?.sortOrder&&Number.isFinite(d.sortOrder)?{sortOrder:d.sortOrder}:{},hidden:!1};c.manualOrder&&void 0===e.sortOrder&&(e.sortOrder=q(c)),c.projects[b]=e,m(c)}function y(a,b){let c=j(a);if(!c)throw Error("cwd is required");let d=l(),e=r(d,c);if(e.hidden=!1,e.lastAccessed=new Date().toISOString(),e.pinned=b,d.manualOrder){let a=Object.values(d.projects).filter(a=>!a.hidden).sort((a,b)=>p(a,b,!0)).map(a=>a.cwd).filter(a=>a!==c);if(b){let b=a.findIndex(a=>d.projects[a]?.pinned!==!0),e=-1===b?a.length:b;a.splice(e,0,c)}else{let b=a.findIndex(a=>d.projects[a]?.pinned!==!0),e=-1===b?a.length:b;a.splice(e,0,c)}s(d,a)}m(d)}function z(a){let b=l();s(b,a),m(b)}d()}catch(a){d(a)}})},12039:(a,b,c)=>{"use strict";function d(a){if("assistant"!==a.role)return a;let b=a.content;if(!Array.isArray(b))return a;let c=b.map(a=>("object"!=typeof a||null===a||Array.isArray(a)||"toolCall"!==a.type?null:{type:"toolCall",toolCallId:"string"==typeof a.toolCallId?a.toolCallId:"string"==typeof a.id?a.id:"",toolName:"string"==typeof a.toolName?a.toolName:"string"==typeof a.name?a.name:"",input:"object"!=typeof a.input||null===a.input||Array.isArray(a.input)?"object"!=typeof a.arguments||null===a.arguments||Array.isArray(a.arguments)?{}:a.arguments:a.input})??a);return{...a,content:c}}c.d(b,{B:()=>d})},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},38091:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(84187),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/projects/route",pathname:"/api/projects",filename:"route",bundlePath:"app/api/projects/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/projects/route.ts",nextConfigOutput:"",userland:v}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/projects/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},40402:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{$M:()=>e.getAgentDir,BR:()=>q,DK:()=>r,O8:()=>p,Uv:()=>s,dQ:()=>l,m1:()=>m,os:()=>o});var e=c(75430),f=c(12039),g=c(74788),h=c(29021),i=c(33873),j=a([e,g]);function k(a,b,c,d){return a.map(a=>{d.set(a.id,a.path);let e=c[a.id]??null;return{path:a.path,id:a.id,cwd:a.cwd,name:a.name,created:a.created instanceof Date?a.created.toISOString():String(a.created),modified:a.modified instanceof Date?a.modified.toISOString():String(a.modified),messageCount:a.messageCount,firstMessage:a.firstMessage||"(no messages)",parentSessionId:a.parentSessionPath?b.get(a.parentSessionPath):void 0,sessionKind:e?.sessionKind,createdBy:e?.createdBy,sessionMeta:e}})}async function l(){let a=await e.SessionManager.listAll(),b=new Map;for(let c of a)b.set(c.path,c.id);let c=(0,g.tS)();return k(a,b,c,n())}async function m(a){let b=[];for(let c of a){let a=function(a){let b=(0,i.resolve)(a),c=`--${b.replace(/^[/\\]/,"").replace(/[/\\:]/g,"-")}--`;return(0,i.join)((0,e.getAgentDir)(),"sessions",c)}(c);if((0,h.existsSync)(a))try{let c=await e.SessionManager.listAll(a);b.push(...c)}catch{}}let c=new Map;for(let a of b)c.set(a.path,a.id);let d=(0,g.tS)();return k(b,c,d,n())}function n(){return globalThis.__piSessionPathCache||(globalThis.__piSessionPathCache=new Map),globalThis.__piSessionPathCache}async function o(a){let b=n().get(a);return b||(await l(),n().get(a)??null)}function p(a,b){n().set(a,b)}function q(a){n().delete(a)}function r(a){return e.SessionManager.open(a).getEntries()}function s(a,b){let c,d,g,h=new Map;for(let b of a)h.set(b.id,b);let i=(0,e.buildSessionContext)(a,b,h);if(null===b||(b&&(c=h.get(b)),c||(c=a[a.length-1]),!c))return{messages:[],entryIds:[],thinkingLevel:i.thinkingLevel,model:i.model};let j=[],k=c;for(;k;)j.unshift(k),k=k.parentId?h.get(k.parentId):void 0;for(let a of j)"compaction"===a.type&&(d=a.id,g=a.firstKeptEntryId);let l=[];if(d){l.push(d);let a=j.findIndex(a=>a.id===d),b=g?j.findIndex((b,c)=>c<a&&b.id===g):-1,c=b>=0?b:a;for(let b=c;b<a;b++)"message"===j[b].type&&l.push(j[b].id);for(let b=a+1;b<j.length;b++)"message"===j[b].type&&l.push(j[b].id)}else for(let a of j)"message"===a.type&&l.push(a.id);return{messages:i.messages.map(a=>"compactionSummary"===a.role?{role:"user",content:`*The conversation history before this point was compacted into the following summary:*
1
+ (()=>{var a={};a.id=64,a.ids=[64],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},11460:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{H5:()=>x,Oz:()=>z,RD:()=>u,hF:()=>t,m3:()=>y,oB:()=>v,oE:()=>w});var e=c(29021),f=c(33873),g=c(40402),h=a([g]);g=(h.then?(await h)():h)[0];let A=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});function i(){return(0,f.join)((0,g.$M)(),"annovibe-projects.json")}function j(a){return a.trim().replace(/[\\/]+$/,"")||a.trim()}function k(a){let b=j(a);return(0,f.basename)(b)||b||"No Project"}function l(){let a=i();try{let b=JSON.parse((0,e.readFileSync)(a,"utf8")),c={},d=b.projects&&"object"==typeof b.projects?b.projects:{};for(let[a,b]of Object.entries(d)){if(!b||"object"!=typeof b)continue;let d=j("string"==typeof b.cwd?b.cwd:a);d&&(c[d]={cwd:d,..."string"==typeof b.name?{name:b.name}:{},..."boolean"==typeof b.hidden?{hidden:b.hidden}:{},..."boolean"==typeof b.pinned?{pinned:b.pinned}:{},..."number"==typeof b.sortOrder&&Number.isFinite(b.sortOrder)?{sortOrder:b.sortOrder}:{},..."string"==typeof b.addedAt?{addedAt:b.addedAt}:{},..."string"==typeof b.lastAccessed?{lastAccessed:b.lastAccessed}:{}})}return{version:2,manualOrder:!0===b.manualOrder,projects:c}}catch{return{version:2,manualOrder:!1,projects:{}}}}function m(a){let b=i();(0,e.mkdirSync)((0,f.dirname)(b),{recursive:!0}),(0,e.writeFileSync)(b,JSON.stringify(a,null,2),"utf8")}function n(a){try{return(0,e.statSync)(a).isDirectory()}catch{return!1}}function o(a,b){let c=A.compare(a.displayName,b.displayName);return 0!==c?c:a.cwd.localeCompare(b.cwd)}function p(a,b,c){let d=!0===a.pinned,e=!0===b.pinned;if(d!==e)return d?-1:1;if(c){let c="number"==typeof a.sortOrder&&Number.isFinite(a.sortOrder)?a.sortOrder:null,d="number"==typeof b.sortOrder&&Number.isFinite(b.sortOrder)?b.sortOrder:null;if(null!==c&&null!==d&&c!==d)return c-d;if(null!==c)return -1;if(null!==d)return 1}return o({displayName:a.name?.trim()||k(a.cwd),cwd:a.cwd},{displayName:b.name?.trim()||k(b.cwd),cwd:b.cwd})}function q(a){let b=-1;for(let c of Object.values(a.projects))"number"==typeof c.sortOrder&&Number.isFinite(c.sortOrder)&&(b=Math.max(b,c.sortOrder));return b+1}function r(a,b){let c=j(b),d=new Date().toISOString(),e=a.projects[c],f={cwd:c,addedAt:e?.addedAt??d,lastAccessed:e?.lastAccessed??d,...e?.name?{name:e.name}:{},..."boolean"==typeof e?.hidden?{hidden:e.hidden}:{},..."boolean"==typeof e?.pinned?{pinned:e.pinned}:{},..."number"==typeof e?.sortOrder&&Number.isFinite(e.sortOrder)?{sortOrder:e.sortOrder}:{}};return a.projects[c]=f,f}function s(a,b){a.manualOrder=!0;let c=new Set,d=0;for(let e of b){let b=j(e);if(!b||c.has(b))continue;let f=r(a,b);f.hidden=!1,f.sortOrder=d++,c.add(b)}for(let b of Object.values(a.projects).filter(a=>!a.hidden&&!c.has(a.cwd)).sort((a,b)=>p(a,b,!0)))b.sortOrder=d++}async function t(a={}){let b=!1!==a.includeSessions,[c,d]=await Promise.all([b?(0,g.dQ)():Promise.resolve([]),Promise.resolve(l())]),f=function(a){let b=new Map;for(let c of a){let a=j(c.cwd||"");if(!a)continue;let d=b.get(a)??{count:0,last:null,created:null};d.count+=1,(!d.last||c.modified>d.last)&&(d.last=c.modified),(!d.created||c.created<d.created)&&(d.created=c.created),b.set(a,d)}return b}(c),h=new Set([...f.keys(),...Object.keys(d.projects)]),i=[];for(let b of h){let c=d.projects[b];if(c?.hidden&&!a.includeHidden)continue;let g=f.get(b),h=g&&c?"both":g?"session":"manual",j=c?.lastAccessed&&(!g?.last||c.lastAccessed>g.last)?c.lastAccessed:g?.last??c?.lastAccessed??null;i.push({cwd:b,name:c?.name,displayName:c?.name?.trim()||k(b),chatCount:g?.count??0,lastAccessed:j,created:g?.created??c?.addedAt??null,hidden:c?.hidden,pinned:c?.pinned??!1,sortOrder:"number"==typeof c?.sortOrder&&Number.isFinite(c.sortOrder)?c.sortOrder:null,exists:!!(0,e.existsSync)(b)&&n(b),source:h})}return i.sort((a,b)=>{let c=!0===a.pinned,e=!0===b.pinned;if(c!==e)return c?-1:1;if(d.manualOrder){let c="number"==typeof a.sortOrder&&Number.isFinite(a.sortOrder)?a.sortOrder:null,d="number"==typeof b.sortOrder&&Number.isFinite(b.sortOrder)?b.sortOrder:null;if(null!==c&&null!==d&&c!==d)return c-d;if(null!==c)return -1;if(null!==d)return 1}return o(a,b)}),i}function u(a,b={}){let c=j(a);if(!c)throw Error("cwd is required");let d=l(),e=new Date().toISOString(),f=d.projects[c],g={cwd:c,addedAt:f?.addedAt??e,lastAccessed:e,...f?.name?{name:f.name}:{},...f?.pinned===!0?{pinned:!0}:{},..."number"==typeof f?.sortOrder&&Number.isFinite(f.sortOrder)?{sortOrder:f.sortOrder}:{},hidden:b.hidden??!1};if(d.manualOrder&&void 0===g.sortOrder&&!g.hidden&&(g.sortOrder=q(d)),void 0!==b.name){let a=b.name?.trim()??"";a&&(g.name=a)}return d.projects[c]=g,m(d),{cwd:c,name:g.name,displayName:g.name?.trim()||k(c),chatCount:0,lastAccessed:g.lastAccessed??null,created:g.addedAt??null,hidden:g.hidden,pinned:g.pinned??!1,sortOrder:"number"==typeof g.sortOrder&&Number.isFinite(g.sortOrder)?g.sortOrder:null,exists:n(c),source:"manual"}}function v(a,b){let c=j(a),d=b.trim();if(!c)throw Error("cwd is required");let e=l(),f=e.projects[c];e.projects[c]={cwd:c,addedAt:f?.addedAt??new Date().toISOString(),lastAccessed:new Date().toISOString(),...d?{name:d}:{},...f?.pinned===!0?{pinned:!0}:{},..."number"==typeof f?.sortOrder&&Number.isFinite(f.sortOrder)?{sortOrder:f.sortOrder}:{},hidden:f?.hidden??!1},m(e)}function w(a){let b=j(a);if(!b)throw Error("cwd is required");let c=l();delete c.projects[b],m(c)}function x(a){let b=j(a);if(!b)return;let c=l(),d=c.projects[b],e={cwd:b,addedAt:d?.addedAt??new Date().toISOString(),lastAccessed:new Date().toISOString(),...d?.name?{name:d.name}:{},...d?.pinned===!0?{pinned:!0}:{},..."number"==typeof d?.sortOrder&&Number.isFinite(d.sortOrder)?{sortOrder:d.sortOrder}:{},hidden:!1};c.manualOrder&&void 0===e.sortOrder&&(e.sortOrder=q(c)),c.projects[b]=e,m(c)}function y(a,b){let c=j(a);if(!c)throw Error("cwd is required");let d=l(),e=r(d,c);if(e.hidden=!1,e.lastAccessed=new Date().toISOString(),e.pinned=b,d.manualOrder){let a=Object.values(d.projects).filter(a=>!a.hidden).sort((a,b)=>p(a,b,!0)).map(a=>a.cwd).filter(a=>a!==c);if(b){let b=a.findIndex(a=>d.projects[a]?.pinned!==!0),e=-1===b?a.length:b;a.splice(e,0,c)}else{let b=a.findIndex(a=>d.projects[a]?.pinned!==!0),e=-1===b?a.length:b;a.splice(e,0,c)}s(d,a)}m(d)}function z(a){let b=l();s(b,a),m(b)}d()}catch(a){d(a)}})},12039:(a,b,c)=>{"use strict";function d(a){if("assistant"!==a.role)return a;let b=a.content;if(!Array.isArray(b))return a;let c=b.map(a=>("object"!=typeof a||null===a||Array.isArray(a)||"toolCall"!==a.type?null:{type:"toolCall",toolCallId:"string"==typeof a.toolCallId?a.toolCallId:"string"==typeof a.id?a.id:"",toolName:"string"==typeof a.toolName?a.toolName:"string"==typeof a.name?a.name:"",input:"object"!=typeof a.input||null===a.input||Array.isArray(a.input)?"object"!=typeof a.arguments||null===a.arguments||Array.isArray(a.arguments)?{}:a.arguments:a.input})??a);return{...a,content:c}}c.d(b,{B:()=>d})},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},40402:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{$M:()=>e.getAgentDir,BR:()=>q,DK:()=>r,O8:()=>p,Uv:()=>s,dQ:()=>l,m1:()=>m,os:()=>o});var e=c(75430),f=c(12039),g=c(74788),h=c(29021),i=c(33873),j=a([e,g]);function k(a,b,c,d){return a.map(a=>{d.set(a.id,a.path);let e=c[a.id]??null;return{path:a.path,id:a.id,cwd:a.cwd,name:a.name,created:a.created instanceof Date?a.created.toISOString():String(a.created),modified:a.modified instanceof Date?a.modified.toISOString():String(a.modified),messageCount:a.messageCount,firstMessage:a.firstMessage||"(no messages)",parentSessionId:a.parentSessionPath?b.get(a.parentSessionPath):void 0,sessionKind:e?.sessionKind,createdBy:e?.createdBy,sessionMeta:e}})}async function l(){let a=await e.SessionManager.listAll(),b=new Map;for(let c of a)b.set(c.path,c.id);let c=(0,g.tS)();return k(a,b,c,n())}async function m(a){let b=[];for(let c of a){let a=function(a){let b=(0,i.resolve)(a),c=`--${b.replace(/^[/\\]/,"").replace(/[/\\:]/g,"-")}--`;return(0,i.join)((0,e.getAgentDir)(),"sessions",c)}(c);if((0,h.existsSync)(a))try{let c=await e.SessionManager.listAll(a);b.push(...c)}catch{}}let c=new Map;for(let a of b)c.set(a.path,a.id);let d=(0,g.tS)();return k(b,c,d,n())}function n(){return globalThis.__piSessionPathCache||(globalThis.__piSessionPathCache=new Map),globalThis.__piSessionPathCache}async function o(a){let b=n().get(a);return b||(await l(),n().get(a)??null)}function p(a,b){n().set(a,b)}function q(a){n().delete(a)}function r(a){return e.SessionManager.open(a).getEntries()}function s(a,b){let c,d,g,h=new Map;for(let b of a)h.set(b.id,b);let i=(0,e.buildSessionContext)(a,b,h);if(null===b||(b&&(c=h.get(b)),c||(c=a[a.length-1]),!c))return{messages:[],entryIds:[],thinkingLevel:i.thinkingLevel,model:i.model};let j=[],k=c;for(;k;)j.unshift(k),k=k.parentId?h.get(k.parentId):void 0;for(let a of j)"compaction"===a.type&&(d=a.id,g=a.firstKeptEntryId);let l=[];if(d){l.push(d);let a=j.findIndex(a=>a.id===d),b=g?j.findIndex((b,c)=>c<a&&b.id===g):-1,c=b>=0?b:a;for(let b=c;b<a;b++)"message"===j[b].type&&l.push(j[b].id);for(let b=a+1;b<j.length;b++)"message"===j[b].type&&l.push(j[b].id)}else for(let a of j)"message"===a.type&&l.push(a.id);return{messages:i.messages.map(a=>"compactionSummary"===a.role?{role:"user",content:`*The conversation history before this point was compacted into the following summary:*
2
2
 
3
- ${a.summary??""}`,timestamp:a.timestamp}:(0,f.B)(a)),entryIds:l,thinkingLevel:i.thinkingLevel,model:i.model}}[e,g]=j.then?(await j)():j,d()}catch(a){d(a)}})},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},74788:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{LN:()=>o,Of:()=>p,U5:()=>m,oR:()=>n,tS:()=>l});var e=c(29021),f=c(55511),g=c(33873),h=c(75430),i=a([h]);h=(i.then?(await i)():i)[0];let q=(0,g.join)((0,h.getAgentDir)(),"annovibe-session-meta.json"),r=Promise.resolve();function j(a){let b;b=(0,g.dirname)(q),(0,e.existsSync)(b)||(0,e.mkdirSync)(b,{recursive:!0});let c=`${q}.${(0,f.randomUUID)().slice(0,8)}.tmp`;(0,e.writeFileSync)(c,JSON.stringify(a,null,2)),(0,e.renameSync)(c,q)}async function k(a){let b,c=r;r=new Promise(a=>{b=a}),await c;try{return await a()}finally{b()}}function l(){if(!(0,e.existsSync)(q))return{};try{let a=JSON.parse((0,e.readFileSync)(q,"utf-8")),b={};for(let[c,d]of Object.entries(a)){let a=function(a){let b;if(!a||"object"!=typeof a)return null;let c="workbench"===a.sessionKind||"chat"===a.sessionKind?a.sessionKind:null;if(!c)return null;let d="launcher"===a.createdBy||"fork"===a.createdBy||"manual"===a.createdBy?a.createdBy:"manual",e=Array.isArray(a.lastToolNames)?a.lastToolNames.filter(a=>"string"==typeof a):[],f="string"==typeof a.createdAt?a.createdAt:new Date().toISOString(),g="string"==typeof a.initialSourcePath&&a.initialSourcePath?a.initialSourcePath:void 0,h="r"===a.initialKernel||"python"===a.initialKernel?a.initialKernel:void 0,i="string"==typeof a.initialKernelId&&a.initialKernelId?a.initialKernelId:void 0,j="string"==typeof a.initialKernelDisplayName&&a.initialKernelDisplayName?a.initialKernelDisplayName:void 0;if(a.goal&&"object"==typeof a.goal){let c=a.goal;"string"==typeof c.id&&"string"==typeof c.objective&&"string"==typeof c.status&&(b={id:c.id,objective:c.objective,status:c.status,tokenBudget:"number"==typeof c.tokenBudget?c.tokenBudget:void 0,tokensUsed:"number"==typeof c.tokensUsed?c.tokensUsed:0,timeUsedSeconds:"number"==typeof c.timeUsedSeconds?c.timeUsedSeconds:0,createdAt:"number"==typeof c.createdAt?c.createdAt:Date.now(),updatedAt:"number"==typeof c.updatedAt?c.updatedAt:Date.now()})}return{sessionKind:c,lastToolNames:e,createdBy:d,createdAt:f,initialSourcePath:g,initialKernel:h,initialKernelId:i,initialKernelDisplayName:j,goal:b}}(d);a&&(b[c]=a)}return b}catch{return{}}}function m(a){return l()[a]??null}async function n(a,b){await k(()=>{let c=l();c[a]=b,j(c)})}async function o(a,b){await k(()=>{let c=l(),d=c[a];d&&(c[a]={...d,...b},j(c))})}async function p(a){await k(()=>{let b=l();a in b&&(delete b[a],j(b))})}d()}catch(a){d(a)}})},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},78335:()=>{},84187:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>l,GET:()=>i,PATCH:()=>k,POST:()=>j});var e=c(23211),f=c(29021),g=c(11460),h=a([g]);async function i(a){try{let b="false"!==a.nextUrl.searchParams.get("sessions"),c=await (0,g.hF)({includeSessions:b});return e.NextResponse.json({projects:c})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function j(a){try{let b=await a.json();if("string"!=typeof b.cwd||!b.cwd.trim())return e.NextResponse.json({error:"cwd is required"},{status:400});let c=b.cwd.trim();if(!0===b.create&&(0,f.mkdirSync)(c,{recursive:!0}),!function(a){try{return(0,f.statSync)(a).isDirectory()}catch{return!1}}(c))return e.NextResponse.json({error:"Project path must be an existing directory"},{status:400});let d=(0,g.RD)(c,{}),h=await (0,g.hF)();return e.NextResponse.json({ok:!0,project:d,projects:h})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function k(a){try{let b=await a.json();if(Array.isArray(b.order)){let a=b.order.filter(a=>"string"==typeof a&&a.trim().length>0);(0,g.Oz)(a);let c=await (0,g.hF)();return e.NextResponse.json({ok:!0,projects:c})}if("string"!=typeof b.cwd||!b.cwd.trim())return e.NextResponse.json({error:"cwd is required"},{status:400});if(!0===b.touch)(0,g.H5)(b.cwd);else if("string"==typeof b.name)(0,g.oB)(b.cwd,b.name);else{if("boolean"!=typeof b.pinned)return e.NextResponse.json({error:"No valid update fields provided"},{status:400});(0,g.m3)(b.cwd,b.pinned)}let c=await (0,g.hF)();return e.NextResponse.json({ok:!0,projects:c})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function l(a){try{let b=await a.json();if("string"!=typeof b.cwd||!b.cwd.trim())return e.NextResponse.json({error:"cwd is required"},{status:400});(0,g.oE)(b.cwd);let c=await (0,g.hF)();return e.NextResponse.json({ok:!0,projects:c})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}g=(h.then?(await h)():h)[0],d()}catch(a){d(a)}})},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=38091));module.exports=c})();
3
+ ${a.summary??""}`,timestamp:a.timestamp}:(0,f.B)(a)),entryIds:l,thinkingLevel:i.thinkingLevel,model:i.model}}[e,g]=j.then?(await j)():j,d()}catch(a){d(a)}})},44329:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(84187),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/projects/route",pathname:"/api/projects",filename:"route",bundlePath:"app/api/projects/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/projects/route.ts",nextConfigOutput:"",userland:v}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/projects/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},74788:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{LN:()=>o,Of:()=>p,U5:()=>m,oR:()=>n,tS:()=>l});var e=c(29021),f=c(55511),g=c(33873),h=c(75430),i=a([h]);h=(i.then?(await i)():i)[0];let q=(0,g.join)((0,h.getAgentDir)(),"annovibe-session-meta.json"),r=Promise.resolve();function j(a){let b;b=(0,g.dirname)(q),(0,e.existsSync)(b)||(0,e.mkdirSync)(b,{recursive:!0});let c=`${q}.${(0,f.randomUUID)().slice(0,8)}.tmp`;(0,e.writeFileSync)(c,JSON.stringify(a,null,2)),(0,e.renameSync)(c,q)}async function k(a){let b,c=r;r=new Promise(a=>{b=a}),await c;try{return await a()}finally{b()}}function l(){if(!(0,e.existsSync)(q))return{};try{let a=JSON.parse((0,e.readFileSync)(q,"utf-8")),b={};for(let[c,d]of Object.entries(a)){let a=function(a){let b;if(!a||"object"!=typeof a)return null;let c="workbench"===a.sessionKind||"chat"===a.sessionKind?a.sessionKind:null;if(!c)return null;let d="launcher"===a.createdBy||"fork"===a.createdBy||"manual"===a.createdBy?a.createdBy:"manual",e=Array.isArray(a.lastToolNames)?a.lastToolNames.filter(a=>"string"==typeof a):[],f="string"==typeof a.createdAt?a.createdAt:new Date().toISOString(),g="string"==typeof a.initialSourcePath&&a.initialSourcePath?a.initialSourcePath:void 0,h="r"===a.initialKernel||"python"===a.initialKernel?a.initialKernel:void 0,i="string"==typeof a.initialKernelId&&a.initialKernelId?a.initialKernelId:void 0,j="string"==typeof a.initialKernelDisplayName&&a.initialKernelDisplayName?a.initialKernelDisplayName:void 0;if(a.goal&&"object"==typeof a.goal){let c=a.goal;"string"==typeof c.id&&"string"==typeof c.objective&&"string"==typeof c.status&&(b={id:c.id,objective:c.objective,status:c.status,tokenBudget:"number"==typeof c.tokenBudget?c.tokenBudget:void 0,tokensUsed:"number"==typeof c.tokensUsed?c.tokensUsed:0,timeUsedSeconds:"number"==typeof c.timeUsedSeconds?c.timeUsedSeconds:0,createdAt:"number"==typeof c.createdAt?c.createdAt:Date.now(),updatedAt:"number"==typeof c.updatedAt?c.updatedAt:Date.now()})}return{sessionKind:c,lastToolNames:e,createdBy:d,createdAt:f,initialSourcePath:g,initialKernel:h,initialKernelId:i,initialKernelDisplayName:j,goal:b}}(d);a&&(b[c]=a)}return b}catch{return{}}}function m(a){return l()[a]??null}async function n(a,b){await k(()=>{let c=l();c[a]=b,j(c)})}async function o(a,b){await k(()=>{let c=l(),d=c[a];d&&(c[a]={...d,...b},j(c))})}async function p(a){await k(()=>{let b=l();a in b&&(delete b[a],j(b))})}d()}catch(a){d(a)}})},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},78335:()=>{},84187:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>l,GET:()=>i,PATCH:()=>k,POST:()=>j});var e=c(23211),f=c(29021),g=c(11460),h=a([g]);async function i(a){try{let b="false"!==a.nextUrl.searchParams.get("sessions"),c=await (0,g.hF)({includeSessions:b});return e.NextResponse.json({projects:c})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function j(a){try{let b=await a.json();if("string"!=typeof b.cwd||!b.cwd.trim())return e.NextResponse.json({error:"cwd is required"},{status:400});let c=b.cwd.trim();if(!0===b.create&&(0,f.mkdirSync)(c,{recursive:!0}),!function(a){try{return(0,f.statSync)(a).isDirectory()}catch{return!1}}(c))return e.NextResponse.json({error:"Project path must be an existing directory"},{status:400});let d=(0,g.RD)(c,{}),h=await (0,g.hF)();return e.NextResponse.json({ok:!0,project:d,projects:h})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function k(a){try{let b=await a.json();if(Array.isArray(b.order)){let a=b.order.filter(a=>"string"==typeof a&&a.trim().length>0);(0,g.Oz)(a);let c=await (0,g.hF)();return e.NextResponse.json({ok:!0,projects:c})}if("string"!=typeof b.cwd||!b.cwd.trim())return e.NextResponse.json({error:"cwd is required"},{status:400});if(!0===b.touch)(0,g.H5)(b.cwd);else if("string"==typeof b.name)(0,g.oB)(b.cwd,b.name);else{if("boolean"!=typeof b.pinned)return e.NextResponse.json({error:"No valid update fields provided"},{status:400});(0,g.m3)(b.cwd,b.pinned)}let c=await (0,g.hF)();return e.NextResponse.json({ok:!0,projects:c})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function l(a){try{let b=await a.json();if("string"!=typeof b.cwd||!b.cwd.trim())return e.NextResponse.json({error:"cwd is required"},{status:400});(0,g.oE)(b.cwd);let c=await (0,g.hF)();return e.NextResponse.json({ok:!0,projects:c})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}g=(h.then?(await h)():h)[0],d()}catch(a){d(a)}})},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=44329));module.exports=c})();
@@ -1,3 +1,3 @@
1
1
  (()=>{var a={};a.id=6202,a.ids=[6202],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12039:(a,b,c)=>{"use strict";function d(a){if("assistant"!==a.role)return a;let b=a.content;if(!Array.isArray(b))return a;let c=b.map(a=>("object"!=typeof a||null===a||Array.isArray(a)||"toolCall"!==a.type?null:{type:"toolCall",toolCallId:"string"==typeof a.toolCallId?a.toolCallId:"string"==typeof a.id?a.id:"",toolName:"string"==typeof a.toolName?a.toolName:"string"==typeof a.name?a.name:"",input:"object"!=typeof a.input||null===a.input||Array.isArray(a.input)?"object"!=typeof a.arguments||null===a.arguments||Array.isArray(a.arguments)?{}:a.arguments:a.input})??a);return{...a,content:c}}c.d(b,{B:()=>d})},13437:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>j});var e=c(23211),f=c(40402),g=a([f]);function h(a){return a.replace(/\s+/g," ").trim()}function i(a){return!!a&&"object"==typeof a&&"text"===a.type&&"string"==typeof a.text}async function j(a){try{let b=new URL(a.url),c=h(b.searchParams.get("q")??""),d="current"===b.searchParams.get("scope")?"current":"all",g=b.searchParams.get("cwd");if(c.length<2)return e.NextResponse.json({results:[],totalMatches:0,truncated:!1});let j=(await (0,f.dQ)()).filter(a=>"current"!==d||!g||a.cwd===g).sort((a,b)=>b.modified.localeCompare(a.modified)),k=[],l=0,m=!1;for(let a of j){if(l>=80){m=!0;break}let b=[],d=0;try{for(let e of(0,f.DK)(a.path)){let a=function(a){if("message"!==a.type)return null;let{message:b}=a;if("user"!==b.role&&"assistant"!==b.role)return null;let c=b.content;if("string"==typeof c)return{role:b.role,text:h(c)};if(!Array.isArray(c))return null;let d=c.filter(i).map(a=>a.text).join(" ");return{role:b.role,text:h(d)}}(e);a?.text&&a.text.toLowerCase().includes(c.toLowerCase())&&(d+=1,b.length<8&&l<80?(b.push({entryId:e.id,role:a.role,timestamp:e.timestamp,snippet:function(a,b){let c=a.toLowerCase(),d=b.toLowerCase(),e=c.indexOf(d);if(e<0)return a.slice(0,180);let f=Math.max(0,e-70),g=Math.min(a.length,e+b.length+110),h=f>0?"... ":"",i=g<a.length?" ...":"";return`${h}${a.slice(f,g)}${i}`}(a.text,c)}),l+=1):m=!0)}}catch{continue}b.length>0&&k.push({session:a,matches:b,matchCount:d})}return e.NextResponse.json({results:k,totalMatches:l,truncated:m})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}f=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},40402:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{$M:()=>e.getAgentDir,BR:()=>q,DK:()=>r,O8:()=>p,Uv:()=>s,dQ:()=>l,m1:()=>m,os:()=>o});var e=c(75430),f=c(12039),g=c(74788),h=c(29021),i=c(33873),j=a([e,g]);function k(a,b,c,d){return a.map(a=>{d.set(a.id,a.path);let e=c[a.id]??null;return{path:a.path,id:a.id,cwd:a.cwd,name:a.name,created:a.created instanceof Date?a.created.toISOString():String(a.created),modified:a.modified instanceof Date?a.modified.toISOString():String(a.modified),messageCount:a.messageCount,firstMessage:a.firstMessage||"(no messages)",parentSessionId:a.parentSessionPath?b.get(a.parentSessionPath):void 0,sessionKind:e?.sessionKind,createdBy:e?.createdBy,sessionMeta:e}})}async function l(){let a=await e.SessionManager.listAll(),b=new Map;for(let c of a)b.set(c.path,c.id);let c=(0,g.tS)();return k(a,b,c,n())}async function m(a){let b=[];for(let c of a){let a=function(a){let b=(0,i.resolve)(a),c=`--${b.replace(/^[/\\]/,"").replace(/[/\\:]/g,"-")}--`;return(0,i.join)((0,e.getAgentDir)(),"sessions",c)}(c);if((0,h.existsSync)(a))try{let c=await e.SessionManager.listAll(a);b.push(...c)}catch{}}let c=new Map;for(let a of b)c.set(a.path,a.id);let d=(0,g.tS)();return k(b,c,d,n())}function n(){return globalThis.__piSessionPathCache||(globalThis.__piSessionPathCache=new Map),globalThis.__piSessionPathCache}async function o(a){let b=n().get(a);return b||(await l(),n().get(a)??null)}function p(a,b){n().set(a,b)}function q(a){n().delete(a)}function r(a){return e.SessionManager.open(a).getEntries()}function s(a,b){let c,d,g,h=new Map;for(let b of a)h.set(b.id,b);let i=(0,e.buildSessionContext)(a,b,h);if(null===b||(b&&(c=h.get(b)),c||(c=a[a.length-1]),!c))return{messages:[],entryIds:[],thinkingLevel:i.thinkingLevel,model:i.model};let j=[],k=c;for(;k;)j.unshift(k),k=k.parentId?h.get(k.parentId):void 0;for(let a of j)"compaction"===a.type&&(d=a.id,g=a.firstKeptEntryId);let l=[];if(d){l.push(d);let a=j.findIndex(a=>a.id===d),b=g?j.findIndex((b,c)=>c<a&&b.id===g):-1,c=b>=0?b:a;for(let b=c;b<a;b++)"message"===j[b].type&&l.push(j[b].id);for(let b=a+1;b<j.length;b++)"message"===j[b].type&&l.push(j[b].id)}else for(let a of j)"message"===a.type&&l.push(a.id);return{messages:i.messages.map(a=>"compactionSummary"===a.role?{role:"user",content:`*The conversation history before this point was compacted into the following summary:*
2
2
 
3
- ${a.summary??""}`,timestamp:a.timestamp}:(0,f.B)(a)),entryIds:l,thinkingLevel:i.thinkingLevel,model:i.model}}[e,g]=j.then?(await j)():j,d()}catch(a){d(a)}})},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},52003:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(13437),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/search/route",pathname:"/api/search",filename:"route",bundlePath:"app/api/search/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/search/route.ts",nextConfigOutput:"",userland:v}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/search/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},74788:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{LN:()=>o,Of:()=>p,U5:()=>m,oR:()=>n,tS:()=>l});var e=c(29021),f=c(55511),g=c(33873),h=c(75430),i=a([h]);h=(i.then?(await i)():i)[0];let q=(0,g.join)((0,h.getAgentDir)(),"annovibe-session-meta.json"),r=Promise.resolve();function j(a){let b;b=(0,g.dirname)(q),(0,e.existsSync)(b)||(0,e.mkdirSync)(b,{recursive:!0});let c=`${q}.${(0,f.randomUUID)().slice(0,8)}.tmp`;(0,e.writeFileSync)(c,JSON.stringify(a,null,2)),(0,e.renameSync)(c,q)}async function k(a){let b,c=r;r=new Promise(a=>{b=a}),await c;try{return await a()}finally{b()}}function l(){if(!(0,e.existsSync)(q))return{};try{let a=JSON.parse((0,e.readFileSync)(q,"utf-8")),b={};for(let[c,d]of Object.entries(a)){let a=function(a){let b;if(!a||"object"!=typeof a)return null;let c="workbench"===a.sessionKind||"chat"===a.sessionKind?a.sessionKind:null;if(!c)return null;let d="launcher"===a.createdBy||"fork"===a.createdBy||"manual"===a.createdBy?a.createdBy:"manual",e=Array.isArray(a.lastToolNames)?a.lastToolNames.filter(a=>"string"==typeof a):[],f="string"==typeof a.createdAt?a.createdAt:new Date().toISOString(),g="string"==typeof a.initialSourcePath&&a.initialSourcePath?a.initialSourcePath:void 0,h="r"===a.initialKernel||"python"===a.initialKernel?a.initialKernel:void 0,i="string"==typeof a.initialKernelId&&a.initialKernelId?a.initialKernelId:void 0,j="string"==typeof a.initialKernelDisplayName&&a.initialKernelDisplayName?a.initialKernelDisplayName:void 0;if(a.goal&&"object"==typeof a.goal){let c=a.goal;"string"==typeof c.id&&"string"==typeof c.objective&&"string"==typeof c.status&&(b={id:c.id,objective:c.objective,status:c.status,tokenBudget:"number"==typeof c.tokenBudget?c.tokenBudget:void 0,tokensUsed:"number"==typeof c.tokensUsed?c.tokensUsed:0,timeUsedSeconds:"number"==typeof c.timeUsedSeconds?c.timeUsedSeconds:0,createdAt:"number"==typeof c.createdAt?c.createdAt:Date.now(),updatedAt:"number"==typeof c.updatedAt?c.updatedAt:Date.now()})}return{sessionKind:c,lastToolNames:e,createdBy:d,createdAt:f,initialSourcePath:g,initialKernel:h,initialKernelId:i,initialKernelDisplayName:j,goal:b}}(d);a&&(b[c]=a)}return b}catch{return{}}}function m(a){return l()[a]??null}async function n(a,b){await k(()=>{let c=l();c[a]=b,j(c)})}async function o(a,b){await k(()=>{let c=l(),d=c[a];d&&(c[a]={...d,...b},j(c))})}async function p(a){await k(()=>{let b=l();a in b&&(delete b[a],j(b))})}d()}catch(a){d(a)}})},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=52003));module.exports=c})();
3
+ ${a.summary??""}`,timestamp:a.timestamp}:(0,f.B)(a)),entryIds:l,thinkingLevel:i.thinkingLevel,model:i.model}}[e,g]=j.then?(await j)():j,d()}catch(a){d(a)}})},44513:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(13437),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/search/route",pathname:"/api/search",filename:"route",bundlePath:"app/api/search/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/search/route.ts",nextConfigOutput:"",userland:v}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/search/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},74788:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{LN:()=>o,Of:()=>p,U5:()=>m,oR:()=>n,tS:()=>l});var e=c(29021),f=c(55511),g=c(33873),h=c(75430),i=a([h]);h=(i.then?(await i)():i)[0];let q=(0,g.join)((0,h.getAgentDir)(),"annovibe-session-meta.json"),r=Promise.resolve();function j(a){let b;b=(0,g.dirname)(q),(0,e.existsSync)(b)||(0,e.mkdirSync)(b,{recursive:!0});let c=`${q}.${(0,f.randomUUID)().slice(0,8)}.tmp`;(0,e.writeFileSync)(c,JSON.stringify(a,null,2)),(0,e.renameSync)(c,q)}async function k(a){let b,c=r;r=new Promise(a=>{b=a}),await c;try{return await a()}finally{b()}}function l(){if(!(0,e.existsSync)(q))return{};try{let a=JSON.parse((0,e.readFileSync)(q,"utf-8")),b={};for(let[c,d]of Object.entries(a)){let a=function(a){let b;if(!a||"object"!=typeof a)return null;let c="workbench"===a.sessionKind||"chat"===a.sessionKind?a.sessionKind:null;if(!c)return null;let d="launcher"===a.createdBy||"fork"===a.createdBy||"manual"===a.createdBy?a.createdBy:"manual",e=Array.isArray(a.lastToolNames)?a.lastToolNames.filter(a=>"string"==typeof a):[],f="string"==typeof a.createdAt?a.createdAt:new Date().toISOString(),g="string"==typeof a.initialSourcePath&&a.initialSourcePath?a.initialSourcePath:void 0,h="r"===a.initialKernel||"python"===a.initialKernel?a.initialKernel:void 0,i="string"==typeof a.initialKernelId&&a.initialKernelId?a.initialKernelId:void 0,j="string"==typeof a.initialKernelDisplayName&&a.initialKernelDisplayName?a.initialKernelDisplayName:void 0;if(a.goal&&"object"==typeof a.goal){let c=a.goal;"string"==typeof c.id&&"string"==typeof c.objective&&"string"==typeof c.status&&(b={id:c.id,objective:c.objective,status:c.status,tokenBudget:"number"==typeof c.tokenBudget?c.tokenBudget:void 0,tokensUsed:"number"==typeof c.tokensUsed?c.tokensUsed:0,timeUsedSeconds:"number"==typeof c.timeUsedSeconds?c.timeUsedSeconds:0,createdAt:"number"==typeof c.createdAt?c.createdAt:Date.now(),updatedAt:"number"==typeof c.updatedAt?c.updatedAt:Date.now()})}return{sessionKind:c,lastToolNames:e,createdBy:d,createdAt:f,initialSourcePath:g,initialKernel:h,initialKernelId:i,initialKernelDisplayName:j,goal:b}}(d);a&&(b[c]=a)}return b}catch{return{}}}function m(a){return l()[a]??null}async function n(a,b){await k(()=>{let c=l();c[a]=b,j(c)})}async function o(a,b){await k(()=>{let c=l(),d=c[a];d&&(c[a]={...d,...b},j(c))})}async function p(a){await k(()=>{let b=l();a in b&&(delete b[a],j(b))})}d()}catch(a){d(a)}})},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=44513));module.exports=c})();
@@ -1,3 +1,3 @@
1
1
  (()=>{var a={};a.id=6709,a.ids=[6709],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},6004:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>j});var e=c(23211),f=c(75430),g=c(40402),h=c(11638),i=a([f,g]);async function j(a,{params:b}){let{id:c}=await b,d=new URL(a.url).searchParams.get("leafId")??void 0;try{let a=await (0,g.os)(c);if(!a)return e.NextResponse.json({error:"Session not found"},{status:404});let b=f.SessionManager.open(a),i=(0,g.Uv)(b.getEntries(),d);try{return e.NextResponse.json({context:i})}catch{let a=(0,h.z)({context:i});return new Response(a,{status:200,headers:{"Content-Type":"application/json"}})}}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}[f,g]=i.then?(await i)():i,d()}catch(a){d(a)}})},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},11638:(a,b,c)=>{"use strict";function d(a){let b='"';for(let c=0;c<a.length;c++){let d=a.charCodeAt(c);34===d?b+='\\"':92===d?b+="\\\\":8===d?b+="\\b":12===d?b+="\\f":10===d?b+="\\n":13===d?b+="\\r":9===d?b+="\\t":d<32?b+="\\u"+d.toString(16).padStart(4,"0"):b+=String.fromCharCode(d)}return b+'"'}function e(a){try{return JSON.stringify(a)}catch(b){if(b instanceof RangeError&&b.message.includes("Maximum call stack size exceeded"))return function(a){let b=[],c=[{t:"val",v:a}];for(;c.length>0;){let a=c.pop();switch(a.t){case"val":{let e=a.v;if(null==e)b.push("null");else if("boolean"==typeof e)b.push(e?"true":"false");else if("number"==typeof e)b.push(Number.isFinite(e)?String(e):"null");else if("string"==typeof e)b.push(d(e));else if(Array.isArray(e))if(0===e.length)b.push("[]");else{b.push("["),c.push({t:"close"});for(let a=e.length-1;a>=0;a--)a<e.length-1&&c.push({t:"sep"}),c.push({t:"val",v:e[a]})}else if("object"!=typeof e||null===e||Array.isArray(e))b.push("null");else{let a=Object.keys(e);if(0===a.length)b.push("{}");else{b.push("{"),c.push({t:"close"});for(let b=a.length-1;b>=0;b--)b<a.length-1&&c.push({t:"sep"}),c.push({t:"val",v:e[a[b]]}),c.push({t:"key",k:a[b]})}}break}case"sep":b.push(",");break;case"key":b.push(d(a.k)+":");break;case"close":{let a=0,c=!1;for(let d=b.length-1;d>=0;d--){let e=b[d];if("]"===e||"}"===e)a++;else if("["===e||"{"===e){if(0===a){b.push("["===e?"]":"}"),c=!0;break}a--}}c||b.push("}")}}}return b.join("")}(a);throw b}}c.d(b,{z:()=>e})},12039:(a,b,c)=>{"use strict";function d(a){if("assistant"!==a.role)return a;let b=a.content;if(!Array.isArray(b))return a;let c=b.map(a=>("object"!=typeof a||null===a||Array.isArray(a)||"toolCall"!==a.type?null:{type:"toolCall",toolCallId:"string"==typeof a.toolCallId?a.toolCallId:"string"==typeof a.id?a.id:"",toolName:"string"==typeof a.toolName?a.toolName:"string"==typeof a.name?a.name:"",input:"object"!=typeof a.input||null===a.input||Array.isArray(a.input)?"object"!=typeof a.arguments||null===a.arguments||Array.isArray(a.arguments)?{}:a.arguments:a.input})??a);return{...a,content:c}}c.d(b,{B:()=>d})},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},40402:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{$M:()=>e.getAgentDir,BR:()=>q,DK:()=>r,O8:()=>p,Uv:()=>s,dQ:()=>l,m1:()=>m,os:()=>o});var e=c(75430),f=c(12039),g=c(74788),h=c(29021),i=c(33873),j=a([e,g]);function k(a,b,c,d){return a.map(a=>{d.set(a.id,a.path);let e=c[a.id]??null;return{path:a.path,id:a.id,cwd:a.cwd,name:a.name,created:a.created instanceof Date?a.created.toISOString():String(a.created),modified:a.modified instanceof Date?a.modified.toISOString():String(a.modified),messageCount:a.messageCount,firstMessage:a.firstMessage||"(no messages)",parentSessionId:a.parentSessionPath?b.get(a.parentSessionPath):void 0,sessionKind:e?.sessionKind,createdBy:e?.createdBy,sessionMeta:e}})}async function l(){let a=await e.SessionManager.listAll(),b=new Map;for(let c of a)b.set(c.path,c.id);let c=(0,g.tS)();return k(a,b,c,n())}async function m(a){let b=[];for(let c of a){let a=function(a){let b=(0,i.resolve)(a),c=`--${b.replace(/^[/\\]/,"").replace(/[/\\:]/g,"-")}--`;return(0,i.join)((0,e.getAgentDir)(),"sessions",c)}(c);if((0,h.existsSync)(a))try{let c=await e.SessionManager.listAll(a);b.push(...c)}catch{}}let c=new Map;for(let a of b)c.set(a.path,a.id);let d=(0,g.tS)();return k(b,c,d,n())}function n(){return globalThis.__piSessionPathCache||(globalThis.__piSessionPathCache=new Map),globalThis.__piSessionPathCache}async function o(a){let b=n().get(a);return b||(await l(),n().get(a)??null)}function p(a,b){n().set(a,b)}function q(a){n().delete(a)}function r(a){return e.SessionManager.open(a).getEntries()}function s(a,b){let c,d,g,h=new Map;for(let b of a)h.set(b.id,b);let i=(0,e.buildSessionContext)(a,b,h);if(null===b||(b&&(c=h.get(b)),c||(c=a[a.length-1]),!c))return{messages:[],entryIds:[],thinkingLevel:i.thinkingLevel,model:i.model};let j=[],k=c;for(;k;)j.unshift(k),k=k.parentId?h.get(k.parentId):void 0;for(let a of j)"compaction"===a.type&&(d=a.id,g=a.firstKeptEntryId);let l=[];if(d){l.push(d);let a=j.findIndex(a=>a.id===d),b=g?j.findIndex((b,c)=>c<a&&b.id===g):-1,c=b>=0?b:a;for(let b=c;b<a;b++)"message"===j[b].type&&l.push(j[b].id);for(let b=a+1;b<j.length;b++)"message"===j[b].type&&l.push(j[b].id)}else for(let a of j)"message"===a.type&&l.push(a.id);return{messages:i.messages.map(a=>"compactionSummary"===a.role?{role:"user",content:`*The conversation history before this point was compacted into the following summary:*
2
2
 
3
- ${a.summary??""}`,timestamp:a.timestamp}:(0,f.B)(a)),entryIds:l,thinkingLevel:i.thinkingLevel,model:i.model}}[e,g]=j.then?(await j)():j,d()}catch(a){d(a)}})},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46185:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(6004),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/sessions/[id]/context/route",pathname:"/api/sessions/[id]/context",filename:"route",bundlePath:"app/api/sessions/[id]/context/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/sessions/[id]/context/route.ts",nextConfigOutput:"",userland:v}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/sessions/[id]/context/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},74788:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{LN:()=>o,Of:()=>p,U5:()=>m,oR:()=>n,tS:()=>l});var e=c(29021),f=c(55511),g=c(33873),h=c(75430),i=a([h]);h=(i.then?(await i)():i)[0];let q=(0,g.join)((0,h.getAgentDir)(),"annovibe-session-meta.json"),r=Promise.resolve();function j(a){let b;b=(0,g.dirname)(q),(0,e.existsSync)(b)||(0,e.mkdirSync)(b,{recursive:!0});let c=`${q}.${(0,f.randomUUID)().slice(0,8)}.tmp`;(0,e.writeFileSync)(c,JSON.stringify(a,null,2)),(0,e.renameSync)(c,q)}async function k(a){let b,c=r;r=new Promise(a=>{b=a}),await c;try{return await a()}finally{b()}}function l(){if(!(0,e.existsSync)(q))return{};try{let a=JSON.parse((0,e.readFileSync)(q,"utf-8")),b={};for(let[c,d]of Object.entries(a)){let a=function(a){let b;if(!a||"object"!=typeof a)return null;let c="workbench"===a.sessionKind||"chat"===a.sessionKind?a.sessionKind:null;if(!c)return null;let d="launcher"===a.createdBy||"fork"===a.createdBy||"manual"===a.createdBy?a.createdBy:"manual",e=Array.isArray(a.lastToolNames)?a.lastToolNames.filter(a=>"string"==typeof a):[],f="string"==typeof a.createdAt?a.createdAt:new Date().toISOString(),g="string"==typeof a.initialSourcePath&&a.initialSourcePath?a.initialSourcePath:void 0,h="r"===a.initialKernel||"python"===a.initialKernel?a.initialKernel:void 0,i="string"==typeof a.initialKernelId&&a.initialKernelId?a.initialKernelId:void 0,j="string"==typeof a.initialKernelDisplayName&&a.initialKernelDisplayName?a.initialKernelDisplayName:void 0;if(a.goal&&"object"==typeof a.goal){let c=a.goal;"string"==typeof c.id&&"string"==typeof c.objective&&"string"==typeof c.status&&(b={id:c.id,objective:c.objective,status:c.status,tokenBudget:"number"==typeof c.tokenBudget?c.tokenBudget:void 0,tokensUsed:"number"==typeof c.tokensUsed?c.tokensUsed:0,timeUsedSeconds:"number"==typeof c.timeUsedSeconds?c.timeUsedSeconds:0,createdAt:"number"==typeof c.createdAt?c.createdAt:Date.now(),updatedAt:"number"==typeof c.updatedAt?c.updatedAt:Date.now()})}return{sessionKind:c,lastToolNames:e,createdBy:d,createdAt:f,initialSourcePath:g,initialKernel:h,initialKernelId:i,initialKernelDisplayName:j,goal:b}}(d);a&&(b[c]=a)}return b}catch{return{}}}function m(a){return l()[a]??null}async function n(a,b){await k(()=>{let c=l();c[a]=b,j(c)})}async function o(a,b){await k(()=>{let c=l(),d=c[a];d&&(c[a]={...d,...b},j(c))})}async function p(a){await k(()=>{let b=l();a in b&&(delete b[a],j(b))})}d()}catch(a){d(a)}})},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=46185));module.exports=c})();
3
+ ${a.summary??""}`,timestamp:a.timestamp}:(0,f.B)(a)),entryIds:l,thinkingLevel:i.thinkingLevel,model:i.model}}[e,g]=j.then?(await j)():j,d()}catch(a){d(a)}})},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},71887:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(6004),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/sessions/[id]/context/route",pathname:"/api/sessions/[id]/context",filename:"route",bundlePath:"app/api/sessions/[id]/context/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/sessions/[id]/context/route.ts",nextConfigOutput:"",userland:v}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/sessions/[id]/context/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},74788:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{LN:()=>o,Of:()=>p,U5:()=>m,oR:()=>n,tS:()=>l});var e=c(29021),f=c(55511),g=c(33873),h=c(75430),i=a([h]);h=(i.then?(await i)():i)[0];let q=(0,g.join)((0,h.getAgentDir)(),"annovibe-session-meta.json"),r=Promise.resolve();function j(a){let b;b=(0,g.dirname)(q),(0,e.existsSync)(b)||(0,e.mkdirSync)(b,{recursive:!0});let c=`${q}.${(0,f.randomUUID)().slice(0,8)}.tmp`;(0,e.writeFileSync)(c,JSON.stringify(a,null,2)),(0,e.renameSync)(c,q)}async function k(a){let b,c=r;r=new Promise(a=>{b=a}),await c;try{return await a()}finally{b()}}function l(){if(!(0,e.existsSync)(q))return{};try{let a=JSON.parse((0,e.readFileSync)(q,"utf-8")),b={};for(let[c,d]of Object.entries(a)){let a=function(a){let b;if(!a||"object"!=typeof a)return null;let c="workbench"===a.sessionKind||"chat"===a.sessionKind?a.sessionKind:null;if(!c)return null;let d="launcher"===a.createdBy||"fork"===a.createdBy||"manual"===a.createdBy?a.createdBy:"manual",e=Array.isArray(a.lastToolNames)?a.lastToolNames.filter(a=>"string"==typeof a):[],f="string"==typeof a.createdAt?a.createdAt:new Date().toISOString(),g="string"==typeof a.initialSourcePath&&a.initialSourcePath?a.initialSourcePath:void 0,h="r"===a.initialKernel||"python"===a.initialKernel?a.initialKernel:void 0,i="string"==typeof a.initialKernelId&&a.initialKernelId?a.initialKernelId:void 0,j="string"==typeof a.initialKernelDisplayName&&a.initialKernelDisplayName?a.initialKernelDisplayName:void 0;if(a.goal&&"object"==typeof a.goal){let c=a.goal;"string"==typeof c.id&&"string"==typeof c.objective&&"string"==typeof c.status&&(b={id:c.id,objective:c.objective,status:c.status,tokenBudget:"number"==typeof c.tokenBudget?c.tokenBudget:void 0,tokensUsed:"number"==typeof c.tokensUsed?c.tokensUsed:0,timeUsedSeconds:"number"==typeof c.timeUsedSeconds?c.timeUsedSeconds:0,createdAt:"number"==typeof c.createdAt?c.createdAt:Date.now(),updatedAt:"number"==typeof c.updatedAt?c.updatedAt:Date.now()})}return{sessionKind:c,lastToolNames:e,createdBy:d,createdAt:f,initialSourcePath:g,initialKernel:h,initialKernelId:i,initialKernelDisplayName:j,goal:b}}(d);a&&(b[c]=a)}return b}catch{return{}}}function m(a){return l()[a]??null}async function n(a,b){await k(()=>{let c=l();c[a]=b,j(c)})}async function o(a,b){await k(()=>{let c=l(),d=c[a];d&&(c[a]={...d,...b},j(c))})}async function p(a){await k(()=>{let b=l();a in b&&(delete b[a],j(b))})}d()}catch(a){d(a)}})},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=71887));module.exports=c})();
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=4055,a.ids=[4055],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},22857:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(78582),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/sessions/[id]/kernel-state/route",pathname:"/api/sessions/[id]/kernel-state",filename:"route",bundlePath:"app/api/sessions/[id]/kernel-state/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/sessions/[id]/kernel-state/route.ts",nextConfigOutput:"",userland:v}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/sessions/[id]/kernel-state/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},78582:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>i});var e=c(23211),f=c(40402),g=c(60103),h=a([f]);async function i(a,{params:b}){try{let{id:a}=await b;if(!a)return e.NextResponse.json({error:"session id required"},{status:400});let c=await (0,f.os)(a);if(!c)return e.NextResponse.json({error:"session not found"},{status:404});let d=(0,g.f)(c);if(!d)return e.NextResponse.json({error:"no kernel state found"},{status:404});return e.NextResponse.json(d)}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}f=(h.then?(await h)():h)[0],d()}catch(a){d(a)}})},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,7914],()=>b(b.s=22857));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=4055,a.ids=[4055],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},847:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(78582),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/sessions/[id]/kernel-state/route",pathname:"/api/sessions/[id]/kernel-state",filename:"route",bundlePath:"app/api/sessions/[id]/kernel-state/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/sessions/[id]/kernel-state/route.ts",nextConfigOutput:"",userland:v}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/sessions/[id]/kernel-state/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12506:(a,b,c)=>{c.d(b,{M$:()=>e});var d=c(29021);function e(a,b){let c=function(a){let b=[];for(let c of a){if(!c.provenance){b.push({id:`${c.id}-missing-provenance`,severity:"error",code:"artifact_missing_provenance",title:"Artifact provenance is missing",detail:`${c.fileName} is missing the cell and tool-call context that produced it.`,artifactId:c.id});continue}(0,d.existsSync)(c.path)||b.push({id:`${c.id}-missing-file`,severity:"error",code:"artifact_missing_file",title:"Artifact file is missing",detail:`${c.fileName} was recorded in the session but does not exist on disk.`,artifactId:c.id,cellIndex:c.provenance.cellIndex}),"failed"===c.provenance.status&&b.push({id:`${c.id}-failed-cell`,severity:"warning",code:"artifact_failed_cell",title:"Artifact came from a failed cell",detail:`${c.fileName} is linked to cell #${c.provenance.cellIndex}, which failed. Check whether the file is stale or partial.`,artifactId:c.id,cellIndex:c.provenance.cellIndex}),"unknown"===c.provenance.status&&b.push({id:`${c.id}-unknown-status`,severity:"info",code:"artifact_unknown_cell_status",title:"Artifact run status is unknown",detail:`${c.fileName} is linked to cell #${c.provenance.cellIndex}, but the parser could not confirm success.`,artifactId:c.id,cellIndex:c.provenance.cellIndex})}return b}(b);return{generatedAt:new Date().toISOString(),issueCounts:{info:c.filter(a=>"info"===a.severity).length,warning:c.filter(a=>"warning"===a.severity).length,error:c.filter(a=>"error"===a.severity).length},issues:c}}},19989:(a,b,c)=>{c.d(b,{X:()=>d});function d(a,b){let c=new Map;for(let a of b){let b=a.provenance.cellIndex;c.set(b,[...c.get(b)??[],a])}return a.map(a=>{let b,d=c.get(a.index)??[],e=d.map(a=>a.fileName).slice(0,4),f=(b=a.stdoutPreview.split("\n").map(a=>a.trim()).find(a=>a&&!a.startsWith("[")&&a.length>2))?b.slice(0,240):null,g=["succeeded"===a.status?"Completed":"failed"===a.status?"Failed":"Ran",a.title||`Cell #${a.index}`,e.length>0?`generated ${e.join(", ")}`:null,f?`Output: ${f}`:null].filter(Boolean);return{id:`cell-${a.index}`,cellIndex:a.index,title:a.title||`Cell #${a.index}`,status:a.status,summary:g.join(". "),artifactIds:d.map(a=>a.id),createdAt:a.createdAt}})}},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},59059:(a,b,c)=>{c.d(b,{od:()=>l});var d=c(55511),e=c(33873),f=c.n(e);let g=new Set(["png","jpg","jpeg","webp","gif","svg"]),h=new Set(["csv","tsv","xlsx","xls","parquet"]),i=new Set(["ipynb"]),j=new Set(["pdf","html","htm","docx","pptx"]),k=new Set(["rds","qs","h5ad","h5","loom","pkl"]);function l(a,b){let c=[];for(let m of b)for(let b of m.artifacts){var e,l;c.push({id:(e=m.toolCallId,l=b.path,(0,d.createHash)("sha1").update(`${a}|${e}|${l}`).digest("hex").slice(0,12)),path:b.path,fileName:f().basename(b.path),kind:function(a,b){if(b?.startsWith("image/"))return"image";let c=f().basename(a).toLowerCase().split(".").pop()??"";return g.has(c)?"image":h.has(c)?"table":i.has(c)?"notebook":j.has(c)?"document":k.has(c)?"data":"other"}(b.path,b.mimeType),mimeType:b.mimeType,provenance:{sessionId:a,cellIndex:m.index,toolCallId:m.toolCallId,runId:m.runId,language:m.language,runtime:m.runtime,kernelId:m.kernelId,title:m.title,code:m.code,status:m.status,stdoutPreview:m.stdoutPreview,stderrPreview:m.stderrPreview,createdAt:m.createdAt}})}return c}},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},78582:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>l});var e=c(23211),f=c(40402),g=c(60103),h=c(59059),i=c(19989),j=c(12506),k=a([f]);async function l(a,{params:b}){try{let{id:a}=await b;if(!a)return e.NextResponse.json({error:"session id required"},{status:400});let c=await (0,f.os)(a);if(!c)return e.NextResponse.json({error:"session not found"},{status:404});let d=(0,g.f)(c);if(!d)return e.NextResponse.json({error:"no kernel state found"},{status:404});let k=(0,h.od)(a,d.cells),l=(0,i.X)(d.cells,k),m=(0,j.M$)(d,k);return e.NextResponse.json({...d,artifacts:k,notes:l,review:m})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}f=(k.then?(await k)():k)[0],d()}catch(a){d(a)}})},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,7914],()=>b(b.s=847));module.exports=c})();
@@ -1,3 +1,3 @@
1
- (()=>{var a={};a.id=4721,a.ids=[4721],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},7533:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(22660),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/sessions/[id]/plan/route",pathname:"/api/sessions/[id]/plan",filename:"route",bundlePath:"app/api/sessions/[id]/plan/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/sessions/[id]/plan/route.ts",nextConfigOutput:"",userland:v}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/sessions/[id]/plan/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12039:(a,b,c)=>{"use strict";function d(a){if("assistant"!==a.role)return a;let b=a.content;if(!Array.isArray(b))return a;let c=b.map(a=>("object"!=typeof a||null===a||Array.isArray(a)||"toolCall"!==a.type?null:{type:"toolCall",toolCallId:"string"==typeof a.toolCallId?a.toolCallId:"string"==typeof a.id?a.id:"",toolName:"string"==typeof a.toolName?a.toolName:"string"==typeof a.name?a.name:"",input:"object"!=typeof a.input||null===a.input||Array.isArray(a.input)?"object"!=typeof a.arguments||null===a.arguments||Array.isArray(a.arguments)?{}:a.arguments:a.input})??a);return{...a,content:c}}c.d(b,{B:()=>d})},22660:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>k});var e=c(23211),f=c(29021),g=c(33873),h=c(75430),i=c(40402),j=a([h,i]);async function k(a,{params:b}){let{id:c}=await b;try{let b=await a.json(),d=await (0,i.os)(c);if(!d)return e.NextResponse.json({error:"Session not found"},{status:404});let j=h.SessionManager.open(d).getHeader(),k=j?.cwd;if(!k)return e.NextResponse.json({error:"Session cwd not found"},{status:400});let l=Array.isArray(b.tasks)?b.tasks.map(a=>(function(a){if("string"!=typeof a)return null;let b=a.replace(/\s+/g," ").trim();return b.length>0?b:null})(a?.step)).filter(a=>null!==a):[],m="string"==typeof b.planText?b.planText.trim():"",n=["# Annovibe Plan","","This plan was generated by the Annovibe AI agent.","It is read-only until the plan is approved for execution.","",m||l.map((a,b)=>`${b+1}. ${a}`).join("\n"),"","## Steps","",...l.map(a=>`- [ ] ${a}`),""].join("\n"),o=(0,g.join)(k,".annovibe-plan.md");return(0,f.writeFileSync)(o,n),e.NextResponse.json({ok:!0,path:o})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}[h,i]=j.then?(await j)():j,d()}catch(a){d(a)}})},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},40402:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{$M:()=>e.getAgentDir,BR:()=>q,DK:()=>r,O8:()=>p,Uv:()=>s,dQ:()=>l,m1:()=>m,os:()=>o});var e=c(75430),f=c(12039),g=c(74788),h=c(29021),i=c(33873),j=a([e,g]);function k(a,b,c,d){return a.map(a=>{d.set(a.id,a.path);let e=c[a.id]??null;return{path:a.path,id:a.id,cwd:a.cwd,name:a.name,created:a.created instanceof Date?a.created.toISOString():String(a.created),modified:a.modified instanceof Date?a.modified.toISOString():String(a.modified),messageCount:a.messageCount,firstMessage:a.firstMessage||"(no messages)",parentSessionId:a.parentSessionPath?b.get(a.parentSessionPath):void 0,sessionKind:e?.sessionKind,createdBy:e?.createdBy,sessionMeta:e}})}async function l(){let a=await e.SessionManager.listAll(),b=new Map;for(let c of a)b.set(c.path,c.id);let c=(0,g.tS)();return k(a,b,c,n())}async function m(a){let b=[];for(let c of a){let a=function(a){let b=(0,i.resolve)(a),c=`--${b.replace(/^[/\\]/,"").replace(/[/\\:]/g,"-")}--`;return(0,i.join)((0,e.getAgentDir)(),"sessions",c)}(c);if((0,h.existsSync)(a))try{let c=await e.SessionManager.listAll(a);b.push(...c)}catch{}}let c=new Map;for(let a of b)c.set(a.path,a.id);let d=(0,g.tS)();return k(b,c,d,n())}function n(){return globalThis.__piSessionPathCache||(globalThis.__piSessionPathCache=new Map),globalThis.__piSessionPathCache}async function o(a){let b=n().get(a);return b||(await l(),n().get(a)??null)}function p(a,b){n().set(a,b)}function q(a){n().delete(a)}function r(a){return e.SessionManager.open(a).getEntries()}function s(a,b){let c,d,g,h=new Map;for(let b of a)h.set(b.id,b);let i=(0,e.buildSessionContext)(a,b,h);if(null===b||(b&&(c=h.get(b)),c||(c=a[a.length-1]),!c))return{messages:[],entryIds:[],thinkingLevel:i.thinkingLevel,model:i.model};let j=[],k=c;for(;k;)j.unshift(k),k=k.parentId?h.get(k.parentId):void 0;for(let a of j)"compaction"===a.type&&(d=a.id,g=a.firstKeptEntryId);let l=[];if(d){l.push(d);let a=j.findIndex(a=>a.id===d),b=g?j.findIndex((b,c)=>c<a&&b.id===g):-1,c=b>=0?b:a;for(let b=c;b<a;b++)"message"===j[b].type&&l.push(j[b].id);for(let b=a+1;b<j.length;b++)"message"===j[b].type&&l.push(j[b].id)}else for(let a of j)"message"===a.type&&l.push(a.id);return{messages:i.messages.map(a=>"compactionSummary"===a.role?{role:"user",content:`*The conversation history before this point was compacted into the following summary:*
1
+ (()=>{var a={};a.id=4721,a.ids=[4721],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12039:(a,b,c)=>{"use strict";function d(a){if("assistant"!==a.role)return a;let b=a.content;if(!Array.isArray(b))return a;let c=b.map(a=>("object"!=typeof a||null===a||Array.isArray(a)||"toolCall"!==a.type?null:{type:"toolCall",toolCallId:"string"==typeof a.toolCallId?a.toolCallId:"string"==typeof a.id?a.id:"",toolName:"string"==typeof a.toolName?a.toolName:"string"==typeof a.name?a.name:"",input:"object"!=typeof a.input||null===a.input||Array.isArray(a.input)?"object"!=typeof a.arguments||null===a.arguments||Array.isArray(a.arguments)?{}:a.arguments:a.input})??a);return{...a,content:c}}c.d(b,{B:()=>d})},15371:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(22660),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/sessions/[id]/plan/route",pathname:"/api/sessions/[id]/plan",filename:"route",bundlePath:"app/api/sessions/[id]/plan/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/sessions/[id]/plan/route.ts",nextConfigOutput:"",userland:v}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/sessions/[id]/plan/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},22660:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>k});var e=c(23211),f=c(29021),g=c(33873),h=c(75430),i=c(40402),j=a([h,i]);async function k(a,{params:b}){let{id:c}=await b;try{let b=await a.json(),d=await (0,i.os)(c);if(!d)return e.NextResponse.json({error:"Session not found"},{status:404});let j=h.SessionManager.open(d).getHeader(),k=j?.cwd;if(!k)return e.NextResponse.json({error:"Session cwd not found"},{status:400});let l=Array.isArray(b.tasks)?b.tasks.map(a=>(function(a){if("string"!=typeof a)return null;let b=a.replace(/\s+/g," ").trim();return b.length>0?b:null})(a?.step)).filter(a=>null!==a):[],m="string"==typeof b.planText?b.planText.trim():"",n=["# Annovibe Plan","","This plan was generated by the Annovibe AI agent.","It is read-only until the plan is approved for execution.","",m||l.map((a,b)=>`${b+1}. ${a}`).join("\n"),"","## Steps","",...l.map(a=>`- [ ] ${a}`),""].join("\n"),o=(0,g.join)(k,".annovibe-plan.md");return(0,f.writeFileSync)(o,n),e.NextResponse.json({ok:!0,path:o})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}[h,i]=j.then?(await j)():j,d()}catch(a){d(a)}})},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},40402:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{$M:()=>e.getAgentDir,BR:()=>q,DK:()=>r,O8:()=>p,Uv:()=>s,dQ:()=>l,m1:()=>m,os:()=>o});var e=c(75430),f=c(12039),g=c(74788),h=c(29021),i=c(33873),j=a([e,g]);function k(a,b,c,d){return a.map(a=>{d.set(a.id,a.path);let e=c[a.id]??null;return{path:a.path,id:a.id,cwd:a.cwd,name:a.name,created:a.created instanceof Date?a.created.toISOString():String(a.created),modified:a.modified instanceof Date?a.modified.toISOString():String(a.modified),messageCount:a.messageCount,firstMessage:a.firstMessage||"(no messages)",parentSessionId:a.parentSessionPath?b.get(a.parentSessionPath):void 0,sessionKind:e?.sessionKind,createdBy:e?.createdBy,sessionMeta:e}})}async function l(){let a=await e.SessionManager.listAll(),b=new Map;for(let c of a)b.set(c.path,c.id);let c=(0,g.tS)();return k(a,b,c,n())}async function m(a){let b=[];for(let c of a){let a=function(a){let b=(0,i.resolve)(a),c=`--${b.replace(/^[/\\]/,"").replace(/[/\\:]/g,"-")}--`;return(0,i.join)((0,e.getAgentDir)(),"sessions",c)}(c);if((0,h.existsSync)(a))try{let c=await e.SessionManager.listAll(a);b.push(...c)}catch{}}let c=new Map;for(let a of b)c.set(a.path,a.id);let d=(0,g.tS)();return k(b,c,d,n())}function n(){return globalThis.__piSessionPathCache||(globalThis.__piSessionPathCache=new Map),globalThis.__piSessionPathCache}async function o(a){let b=n().get(a);return b||(await l(),n().get(a)??null)}function p(a,b){n().set(a,b)}function q(a){n().delete(a)}function r(a){return e.SessionManager.open(a).getEntries()}function s(a,b){let c,d,g,h=new Map;for(let b of a)h.set(b.id,b);let i=(0,e.buildSessionContext)(a,b,h);if(null===b||(b&&(c=h.get(b)),c||(c=a[a.length-1]),!c))return{messages:[],entryIds:[],thinkingLevel:i.thinkingLevel,model:i.model};let j=[],k=c;for(;k;)j.unshift(k),k=k.parentId?h.get(k.parentId):void 0;for(let a of j)"compaction"===a.type&&(d=a.id,g=a.firstKeptEntryId);let l=[];if(d){l.push(d);let a=j.findIndex(a=>a.id===d),b=g?j.findIndex((b,c)=>c<a&&b.id===g):-1,c=b>=0?b:a;for(let b=c;b<a;b++)"message"===j[b].type&&l.push(j[b].id);for(let b=a+1;b<j.length;b++)"message"===j[b].type&&l.push(j[b].id)}else for(let a of j)"message"===a.type&&l.push(a.id);return{messages:i.messages.map(a=>"compactionSummary"===a.role?{role:"user",content:`*The conversation history before this point was compacted into the following summary:*
2
2
 
3
- ${a.summary??""}`,timestamp:a.timestamp}:(0,f.B)(a)),entryIds:l,thinkingLevel:i.thinkingLevel,model:i.model}}[e,g]=j.then?(await j)():j,d()}catch(a){d(a)}})},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},74788:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{LN:()=>o,Of:()=>p,U5:()=>m,oR:()=>n,tS:()=>l});var e=c(29021),f=c(55511),g=c(33873),h=c(75430),i=a([h]);h=(i.then?(await i)():i)[0];let q=(0,g.join)((0,h.getAgentDir)(),"annovibe-session-meta.json"),r=Promise.resolve();function j(a){let b;b=(0,g.dirname)(q),(0,e.existsSync)(b)||(0,e.mkdirSync)(b,{recursive:!0});let c=`${q}.${(0,f.randomUUID)().slice(0,8)}.tmp`;(0,e.writeFileSync)(c,JSON.stringify(a,null,2)),(0,e.renameSync)(c,q)}async function k(a){let b,c=r;r=new Promise(a=>{b=a}),await c;try{return await a()}finally{b()}}function l(){if(!(0,e.existsSync)(q))return{};try{let a=JSON.parse((0,e.readFileSync)(q,"utf-8")),b={};for(let[c,d]of Object.entries(a)){let a=function(a){let b;if(!a||"object"!=typeof a)return null;let c="workbench"===a.sessionKind||"chat"===a.sessionKind?a.sessionKind:null;if(!c)return null;let d="launcher"===a.createdBy||"fork"===a.createdBy||"manual"===a.createdBy?a.createdBy:"manual",e=Array.isArray(a.lastToolNames)?a.lastToolNames.filter(a=>"string"==typeof a):[],f="string"==typeof a.createdAt?a.createdAt:new Date().toISOString(),g="string"==typeof a.initialSourcePath&&a.initialSourcePath?a.initialSourcePath:void 0,h="r"===a.initialKernel||"python"===a.initialKernel?a.initialKernel:void 0,i="string"==typeof a.initialKernelId&&a.initialKernelId?a.initialKernelId:void 0,j="string"==typeof a.initialKernelDisplayName&&a.initialKernelDisplayName?a.initialKernelDisplayName:void 0;if(a.goal&&"object"==typeof a.goal){let c=a.goal;"string"==typeof c.id&&"string"==typeof c.objective&&"string"==typeof c.status&&(b={id:c.id,objective:c.objective,status:c.status,tokenBudget:"number"==typeof c.tokenBudget?c.tokenBudget:void 0,tokensUsed:"number"==typeof c.tokensUsed?c.tokensUsed:0,timeUsedSeconds:"number"==typeof c.timeUsedSeconds?c.timeUsedSeconds:0,createdAt:"number"==typeof c.createdAt?c.createdAt:Date.now(),updatedAt:"number"==typeof c.updatedAt?c.updatedAt:Date.now()})}return{sessionKind:c,lastToolNames:e,createdBy:d,createdAt:f,initialSourcePath:g,initialKernel:h,initialKernelId:i,initialKernelDisplayName:j,goal:b}}(d);a&&(b[c]=a)}return b}catch{return{}}}function m(a){return l()[a]??null}async function n(a,b){await k(()=>{let c=l();c[a]=b,j(c)})}async function o(a,b){await k(()=>{let c=l(),d=c[a];d&&(c[a]={...d,...b},j(c))})}async function p(a){await k(()=>{let b=l();a in b&&(delete b[a],j(b))})}d()}catch(a){d(a)}})},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=7533));module.exports=c})();
3
+ ${a.summary??""}`,timestamp:a.timestamp}:(0,f.B)(a)),entryIds:l,thinkingLevel:i.thinkingLevel,model:i.model}}[e,g]=j.then?(await j)():j,d()}catch(a){d(a)}})},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},74788:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{LN:()=>o,Of:()=>p,U5:()=>m,oR:()=>n,tS:()=>l});var e=c(29021),f=c(55511),g=c(33873),h=c(75430),i=a([h]);h=(i.then?(await i)():i)[0];let q=(0,g.join)((0,h.getAgentDir)(),"annovibe-session-meta.json"),r=Promise.resolve();function j(a){let b;b=(0,g.dirname)(q),(0,e.existsSync)(b)||(0,e.mkdirSync)(b,{recursive:!0});let c=`${q}.${(0,f.randomUUID)().slice(0,8)}.tmp`;(0,e.writeFileSync)(c,JSON.stringify(a,null,2)),(0,e.renameSync)(c,q)}async function k(a){let b,c=r;r=new Promise(a=>{b=a}),await c;try{return await a()}finally{b()}}function l(){if(!(0,e.existsSync)(q))return{};try{let a=JSON.parse((0,e.readFileSync)(q,"utf-8")),b={};for(let[c,d]of Object.entries(a)){let a=function(a){let b;if(!a||"object"!=typeof a)return null;let c="workbench"===a.sessionKind||"chat"===a.sessionKind?a.sessionKind:null;if(!c)return null;let d="launcher"===a.createdBy||"fork"===a.createdBy||"manual"===a.createdBy?a.createdBy:"manual",e=Array.isArray(a.lastToolNames)?a.lastToolNames.filter(a=>"string"==typeof a):[],f="string"==typeof a.createdAt?a.createdAt:new Date().toISOString(),g="string"==typeof a.initialSourcePath&&a.initialSourcePath?a.initialSourcePath:void 0,h="r"===a.initialKernel||"python"===a.initialKernel?a.initialKernel:void 0,i="string"==typeof a.initialKernelId&&a.initialKernelId?a.initialKernelId:void 0,j="string"==typeof a.initialKernelDisplayName&&a.initialKernelDisplayName?a.initialKernelDisplayName:void 0;if(a.goal&&"object"==typeof a.goal){let c=a.goal;"string"==typeof c.id&&"string"==typeof c.objective&&"string"==typeof c.status&&(b={id:c.id,objective:c.objective,status:c.status,tokenBudget:"number"==typeof c.tokenBudget?c.tokenBudget:void 0,tokensUsed:"number"==typeof c.tokensUsed?c.tokensUsed:0,timeUsedSeconds:"number"==typeof c.timeUsedSeconds?c.timeUsedSeconds:0,createdAt:"number"==typeof c.createdAt?c.createdAt:Date.now(),updatedAt:"number"==typeof c.updatedAt?c.updatedAt:Date.now()})}return{sessionKind:c,lastToolNames:e,createdBy:d,createdAt:f,initialSourcePath:g,initialKernel:h,initialKernelId:i,initialKernelDisplayName:j,goal:b}}(d);a&&(b[c]=a)}return b}catch{return{}}}function m(a){return l()[a]??null}async function n(a,b){await k(()=>{let c=l();c[a]=b,j(c)})}async function o(a,b){await k(()=>{let c=l(),d=c[a];d&&(c[a]={...d,...b},j(c))})}async function p(a){await k(()=>{let b=l();a in b&&(delete b[a],j(b))})}d()}catch(a){d(a)}})},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=15371));module.exports=c})();
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=6849,a.ids=[6849],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},11638:(a,b,c)=>{function d(a){let b='"';for(let c=0;c<a.length;c++){let d=a.charCodeAt(c);34===d?b+='\\"':92===d?b+="\\\\":8===d?b+="\\b":12===d?b+="\\f":10===d?b+="\\n":13===d?b+="\\r":9===d?b+="\\t":d<32?b+="\\u"+d.toString(16).padStart(4,"0"):b+=String.fromCharCode(d)}return b+'"'}function e(a){try{return JSON.stringify(a)}catch(b){if(b instanceof RangeError&&b.message.includes("Maximum call stack size exceeded"))return function(a){let b=[],c=[{t:"val",v:a}];for(;c.length>0;){let a=c.pop();switch(a.t){case"val":{let e=a.v;if(null==e)b.push("null");else if("boolean"==typeof e)b.push(e?"true":"false");else if("number"==typeof e)b.push(Number.isFinite(e)?String(e):"null");else if("string"==typeof e)b.push(d(e));else if(Array.isArray(e))if(0===e.length)b.push("[]");else{b.push("["),c.push({t:"close"});for(let a=e.length-1;a>=0;a--)a<e.length-1&&c.push({t:"sep"}),c.push({t:"val",v:e[a]})}else if("object"!=typeof e||null===e||Array.isArray(e))b.push("null");else{let a=Object.keys(e);if(0===a.length)b.push("{}");else{b.push("{"),c.push({t:"close"});for(let b=a.length-1;b>=0;b--)b<a.length-1&&c.push({t:"sep"}),c.push({t:"val",v:e[a[b]]}),c.push({t:"key",k:a[b]})}}break}case"sep":b.push(",");break;case"key":b.push(d(a.k)+":");break;case"close":{let a=0,c=!1;for(let d=b.length-1;d>=0;d--){let e=b[d];if("]"===e||"}"===e)a++;else if("["===e||"{"===e){if(0===a){b.push("["===e?"]":"}"),c=!0;break}a--}}c||b.push("}")}}}return b.join("")}(a);throw b}}c.d(b,{z:()=>e})},21820:a=>{a.exports=require("os")},28802:a=>{a.exports=import("@earendil-works/pi-ai")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{a.exports=require("node:child_process")},33873:a=>{a.exports=require("path")},35193:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(98192),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/sessions/[id]/route",pathname:"/api/sessions/[id]",filename:"route",bundlePath:"app/api/sessions/[id]/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/sessions/[id]/route.ts",nextConfigOutput:"",userland:v}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/sessions/[id]/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},51455:a=>{a.exports=require("node:fs/promises")},55511:a=>{a.exports=require("crypto")},57975:a=>{a.exports=require("node:util")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79748:a=>{a.exports=require("fs/promises")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},98192:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>q,GET:()=>o,PATCH:()=>p});var e=c(23211),f=c(11638),g=c(29021),h=c(33873),i=c(75430),j=c(40402),k=c(56429),l=c(74788),m=c(86585),n=a([i,j,k,l]);async function o(a,{params:b}){let{id:c}=await b;try{let b,d,h,n=await (0,j.os)(c);if(!n)return e.NextResponse.json({error:"Session not found"},{status:404});let o=i.SessionManager.open(n),p=o.getEntries(),q=o.getTree(),r=o.getLeafId(),s=(0,j.Uv)(p,r),t=o.getHeader(),u=t?.timestamp??new Date().toISOString();try{u=(0,g.statSync)(n).mtime.toISOString()}catch{}let v=t?.cwd??"",w=!1;if(v)try{w=(0,g.statSync)(v).isDirectory()}catch{w=!1}let x=null;try{let a=(await (0,j.dQ)()).find(a=>a.id===c);d=a?.parentSessionId,x=a?.sessionMeta??null}catch{}x||(x=(0,l.U5)(c));let y=t?{path:n,id:t.id,cwd:v,cwdExists:w,name:o.getSessionName(),created:t.timestamp,modified:u,messageCount:s.messages.length,firstMessage:s.messages.find(a=>"user"===a.role)?(h=s.messages.find(a=>"user"===a.role).content,"string"==typeof h?h:(Array.isArray(h)?h.find(a=>"text"===a.type)?.text??"":"")||"(no messages)"):"(no messages)",parentSessionId:d,sessionKind:x?.sessionKind,createdBy:x?.createdBy,sessionMeta:x}:null;if(new URL(a.url).searchParams.has("includeState")){let a=(0,k.A4)(c);if(a?.isAlive()){let c=await a.send({type:"get_state"});b={running:a.isBusy(),state:c}}else b={running:!1,state:{planMode:(0,m.Ws)(p)}}}let z={sessionId:c,filePath:n,info:y,tree:q,leafId:r,context:s,sessionMeta:x,...void 0!==b?{agentState:b}:{}};try{return e.NextResponse.json(z)}catch(b){let a=(0,f.z)(z);return new Response(a,{status:200,headers:{"Content-Type":"application/json"}})}}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function p(a,{params:b}){let{id:c}=await b;try{let{name:b}=await a.json();if("string"!=typeof b)return e.NextResponse.json({error:"name is required"},{status:400});let d=await (0,j.os)(c);if(!d)return e.NextResponse.json({error:"Session not found"},{status:404});return i.SessionManager.open(d).appendSessionInfo(b.trim()),e.NextResponse.json({ok:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function q(a,{params:b}){let{id:c}=await b;try{let a,b=await (0,j.os)(c);if(!b)return e.NextResponse.json({error:"Session not found"},{status:404});let d=(0,g.readFileSync)(b,"utf8").split("\n")[0];try{let b=JSON.parse(d);"session"===b.type&&(a=b.parentSession)}catch{}let f=b.replace(/\\/g,"/").split("/").slice(0,-1).join("/");try{for(let c of(0,g.readdirSync)(f).filter(a=>a.endsWith(".jsonl")&&(0,h.join)(f,a)!==b)){let d=(0,h.join)(f,c);try{let c=(0,g.readFileSync)(d,"utf8").split("\n"),e=JSON.parse(c[0]);"session"===e.type&&e.parentSession===b&&(e.parentSession=a,c[0]=JSON.stringify(e),(0,g.writeFileSync)(d,c.join("\n")))}catch{}}}catch{}return(0,k.A4)(c)?.destroy(),(0,g.unlinkSync)(b),(0,j.BR)(c),await (0,l.Of)(c),e.NextResponse.json({ok:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}[i,j,k,l]=n.then?(await n)():n,d()}catch(a){d(a)}})}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5193,7914,6429],()=>b(b.s=35193));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=6849,a.ids=[6849],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},11638:(a,b,c)=>{function d(a){let b='"';for(let c=0;c<a.length;c++){let d=a.charCodeAt(c);34===d?b+='\\"':92===d?b+="\\\\":8===d?b+="\\b":12===d?b+="\\f":10===d?b+="\\n":13===d?b+="\\r":9===d?b+="\\t":d<32?b+="\\u"+d.toString(16).padStart(4,"0"):b+=String.fromCharCode(d)}return b+'"'}function e(a){try{return JSON.stringify(a)}catch(b){if(b instanceof RangeError&&b.message.includes("Maximum call stack size exceeded"))return function(a){let b=[],c=[{t:"val",v:a}];for(;c.length>0;){let a=c.pop();switch(a.t){case"val":{let e=a.v;if(null==e)b.push("null");else if("boolean"==typeof e)b.push(e?"true":"false");else if("number"==typeof e)b.push(Number.isFinite(e)?String(e):"null");else if("string"==typeof e)b.push(d(e));else if(Array.isArray(e))if(0===e.length)b.push("[]");else{b.push("["),c.push({t:"close"});for(let a=e.length-1;a>=0;a--)a<e.length-1&&c.push({t:"sep"}),c.push({t:"val",v:e[a]})}else if("object"!=typeof e||null===e||Array.isArray(e))b.push("null");else{let a=Object.keys(e);if(0===a.length)b.push("{}");else{b.push("{"),c.push({t:"close"});for(let b=a.length-1;b>=0;b--)b<a.length-1&&c.push({t:"sep"}),c.push({t:"val",v:e[a[b]]}),c.push({t:"key",k:a[b]})}}break}case"sep":b.push(",");break;case"key":b.push(d(a.k)+":");break;case"close":{let a=0,c=!1;for(let d=b.length-1;d>=0;d--){let e=b[d];if("]"===e||"}"===e)a++;else if("["===e||"{"===e){if(0===a){b.push("["===e?"]":"}"),c=!0;break}a--}}c||b.push("}")}}}return b.join("")}(a);throw b}}c.d(b,{z:()=>e})},21820:a=>{a.exports=require("os")},28802:a=>{a.exports=import("@earendil-works/pi-ai")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{a.exports=require("node:child_process")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},51455:a=>{a.exports=require("node:fs/promises")},55511:a=>{a.exports=require("crypto")},57975:a=>{a.exports=require("node:util")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79748:a=>{a.exports=require("fs/promises")},81567:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(98192),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/sessions/[id]/route",pathname:"/api/sessions/[id]",filename:"route",bundlePath:"app/api/sessions/[id]/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/sessions/[id]/route.ts",nextConfigOutput:"",userland:v}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/sessions/[id]/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},98192:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>q,GET:()=>o,PATCH:()=>p});var e=c(23211),f=c(11638),g=c(29021),h=c(33873),i=c(75430),j=c(40402),k=c(56429),l=c(74788),m=c(86585),n=a([i,j,k,l]);async function o(a,{params:b}){let{id:c}=await b;try{let b,d,h,n=await (0,j.os)(c);if(!n)return e.NextResponse.json({error:"Session not found"},{status:404});let o=i.SessionManager.open(n),p=o.getEntries(),q=o.getTree(),r=o.getLeafId(),s=(0,j.Uv)(p,r),t=o.getHeader(),u=t?.timestamp??new Date().toISOString();try{u=(0,g.statSync)(n).mtime.toISOString()}catch{}let v=t?.cwd??"",w=!1;if(v)try{w=(0,g.statSync)(v).isDirectory()}catch{w=!1}let x=null;try{let a=(await (0,j.dQ)()).find(a=>a.id===c);d=a?.parentSessionId,x=a?.sessionMeta??null}catch{}x||(x=(0,l.U5)(c));let y=t?{path:n,id:t.id,cwd:v,cwdExists:w,name:o.getSessionName(),created:t.timestamp,modified:u,messageCount:s.messages.length,firstMessage:s.messages.find(a=>"user"===a.role)?(h=s.messages.find(a=>"user"===a.role).content,"string"==typeof h?h:(Array.isArray(h)?h.find(a=>"text"===a.type)?.text??"":"")||"(no messages)"):"(no messages)",parentSessionId:d,sessionKind:x?.sessionKind,createdBy:x?.createdBy,sessionMeta:x}:null;if(new URL(a.url).searchParams.has("includeState")){let a=(0,k.A4)(c);if(a?.isAlive()){let c=await a.send({type:"get_state"});b={running:a.isBusy(),state:c}}else b={running:!1,state:{planMode:(0,m.Ws)(p)}}}let z={sessionId:c,filePath:n,info:y,tree:q,leafId:r,context:s,sessionMeta:x,...void 0!==b?{agentState:b}:{}};try{return e.NextResponse.json(z)}catch(b){let a=(0,f.z)(z);return new Response(a,{status:200,headers:{"Content-Type":"application/json"}})}}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function p(a,{params:b}){let{id:c}=await b;try{let{name:b}=await a.json();if("string"!=typeof b)return e.NextResponse.json({error:"name is required"},{status:400});let d=await (0,j.os)(c);if(!d)return e.NextResponse.json({error:"Session not found"},{status:404});return i.SessionManager.open(d).appendSessionInfo(b.trim()),e.NextResponse.json({ok:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function q(a,{params:b}){let{id:c}=await b;try{let a,b=await (0,j.os)(c);if(!b)return e.NextResponse.json({error:"Session not found"},{status:404});let d=(0,g.readFileSync)(b,"utf8").split("\n")[0];try{let b=JSON.parse(d);"session"===b.type&&(a=b.parentSession)}catch{}let f=b.replace(/\\/g,"/").split("/").slice(0,-1).join("/");try{for(let c of(0,g.readdirSync)(f).filter(a=>a.endsWith(".jsonl")&&(0,h.join)(f,a)!==b)){let d=(0,h.join)(f,c);try{let c=(0,g.readFileSync)(d,"utf8").split("\n"),e=JSON.parse(c[0]);"session"===e.type&&e.parentSession===b&&(e.parentSession=a,c[0]=JSON.stringify(e),(0,g.writeFileSync)(d,c.join("\n")))}catch{}}}catch{}return(0,k.A4)(c)?.destroy(),(0,g.unlinkSync)(b),(0,j.BR)(c),await (0,l.Of)(c),e.NextResponse.json({ok:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}[i,j,k,l]=n.then?(await n)():n,d()}catch(a){d(a)}})}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5193,7914,6429],()=>b(b.s=81567));module.exports=c})();
@@ -0,0 +1 @@
1
+ "use strict";(()=>{var a={};a.id=3098,a.ids=[3098],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12506:(a,b,c)=>{c.d(b,{M$:()=>e});var d=c(29021);function e(a,b){let c=function(a){let b=[];for(let c of a){if(!c.provenance){b.push({id:`${c.id}-missing-provenance`,severity:"error",code:"artifact_missing_provenance",title:"Artifact provenance is missing",detail:`${c.fileName} is missing the cell and tool-call context that produced it.`,artifactId:c.id});continue}(0,d.existsSync)(c.path)||b.push({id:`${c.id}-missing-file`,severity:"error",code:"artifact_missing_file",title:"Artifact file is missing",detail:`${c.fileName} was recorded in the session but does not exist on disk.`,artifactId:c.id,cellIndex:c.provenance.cellIndex}),"failed"===c.provenance.status&&b.push({id:`${c.id}-failed-cell`,severity:"warning",code:"artifact_failed_cell",title:"Artifact came from a failed cell",detail:`${c.fileName} is linked to cell #${c.provenance.cellIndex}, which failed. Check whether the file is stale or partial.`,artifactId:c.id,cellIndex:c.provenance.cellIndex}),"unknown"===c.provenance.status&&b.push({id:`${c.id}-unknown-status`,severity:"info",code:"artifact_unknown_cell_status",title:"Artifact run status is unknown",detail:`${c.fileName} is linked to cell #${c.provenance.cellIndex}, but the parser could not confirm success.`,artifactId:c.id,cellIndex:c.provenance.cellIndex})}return b}(b);return{generatedAt:new Date().toISOString(),issueCounts:{info:c.filter(a=>"info"===a.severity).length,warning:c.filter(a=>"warning"===a.severity).length,error:c.filter(a=>"error"===a.severity).length},issues:c}}},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},59059:(a,b,c)=>{c.d(b,{od:()=>l});var d=c(55511),e=c(33873),f=c.n(e);let g=new Set(["png","jpg","jpeg","webp","gif","svg"]),h=new Set(["csv","tsv","xlsx","xls","parquet"]),i=new Set(["ipynb"]),j=new Set(["pdf","html","htm","docx","pptx"]),k=new Set(["rds","qs","h5ad","h5","loom","pkl"]);function l(a,b){let c=[];for(let m of b)for(let b of m.artifacts){var e,l;c.push({id:(e=m.toolCallId,l=b.path,(0,d.createHash)("sha1").update(`${a}|${e}|${l}`).digest("hex").slice(0,12)),path:b.path,fileName:f().basename(b.path),kind:function(a,b){if(b?.startsWith("image/"))return"image";let c=f().basename(a).toLowerCase().split(".").pop()??"";return g.has(c)?"image":h.has(c)?"table":i.has(c)?"notebook":j.has(c)?"document":k.has(c)?"data":"other"}(b.path,b.mimeType),mimeType:b.mimeType,provenance:{sessionId:a,cellIndex:m.index,toolCallId:m.toolCallId,runId:m.runId,language:m.language,runtime:m.runtime,kernelId:m.kernelId,title:m.title,code:m.code,status:m.status,stdoutPreview:m.stdoutPreview,stderrPreview:m.stderrPreview,createdAt:m.createdAt}})}return c}},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},83533:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>k});var e=c(23211),f=c(40402),g=c(60103),h=c(59059),i=c(12506),j=a([f]);async function k(a,{params:b}){try{let{id:c}=await b,d=a.nextUrl.searchParams.get("path");if(!c)return e.NextResponse.json({error:"session id required"},{status:400});if(!d)return e.NextResponse.json({error:"path is required"},{status:400});let j=await (0,f.os)(c);if(!j)return e.NextResponse.json({error:"session not found"},{status:404});let k=(0,g.f)(j);if(!k)return e.NextResponse.json({artifact:null,reviewIssues:[]});let l=(0,h.od)(c,k.cells),m=l.find(a=>a.path===d)??null,n=(0,i.M$)(k,l);return e.NextResponse.json({artifact:m,reviewIssues:m?n.issues.filter(a=>a.artifactId===m.id):[]})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}f=(j.then?(await j)():j)[0],d()}catch(a){d(a)}})},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},88305:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(83533),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/sessions/[id]/workbench-artifact/route",pathname:"/api/sessions/[id]/workbench-artifact",filename:"route",bundlePath:"app/api/sessions/[id]/workbench-artifact/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/sessions/[id]/workbench-artifact/route.ts",nextConfigOutput:"",userland:v}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/sessions/[id]/workbench-artifact/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,7914],()=>b(b.s=88305));module.exports=c})();
@@ -0,0 +1 @@
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/sessions/[id]/workbench-artifact/route"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{},"edgeSSRModuleMapping":{},"clientModules":{},"entryCSSFiles":{"/home/runner/work/annovibe/annovibe/app/api/sessions/[id]/workbench-artifact/route":[]},"rscModuleMapping":{},"edgeRscModuleMapping":{}};
@@ -0,0 +1 @@
1
+ "use strict";(()=>{var a={};a.id=6700,a.ids=[6700],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12506:(a,b,c)=>{c.d(b,{M$:()=>e});var d=c(29021);function e(a,b){let c=function(a){let b=[];for(let c of a){if(!c.provenance){b.push({id:`${c.id}-missing-provenance`,severity:"error",code:"artifact_missing_provenance",title:"Artifact provenance is missing",detail:`${c.fileName} is missing the cell and tool-call context that produced it.`,artifactId:c.id});continue}(0,d.existsSync)(c.path)||b.push({id:`${c.id}-missing-file`,severity:"error",code:"artifact_missing_file",title:"Artifact file is missing",detail:`${c.fileName} was recorded in the session but does not exist on disk.`,artifactId:c.id,cellIndex:c.provenance.cellIndex}),"failed"===c.provenance.status&&b.push({id:`${c.id}-failed-cell`,severity:"warning",code:"artifact_failed_cell",title:"Artifact came from a failed cell",detail:`${c.fileName} is linked to cell #${c.provenance.cellIndex}, which failed. Check whether the file is stale or partial.`,artifactId:c.id,cellIndex:c.provenance.cellIndex}),"unknown"===c.provenance.status&&b.push({id:`${c.id}-unknown-status`,severity:"info",code:"artifact_unknown_cell_status",title:"Artifact run status is unknown",detail:`${c.fileName} is linked to cell #${c.provenance.cellIndex}, but the parser could not confirm success.`,artifactId:c.id,cellIndex:c.provenance.cellIndex})}return b}(b);return{generatedAt:new Date().toISOString(),issueCounts:{info:c.filter(a=>"info"===a.severity).length,warning:c.filter(a=>"warning"===a.severity).length,error:c.filter(a=>"error"===a.severity).length},issues:c}}},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31337:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(41719),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/sessions/[id]/workbench-review/route",pathname:"/api/sessions/[id]/workbench-review",filename:"route",bundlePath:"app/api/sessions/[id]/workbench-review/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/sessions/[id]/workbench-review/route.ts",nextConfigOutput:"",userland:v}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/sessions/[id]/workbench-review/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},33873:a=>{a.exports=require("path")},41719:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>k});var e=c(23211),f=c(40402),g=c(60103),h=c(59059),i=c(12506),j=a([f]);async function k(a,{params:b}){try{let{id:a}=await b;if(!a)return e.NextResponse.json({error:"session id required"},{status:400});let c=await (0,f.os)(a);if(!c)return e.NextResponse.json({error:"session not found"},{status:404});let d=(0,g.f)(c);if(!d)return e.NextResponse.json({error:"no kernel state found"},{status:404});let j=(0,h.od)(a,d.cells);return e.NextResponse.json((0,i.M$)(d,j))}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}f=(j.then?(await j)():j)[0],d()}catch(a){d(a)}})},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},59059:(a,b,c)=>{c.d(b,{od:()=>l});var d=c(55511),e=c(33873),f=c.n(e);let g=new Set(["png","jpg","jpeg","webp","gif","svg"]),h=new Set(["csv","tsv","xlsx","xls","parquet"]),i=new Set(["ipynb"]),j=new Set(["pdf","html","htm","docx","pptx"]),k=new Set(["rds","qs","h5ad","h5","loom","pkl"]);function l(a,b){let c=[];for(let m of b)for(let b of m.artifacts){var e,l;c.push({id:(e=m.toolCallId,l=b.path,(0,d.createHash)("sha1").update(`${a}|${e}|${l}`).digest("hex").slice(0,12)),path:b.path,fileName:f().basename(b.path),kind:function(a,b){if(b?.startsWith("image/"))return"image";let c=f().basename(a).toLowerCase().split(".").pop()??"";return g.has(c)?"image":h.has(c)?"table":i.has(c)?"notebook":j.has(c)?"document":k.has(c)?"data":"other"}(b.path,b.mimeType),mimeType:b.mimeType,provenance:{sessionId:a,cellIndex:m.index,toolCallId:m.toolCallId,runId:m.runId,language:m.language,runtime:m.runtime,kernelId:m.kernelId,title:m.title,code:m.code,status:m.status,stdoutPreview:m.stdoutPreview,stderrPreview:m.stderrPreview,createdAt:m.createdAt}})}return c}},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,7914],()=>b(b.s=31337));module.exports=c})();
@@ -0,0 +1 @@
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/sessions/[id]/workbench-review/route"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{},"edgeSSRModuleMapping":{},"clientModules":{},"entryCSSFiles":{"/home/runner/work/annovibe/annovibe/app/api/sessions/[id]/workbench-review/route":[]},"rscModuleMapping":{},"edgeRscModuleMapping":{}};