vibedoc 1.5.0 → 1.6.0

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 (405) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +4 -4
  3. package/.next/prerender-manifest.json +11 -11
  4. package/.next/required-server-files.json +0 -4
  5. package/.next/server/app/(app)/activity/page/build-manifest.json +1 -1
  6. package/.next/server/app/(app)/activity/page.js.nft.json +1 -1
  7. package/.next/server/app/(app)/activity/page_client-reference-manifest.js +1 -1
  8. package/.next/server/app/(app)/board/page/build-manifest.json +1 -1
  9. package/.next/server/app/(app)/board/page.js.nft.json +1 -1
  10. package/.next/server/app/(app)/board/page_client-reference-manifest.js +1 -1
  11. package/.next/server/app/(app)/docs/page/build-manifest.json +1 -1
  12. package/.next/server/app/(app)/docs/page.js.nft.json +1 -1
  13. package/.next/server/app/(app)/docs/page_client-reference-manifest.js +1 -1
  14. package/.next/server/app/(app)/explorer/page/build-manifest.json +1 -1
  15. package/.next/server/app/(app)/explorer/page.js.nft.json +1 -1
  16. package/.next/server/app/(app)/explorer/page_client-reference-manifest.js +1 -1
  17. package/.next/server/app/(app)/memory/page/build-manifest.json +1 -1
  18. package/.next/server/app/(app)/memory/page.js.nft.json +1 -1
  19. package/.next/server/app/(app)/memory/page_client-reference-manifest.js +1 -1
  20. package/.next/server/app/(app)/roadmap/page/build-manifest.json +1 -1
  21. package/.next/server/app/(app)/roadmap/page.js.nft.json +1 -1
  22. package/.next/server/app/(app)/roadmap/page_client-reference-manifest.js +1 -1
  23. package/.next/server/app/(app)/settings/page/build-manifest.json +1 -1
  24. package/.next/server/app/(app)/settings/page.js.nft.json +1 -1
  25. package/.next/server/app/(app)/settings/page_client-reference-manifest.js +1 -1
  26. package/.next/server/app/(app)/setup/page/build-manifest.json +1 -1
  27. package/.next/server/app/(app)/setup/page.js.nft.json +1 -1
  28. package/.next/server/app/(app)/setup/page_client-reference-manifest.js +1 -1
  29. package/.next/server/app/_global-error/page/build-manifest.json +1 -1
  30. package/.next/server/app/_global-error/page.js.nft.json +1 -1
  31. package/.next/server/app/_global-error.html +1 -1
  32. package/.next/server/app/_global-error.rsc +1 -1
  33. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  34. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  35. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  36. package/.next/server/app/_not-found/page/build-manifest.json +1 -1
  37. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  38. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  39. package/.next/server/app/_not-found.html +1 -1
  40. package/.next/server/app/_not-found.rsc +2 -2
  41. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  42. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  43. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  44. package/.next/server/app/activity.html +1 -1
  45. package/.next/server/app/activity.rsc +23 -22
  46. package/.next/server/app/activity.segments/!KGFwcCk/activity/__PAGE__.segment.rsc +5 -5
  47. package/.next/server/app/activity.segments/_full.segment.rsc +23 -22
  48. package/.next/server/app/activity.segments/_tree.segment.rsc +2 -2
  49. package/.next/server/app/api/activity/route.js +3 -3
  50. package/.next/server/app/api/activity/route.js.nft.json +1 -1
  51. package/.next/server/app/api/backlinks/route.js +3 -3
  52. package/.next/server/app/api/backlinks/route.js.nft.json +1 -1
  53. package/.next/server/app/api/chat/route.js +3 -3
  54. package/.next/server/app/api/chat/route.js.nft.json +1 -1
  55. package/.next/server/app/api/context/route.js +3 -3
  56. package/.next/server/app/api/context/route.js.nft.json +1 -1
  57. package/.next/server/app/api/decisions/route.js +3 -3
  58. package/.next/server/app/api/decisions/route.js.nft.json +1 -1
  59. package/.next/server/app/api/docs/route.js +3 -3
  60. package/.next/server/app/api/docs/route.js.nft.json +1 -1
  61. package/.next/server/app/api/events/route.js.nft.json +1 -1
  62. package/.next/server/app/api/explorer/route.js +4 -3
  63. package/.next/server/app/api/explorer/route.js.nft.json +1 -1
  64. package/.next/server/app/api/mcp/route.js +4 -4
  65. package/.next/server/app/api/mcp/route.js.nft.json +1 -1
  66. package/.next/server/app/api/memory/route.js +3 -3
  67. package/.next/server/app/api/memory/route.js.nft.json +1 -1
  68. package/.next/server/app/api/plan/apply/route.js +4 -4
  69. package/.next/server/app/api/plan/apply/route.js.nft.json +1 -1
  70. package/.next/server/app/api/projects/route.js +3 -3
  71. package/.next/server/app/api/projects/route.js.nft.json +1 -1
  72. package/.next/server/app/api/registry/route.js +3 -3
  73. package/.next/server/app/api/registry/route.js.nft.json +1 -1
  74. package/.next/server/app/api/roadmap/create/route.js +4 -4
  75. package/.next/server/app/api/roadmap/create/route.js.nft.json +1 -1
  76. package/.next/server/app/api/roadmap/delete/route.js +4 -4
  77. package/.next/server/app/api/roadmap/delete/route.js.nft.json +1 -1
  78. package/.next/server/app/api/roadmap/generate/route.js +4 -4
  79. package/.next/server/app/api/roadmap/generate/route.js.nft.json +1 -1
  80. package/.next/server/app/api/roadmap/layout/route.js +4 -4
  81. package/.next/server/app/api/roadmap/layout/route.js.nft.json +1 -1
  82. package/.next/server/app/api/roadmap/route.js +3 -3
  83. package/.next/server/app/api/roadmap/route.js.nft.json +1 -1
  84. package/.next/server/app/api/roadmap/update/route.js +4 -4
  85. package/.next/server/app/api/roadmap/update/route.js.nft.json +1 -1
  86. package/.next/server/app/api/sessions/route.js +3 -3
  87. package/.next/server/app/api/sessions/route.js.nft.json +1 -1
  88. package/.next/server/app/api/settings/route.js +4 -4
  89. package/.next/server/app/api/settings/route.js.nft.json +1 -1
  90. package/.next/server/app/api/setup/generate/route.js +2 -2
  91. package/.next/server/app/api/setup/generate/route.js.nft.json +1 -1
  92. package/.next/server/app/api/setup/write/route.js +3 -3
  93. package/.next/server/app/api/setup/write/route.js.nft.json +1 -1
  94. package/.next/server/app/api/summary/route.js +3 -3
  95. package/.next/server/app/api/summary/route.js.nft.json +1 -1
  96. package/.next/server/app/api/tasks/create/route.js +3 -3
  97. package/.next/server/app/api/tasks/create/route.js.nft.json +1 -1
  98. package/.next/server/app/api/tasks/route.js +3 -3
  99. package/.next/server/app/api/tasks/route.js.nft.json +1 -1
  100. package/.next/server/app/board.html +1 -1
  101. package/.next/server/app/board.rsc +23 -21
  102. package/.next/server/app/board.segments/!KGFwcCk/board/__PAGE__.segment.rsc +5 -5
  103. package/.next/server/app/board.segments/_full.segment.rsc +23 -21
  104. package/.next/server/app/board.segments/_tree.segment.rsc +2 -2
  105. package/.next/server/app/docs.html +1 -1
  106. package/.next/server/app/docs.rsc +27 -25
  107. package/.next/server/app/docs.segments/!KGFwcCk/docs/__PAGE__.segment.rsc +9 -10
  108. package/.next/server/app/docs.segments/_full.segment.rsc +27 -25
  109. package/.next/server/app/docs.segments/_tree.segment.rsc +2 -2
  110. package/.next/server/app/explorer.html +1 -1
  111. package/.next/server/app/explorer.rsc +23 -22
  112. package/.next/server/app/explorer.segments/!KGFwcCk/explorer/__PAGE__.segment.rsc +5 -5
  113. package/.next/server/app/explorer.segments/_full.segment.rsc +23 -22
  114. package/.next/server/app/explorer.segments/_tree.segment.rsc +2 -2
  115. package/.next/server/app/index.html +1 -1
  116. package/.next/server/app/index.rsc +2 -2
  117. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  118. package/.next/server/app/index.segments/_full.segment.rsc +2 -2
  119. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  120. package/.next/server/app/memory.html +1 -1
  121. package/.next/server/app/memory.rsc +23 -22
  122. package/.next/server/app/memory.segments/!KGFwcCk/memory/__PAGE__.segment.rsc +5 -5
  123. package/.next/server/app/memory.segments/_full.segment.rsc +23 -22
  124. package/.next/server/app/memory.segments/_tree.segment.rsc +2 -2
  125. package/.next/server/app/page/build-manifest.json +1 -1
  126. package/.next/server/app/page.js.nft.json +1 -1
  127. package/.next/server/app/page_client-reference-manifest.js +1 -1
  128. package/.next/server/app/roadmap.html +1 -1
  129. package/.next/server/app/roadmap.rsc +26 -25
  130. package/.next/server/app/roadmap.segments/!KGFwcCk/roadmap/__PAGE__.segment.rsc +11 -9
  131. package/.next/server/app/roadmap.segments/_full.segment.rsc +26 -25
  132. package/.next/server/app/roadmap.segments/_tree.segment.rsc +2 -2
  133. package/.next/server/app/settings.html +1 -1
  134. package/.next/server/app/settings.rsc +23 -22
  135. package/.next/server/app/settings.segments/!KGFwcCk/settings/__PAGE__.segment.rsc +5 -5
  136. package/.next/server/app/settings.segments/_full.segment.rsc +23 -22
  137. package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  138. package/.next/server/app/setup.html +1 -1
  139. package/.next/server/app/setup.rsc +23 -21
  140. package/.next/server/app/setup.segments/!KGFwcCk/setup/__PAGE__.segment.rsc +5 -5
  141. package/.next/server/app/setup.segments/_full.segment.rsc +23 -21
  142. package/.next/server/app/setup.segments/_tree.segment.rsc +2 -2
  143. package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0-q4v32._.js → 11mp_@anthropic-ai_sdk_0-5bkpj._.js} +2 -2
  144. package/.next/server/chunks/{11mp_@anthropic-ai_sdk_05hfnhc._.js → 11mp_@anthropic-ai_sdk_00psb_y._.js} +2 -2
  145. package/.next/server/chunks/{11mp_@anthropic-ai_sdk_05dmim9._.js → 11mp_@anthropic-ai_sdk_01l5h3i._.js} +2 -2
  146. package/.next/server/chunks/{11mp_@anthropic-ai_sdk_07xtb0h._.js → 11mp_@anthropic-ai_sdk_072r2bd._.js} +2 -2
  147. package/.next/server/chunks/11mp_@anthropic-ai_sdk_0am8bw2._.js +3 -0
  148. package/.next/server/chunks/11mp_@anthropic-ai_sdk_0enefn6._.js +3 -0
  149. package/.next/server/chunks/11mp_@anthropic-ai_sdk_0k3n_5f._.js +3 -0
  150. package/.next/server/chunks/11mp_@anthropic-ai_sdk_0lcfjm4._.js +3 -0
  151. package/.next/server/chunks/11mp_@anthropic-ai_sdk_0lfx9av._.js +3 -0
  152. package/.next/server/chunks/11mp_@anthropic-ai_sdk_0qau3qw._.js +3 -0
  153. package/.next/server/chunks/11mp_@anthropic-ai_sdk_0r1pmvm._.js +3 -0
  154. package/.next/server/chunks/11mp_@anthropic-ai_sdk_11t-z2t._.js +3 -0
  155. package/.next/server/chunks/11mp_@anthropic-ai_sdk_15hyn79._.js +3 -0
  156. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1_qk07x._.js +3 -0
  157. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1b2929e._.js +3 -0
  158. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1e72c89._.js +3 -0
  159. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1eq7asn._.js +3 -0
  160. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1fhdojs._.js +3 -0
  161. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1lh_vwq._.js +3 -0
  162. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1ludf-o._.js +3 -0
  163. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1m3luz3._.js +3 -0
  164. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1x1iz3d._.js +3 -0
  165. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1xsmwlh._.js +3 -0
  166. package/.next/server/chunks/11mp_@anthropic-ai_sdk_202spah._.js +3 -0
  167. package/.next/server/chunks/11mp_@anthropic-ai_sdk_215hw9u._.js +3 -0
  168. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_0n-i0pd._.js +3 -0
  169. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_13pos4j._.js +3 -0
  170. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_17b4pqr._.js +3 -0
  171. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1bkcmom._.js +3 -0
  172. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1hlj_3l._.js +3 -0
  173. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1ip-sor._.js +3 -0
  174. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1pex5o1._.js +3 -0
  175. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1s8lc8_._.js +3 -0
  176. package/.next/server/chunks/[root-of-the-server]__03upgv8._.js +3 -0
  177. package/.next/server/chunks/[root-of-the-server]__03upgv8._.js.map +1 -0
  178. package/.next/server/chunks/[root-of-the-server]__05l6129._.js +3 -0
  179. package/.next/server/chunks/{[root-of-the-server]__0u2rl0m._.js.map → [root-of-the-server]__05l6129._.js.map} +1 -1
  180. package/.next/server/chunks/[root-of-the-server]__06zf_sh._.js +3 -0
  181. package/.next/server/chunks/{[root-of-the-server]__01yk8oi._.js.map → [root-of-the-server]__06zf_sh._.js.map} +1 -1
  182. package/.next/server/chunks/[root-of-the-server]__093hlkh._.js +3 -0
  183. package/.next/server/chunks/{[root-of-the-server]__1337jpl._.js.map → [root-of-the-server]__093hlkh._.js.map} +1 -1
  184. package/.next/server/chunks/[root-of-the-server]__0aynzrb._.js +3 -0
  185. package/.next/server/chunks/{[root-of-the-server]__0b49g9i._.js.map → [root-of-the-server]__0aynzrb._.js.map} +1 -1
  186. package/.next/server/chunks/[root-of-the-server]__0e59y5j._.js +3 -0
  187. package/.next/server/chunks/[root-of-the-server]__0eqd-tw._.js +3 -0
  188. package/.next/server/chunks/{[root-of-the-server]__0yd6wlm._.js.map → [root-of-the-server]__0eqd-tw._.js.map} +1 -1
  189. package/.next/server/chunks/[root-of-the-server]__0nfvvy9._.js +3 -0
  190. package/.next/server/chunks/{[root-of-the-server]__0j-xjbf._.js.map → [root-of-the-server]__0nfvvy9._.js.map} +1 -1
  191. package/.next/server/chunks/{[root-of-the-server]__03t5uqz._.js → [root-of-the-server]__0qac4k0._.js} +2 -2
  192. package/.next/server/chunks/{[root-of-the-server]__03t5uqz._.js.map → [root-of-the-server]__0qac4k0._.js.map} +1 -1
  193. package/.next/server/chunks/[root-of-the-server]__106gpvh._.js +3 -0
  194. package/.next/server/chunks/{[root-of-the-server]__0kaegk7._.js.map → [root-of-the-server]__106gpvh._.js.map} +1 -1
  195. package/.next/server/chunks/[root-of-the-server]__11s-8eg._.js +3 -0
  196. package/.next/server/chunks/{[root-of-the-server]__02k1gkk._.js.map → [root-of-the-server]__11s-8eg._.js.map} +1 -1
  197. package/.next/server/chunks/[root-of-the-server]__11s76m8._.js +3 -0
  198. package/.next/server/chunks/[root-of-the-server]__11s76m8._.js.map +1 -0
  199. package/.next/server/chunks/[root-of-the-server]__142icjb._.js +3 -0
  200. package/.next/server/chunks/{[root-of-the-server]__1yow6hw._.js.map → [root-of-the-server]__142icjb._.js.map} +1 -1
  201. package/.next/server/chunks/[root-of-the-server]__14aeqoi._.js +3 -0
  202. package/.next/server/chunks/[root-of-the-server]__14aeqoi._.js.map +1 -0
  203. package/.next/server/chunks/[root-of-the-server]__1613hjb._.js +88 -0
  204. package/.next/server/chunks/[root-of-the-server]__1613hjb._.js.map +1 -0
  205. package/.next/server/chunks/[root-of-the-server]__169hmq_._.js +10 -0
  206. package/.next/server/chunks/{[root-of-the-server]__0d4jkve._.js.map → [root-of-the-server]__169hmq_._.js.map} +1 -1
  207. package/.next/server/chunks/[root-of-the-server]__17p0rkn._.js +3 -0
  208. package/.next/server/chunks/{[root-of-the-server]__0v8x64y._.js.map → [root-of-the-server]__17p0rkn._.js.map} +1 -1
  209. package/.next/server/chunks/[root-of-the-server]__17xb02p._.js +3 -0
  210. package/.next/server/chunks/{[root-of-the-server]__0zybyuh._.js.map → [root-of-the-server]__17xb02p._.js.map} +1 -1
  211. package/.next/server/chunks/[root-of-the-server]__18kxo4a._.js +3 -0
  212. package/.next/server/chunks/{[root-of-the-server]__1znbm9i._.js.map → [root-of-the-server]__18kxo4a._.js.map} +1 -1
  213. package/.next/server/chunks/[root-of-the-server]__1c55c2q._.js +3 -0
  214. package/.next/server/chunks/{[root-of-the-server]__0l3voov._.js.map → [root-of-the-server]__1c55c2q._.js.map} +1 -1
  215. package/.next/server/chunks/[root-of-the-server]__1j0rrps._.js +3 -0
  216. package/.next/server/chunks/{[root-of-the-server]__0635d15._.js.map → [root-of-the-server]__1j0rrps._.js.map} +1 -1
  217. package/.next/server/chunks/[root-of-the-server]__1lj_2cv._.js +3 -0
  218. package/.next/server/chunks/{[root-of-the-server]__0qsx33x._.js.map → [root-of-the-server]__1lj_2cv._.js.map} +1 -1
  219. package/.next/server/chunks/[root-of-the-server]__1o4a-4j._.js +3 -0
  220. package/.next/server/chunks/{[root-of-the-server]__1vaownn._.js.map → [root-of-the-server]__1o4a-4j._.js.map} +1 -1
  221. package/.next/server/chunks/[root-of-the-server]__1q4ahvz._.js +3 -0
  222. package/.next/server/chunks/{[root-of-the-server]__1hsybai._.js.map → [root-of-the-server]__1q4ahvz._.js.map} +1 -1
  223. package/.next/server/chunks/{[root-of-the-server]__1337jpl._.js → [root-of-the-server]__1u_q61h._.js} +2 -2
  224. package/.next/server/chunks/{[root-of-the-server]__0kkefbq._.js.map → [root-of-the-server]__1u_q61h._.js.map} +1 -1
  225. package/.next/server/chunks/[root-of-the-server]__1wr0m-s._.js +3 -0
  226. package/.next/server/chunks/{[root-of-the-server]__0-rjzmv._.js.map → [root-of-the-server]__1wr0m-s._.js.map} +1 -1
  227. package/.next/server/chunks/[root-of-the-server]__1xb0fmp._.js +3 -0
  228. package/.next/server/chunks/{[root-of-the-server]__15suc44._.js.map → [root-of-the-server]__1xb0fmp._.js.map} +1 -1
  229. package/.next/server/chunks/{[root-of-the-server]__1hsybai._.js → [root-of-the-server]__1y-tt29._.js} +2 -2
  230. package/.next/server/chunks/{[root-of-the-server]__0af0ma6._.js.map → [root-of-the-server]__1y-tt29._.js.map} +1 -1
  231. package/.next/server/chunks/[root-of-the-server]__1y3u5ud._.js +3 -0
  232. package/.next/server/chunks/{[root-of-the-server]__0xqsv4h._.js.map → [root-of-the-server]__1y3u5ud._.js.map} +1 -1
  233. package/.next/server/chunks/[turbopack]_runtime.js +0 -132
  234. package/.next/server/chunks/[turbopack]_runtime.js.map +4 -5
  235. package/.next/server/chunks/_04byth9._.js +34 -0
  236. package/.next/server/chunks/_04byth9._.js.map +1 -0
  237. package/.next/server/chunks/_1au4syj._.js +1 -1
  238. package/.next/server/chunks/_1au4syj._.js.map +1 -1
  239. package/.next/server/chunks/_1b5fqxy._.js +3 -0
  240. package/.next/server/chunks/_1b5fqxy._.js.map +1 -0
  241. package/.next/server/chunks/_1si7nb_._.js +8 -8
  242. package/.next/server/chunks/_1si7nb_._.js.map +1 -1
  243. package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_08ca0b4._.js +3 -0
  244. package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_08ca0b4._.js.map +1 -0
  245. package/.next/server/chunks/ssr/[turbopack]_runtime.js +0 -132
  246. package/.next/server/chunks/ssr/[turbopack]_runtime.js.map +4 -5
  247. package/.next/server/chunks/ssr/_01suk2m._.js +3 -0
  248. package/.next/server/chunks/ssr/_01suk2m._.js.map +1 -0
  249. package/.next/server/chunks/ssr/_04xff_2._.js +1 -1
  250. package/.next/server/chunks/ssr/_04xff_2._.js.map +1 -1
  251. package/.next/server/chunks/ssr/_0qyglif._.js +2 -2
  252. package/.next/server/chunks/ssr/_0qyglif._.js.map +1 -1
  253. package/.next/server/chunks/ssr/_0skuoxv._.js +3 -1
  254. package/.next/server/chunks/ssr/_0skuoxv._.js.map +1 -1
  255. package/.next/server/chunks/ssr/{_1alz6n5._.js → _14i_6yb._.js} +2 -2
  256. package/.next/server/chunks/ssr/_14i_6yb._.js.map +1 -0
  257. package/.next/server/chunks/ssr/{_1s08bv8._.js → _1cbhuz4._.js} +2 -2
  258. package/.next/server/chunks/ssr/_1cbhuz4._.js.map +1 -0
  259. package/.next/server/chunks/ssr/_1ewk_mn._.js +3 -0
  260. package/.next/server/chunks/ssr/_1ewk_mn._.js.map +1 -0
  261. package/.next/server/chunks/ssr/node_modules__pnpm_1dcmsrg._.js +3 -0
  262. package/.next/server/chunks/ssr/node_modules__pnpm_1dcmsrg._.js.map +1 -0
  263. package/.next/server/chunks/ssr/src_components_008q3v8._.js +3 -0
  264. package/.next/server/chunks/ssr/src_components_008q3v8._.js.map +1 -0
  265. package/.next/server/middleware-build-manifest.js +4 -4
  266. package/.next/server/pages/404.html +1 -1
  267. package/.next/server/pages/500.html +1 -1
  268. package/.next/server/server-reference-manifest.js +1 -1
  269. package/.next/server/server-reference-manifest.json +1 -1
  270. package/.next/static/chunks/0eggcu0ovk8sd.js +68 -0
  271. package/.next/static/chunks/{145g20k60txhc.js → 0iva6rdtfqpbz.js} +1 -1
  272. package/.next/static/chunks/0qm101bdsxdyh.css +10 -0
  273. package/.next/static/chunks/0wg9n5zb8mo2p.js +1 -0
  274. package/.next/static/chunks/{2-faknwci76np.js → 0wjw1laqwg-cr.js} +1 -1
  275. package/.next/static/chunks/0z_y7el6m76yk.js +1 -0
  276. package/.next/static/chunks/1-ekntoveuxzd.js +4 -0
  277. package/.next/static/chunks/1r7z33e9jk3vp.js +1 -0
  278. package/.next/static/chunks/{2f7yju8yks2m9.js → 1xyepk9227yej.js} +6 -73
  279. package/.next/static/chunks/{1lfr973ckp6by.js → 1ytqu-ra-fylk.js} +2 -2
  280. package/.next/static/chunks/3dlnlsyyysw5m.js +1 -0
  281. package/.next/static/chunks/{0aiy7o5bsiixt.js → 3kkg030rcpz7l.js} +1 -1
  282. package/.next/static/chunks/3pf_4ye6ju8gt.js +1 -0
  283. package/.next/static/chunks/turbopack-2qsbj8zx38t0j.js +1 -0
  284. package/README.md +2 -0
  285. package/next.config.js +4 -7
  286. package/package.json +1 -1
  287. package/skills/epic-breakdown/SKILL.md +11 -1
  288. package/.next/server/chunks/11mp_@anthropic-ai_sdk_0fw_tls._.js +0 -3
  289. package/.next/server/chunks/11mp_@anthropic-ai_sdk_0q6tm_c._.js +0 -3
  290. package/.next/server/chunks/11mp_@anthropic-ai_sdk_0qyh79u._.js +0 -3
  291. package/.next/server/chunks/11mp_@anthropic-ai_sdk_0rfkb6q._.js +0 -3
  292. package/.next/server/chunks/11mp_@anthropic-ai_sdk_0x1yqfb._.js +0 -3
  293. package/.next/server/chunks/11mp_@anthropic-ai_sdk_0yt3ewg._.js +0 -3
  294. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1-kttjy._.js +0 -3
  295. package/.next/server/chunks/11mp_@anthropic-ai_sdk_12h8gza._.js +0 -3
  296. package/.next/server/chunks/11mp_@anthropic-ai_sdk_18c2w1i._.js +0 -3
  297. package/.next/server/chunks/11mp_@anthropic-ai_sdk_18fnlqa._.js +0 -3
  298. package/.next/server/chunks/11mp_@anthropic-ai_sdk_19on0yg._.js +0 -3
  299. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1alh48t._.js +0 -3
  300. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1ck56ir._.js +0 -3
  301. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1daia98._.js +0 -3
  302. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1f6snvo._.js +0 -3
  303. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1p6s626._.js +0 -3
  304. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1ps921l._.js +0 -3
  305. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1rqxfdf._.js +0 -3
  306. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1s7maye._.js +0 -3
  307. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1vuy6_x._.js +0 -3
  308. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1xv39eu._.js +0 -3
  309. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_078qkb6._.js +0 -3
  310. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_0q7-hjh._.js +0 -3
  311. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_165bzk6._.js +0 -3
  312. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1hfbfb5._.js +0 -3
  313. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1sa-8tw._.js +0 -3
  314. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1xq_gof._.js +0 -3
  315. package/.next/server/chunks/[root-of-the-server]__0-rjzmv._.js +0 -3
  316. package/.next/server/chunks/[root-of-the-server]__01yk8oi._.js +0 -3
  317. package/.next/server/chunks/[root-of-the-server]__02k1gkk._.js +0 -3
  318. package/.next/server/chunks/[root-of-the-server]__0635d15._.js +0 -3
  319. package/.next/server/chunks/[root-of-the-server]__0af0ma6._.js +0 -3
  320. package/.next/server/chunks/[root-of-the-server]__0b49g9i._.js +0 -3
  321. package/.next/server/chunks/[root-of-the-server]__0d4jkve._.js +0 -10
  322. package/.next/server/chunks/[root-of-the-server]__0j-xjbf._.js +0 -3
  323. package/.next/server/chunks/[root-of-the-server]__0kaegk7._.js +0 -3
  324. package/.next/server/chunks/[root-of-the-server]__0kkefbq._.js +0 -3
  325. package/.next/server/chunks/[root-of-the-server]__0l3voov._.js +0 -3
  326. package/.next/server/chunks/[root-of-the-server]__0qsx33x._.js +0 -3
  327. package/.next/server/chunks/[root-of-the-server]__0sc44r6._.js +0 -86
  328. package/.next/server/chunks/[root-of-the-server]__0sc44r6._.js.map +0 -1
  329. package/.next/server/chunks/[root-of-the-server]__0u2rl0m._.js +0 -3
  330. package/.next/server/chunks/[root-of-the-server]__0uk0tga._.js +0 -3
  331. package/.next/server/chunks/[root-of-the-server]__0v8x64y._.js +0 -3
  332. package/.next/server/chunks/[root-of-the-server]__0xqsv4h._.js +0 -3
  333. package/.next/server/chunks/[root-of-the-server]__0yd6wlm._.js +0 -3
  334. package/.next/server/chunks/[root-of-the-server]__0zybyuh._.js +0 -3
  335. package/.next/server/chunks/[root-of-the-server]__134sb3d._.js +0 -3
  336. package/.next/server/chunks/[root-of-the-server]__134sb3d._.js.map +0 -1
  337. package/.next/server/chunks/[root-of-the-server]__15suc44._.js +0 -3
  338. package/.next/server/chunks/[root-of-the-server]__1jeqjz6._.js +0 -3
  339. package/.next/server/chunks/[root-of-the-server]__1kfohrq._.js +0 -3
  340. package/.next/server/chunks/[root-of-the-server]__1mz21a2._.js +0 -3
  341. package/.next/server/chunks/[root-of-the-server]__1mz21a2._.js.map +0 -1
  342. package/.next/server/chunks/[root-of-the-server]__1vaownn._.js +0 -3
  343. package/.next/server/chunks/[root-of-the-server]__1yow6hw._.js +0 -3
  344. package/.next/server/chunks/[root-of-the-server]__1znbm9i._.js +0 -3
  345. package/.next/server/chunks/_0csymdc._.js +0 -34
  346. package/.next/server/chunks/_0csymdc._.js.map +0 -1
  347. package/.next/server/chunks/_1f1rssd._.js +0 -3
  348. package/.next/server/chunks/_1f1rssd._.js.map +0 -1
  349. package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_1v0h3_3._.js +0 -3
  350. package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_1v0h3_3._.js.map +0 -1
  351. package/.next/server/chunks/ssr/_0v7muti._.js +0 -3
  352. package/.next/server/chunks/ssr/_0v7muti._.js.map +0 -1
  353. package/.next/server/chunks/ssr/_1a9mqm1._.js +0 -3
  354. package/.next/server/chunks/ssr/_1a9mqm1._.js.map +0 -1
  355. package/.next/server/chunks/ssr/_1alz6n5._.js.map +0 -1
  356. package/.next/server/chunks/ssr/_1s08bv8._.js.map +0 -1
  357. package/.next/server/chunks/ssr/node_modules__pnpm_051nq8c._.js +0 -3
  358. package/.next/server/chunks/ssr/node_modules__pnpm_051nq8c._.js.map +0 -1
  359. package/.next/server/chunks/ssr/src_components_0wg3bi2._.js +0 -3
  360. package/.next/server/chunks/ssr/src_components_0wg3bi2._.js.map +0 -1
  361. package/.next/static/chunks/05qw7-fs1exlt.js +0 -1
  362. package/.next/static/chunks/0_vu3y1bvg843.js +0 -1
  363. package/.next/static/chunks/0fvzbdfwiu4a2.js +0 -1
  364. package/.next/static/chunks/14ewdzt8piprq.js +0 -1
  365. package/.next/static/chunks/2g08tblvdp0t_.js +0 -2
  366. package/.next/static/chunks/2gdlf-xhbpc75.css +0 -10
  367. package/.next/static/chunks/2xu8bb_0152j-.js +0 -1
  368. package/.next/static/chunks/turbopack-181pehyg9iyaw.js +0 -1
  369. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0-q4v32._.js.map → 11mp_@anthropic-ai_sdk_0-5bkpj._.js.map} +0 -0
  370. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_05dmim9._.js.map → 11mp_@anthropic-ai_sdk_00psb_y._.js.map} +0 -0
  371. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_05hfnhc._.js.map → 11mp_@anthropic-ai_sdk_01l5h3i._.js.map} +0 -0
  372. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_07xtb0h._.js.map → 11mp_@anthropic-ai_sdk_072r2bd._.js.map} +0 -0
  373. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0fw_tls._.js.map → 11mp_@anthropic-ai_sdk_0am8bw2._.js.map} +0 -0
  374. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0q6tm_c._.js.map → 11mp_@anthropic-ai_sdk_0enefn6._.js.map} +0 -0
  375. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0qyh79u._.js.map → 11mp_@anthropic-ai_sdk_0k3n_5f._.js.map} +0 -0
  376. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0rfkb6q._.js.map → 11mp_@anthropic-ai_sdk_0lcfjm4._.js.map} +0 -0
  377. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0x1yqfb._.js.map → 11mp_@anthropic-ai_sdk_0lfx9av._.js.map} +0 -0
  378. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0yt3ewg._.js.map → 11mp_@anthropic-ai_sdk_0qau3qw._.js.map} +0 -0
  379. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1-kttjy._.js.map → 11mp_@anthropic-ai_sdk_0r1pmvm._.js.map} +0 -0
  380. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_12h8gza._.js.map → 11mp_@anthropic-ai_sdk_11t-z2t._.js.map} +0 -0
  381. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_18c2w1i._.js.map → 11mp_@anthropic-ai_sdk_15hyn79._.js.map} +0 -0
  382. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_18fnlqa._.js.map → 11mp_@anthropic-ai_sdk_1_qk07x._.js.map} +0 -0
  383. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_19on0yg._.js.map → 11mp_@anthropic-ai_sdk_1b2929e._.js.map} +0 -0
  384. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1alh48t._.js.map → 11mp_@anthropic-ai_sdk_1e72c89._.js.map} +0 -0
  385. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1ck56ir._.js.map → 11mp_@anthropic-ai_sdk_1eq7asn._.js.map} +0 -0
  386. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1daia98._.js.map → 11mp_@anthropic-ai_sdk_1fhdojs._.js.map} +0 -0
  387. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1f6snvo._.js.map → 11mp_@anthropic-ai_sdk_1lh_vwq._.js.map} +0 -0
  388. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1p6s626._.js.map → 11mp_@anthropic-ai_sdk_1ludf-o._.js.map} +0 -0
  389. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1ps921l._.js.map → 11mp_@anthropic-ai_sdk_1m3luz3._.js.map} +0 -0
  390. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1rqxfdf._.js.map → 11mp_@anthropic-ai_sdk_1x1iz3d._.js.map} +0 -0
  391. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1s7maye._.js.map → 11mp_@anthropic-ai_sdk_1xsmwlh._.js.map} +0 -0
  392. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1vuy6_x._.js.map → 11mp_@anthropic-ai_sdk_202spah._.js.map} +0 -0
  393. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1xv39eu._.js.map → 11mp_@anthropic-ai_sdk_215hw9u._.js.map} +0 -0
  394. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_index_mjs_078qkb6._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_0n-i0pd._.js.map} +0 -0
  395. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_index_mjs_0q7-hjh._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_13pos4j._.js.map} +0 -0
  396. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_index_mjs_165bzk6._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_17b4pqr._.js.map} +0 -0
  397. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_index_mjs_1hfbfb5._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_1bkcmom._.js.map} +0 -0
  398. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_index_mjs_1sa-8tw._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_1hlj_3l._.js.map} +0 -0
  399. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_index_mjs_1xq_gof._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_1ip-sor._.js.map} +0 -0
  400. /package/.next/server/chunks/{[root-of-the-server]__0uk0tga._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_1pex5o1._.js.map} +0 -0
  401. /package/.next/server/chunks/{[root-of-the-server]__1jeqjz6._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_1s8lc8_._.js.map} +0 -0
  402. /package/.next/server/chunks/{[root-of-the-server]__1kfohrq._.js.map → [root-of-the-server]__0e59y5j._.js.map} +0 -0
  403. /package/.next/static/{cmDLf8WOU5PVmUOcSPh2H → ICaoXcRMmgrIFWk8C_Z6D}/_buildManifest.js +0 -0
  404. /package/.next/static/{cmDLf8WOU5PVmUOcSPh2H → ICaoXcRMmgrIFWk8C_Z6D}/_clientMiddlewareManifest.js +0 -0
  405. /package/.next/static/{cmDLf8WOU5PVmUOcSPh2H → ICaoXcRMmgrIFWk8C_Z6D}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/app/api/backlinks/route.ts","../../../node_modules/.pnpm/next%4016.3.6_%40babel%2Bcore%407.29.7_%40types%2Bnode%4022.20.4_react-dom%4019.3.0_react%4019.3.0__react%4019.3.0/node_modules/next/src/build/templates/app-route.ts"],"sourcesContent":["import { NextRequest, NextResponse } from 'next/server'\r\nimport { findBacklinks, getConfiguredRoot } from '@/lib/core'\r\n\r\nexport async function GET(req: NextRequest) {\r\n const root = req.nextUrl.searchParams.get('root') || getConfiguredRoot()\r\n const docPath = req.nextUrl.searchParams.get('path')\r\n if (!docPath) {\r\n return NextResponse.json({ error: 'path required' }, { status: 400 })\r\n }\r\n const links = await findBacklinks(docPath, root)\r\n return NextResponse.json({ links })\r\n}\r\n","import {\n AppRouteRouteModule,\n type AppRouteRouteHandlerContext,\n type AppRouteRouteModuleOptions,\n} from '../../server/route-modules/app-route/module.compiled'\nimport { RouteKind } from '../../server/route-kind'\nimport { patchFetch as _patchFetch } from '../../server/lib/patch-fetch'\nimport type { IncomingMessage, ServerResponse } from 'node:http'\nimport {\n addRequestMeta,\n getRequestMeta,\n setRequestMeta,\n type RequestMeta,\n} from '../../server/request-meta'\nimport {\n getTracer,\n type Span,\n SpanKind,\n SpanStatusCode,\n} from '../../server/lib/trace/tracer'\nimport { setManifestsSingleton } from '../../server/app-render/manifests-singleton'\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport { NodeNextRequest, NodeNextResponse } from '../../server/base-http/node'\nimport {\n NextRequestAdapter,\n signalFromNodeResponse,\n} from '../../server/web/spec-extension/adapters/next-request'\nimport { BaseServerSpan } from '../../server/lib/trace/constants'\nimport { getRevalidateReason } from '../../server/instrumentation/utils'\nimport { sendResponse } from '../../server/send-response'\nimport {\n fromNodeOutgoingHttpHeaders,\n toNodeOutgoingHttpHeaders,\n} from '../../server/web/utils'\nimport { getCacheControlHeader } from '../../server/lib/cache-control'\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from '../../lib/constants'\nimport { NoFallbackError } from '../../shared/lib/no-fallback-error.external'\nimport {\n CachedRouteKind,\n type ResponseCacheEntry,\n type ResponseGenerator,\n} from '../../server/response-cache'\n\n// These are injected by the loader afterwards. This is injected as a variable\n// instead of a replacement because this could also be `undefined` instead of\n// an empty string.\ndeclare const nextConfigOutput: AppRouteRouteModuleOptions['nextConfigOutput']\n\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\n// INJECT:nextConfigOutput\n\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: 'VAR_DEFINITION_PAGE',\n pathname: 'VAR_DEFINITION_PATHNAME',\n filename: 'VAR_DEFINITION_FILENAME',\n bundlePath: 'VAR_DEFINITION_BUNDLE_PATH',\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: 'VAR_RESOLVED_PAGE_PATH',\n nextConfigOutput,\n // The lazy require factory ensures that:\n // - In dev: devRequestTimingInternalsEnd is set before userland executes,\n // correctly attributing module load time to application-code rather than\n // framework internals.\n // - In all modes: async modules (route files with top-level await) are\n // handled correctly — require() returns a Promise for such modules, which\n // ensureUserland() awaits before the first request is handled.\n userland: () => require('VAR_USERLAND') as typeof import('VAR_USERLAND'),\n // In Turbopack dev mode, also provide a synchronous per-request getter so\n // server HMR updates are picked up without re-executing the entry chunk.\n // Using require() (synchronous) avoids adding async overhead that would be\n // incorrectly attributed to application-code time in devRequestTiming.\n ...(process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER\n ? {\n getUserland: () =>\n require('VAR_USERLAND') as typeof import('VAR_USERLAND'),\n }\n : {}),\n})\n\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule\n\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage,\n })\n}\n\nexport {\n routeModule,\n workAsyncStorage,\n workUnitAsyncStorage,\n serverHooks,\n patchFetch,\n}\n\nexport async function handler(\n req: IncomingMessage,\n res: ServerResponse,\n ctx: {\n waitUntil?: (prom: Promise<void>) => void\n requestMeta?: RequestMeta\n }\n) {\n if (ctx.requestMeta) {\n setRequestMeta(req, ctx.requestMeta)\n }\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint())\n }\n let srcPage = 'VAR_DEFINITION_PAGE'\n\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/'\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/'\n }\n const multiZoneDraftMode = process.env\n .__NEXT_MULTI_ZONE_DRAFT_MODE as any as boolean\n\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode,\n })\n\n if (!prepareResult) {\n res.statusCode = 400\n res.end('Bad Request')\n ctx.waitUntil?.(Promise.resolve())\n return null\n }\n\n const {\n buildId,\n deploymentId,\n params,\n nextConfig,\n parsedUrl,\n isDraftMode,\n prerenderManifest,\n routerServerContext,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n resolvedPathname,\n clientReferenceManifest,\n serverActionsManifest,\n } = prepareResult\n\n const normalizedSrcPage = normalizeAppPath(srcPage)\n\n let isIsr = Boolean(\n prerenderManifest.dynamicRoutes[normalizedSrcPage] ||\n prerenderManifest.routes[resolvedPathname]\n )\n\n const render404 = async () => {\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext?.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false)\n } else {\n res.end('This page could not be found')\n }\n return null\n }\n\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname])\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage]\n\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.adapterPath) {\n return await render404()\n }\n throw new NoFallbackError()\n }\n }\n }\n\n let cacheKey: string | null = null\n\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey\n }\n\n const supportsDynamicResponse: boolean =\n // If we're in development, we always support dynamic HTML\n routeModule.isDev === true ||\n // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr\n\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse\n\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest,\n })\n }\n\n const method = req.method || 'GET'\n const tracer = getTracer()\n const activeSpan = tracer.getActiveScopeSpan()\n const isWrappedByNextServer = Boolean(\n routerServerContext?.isWrappedByNextServer\n )\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'))\n\n const incrementalCache =\n getRequestMeta(req, 'incrementalCache') ||\n (await routeModule.getIncrementalCache(\n req,\n nextConfig,\n prerenderManifest,\n isMinimalMode\n ))\n\n incrementalCache?.resetRequestCache()\n ;(globalThis as any).__incrementalCache = incrementalCache\n\n const context: AppRouteRouteHandlerContext = {\n params,\n previewProps: prerenderManifest.preview,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts),\n useCacheTimeout: nextConfig.experimental.useCacheTimeout,\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n validationLevel: nextConfig.experimental.instantInsights.validationLevel,\n supportsDynamicResponse,\n incrementalCache,\n hmrRefreshHash: getRequestMeta(req, 'hmrRefreshHash'),\n cacheLifeProfiles: nextConfig.cacheLife,\n staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,\n waitUntil: ctx.waitUntil,\n onClose: (cb) => {\n res.on('close', cb)\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (\n error,\n _request,\n errorContext,\n silenceLog\n ) =>\n routeModule.onRequestError(\n req,\n error,\n errorContext,\n silenceLog,\n routerServerContext\n ),\n },\n sharedContext: {\n buildId,\n deploymentId,\n },\n }\n const nodeNextReq = new NodeNextRequest(req)\n const nodeNextRes = new NodeNextResponse(res)\n\n const nextReq = NextRequestAdapter.fromNodeNextRequest(\n nodeNextReq,\n signalFromNodeResponse(res)\n )\n\n const responseGenerator: ResponseGenerator = async ({\n previousCacheEntry,\n }) => {\n try {\n if (\n !isMinimalMode &&\n isOnDemandRevalidate &&\n revalidateOnlyGenerated &&\n !previousCacheEntry\n ) {\n res.statusCode = 404\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED')\n res.end('This page could not be found')\n return null\n }\n\n const response = await routeModule.handle(nextReq, context)\n\n ;(req as any).fetchMetrics = (context.renderOpts as any).fetchMetrics\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil\n\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil)\n pendingWaitUntil = undefined\n }\n }\n const cacheTags = context.renderOpts.collectedTags\n\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob()\n\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers)\n\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags\n }\n\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type\n }\n\n const revalidate =\n typeof context.renderOpts.collectedRevalidate === 'undefined' ||\n context.renderOpts.collectedRevalidate >= INFINITE_CACHE\n ? false\n : context.renderOpts.collectedRevalidate\n\n const expire =\n typeof context.renderOpts.collectedExpire === 'undefined' ||\n context.renderOpts.collectedExpire >= INFINITE_CACHE\n ? // Fall back to the global `expireTime` config when the\n // route has a numeric `revalidate` but didn't declare an\n // explicit `expire` (e.g. via `cacheLife`). This mirrors the\n // build-time fallback in `build/index.ts` so cache entries\n // and the response Cache-Control header agree on the route's\n // effective expire. Routes that opt out of revalidation\n // (`revalidate: false`) or that are dynamic (`revalidate: 0`)\n // keep `expire: undefined`.\n revalidate !== false && revalidate > 0\n ? nextConfig.expireTime\n : undefined\n : context.renderOpts.collectedExpire\n\n // Create the cache entry for the response.\n const cacheEntry: ResponseCacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers,\n },\n cacheControl: { revalidate, expire },\n }\n\n return cacheEntry\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, pendingWaitUntil)\n return null\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry?.isStale) {\n const silenceLog = false\n await routeModule.onRequestError(\n req,\n err,\n {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate,\n }),\n },\n silenceLog,\n routerServerContext\n )\n }\n throw err\n }\n }\n\n const handleResponse = async (\n currentSpan: Span | undefined,\n parentSpan: Span | undefined\n ) => {\n try {\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode,\n })\n\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return\n }\n\n if (cacheEntry?.value?.kind !== CachedRouteKind.APP_ROUTE) {\n throw new Error(\n `Invariant: app-route received invalid cache entry ${cacheEntry?.value?.kind}`\n )\n }\n\n if (!isMinimalMode) {\n res.setHeader(\n 'x-nextjs-cache',\n isOnDemandRevalidate\n ? 'REVALIDATED'\n : cacheEntry.isMiss\n ? 'MISS'\n : cacheEntry.isStale\n ? 'STALE'\n : 'HIT'\n )\n }\n\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader(\n 'Cache-Control',\n 'private, no-cache, no-store, max-age=0, must-revalidate'\n )\n }\n\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers)\n\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER)\n }\n\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (\n cacheEntry.cacheControl &&\n !res.getHeader('Cache-Control') &&\n !headers.get('Cache-Control')\n ) {\n headers.set(\n 'Cache-Control',\n getCacheControlHeader(cacheEntry.cacheControl)\n )\n }\n\n await sendResponse(\n nodeNextReq,\n nodeNextRes,\n // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200,\n })\n )\n return\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false\n await routeModule.onRequestError(\n req,\n err,\n {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate,\n }),\n },\n silenceLog,\n routerServerContext\n )\n }\n\n // rethrow so that we can handle serving error page\n\n // If this is during static generation, throw the error again.\n if (isIsr) throw err\n\n // Otherwise, send a 500 response.\n await sendResponse(\n nodeNextReq,\n nodeNextRes,\n new Response(null, { status: 500 })\n )\n return\n } finally {\n ;(() => {\n if (!currentSpan) {\n return\n }\n\n let statusCode = res.statusCode\n\n currentSpan.setAttributes({\n 'http.status_code': statusCode,\n 'next.rsc': false,\n })\n\n if (statusCode && statusCode >= 500) {\n // For 5xx status codes: SHOULD be set to 'Error' span status.\n // x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status\n currentSpan.setStatus({\n code: SpanStatusCode.ERROR,\n })\n // For span status 'Error', SHOULD set 'error.type' attribute.\n currentSpan.setAttribute('error.type', statusCode.toString())\n }\n\n const rootSpanAttributes = tracer.getRootSpanAttributes()\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return\n }\n\n if (\n rootSpanAttributes.get('next.span_type') !==\n BaseServerSpan.handleRequest\n ) {\n console.warn(\n `Unexpected root span type '${rootSpanAttributes.get(\n 'next.span_type'\n )}'. Please report this Next.js issue https://github.com/vercel/next.js`\n )\n return\n }\n\n const route = rootSpanAttributes.get('next.route') || normalizedSrcPage\n const name = `${method} ${route}`\n\n currentSpan.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name,\n })\n currentSpan.updateName(name)\n\n // Propagate http.route to the parent span if one exists (e.g.\n // a platform-created HTTP span in adapter deployments).\n if (parentSpan && parentSpan !== currentSpan) {\n parentSpan.setAttribute('http.route', route)\n parentSpan.updateName(name)\n }\n })()\n }\n }\n\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (isWrappedByNextServer && activeSpan) {\n await handleResponse(activeSpan, undefined)\n } else {\n let parentSpan = tracer.getActiveScopeSpan()\n await tracer.withPropagatedContext(\n req.headers,\n () =>\n tracer.trace(\n BaseServerSpan.handleRequest,\n {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url,\n },\n },\n (span) => handleResponse(span, parentSpan)\n ),\n undefined,\n !isWrappedByNextServer\n )\n }\n}\n"],"names":["GET","req","root","nextUrl","searchParams","get","docPath","json","error","status","links","AppRouteRouteModule","RouteKind","patchFetch","_patchFetch","addRequestMeta","getRequestMeta","setRequestMeta","getTracer","SpanKind","SpanStatusCode","setManifestsSingleton","normalizeAppPath","NodeNextRequest","NodeNextResponse","NextRequestAdapter","signalFromNodeResponse","BaseServerSpan","getRevalidateReason","sendResponse","fromNodeOutgoingHttpHeaders","toNodeOutgoingHttpHeaders","getCacheControlHeader","INFINITE_CACHE","NEXT_CACHE_TAGS_HEADER","NoFallbackError","CachedRouteKind","routeModule","definition","kind","APP_ROUTE","page","pathname","filename","bundlePath","distDir","process","env","__NEXT_RELATIVE_DIST_DIR","relativeProjectDir","__NEXT_RELATIVE_PROJECT_DIR","resolvedPagePath","nextConfigOutput","userland","require","TURBOPACK","__NEXT_DEV_SERVER","getUserland","workAsyncStorage","workUnitAsyncStorage","serverHooks","handler","res","ctx","requestMeta","isDev","hrtime","bigint","srcPage","replace","multiZoneDraftMode","__NEXT_MULTI_ZONE_DRAFT_MODE","prepareResult","prepare","statusCode","end","waitUntil","Promise","resolve","buildId","deploymentId","params","nextConfig","parsedUrl","isDraftMode","prerenderManifest","routerServerContext","isOnDemandRevalidate","revalidateOnlyGenerated","resolvedPathname","clientReferenceManifest","serverActionsManifest","normalizedSrcPage","isIsr","Boolean","dynamicRoutes","routes","render404","isPrerendered","prerenderInfo","fallback","adapterPath","cacheKey","supportsDynamicResponse","isStaticGeneration","method","tracer","activeSpan","getActiveScopeSpan","isWrappedByNextServer","isMinimalMode","incrementalCache","getIncrementalCache","resetRequestCache","globalThis","__incrementalCache","context","previewProps","preview","renderOpts","experimental","authInterrupts","useCacheTimeout","cacheComponents","validationLevel","instantInsights","hmrRefreshHash","cacheLifeProfiles","cacheLife","staticPageGenerationTimeout","onClose","cb","on","onAfterTaskError","undefined","onInstrumentationRequestError","_request","errorContext","silenceLog","onRequestError","sharedContext","nodeNextReq","nodeNextRes","nextReq","fromNodeNextRequest","responseGenerator","previousCacheEntry","setHeader","response","handle","fetchMetrics","pendingWaitUntil","cacheTags","collectedTags","blob","headers","type","revalidate","collectedRevalidate","expire","collectedExpire","expireTime","cacheEntry","value","body","Buffer","from","arrayBuffer","cacheControl","err","isStale","routerKind","routePath","routeType","revalidateReason","handleResponse","currentSpan","parentSpan","routeKind","isFallback","isRoutePPREnabled","Error","isMiss","delete","getHeader","set","Response","setAttributes","setStatus","code","ERROR","setAttribute","toString","rootSpanAttributes","getRootSpanAttributes","handleRequest","console","warn","route","name","updateName","withPropagatedContext","trace","spanName","SERVER","attributes","url","span"],"mappings":"smDAAA,IAAA,EAAA,EAAA,CAAA,CAAA,QACA,EAAA,EAAA,CAAA,CAAA,iBAEO,eAAeA,EAAIC,CAAgB,EACxC,IAAMC,EAAOD,EAAIE,OAAO,CAACC,YAAY,CAACC,GAAG,CAAC,SAAW,CAAA,EAAA,EAAA,iBAAA,AAAiB,IAChEC,EAAUL,EAAIE,OAAO,CAACC,YAAY,CAACC,GAAG,CAAC,QAC7C,GAAI,CAACC,EACH,OADY,AACL,EAAA,YAAY,CAACC,IAAI,CAAC,CAAEC,MAAO,eAAgB,EAAG,CAAEC,OAAQ,GAAI,GAErE,IAAMC,EAAQ,MAAM,CAAA,EAAA,EAAA,aAAA,AAAa,EAACJ,EAASJ,GAC3C,OAAO,EAAA,YAAY,CAACK,IAAI,CAAC,OAAEG,CAAM,EACnC,2FCXA,IAAA,EAIO,EAAA,CAAA,AAHLC,CAGK,QACP,EAA0B,EAAyB,CAA1CC,AAA0C,CAAA,EAAA,EAJ9B,GAGwC,CAE7D,AADkB,EACwB,EAAA,AAFnC,CAEEC,AAAiC,CAAA,EADhB,CAC8C,KAExE,EAGEI,EAEK,CAPgBH,AAGrBC,AAIK,CAAA,KAFS,GAGhB,EARkC,AAYlB,EACT,CAJLG,AANc,AAIT,AAMA,CAAA,CATLF,CASK,EAbmC,GAOR,CAEvB,AAKX,EAHEG,AAGoC,EAAA,CAA7BE,AAA6B,CADA,AACA,CAVtB,EACdJ,CAMQ,EACRG,EAGF,EAAiC,EAAA,CAAA,AAAxBE,CAD0E,AAClD,KAA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ChD2G,EAAO,CAAA,EAAG9F,EAAO,CAAC,EAAE6F,EAAAA,CAAO,CAEjCtB,EAAYW,aAAa,CAAC,CACxB,aAAcW,EACd,aAAcA,EACd,iBAAkBC,CACpB,GACAvB,EAAYwB,UAAU,CAACD,GAInBtB,GAAcA,IAAeD,IAC/BC,EAAWc,OADiC,KACrB,CAAC,aAAcO,GACtCrB,EAAWuB,UAAU,CAACD,IAE1B,CAAA,EACF,CACF,EAIA,GAAI1F,GAAyBF,EAC3B,MAAMoE,EAAepE,EADkB,KACN2B,OAC5B,CACL,IAAI2C,EAAavE,EAAOE,kBAAkB,EAC1C,OAAMF,EAAO+F,qBAAqB,CAChCxM,EAAI0J,OAAO,CACX,IACEjD,EAAOgG,KAAK,CACV/K,EAAAA,cAAAA,CAAewK,aAAa,CAC5B,CACEQ,SAAU,CAAA,EAAGlG,EAAO,CAAC,EAAErC,EAAAA,CAAS,CAChC7B,KAAMpB,EAAAA,QAAAA,CAASyL,MAAM,CACrBC,WAAY,CACV,cAAepG,EACf,cAAexG,EAAI6M,GAAG,AACxB,CACF,EACA,AAACC,GAAShC,EAAegC,EAAM9B,SAEnC3C,EACA,CAACzB,EAEL,CACF,mCAhgBA,SAAShG,EACP,MAAA,CAAA,EAAOC,EAAAA,UAAAA,EAAY,kBACjB4C,uBACAC,CACF,EACF","ignoreList":[1]}
