trybeacon 0.1.71 → 0.1.73

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 (392) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.next/BUILD_ID +1 -1
  3. package/.next/app-path-routes-manifest.json +25 -21
  4. package/.next/build-manifest.json +3 -3
  5. package/.next/prerender-manifest.json +3 -3
  6. package/.next/routes-manifest.json +30 -6
  7. package/.next/server/app/_global-error/page.js +3 -3
  8. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  9. package/.next/server/app/_global-error.html +1 -1
  10. package/.next/server/app/_global-error.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  16. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  17. package/.next/server/app/_not-found/page.js +2 -2
  18. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  19. package/.next/server/app/_not-found.html +1 -1
  20. package/.next/server/app/_not-found.rsc +11 -11
  21. package/.next/server/app/_not-found.segments/_full.segment.rsc +11 -11
  22. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  23. package/.next/server/app/_not-found.segments/_index.segment.rsc +11 -11
  24. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  25. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  26. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  27. package/.next/server/app/api/board-annotations/[id]/route.js +1 -1
  28. package/.next/server/app/api/board-annotations/route.js +1 -1
  29. package/.next/server/app/api/board-layout/route.js +1 -1
  30. package/.next/server/app/api/bug-flags/[id]/route.js +1 -1
  31. package/.next/server/app/api/bug-flags/route.js +1 -1
  32. package/.next/server/app/api/changes/comment/claim/route.js +1 -0
  33. package/.next/server/app/api/changes/comment/claim/route.js.nft.json +1 -0
  34. package/.next/server/app/api/changes/comment/claim/route_client-reference-manifest.js +1 -0
  35. package/.next/server/app/api/changes/comment/route.js +1 -0
  36. package/.next/server/app/api/changes/comment/route.js.nft.json +1 -0
  37. package/.next/server/app/api/changes/comment/route_client-reference-manifest.js +1 -0
  38. package/.next/server/app/api/changes/quality/route.js +1 -0
  39. package/.next/server/app/api/changes/quality/route.js.nft.json +1 -0
  40. package/.next/server/app/api/changes/quality/route_client-reference-manifest.js +1 -0
  41. package/.next/server/app/api/changes/route.js +1 -0
  42. package/.next/server/app/api/{flags → changes}/route.js.nft.json +1 -1
  43. package/.next/server/app/api/changes/route_client-reference-manifest.js +1 -0
  44. package/.next/server/app/api/changes/viewed/route.js +1 -0
  45. package/.next/server/app/api/changes/viewed/route.js.nft.json +1 -0
  46. package/.next/server/app/api/changes/viewed/route_client-reference-manifest.js +1 -0
  47. package/.next/server/app/api/code-graph/position/route.js +1 -1
  48. package/.next/server/app/api/code-graph/route.js +1 -1
  49. package/.next/server/app/api/context/feature/route.js +1 -1
  50. package/.next/server/app/api/context/file/route.js +1 -1
  51. package/.next/server/app/api/context/route.js +1 -9
  52. package/.next/server/app/api/context/route.js.nft.json +1 -1
  53. package/.next/server/app/api/db/arrange/route.js +1 -1
  54. package/.next/server/app/api/db/backfill-access/route.js +1 -1
  55. package/.next/server/app/api/db/position/route.js +1 -1
  56. package/.next/server/app/api/db/position/route.js.nft.json +1 -1
  57. package/.next/server/app/api/db/prune-planned/route.js +1 -1
  58. package/.next/server/app/api/db/reconcile-endpoints/route.js +1 -1
  59. package/.next/server/app/api/db/relations/[id]/route.js +1 -1
  60. package/.next/server/app/api/db/tables/[id]/route.js +1 -1
  61. package/.next/server/app/api/draft/approve/route.js +1 -1
  62. package/.next/server/app/api/draft/approve/route.js.nft.json +1 -1
  63. package/.next/server/app/api/draft/route.js +1 -1
  64. package/.next/server/app/api/draft/route.js.nft.json +1 -1
  65. package/.next/server/app/api/draft/status/route.js +1 -1
  66. package/.next/server/app/api/edges/[id]/route.js +1 -1
  67. package/.next/server/app/api/edges/route.js +1 -1
  68. package/.next/server/app/api/edges/route.js.nft.json +1 -1
  69. package/.next/server/app/api/endpoints/[id]/route.js +1 -1
  70. package/.next/server/app/api/entities/route.js +1 -1
  71. package/.next/server/app/api/ingest/route.js +1 -9
  72. package/.next/server/app/api/ingest/route.js.nft.json +1 -1
  73. package/.next/server/app/api/init/route.js +1 -9
  74. package/.next/server/app/api/init/route.js.nft.json +1 -1
  75. package/.next/server/app/api/lesson/close/route.js +1 -1
  76. package/.next/server/app/api/lesson/presence/route.js +1 -1
  77. package/.next/server/app/api/lesson/questions/route.js +1 -1
  78. package/.next/server/app/api/lesson/route.js +1 -1
  79. package/.next/server/app/api/lesson/save/route.js +1 -1
  80. package/.next/server/app/api/lesson/verdict/route.js +1 -1
  81. package/.next/server/app/api/map/describe/route.js +1 -9
  82. package/.next/server/app/api/map/describe/route.js.nft.json +1 -1
  83. package/.next/server/app/api/map/files/route.js +1 -1
  84. package/.next/server/app/api/map/files/route.js.nft.json +1 -1
  85. package/.next/server/app/api/map/finish/route.js +1 -1
  86. package/.next/server/app/api/map/finish/route.js.nft.json +1 -1
  87. package/.next/server/app/api/map/route.js +1 -1
  88. package/.next/server/app/api/map/route.js.nft.json +1 -1
  89. package/.next/server/app/api/map/start/route.js +1 -1
  90. package/.next/server/app/api/map/start/route.js.nft.json +1 -1
  91. package/.next/server/app/api/map/touch-active/route.js +1 -1
  92. package/.next/server/app/api/map/touch-active/route.js.nft.json +1 -1
  93. package/.next/server/app/api/mention-search/route.js +1 -1
  94. package/.next/server/app/api/nodes/[id]/position/route.js +1 -1
  95. package/.next/server/app/api/nodes/[id]/position/route.js.nft.json +1 -1
  96. package/.next/server/app/api/nodes/[id]/route.js +1 -1
  97. package/.next/server/app/api/nodes/[id]/route.js.nft.json +1 -1
  98. package/.next/server/app/api/nodes/positions/route.js +1 -1
  99. package/.next/server/app/api/nodes/positions/route.js.nft.json +1 -1
  100. package/.next/server/app/api/nodes/route.js +1 -1
  101. package/.next/server/app/api/nodes/route.js.nft.json +1 -1
  102. package/.next/server/app/api/nodes/subtasks/route.js +1 -1
  103. package/.next/server/app/api/nodes/subtasks/route.js.nft.json +1 -1
  104. package/.next/server/app/api/notes/[id]/route.js +1 -1
  105. package/.next/server/app/api/notes/route.js +1 -1
  106. package/.next/server/app/api/open/route.js +1 -1
  107. package/.next/server/app/api/plan/annotations/route.js +3 -3
  108. package/.next/server/app/api/plan/approve/route.js +1 -9
  109. package/.next/server/app/api/plan/approve/route.js.nft.json +1 -1
  110. package/.next/server/app/api/plan/history/route.js +1 -1
  111. package/.next/server/app/api/plan/markdown/route.js +1 -1
  112. package/.next/server/app/api/plan/markdown/route.js.nft.json +1 -1
  113. package/.next/server/app/api/plan/presence/route.js +1 -1
  114. package/.next/server/app/api/plan/route.js +1 -1
  115. package/.next/server/app/api/plan/route.js.nft.json +1 -1
  116. package/.next/server/app/api/plan/verdict/route.js +1 -1
  117. package/.next/server/app/api/plan/verdict/route.js.nft.json +1 -1
  118. package/.next/server/app/api/preferences/route.js +1 -1
  119. package/.next/server/app/api/project-meta/route.js +1 -1
  120. package/.next/server/app/api/reset/route.js +1 -1
  121. package/.next/server/app/api/scope-guard/check/route.js +1 -1
  122. package/.next/server/app/api/scope-guard/check/route.js.nft.json +1 -1
  123. package/.next/server/app/api/share/create/route.js +1 -1
  124. package/.next/server/app/api/share/create/route.js.nft.json +1 -1
  125. package/.next/server/app/api/share/route.js +1 -1
  126. package/.next/server/app/api/stream/route.js +2 -2
  127. package/.next/server/app/api/tab/nav/route.js +1 -1
  128. package/.next/server/app/api/tab/presence/route.js +1 -1
  129. package/.next/server/app/api/telemetry/route.js +1 -1
  130. package/.next/server/app/api/telemetry/stats/route.js +1 -1
  131. package/.next/server/app/api/version/route.js +1 -1
  132. package/.next/server/app/api/workspace/activate/route.js +1 -1
  133. package/.next/server/app/api/workspace/route.js +1 -1
  134. package/.next/server/app/apple-icon.png/route.js +1 -1
  135. package/.next/server/app/docs/page.js +2 -2
  136. package/.next/server/app/docs/page_client-reference-manifest.js +1 -1
  137. package/.next/server/app/docs.html +1 -1
  138. package/.next/server/app/docs.rsc +11 -11
  139. package/.next/server/app/docs.segments/_full.segment.rsc +11 -11
  140. package/.next/server/app/docs.segments/_head.segment.rsc +1 -1
  141. package/.next/server/app/docs.segments/_index.segment.rsc +11 -11
  142. package/.next/server/app/docs.segments/_tree.segment.rsc +2 -2
  143. package/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +1 -1
  144. package/.next/server/app/docs.segments/docs.segment.rsc +1 -1
  145. package/.next/server/app/help/page.js +2 -2
  146. package/.next/server/app/help/page_client-reference-manifest.js +1 -1
  147. package/.next/server/app/help.html +1 -1
  148. package/.next/server/app/help.rsc +11 -11
  149. package/.next/server/app/help.segments/_full.segment.rsc +11 -11
  150. package/.next/server/app/help.segments/_head.segment.rsc +1 -1
  151. package/.next/server/app/help.segments/_index.segment.rsc +11 -11
  152. package/.next/server/app/help.segments/_tree.segment.rsc +2 -2
  153. package/.next/server/app/help.segments/help/__PAGE__.segment.rsc +1 -1
  154. package/.next/server/app/help.segments/help.segment.rsc +1 -1
  155. package/.next/server/app/icon.svg/route.js +1 -1
  156. package/.next/server/app/index.html +1 -1
  157. package/.next/server/app/index.rsc +11 -11
  158. package/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  159. package/.next/server/app/index.segments/_full.segment.rsc +11 -11
  160. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  161. package/.next/server/app/index.segments/_index.segment.rsc +11 -11
  162. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  163. package/.next/server/app/learn/page.js +4 -4
  164. package/.next/server/app/learn/page.js.nft.json +1 -1
  165. package/.next/server/app/learn/page_client-reference-manifest.js +1 -1
  166. package/.next/server/app/map/page.js +2 -2
  167. package/.next/server/app/map/page.js.nft.json +1 -1
  168. package/.next/server/app/map/page_client-reference-manifest.js +1 -1
  169. package/.next/server/app/page.js +2 -2
  170. package/.next/server/app/page_client-reference-manifest.js +1 -1
  171. package/.next/server/app/plan/page.js +12 -2
  172. package/.next/server/app/plan/page.js.nft.json +1 -1
  173. package/.next/server/app/plan/page_client-reference-manifest.js +1 -1
  174. package/.next/server/app/s/[token]/page.js +2 -2
  175. package/.next/server/app/s/[token]/page.js.nft.json +1 -1
  176. package/.next/server/app/s/[token]/page_client-reference-manifest.js +1 -1
  177. package/.next/server/app/settings/page.js +2 -2
  178. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  179. package/.next/server/app-paths-manifest.json +25 -21
  180. package/.next/server/chunks/1130.js +1 -1
  181. package/.next/server/chunks/2025.js +1 -1
  182. package/.next/server/chunks/230.js +1 -0
  183. package/.next/server/chunks/2693.js +5 -0
  184. package/.next/server/chunks/4307.js +1 -1
  185. package/.next/server/chunks/6469.js +10 -0
  186. package/.next/server/chunks/8190.js +1 -0
  187. package/.next/server/chunks/8227.js +1 -0
  188. package/.next/server/chunks/8674.js +7 -0
  189. package/.next/server/middleware-build-manifest.js +1 -1
  190. package/.next/server/pages/404.html +1 -1
  191. package/.next/server/pages/500.html +1 -1
  192. package/.next/server/server-reference-manifest.js +1 -1
  193. package/.next/server/server-reference-manifest.json +1 -1
  194. package/.next/static/chunks/4853-0082a1e1b820a293.js +1 -0
  195. package/.next/static/chunks/5909-387573cddda35a48.js +1 -0
  196. package/.next/static/chunks/654-8e68a43e4c589e9c.js +1 -0
  197. package/.next/static/chunks/app/_global-error/page-5f4c3e6e9cc8e6c9.js +1 -0
  198. package/.next/static/chunks/app/api/board-annotations/[id]/route-5f4c3e6e9cc8e6c9.js +1 -0
  199. package/.next/static/chunks/app/api/board-annotations/route-5f4c3e6e9cc8e6c9.js +1 -0
  200. package/.next/static/chunks/app/api/board-layout/route-5f4c3e6e9cc8e6c9.js +1 -0
  201. package/.next/static/chunks/app/api/bug-flags/[id]/route-5f4c3e6e9cc8e6c9.js +1 -0
  202. package/.next/static/chunks/app/api/bug-flags/route-5f4c3e6e9cc8e6c9.js +1 -0
  203. package/.next/static/chunks/app/api/changes/comment/claim/route-5f4c3e6e9cc8e6c9.js +1 -0
  204. package/.next/static/chunks/app/api/changes/comment/route-5f4c3e6e9cc8e6c9.js +1 -0
  205. package/.next/static/chunks/app/api/changes/quality/route-5f4c3e6e9cc8e6c9.js +1 -0
  206. package/.next/static/chunks/app/api/changes/route-5f4c3e6e9cc8e6c9.js +1 -0
  207. package/.next/static/chunks/app/api/changes/viewed/route-5f4c3e6e9cc8e6c9.js +1 -0
  208. package/.next/static/chunks/app/api/code-graph/position/route-5f4c3e6e9cc8e6c9.js +1 -0
  209. package/.next/static/chunks/app/api/code-graph/route-5f4c3e6e9cc8e6c9.js +1 -0
  210. package/.next/static/chunks/app/api/context/feature/route-5f4c3e6e9cc8e6c9.js +1 -0
  211. package/.next/static/chunks/app/api/context/file/route-5f4c3e6e9cc8e6c9.js +1 -0
  212. package/.next/static/chunks/app/api/context/route-5f4c3e6e9cc8e6c9.js +1 -0
  213. package/.next/static/chunks/app/api/db/arrange/route-5f4c3e6e9cc8e6c9.js +1 -0
  214. package/.next/static/chunks/app/api/db/backfill-access/route-5f4c3e6e9cc8e6c9.js +1 -0
  215. package/.next/static/chunks/app/api/db/position/route-5f4c3e6e9cc8e6c9.js +1 -0
  216. package/.next/static/chunks/app/api/db/prune-planned/route-5f4c3e6e9cc8e6c9.js +1 -0
  217. package/.next/static/chunks/app/api/db/reconcile-endpoints/route-5f4c3e6e9cc8e6c9.js +1 -0
  218. package/.next/static/chunks/app/api/db/relations/[id]/route-5f4c3e6e9cc8e6c9.js +1 -0
  219. package/.next/static/chunks/app/api/db/tables/[id]/route-5f4c3e6e9cc8e6c9.js +1 -0
  220. package/.next/static/chunks/app/api/draft/approve/route-5f4c3e6e9cc8e6c9.js +1 -0
  221. package/.next/static/chunks/app/api/draft/route-5f4c3e6e9cc8e6c9.js +1 -0
  222. package/.next/static/chunks/app/api/draft/status/route-5f4c3e6e9cc8e6c9.js +1 -0
  223. package/.next/static/chunks/app/api/edges/[id]/route-5f4c3e6e9cc8e6c9.js +1 -0
  224. package/.next/static/chunks/app/api/edges/route-5f4c3e6e9cc8e6c9.js +1 -0
  225. package/.next/static/chunks/app/api/endpoints/[id]/route-5f4c3e6e9cc8e6c9.js +1 -0
  226. package/.next/static/chunks/app/api/entities/route-5f4c3e6e9cc8e6c9.js +1 -0
  227. package/.next/static/chunks/app/api/ingest/route-5f4c3e6e9cc8e6c9.js +1 -0
  228. package/.next/static/chunks/app/api/init/route-5f4c3e6e9cc8e6c9.js +1 -0
  229. package/.next/static/chunks/app/api/lesson/close/route-5f4c3e6e9cc8e6c9.js +1 -0
  230. package/.next/static/chunks/app/api/lesson/presence/route-5f4c3e6e9cc8e6c9.js +1 -0
  231. package/.next/static/chunks/app/api/lesson/questions/route-5f4c3e6e9cc8e6c9.js +1 -0
  232. package/.next/static/chunks/app/api/lesson/route-5f4c3e6e9cc8e6c9.js +1 -0
  233. package/.next/static/chunks/app/api/lesson/save/route-5f4c3e6e9cc8e6c9.js +1 -0
  234. package/.next/static/chunks/app/api/lesson/verdict/route-5f4c3e6e9cc8e6c9.js +1 -0
  235. package/.next/static/chunks/app/api/map/describe/route-5f4c3e6e9cc8e6c9.js +1 -0
  236. package/.next/static/chunks/app/api/map/files/route-5f4c3e6e9cc8e6c9.js +1 -0
  237. package/.next/static/chunks/app/api/map/finish/route-5f4c3e6e9cc8e6c9.js +1 -0
  238. package/.next/static/chunks/app/api/map/route-5f4c3e6e9cc8e6c9.js +1 -0
  239. package/.next/static/chunks/app/api/map/start/route-5f4c3e6e9cc8e6c9.js +1 -0
  240. package/.next/static/chunks/app/api/map/touch-active/route-5f4c3e6e9cc8e6c9.js +1 -0
  241. package/.next/static/chunks/app/api/mention-search/route-5f4c3e6e9cc8e6c9.js +1 -0
  242. package/.next/static/chunks/app/api/nodes/[id]/position/route-5f4c3e6e9cc8e6c9.js +1 -0
  243. package/.next/static/chunks/app/api/nodes/[id]/route-5f4c3e6e9cc8e6c9.js +1 -0
  244. package/.next/static/chunks/app/api/nodes/positions/route-5f4c3e6e9cc8e6c9.js +1 -0
  245. package/.next/static/chunks/app/api/nodes/route-5f4c3e6e9cc8e6c9.js +1 -0
  246. package/.next/static/chunks/app/api/nodes/subtasks/route-5f4c3e6e9cc8e6c9.js +1 -0
  247. package/.next/static/chunks/app/api/notes/[id]/route-5f4c3e6e9cc8e6c9.js +1 -0
  248. package/.next/static/chunks/app/api/notes/route-5f4c3e6e9cc8e6c9.js +1 -0
  249. package/.next/static/chunks/app/api/open/route-5f4c3e6e9cc8e6c9.js +1 -0
  250. package/.next/static/chunks/app/api/plan/annotations/route-5f4c3e6e9cc8e6c9.js +1 -0
  251. package/.next/static/chunks/app/api/plan/approve/route-5f4c3e6e9cc8e6c9.js +1 -0
  252. package/.next/static/chunks/app/api/plan/history/route-5f4c3e6e9cc8e6c9.js +1 -0
  253. package/.next/static/chunks/app/api/plan/markdown/route-5f4c3e6e9cc8e6c9.js +1 -0
  254. package/.next/static/chunks/app/api/plan/presence/route-5f4c3e6e9cc8e6c9.js +1 -0
  255. package/.next/static/chunks/app/api/plan/route-5f4c3e6e9cc8e6c9.js +1 -0
  256. package/.next/static/chunks/app/api/plan/verdict/route-5f4c3e6e9cc8e6c9.js +1 -0
  257. package/.next/static/chunks/app/api/preferences/route-5f4c3e6e9cc8e6c9.js +1 -0
  258. package/.next/static/chunks/app/api/project-meta/route-5f4c3e6e9cc8e6c9.js +1 -0
  259. package/.next/static/chunks/app/api/reset/route-5f4c3e6e9cc8e6c9.js +1 -0
  260. package/.next/static/chunks/app/api/scope-guard/check/route-5f4c3e6e9cc8e6c9.js +1 -0
  261. package/.next/static/chunks/app/api/share/create/route-5f4c3e6e9cc8e6c9.js +1 -0
  262. package/.next/static/chunks/app/api/share/route-5f4c3e6e9cc8e6c9.js +1 -0
  263. package/.next/static/chunks/app/api/stream/route-5f4c3e6e9cc8e6c9.js +1 -0
  264. package/.next/static/chunks/app/api/tab/nav/route-5f4c3e6e9cc8e6c9.js +1 -0
  265. package/.next/static/chunks/app/api/tab/presence/route-5f4c3e6e9cc8e6c9.js +1 -0
  266. package/.next/static/chunks/app/api/telemetry/route-5f4c3e6e9cc8e6c9.js +1 -0
  267. package/.next/static/chunks/app/api/telemetry/stats/route-5f4c3e6e9cc8e6c9.js +1 -0
  268. package/.next/static/chunks/app/api/version/route-5f4c3e6e9cc8e6c9.js +1 -0
  269. package/.next/static/chunks/app/api/workspace/activate/route-5f4c3e6e9cc8e6c9.js +1 -0
  270. package/.next/static/chunks/app/api/workspace/route-5f4c3e6e9cc8e6c9.js +1 -0
  271. package/.next/static/chunks/app/{layout-d3b7276f116dce46.js → layout-6e934a2850efd223.js} +1 -1
  272. package/.next/static/chunks/app/learn/page-a14eaf5143e2df55.js +7 -0
  273. package/.next/static/chunks/app/map/{page-5d73cd85ed62df7a.js → page-06282017c592fb3c.js} +1 -1
  274. package/.next/static/chunks/app/plan/page-41a3990cb858c5f2.js +11 -0
  275. package/.next/static/chunks/app/s/[token]/{page-4d3ed0a6a420eb44.js → page-a4deb16beff21840.js} +1 -1
  276. package/.next/static/chunks/app/settings/page-67cab634be8bfef2.js +1 -0
  277. package/.next/static/chunks/next/dist/client/components/builtin/app-error-5f4c3e6e9cc8e6c9.js +1 -0
  278. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-5f4c3e6e9cc8e6c9.js +1 -0
  279. package/.next/static/chunks/next/dist/client/components/builtin/not-found-5f4c3e6e9cc8e6c9.js +1 -0
  280. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-5f4c3e6e9cc8e6c9.js +1 -0
  281. package/.next/static/chunks/{webpack-de4a0d9611ec2cad.js → webpack-6c27b0ed1ac1459c.js} +1 -1
  282. package/.next/static/css/95dc31edc34789a7.css +1 -0
  283. package/.next/static/css/a5d17568738ef1e9.css +1 -0
  284. package/.next/static/mB9lqGEsIvB7tTvv9GU48/_buildManifest.js +1 -0
  285. package/.next/trace +45 -43
  286. package/.next/trace-build +1 -1
  287. package/.next/types/app/api/changes/comment/claim/route.ts +351 -0
  288. package/.next/types/app/api/changes/comment/route.ts +351 -0
  289. package/.next/types/app/api/changes/quality/route.ts +351 -0
  290. package/.next/types/app/api/{flags → changes}/route.ts +3 -3
  291. package/.next/types/app/api/changes/viewed/route.ts +351 -0
  292. package/.next/types/routes.d.ts +6 -2
  293. package/.next/types/validator.ts +45 -9
  294. package/bun.lock +54 -0
  295. package/dist/bin/doctor.js +33 -32
  296. package/dist/bin/guard.js +1 -1
  297. package/dist/bin/hook.js +33 -32
  298. package/dist/bin/mcp.js +43 -42
  299. package/dist/bin/plan.js +35 -34
  300. package/dist/bin/uninstall.js +34 -33
  301. package/dist/lib/assets.js +25 -24
  302. package/dist/lib/codex-install.js +32 -31
  303. package/dist/lib/global-install.js +33 -32
  304. package/package.json +3 -1
  305. package/plugin/skills/beacon-plan/SKILL.md +5 -4
  306. package/.next/server/app/api/flags/route.js +0 -1
  307. package/.next/server/app/api/flags/route_client-reference-manifest.js +0 -1
  308. package/.next/server/chunks/3098.js +0 -1
  309. package/.next/server/chunks/3221.js +0 -5
  310. package/.next/server/chunks/6810.js +0 -1
  311. package/.next/static/GjuqgbaZr9M0AGKgnA2hT/_buildManifest.js +0 -1
  312. package/.next/static/chunks/1052-151437e30240c959.js +0 -1
  313. package/.next/static/chunks/4853-946597034e74be36.js +0 -1
  314. package/.next/static/chunks/app/_global-error/page-93569b5eb93a61e9.js +0 -1
  315. package/.next/static/chunks/app/api/board-annotations/[id]/route-93569b5eb93a61e9.js +0 -1
  316. package/.next/static/chunks/app/api/board-annotations/route-93569b5eb93a61e9.js +0 -1
  317. package/.next/static/chunks/app/api/board-layout/route-93569b5eb93a61e9.js +0 -1
  318. package/.next/static/chunks/app/api/bug-flags/[id]/route-93569b5eb93a61e9.js +0 -1
  319. package/.next/static/chunks/app/api/bug-flags/route-93569b5eb93a61e9.js +0 -1
  320. package/.next/static/chunks/app/api/code-graph/position/route-93569b5eb93a61e9.js +0 -1
  321. package/.next/static/chunks/app/api/code-graph/route-93569b5eb93a61e9.js +0 -1
  322. package/.next/static/chunks/app/api/context/feature/route-93569b5eb93a61e9.js +0 -1
  323. package/.next/static/chunks/app/api/context/file/route-93569b5eb93a61e9.js +0 -1
  324. package/.next/static/chunks/app/api/context/route-93569b5eb93a61e9.js +0 -1
  325. package/.next/static/chunks/app/api/db/arrange/route-93569b5eb93a61e9.js +0 -1
  326. package/.next/static/chunks/app/api/db/backfill-access/route-93569b5eb93a61e9.js +0 -1
  327. package/.next/static/chunks/app/api/db/position/route-93569b5eb93a61e9.js +0 -1
  328. package/.next/static/chunks/app/api/db/prune-planned/route-93569b5eb93a61e9.js +0 -1
  329. package/.next/static/chunks/app/api/db/reconcile-endpoints/route-93569b5eb93a61e9.js +0 -1
  330. package/.next/static/chunks/app/api/db/relations/[id]/route-93569b5eb93a61e9.js +0 -1
  331. package/.next/static/chunks/app/api/db/tables/[id]/route-93569b5eb93a61e9.js +0 -1
  332. package/.next/static/chunks/app/api/draft/approve/route-93569b5eb93a61e9.js +0 -1
  333. package/.next/static/chunks/app/api/draft/route-93569b5eb93a61e9.js +0 -1
  334. package/.next/static/chunks/app/api/draft/status/route-93569b5eb93a61e9.js +0 -1
  335. package/.next/static/chunks/app/api/edges/[id]/route-93569b5eb93a61e9.js +0 -1
  336. package/.next/static/chunks/app/api/edges/route-93569b5eb93a61e9.js +0 -1
  337. package/.next/static/chunks/app/api/endpoints/[id]/route-93569b5eb93a61e9.js +0 -1
  338. package/.next/static/chunks/app/api/entities/route-93569b5eb93a61e9.js +0 -1
  339. package/.next/static/chunks/app/api/flags/route-93569b5eb93a61e9.js +0 -1
  340. package/.next/static/chunks/app/api/ingest/route-93569b5eb93a61e9.js +0 -1
  341. package/.next/static/chunks/app/api/init/route-93569b5eb93a61e9.js +0 -1
  342. package/.next/static/chunks/app/api/lesson/close/route-93569b5eb93a61e9.js +0 -1
  343. package/.next/static/chunks/app/api/lesson/presence/route-93569b5eb93a61e9.js +0 -1
  344. package/.next/static/chunks/app/api/lesson/questions/route-93569b5eb93a61e9.js +0 -1
  345. package/.next/static/chunks/app/api/lesson/route-93569b5eb93a61e9.js +0 -1
  346. package/.next/static/chunks/app/api/lesson/save/route-93569b5eb93a61e9.js +0 -1
  347. package/.next/static/chunks/app/api/lesson/verdict/route-93569b5eb93a61e9.js +0 -1
  348. package/.next/static/chunks/app/api/map/describe/route-93569b5eb93a61e9.js +0 -1
  349. package/.next/static/chunks/app/api/map/files/route-93569b5eb93a61e9.js +0 -1
  350. package/.next/static/chunks/app/api/map/finish/route-93569b5eb93a61e9.js +0 -1
  351. package/.next/static/chunks/app/api/map/route-93569b5eb93a61e9.js +0 -1
  352. package/.next/static/chunks/app/api/map/start/route-93569b5eb93a61e9.js +0 -1
  353. package/.next/static/chunks/app/api/map/touch-active/route-93569b5eb93a61e9.js +0 -1
  354. package/.next/static/chunks/app/api/mention-search/route-93569b5eb93a61e9.js +0 -1
  355. package/.next/static/chunks/app/api/nodes/[id]/position/route-93569b5eb93a61e9.js +0 -1
  356. package/.next/static/chunks/app/api/nodes/[id]/route-93569b5eb93a61e9.js +0 -1
  357. package/.next/static/chunks/app/api/nodes/positions/route-93569b5eb93a61e9.js +0 -1
  358. package/.next/static/chunks/app/api/nodes/route-93569b5eb93a61e9.js +0 -1
  359. package/.next/static/chunks/app/api/nodes/subtasks/route-93569b5eb93a61e9.js +0 -1
  360. package/.next/static/chunks/app/api/notes/[id]/route-93569b5eb93a61e9.js +0 -1
  361. package/.next/static/chunks/app/api/notes/route-93569b5eb93a61e9.js +0 -1
  362. package/.next/static/chunks/app/api/open/route-93569b5eb93a61e9.js +0 -1
  363. package/.next/static/chunks/app/api/plan/annotations/route-93569b5eb93a61e9.js +0 -1
  364. package/.next/static/chunks/app/api/plan/approve/route-93569b5eb93a61e9.js +0 -1
  365. package/.next/static/chunks/app/api/plan/history/route-93569b5eb93a61e9.js +0 -1
  366. package/.next/static/chunks/app/api/plan/markdown/route-93569b5eb93a61e9.js +0 -1
  367. package/.next/static/chunks/app/api/plan/presence/route-93569b5eb93a61e9.js +0 -1
  368. package/.next/static/chunks/app/api/plan/route-93569b5eb93a61e9.js +0 -1
  369. package/.next/static/chunks/app/api/plan/verdict/route-93569b5eb93a61e9.js +0 -1
  370. package/.next/static/chunks/app/api/preferences/route-93569b5eb93a61e9.js +0 -1
  371. package/.next/static/chunks/app/api/project-meta/route-93569b5eb93a61e9.js +0 -1
  372. package/.next/static/chunks/app/api/reset/route-93569b5eb93a61e9.js +0 -1
  373. package/.next/static/chunks/app/api/scope-guard/check/route-93569b5eb93a61e9.js +0 -1
  374. package/.next/static/chunks/app/api/share/create/route-93569b5eb93a61e9.js +0 -1
  375. package/.next/static/chunks/app/api/share/route-93569b5eb93a61e9.js +0 -1
  376. package/.next/static/chunks/app/api/stream/route-93569b5eb93a61e9.js +0 -1
  377. package/.next/static/chunks/app/api/tab/nav/route-93569b5eb93a61e9.js +0 -1
  378. package/.next/static/chunks/app/api/tab/presence/route-93569b5eb93a61e9.js +0 -1
  379. package/.next/static/chunks/app/api/telemetry/route-93569b5eb93a61e9.js +0 -1
  380. package/.next/static/chunks/app/api/telemetry/stats/route-93569b5eb93a61e9.js +0 -1
  381. package/.next/static/chunks/app/api/version/route-93569b5eb93a61e9.js +0 -1
  382. package/.next/static/chunks/app/api/workspace/activate/route-93569b5eb93a61e9.js +0 -1
  383. package/.next/static/chunks/app/api/workspace/route-93569b5eb93a61e9.js +0 -1
  384. package/.next/static/chunks/app/learn/page-bb7141041f6b6e08.js +0 -7
  385. package/.next/static/chunks/app/plan/page-6b546f1602bd1108.js +0 -1
  386. package/.next/static/chunks/app/settings/page-7e176d120b1effa9.js +0 -1
  387. package/.next/static/chunks/next/dist/client/components/builtin/app-error-93569b5eb93a61e9.js +0 -1
  388. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-93569b5eb93a61e9.js +0 -1
  389. package/.next/static/chunks/next/dist/client/components/builtin/not-found-93569b5eb93a61e9.js +0 -1
  390. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-93569b5eb93a61e9.js +0 -1
  391. package/.next/static/css/b51708465127fded.css +0 -1
  392. /package/.next/static/{GjuqgbaZr9M0AGKgnA2hT → mB9lqGEsIvB7tTvv9GU48}/_ssgManifest.js +0 -0