1
+ {"version":3,"sources":["../../../src/app/api/backlinks/route.ts","../../../node_modules/.pnpm/next%4016.3.6_%40babel%2Bcore%407.29.7_%40types%2Bnode%4022.20.4_react-dom%4019.3.0_react%4019.3.0__react%4019.3.0/node_modules/next/src/build/templates/app-route.ts"],"sourcesContent":["import { NextRequest, NextResponse } from 'next/server'\r\nimport { findBacklinks, getConfiguredRoot } from '@/lib/core'\r\n\r\nexport async function GET(req: NextRequest) {\r\n const root = req.nextUrl.searchParams.get('root') || getConfiguredRoot()\r\n const docPath = req.nextUrl.searchParams.get('path')\r\n if (!docPath) {\r\n return NextResponse.json({ error: 'path required' }, { status: 400 })\r\n }\r\n const links = await findBacklinks(docPath, root)\r\n return NextResponse.json({ links })\r\n}\r\n","import {\n AppRouteRouteModule,\n type AppRouteRouteHandlerContext,\n type AppRouteRouteModuleOptions,\n} from '../../server/route-modules/app-route/module.compiled'\nimport { RouteKind } from '../../server/route-kind'\nimport { patchFetch as _patchFetch } from '../../server/lib/patch-fetch'\nimport type { IncomingMessage, ServerResponse } from 'node:http'\nimport {\n addRequestMeta,\n getRequestMeta,\n setRequestMeta,\n type RequestMeta,\n} from '../../server/request-meta'\nimport {\n getTracer,\n type Span,\n SpanKind,\n SpanStatusCode,\n} from '../../server/lib/trace/tracer'\nimport { setManifestsSingleton } from '../../server/app-render/manifests-singleton'\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport { NodeNextRequest, NodeNextResponse } from '../../server/base-http/node'\nimport {\n NextRequestAdapter,\n signalFromNodeResponse,\n} from '../../server/web/spec-extension/adapters/next-request'\nimport { BaseServerSpan } from '../../server/lib/trace/constants'\nimport { getRevalidateReason } from '../../server/instrumentation/utils'\nimport { sendResponse } from '../../server/send-response'\nimport {\n fromNodeOutgoingHttpHeaders,\n toNodeOutgoingHttpHeaders,\n} from '../../server/web/utils'\nimport { getCacheControlHeader } from '../../server/lib/cache-control'\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from '../../lib/constants'\nimport { NoFallbackError } from '../../shared/lib/no-fallback-error.external'\nimport {\n CachedRouteKind,\n type ResponseCacheEntry,\n type ResponseGenerator,\n} from '../../server/response-cache'\n\n// These are injected by the loader afterwards. This is injected as a variable\n// instead of a replacement because this could also be `undefined` instead of\n// an empty string.\ndeclare const nextConfigOutput: AppRouteRouteModuleOptions['nextConfigOutput']\n\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\n// INJECT:nextConfigOutput\n\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: 'VAR_DEFINITION_PAGE',\n pathname: 'VAR_DEFINITION_PATHNAME',\n filename: 'VAR_DEFINITION_FILENAME',\n bundlePath: 'VAR_DEFINITION_BUNDLE_PATH',\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: 'VAR_RESOLVED_PAGE_PATH',\n nextConfigOutput,\n // The lazy require factory ensures that:\n // - In dev: devRequestTimingInternalsEnd is set before userland executes,\n // correctly attributing module load time to application-code rather than\n // framework internals.\n // - In all modes: async modules (route files with top-level await) are\n // handled correctly — require() returns a Promise for such modules, which\n // ensureUserland() awaits before the first request is handled.\n userland: () => require('VAR_USERLAND') as typeof import('VAR_USERLAND'),\n // In Turbopack dev mode, also provide a synchronous per-request getter so\n // server HMR updates are picked up without re-executing the entry chunk.\n // Using require() (synchronous) avoids adding async overhead that would be\n // incorrectly attributed to application-code time in devRequestTiming.\n ...(process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER\n ? {\n getUserland: () =>\n require('VAR_USERLAND') as typeof import('VAR_USERLAND'),\n }\n : {}),\n})\n\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule\n\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage,\n })\n}\n\nexport {\n routeModule,\n workAsyncStorage,\n workUnitAsyncStorage,\n serverHooks,\n patchFetch,\n}\n\nexport async function handler(\n req: IncomingMessage,\n res: ServerResponse,\n ctx: {\n waitUntil?: (prom: Promise<void>) => void\n requestMeta?: RequestMeta\n }\n) {\n if (ctx.requestMeta) {\n setRequestMeta(req, ctx.requestMeta)\n }\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint())\n }\n let srcPage = 'VAR_DEFINITION_PAGE'\n\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/'\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/'\n }\n const multiZoneDraftMode = process.env\n .__NEXT_MULTI_ZONE_DRAFT_MODE as any as boolean\n\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode,\n })\n\n if (!prepareResult) {\n res.statusCode = 400\n res.end('Bad Request')\n ctx.waitUntil?.(Promise.resolve())\n return null\n }\n\n const {\n buildId,\n deploymentId,\n params,\n nextConfig,\n parsedUrl,\n isDraftMode,\n prerenderManifest,\n routerServerContext,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n resolvedPathname,\n clientReferenceManifest,\n serverActionsManifest,\n } = prepareResult\n\n const normalizedSrcPage = normalizeAppPath(srcPage)\n\n let isIsr = Boolean(\n prerenderManifest.dynamicRoutes[normalizedSrcPage] ||\n prerenderManifest.routes[resolvedPathname]\n )\n\n const render404 = async () => {\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext?.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false)\n } else {\n res.end('This page could not be found')\n }\n return null\n }\n\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname])\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage]\n\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.adapterPath) {\n return await render404()\n }\n throw new NoFallbackError()\n }\n }\n }\n\n let cacheKey: string | null = null\n\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey\n }\n\n const supportsDynamicResponse: boolean =\n // If we're in development, we always support dynamic HTML\n routeModule.isDev === true ||\n // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr\n\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse\n\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest,\n })\n }\n\n const method = req.method || 'GET'\n const tracer = getTracer()\n const activeSpan = tracer.getActiveScopeSpan()\n const isWrappedByNextServer = Boolean(\n routerServerContext?.isWrappedByNextServer\n )\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'))\n\n const incrementalCache =\n getRequestMeta(req, 'incrementalCache') ||\n (await routeModule.getIncrementalCache(\n req,\n nextConfig,\n prerenderManifest,\n isMinimalMode\n ))\n\n incrementalCache?.resetRequestCache()\n ;(globalThis as any).__incrementalCache = incrementalCache\n\n const context: AppRouteRouteHandlerContext = {\n params,\n previewProps: prerenderManifest.preview,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts),\n useCacheTimeout: nextConfig.experimental.useCacheTimeout,\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n validationLevel: nextConfig.experimental.instantInsights.validationLevel,\n supportsDynamicResponse,\n incrementalCache,\n hmrRefreshHash: getRequestMeta(req, 'hmrRefreshHash'),\n cacheLifeProfiles: nextConfig.cacheLife,\n staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,\n waitUntil: ctx.waitUntil,\n onClose: (cb) => {\n res.on('close', cb)\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (\n error,\n _request,\n errorContext,\n silenceLog\n ) =>\n routeModule.onRequestError(\n req,\n error,\n errorContext,\n silenceLog,\n routerServerContext\n ),\n },\n sharedContext: {\n buildId,\n deploymentId,\n },\n }\n const nodeNextReq = new NodeNextRequest(req)\n const nodeNextRes = new NodeNextResponse(res)\n\n const nextReq = NextRequestAdapter.fromNodeNextRequest(\n nodeNextReq,\n signalFromNodeResponse(res)\n )\n\n const responseGenerator: ResponseGenerator = async ({\n previousCacheEntry,\n }) => {\n try {\n if (\n !isMinimalMode &&\n isOnDemandRevalidate &&\n revalidateOnlyGenerated &&\n !previousCacheEntry\n ) {\n res.statusCode = 404\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED')\n res.end('This page could not be found')\n return null\n }\n\n const response = await routeModule.handle(nextReq, context)\n\n ;(req as any).fetchMetrics = (context.renderOpts as any).fetchMetrics\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil\n\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil)\n pendingWaitUntil = undefined\n }\n }\n const cacheTags = context.renderOpts.collectedTags\n\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob()\n\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers)\n\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags\n }\n\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type\n }\n\n const revalidate =\n typeof context.renderOpts.collectedRevalidate === 'undefined' ||\n context.renderOpts.collectedRevalidate >= INFINITE_CACHE\n ? false\n : context.renderOpts.collectedRevalidate\n\n const expire =\n typeof context.renderOpts.collectedExpire === 'undefined' ||\n context.renderOpts.collectedExpire >= INFINITE_CACHE\n ? // Fall back to the global `expireTime` config when the\n // route has a numeric `revalidate` but didn't declare an\n // explicit `expire` (e.g. via `cacheLife`). This mirrors the\n // build-time fallback in `build/index.ts` so cache entries\n // and the response Cache-Control header agree on the route's\n // effective expire. Routes that opt out of revalidation\n // (`revalidate: false`) or that are dynamic (`revalidate: 0`)\n // keep `expire: undefined`.\n revalidate !== false && revalidate > 0\n ? nextConfig.expireTime\n : undefined\n : context.renderOpts.collectedExpire\n\n // Create the cache entry for the response.\n const cacheEntry: ResponseCacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers,\n },\n cacheControl: { revalidate, expire },\n }\n\n return cacheEntry\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, pendingWaitUntil)\n return null\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry?.isStale) {\n const silenceLog = false\n await routeModule.onRequestError(\n req,\n err,\n {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate,\n }),\n },\n silenceLog,\n routerServerContext\n )\n }\n throw err\n }\n }\n\n const handleResponse = async (\n currentSpan: Span | undefined,\n parentSpan: Span | undefined\n ) => {\n try {\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode,\n })\n\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return\n }\n\n if (cacheEntry?.value?.kind !== CachedRouteKind.APP_ROUTE) {\n throw new Error(\n `Invariant: app-route received invalid cache entry ${cacheEntry?.value?.kind}`\n )\n }\n\n if (!isMinimalMode) {\n res.setHeader(\n 'x-nextjs-cache',\n isOnDemandRevalidate\n ? 'REVALIDATED'\n : cacheEntry.isMiss\n ? 'MISS'\n : cacheEntry.isStale\n ? 'STALE'\n : 'HIT'\n )\n }\n\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader(\n 'Cache-Control',\n 'private, no-cache, no-store, max-age=0, must-revalidate'\n )\n }\n\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers)\n\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER)\n }\n\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (\n cacheEntry.cacheControl &&\n !res.getHeader('Cache-Control') &&\n !headers.get('Cache-Control')\n ) {\n headers.set(\n 'Cache-Control',\n getCacheControlHeader(cacheEntry.cacheControl)\n )\n }\n\n await sendResponse(\n nodeNextReq,\n nodeNextRes,\n // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200,\n })\n )\n return\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false\n await routeModule.onRequestError(\n req,\n err,\n {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate,\n }),\n },\n silenceLog,\n routerServerContext\n )\n }\n\n // rethrow so that we can handle serving error page\n\n // If this is during static generation, throw the error again.\n if (isIsr) throw err\n\n // Otherwise, send a 500 response.\n await sendResponse(\n nodeNextReq,\n nodeNextRes,\n new Response(null, { status: 500 })\n )\n return\n } finally {\n ;(() => {\n if (!currentSpan) {\n return\n }\n\n let statusCode = res.statusCode\n\n currentSpan.setAttributes({\n 'http.status_code': statusCode,\n 'next.rsc': false,\n })\n\n if (statusCode && statusCode >= 500) {\n // For 5xx status codes: SHOULD be set to 'Error' span status.\n // x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status\n currentSpan.setStatus({\n code: SpanStatusCode.ERROR,\n })\n // For span status 'Error', SHOULD set 'error.type' attribute.\n currentSpan.setAttribute('error.type', statusCode.toString())\n }\n\n const rootSpanAttributes = tracer.getRootSpanAttributes()\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return\n }\n\n if (\n rootSpanAttributes.get('next.span_type') !==\n BaseServerSpan.handleRequest\n ) {\n console.warn(\n `Unexpected root span type '${rootSpanAttributes.get(\n 'next.span_type'\n )}'. Please report this Next.js issue https://github.com/vercel/next.js`\n )\n return\n }\n\n const route = rootSpanAttributes.get('next.route') || normalizedSrcPage\n const name = `${method} ${route}`\n\n currentSpan.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name,\n })\n currentSpan.updateName(name)\n\n // Propagate http.route to the parent span if one exists (e.g.\n // a platform-created HTTP span in adapter deployments).\n if (parentSpan && parentSpan !== currentSpan) {\n parentSpan.setAttribute('http.route', route)\n parentSpan.updateName(name)\n }\n })()\n }\n }\n\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (isWrappedByNextServer && activeSpan) {\n await handleResponse(activeSpan, undefined)\n } else {\n let parentSpan = tracer.getActiveScopeSpan()\n await tracer.withPropagatedContext(\n req.headers,\n () =>\n tracer.trace(\n BaseServerSpan.handleRequest,\n {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url,\n },\n },\n (span) => handleResponse(span, parentSpan)\n ),\n undefined,\n !isWrappedByNextServer\n )\n }\n}\n"],"names":["GET","req","root","nextUrl","searchParams","get","docPath","json","error","status","links","AppRouteRouteModule","RouteKind","patchFetch","_patchFetch","addRequestMeta","getRequestMeta","setRequestMeta","getTracer","SpanKind","SpanStatusCode","setManifestsSingleton","normalizeAppPath","NodeNextRequest","NodeNextResponse","NextRequestAdapter","signalFromNodeResponse","BaseServerSpan","getRevalidateReason","sendResponse","fromNodeOutgoingHttpHeaders","toNodeOutgoingHttpHeaders","getCacheControlHeader","INFINITE_CACHE","NEXT_CACHE_TAGS_HEADER","NoFallbackError","CachedRouteKind","routeModule","definition","kind","APP_ROUTE","page","pathname","filename","bundlePath","distDir","process","env","__NEXT_RELATIVE_DIST_DIR","relativeProjectDir","__NEXT_RELATIVE_PROJECT_DIR","resolvedPagePath","nextConfigOutput","userland","require","TURBOPACK","__NEXT_DEV_SERVER","getUserland","workAsyncStorage","workUnitAsyncStorage","serverHooks","handler","res","ctx","requestMeta","isDev","hrtime","bigint","srcPage","replace","multiZoneDraftMode","__NEXT_MULTI_ZONE_DRAFT_MODE","prepareResult","prepare","statusCode","end","waitUntil","Promise","resolve","buildId","deploymentId","params","nextConfig","parsedUrl","isDraftMode","prerenderManifest","routerServerContext","isOnDemandRevalidate","revalidateOnlyGenerated","resolvedPathname","clientReferenceManifest","serverActionsManifest","normalizedSrcPage","isIsr","Boolean","dynamicRoutes","routes","render404","isPrerendered","prerenderInfo","fallback","adapterPath","cacheKey","supportsDynamicResponse","isStaticGeneration","method","tracer","activeSpan","getActiveScopeSpan","isWrappedByNextServer","isMinimalMode","incrementalCache","getIncrementalCache","resetRequestCache","globalThis","__incrementalCache","context","previewProps","preview","renderOpts","experimental","authInterrupts","useCacheTimeout","cacheComponents","validationLevel","instantInsights","hmrRefreshHash","cacheLifeProfiles","cacheLife","staticPageGenerationTimeout","onClose","cb","on","onAfterTaskError","undefined","onInstrumentationRequestError","_request","errorContext","silenceLog","onRequestError","sharedContext","nodeNextReq","nodeNextRes","nextReq","fromNodeNextRequest","responseGenerator","previousCacheEntry","setHeader","response","handle","fetchMetrics","pendingWaitUntil","cacheTags","collectedTags","blob","headers","type","revalidate","collectedRevalidate","expire","collectedExpire","expireTime","cacheEntry","value","body","Buffer","from","arrayBuffer","cacheControl","err","isStale","routerKind","routePath","routeType","revalidateReason","handleResponse","currentSpan","parentSpan","routeKind","isFallback","isRoutePPREnabled","Error","isMiss","delete","getHeader","set","Response","setAttributes","setStatus","code","ERROR","setAttribute","toString","rootSpanAttributes","getRootSpanAttributes","handleRequest","console","warn","route","name","updateName","withPropagatedContext","trace","spanName","SERVER","attributes","url","span"],"mappings":"2zDAAA,IAAA,EAAA,EAAA,CAAA,CAAA,QACA,EAAA,EAAA,CAAA,CAAA,QAEO,eAAeA,EAAIC,CAAgB,EACxC,IAAMC,EAAOD,EAAIE,OAAO,CAACC,YAAY,CAACC,GAAG,CAAC,SAAW,CAAA,EAA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AOgG,KAAK,CACV/K,EAAAA,cAAAA,CAAewK,aAAa,CAC5B,CACEQ,SAAU,CAAA,EAAGlG,EAAO,CAAC,EAAErC,EAAAA,CAAS,CAChC7B,KAAMpB,EAAAA,QAAAA,CAASyL,MAAM,CACrBC,WAAY,CACV,cAAepG,EACf,cAAexG,EAAI6M,GAAG,AACxB,CACF,EACA,AAACC,GAAShC,EAAegC,EAAM9B,SAEnC3C,EACA,CAACzB,EAEL,CACF,mCAhgBA,SAAShG,EACP,MAAA,CAAA,EAAOC,EAAAA,UAAAA,EAAY,kBACjB4C,uBACAC,CACF,EACF","ignoreList":[1]}
@@ -1,4 +1,4 @@
1
- module.exports=[912714,(e,t,i)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},601457,(e,t,i)=>{t.exports=e.x("node:readline",()=>require("node:readline"))},193e3,e=>{"use strict";var t,i,r,s,a,o,n,l,c,d,h,f,m,_,u,w,y,p,v,g,P,F,S,b,E,G,T,k,O,N,I,$,M,R,x,A,D,L,j,W,U,C,q,z=e.i(243652),Y=e.i(912714),B=e.i(902157),K=e.i(750227),V=e.i(874533),H=e.i(666680),X=e.i(601457),J=e.i(683520),Z=e.i(438237);function Q(e){if("object"!==e.inputSchema.type)throw Error(`JSON schema for tool "${e.name}" must be an object, but got ${e.inputSchema.type}`);return{type:"custom",name:e.name,input_schema:e.inputSchema,description:e.description,run:e.run,parse:e=>e,...e.close?{close:e.close}:{}}}var ee=e.i(230792),et=H,ei=B,er=K;let es=ei.promises;function ea(e,t){let i=er.relative(e,t);return""===i||!i.startsWith(".."+er.sep)&&".."!==i&&!er.isAbsolute(i)}async function eo(e,t){for(let i of e)if(ea(await el(er.resolve(i)),t))return i}function en(e){let t=e?.code;return"string"==typeof t?t:void 0}async function el(e){let t=[],i=e,r=0;for(;;){let e;try{e=await es.realpath(i)}catch(s){let e;try{e=(await es.lstat(i)).isSymbolicLink()}catch(s){let e=en(s);if("ENOENT"!==e&&"ENOTDIR"!==e)throw s;let r=er.dirname(i);if(r===i)throw s;t.push(er.basename(i)),i=r;continue}if(!e)throw s;if(++r>40)throw Object.assign(Error("too many levels of symbolic links"),{code:"ELOOP"});i=er.resolve(er.dirname(i),await es.readlink(i));continue}return t.length?er.join(e,...t.reverse()):e}}async function ec(e,t,i){let r,s=i?.allowedRoots??[],a=await el(er.resolve(e));try{r=await el(er.resolve(a,t))}catch(e){throw new Z.ToolError(eh(e,`path ${JSON.stringify(t)}`))}if(ea(a,r)||await eo(s,r)!==void 0)return r;let o=s.length?"the session's working directory and its other permitted directories":"the session's working directory";throw new Z.ToolError(`path ${JSON.stringify(t)} is outside ${o}`)}async function ed(e,t){let i,r=er.dirname(e),s=er.join(r,`.tmp-${process.pid}-${et.randomUUID()}`),a=await es.stat(e).then(e=>511&e.mode,()=>void 0);try{i=await es.open(s,"wx",384),void 0!==a&&await i.chmod(a),await i.writeFile(t,"utf-8"),await i.sync(),await i.close(),i=void 0,await es.rename(s,e)}catch(e){throw i&&await i.close().catch(()=>{}),await es.unlink(s).catch(()=>{}),e}}function eh(e,t){let i=en(e);switch(i){case"ENOENT":return`${t}: no such file or directory`;case"EACCES":case"EPERM":return`${t}: permission denied`;case"ENOTDIR":return`${t}: not a directory`;case"EISDIR":return`${t}: is a directory`;case"ELOOP":return`${t}: too many levels of symbolic links`;case"ENAMETOOLONG":return`${t}: file name too long`;case"ENOSPC":return`${t}: no space left on device`;case"EMFILE":case"ENFILE":return`${t}: too many open files`;default:return`${t}: ${void 0!==i?`i/o error (${i})`:"i/o error"}`}}let ef=Buffer.from("\n");class em extends J.AnthropicError{constructor(e){super(`bash command timed out after ${e}ms`),this.name="BashTimeoutError",this.timeoutMs=e}}let e_=/\x1b\[[0-9;?]*[ -/]*[@-~]/g,eu=Y.glob;function ew(e){return void 0===e?262144:e}function ey(e){if(void 0!==e)throw new J.AnthropicError("The `unrestrictedPaths` option you passed to the agent toolset (AgentToolContext) is no longer supported. The toolset's file tools (read, write, edit, glob, grep) are now always confined to the working directory plus the directories listed in `allowedRoots`. Remove `unrestrictedPaths` from your context; to let the file tools reach any other directory, add it to `allowedRoots`.")}function ep(e){return[eF(e),eS(e),eG(e),eT(e),ek(e),eO(e)]}async function ev(e,t){return ey(e.unrestrictedPaths),ec(e.workdir,t,{allowedRoots:e.allowedRoots??[]})}function eg(e,t){return eo(e.readOnlyRoots??[],t)}var eP=(i=new WeakMap,r=new WeakMap,s=new WeakMap,a=new WeakMap,o=new WeakMap,t=new WeakSet,n=function(e){if((0,z.__classPrivateFieldSet)(this,r,(0,z.__classPrivateFieldGet)(this,r,"f")+e,"f"),(0,z.__classPrivateFieldGet)(this,r,"f").length>102400&&((0,z.__classPrivateFieldSet)(this,r,(0,z.__classPrivateFieldGet)(this,r,"f").slice((0,z.__classPrivateFieldGet)(this,r,"f").length-102400),"f"),(0,z.__classPrivateFieldSet)(this,s,!0,"f")),(0,z.__classPrivateFieldGet)(this,o,"f")&&(0,z.__classPrivateFieldGet)(this,r,"f").indexOf((0,z.__classPrivateFieldGet)(this,o,"f").sentinel)>=0){let e=(0,z.__classPrivateFieldGet)(this,o,"f");(0,z.__classPrivateFieldSet)(this,o,null,"f"),e.resolve()}},class{constructor(e,l=function(){let e={};for(let[t,i]of Object.entries(process.env))t.startsWith("ANTHROPIC_")||(e[t]=i);return e}()){t.add(this),i.set(this,void 0),r.set(this,""),s.set(this,!1),a.set(this,!1),o.set(this,null),(0,z.__classPrivateFieldSet)(this,i,V.spawn("/bin/bash",["--noprofile","--norc"],{cwd:e,env:{...l,PS1:"",PS2:"",TERM:"dumb"},stdio:["pipe","pipe","pipe"],detached:!0}),"f"),(0,z.__classPrivateFieldGet)(this,i,"f").stdout.setEncoding("utf8"),(0,z.__classPrivateFieldGet)(this,i,"f").stderr.setEncoding("utf8"),(0,z.__classPrivateFieldGet)(this,i,"f").stdout.on("data",e=>(0,z.__classPrivateFieldGet)(this,t,"m",n).call(this,e)),(0,z.__classPrivateFieldGet)(this,i,"f").stderr.on("data",e=>(0,z.__classPrivateFieldGet)(this,t,"m",n).call(this,e)),(0,z.__classPrivateFieldGet)(this,i,"f").once("close",()=>{(0,z.__classPrivateFieldSet)(this,a,!0,"f");let e=(0,z.__classPrivateFieldGet)(this,o,"f");(0,z.__classPrivateFieldSet)(this,o,null,"f"),e?.resolve()})}get closed(){return(0,z.__classPrivateFieldGet)(this,a,"f")}async exec(e,t={}){if((0,z.__classPrivateFieldGet)(this,a,"f"))throw new J.AnthropicError("bash session terminated");let n=t.timeoutMs??12e4,l=t.signal;l?.throwIfAborted(),(0,z.__classPrivateFieldSet)(this,r,"","f"),(0,z.__classPrivateFieldSet)(this,s,!1,"f");let c=`__ANT_CMD_${H.randomUUID()}_DONE__`,d=`${c.slice(0,8)}''${c.slice(8)}`,h=`{ ${e}
1
+ module.exports=[601457,(e,t,i)=>{t.exports=e.x("node:readline",()=>require("node:readline"))},193e3,e=>{"use strict";var t,i,r,s,a,o,n,l,c,d,h,f,m,_,u,w,y,p,v,g,P,F,S,b,E,G,T,k,O,N,I,$,M,R,x,A,D,L,j,W,U,C,q,z=e.i(243652),Y=e.i(912714),B=e.i(902157),K=e.i(750227),V=e.i(874533),H=e.i(666680),X=e.i(601457),J=e.i(683520),Z=e.i(438237);function Q(e){if("object"!==e.inputSchema.type)throw Error(`JSON schema for tool "${e.name}" must be an object, but got ${e.inputSchema.type}`);return{type:"custom",name:e.name,input_schema:e.inputSchema,description:e.description,run:e.run,parse:e=>e,...e.close?{close:e.close}:{}}}var ee=e.i(230792),et=H,ei=B,er=K;let es=ei.promises;function ea(e,t){let i=er.relative(e,t);return""===i||!i.startsWith(".."+er.sep)&&".."!==i&&!er.isAbsolute(i)}async function eo(e,t){for(let i of e)if(ea(await el(er.resolve(i)),t))return i}function en(e){let t=e?.code;return"string"==typeof t?t:void 0}async function el(e){let t=[],i=e,r=0;for(;;){let e;try{e=await es.realpath(i)}catch(s){let e;try{e=(await es.lstat(i)).isSymbolicLink()}catch(s){let e=en(s);if("ENOENT"!==e&&"ENOTDIR"!==e)throw s;let r=er.dirname(i);if(r===i)throw s;t.push(er.basename(i)),i=r;continue}if(!e)throw s;if(++r>40)throw Object.assign(Error("too many levels of symbolic links"),{code:"ELOOP"});i=er.resolve(er.dirname(i),await es.readlink(i));continue}return t.length?er.join(e,...t.reverse()):e}}async function ec(e,t,i){let r,s=i?.allowedRoots??[],a=await el(er.resolve(e));try{r=await el(er.resolve(a,t))}catch(e){throw new Z.ToolError(eh(e,`path ${JSON.stringify(t)}`))}if(ea(a,r)||await eo(s,r)!==void 0)return r;let o=s.length?"the session's working directory and its other permitted directories":"the session's working directory";throw new Z.ToolError(`path ${JSON.stringify(t)} is outside ${o}`)}async function ed(e,t){let i,r=er.dirname(e),s=er.join(r,`.tmp-${process.pid}-${et.randomUUID()}`),a=await es.stat(e).then(e=>511&e.mode,()=>void 0);try{i=await es.open(s,"wx",384),void 0!==a&&await i.chmod(a),await i.writeFile(t,"utf-8"),await i.sync(),await i.close(),i=void 0,await es.rename(s,e)}catch(e){throw i&&await i.close().catch(()=>{}),await es.unlink(s).catch(()=>{}),e}}function eh(e,t){let i=en(e);switch(i){case"ENOENT":return`${t}: no such file or directory`;case"EACCES":case"EPERM":return`${t}: permission denied`;case"ENOTDIR":return`${t}: not a directory`;case"EISDIR":return`${t}: is a directory`;case"ELOOP":return`${t}: too many levels of symbolic links`;case"ENAMETOOLONG":return`${t}: file name too long`;case"ENOSPC":return`${t}: no space left on device`;case"EMFILE":case"ENFILE":return`${t}: too many open files`;default:return`${t}: ${void 0!==i?`i/o error (${i})`:"i/o error"}`}}let ef=Buffer.from("\n");class em extends J.AnthropicError{constructor(e){super(`bash command timed out after ${e}ms`),this.name="BashTimeoutError",this.timeoutMs=e}}let e_=/\x1b\[[0-9;?]*[ -/]*[@-~]/g,eu=Y.glob;function ew(e){return void 0===e?262144:e}function ey(e){if(void 0!==e)throw new J.AnthropicError("The `unrestrictedPaths` option you passed to the agent toolset (AgentToolContext) is no longer supported. The toolset's file tools (read, write, edit, glob, grep) are now always confined to the working directory plus the directories listed in `allowedRoots`. Remove `unrestrictedPaths` from your context; to let the file tools reach any other directory, add it to `allowedRoots`.")}function ep(e){return[eF(e),eS(e),eG(e),eT(e),ek(e),eO(e)]}async function ev(e,t){return ey(e.unrestrictedPaths),ec(e.workdir,t,{allowedRoots:e.allowedRoots??[]})}function eg(e,t){return eo(e.readOnlyRoots??[],t)}var eP=(i=new WeakMap,r=new WeakMap,s=new WeakMap,a=new WeakMap,o=new WeakMap,t=new WeakSet,n=function(e){if((0,z.__classPrivateFieldSet)(this,r,(0,z.__classPrivateFieldGet)(this,r,"f")+e,"f"),(0,z.__classPrivateFieldGet)(this,r,"f").length>102400&&((0,z.__classPrivateFieldSet)(this,r,(0,z.__classPrivateFieldGet)(this,r,"f").slice((0,z.__classPrivateFieldGet)(this,r,"f").length-102400),"f"),(0,z.__classPrivateFieldSet)(this,s,!0,"f")),(0,z.__classPrivateFieldGet)(this,o,"f")&&(0,z.__classPrivateFieldGet)(this,r,"f").indexOf((0,z.__classPrivateFieldGet)(this,o,"f").sentinel)>=0){let e=(0,z.__classPrivateFieldGet)(this,o,"f");(0,z.__classPrivateFieldSet)(this,o,null,"f"),e.resolve()}},class{constructor(e,l=function(){let e={};for(let[t,i]of Object.entries(process.env))t.startsWith("ANTHROPIC_")||(e[t]=i);return e}()){t.add(this),i.set(this,void 0),r.set(this,""),s.set(this,!1),a.set(this,!1),o.set(this,null),(0,z.__classPrivateFieldSet)(this,i,V.spawn("/bin/bash",["--noprofile","--norc"],{cwd:e,env:{...l,PS1:"",PS2:"",TERM:"dumb"},stdio:["pipe","pipe","pipe"],detached:!0}),"f"),(0,z.__classPrivateFieldGet)(this,i,"f").stdout.setEncoding("utf8"),(0,z.__classPrivateFieldGet)(this,i,"f").stderr.setEncoding("utf8"),(0,z.__classPrivateFieldGet)(this,i,"f").stdout.on("data",e=>(0,z.__classPrivateFieldGet)(this,t,"m",n).call(this,e)),(0,z.__classPrivateFieldGet)(this,i,"f").stderr.on("data",e=>(0,z.__classPrivateFieldGet)(this,t,"m",n).call(this,e)),(0,z.__classPrivateFieldGet)(this,i,"f").once("close",()=>{(0,z.__classPrivateFieldSet)(this,a,!0,"f");let e=(0,z.__classPrivateFieldGet)(this,o,"f");(0,z.__classPrivateFieldSet)(this,o,null,"f"),e?.resolve()})}get closed(){return(0,z.__classPrivateFieldGet)(this,a,"f")}async exec(e,t={}){if((0,z.__classPrivateFieldGet)(this,a,"f"))throw new J.AnthropicError("bash session terminated");let n=t.timeoutMs??12e4,l=t.signal;l?.throwIfAborted(),(0,z.__classPrivateFieldSet)(this,r,"","f"),(0,z.__classPrivateFieldSet)(this,s,!1,"f");let c=`__ANT_CMD_${H.randomUUID()}_DONE__`,d=`${c.slice(0,8)}''${c.slice(8)}`,h=`{ ${e}
2
2
  } </dev/null 2>&1; printf '\\n${d}%d\\n' $?
3
3
  `;if((0,z.__classPrivateFieldGet)(this,i,"f").stdin.write(h),0>(0,z.__classPrivateFieldGet)(this,r,"f").indexOf(c)){let e,t,{promise:i,resolve:r}=(0,ee.promiseWithResolvers)();(0,z.__classPrivateFieldSet)(this,o,{sentinel:c,resolve:r},"f");try{await Promise.race([i,new Promise((t,i)=>{e=setTimeout(()=>i(new em(n)),n)}),new Promise((e,i)=>{l&&(t=()=>i(l.reason),l.addEventListener("abort",t,{once:!0}))})])}finally{e&&clearTimeout(e),t&&l&&l.removeEventListener("abort",t),(0,z.__classPrivateFieldSet)(this,o,null,"f")}}let f=(0,z.__classPrivateFieldGet)(this,r,"f").indexOf(c);if(f<0)throw new J.AnthropicError("bash session terminated");let m=(0,z.__classPrivateFieldGet)(this,r,"f").slice(f+c.length).match(/^(-?\d+)/),_=m?parseInt(m[1],10):-1,u=(0,z.__classPrivateFieldGet)(this,r,"f").slice(0,f).replace(e_,"").replace(/\n+$/,"");return(0,z.__classPrivateFieldGet)(this,s,"f")&&(u=`[output truncated]
4
4
  ${u}`),{output:u,exitCode:_}}close(){if((0,z.__classPrivateFieldGet)(this,a,"f"))return;(0,z.__classPrivateFieldSet)(this,a,!0,"f");let e=(0,z.__classPrivateFieldGet)(this,o,"f");(0,z.__classPrivateFieldSet)(this,o,null,"f"),e?.resolve(),(0,z.__classPrivateFieldGet)(this,i,"f").stdout.destroy(),(0,z.__classPrivateFieldGet)(this,i,"f").stderr.destroy(),(0,z.__classPrivateFieldGet)(this,i,"f").stdin.destroy();try{process.kill(-(0,z.__classPrivateFieldGet)(this,i,"f").pid,"SIGKILL")}catch{(0,z.__classPrivateFieldGet)(this,i,"f").kill("SIGKILL")}(0,z.__classPrivateFieldGet)(this,i,"f").unref()}});function eF(e){let t;ey(e.unrestrictedPaths);let i=Promise.resolve();return Q({name:"bash",description:"Run a bash command in a persistent shell. State (cwd, env vars) persists across calls.",inputSchema:{type:"object",properties:{command:{type:"string",description:"The command to run"},restart:{type:"boolean",description:"Restart the persistent shell before running"},timeout_ms:{type:"integer",description:"Per-call timeout in milliseconds"}}},run:async({command:r,restart:s,timeout_ms:a},o)=>{let n=i,l=(0,ee.promiseWithResolvers)();i=l.promise;try{await n}catch{}try{if(s&&(t?.close(),t=void 0),!r){if(s)return"bash session restarted";throw new Z.ToolError("bash: command is required")}t??(t=new eP(e.workdir,e.env));try{let{output:e,exitCode:i}=await t.exec(r,{timeoutMs:a??12e4,signal:o?.signal});if(0!==i)throw new Z.ToolError(e||`exit ${i}`);return e}catch(e){if(e instanceof Z.ToolError)throw e;throw t.close(),t=void 0,new Z.ToolError(`bash: ${e instanceof Error?e.message:String(e)}`)}}finally{l.resolve()}},close:()=>{t?.close(),t=void 0}})}function eS(e){return ey(e.unrestrictedPaths),Q({name:"read",description:"Read a UTF-8 text file relative to the workdir.",inputSchema:{type:"object",properties:{file_path:{type:"string"},view_range:{type:"array",items:{type:"integer"},description:"[start_line, end_line] 1-indexed inclusive"}},required:["file_path"]},run:async({file_path:t,view_range:i})=>{let r;if(!t)throw new Z.ToolError("read: file_path is required");let s=await ev(e,t);if(i?.length&&2!==i.length)throw new Z.ToolError("read: view_range must be [start_line, end_line]");try{let a=await Y.stat(s);if(!a.isFile())throw new Z.ToolError(`read: ${t} is not a regular file`);let o=ew(e.maxFileBytes);if(null!==o&&a.size>o){if(!i?.length)throw new Z.ToolError(`read: ${t} is ${a.size} bytes, exceeds ${o}-byte limit. Use the view_range parameter to read specific line ranges, e.g. view_range: [1, 500].`);let[e,r]=i;return await eb(s,t,e,r,o)}r=await Y.readFile(s,"utf8")}catch(e){if(e instanceof Z.ToolError)throw e;throw new Z.ToolError(`read: ${eh(e,t)}`)}if(!i?.length)return r;let[a,o]=i,n=r.split("\n"),l=Math.max(0,a-1),c=o>0?o:n.length;return n.slice(l,c).join("\n")}})}async function eb(e,t,i,r,s){let a=new eE(t,i,r,s);if(a.rangeIsEmpty())return"";let o=B.createReadStream(e,{highWaterMark:65536});try{for await(let e of o)if(a.collectFrom(e),a.rangeIsCollected())break}finally{o.destroy()}return a.text()}class eE{constructor(e,t,i,r){l.add(this),c.set(this,void 0),d.set(this,void 0),h.set(this,void 0),f.set(this,void 0),m.set(this,void 0),_.set(this,void 0),u.set(this,0),w.set(this,[]),y.set(this,0),(0,z.__classPrivateFieldSet)(this,c,e,"f"),(0,z.__classPrivateFieldSet)(this,d,t,"f"),(0,z.__classPrivateFieldSet)(this,h,i,"f"),(0,z.__classPrivateFieldSet)(this,f,Math.max(0,t-1),"f"),(0,z.__classPrivateFieldSet)(this,m,i>0?i:1/0,"f"),(0,z.__classPrivateFieldSet)(this,_,r,"f")}rangeIsEmpty(){return(0,z.__classPrivateFieldGet)(this,m,"f")<=(0,z.__classPrivateFieldGet)(this,f,"f")}rangeIsCollected(){return(0,z.__classPrivateFieldGet)(this,u,"f")>=(0,z.__classPrivateFieldGet)(this,m,"f")}collectFrom(e){var t;let i=0;for(;i<e.length&&!this.rangeIsCollected();){let r=e.indexOf(10,i),s=r<0?e.length:r;if((0,z.__classPrivateFieldGet)(this,u,"f")>=(0,z.__classPrivateFieldGet)(this,f,"f")&&(0,z.__classPrivateFieldGet)(this,l,"m",p).call(this,e.subarray(i,s),r>=0),r<0)break;(0,z.__classPrivateFieldSet)(this,u,(t=(0,z.__classPrivateFieldGet)(this,u,"f"),++t),"f"),i=r+1}}text(){return Buffer.concat((0,z.__classPrivateFieldGet)(this,w,"f"),(0,z.__classPrivateFieldGet)(this,y,"f")).toString("utf8")}}function eG(e){return ey(e.unrestrictedPaths),Q({name:"write",description:"Write a UTF-8 text file relative to the workdir, creating parent directories as needed.",inputSchema:{type:"object",properties:{file_path:{type:"string"},content:{type:"string"}},required:["file_path","content"]},run:async({file_path:t,content:i})=>{if(!t)throw new Z.ToolError("write: file_path is required");let r=await ev(e,t),s=await eg(e,r);if(void 0!==s)throw new Z.ToolError(`write: ${t} is inside read-only directory ${s}`);try{await Y.mkdir(K.dirname(r),{recursive:!0,mode:448}),await ed(r,i??"")}catch(e){throw new Z.ToolError(`write: ${eh(e,t)}`)}return`wrote ${Buffer.byteLength(i??"")} bytes to ${t}`}})}function eT(e){return ey(e.unrestrictedPaths),Q({name:"edit",description:"Replace old_string with new_string in a file. old_string must be unique unless replace_all.",inputSchema:{type:"object",properties:{file_path:{type:"string"},old_string:{type:"string"},new_string:{type:"string"},replace_all:{type:"boolean"}},required:["file_path","old_string","new_string"]},run:async({file_path:t,old_string:i,new_string:r,replace_all:s})=>{let a,o;if(!t)throw new Z.ToolError("edit: file_path is required");if(!i)throw new Z.ToolError("edit: old_string is required");let n=await ev(e,t),l=await eg(e,n);if(void 0!==l)throw new Z.ToolError(`edit: ${t} is inside read-only directory ${l}`);try{let i=await Y.stat(n);if(!i.isFile())throw new Z.ToolError(`edit: ${t} is not a regular file`);let r=ew(e.maxFileBytes);if(null!==r&&i.size>r)throw new Z.ToolError(`edit: ${t} is ${i.size} bytes, exceeds ${r}-byte limit. The edit tool loads the whole file and cannot modify a file this large.`);a=await Y.readFile(n,"utf8")}catch(e){if(e instanceof Z.ToolError)throw e;throw new Z.ToolError(`edit: ${eh(e,t)}`)}let c=a.split(i).length-1;if(0===c)throw new Z.ToolError(`edit: old_string not found in ${t}`);if(s)o=a.split(i).join(r);else{if(c>1)throw new Z.ToolError(`edit: old_string appears ${c} times in ${t} (must be unique)`);o=a.replace(i,()=>r)}try{await ed(n,o)}catch(e){throw new Z.ToolError(`edit: write: ${eh(e,t)}`)}return`edited ${t} (${s?c:1} replacement(s))`}})}function ek(e){return ey(e.unrestrictedPaths),Q({name:"glob",description:"Match files under the workdir against a glob pattern. Results are mtime-sorted, newest first.",inputSchema:{type:"object",properties:{pattern:{type:"string"},path:{type:"string",description:"Directory to search in. Defaults to the workdir."}},required:["pattern"]},run:async({pattern:t,path:i})=>{if(!t)throw new Z.ToolError("glob: pattern is required");if(K.isAbsolute(t))throw new Z.ToolError("glob: absolute pattern not permitted; pass a relative pattern (and optionally path)");if(t.split(/[\\/{},]/).includes(".."))throw new Z.ToolError('glob: ".." is not permitted in the pattern');let r=i?await ev(e,i):K.resolve(e.workdir),s=i?r:await el(r),a=[],o=e$;try{for await(let e of eu(t,{cwd:r,withFileTypes:!0,exclude:e=>".git"===e.name||"node_modules"===e.name})){let t;if(o--<=0)break;if(!e.isFile())continue;let i=K.join(e.parentPath,e.name);try{t=await Y.realpath(i)}catch{continue}if(!ea(s,t))continue;let r=0;try{r=(await Y.stat(i)).mtimeMs}catch{}a.push({path:i,mtime:r})}}catch(e){throw new Z.ToolError(`glob: ${e instanceof Error?e.message:String(e)}`)}return 0===a.length?"no matches":(a.sort((e,t)=>t.mtime-e.mtime),a.slice(0,200).map(e=>e.path).join("\n"))}})}function eO(e){return ey(e.unrestrictedPaths),Q({name:"grep",description:"Search file contents for a regex. Uses ripgrep if available, otherwise a built-in walker.",inputSchema:{type:"object",properties:{pattern:{type:"string"},path:{type:"string"}},required:["pattern"]},run:async({pattern:t,path:i},r)=>{var s,a,o,n;if(!t)throw new Z.ToolError("grep: pattern is required");let l=K.resolve(e.workdir);i&&(l=await ev(e,i));let c=await eR();return c?(s=c,a=t,o=l,n=r?.signal,new Promise((e,t)=>{let i=V.spawn(s,["-n","--no-heading","-e",a,"--",o],{...n?{signal:n}:{}}),r="",l="",c=!1;i.stdout.on("data",e=>{!c&&(r+=e).length>102400&&(c=!0,r=r.slice(0,102400),i.kill("SIGKILL"))}),i.stderr.on("data",e=>l+=e),i.on("close",i=>n?.aborted?t(new Z.ToolError("grep: aborted")):c?e(r+`
@@ -6,4 +6,4 @@ ${u}`),{output:u,exitCode:_}}close(){if((0,z.__classPrivateFieldGet)(this,a,"f")
6
6
  ${e}`,"utf-8").digest("hex")}class tl extends eH.AnthropicError{constructor(e,t){super(e),this.name="SessionMemoryError",void 0!==t&&(this.cause=t)}}class tc{constructor(e,t,i){this.mode=e,this.cap=t,this.waiveWindow=i,this.attempted=0,this.capped=0,this.suppressed=0}takeSlot(){return this.attempted>=this.cap?(this.capped++,!1):(this.attempted++,!0)}}function td(e){return"object"==typeof e&&null!==e&&"string"==typeof e.code}async function th(e,t){let i;if(!t)return void await e;let r=new Promise(e=>{i=e,t.aborted&&e()});t.addEventListener("abort",i,{once:!0});try{await Promise.race([e,r])}finally{t.removeEventListener("abort",i)}}P=new WeakMap,F=new WeakMap,S=new WeakMap,b=new WeakMap,E=new WeakMap,G=new WeakMap,T=new WeakMap,k=new WeakMap,g=new WeakSet,O=function(e){if(e.mount_path){if(!e2(e.mount_path))throw new tl(`memory store mount_path is not a clean absolute path: ${JSON.stringify(e.mount_path)} (memory_store_id=${e.memory_store_id})`);return e.mount_path}return er.join((0,z.__classPrivateFieldGet)(this,F,"f"),"memory",e.name||e.memory_store_id)},N=async function(e){let t=await e.files.hashtree(),i=t[to];return(delete t[to],i===tn(e.memoryStoreId))?{files:t,markerOk:!0,distrustReason:null}:{files:t,markerOk:!1,distrustReason:void 0!==i?"the marker file does not match this store":"the marker file is gone"}},I=async function(e,t){try{let i=await (0,z.__classPrivateFieldGet)(this,g,"m",N).call(this,e),r=i.files;if(!i.markerOk){if(Object.keys(r).length>0)return void(0,z.__classPrivateFieldGet)(this,E,"f").warn(`${i.distrustReason}; leaving the memory store folder as found and not syncing`,{root:e.files.root().path,memory_store_id:e.memoryStoreId});await (0,z.__classPrivateFieldGet)(this,g,"m",M).call(this,e,"the folder or its marker is gone");return}if(0===Object.keys(r).length&&e.baseline.size>1)return void await (0,z.__classPrivateFieldGet)(this,g,"m",M).call(this,e,"every memory file is gone at once");let s=new Map;for await(let[t,i]of(0,z.__classPrivateFieldGet)(this,g,"m",W).call(this,e.memoryStoreId))s.set(t,i);let a=new tc((0,z.__classPrivateFieldGet)(this,b,"f"),Math.max(8,Math.min(50,Math.floor(e.baseline.size/4))),t),o=[],n=new Map;for(let t of[...new Set([...s.keys(),...Object.keys(r),...e.baseline.keys()])].sort()){let i,l=s.get(t),c=r[t],d=e.baseline.get(t);i=void 0!==c||void 0===d||void 0===l||l.content_sha256!==d||e.readOnly?await (0,z.__classPrivateFieldGet)(this,g,"m",x).call(this,e,t,l,c,o):await (0,z.__classPrivateFieldGet)(this,g,"m",C).call(this,e,t,l,d,a),void 0!==i&&n.set(t,i)}e.baseline=n,await (0,z.__classPrivateFieldGet)(this,g,"m",L).call(this,e,o),a.suppressed>0&&(0,z.__classPrivateFieldGet)(this,E,"f").debug("remote deletes are disabled; locally deleted memories stay on the server",{count:a.suppressed,memory_store_id:e.memoryStoreId}),a.capped>0&&(0,z.__classPrivateFieldGet)(this,E,"f").warn(`delete cap reached: ${"log_only"===a.mode?"would send":"sent"} ${a.attempted} deletes, held ${a.capped} for later syncs`,{memory_store_id:e.memoryStoreId})}catch(t){(0,z.__classPrivateFieldGet)(this,E,"f").warn("memory sync failed",{memory_store_id:e.memoryStoreId,error:String(t)})}},$=async function(e,t){let i=new Map,r=new Set,s=async()=>{if(e.readOnly)return;let s=await (0,z.__classPrivateFieldGet)(this,g,"m",N).call(this,e);if(!s.markerOk)return void(0,z.__classPrivateFieldGet)(this,E,"f").warn(`${s.distrustReason}; not uploading anything from the memory store folder`,{root:e.files.root().path,memory_store_id:e.memoryStoreId});for(let[t,a]of Object.entries(s.files))a!==e.baseline.get(t)&&e.refusedShas.get(t)!==a&&(i.set(t,a),r.add(t));if(0===i.size||t?.aborted)return;let a=new Map;for await(let[i,r]of(0,z.__classPrivateFieldGet)(this,g,"m",W).call(this,e.memoryStoreId)){if(t?.aborted)return;a.set(i,r)}let o=[];for(let t of[...i.keys()].sort()){let s=i.get(t),n=e.baseline.get(t),l=a.get(t);if(void 0!==l&&l.content_sha256===s){e.baseline.set(t,l.content_sha256),r.delete(t);continue}if(void 0!==l&&l.content_sha256!==n){(0,z.__classPrivateFieldGet)(this,E,"f").warn("memory changed both locally and remotely; the flush leaves the remote version",{path:t,memory_store_id:e.memoryStoreId}),r.delete(t);continue}o.push([t,s,l])}await (0,z.__classPrivateFieldGet)(this,g,"m",j).call(this,e,o,r,t)};try{await th(s(),t),t?.aborted&&r.size>0&&(0,z.__classPrivateFieldGet)(this,E,"f").warn(`memory flush cut off part-way; ${r.size} of ${i.size} changed files had not finished uploading`,{memory_store_id:e.memoryStoreId})}catch(t){(0,z.__classPrivateFieldGet)(this,E,"f").warn("memory flush failed",{memory_store_id:e.memoryStoreId,error:String(t)})}},M=async function(e,t){(0,z.__classPrivateFieldGet)(this,E,"f").warn(`${t}; re-downloading the memory store folder instead of syncing`,{root:e.files.root().path,memory_store_id:e.memoryStoreId}),await e.files.createRoot(),await (0,z.__classPrivateFieldGet)(this,g,"m",R).call(this,e)},R=async function(e){for await(let[t,i]of(e.baseline=new Map,e.pendingDeletes.clear(),await e.files.put(to,`version 1
7
7
  ${e.memoryStoreId}`),(0,z.__classPrivateFieldGet)(this,g,"m",W).call(this,e.memoryStoreId,"full")))await (0,z.__classPrivateFieldGet)(this,g,"m",D).call(this,e,t,i.content??"")&&e.baseline.set(t,i.content_sha256)},x=async function(e,t,i,r,s){let a=e.baseline.get(t);if(void 0!==r&&e.pendingDeletes.delete(t),!i){if(void 0===r)return void e.pendingDeletes.delete(t);if(void 0!==a){if(r===a){let i=await (0,z.__classPrivateFieldGet)(this,g,"m",A).call(this,e,t,a);if(void 0===i)return;if(i===a)return a;r=i}e.readOnly?(0,z.__classPrivateFieldGet)(this,E,"f").warn("memory deleted remotely but edited locally; keeping the file, which a read-only store cannot push",{path:t,memory_store_id:e.memoryStoreId}):e.refusedShas.get(t)!==r&&(0,z.__classPrivateFieldGet)(this,E,"f").info("memory deleted remotely but edited locally; re-creating it from the file",{path:t,memory_store_id:e.memoryStoreId})}if(e.readOnly||e.refusedShas.get(t)===r)return;return await (0,z.__classPrivateFieldGet)(this,g,"m",U).call(this,e,t,r,void 0)}let o=i.content_sha256,n=o!==a,l=void 0!==r&&r!==a&&r!==o,c=!e.readOnly&&l;return void 0===r&&void 0!==a?(n&&((0,z.__classPrivateFieldGet)(this,E,"f").warn("memory deleted locally but changed remotely; restoring the remote version",{path:t,memory_store_id:e.memoryStoreId}),e.pendingDeletes.delete(t),s.push([t,i])),a):n?r===o?o:(l&&(0,z.__classPrivateFieldGet)(this,E,"f").warn("memory changed both locally and remotely; keeping the remote version",{path:t,memory_store_id:e.memoryStoreId}),s.push([t,i]),a):c?e.refusedShas.get(t)===r?o:await (0,z.__classPrivateFieldGet)(this,g,"m",U).call(this,e,t,r,i)??o:o},A=async function(e,t,i){let r;try{r=await e.files.hashFile(t)}catch(e){if(!(e instanceof e4)&&!td(e))throw e;return i}if(null!==r){if(r!==i)return r;try{await e.files.remove(t)}catch(r){if(!(r instanceof e4)&&!td(r))throw r;return(0,z.__classPrivateFieldGet)(this,E,"f").warn("failed to remove memory deleted remotely",{path:t,memory_store_id:e.memoryStoreId,error:String(r)}),i}}},D=async function(e,t,i){try{await e.files.put(t,i)}catch(i){if(!(i instanceof e4)&&!td(i))throw i;return(0,z.__classPrivateFieldGet)(this,E,"f").warn("failed to write memory",{path:t,memory_store_id:e.memoryStoreId,error:String(i)}),!1}return!0},L=async function(e,t){if(0===t.length)return;let i=async(t,i)=>{let r;try{r=await (0,z.__classPrivateFieldGet)(this,P,"f").beta.memoryStores.memories.retrieve(i.id,{memory_store_id:e.memoryStoreId,view:"full"})}catch(i){if((0,eJ.isStatus)(i,404))return;(0,z.__classPrivateFieldGet)(this,E,"f").warn("failed to fetch memory content",{path:t,memory_store_id:e.memoryStoreId,error:String(i)});return}await (0,z.__classPrivateFieldGet)(this,g,"m",D).call(this,e,t,r.content??"")&&e.baseline.set(t,r.content_sha256)},r=t[Symbol.iterator](),s=async()=>{for(let[e,t]of r)await i(e,t)};await Promise.all(Array.from({length:Math.min(16,t.length)},s))},j=async function(e,t,i,r){let s=t[Symbol.iterator](),a=async()=>{for(let[t,a,o]of s){if(r?.aborted)return;let s=await (0,z.__classPrivateFieldGet)(this,g,"m",U).call(this,e,t,a,o);i.delete(t),void 0!==s&&e.baseline.set(t,s)}};await Promise.all(Array.from({length:Math.min(32,t.length)},a))},W=async function*(e,t="basic"){for await(let i of(0,z.__classPrivateFieldGet)(this,P,"f").beta.memoryStores.memories.list(e,{view:t,limit:"basic"===t?100:20})){if("memory"!==i.type)continue;let t=i.path.replace(/^\/+/,"");if(t===to){(0,z.__classPrivateFieldGet)(this,E,"f").warn("the server listed the reserved marker path; skipping",{path:i.path,memory_store_id:e});continue}yield[t,i]}},U=async function e(t,i,r,s){try{let e=await t.files.get(i);if(null===e)return;let r=(0,eX.decodeUTF8)(e),a=s?await (0,z.__classPrivateFieldGet)(this,P,"f").beta.memoryStores.memories.update(s.id,{memory_store_id:t.memoryStoreId,content:r,precondition:{type:"content_sha256",content_sha256:s.content_sha256}}):await (0,z.__classPrivateFieldGet)(this,P,"f").beta.memoryStores.memories.create(t.memoryStoreId,{path:"/"+i,content:r});return t.refusedShas.delete(i),a.content_sha256}catch(o){if(s&&(0,eJ.isStatus)(o,404))return await (0,z.__classPrivateFieldGet)(this,g,"m",e).call(this,t,i,r,void 0);let a=o instanceof e4||(0,eJ.isStatus)(o,400)||(0,eJ.isStatus)(o,413);s&&(0,eJ.isStatus)(o,409)?(0,z.__classPrivateFieldGet)(this,E,"f").warn("memory changed both locally and remotely; the upload was refused and the local edit loses",{path:i,memory_store_id:t.memoryStoreId}):a&&void 0!==r?(t.refusedShas.set(i,r),(0,z.__classPrivateFieldGet)(this,E,"f").warn("the server rejected this memory file, so it stays un-synced until its content changes",{path:i,memory_store_id:t.memoryStoreId,rejection:String(o)})):(0,z.__classPrivateFieldGet)(this,E,"f").warn("failed to upload memory",{path:i,memory_store_id:t.memoryStoreId,error:String(o)});return}},C=async function(e,t,i,r,s){let a,o;if("disabled"===s.mode)return s.suppressed++,r;let n=e.pendingDeletes.get(t);if(void 0===n&&(n=Date.now(),e.pendingDeletes.set(t,n)),!s.waiveWindow&&Date.now()-n<3e4)return r;try{a=await e.files.hashFile(to)===tn(e.memoryStoreId),o=await e.files.hashFile(t)===null}catch(e){if(!(e instanceof e4)&&!td(e))throw e;a=o=!1}if(!a)return r;if(!o)return e.pendingDeletes.delete(t),r;if(!s.takeSlot())return r;if("log_only"===s.mode)return(0,z.__classPrivateFieldGet)(this,E,"f").info("log-only: sync would delete this memory on the server",{path:t,memory_store_id:e.memoryStoreId}),r;let l=await (0,z.__classPrivateFieldGet)(this,g,"m",q).call(this,e,t,i,r);return void 0===l&&e.pendingDeletes.delete(t),l},q=async function(e,t,i,r){try{await (0,z.__classPrivateFieldGet)(this,P,"f").beta.memoryStores.memories.delete(i.id,{memory_store_id:e.memoryStoreId,expected_content_sha256:r})}catch(i){if((0,eJ.isStatus)(i,404))return;return(0,eJ.isStatus)(i,409)||(0,eJ.isStatus)(i,412)?(0,z.__classPrivateFieldGet)(this,E,"f").warn("memory deleted locally but changed remotely; keeping the remote version",{path:t,memory_store_id:e.memoryStoreId}):(0,z.__classPrivateFieldGet)(this,E,"f").warn("failed to delete memory",{path:t,memory_store_id:e.memoryStoreId,error:String(i)}),r}(0,z.__classPrivateFieldGet)(this,E,"f").info("propagated local deletion",{path:t,memory_store_id:e.memoryStoreId})},e.s(["BashSession",0,eP,"BashTimeoutError",0,em,"DEFAULT_MEMORY_SYNC_INTERVAL_MS",()=>ta.DEFAULT_MEMORY_SYNC_INTERVAL_MS,"MARKER_PATH",0,to,"MEMORY_FLUSH_TIMEOUT_MS",0,3e4,"MIN_MEMORY_SYNC_INTERVAL_MS",()=>ta.MIN_MEMORY_SYNC_INTERVAL_MS,"SessionMemoryError",0,tl,"SessionMemoryStores",0,class{constructor(e,t){g.add(this),P.set(this,void 0),F.set(this,void 0),S.set(this,void 0),b.set(this,void 0),E.set(this,void 0),G.set(this,void 0),T.set(this,!1),k.set(this,[]),(0,z.__classPrivateFieldSet)(this,P,e,"f"),(0,z.__classPrivateFieldSet)(this,F,t.workdir,"f"),(0,z.__classPrivateFieldSet)(this,S,t.syncIntervalMs??ta.DEFAULT_MEMORY_SYNC_INTERVAL_MS,"f"),(0,ta.checkMemorySyncInterval)((0,z.__classPrivateFieldGet)(this,S,"f"),"syncIntervalMs"),(0,z.__classPrivateFieldSet)(this,b,t.syncDeletions??"enabled","f"),(0,z.__classPrivateFieldSet)(this,E,(0,eD.loggerFor)(e),"f"),(0,z.__classPrivateFieldSet)(this,G,Date.now(),"f")}get roots(){return(0,z.__classPrivateFieldGet)(this,k,"f").map(e=>e.files.root().path)}get readOnlyRoots(){return(0,z.__classPrivateFieldGet)(this,k,"f").filter(e=>e.readOnly).map(e=>e.files.root().path)}async download(e){for(let t of e.resources){let e;if("memory_store"!==t.type)continue;let i=(0,z.__classPrivateFieldGet)(this,g,"m",O).call(this,t);try{if(!(e={memoryStoreId:t.memory_store_id,files:await e8.open(i,{utf8:!0}),readOnly:"read_only"===t.access,baseline:new Map,refusedShas:new Map,pendingDeletes:new Map}).files.root().removedOnDispose)throw new tl(`something already exists at the memory store's path: ${i} (memory_store_id=${t.memory_store_id}); it must not exist when the session starts`);try{await e.files.createRoot()}catch(e){if(!td(e))throw e;throw new tl(`cannot create the memory store's folder: ${i} (memory_store_id=${t.memory_store_id}): ${e}; the worker host must make this mount path writable`,e)}await (0,z.__classPrivateFieldGet)(this,g,"m",R).call(this,e),(0,z.__classPrivateFieldGet)(this,E,"f").info("downloaded memories",{count:e.baseline.size,memory_store_id:e.memoryStoreId,dest:e.files.root().path}),(0,z.__classPrivateFieldGet)(this,k,"f").push(e)}catch(i){if(e&&await e.files.dispose().catch(()=>{}),i instanceof tl)throw i;throw new tl(`failed to download memory store memory_store_id=${t.memory_store_id}: ${i}`,i)}}(0,z.__classPrivateFieldSet)(this,G,Date.now(),"f")}async finish(){if((0,z.__classPrivateFieldGet)(this,T,"f"))throw new eH.AnthropicError("finish() was already called: it is the session's last sync and runs once");(0,z.__classPrivateFieldSet)(this,T,!0,"f"),await this.syncAll(!0)}async syncAll(e){await Promise.all((0,z.__classPrivateFieldGet)(this,k,"f").map(t=>(0,z.__classPrivateFieldGet)(this,g,"m",I).call(this,t,e))),(0,z.__classPrivateFieldSet)(this,G,Date.now(),"f")}async syncIfDue(){Date.now()-(0,z.__classPrivateFieldGet)(this,G,"f")<(0,z.__classPrivateFieldGet)(this,S,"f")||await this.syncAll(!1)}async flushWrites(e){await Promise.all((0,z.__classPrivateFieldGet)(this,k,"f").map(t=>(0,z.__classPrivateFieldGet)(this,g,"m",$).call(this,t,e)))}async dispose(){for(let e of(0,z.__classPrivateFieldGet)(this,k,"f")){let t=e.files.root();try{let i=await (0,z.__classPrivateFieldGet)(this,g,"m",N).call(this,e);if(!i.markerOk&&Object.keys(i.files).length>0){(0,z.__classPrivateFieldGet)(this,E,"f").warn(`${i.distrustReason}; leaving the memory store folder on disk`,{root:t.path,memory_store_id:e.memoryStoreId});continue}await e.files.dispose()}catch(t){if(!(t instanceof e4)&&!td(t))throw t;(0,z.__classPrivateFieldGet)(this,E,"f").warn("failed to remove the memory store folder",{root:e.files.root().path,memory_store_id:e.memoryStoreId,error:String(t)});continue}t.removedOnDispose&&(0,z.__classPrivateFieldGet)(this,E,"f").info("removed memory store dir",{dest:t.path,memory_store_id:e.memoryStoreId})}}},"betaAgentToolset20260401",0,ep,"betaBashTool",0,eF,"betaEditTool",0,eT,"betaGlobTool",0,ek,"betaGrepTool",0,eO,"betaReadTool",0,eS,"betaWriteTool",0,eG,"extractSkillArchive",0,eB,"resolvePath",0,ev,"setupSkills",0,eW],193e3)}];
8
8
 
9
- //# sourceMappingURL=%5Broot-of-the-server%5D__03t5uqz._.js.map
9
+ //# sourceMappingURL=%5Broot-of-the-server%5D__0qac4k0._.js.map