@@ -1,21 +1,21 @@
1
1
  // @bun
2
- var I=Object.defineProperty;var E=(z)=>z;function M(z,J){this[z]=E.bind(null,J)}var K=(z,J)=>{for(var q in J)I(z,q,{get:J[q],enumerable:!0,configurable:!0,set:M.bind(J,q)})};var T=(z,J)=>()=>(z&&(J=z(z=0)),J);var a=1500,d=480000,p=1800000,C=3600000,c=3000;var f=()=>{};var y={};K(y,{removeRepoAssets:()=>l,installRefreshSkill:()=>O,installPlanSkill:()=>L,installInitSkill:()=>j,installExplainSkill:()=>g,installCodexRepoSkills:()=>_,ensureWorkflowDoc:()=>h,ensureMcp:()=>R,auditRepo:()=>m,REFRESH_SKILL:()=>b,PLAN_SKILL:()=>A,INIT_SKILL:()=>k,EXPLAIN_SKILL:()=>W});import{existsSync as D,mkdirSync as B,readFileSync as H,rmSync as U,writeFileSync as $}from"fs";import{join as Q}from"path";function j(z){let J=Q(z,".claude","skills","beacon-init");B(J,{recursive:!0});let q=Q(J,"SKILL.md");return $(q,k),q}function O(z){let J=Q(z,".claude","skills","beacon-refresh");B(J,{recursive:!0});let q=Q(J,"SKILL.md");return $(q,b),q}function L(z){let J=Q(z,".claude","skills","beacon-plan");B(J,{recursive:!0});let q=Q(J,"SKILL.md");return $(q,A),q}function g(z){let J=Q(z,".claude","skills","beacon-explain");B(J,{recursive:!0});let q=Q(J,"SKILL.md");return $(q,W),q}function _(z){let J=[];for(let q of F){let Y=Q(z,".agents","skills",q.name);B(Y,{recursive:!0});let G=Q(Y,"SKILL.md");$(G,q.body()),J.push(G)}return J}function h(z){let J=Q(z,"AGENTS.md"),q="";try{q=H(J,"utf8")}catch{}let Y=new RegExp(`${v}[\\s\\S]*?${P}`);q=Y.test(q)?q.replace(Y,u):`${q.trim()}
3
-
4
- ${u}
5
- `.trimStart(),$(J,q.endsWith(`
6
- `)?q:`${q}
7
- `);let G=Q(z,"CLAUDE.md"),X="";try{X=H(G,"utf8")}catch{}if(!/@AGENTS\.md/.test(X))$(G,`${X?`${X.trim()}
8
-
9
- `:""}@AGENTS.md
10
- `)}function R(z){let J=Q(z,".mcp.json"),q={};try{q=JSON.parse(H(J,"utf8"))}catch{}q.mcpServers=q.mcpServers??{};let Y=q.mcpServers.beacon;if(Y){if(!Y.timeout||Y.timeout<C)return Y.timeout=C,$(J,JSON.stringify(q,null,2)+`
11
- `),{path:J,added:!1,updated:!0};return{path:J,added:!1,updated:!1}}return q.mcpServers.beacon={command:"beacon",args:["mcp"],timeout:C},$(J,JSON.stringify(q,null,2)+`
12
- `),{path:J,added:!0,updated:!1}}function m(z){let J=Q(z,".mcp.json"),q=!1;try{q=!!JSON.parse(H(J,"utf8")).mcpServers?.beacon}catch{}let Y=!1;try{Y=H(Q(z,"AGENTS.md"),"utf8").includes(v)}catch{}let G=!1;try{G=/@AGENTS\.md/.test(H(Q(z,"CLAUDE.md"),"utf8"))}catch{}return{repo:z,mcpRegistered:q,agentsMdBlock:Y,claudeMdImport:G,skills:{"beacon-init":D(Q(z,".claude","skills","beacon-init","SKILL.md")),"beacon-refresh":D(Q(z,".claude","skills","beacon-refresh","SKILL.md"))},codexSkills:{"beacon-init":D(Q(z,".agents","skills","beacon-init","SKILL.md")),"beacon-refresh":D(Q(z,".agents","skills","beacon-refresh","SKILL.md"))}}}function l(z){let J=[];for(let V of["beacon-init","beacon-refresh","beacon-db-design"]){let Z=Q(z,".claude","skills",V);if(D(Z))U(Z,{recursive:!0,force:!0}),J.push(V)}for(let V of["beacon-init","beacon-refresh"]){let Z=Q(z,".agents","skills",V);if(D(Z))U(Z,{recursive:!0,force:!0}),J.push(`codex:${V}`)}let q=!1,Y=Q(z,".mcp.json");try{let V=JSON.parse(H(Y,"utf8"));if(V.mcpServers?.beacon){if(delete V.mcpServers.beacon,q=!0,V.mcpServers&&Object.keys(V.mcpServers).length===0)delete V.mcpServers;if(Object.keys(V).length===0)U(Y,{force:!0});else $(Y,JSON.stringify(V,null,2)+`
13
- `)}}catch{}let G=!1,X=Q(z,"AGENTS.md");try{let V=H(X,"utf8"),Z=new RegExp(`\\n?${v}[\\s\\S]*?${P}\\n?`);if(Z.test(V)){let N=V.replace(Z,`
2
+ var f=Object.defineProperty;var K=(z)=>z;function j(z,q){this[z]=K.bind(null,q)}var O=(z,q)=>{for(var J in q)f(z,J,{get:q[J],enumerable:!0,configurable:!0,set:j.bind(q,J)})};var w=(z,q)=>()=>(z&&(q=z(z=0)),q);var c=1500,p=480000,n=1800000,U=3600000,t=3000;var W=()=>{};var d={};O(d,{stripAgentsPointer:()=>A,removeRepoAssets:()=>S,installRefreshSkill:()=>F,installPlanSkill:()=>_,installInitSkill:()=>L,installExplainSkill:()=>g,installCodexRepoSkills:()=>R,ensureWorkflowDoc:()=>h,ensureMcp:()=>y,contextDocTargets:()=>b,auditRepo:()=>l,REFRESH_SKILL:()=>x,PLAN_SKILL:()=>u,INIT_SKILL:()=>P,EXPLAIN_SKILL:()=>E});import{existsSync as H,mkdirSync as D,readFileSync as X,rmSync as v,writeFileSync as G}from"fs";import{join as V}from"path";function L(z){let q=V(z,".claude","skills","beacon-init");D(q,{recursive:!0});let J=V(q,"SKILL.md");return G(J,P),J}function F(z){let q=V(z,".claude","skills","beacon-refresh");D(q,{recursive:!0});let J=V(q,"SKILL.md");return G(J,x),J}function _(z){let q=V(z,".claude","skills","beacon-plan");D(q,{recursive:!0});let J=V(q,"SKILL.md");return G(J,u),J}function g(z){let q=V(z,".claude","skills","beacon-explain");D(q,{recursive:!0});let J=V(q,"SKILL.md");return G(J,E),J}function R(z){let q=[];for(let J of m){let Q=V(z,".agents","skills",J.name);D(Q,{recursive:!0});let Z=V(Q,"SKILL.md");G(Z,J.body()),q.push(Z)}return q}function b(z){let q=V(z,"AGENTS.md"),J=V(z,"CLAUDE.md"),Q=H(q),Z=H(J);if(!Q&&!Z)return[q,J];let B=[];if(Q)B.push(q);if(Z)B.push(J);return B}function A(z){let q=V(z,"CLAUDE.md");if(!H(q))return;let J=X(q,"utf8"),Q=J.split(`
3
+ `).filter((Z)=>!/^\s*@\.?\/?AGENTS\.md\s*$/.test(Z)).join(`
4
+ `).trim();if(Q&&Q!==J.trim())G(q,`${Q}
5
+ `)}function h(z){let q=new RegExp(`${C}[\\s\\S]*?${M}`);for(let J of b(z)){let Q="";try{Q=X(J,"utf8")}catch{}Q=q.test(Q)?Q.replace(q,T):`${Q.trim()}
6
+
7
+ ${T}
8
+ `.trimStart(),G(J,Q.endsWith(`
9
+ `)?Q:`${Q}
10
+ `)}A(z)}function y(z){let q=V(z,".mcp.json"),J={};try{J=JSON.parse(X(q,"utf8"))}catch{}J.mcpServers=J.mcpServers??{};let Q=J.mcpServers.beacon;if(Q){if(!Q.timeout||Q.timeout<U)return Q.timeout=U,G(q,JSON.stringify(J,null,2)+`
11
+ `),{path:q,added:!1,updated:!0};return{path:q,added:!1,updated:!1}}return J.mcpServers.beacon={command:"beacon",args:["mcp"],timeout:U},G(q,JSON.stringify(J,null,2)+`
12
+ `),{path:q,added:!0,updated:!1}}function l(z){let q=V(z,".mcp.json"),J=!1;try{J=!!JSON.parse(X(q,"utf8")).mcpServers?.beacon}catch{}let Q=b(z).some((Z)=>{try{return X(Z,"utf8").includes(C)}catch{return!1}});return{repo:z,mcpRegistered:J,workflowBlock:Q,skills:{"beacon-init":H(V(z,".claude","skills","beacon-init","SKILL.md")),"beacon-refresh":H(V(z,".claude","skills","beacon-refresh","SKILL.md"))},codexSkills:{"beacon-init":H(V(z,".agents","skills","beacon-init","SKILL.md")),"beacon-refresh":H(V(z,".agents","skills","beacon-refresh","SKILL.md"))}}}function S(z){let q=[];for(let Y of["beacon-init","beacon-refresh","beacon-db-design"]){let $=V(z,".claude","skills",Y);if(H($))v($,{recursive:!0,force:!0}),q.push(Y)}for(let Y of["beacon-init","beacon-refresh"]){let $=V(z,".agents","skills",Y);if(H($))v($,{recursive:!0,force:!0}),q.push(`codex:${Y}`)}let J=!1,Q=V(z,".mcp.json");try{let Y=JSON.parse(X(Q,"utf8"));if(Y.mcpServers?.beacon){if(delete Y.mcpServers.beacon,J=!0,Y.mcpServers&&Object.keys(Y.mcpServers).length===0)delete Y.mcpServers;if(Object.keys(Y).length===0)v(Q,{force:!0});else G(Q,JSON.stringify(Y,null,2)+`
13
+ `)}}catch{}let Z=!1,B=new RegExp(`\\n?${C}[\\s\\S]*?${M}\\n?`);for(let Y of[V(z,"AGENTS.md"),V(z,"CLAUDE.md")])try{let $=X(Y,"utf8");if(B.test($)){let k=$.replace(B,`
14
14
  `).replace(/\n{3,}/g,`
15
15
 
16
- `).trimStart();$(X,N.endsWith(`
17
- `)?N:`${N}
18
- `),G=!0}}catch{}let w=!1,x=Q(z,"CLAUDE.md");try{let V=H(x,"utf8"),Z=V.replace(/^[ \t]*@AGENTS\.md[ \t]*\n?/m,"");if(Z!==V){if(!Z.trim())U(x,{force:!0});else $(x,Z);w=!0}}catch{}return{skillsRemoved:J,mcpUnregistered:q,agentsBlockRemoved:G,claudeImportRemoved:w}}var k=`---
16
+ `).trimStart();G(Y,k.endsWith(`
17
+ `)?k:`${k}
18
+ `),Z=!0}}catch{}let I=!1,N=V(z,"CLAUDE.md");try{let Y=X(N,"utf8"),$=Y.replace(/^[ \t]*@AGENTS\.md[ \t]*\n?/m,"");if($!==Y){if(!$.trim())v(N,{force:!0});else G(N,$);I=!0}}catch{}return{skillsRemoved:q,mcpUnregistered:J,agentsBlockRemoved:Z,claudeImportRemoved:I}}var P=`---
19
19
  name: beacon-init
20
20
  description: Read this repository and map its architecture, schema, and roadmap into Beacon (the local visual planning panel). Use when the user runs /beacon-init, asks to "set up Beacon for this repo", or asks to initialize/bootstrap Beacon's map of this codebase.
21
21
  ---
@@ -62,7 +62,7 @@ beacon init-persist /tmp/beacon-init.json # or: beacon init-persist < /tmp/bea
62
62
  That one command wires the repo (writes \`.mcp.json\` + skills so your NEXT session gets the \`beacon_*\` tools natively, heals the global install), starts the Beacon daemon if it isn't running, registers + provisions this workspace, and POSTs your analysis to the same \`/api/init\` endpoint the MCP tool uses \u2014 so init completes in THIS session. Read the counts it prints and report them.
63
63
 
64
64
  After the tool (or \`beacon init-persist\`) returns, tell the user the counts (components / roadmap / tables / endpoints) and point them at the running Beacon panel.
65
- `,b=`---
65
+ `,x=`---
66
66
  name: beacon-refresh
67
67
  description: Re-survey the repo and update Beacon's architecture / schema / endpoints map after /beacon-init was already run \u2014 picks up new components, removed ones, schema changes, and new routes. Use when the user runs /beacon-refresh or asks to "refresh", "update", "re-sync", or "bring Beacon up to date" with the current code.
68
68
  ---
@@ -109,7 +109,7 @@ The one caveat: if the user manually edited an INIT-source node on the canvas (e
109
109
  If \`beacon_entities\` or \`beacon_init_persist\` isn't available, the Beacon panel isn't running in this repo. Tell the user to run \`beacon\` here first, then re-invoke /beacon-refresh.
110
110
 
111
111
  After the tool returns, report the final counts plus a one-line summary of the diff you surfaced.
112
- `,A=`---
112
+ `,u=`---
113
113
  name: beacon-plan
114
114
  description: Present your current plan or approach to the user on Beacon's /plan canvas for review \u2014 instead of asking for approval in prose. Use when the user says "present the plan", "show me the plan", "let me see it / the plan", or whenever you are about to end a turn asking whether to proceed with a plan, design, or approach.
115
115
  ---
@@ -138,10 +138,11 @@ board on /plan. The board is built ONLY from the block \u2014 prose is never par
138
138
  table/endpoint/feature you mention in the prose into the block, or that board will be empty.
139
139
 
140
140
  - **Declare your scope.** List the repo-relative files this plan will touch in a top-level
141
- \`"contract"\` array in the block (or the \`contract\` arg of \`beacon_propose_plan\`). When the user
142
- has the plan scope-guard enabled, those files are frozen at approval and you're held to them while
143
- implementing \u2014 editing an undeclared file pauses for the user's authorization (which then adds it
144
- to the contract). Harmless when the guard is off. Declare the files you genuinely expect to edit.
141
+ \`"contract"\` array in the block (or the \`contract\` arg of \`beacon_propose_plan\`). Those files are
142
+ frozen at approval and you're held to them while implementing \u2014 editing an undeclared file pauses
143
+ for the user's authorization (which then adds it to the contract), and the /plan Changes view
144
+ groups your edits On-plan vs Strayed against them. Declare the files you genuinely expect to edit
145
+ (if omitted, the scope is inferred from the files you name in backticks).
145
146
 
146
147
  \`beacon_present_plan\` opens /plan and BLOCKS until the user clicks Approve / Discard / submits
147
148
  feedback, then returns their verdict. Implement code or migrations ONLY after it returns approval.
@@ -157,7 +158,7 @@ If it returns feedback, revise and call it again.
157
158
  If \`beacon_present_plan\` isn't available, the panel isn't wired here \u2014 fall back to ExitPlanMode
158
159
  with the same \`\`\`beacon block (Claude Code only; Codex has no ExitPlanMode), or tell the user to
159
160
  run \`beacon\` in this repo once.
160
- `,W=`---
161
+ `,E=`---
161
162
  name: beacon-explain
162
163
  description: Teach the user part of THIS codebase as an interactive visual lesson on Beacon's /learn page \u2014 a concept map + plain-English narrative they can question \u2014 instead of a wall of text. Use when the user says "explain", "teach me", "walk me through", "how does X work", or "help me understand the Y category".
163
164
  ---
@@ -227,7 +228,7 @@ so the learner sees the table IN CONTEXT, wired to the code that uses it.
227
228
  Every answer must ADD understanding (rationale, trade-off) \u2014 never just restate the question. Expand
228
229
  the narrative or add nodes where it helps. Keep looping until the tool reports the user saved or closed
229
230
  the lesson.
230
- `,F,v="<!-- beacon:workflow:start -->",P="<!-- beacon:workflow:end -->",u;var S=T(()=>{f();F=[{name:"beacon-init",body:()=>k},{name:"beacon-refresh",body:()=>b}];u=`${v}
231
+ `,m,C="<!-- beacon:workflow:start -->",M="<!-- beacon:workflow:end -->",T;var s=w(()=>{W();m=[{name:"beacon-init",body:()=>P},{name:"beacon-refresh",body:()=>x}];T=`${C}
231
232
  ## Beacon \u2014 feature workflow
232
233
 
233
234
  This project uses Beacon (a local planning/visualization panel; run \`beacon\` to open it). When you start work on a FEATURE \u2014 whether referenced via an \`@beacon:feature://\u2026\` mention, an \`@beacon:note://\u2026\` note the user wrote in the Notes panel (treat its checkbox \`- [ ]\` todos as subtasks and order features by their dependencies), or just described in chat \u2014 follow these steps in order:
@@ -299,4 +300,4 @@ Register them all in that single batched call. If a plan added five features, th
299
300
  If the feature added or materially changed a REAL architectural component (a subsystem \u2014 NOT a file), also pass \`architecture: [{ title, domain, role, \u2026 }]\` so the Architecture map stays accurate. It upserts curated components by title; never list files as components. If you found a bug or something worth investigating in a component's code, add \`bugs: [{ note }]\` to its architecture entry \u2014 it renders as a bug flag on the node (attributed to the agent); identical open flags are not duplicated. Only flag what you actually saw in the code.
300
301
 
301
302
  Pull raw planning data anytime with \`beacon_entities\` (features / architecture / tables / endpoints).
302
- ${P}`});S();export{l as removeRepoAssets,O as installRefreshSkill,L as installPlanSkill,j as installInitSkill,g as installExplainSkill,_ as installCodexRepoSkills,h as ensureWorkflowDoc,R as ensureMcp,m as auditRepo,b as REFRESH_SKILL,A as PLAN_SKILL,k as INIT_SKILL,W as EXPLAIN_SKILL};
303
+ ${M}`});s();export{A as stripAgentsPointer,S as removeRepoAssets,F as installRefreshSkill,_ as installPlanSkill,L as installInitSkill,g as installExplainSkill,R as installCodexRepoSkills,h as ensureWorkflowDoc,y as ensureMcp,b as contextDocTargets,l as auditRepo,x as REFRESH_SKILL,u as PLAN_SKILL,P as INIT_SKILL,E as EXPLAIN_SKILL};
@@ -1,21 +1,21 @@
1
1
  // @bun
2
- var bq=Object.defineProperty;var wq=(q)=>q;function gq(q,J){this[q]=wq.bind(null,J)}var d=(q,J)=>{for(var z in J)bq(q,z,{get:J[z],enumerable:!0,configurable:!0,set:gq.bind(J,z)})};var u=(q,J)=>()=>(q&&(J=q(q=0)),J);var tq=1500,nq=480000,rq=1800000,C=3600000,oq=3000;var c=()=>{};var o={};d(o,{removeRepoAssets:()=>Aq,installRefreshSkill:()=>Cq,installPlanSkill:()=>Kq,installInitSkill:()=>jq,installExplainSkill:()=>Nq,installCodexRepoSkills:()=>Rq,ensureWorkflowDoc:()=>fq,ensureMcp:()=>Dq,auditRepo:()=>Tq,REFRESH_SKILL:()=>L,PLAN_SKILL:()=>n,INIT_SKILL:()=>O,EXPLAIN_SKILL:()=>r});import{existsSync as G,mkdirSync as b,readFileSync as B,rmSync as K,writeFileSync as H}from"fs";import{join as Z}from"path";function jq(q){let J=Z(q,".claude","skills","beacon-init");b(J,{recursive:!0});let z=Z(J,"SKILL.md");return H(z,O),z}function Cq(q){let J=Z(q,".claude","skills","beacon-refresh");b(J,{recursive:!0});let z=Z(J,"SKILL.md");return H(z,L),z}function Kq(q){let J=Z(q,".claude","skills","beacon-plan");b(J,{recursive:!0});let z=Z(J,"SKILL.md");return H(z,n),z}function Nq(q){let J=Z(q,".claude","skills","beacon-explain");b(J,{recursive:!0});let z=Z(J,"SKILL.md");return H(z,r),z}function Rq(q){let J=[];for(let z of Mq){let Q=Z(q,".agents","skills",z.name);b(Q,{recursive:!0});let V=Z(Q,"SKILL.md");H(V,z.body()),J.push(V)}return J}function fq(q){let J=Z(q,"AGENTS.md"),z="";try{z=B(J,"utf8")}catch{}let Q=new RegExp(`${N}[\\s\\S]*?${y}`);z=Q.test(z)?z.replace(Q,t):`${z.trim()}
2
+ var jq=Object.defineProperty;var gq=(q)=>q;function Kq(q,z){this[q]=gq.bind(null,z)}var s=(q,z)=>{for(var J in z)jq(q,J,{get:z[J],enumerable:!0,configurable:!0,set:Kq.bind(z,J)})};var b=(q,z)=>()=>(q&&(z=q(q=0)),z);var rq=1500,oq=480000,iq=1800000,K=3600000,eq=3000;var n=()=>{};var e={};s(e,{stripAgentsPointer:()=>i,removeRepoAssets:()=>Fq,installRefreshSkill:()=>Nq,installPlanSkill:()=>Mq,installInitSkill:()=>Cq,installExplainSkill:()=>Rq,installCodexRepoSkills:()=>Dq,ensureWorkflowDoc:()=>Tq,ensureMcp:()=>fq,contextDocTargets:()=>h,auditRepo:()=>Aq,REFRESH_SKILL:()=>L,PLAN_SKILL:()=>r,INIT_SKILL:()=>O,EXPLAIN_SKILL:()=>o});import{existsSync as B,mkdirSync as w,readFileSync as v,rmSync as C,writeFileSync as W}from"fs";import{join as Z}from"path";function Cq(q){let z=Z(q,".claude","skills","beacon-init");w(z,{recursive:!0});let J=Z(z,"SKILL.md");return W(J,O),J}function Nq(q){let z=Z(q,".claude","skills","beacon-refresh");w(z,{recursive:!0});let J=Z(z,"SKILL.md");return W(J,L),J}function Mq(q){let z=Z(q,".claude","skills","beacon-plan");w(z,{recursive:!0});let J=Z(z,"SKILL.md");return W(J,r),J}function Rq(q){let z=Z(q,".claude","skills","beacon-explain");w(z,{recursive:!0});let J=Z(z,"SKILL.md");return W(J,o),J}function Dq(q){let z=[];for(let J of Iq){let Q=Z(q,".agents","skills",J.name);w(Q,{recursive:!0});let V=Z(Q,"SKILL.md");W(V,J.body()),z.push(V)}return z}function h(q){let z=Z(q,"AGENTS.md"),J=Z(q,"CLAUDE.md"),Q=B(z),V=B(J);if(!Q&&!V)return[z,J];let Y=[];if(Q)Y.push(z);if(V)Y.push(J);return Y}function i(q){let z=Z(q,"CLAUDE.md");if(!B(z))return;let J=v(z,"utf8"),Q=J.split(`
3
+ `).filter((V)=>!/^\s*@\.?\/?AGENTS\.md\s*$/.test(V)).join(`
4
+ `).trim();if(Q&&Q!==J.trim())W(z,`${Q}
5
+ `)}function Tq(q){let z=new RegExp(`${N}[\\s\\S]*?${y}`);for(let J of h(q)){let Q="";try{Q=v(J,"utf8")}catch{}Q=z.test(Q)?Q.replace(z,t):`${Q.trim()}
3
6
 
4
7
  ${t}
5
- `.trimStart(),H(J,z.endsWith(`
6
- `)?z:`${z}
7
- `);let V=Z(q,"CLAUDE.md"),Y="";try{Y=B(V,"utf8")}catch{}if(!/@AGENTS\.md/.test(Y))H(V,`${Y?`${Y.trim()}
8
-
9
- `:""}@AGENTS.md
10
- `)}function Dq(q){let J=Z(q,".mcp.json"),z={};try{z=JSON.parse(B(J,"utf8"))}catch{}z.mcpServers=z.mcpServers??{};let Q=z.mcpServers.beacon;if(Q){if(!Q.timeout||Q.timeout<C)return Q.timeout=C,H(J,JSON.stringify(z,null,2)+`
11
- `),{path:J,added:!1,updated:!0};return{path:J,added:!1,updated:!1}}return z.mcpServers.beacon={command:"beacon",args:["mcp"],timeout:C},H(J,JSON.stringify(z,null,2)+`
12
- `),{path:J,added:!0,updated:!1}}function Tq(q){let J=Z(q,".mcp.json"),z=!1;try{z=!!JSON.parse(B(J,"utf8")).mcpServers?.beacon}catch{}let Q=!1;try{Q=B(Z(q,"AGENTS.md"),"utf8").includes(N)}catch{}let V=!1;try{V=/@AGENTS\.md/.test(B(Z(q,"CLAUDE.md"),"utf8"))}catch{}return{repo:q,mcpRegistered:z,agentsMdBlock:Q,claudeMdImport:V,skills:{"beacon-init":G(Z(q,".claude","skills","beacon-init","SKILL.md")),"beacon-refresh":G(Z(q,".claude","skills","beacon-refresh","SKILL.md"))},codexSkills:{"beacon-init":G(Z(q,".agents","skills","beacon-init","SKILL.md")),"beacon-refresh":G(Z(q,".agents","skills","beacon-refresh","SKILL.md"))}}}function Aq(q){let J=[];for(let $ of["beacon-init","beacon-refresh","beacon-db-design"]){let U=Z(q,".claude","skills",$);if(G(U))K(U,{recursive:!0,force:!0}),J.push($)}for(let $ of["beacon-init","beacon-refresh"]){let U=Z(q,".agents","skills",$);if(G(U))K(U,{recursive:!0,force:!0}),J.push(`codex:${$}`)}let z=!1,Q=Z(q,".mcp.json");try{let $=JSON.parse(B(Q,"utf8"));if($.mcpServers?.beacon){if(delete $.mcpServers.beacon,z=!0,$.mcpServers&&Object.keys($.mcpServers).length===0)delete $.mcpServers;if(Object.keys($).length===0)K(Q,{force:!0});else H(Q,JSON.stringify($,null,2)+`
13
- `)}}catch{}let V=!1,Y=Z(q,"AGENTS.md");try{let $=B(Y,"utf8"),U=new RegExp(`\\n?${N}[\\s\\S]*?${y}\\n?`);if(U.test($)){let k=$.replace(U,`
8
+ `.trimStart(),W(J,Q.endsWith(`
9
+ `)?Q:`${Q}
10
+ `)}i(q)}function fq(q){let z=Z(q,".mcp.json"),J={};try{J=JSON.parse(v(z,"utf8"))}catch{}J.mcpServers=J.mcpServers??{};let Q=J.mcpServers.beacon;if(Q){if(!Q.timeout||Q.timeout<K)return Q.timeout=K,W(z,JSON.stringify(J,null,2)+`
11
+ `),{path:z,added:!1,updated:!0};return{path:z,added:!1,updated:!1}}return J.mcpServers.beacon={command:"beacon",args:["mcp"],timeout:K},W(z,JSON.stringify(J,null,2)+`
12
+ `),{path:z,added:!0,updated:!1}}function Aq(q){let z=Z(q,".mcp.json"),J=!1;try{J=!!JSON.parse(v(z,"utf8")).mcpServers?.beacon}catch{}let Q=h(q).some((V)=>{try{return v(V,"utf8").includes(N)}catch{return!1}});return{repo:q,mcpRegistered:J,workflowBlock:Q,skills:{"beacon-init":B(Z(q,".claude","skills","beacon-init","SKILL.md")),"beacon-refresh":B(Z(q,".claude","skills","beacon-refresh","SKILL.md"))},codexSkills:{"beacon-init":B(Z(q,".agents","skills","beacon-init","SKILL.md")),"beacon-refresh":B(Z(q,".agents","skills","beacon-refresh","SKILL.md"))}}}function Fq(q){let z=[];for(let $ of["beacon-init","beacon-refresh","beacon-db-design"]){let U=Z(q,".claude","skills",$);if(B(U))C(U,{recursive:!0,force:!0}),z.push($)}for(let $ of["beacon-init","beacon-refresh"]){let U=Z(q,".agents","skills",$);if(B(U))C(U,{recursive:!0,force:!0}),z.push(`codex:${$}`)}let J=!1,Q=Z(q,".mcp.json");try{let $=JSON.parse(v(Q,"utf8"));if($.mcpServers?.beacon){if(delete $.mcpServers.beacon,J=!0,$.mcpServers&&Object.keys($.mcpServers).length===0)delete $.mcpServers;if(Object.keys($).length===0)C(Q,{force:!0});else W(Q,JSON.stringify($,null,2)+`
13
+ `)}}catch{}let V=!1,Y=new RegExp(`\\n?${N}[\\s\\S]*?${y}\\n?`);for(let $ of[Z(q,"AGENTS.md"),Z(q,"CLAUDE.md")])try{let U=v($,"utf8");if(Y.test(U)){let k=U.replace(Y,`
14
14
  `).replace(/\n{3,}/g,`
15
15
 
16
- `).trimStart();H(Y,k.endsWith(`
16
+ `).trimStart();W($,k.endsWith(`
17
17
  `)?k:`${k}
18
- `),V=!0}}catch{}let W=!1,P=Z(q,"CLAUDE.md");try{let $=B(P,"utf8"),U=$.replace(/^[ \t]*@AGENTS\.md[ \t]*\n?/m,"");if(U!==$){if(!U.trim())K(P,{force:!0});else H(P,U);W=!0}}catch{}return{skillsRemoved:J,mcpUnregistered:z,agentsBlockRemoved:V,claudeImportRemoved:W}}var O=`---
18
+ `),V=!0}}catch{}let P=!1,H=Z(q,"CLAUDE.md");try{let $=v(H,"utf8"),U=$.replace(/^[ \t]*@AGENTS\.md[ \t]*\n?/m,"");if(U!==$){if(!U.trim())C(H,{force:!0});else W(H,U);P=!0}}catch{}return{skillsRemoved:z,mcpUnregistered:J,agentsBlockRemoved:V,claudeImportRemoved:P}}var O=`---
19
19
  name: beacon-init
20
20
  description: Read this repository and map its architecture, schema, and roadmap into Beacon (the local visual planning panel). Use when the user runs /beacon-init, asks to "set up Beacon for this repo", or asks to initialize/bootstrap Beacon's map of this codebase.
21
21
  ---
@@ -109,7 +109,7 @@ The one caveat: if the user manually edited an INIT-source node on the canvas (e
109
109
  If \`beacon_entities\` or \`beacon_init_persist\` isn't available, the Beacon panel isn't running in this repo. Tell the user to run \`beacon\` here first, then re-invoke /beacon-refresh.
110
110
 
111
111
  After the tool returns, report the final counts plus a one-line summary of the diff you surfaced.
112
- `,n=`---
112
+ `,r=`---
113
113
  name: beacon-plan
114
114
  description: Present your current plan or approach to the user on Beacon's /plan canvas for review \u2014 instead of asking for approval in prose. Use when the user says "present the plan", "show me the plan", "let me see it / the plan", or whenever you are about to end a turn asking whether to proceed with a plan, design, or approach.
115
115
  ---
@@ -138,10 +138,11 @@ board on /plan. The board is built ONLY from the block \u2014 prose is never par
138
138
  table/endpoint/feature you mention in the prose into the block, or that board will be empty.
139
139
 
140
140
  - **Declare your scope.** List the repo-relative files this plan will touch in a top-level
141
- \`"contract"\` array in the block (or the \`contract\` arg of \`beacon_propose_plan\`). When the user
142
- has the plan scope-guard enabled, those files are frozen at approval and you're held to them while
143
- implementing \u2014 editing an undeclared file pauses for the user's authorization (which then adds it
144
- to the contract). Harmless when the guard is off. Declare the files you genuinely expect to edit.
141
+ \`"contract"\` array in the block (or the \`contract\` arg of \`beacon_propose_plan\`). Those files are
142
+ frozen at approval and you're held to them while implementing \u2014 editing an undeclared file pauses
143
+ for the user's authorization (which then adds it to the contract), and the /plan Changes view
144
+ groups your edits On-plan vs Strayed against them. Declare the files you genuinely expect to edit
145
+ (if omitted, the scope is inferred from the files you name in backticks).
145
146
 
146
147
  \`beacon_present_plan\` opens /plan and BLOCKS until the user clicks Approve / Discard / submits
147
148
  feedback, then returns their verdict. Implement code or migrations ONLY after it returns approval.
@@ -157,7 +158,7 @@ If it returns feedback, revise and call it again.
157
158
  If \`beacon_present_plan\` isn't available, the panel isn't wired here \u2014 fall back to ExitPlanMode
158
159
  with the same \`\`\`beacon block (Claude Code only; Codex has no ExitPlanMode), or tell the user to
159
160
  run \`beacon\` in this repo once.
160
- `,r=`---
161
+ `,o=`---
161
162
  name: beacon-explain
162
163
  description: Teach the user part of THIS codebase as an interactive visual lesson on Beacon's /learn page \u2014 a concept map + plain-English narrative they can question \u2014 instead of a wall of text. Use when the user says "explain", "teach me", "walk me through", "how does X work", or "help me understand the Y category".
163
164
  ---
@@ -227,7 +228,7 @@ so the learner sees the table IN CONTEXT, wired to the code that uses it.
227
228
  Every answer must ADD understanding (rationale, trade-off) \u2014 never just restate the question. Expand
228
229
  the narrative or add nodes where it helps. Keep looping until the tool reports the user saved or closed
229
230
  the lesson.
230
- `,Mq,N="<!-- beacon:workflow:start -->",y="<!-- beacon:workflow:end -->",t;var i=u(()=>{c();Mq=[{name:"beacon-init",body:()=>O},{name:"beacon-refresh",body:()=>L}];t=`${N}
231
+ `,Iq,N="<!-- beacon:workflow:start -->",y="<!-- beacon:workflow:end -->",t;var qq=b(()=>{n();Iq=[{name:"beacon-init",body:()=>O},{name:"beacon-refresh",body:()=>L}];t=`${N}
231
232
  ## Beacon \u2014 feature workflow
232
233
 
233
234
  This project uses Beacon (a local planning/visualization panel; run \`beacon\` to open it). When you start work on a FEATURE \u2014 whether referenced via an \`@beacon:feature://\u2026\` mention, an \`@beacon:note://\u2026\` note the user wrote in the Notes panel (treat its checkbox \`- [ ]\` todos as subtasks and order features by their dependencies), or just described in chat \u2014 follow these steps in order:
@@ -299,18 +300,18 @@ Register them all in that single batched call. If a plan added five features, th
299
300
  If the feature added or materially changed a REAL architectural component (a subsystem \u2014 NOT a file), also pass \`architecture: [{ title, domain, role, \u2026 }]\` so the Architecture map stays accurate. It upserts curated components by title; never list files as components. If you found a bug or something worth investigating in a component's code, add \`bugs: [{ note }]\` to its architecture entry \u2014 it renders as a bug flag on the node (attributed to the agent); identical open flags are not duplicated. Only flag what you actually saw in the code.
300
301
 
301
302
  Pull raw planning data anytime with \`beacon_entities\` (features / architecture / tables / endpoints).
302
- ${y}`});import{existsSync as M,mkdirSync as h,readdirSync as Iq,readFileSync as X,rmSync as Fq,writeFileSync as R}from"fs";import{dirname as e,join as v}from"path";function Vz(){return!!process.env.CLAUDE_PLUGIN_ROOT}function Eq(q=process.env.HOME||process.env.USERPROFILE||""){if(!q)return null;let J=v(q,".claude","plugins");if(!M(J))return null;let z=[J];for(let Q=0;Q<3&&z.length;Q++){let V=[];for(let Y of z){let W=v(Y,".claude-plugin","plugin.json");try{if(M(W)&&JSON.parse(X(W,"utf8")).name==="beacon")return Y}catch{}try{for(let P of Iq(Y,{withFileTypes:!0}))if(P.isDirectory())V.push(v(Y,P.name))}catch{}}z=V}return null}function Yz(q){return Eq(q)!==null}function Zz(q){return/[\\/]\.claude[\\/]plugins[\\/]/.test(q)}function $z(q=process.env.HOME||process.env.USERPROFILE||""){if(!q)return null;try{let J=JSON.parse(X(v(q,".claude","plugins","installed_plugins.json"),"utf8"));for(let z of Object.keys(J.plugins??{}))if(/^beacon@/.test(z))return{key:z,marketplace:z.split("@")[1]??""}}catch{}return null}function _(q){try{return JSON.parse(X(q,"utf8"))}catch{return{}}}function zq(q,J){h(e(q),{recursive:!0}),R(q,JSON.stringify(J,null,2)+`
303
- `)}function Jq(q,J){let z=_(q);z.hooks=z.hooks??{},z.hooks[J.event]=z.hooks[J.event]??[];let Q=z.hooks[J.event];if(Q.some((Y)=>Y.matcher===J.matcher&&Y.hooks?.some((W)=>W.command===J.command)))return!1;return Q.push({matcher:J.matcher,hooks:[{type:"command",command:J.command}]}),zq(q,z),!0}function Qq(q,J){return(_(q).hooks?.[J.event]??[]).some((V)=>V.hooks?.some((Y)=>Y.command===J.command))}function Vq(q,J){let z=_(q),Q=z.hooks?.[J.event];if(!Q)return!1;let V=!1,Y=Q.map((W)=>{let P=W.hooks?.length??0,$=(W.hooks??[]).filter((U)=>U.command!==J.command);if($.length!==P)V=!0;return{...W,hooks:$}}).filter((W)=>(W.hooks??[]).length>0);if(!V)return!1;if(Y.length)z.hooks[J.event]=Y;else delete z.hooks[J.event];if(z.hooks&&Object.keys(z.hooks).length===0)delete z.hooks;return zq(q,z),!0}function Yq(q,J,z,Q){let V=`${J}
303
+ ${y}`});import{existsSync as M,mkdirSync as _,readdirSync as Eq,readFileSync as X,rmSync as kq,writeFileSync as R}from"fs";import{dirname as zq,join as G}from"path";function Zz(){return!!process.env.CLAUDE_PLUGIN_ROOT}function Oq(q=process.env.HOME||process.env.USERPROFILE||""){if(!q)return null;let z=G(q,".claude","plugins");if(!M(z))return null;let J=[z];for(let Q=0;Q<3&&J.length;Q++){let V=[];for(let Y of J){let P=G(Y,".claude-plugin","plugin.json");try{if(M(P)&&JSON.parse(X(P,"utf8")).name==="beacon")return Y}catch{}try{for(let H of Eq(Y,{withFileTypes:!0}))if(H.isDirectory())V.push(G(Y,H.name))}catch{}}J=V}return null}function $z(q){return Oq(q)!==null}function Uz(q){return/[\\/]\.claude[\\/]plugins[\\/]/.test(q)}function Pz(q=process.env.HOME||process.env.USERPROFILE||""){if(!q)return null;try{let z=JSON.parse(X(G(q,".claude","plugins","installed_plugins.json"),"utf8"));for(let J of Object.keys(z.plugins??{}))if(/^beacon@/.test(J))return{key:J,marketplace:J.split("@")[1]??""}}catch{}return null}function m(q){try{return JSON.parse(X(q,"utf8"))}catch{return{}}}function Qq(q,z){_(zq(q),{recursive:!0}),R(q,JSON.stringify(z,null,2)+`
304
+ `)}function Vq(q,z){let J=m(q);J.hooks=J.hooks??{},J.hooks[z.event]=J.hooks[z.event]??[];let Q=J.hooks[z.event];if(Q.some((Y)=>Y.matcher===z.matcher&&Y.hooks?.some((P)=>P.command===z.command)))return!1;return Q.push({matcher:z.matcher,hooks:[{type:"command",command:z.command}]}),Qq(q,J),!0}function Yq(q,z){return(m(q).hooks?.[z.event]??[]).some((V)=>V.hooks?.some((Y)=>Y.command===z.command))}function Zq(q,z){let J=m(q),Q=J.hooks?.[z.event];if(!Q)return!1;let V=!1,Y=Q.map((P)=>{let H=P.hooks?.length??0,$=(P.hooks??[]).filter((U)=>U.command!==z.command);if($.length!==H)V=!0;return{...P,hooks:$}}).filter((P)=>(P.hooks??[]).length>0);if(!V)return!1;if(Y.length)J.hooks[z.event]=Y;else delete J.hooks[z.event];if(J.hooks&&Object.keys(J.hooks).length===0)delete J.hooks;return Qq(q,J),!0}function $q(q,z,J,Q){let V=`${z}
304
305
  ${Q.trim()}
305
- ${z}`,Y="";try{Y=X(q,"utf8")}catch{}let W=new RegExp(`${J}[\\s\\S]*?${z}`);Y=W.test(Y)?Y.replace(W,V):Y.trim()?`${Y.trim()}
306
+ ${J}`,Y="";try{Y=X(q,"utf8")}catch{}let P=new RegExp(`${z}[\\s\\S]*?${J}`);Y=P.test(Y)?Y.replace(P,V):Y.trim()?`${Y.trim()}
306
307
 
307
308
  ${V}
308
309
  `:`${V}
309
- `,h(e(q),{recursive:!0}),R(q,Y.endsWith(`
310
+ `,_(zq(q),{recursive:!0}),R(q,Y.endsWith(`
310
311
  `)?Y:`${Y}
311
- `)}function m(q,J){try{return X(q,"utf8").includes(J)}catch{return!1}}function Zq(q,J,z){let Q="";try{Q=X(q,"utf8")}catch{return!1}let V=new RegExp(`${J}[\\s\\S]*?${z}\\n?`);if(!V.test(Q))return!1;let Y=Q.replace(V,"").replace(/\n{3,}/g,`
312
+ `)}function S(q,z){try{return X(q,"utf8").includes(z)}catch{return!1}}function Uq(q,z,J){let Q="";try{Q=X(q,"utf8")}catch{return!1}let V=new RegExp(`${z}[\\s\\S]*?${J}\\n?`);if(!V.test(Q))return!1;let Y=Q.replace(V,"").replace(/\n{3,}/g,`
312
313
 
313
- `).trimStart();return R(q,Y),!0}function $q(q,J,z){let Q=v(q,J);h(Q,{recursive:!0});let V=v(Q,"SKILL.md");return R(V,z),V}function S(q,J){return M(v(q,J,"SKILL.md"))}function Uq(q,J){let z=v(q,J);if(!M(z))return!1;return Fq(z,{recursive:!0,force:!0}),!0}var f,qq=`## Beacon (visual planning panel)
314
+ `).trimStart();return R(q,Y),!0}function Pq(q,z,J){let Q=G(q,z);_(Q,{recursive:!0});let V=G(Q,"SKILL.md");return R(V,J),V}function p(q,z){return M(G(q,z,"SKILL.md"))}function Wq(q,z){let J=G(q,z);if(!M(J))return!1;return kq(J,{recursive:!0,force:!0}),!0}var I,Jq=`## Beacon (visual planning panel)
314
315
 
315
316
  This machine has Beacon installed \u2014 a local visual planning surface for the terminal-side
316
317
  agent. Beacon proposes feature plans (roadmap features + DB schema + endpoints) via MCP,
@@ -334,17 +335,17 @@ the user reviews on a canvas at /plan, and feedback flows back as the next round
334
335
  Feedback bundles inline annotations on the markdown PLUS any edits the user made directly
335
336
  on the /map and /db boards (added features, attached subtasks, edited columns, new
336
337
  endpoints). Treat board edits as the user's revision intent \u2014 re-propose matching them
337
- verbatim. Do NOT implement until the tool returns approval.`;var Wq=u(()=>{f=["beacon-init","beacon-refresh","beacon-plan","beacon-explain"]});import{mkdirSync as kq,renameSync as Oq,rmSync as Lq,writeFileSync as yq}from"fs";import{dirname as hq}from"path";function D(q,J){kq(hq(q),{recursive:!0});let z=`${q}.tmp`;try{yq(z,J),Oq(z,q)}catch(Q){throw Lq(z,{force:!0}),Q}}function Pz(q,J,z=!1){D(q,JSON.stringify(J,null,z?2:void 0))}var Hq=()=>{};var sq={};d(sq,{setupCodexAssets:()=>pq,removeCodexMcp:()=>uq,removeCodexArtifacts:()=>lq,hasCodexMcp:()=>s,ensureCodexMcp:()=>xq,codexMcpProblem:()=>Sq,codexDetected:()=>vq,auditCodex:()=>aq,CODEX_HOOKS:()=>E});import{readFileSync as F}from"fs";import{homedir as _q}from"os";import{join as j}from"path";function Pq(){return process.env.HOME||process.env.USERPROFILE||_q()}function vq(){if(process.env.BEACON_CODEX==="1")return!0;if(process.env.BEACON_CODEX==="0")return!1;if(p===void 0)p=Bun.which("codex")!==null;return p}function g(q){try{return Bun.TOML.parse(q)}catch{return null}}function s(){try{return Boolean(g(F(x(),"utf8"))?.mcp_servers?.beacon)}catch{return!1}}function Sq(){let q="";try{q=F(x(),"utf8")}catch{return null}let J=g(q);if(!J)return`~/.codex/config.toml does not parse \u2014 ${w}`;if(J.mcp_servers?.beacon)return null;if(/^\s*mcp_servers\s*=/m.test(q))return`mcp_servers is an inline table \u2014 ${w}`;return null}function xq(){let q="",J=!1;try{q=F(x(),"utf8"),J=!0}catch{}if(J){let Y=g(q);if(!Y)return{added:!1,error:`~/.codex/config.toml does not parse \u2014 ${w}`};if(Y.mcp_servers?.beacon)return{added:!1};if(/^\s*mcp_servers\s*=/m.test(q))return{added:!1,error:`mcp_servers is an inline table \u2014 ${w}`}}let z=!q?"":q.endsWith(`
338
+ verbatim. Do NOT implement until the tool returns approval.`;var Hq=b(()=>{I=["beacon-init","beacon-refresh","beacon-plan","beacon-explain"]});import{mkdirSync as Lq,renameSync as yq,rmSync as hq,writeFileSync as _q}from"fs";import{dirname as mq}from"path";function D(q,z){Lq(mq(q),{recursive:!0});let J=`${q}.tmp`;try{_q(J,z),yq(J,q)}catch(Q){throw hq(J,{force:!0}),Q}}function vz(q,z,J=!1){D(q,JSON.stringify(z,null,J?2:void 0))}var Bq=()=>{};var sq={};s(sq,{setupCodexAssets:()=>aq,removeCodexMcp:()=>xq,removeCodexArtifacts:()=>cq,hasCodexMcp:()=>c,ensureCodexMcp:()=>wq,codexMcpProblem:()=>lq,codexDetected:()=>Xq,auditCodex:()=>dq,CODEX_HOOKS:()=>E});import{readFileSync as F}from"fs";import{homedir as Sq}from"os";import{join as g}from"path";function vq(){return process.env.HOME||process.env.USERPROFILE||Sq()}function Xq(){if(process.env.BEACON_CODEX==="1")return!0;if(process.env.BEACON_CODEX==="0")return!1;if(l===void 0)l=Bun.which("codex")!==null;return l}function j(q){try{return Bun.TOML.parse(q)}catch{return null}}function c(){try{return Boolean(j(F(u(),"utf8"))?.mcp_servers?.beacon)}catch{return!1}}function lq(){let q="";try{q=F(u(),"utf8")}catch{return null}let z=j(q);if(!z)return`~/.codex/config.toml does not parse \u2014 ${x}`;if(z.mcp_servers?.beacon)return null;if(/^\s*mcp_servers\s*=/m.test(q))return`mcp_servers is an inline table \u2014 ${x}`;return null}function wq(){let q="",z=!1;try{q=F(u(),"utf8"),z=!0}catch{}if(z){let Y=j(q);if(!Y)return{added:!1,error:`~/.codex/config.toml does not parse \u2014 ${x}`};if(Y.mcp_servers?.beacon)return{added:!1};if(/^\s*mcp_servers\s*=/m.test(q))return{added:!1,error:`mcp_servers is an inline table \u2014 ${x}`}}let J=!q?"":q.endsWith(`
338
339
  `)?`
339
340
  `:`
340
341
 
341
- `,Q=q+z+mq;if(g(Q)?.mcp_servers?.beacon?.command!=="beacon")return{added:!1,error:`could not safely append [mcp_servers.beacon] \u2014 ${w}`};return D(x(),Q),{added:!0}}function uq(){let q="";try{q=F(x(),"utf8")}catch{return{removed:!1}}let J=q.split(`
342
- `),z=J.indexOf(Gq);if(z===-1)return{removed:!1,skipped:s()};let Q=J.indexOf(Xq,z);if(Q===-1)return{removed:!1,skipped:!0};J.splice(z,Q-z+1);let V=J.join(`
342
+ `,Q=q+J+pq;if(j(Q)?.mcp_servers?.beacon?.command!=="beacon")return{added:!1,error:`could not safely append [mcp_servers.beacon] \u2014 ${x}`};return D(u(),Q),{added:!0}}function xq(){let q="";try{q=F(u(),"utf8")}catch{return{removed:!1}}let z=q.split(`
343
+ `),J=z.indexOf(uq);if(J===-1)return{removed:!1,skipped:c()};let Q=z.indexOf(bq,J);if(Q===-1)return{removed:!1,skipped:!0};z.splice(J,Q-J+1);let V=z.join(`
343
344
  `).replace(/\n{3,}/g,`
344
345
 
345
- `).replace(/^\n+/,"");if(g(V)===null)return{removed:!1,skipped:!0};return D(x(),V),{removed:!0}}async function pq(){let{INIT_SKILL:q,REFRESH_SKILL:J,PLAN_SKILL:z,EXPLAIN_SKILL:Q}=await Promise.resolve().then(() => (i(),o)),V={"beacon-init":q,"beacon-refresh":J,"beacon-plan":z,"beacon-explain":Q},Y=[];for(let U of f){if(!S(A(),U))Y.push(U);$q(A(),U,V[U])}let W=0;for(let U of E)if(Jq(l(),{event:U.event,matcher:U.matcher,command:U.command}))W++;let P=m(T(),I);Yq(T(),I,Bq,qq);let $=xq();return{skillsAdded:Y,hooksAdded:W,agentsMdBlockTouched:!P,mcp:$}}function aq(){let q={};for(let z of f)q[z]=S(A(),z);let J={};for(let z of E)J[z.event]=Qq(l(),{event:z.event,command:z.command});return{detected:vq(),skills:q,hooks:J,agentsMdBlock:m(T(),I),mcp:s()}}function lq(){let q=[];for(let V of f)if(Uq(A(),V))q.push(V);let J=0;for(let V of E)if(Vq(l(),{event:V.event,command:V.command}))J++;let z=Zq(T(),I,Bq),Q=uq();return{skillsRemoved:q,hooksRemoved:J,agentsMdBlockRemoved:z,mcpRemoved:Q.removed,mcpSkipped:Q.skipped}}var a=()=>j(Pq(),".codex"),l=()=>j(a(),"hooks.json"),x=()=>j(a(),"config.toml"),T=()=>j(a(),"AGENTS.md"),A=()=>j(Pq(),".agents","skills"),I="<!-- beacon:global:start -->",Bq="<!-- beacon:global:end -->",E,p,Gq="# beacon:start (managed by Beacon \u2014 `beacon uninstall` removes this block)",Xq="# beacon:end",mq,w="add it manually: codex mcp add beacon -- beacon mcp";var dq=u(()=>{Wq();Hq();E=[{event:"PostToolUse",matcher:"apply_patch",command:"beacon hook",description:"Report file edits to Beacon's active feature so the map stays fresh."},{event:"UserPromptSubmit",matcher:"*",command:"beacon prompt",description:"On feature-y prompts in a Beacon-wired repo, remind the agent to run the context\u2192propose\u2192describe loop (no-op otherwise)."},{event:"Stop",matcher:"*",command:"beacon stop-hook",description:"When the agent ends a turn asking for plan approval in prose, nudge it to present the plan on Beacon's /plan canvas."}];mq=`${Gq}
346
+ `).replace(/^\n+/,"");if(j(V)===null)return{removed:!1,skipped:!0};return D(u(),V),{removed:!0}}async function aq(){let{INIT_SKILL:q,REFRESH_SKILL:z,PLAN_SKILL:J,EXPLAIN_SKILL:Q}=await Promise.resolve().then(() => (qq(),e)),V={"beacon-init":q,"beacon-refresh":z,"beacon-plan":J,"beacon-explain":Q},Y=[];for(let U of I){if(!p(f(),U))Y.push(U);Pq(f(),U,V[U])}let P=0;for(let U of E)if(Vq(d(),{event:U.event,matcher:U.matcher,command:U.command}))P++;let H=S(T(),A);$q(T(),A,Gq,Jq);let $=wq();return{skillsAdded:Y,hooksAdded:P,agentsMdBlockTouched:!H,mcp:$}}function dq(){let q={};for(let J of I)q[J]=p(f(),J);let z={};for(let J of E)z[J.event]=Yq(d(),{event:J.event,command:J.command});return{detected:Xq(),skills:q,hooks:z,agentsMdBlock:S(T(),A),mcp:c()}}function cq(){let q=[];for(let V of I)if(Wq(f(),V))q.push(V);let z=0;for(let V of E)if(Zq(d(),{event:V.event,command:V.command}))z++;let J=Uq(T(),A,Gq),Q=xq();return{skillsRemoved:q,hooksRemoved:z,agentsMdBlockRemoved:J,mcpRemoved:Q.removed,mcpSkipped:Q.skipped}}var a=()=>g(vq(),".codex"),d=()=>g(a(),"hooks.json"),u=()=>g(a(),"config.toml"),T=()=>g(a(),"AGENTS.md"),f=()=>g(vq(),".agents","skills"),A="<!-- beacon:global:start -->",Gq="<!-- beacon:global:end -->",E,l,uq="# beacon:start (managed by Beacon \u2014 `beacon uninstall` removes this block)",bq="# beacon:end",pq,x="add it manually: codex mcp add beacon -- beacon mcp";var nq=b(()=>{Hq();Bq();E=[{event:"PostToolUse",matcher:"apply_patch",command:"beacon hook",description:"Report file edits to Beacon's active feature so the map stays fresh."},{event:"UserPromptSubmit",matcher:"*",command:"beacon prompt",description:"On feature-y prompts in a Beacon-wired repo, remind the agent to run the context\u2192propose\u2192describe loop (no-op otherwise)."},{event:"Stop",matcher:"*",command:"beacon stop-hook",description:"When the agent ends a turn asking for plan approval in prose, nudge it to present the plan on Beacon's /plan canvas."}];pq=`${uq}
346
347
  [mcp_servers.beacon]
347
348
  command = "beacon"
348
349
  args = ["mcp"]
349
- ${Xq}
350
- `});dq();export{pq as setupCodexAssets,uq as removeCodexMcp,lq as removeCodexArtifacts,s as hasCodexMcp,xq as ensureCodexMcp,Sq as codexMcpProblem,vq as codexDetected,aq as auditCodex,E as CODEX_HOOKS};
350
+ ${bq}
351
+ `});nq();export{aq as setupCodexAssets,xq as removeCodexMcp,cq as removeCodexArtifacts,c as hasCodexMcp,wq as ensureCodexMcp,lq as codexMcpProblem,Xq as codexDetected,dq as auditCodex,E as CODEX_HOOKS};
@@ -1,21 +1,21 @@
1
1
  // @bun
2
- var Iq=Object.defineProperty;var Oq=(q)=>q;function yq(q,z){this[q]=Oq.bind(null,z)}var Xq=(q,z)=>{for(var J in z)Iq(q,J,{get:z[J],enumerable:!0,configurable:!0,set:yq.bind(z,J)})};var g=(q,z)=>()=>(q&&(z=q(q=0)),z);var bz=1500,uz=480000,Kz=1800000,f=3600000,Cz=3000;var Hq=()=>{};var l={};Xq(l,{removeRepoAssets:()=>tq,installRefreshSkill:()=>hq,installPlanSkill:()=>Lq,installInitSkill:()=>kq,installExplainSkill:()=>_q,installCodexRepoSkills:()=>mq,ensureWorkflowDoc:()=>Sq,ensureMcp:()=>cq,auditRepo:()=>aq,REFRESH_SKILL:()=>s,PLAN_SKILL:()=>wq,INIT_SKILL:()=>r,EXPLAIN_SKILL:()=>xq});import{existsSync as v,mkdirSync as G,readFileSync as P,rmSync as F,writeFileSync as H}from"fs";import{join as $}from"path";function kq(q){let z=$(q,".claude","skills","beacon-init");G(z,{recursive:!0});let J=$(z,"SKILL.md");return H(J,r),J}function hq(q){let z=$(q,".claude","skills","beacon-refresh");G(z,{recursive:!0});let J=$(z,"SKILL.md");return H(J,s),J}function Lq(q){let z=$(q,".claude","skills","beacon-plan");G(z,{recursive:!0});let J=$(z,"SKILL.md");return H(J,wq),J}function _q(q){let z=$(q,".claude","skills","beacon-explain");G(z,{recursive:!0});let J=$(z,"SKILL.md");return H(J,xq),J}function mq(q){let z=[];for(let J of pq){let Q=$(q,".agents","skills",J.name);G(Q,{recursive:!0});let V=$(Q,"SKILL.md");H(V,J.body()),z.push(V)}return z}function Sq(q){let z=$(q,"AGENTS.md"),J="";try{J=P(z,"utf8")}catch{}let Q=new RegExp(`${R}[\\s\\S]*?${n}`);J=Q.test(J)?J.replace(Q,Pq):`${J.trim()}
3
-
4
- ${Pq}
5
- `.trimStart(),H(z,J.endsWith(`
6
- `)?J:`${J}
7
- `);let V=$(q,"CLAUDE.md"),Y="";try{Y=P(V,"utf8")}catch{}if(!/@AGENTS\.md/.test(Y))H(V,`${Y?`${Y.trim()}
8
-
9
- `:""}@AGENTS.md
10
- `)}function cq(q){let z=$(q,".mcp.json"),J={};try{J=JSON.parse(P(z,"utf8"))}catch{}J.mcpServers=J.mcpServers??{};let Q=J.mcpServers.beacon;if(Q){if(!Q.timeout||Q.timeout<f)return Q.timeout=f,H(z,JSON.stringify(J,null,2)+`
11
- `),{path:z,added:!1,updated:!0};return{path:z,added:!1,updated:!1}}return J.mcpServers.beacon={command:"beacon",args:["mcp"],timeout:f},H(z,JSON.stringify(J,null,2)+`
12
- `),{path:z,added:!0,updated:!1}}function aq(q){let z=$(q,".mcp.json"),J=!1;try{J=!!JSON.parse(P(z,"utf8")).mcpServers?.beacon}catch{}let Q=!1;try{Q=P($(q,"AGENTS.md"),"utf8").includes(R)}catch{}let V=!1;try{V=/@AGENTS\.md/.test(P($(q,"CLAUDE.md"),"utf8"))}catch{}return{repo:q,mcpRegistered:J,agentsMdBlock:Q,claudeMdImport:V,skills:{"beacon-init":v($(q,".claude","skills","beacon-init","SKILL.md")),"beacon-refresh":v($(q,".claude","skills","beacon-refresh","SKILL.md"))},codexSkills:{"beacon-init":v($(q,".agents","skills","beacon-init","SKILL.md")),"beacon-refresh":v($(q,".agents","skills","beacon-refresh","SKILL.md"))}}}function tq(q){let z=[];for(let Z of["beacon-init","beacon-refresh","beacon-db-design"]){let W=$(q,".claude","skills",Z);if(v(W))F(W,{recursive:!0,force:!0}),z.push(Z)}for(let Z of["beacon-init","beacon-refresh"]){let W=$(q,".agents","skills",Z);if(v(W))F(W,{recursive:!0,force:!0}),z.push(`codex:${Z}`)}let J=!1,Q=$(q,".mcp.json");try{let Z=JSON.parse(P(Q,"utf8"));if(Z.mcpServers?.beacon){if(delete Z.mcpServers.beacon,J=!0,Z.mcpServers&&Object.keys(Z.mcpServers).length===0)delete Z.mcpServers;if(Object.keys(Z).length===0)F(Q,{force:!0});else H(Q,JSON.stringify(Z,null,2)+`
13
- `)}}catch{}let V=!1,Y=$(q,"AGENTS.md");try{let Z=P(Y,"utf8"),W=new RegExp(`\\n?${R}[\\s\\S]*?${n}\\n?`);if(W.test(Z)){let d=Z.replace(W,`
2
+ var yq=Object.defineProperty;var kq=(q)=>q;function hq(q,z){this[q]=kq.bind(null,z)}var Pq=(q,z)=>{for(var J in z)yq(q,J,{get:z[J],enumerable:!0,configurable:!0,set:hq.bind(z,J)})};var G=(q,z)=>()=>(q&&(z=q(q=0)),z);var uz=1500,Cz=480000,fz=1800000,f=3600000,Fz=3000;var Hq=()=>{};var i={};Pq(i,{stripAgentsPointer:()=>jq,removeRepoAssets:()=>nq,installRefreshSkill:()=>_q,installPlanSkill:()=>mq,installInitSkill:()=>Lq,installExplainSkill:()=>pq,installCodexRepoSkills:()=>cq,ensureWorkflowDoc:()=>aq,ensureMcp:()=>dq,contextDocTargets:()=>s,auditRepo:()=>tq,REFRESH_SKILL:()=>r,PLAN_SKILL:()=>vq,INIT_SKILL:()=>n,EXPLAIN_SKILL:()=>xq});import{existsSync as H,mkdirSync as g,readFileSync as w,rmSync as F,writeFileSync as P}from"fs";import{join as $}from"path";function Lq(q){let z=$(q,".claude","skills","beacon-init");g(z,{recursive:!0});let J=$(z,"SKILL.md");return P(J,n),J}function _q(q){let z=$(q,".claude","skills","beacon-refresh");g(z,{recursive:!0});let J=$(z,"SKILL.md");return P(J,r),J}function mq(q){let z=$(q,".claude","skills","beacon-plan");g(z,{recursive:!0});let J=$(z,"SKILL.md");return P(J,vq),J}function pq(q){let z=$(q,".claude","skills","beacon-explain");g(z,{recursive:!0});let J=$(z,"SKILL.md");return P(J,xq),J}function cq(q){let z=[];for(let J of Sq){let Q=$(q,".agents","skills",J.name);g(Q,{recursive:!0});let V=$(Q,"SKILL.md");P(V,J.body()),z.push(V)}return z}function s(q){let z=$(q,"AGENTS.md"),J=$(q,"CLAUDE.md"),Q=H(z),V=H(J);if(!Q&&!V)return[z,J];let Y=[];if(Q)Y.push(z);if(V)Y.push(J);return Y}function jq(q){let z=$(q,"CLAUDE.md");if(!H(z))return;let J=w(z,"utf8"),Q=J.split(`
3
+ `).filter((V)=>!/^\s*@\.?\/?AGENTS\.md\s*$/.test(V)).join(`
4
+ `).trim();if(Q&&Q!==J.trim())P(z,`${Q}
5
+ `)}function aq(q){let z=new RegExp(`${M}[\\s\\S]*?${l}`);for(let J of s(q)){let Q="";try{Q=w(J,"utf8")}catch{}Q=z.test(Q)?Q.replace(z,wq):`${Q.trim()}
6
+
7
+ ${wq}
8
+ `.trimStart(),P(J,Q.endsWith(`
9
+ `)?Q:`${Q}
10
+ `)}jq(q)}function dq(q){let z=$(q,".mcp.json"),J={};try{J=JSON.parse(w(z,"utf8"))}catch{}J.mcpServers=J.mcpServers??{};let Q=J.mcpServers.beacon;if(Q){if(!Q.timeout||Q.timeout<f)return Q.timeout=f,P(z,JSON.stringify(J,null,2)+`
11
+ `),{path:z,added:!1,updated:!0};return{path:z,added:!1,updated:!1}}return J.mcpServers.beacon={command:"beacon",args:["mcp"],timeout:f},P(z,JSON.stringify(J,null,2)+`
12
+ `),{path:z,added:!0,updated:!1}}function tq(q){let z=$(q,".mcp.json"),J=!1;try{J=!!JSON.parse(w(z,"utf8")).mcpServers?.beacon}catch{}let Q=s(q).some((V)=>{try{return w(V,"utf8").includes(M)}catch{return!1}});return{repo:q,mcpRegistered:J,workflowBlock:Q,skills:{"beacon-init":H($(q,".claude","skills","beacon-init","SKILL.md")),"beacon-refresh":H($(q,".claude","skills","beacon-refresh","SKILL.md"))},codexSkills:{"beacon-init":H($(q,".agents","skills","beacon-init","SKILL.md")),"beacon-refresh":H($(q,".agents","skills","beacon-refresh","SKILL.md"))}}}function nq(q){let z=[];for(let Z of["beacon-init","beacon-refresh","beacon-db-design"]){let W=$(q,".claude","skills",Z);if(H(W))F(W,{recursive:!0,force:!0}),z.push(Z)}for(let Z of["beacon-init","beacon-refresh"]){let W=$(q,".agents","skills",Z);if(H(W))F(W,{recursive:!0,force:!0}),z.push(`codex:${Z}`)}let J=!1,Q=$(q,".mcp.json");try{let Z=JSON.parse(w(Q,"utf8"));if(Z.mcpServers?.beacon){if(delete Z.mcpServers.beacon,J=!0,Z.mcpServers&&Object.keys(Z.mcpServers).length===0)delete Z.mcpServers;if(Object.keys(Z).length===0)F(Q,{force:!0});else P(Q,JSON.stringify(Z,null,2)+`
13
+ `)}}catch{}let V=!1,Y=new RegExp(`\\n?${M}[\\s\\S]*?${l}\\n?`);for(let Z of[$(q,"AGENTS.md"),$(q,"CLAUDE.md")])try{let W=w(Z,"utf8");if(Y.test(W)){let t=W.replace(Y,`
14
14
  `).replace(/\n{3,}/g,`
15
15
 
16
- `).trimStart();H(Y,d.endsWith(`
17
- `)?d:`${d}
18
- `),V=!0}}catch{}let U=!1,X=$(q,"CLAUDE.md");try{let Z=P(X,"utf8"),W=Z.replace(/^[ \t]*@AGENTS\.md[ \t]*\n?/m,"");if(W!==Z){if(!W.trim())F(X,{force:!0});else H(X,W);U=!0}}catch{}return{skillsRemoved:z,mcpUnregistered:J,agentsBlockRemoved:V,claudeImportRemoved:U}}var r=`---
16
+ `).trimStart();P(Z,t.endsWith(`
17
+ `)?t:`${t}
18
+ `),V=!0}}catch{}let U=!1,X=$(q,"CLAUDE.md");try{let Z=w(X,"utf8"),W=Z.replace(/^[ \t]*@AGENTS\.md[ \t]*\n?/m,"");if(W!==Z){if(!W.trim())F(X,{force:!0});else P(X,W);U=!0}}catch{}return{skillsRemoved:z,mcpUnregistered:J,agentsBlockRemoved:V,claudeImportRemoved:U}}var n=`---
19
19
  name: beacon-init
20
20
  description: Read this repository and map its architecture, schema, and roadmap into Beacon (the local visual planning panel). Use when the user runs /beacon-init, asks to "set up Beacon for this repo", or asks to initialize/bootstrap Beacon's map of this codebase.
21
21
  ---
@@ -62,7 +62,7 @@ beacon init-persist /tmp/beacon-init.json # or: beacon init-persist < /tmp/bea
62
62
  That one command wires the repo (writes \`.mcp.json\` + skills so your NEXT session gets the \`beacon_*\` tools natively, heals the global install), starts the Beacon daemon if it isn't running, registers + provisions this workspace, and POSTs your analysis to the same \`/api/init\` endpoint the MCP tool uses \u2014 so init completes in THIS session. Read the counts it prints and report them.
63
63
 
64
64
  After the tool (or \`beacon init-persist\`) returns, tell the user the counts (components / roadmap / tables / endpoints) and point them at the running Beacon panel.
65
- `,s=`---
65
+ `,r=`---
66
66
  name: beacon-refresh
67
67
  description: Re-survey the repo and update Beacon's architecture / schema / endpoints map after /beacon-init was already run \u2014 picks up new components, removed ones, schema changes, and new routes. Use when the user runs /beacon-refresh or asks to "refresh", "update", "re-sync", or "bring Beacon up to date" with the current code.
68
68
  ---
@@ -109,7 +109,7 @@ The one caveat: if the user manually edited an INIT-source node on the canvas (e
109
109
  If \`beacon_entities\` or \`beacon_init_persist\` isn't available, the Beacon panel isn't running in this repo. Tell the user to run \`beacon\` here first, then re-invoke /beacon-refresh.
110
110
 
111
111
  After the tool returns, report the final counts plus a one-line summary of the diff you surfaced.
112
- `,wq=`---
112
+ `,vq=`---
113
113
  name: beacon-plan
114
114
  description: Present your current plan or approach to the user on Beacon's /plan canvas for review \u2014 instead of asking for approval in prose. Use when the user says "present the plan", "show me the plan", "let me see it / the plan", or whenever you are about to end a turn asking whether to proceed with a plan, design, or approach.
115
115
  ---
@@ -138,10 +138,11 @@ board on /plan. The board is built ONLY from the block \u2014 prose is never par
138
138
  table/endpoint/feature you mention in the prose into the block, or that board will be empty.
139
139
 
140
140
  - **Declare your scope.** List the repo-relative files this plan will touch in a top-level
141
- \`"contract"\` array in the block (or the \`contract\` arg of \`beacon_propose_plan\`). When the user
142
- has the plan scope-guard enabled, those files are frozen at approval and you're held to them while
143
- implementing \u2014 editing an undeclared file pauses for the user's authorization (which then adds it
144
- to the contract). Harmless when the guard is off. Declare the files you genuinely expect to edit.
141
+ \`"contract"\` array in the block (or the \`contract\` arg of \`beacon_propose_plan\`). Those files are
142
+ frozen at approval and you're held to them while implementing \u2014 editing an undeclared file pauses
143
+ for the user's authorization (which then adds it to the contract), and the /plan Changes view
144
+ groups your edits On-plan vs Strayed against them. Declare the files you genuinely expect to edit
145
+ (if omitted, the scope is inferred from the files you name in backticks).
145
146
 
146
147
  \`beacon_present_plan\` opens /plan and BLOCKS until the user clicks Approve / Discard / submits
147
148
  feedback, then returns their verdict. Implement code or migrations ONLY after it returns approval.
@@ -227,7 +228,7 @@ so the learner sees the table IN CONTEXT, wired to the code that uses it.
227
228
  Every answer must ADD understanding (rationale, trade-off) \u2014 never just restate the question. Expand
228
229
  the narrative or add nodes where it helps. Keep looping until the tool reports the user saved or closed
229
230
  the lesson.
230
- `,pq,R="<!-- beacon:workflow:start -->",n="<!-- beacon:workflow:end -->",Pq;var i=g(()=>{Hq();pq=[{name:"beacon-init",body:()=>r},{name:"beacon-refresh",body:()=>s}];Pq=`${R}
231
+ `,Sq,M="<!-- beacon:workflow:start -->",l="<!-- beacon:workflow:end -->",wq;var o=G(()=>{Hq();Sq=[{name:"beacon-init",body:()=>n},{name:"beacon-refresh",body:()=>r}];wq=`${M}
231
232
  ## Beacon \u2014 feature workflow
232
233
 
233
234
  This project uses Beacon (a local planning/visualization panel; run \`beacon\` to open it). When you start work on a FEATURE \u2014 whether referenced via an \`@beacon:feature://\u2026\` mention, an \`@beacon:note://\u2026\` note the user wrote in the Notes panel (treat its checkbox \`- [ ]\` todos as subtasks and order features by their dependencies), or just described in chat \u2014 follow these steps in order:
@@ -299,18 +300,18 @@ Register them all in that single batched call. If a plan added five features, th
299
300
  If the feature added or materially changed a REAL architectural component (a subsystem \u2014 NOT a file), also pass \`architecture: [{ title, domain, role, \u2026 }]\` so the Architecture map stays accurate. It upserts curated components by title; never list files as components. If you found a bug or something worth investigating in a component's code, add \`bugs: [{ note }]\` to its architecture entry \u2014 it renders as a bug flag on the node (attributed to the agent); identical open flags are not duplicated. Only flag what you actually saw in the code.
300
301
 
301
302
  Pull raw planning data anytime with \`beacon_entities\` (features / architecture / tables / endpoints).
302
- ${n}`});import{existsSync as M,mkdirSync as o,readdirSync as dq,readFileSync as j,rmSync as rq,writeFileSync as T}from"fs";import{dirname as vq,join as w}from"path";function jq(){return!!process.env.CLAUDE_PLUGIN_ROOT}function Bq(q=process.env.HOME||process.env.USERPROFILE||""){if(!q)return null;let z=w(q,".claude","plugins");if(!M(z))return null;let J=[z];for(let Q=0;Q<3&&J.length;Q++){let V=[];for(let Y of J){let U=w(Y,".claude-plugin","plugin.json");try{if(M(U)&&JSON.parse(j(U,"utf8")).name==="beacon")return Y}catch{}try{for(let X of dq(Y,{withFileTypes:!0}))if(X.isDirectory())V.push(w(Y,X.name))}catch{}}J=V}return null}function gq(q){return Bq(q)!==null}function sq(q){return/[\\/]\.claude[\\/]plugins[\\/]/.test(q)}function nq(q=process.env.HOME||process.env.USERPROFILE||""){if(!q)return null;try{let z=JSON.parse(j(w(q,".claude","plugins","installed_plugins.json"),"utf8"));for(let J of Object.keys(z.plugins??{}))if(/^beacon@/.test(J))return{key:J,marketplace:J.split("@")[1]??""}}catch{}return null}function e(q){try{return JSON.parse(j(q,"utf8"))}catch{return{}}}function Gq(q,z){o(vq(q),{recursive:!0}),T(q,JSON.stringify(z,null,2)+`
303
- `)}function E(q,z){let J=e(q);J.hooks=J.hooks??{},J.hooks[z.event]=J.hooks[z.event]??[];let Q=J.hooks[z.event];if(Q.some((Y)=>Y.matcher===z.matcher&&Y.hooks?.some((U)=>U.command===z.command)))return!1;return Q.push({matcher:z.matcher,hooks:[{type:"command",command:z.command}]}),Gq(q,J),!0}function A(q,z){return(e(q).hooks?.[z.event]??[]).some((V)=>V.hooks?.some((Y)=>Y.command===z.command))}function I(q,z){let J=e(q),Q=J.hooks?.[z.event];if(!Q)return!1;let V=!1,Y=Q.map((U)=>{let X=U.hooks?.length??0,Z=(U.hooks??[]).filter((W)=>W.command!==z.command);if(Z.length!==X)V=!0;return{...U,hooks:Z}}).filter((U)=>(U.hooks??[]).length>0);if(!V)return!1;if(Y.length)J.hooks[z.event]=Y;else delete J.hooks[z.event];if(J.hooks&&Object.keys(J.hooks).length===0)delete J.hooks;return Gq(q,J),!0}function O(q,z,J,Q){let V=`${z}
303
+ ${l}`});import{existsSync as R,mkdirSync as e,readdirSync as rq,readFileSync as j,rmSync as lq,writeFileSync as T}from"fs";import{dirname as Bq,join as v}from"path";function Gq(){return!!process.env.CLAUDE_PLUGIN_ROOT}function gq(q=process.env.HOME||process.env.USERPROFILE||""){if(!q)return null;let z=v(q,".claude","plugins");if(!R(z))return null;let J=[z];for(let Q=0;Q<3&&J.length;Q++){let V=[];for(let Y of J){let U=v(Y,".claude-plugin","plugin.json");try{if(R(U)&&JSON.parse(j(U,"utf8")).name==="beacon")return Y}catch{}try{for(let X of rq(Y,{withFileTypes:!0}))if(X.isDirectory())V.push(v(Y,X.name))}catch{}}J=V}return null}function Nq(q){return gq(q)!==null}function sq(q){return/[\\/]\.claude[\\/]plugins[\\/]/.test(q)}function iq(q=process.env.HOME||process.env.USERPROFILE||""){if(!q)return null;try{let z=JSON.parse(j(v(q,".claude","plugins","installed_plugins.json"),"utf8"));for(let J of Object.keys(z.plugins??{}))if(/^beacon@/.test(J))return{key:J,marketplace:J.split("@")[1]??""}}catch{}return null}function qq(q){try{return JSON.parse(j(q,"utf8"))}catch{return{}}}function bq(q,z){e(Bq(q),{recursive:!0}),T(q,JSON.stringify(z,null,2)+`
304
+ `)}function D(q,z){let J=qq(q);J.hooks=J.hooks??{},J.hooks[z.event]=J.hooks[z.event]??[];let Q=J.hooks[z.event];if(Q.some((Y)=>Y.matcher===z.matcher&&Y.hooks?.some((U)=>U.command===z.command)))return!1;return Q.push({matcher:z.matcher,hooks:[{type:"command",command:z.command}]}),bq(q,J),!0}function E(q,z){return(qq(q).hooks?.[z.event]??[]).some((V)=>V.hooks?.some((Y)=>Y.command===z.command))}function O(q,z){let J=qq(q),Q=J.hooks?.[z.event];if(!Q)return!1;let V=!1,Y=Q.map((U)=>{let X=U.hooks?.length??0,Z=(U.hooks??[]).filter((W)=>W.command!==z.command);if(Z.length!==X)V=!0;return{...U,hooks:Z}}).filter((U)=>(U.hooks??[]).length>0);if(!V)return!1;if(Y.length)J.hooks[z.event]=Y;else delete J.hooks[z.event];if(J.hooks&&Object.keys(J.hooks).length===0)delete J.hooks;return bq(q,J),!0}function A(q,z,J,Q){let V=`${z}
304
305
  ${Q.trim()}
305
306
  ${J}`,Y="";try{Y=j(q,"utf8")}catch{}let U=new RegExp(`${z}[\\s\\S]*?${J}`);Y=U.test(Y)?Y.replace(U,V):Y.trim()?`${Y.trim()}
306
307
 
307
308
  ${V}
308
309
  `:`${V}
309
- `,o(vq(q),{recursive:!0}),T(q,Y.endsWith(`
310
+ `,e(Bq(q),{recursive:!0}),T(q,Y.endsWith(`
310
311
  `)?Y:`${Y}
311
312
  `)}function N(q,z){try{return j(q,"utf8").includes(z)}catch{return!1}}function y(q,z,J){let Q="";try{Q=j(q,"utf8")}catch{return!1}let V=new RegExp(`${z}[\\s\\S]*?${J}\\n?`);if(!V.test(Q))return!1;let Y=Q.replace(V,"").replace(/\n{3,}/g,`
312
313
 
313
- `).trimStart();return T(q,Y),!0}function k(q,z,J){let Q=w(q,z);o(Q,{recursive:!0});let V=w(Q,"SKILL.md");return T(V,J),V}function b(q,z){return M(w(q,z,"SKILL.md"))}function h(q,z){let J=w(q,z);if(!M(J))return!1;return rq(J,{recursive:!0,force:!0}),!0}var x,D=`## Beacon (visual planning panel)
314
+ `).trimStart();return T(q,Y),!0}function k(q,z,J){let Q=v(q,z);e(Q,{recursive:!0});let V=v(Q,"SKILL.md");return T(V,J),V}function b(q,z){return R(v(q,z,"SKILL.md"))}function h(q,z){let J=v(q,z);if(!R(J))return!1;return lq(J,{recursive:!0,force:!0}),!0}var x,I=`## Beacon (visual planning panel)
314
315
 
315
316
  This machine has Beacon installed \u2014 a local visual planning surface for the terminal-side
316
317
  agent. Beacon proposes feature plans (roadmap features + DB schema + endpoints) via MCP,
@@ -334,17 +335,17 @@ the user reviews on a canvas at /plan, and feedback flows back as the next round
334
335
  Feedback bundles inline annotations on the markdown PLUS any edits the user made directly
335
336
  on the /map and /db boards (added features, attached subtasks, edited columns, new
336
337
  endpoints). Treat board edits as the user's revision intent \u2014 re-propose matching them
337
- verbatim. Do NOT implement until the tool returns approval.`;var qq=g(()=>{x=["beacon-init","beacon-refresh","beacon-plan","beacon-explain"]});import{mkdirSync as lq,renameSync as iq,rmSync as oq,writeFileSync as eq}from"fs";import{dirname as qz}from"path";function L(q,z){lq(qz(q),{recursive:!0});let J=`${q}.tmp`;try{eq(J,z),iq(J,q)}catch(Q){throw oq(J,{force:!0}),Q}}function Oz(q,z,J=!1){L(q,JSON.stringify(z,null,J?2:void 0))}var Nq=()=>{};var Mq={};Xq(Mq,{setupCodexAssets:()=>Vz,removeCodexMcp:()=>Rq,removeCodexArtifacts:()=>Zz,hasCodexMcp:()=>Vq,ensureCodexMcp:()=>Fq,codexMcpProblem:()=>Qz,codexDetected:()=>Kq,auditCodex:()=>Yz,CODEX_HOOKS:()=>c});import{readFileSync as S}from"fs";import{homedir as zz}from"os";import{join as C}from"path";function bq(){return process.env.HOME||process.env.USERPROFILE||zz()}function Kq(){if(process.env.BEACON_CODEX==="1")return!0;if(process.env.BEACON_CODEX==="0")return!1;if(zq===void 0)zq=Bun.which("codex")!==null;return zq}function K(q){try{return Bun.TOML.parse(q)}catch{return null}}function Vq(){try{return Boolean(K(S(B(),"utf8"))?.mcp_servers?.beacon)}catch{return!1}}function Qz(){let q="";try{q=S(B(),"utf8")}catch{return null}let z=K(q);if(!z)return`~/.codex/config.toml does not parse \u2014 ${u}`;if(z.mcp_servers?.beacon)return null;if(/^\s*mcp_servers\s*=/m.test(q))return`mcp_servers is an inline table \u2014 ${u}`;return null}function Fq(){let q="",z=!1;try{q=S(B(),"utf8"),z=!0}catch{}if(z){let Y=K(q);if(!Y)return{added:!1,error:`~/.codex/config.toml does not parse \u2014 ${u}`};if(Y.mcp_servers?.beacon)return{added:!1};if(/^\s*mcp_servers\s*=/m.test(q))return{added:!1,error:`mcp_servers is an inline table \u2014 ${u}`}}let J=!q?"":q.endsWith(`
338
+ verbatim. Do NOT implement until the tool returns approval.`;var zq=G(()=>{x=["beacon-init","beacon-refresh","beacon-plan","beacon-explain"]});import{mkdirSync as oq,renameSync as eq,rmSync as qz,writeFileSync as zz}from"fs";import{dirname as Jz}from"path";function L(q,z){oq(Jz(q),{recursive:!0});let J=`${q}.tmp`;try{zz(J,z),eq(J,q)}catch(Q){throw qz(J,{force:!0}),Q}}function kz(q,z,J=!1){L(q,JSON.stringify(z,null,J?2:void 0))}var Kq=()=>{};var Iq={};Pq(Iq,{setupCodexAssets:()=>Zz,removeCodexMcp:()=>Tq,removeCodexArtifacts:()=>Wz,hasCodexMcp:()=>Yq,ensureCodexMcp:()=>Rq,codexMcpProblem:()=>Yz,codexDetected:()=>fq,auditCodex:()=>$z,CODEX_HOOKS:()=>c});import{readFileSync as S}from"fs";import{homedir as Qz}from"os";import{join as C}from"path";function uq(){return process.env.HOME||process.env.USERPROFILE||Qz()}function fq(){if(process.env.BEACON_CODEX==="1")return!0;if(process.env.BEACON_CODEX==="0")return!1;if(Jq===void 0)Jq=Bun.which("codex")!==null;return Jq}function u(q){try{return Bun.TOML.parse(q)}catch{return null}}function Yq(){try{return Boolean(u(S(B(),"utf8"))?.mcp_servers?.beacon)}catch{return!1}}function Yz(){let q="";try{q=S(B(),"utf8")}catch{return null}let z=u(q);if(!z)return`~/.codex/config.toml does not parse \u2014 ${K}`;if(z.mcp_servers?.beacon)return null;if(/^\s*mcp_servers\s*=/m.test(q))return`mcp_servers is an inline table \u2014 ${K}`;return null}function Rq(){let q="",z=!1;try{q=S(B(),"utf8"),z=!0}catch{}if(z){let Y=u(q);if(!Y)return{added:!1,error:`~/.codex/config.toml does not parse \u2014 ${K}`};if(Y.mcp_servers?.beacon)return{added:!1};if(/^\s*mcp_servers\s*=/m.test(q))return{added:!1,error:`mcp_servers is an inline table \u2014 ${K}`}}let J=!q?"":q.endsWith(`
338
339
  `)?`
339
340
  `:`
340
341
 
341
- `,Q=q+J+Jz;if(K(Q)?.mcp_servers?.beacon?.command!=="beacon")return{added:!1,error:`could not safely append [mcp_servers.beacon] \u2014 ${u}`};return L(B(),Q),{added:!0}}function Rq(){let q="";try{q=S(B(),"utf8")}catch{return{removed:!1}}let z=q.split(`
342
- `),J=z.indexOf(Cq);if(J===-1)return{removed:!1,skipped:Vq()};let Q=z.indexOf(fq,J);if(Q===-1)return{removed:!1,skipped:!0};z.splice(J,Q-J+1);let V=z.join(`
342
+ `,Q=q+J+Vz;if(u(Q)?.mcp_servers?.beacon?.command!=="beacon")return{added:!1,error:`could not safely append [mcp_servers.beacon] \u2014 ${K}`};return L(B(),Q),{added:!0}}function Tq(){let q="";try{q=S(B(),"utf8")}catch{return{removed:!1}}let z=q.split(`
343
+ `),J=z.indexOf(Fq);if(J===-1)return{removed:!1,skipped:Yq()};let Q=z.indexOf(Mq,J);if(Q===-1)return{removed:!1,skipped:!0};z.splice(J,Q-J+1);let V=z.join(`
343
344
  `).replace(/\n{3,}/g,`
344
345
 
345
- `).replace(/^\n+/,"");if(K(V)===null)return{removed:!1,skipped:!0};return L(B(),V),{removed:!0}}async function Vz(){let{INIT_SKILL:q,REFRESH_SKILL:z,PLAN_SKILL:J,EXPLAIN_SKILL:Q}=await Promise.resolve().then(() => (i(),l)),V={"beacon-init":q,"beacon-refresh":z,"beacon-plan":J,"beacon-explain":Q},Y=[];for(let W of x){if(!b(p(),W))Y.push(W);k(p(),W,V[W])}let U=0;for(let W of c)if(E(Qq(),{event:W.event,matcher:W.matcher,command:W.command}))U++;let X=N(_(),m);O(_(),m,uq,D);let Z=Fq();return{skillsAdded:Y,hooksAdded:U,agentsMdBlockTouched:!X,mcp:Z}}function Yz(){let q={};for(let J of x)q[J]=b(p(),J);let z={};for(let J of c)z[J.event]=A(Qq(),{event:J.event,command:J.command});return{detected:Kq(),skills:q,hooks:z,agentsMdBlock:N(_(),m),mcp:Vq()}}function Zz(){let q=[];for(let V of x)if(h(p(),V))q.push(V);let z=0;for(let V of c)if(I(Qq(),{event:V.event,command:V.command}))z++;let J=y(_(),m,uq),Q=Rq();return{skillsRemoved:q,hooksRemoved:z,agentsMdBlockRemoved:J,mcpRemoved:Q.removed,mcpSkipped:Q.skipped}}var Jq=()=>C(bq(),".codex"),Qq=()=>C(Jq(),"hooks.json"),B=()=>C(Jq(),"config.toml"),_=()=>C(Jq(),"AGENTS.md"),p=()=>C(bq(),".agents","skills"),m="<!-- beacon:global:start -->",uq="<!-- beacon:global:end -->",c,zq,Cq="# beacon:start (managed by Beacon \u2014 `beacon uninstall` removes this block)",fq="# beacon:end",Jz,u="add it manually: codex mcp add beacon -- beacon mcp";var Tq=g(()=>{qq();Nq();c=[{event:"PostToolUse",matcher:"apply_patch",command:"beacon hook",description:"Report file edits to Beacon's active feature so the map stays fresh."},{event:"UserPromptSubmit",matcher:"*",command:"beacon prompt",description:"On feature-y prompts in a Beacon-wired repo, remind the agent to run the context\u2192propose\u2192describe loop (no-op otherwise)."},{event:"Stop",matcher:"*",command:"beacon stop-hook",description:"When the agent ends a turn asking for plan approval in prose, nudge it to present the plan on Beacon's /plan canvas."}];Jz=`${Cq}
346
+ `).replace(/^\n+/,"");if(u(V)===null)return{removed:!1,skipped:!0};return L(B(),V),{removed:!0}}async function Zz(){let{INIT_SKILL:q,REFRESH_SKILL:z,PLAN_SKILL:J,EXPLAIN_SKILL:Q}=await Promise.resolve().then(() => (o(),i)),V={"beacon-init":q,"beacon-refresh":z,"beacon-plan":J,"beacon-explain":Q},Y=[];for(let W of x){if(!b(m(),W))Y.push(W);k(m(),W,V[W])}let U=0;for(let W of c)if(D(Vq(),{event:W.event,matcher:W.matcher,command:W.command}))U++;let X=N(_(),p);A(_(),p,Cq,I);let Z=Rq();return{skillsAdded:Y,hooksAdded:U,agentsMdBlockTouched:!X,mcp:Z}}function $z(){let q={};for(let J of x)q[J]=b(m(),J);let z={};for(let J of c)z[J.event]=E(Vq(),{event:J.event,command:J.command});return{detected:fq(),skills:q,hooks:z,agentsMdBlock:N(_(),p),mcp:Yq()}}function Wz(){let q=[];for(let V of x)if(h(m(),V))q.push(V);let z=0;for(let V of c)if(O(Vq(),{event:V.event,command:V.command}))z++;let J=y(_(),p,Cq),Q=Tq();return{skillsRemoved:q,hooksRemoved:z,agentsMdBlockRemoved:J,mcpRemoved:Q.removed,mcpSkipped:Q.skipped}}var Qq=()=>C(uq(),".codex"),Vq=()=>C(Qq(),"hooks.json"),B=()=>C(Qq(),"config.toml"),_=()=>C(Qq(),"AGENTS.md"),m=()=>C(uq(),".agents","skills"),p="<!-- beacon:global:start -->",Cq="<!-- beacon:global:end -->",c,Jq,Fq="# beacon:start (managed by Beacon \u2014 `beacon uninstall` removes this block)",Mq="# beacon:end",Vz,K="add it manually: codex mcp add beacon -- beacon mcp";var Dq=G(()=>{zq();Kq();c=[{event:"PostToolUse",matcher:"apply_patch",command:"beacon hook",description:"Report file edits to Beacon's active feature so the map stays fresh."},{event:"UserPromptSubmit",matcher:"*",command:"beacon prompt",description:"On feature-y prompts in a Beacon-wired repo, remind the agent to run the context\u2192propose\u2192describe loop (no-op otherwise)."},{event:"Stop",matcher:"*",command:"beacon stop-hook",description:"When the agent ends a turn asking for plan approval in prose, nudge it to present the plan on Beacon's /plan canvas."}];Vz=`${Fq}
346
347
  [mcp_servers.beacon]
347
348
  command = "beacon"
348
349
  args = ["mcp"]
349
- ${fq}
350
- `});qq();import{existsSync as $z}from"fs";import{homedir as Wz}from"os";import{join as a}from"path";function Uz(){return process.env.HOME||process.env.USERPROFILE||Wz()}var t=()=>a(Uz(),".claude"),Yq=()=>a(t(),"skills"),Zq=()=>a(t(),"settings.json"),$q=()=>a(t(),"CLAUDE.md"),Wq="<!-- beacon:global:start -->",Dq="<!-- beacon:global:end -->";var Xz=D,Uq=[{event:"PreToolUse",matcher:"Edit|Write|MultiEdit",command:"beacon guard",description:"Gate edits against the active plan's scope contract (when the scope-guard flag is on): in-scope \u2192 allow, off-scope \u2192 ask the user to authorize. No-op + fail-open otherwise."},{event:"PostToolUse",matcher:"Edit|Write|MultiEdit",command:"beacon hook",description:"Report file edits to Beacon's active feature so the map stays fresh."},{event:"PermissionRequest",matcher:"ExitPlanMode",command:"beacon plan",description:"Pipe the agent's plan markdown into Beacon's /plan canvas for review."},{event:"UserPromptSubmit",matcher:"*",command:"beacon prompt",description:"On feature-y prompts in a Beacon-wired repo, remind the agent to run the context\u2192propose\u2192describe loop (no-op otherwise)."},{event:"Stop",matcher:"*",command:"beacon stop-hook",description:"When the agent ends a turn asking for plan approval in prose (instead of presenting it), nudge it to present the plan on Beacon's /plan canvas. Bounded by stop_hook_active \u2014 at most one nudge."}];function Hz(q,z){return k(Yq(),q,z)}function Eq(q){return b(Yq(),q)}function Pz(q){return h(Yq(),q)}function wz(q){return E(Zq(),q)}function xz(q){return A(Zq(),q)}function vz(q){return I(Zq(),q)}function jz(q){O($q(),Wq,Dq,q)}function Aq(){return N($q(),Wq)}function Bz(){return y($q(),Wq,Dq)}function tz(){let q={};for(let J of x)q[J]=Eq(J);let z={};for(let J of Uq)z[J.event]=xz({event:J.event,command:J.command});return{homeExists:$z(t()),skills:q,hooks:z,claudeMdBlock:Aq()}}async function gz(){let{INIT_SKILL:q,REFRESH_SKILL:z,PLAN_SKILL:J,EXPLAIN_SKILL:Q}=await Promise.resolve().then(() => (i(),l)),V={"beacon-init":q,"beacon-refresh":z,"beacon-plan":J,"beacon-explain":Q},Y=[];for(let Z of x){if(!Eq(Z))Y.push(Z);Hz(Z,V[Z])}let U=0;for(let Z of Uq)if(wz({event:Z.event,matcher:Z.matcher,command:Z.command}))U++;let X=Aq();return jz(Xz),{skillsAdded:Y,hooksAdded:U,claudeMdBlockTouched:!X}}async function dz(){if(jq())return{ok:!0,skipped:"plugin",skillsAdded:[],hooksAdded:0,claudeMdBlockTouched:!1};let q;if(gq()){try{Gz()}catch{}q={ok:!0,skipped:"plugin-present",skillsAdded:[],hooksAdded:0,claudeMdBlockTouched:!1}}else try{q={ok:!0,...await gz()}}catch(z){q={ok:!1,error:z instanceof Error?z.message:String(z),skillsAdded:[],hooksAdded:0,claudeMdBlockTouched:!1}}try{let z=await Promise.resolve().then(() => (Tq(),Mq));if(z.codexDetected())q.codex={ok:!0,...await z.setupCodexAssets()}}catch(z){q.codex={ok:!1,error:z instanceof Error?z.message:String(z),skillsAdded:[],hooksAdded:0,agentsMdBlockTouched:!1,mcp:{added:!1}}}return q}function Gz(){let q=[];for(let Q of x)if(Pz(Q))q.push(Q);let z=0;for(let Q of Uq)if(vz(Q))z++;let J=Bz();return{skillsRemoved:q,hooksRemoved:z,claudeMdBlockRemoved:J}}export{gz as setupGlobalAssets,dz as selfHealGlobal,Pz as removeGlobalSkill,vz as removeGlobalHook,Bz as removeGlobalClaudeMdBlock,Gz as removeBeaconArtifacts,jq as isPluginManaged,sq as isInstalledPluginPath,Eq as isGlobalSkillInstalled,nq as installedBeaconPlugin,Hz as installGlobalSkill,xz as hasGlobalHook,Aq as hasGlobalClaudeMdBlock,Bq as findBeaconPluginDir,wz as ensureGlobalHook,jz as ensureGlobalClaudeMdBlock,gq as beaconPluginInstalled,tz as auditGlobal,x as GLOBAL_SKILLS,Uq as GLOBAL_HOOKS,Xz as GLOBAL_CLAUDE_MD_BLOCK};
350
+ ${Mq}
351
+ `});zq();import{existsSync as Uz}from"fs";import{homedir as Xz}from"os";import{join as a}from"path";function Pz(){return process.env.HOME||process.env.USERPROFILE||Xz()}var d=()=>a(Pz(),".claude"),Zq=()=>a(d(),"skills"),$q=()=>a(d(),"settings.json"),Wq=()=>a(d(),"CLAUDE.md"),Uq="<!-- beacon:global:start -->",Eq="<!-- beacon:global:end -->";var Hz=I,Xq=[{event:"PreToolUse",matcher:"Edit|Write|MultiEdit",command:"beacon guard",description:"Gate edits against the active plan's scope contract: in-scope \u2192 allow, off-scope \u2192 ask the user to authorize. Fail-open when there's no active contract."},{event:"PostToolUse",matcher:"Edit|Write|MultiEdit",command:"beacon hook",description:"Report file edits to Beacon's active feature so the map stays fresh."},{event:"PermissionRequest",matcher:"ExitPlanMode",command:"beacon plan",description:"Pipe the agent's plan markdown into Beacon's /plan canvas for review."},{event:"UserPromptSubmit",matcher:"*",command:"beacon prompt",description:"On feature-y prompts in a Beacon-wired repo, remind the agent to run the context\u2192propose\u2192describe loop (no-op otherwise)."},{event:"Stop",matcher:"*",command:"beacon stop-hook",description:"When the agent ends a turn asking for plan approval in prose (instead of presenting it), nudge it to present the plan on Beacon's /plan canvas. Bounded by stop_hook_active \u2014 at most one nudge."}];function wz(q,z){return k(Zq(),q,z)}function Oq(q){return b(Zq(),q)}function vz(q){return h(Zq(),q)}function xz(q){return D($q(),q)}function jz(q){return E($q(),q)}function Bz(q){return O($q(),q)}function Gz(q){A(Wq(),Uq,Eq,q)}function Aq(){return N(Wq(),Uq)}function gz(){return y(Wq(),Uq,Eq)}function nz(){let q={};for(let J of x)q[J]=Oq(J);let z={};for(let J of Xq)z[J.event]=jz({event:J.event,command:J.command});return{homeExists:Uz(d()),skills:q,hooks:z,claudeMdBlock:Aq()}}async function Nz(){let{INIT_SKILL:q,REFRESH_SKILL:z,PLAN_SKILL:J,EXPLAIN_SKILL:Q}=await Promise.resolve().then(() => (o(),i)),V={"beacon-init":q,"beacon-refresh":z,"beacon-plan":J,"beacon-explain":Q},Y=[];for(let Z of x){if(!Oq(Z))Y.push(Z);wz(Z,V[Z])}let U=0;for(let Z of Xq)if(xz({event:Z.event,matcher:Z.matcher,command:Z.command}))U++;let X=Aq();return Gz(Hz),{skillsAdded:Y,hooksAdded:U,claudeMdBlockTouched:!X}}async function rz(){if(Gq())return{ok:!0,skipped:"plugin",skillsAdded:[],hooksAdded:0,claudeMdBlockTouched:!1};let q;if(Nq()){try{bz()}catch{}q={ok:!0,skipped:"plugin-present",skillsAdded:[],hooksAdded:0,claudeMdBlockTouched:!1}}else try{q={ok:!0,...await Nz()}}catch(z){q={ok:!1,error:z instanceof Error?z.message:String(z),skillsAdded:[],hooksAdded:0,claudeMdBlockTouched:!1}}try{let z=await Promise.resolve().then(() => (Dq(),Iq));if(z.codexDetected())q.codex={ok:!0,...await z.setupCodexAssets()}}catch(z){q.codex={ok:!1,error:z instanceof Error?z.message:String(z),skillsAdded:[],hooksAdded:0,agentsMdBlockTouched:!1,mcp:{added:!1}}}return q}function bz(){let q=[];for(let Q of x)if(vz(Q))q.push(Q);let z=0;for(let Q of Xq)if(Bz(Q))z++;let J=gz();return{skillsRemoved:q,hooksRemoved:z,claudeMdBlockRemoved:J}}export{Nz as setupGlobalAssets,rz as selfHealGlobal,vz as removeGlobalSkill,Bz as removeGlobalHook,gz as removeGlobalClaudeMdBlock,bz as removeBeaconArtifacts,Gq as isPluginManaged,sq as isInstalledPluginPath,Oq as isGlobalSkillInstalled,iq as installedBeaconPlugin,wz as installGlobalSkill,jz as hasGlobalHook,Aq as hasGlobalClaudeMdBlock,gq as findBeaconPluginDir,xz as ensureGlobalHook,Gz as ensureGlobalClaudeMdBlock,Nq as beaconPluginInstalled,nz as auditGlobal,x as GLOBAL_SKILLS,Xq as GLOBAL_HOOKS,Hz as GLOBAL_CLAUDE_MD_BLOCK};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trybeacon",
3
- "version": "0.1.71",
3
+ "version": "0.1.73",
4
4
  "description": "The visual planning surface for the coding agent in your terminal.",
5
5
  "homepage": "https://trybeacon.sh",
6
6
  "license": "Apache-2.0",
@@ -75,8 +75,10 @@
75
75
  "next": "16.2.7",
76
76
  "radix-ui": "^1.4.3",
77
77
  "react": "19.2.4",
78
+ "react-diff-view": "^3.3.3",
78
79
  "react-dom": "19.2.4",
79
80
  "react-hook-form": "^7.77.0",
81
+ "refractor": "^5.0.0",
80
82
  "server-only": "^0.0.1",
81
83
  "shadcn": "^4.10.0",
82
84
  "tailwind-merge": "^3.6.0",
@@ -27,10 +27,11 @@ board on /plan. The board is built ONLY from the block — prose is never parsed
27
27
  table/endpoint/feature you mention in the prose into the block, or that board will be empty.
28
28
 
29
29
  - **Declare your scope.** List the repo-relative files this plan will touch in a top-level
30
- `"contract"` array in the block (or the `contract` arg of `beacon_propose_plan`). When the user
31
- has the plan scope-guard enabled, those files are frozen at approval and you're held to them while
32
- implementing — editing an undeclared file pauses for the user's authorization (which then adds it
33
- to the contract). Harmless when the guard is off. Declare the files you genuinely expect to edit.
30
+ `"contract"` array in the block (or the `contract` arg of `beacon_propose_plan`). Those files are
31
+ frozen at approval and you're held to them while implementing — editing an undeclared file pauses
32
+ for the user's authorization (which then adds it to the contract), and the /plan Changes view
33
+ groups your edits On-plan vs Strayed against them. Declare the files you genuinely expect to edit
34
+ (if omitted, the scope is inferred from the files you name in backticks).
34
35
 
35
36
  `beacon_present_plan` opens /plan and BLOCKS until the user clicks Approve / Discard / submits
36
37
  feedback, then returns their verdict. Implement code or migrations ONLY after it returns approval.
@@ -1 +0,0 @@
1
- "use strict";(()=>{var a={};a.id=543,a.ids=[543],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},7580:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(48522),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/flags/route",pathname:"/api/flags",filename:"route",bundlePath:"app/api/flags/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/beacon/beacon/app/api/flags/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/flags/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},16698:a=>{a.exports=require("node:async_hooks")},19225:(a,b,c)=>{a.exports=c(44870)},28855:a=>{a.exports=import("@libsql/client")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31059:(a,b,c)=>{c.d(b,{ie:()=>f});var d=c(37096),e=c(71484);function f(...a){return a[0].columns?new g(a[0].columns,a[0].name):new g(a)}class g{static [d.i]="SQLitePrimaryKeyBuilder";columns;name;constructor(a,b){this.columns=a,this.name=b}build(a){return new h(a,this.columns,this.name)}}class h{constructor(a,b,c){this.table=a,this.columns=b,this.name=c}static [d.i]="SQLitePrimaryKey";columns;name;getName(){return this.name??`${this.table[e.jo.Symbol.Name]}_${this.columns.map(a=>a.name).join("_")}_pk`}}},31421:a=>{a.exports=require("node:child_process")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},48522:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>i,POST:()=>j,dynamic:()=>h});var e=c(68204),f=c(76124),g=a([e,f]);[e,f]=g.then?(await g)():g;let h="force-dynamic",i=(0,e.d)(async a=>{let b=new URL(a.url).searchParams.get("key");return b?Response.json(await (0,f.j)(b)):new Response("key required",{status:400})}),j=(0,e.d)(async a=>{let b=await a.json().catch(()=>null),c="string"==typeof b?.key?b.key:"";if(!c)return new Response("key required",{status:400});let d={};return"boolean"==typeof b?.enabled&&(d.enabled=b.enabled),b?.config&&"object"==typeof b.config&&(d.config=b.config),Response.json(await (0,f.l)(c,d))});d()}catch(a){d(a)}})},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},68204:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{d:()=>i});var e=c(6716),f=c(56727),g=a([f]);async function h(a){if(a)return void await (0,e.kO)(a);let b=(0,e.UP)();b?await (0,e.kO)(b):await (0,f.e$)()}function i(a){return async(b,...c)=>{let d=await (0,e.AV)(b);return await h(d),(0,e.X_)(d,async()=>a(b,...c))}}f=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},73024:a=>{a.exports=require("node:fs")},73136:a=>{a.exports=require("node:url")},76124:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{j:()=>h,l:()=>i});var e=c(56727),f=c(30046),g=a([e]);async function h(a,b=e.db){let c=await b.query.workspaceFlag.findFirst({where:(b,{eq:c})=>c(b.key,a)});return c?{enabled:c.enabled,config:function(a){if(!a)return{};try{let b=JSON.parse(a);return b&&"object"==typeof b&&!Array.isArray(b)?b:{}}catch{return{}}}(c.config)}:{enabled:!1,config:{}}}async function i(a,b,c=e.db){let d={};return void 0!==b.enabled&&(d.enabled=b.enabled),void 0!==b.config&&(d.config=JSON.stringify(b.config)),0===Object.keys(d).length&&(d.key=a),await c.insert(f.workspaceFlag).values({key:a,enabled:b.enabled??!1,config:void 0!==b.config?JSON.stringify(b.config):null}).onConflictDoUpdate({target:f.workspaceFlag.key,set:d}),h(a,c)}e=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},76760:a=>{a.exports=require("node:path")},76968:(a,b,c)=>{c.d(b,{GL:()=>i,Pe:()=>h});var d=c(37096);class e{constructor(a,b){this.name=a,this.unique=b}static [d.i]="SQLiteIndexBuilderOn";on(...a){return new f(this.name,a,this.unique)}}class f{static [d.i]="SQLiteIndexBuilder";config;constructor(a,b,c){this.config={name:a,columns:b,unique:c,where:void 0}}where(a){return this.config.where=a,this}build(a){return new g(this.config,a)}}class g{static [d.i]="SQLiteIndex";config;constructor(a,b){this.config={...a,table:b}}}function h(a){return new e(a,!1)}function i(a){return new e(a,!0)}},77598:a=>{a.exports=require("node:crypto")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92280:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1669,3254,9884,5871,9683],()=>b(b.s=7580));module.exports=c})();