trybeacon 0.1.64 → 0.1.66

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 (386) 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 +15 -8
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/prerender-manifest.json +3 -3
  6. package/.next/routes-manifest.json +42 -0
  7. package/.next/server/app/_global-error/page.js +2 -2
  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/code-graph/position/route.js +1 -1
  33. package/.next/server/app/api/code-graph/route.js +1 -1
  34. package/.next/server/app/api/context/feature/route.js +1 -1
  35. package/.next/server/app/api/context/file/route.js +1 -1
  36. package/.next/server/app/api/context/route.js +1 -1
  37. package/.next/server/app/api/db/arrange/route.js +1 -1
  38. package/.next/server/app/api/db/backfill-access/route.js +1 -1
  39. package/.next/server/app/api/db/position/route.js +1 -1
  40. package/.next/server/app/api/db/prune-planned/route.js +1 -1
  41. package/.next/server/app/api/db/reconcile-endpoints/route.js +1 -1
  42. package/.next/server/app/api/db/relations/[id]/route.js +1 -1
  43. package/.next/server/app/api/db/tables/[id]/route.js +1 -1
  44. package/.next/server/app/api/draft/approve/route.js +1 -1
  45. package/.next/server/app/api/draft/route.js +1 -1
  46. package/.next/server/app/api/draft/status/route.js +1 -1
  47. package/.next/server/app/api/edges/[id]/route.js +1 -1
  48. package/.next/server/app/api/edges/route.js +1 -1
  49. package/.next/server/app/api/endpoints/[id]/route.js +1 -1
  50. package/.next/server/app/api/entities/route.js +1 -1
  51. package/.next/server/app/api/feedback/[id]/route.js +1 -1
  52. package/.next/server/app/api/feedback/[id]/vote/route.js +1 -1
  53. package/.next/server/app/api/feedback/route.js +1 -1
  54. package/.next/server/app/api/flags/route.js +1 -1
  55. package/.next/server/app/api/ingest/route.js +2 -2
  56. package/.next/server/app/api/init/route.js +2 -2
  57. package/.next/server/app/api/lesson/close/route.js +1 -0
  58. package/.next/server/app/api/lesson/close/route.js.nft.json +1 -0
  59. package/.next/server/app/api/lesson/close/route_client-reference-manifest.js +1 -0
  60. package/.next/server/app/api/lesson/presence/route.js +1 -0
  61. package/.next/server/app/api/lesson/presence/route.js.nft.json +1 -0
  62. package/.next/server/app/api/lesson/presence/route_client-reference-manifest.js +1 -0
  63. package/.next/server/app/api/lesson/questions/route.js +1 -0
  64. package/.next/server/app/api/lesson/questions/route.js.nft.json +1 -0
  65. package/.next/server/app/api/lesson/questions/route_client-reference-manifest.js +1 -0
  66. package/.next/server/app/api/lesson/route.js +1 -0
  67. package/.next/server/app/api/lesson/route.js.nft.json +1 -0
  68. package/.next/server/app/api/lesson/route_client-reference-manifest.js +1 -0
  69. package/.next/server/app/api/lesson/save/route.js +1 -0
  70. package/.next/server/app/api/lesson/save/route.js.nft.json +1 -0
  71. package/.next/server/app/api/lesson/save/route_client-reference-manifest.js +1 -0
  72. package/.next/server/app/api/lesson/verdict/route.js +1 -0
  73. package/.next/server/app/api/lesson/verdict/route.js.nft.json +1 -0
  74. package/.next/server/app/api/lesson/verdict/route_client-reference-manifest.js +1 -0
  75. package/.next/server/app/api/map/describe/route.js +2 -2
  76. package/.next/server/app/api/map/files/route.js +1 -1
  77. package/.next/server/app/api/map/finish/route.js +1 -1
  78. package/.next/server/app/api/map/route.js +1 -1
  79. package/.next/server/app/api/map/start/route.js +1 -1
  80. package/.next/server/app/api/map/touch-active/route.js +1 -1
  81. package/.next/server/app/api/mention-search/route.js +1 -1
  82. package/.next/server/app/api/nodes/[id]/position/route.js +1 -1
  83. package/.next/server/app/api/nodes/[id]/route.js +1 -1
  84. package/.next/server/app/api/nodes/positions/route.js +1 -1
  85. package/.next/server/app/api/nodes/route.js +1 -1
  86. package/.next/server/app/api/nodes/subtasks/route.js +1 -1
  87. package/.next/server/app/api/notes/[id]/route.js +1 -1
  88. package/.next/server/app/api/notes/route.js +1 -1
  89. package/.next/server/app/api/open/route.js +1 -1
  90. package/.next/server/app/api/plan/annotations/route.js +3 -3
  91. package/.next/server/app/api/plan/approve/route.js +2 -2
  92. package/.next/server/app/api/plan/history/route.js +1 -1
  93. package/.next/server/app/api/plan/markdown/route.js +1 -1
  94. package/.next/server/app/api/plan/presence/route.js +1 -1
  95. package/.next/server/app/api/plan/route.js +1 -1
  96. package/.next/server/app/api/plan/verdict/route.js +1 -1
  97. package/.next/server/app/api/preferences/route.js +1 -1
  98. package/.next/server/app/api/project-meta/route.js +1 -1
  99. package/.next/server/app/api/reset/route.js +1 -1
  100. package/.next/server/app/api/scope-guard/check/route.js +1 -1
  101. package/.next/server/app/api/share/create/route.js +1 -1
  102. package/.next/server/app/api/share/route.js +1 -1
  103. package/.next/server/app/api/stream/route.js +2 -2
  104. package/.next/server/app/api/tab/nav/route.js +1 -1
  105. package/.next/server/app/api/tab/presence/route.js +1 -1
  106. package/.next/server/app/api/telemetry/route.js +1 -1
  107. package/.next/server/app/api/telemetry/stats/route.js +1 -1
  108. package/.next/server/app/api/version/route.js +1 -1
  109. package/.next/server/app/api/workspace/activate/route.js +1 -1
  110. package/.next/server/app/api/workspace/route.js +1 -1
  111. package/.next/server/app/apple-icon.png/route.js +1 -1
  112. package/.next/server/app/docs/page.js +2 -2
  113. package/.next/server/app/docs/page_client-reference-manifest.js +1 -1
  114. package/.next/server/app/docs.html +1 -1
  115. package/.next/server/app/docs.rsc +11 -11
  116. package/.next/server/app/docs.segments/_full.segment.rsc +11 -11
  117. package/.next/server/app/docs.segments/_head.segment.rsc +1 -1
  118. package/.next/server/app/docs.segments/_index.segment.rsc +11 -11
  119. package/.next/server/app/docs.segments/_tree.segment.rsc +2 -2
  120. package/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +1 -1
  121. package/.next/server/app/docs.segments/docs.segment.rsc +1 -1
  122. package/.next/server/app/feedback/page.js +2 -2
  123. package/.next/server/app/feedback/page_client-reference-manifest.js +1 -1
  124. package/.next/server/app/feedback.html +1 -1
  125. package/.next/server/app/feedback.rsc +11 -11
  126. package/.next/server/app/feedback.segments/_full.segment.rsc +11 -11
  127. package/.next/server/app/feedback.segments/_head.segment.rsc +1 -1
  128. package/.next/server/app/feedback.segments/_index.segment.rsc +11 -11
  129. package/.next/server/app/feedback.segments/_tree.segment.rsc +2 -2
  130. package/.next/server/app/feedback.segments/feedback/__PAGE__.segment.rsc +1 -1
  131. package/.next/server/app/feedback.segments/feedback.segment.rsc +1 -1
  132. package/.next/server/app/help/page.js +2 -2
  133. package/.next/server/app/help/page_client-reference-manifest.js +1 -1
  134. package/.next/server/app/help.html +1 -1
  135. package/.next/server/app/help.rsc +11 -11
  136. package/.next/server/app/help.segments/_full.segment.rsc +11 -11
  137. package/.next/server/app/help.segments/_head.segment.rsc +1 -1
  138. package/.next/server/app/help.segments/_index.segment.rsc +11 -11
  139. package/.next/server/app/help.segments/_tree.segment.rsc +2 -2
  140. package/.next/server/app/help.segments/help/__PAGE__.segment.rsc +1 -1
  141. package/.next/server/app/help.segments/help.segment.rsc +1 -1
  142. package/.next/server/app/icon.svg/route.js +1 -1
  143. package/.next/server/app/index.html +1 -1
  144. package/.next/server/app/index.rsc +12 -12
  145. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  146. package/.next/server/app/index.segments/_full.segment.rsc +12 -12
  147. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  148. package/.next/server/app/index.segments/_index.segment.rsc +11 -11
  149. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  150. package/.next/server/app/learn/page.js +6 -0
  151. package/.next/server/app/learn/page.js.nft.json +1 -0
  152. package/.next/server/app/learn/page_client-reference-manifest.js +1 -0
  153. package/.next/server/app/map/page.js +2 -2
  154. package/.next/server/app/map/page.js.nft.json +1 -1
  155. package/.next/server/app/map/page_client-reference-manifest.js +1 -1
  156. package/.next/server/app/page.js +2 -2
  157. package/.next/server/app/page.js.nft.json +1 -1
  158. package/.next/server/app/page_client-reference-manifest.js +1 -1
  159. package/.next/server/app/plan/page.js +2 -2
  160. package/.next/server/app/plan/page.js.nft.json +1 -1
  161. package/.next/server/app/plan/page_client-reference-manifest.js +1 -1
  162. package/.next/server/app/s/[token]/page.js +2 -2
  163. package/.next/server/app/s/[token]/page.js.nft.json +1 -1
  164. package/.next/server/app/s/[token]/page_client-reference-manifest.js +1 -1
  165. package/.next/server/app/settings/page.js +2 -2
  166. package/.next/server/app/settings/page.js.nft.json +1 -1
  167. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  168. package/.next/server/app-paths-manifest.json +15 -8
  169. package/.next/server/chunks/2050.js +1 -1
  170. package/.next/server/chunks/3174.js +1 -0
  171. package/.next/server/chunks/3584.js +154 -0
  172. package/.next/server/chunks/4307.js +1 -1
  173. package/.next/server/chunks/6024.js +2 -0
  174. package/.next/server/chunks/{4384.js → 7187.js} +1 -1
  175. package/.next/server/chunks/8035.js +1 -0
  176. package/.next/server/chunks/9338.js +8 -8
  177. package/.next/server/middleware-build-manifest.js +1 -1
  178. package/.next/server/pages/404.html +1 -1
  179. package/.next/server/pages/500.html +1 -1
  180. package/.next/server/server-reference-manifest.js +1 -1
  181. package/.next/server/server-reference-manifest.json +1 -1
  182. package/.next/static/P3uXQySdS-m6_bxuiezYe/_buildManifest.js +1 -0
  183. package/.next/static/chunks/1909-98243a0473be2aae.js +1 -0
  184. package/.next/static/chunks/1936-7fea5225b5bfcfda.js +1 -0
  185. package/.next/static/chunks/2019-3be80edc82176878.js +1 -0
  186. package/.next/static/chunks/4549-591415d55ca009a3.js +62 -0
  187. package/.next/static/chunks/6638-4e53879181b1df75.js +1 -0
  188. package/.next/static/chunks/{4888-911c0da3c2d785d2.js → 7043-254590cf9891391f.js} +1 -1
  189. package/.next/static/chunks/7643-6c7ff4b9400f68fc.js +1 -0
  190. package/.next/static/chunks/app/_global-error/page-2390ea0e69e5991f.js +1 -0
  191. package/.next/static/chunks/app/api/board-annotations/[id]/route-2390ea0e69e5991f.js +1 -0
  192. package/.next/static/chunks/app/api/board-annotations/route-2390ea0e69e5991f.js +1 -0
  193. package/.next/static/chunks/app/api/board-layout/route-2390ea0e69e5991f.js +1 -0
  194. package/.next/static/chunks/app/api/bug-flags/[id]/route-2390ea0e69e5991f.js +1 -0
  195. package/.next/static/chunks/app/api/bug-flags/route-2390ea0e69e5991f.js +1 -0
  196. package/.next/static/chunks/app/api/code-graph/position/route-2390ea0e69e5991f.js +1 -0
  197. package/.next/static/chunks/app/api/code-graph/route-2390ea0e69e5991f.js +1 -0
  198. package/.next/static/chunks/app/api/context/feature/route-2390ea0e69e5991f.js +1 -0
  199. package/.next/static/chunks/app/api/context/file/route-2390ea0e69e5991f.js +1 -0
  200. package/.next/static/chunks/app/api/context/route-2390ea0e69e5991f.js +1 -0
  201. package/.next/static/chunks/app/api/db/arrange/route-2390ea0e69e5991f.js +1 -0
  202. package/.next/static/chunks/app/api/db/backfill-access/route-2390ea0e69e5991f.js +1 -0
  203. package/.next/static/chunks/app/api/db/position/route-2390ea0e69e5991f.js +1 -0
  204. package/.next/static/chunks/app/api/db/prune-planned/route-2390ea0e69e5991f.js +1 -0
  205. package/.next/static/chunks/app/api/db/reconcile-endpoints/route-2390ea0e69e5991f.js +1 -0
  206. package/.next/static/chunks/app/api/db/relations/[id]/route-2390ea0e69e5991f.js +1 -0
  207. package/.next/static/chunks/app/api/db/tables/[id]/route-2390ea0e69e5991f.js +1 -0
  208. package/.next/static/chunks/app/api/draft/approve/route-2390ea0e69e5991f.js +1 -0
  209. package/.next/static/chunks/app/api/draft/route-2390ea0e69e5991f.js +1 -0
  210. package/.next/static/chunks/app/api/draft/status/route-2390ea0e69e5991f.js +1 -0
  211. package/.next/static/chunks/app/api/edges/[id]/route-2390ea0e69e5991f.js +1 -0
  212. package/.next/static/chunks/app/api/edges/route-2390ea0e69e5991f.js +1 -0
  213. package/.next/static/chunks/app/api/endpoints/[id]/route-2390ea0e69e5991f.js +1 -0
  214. package/.next/static/chunks/app/api/entities/route-2390ea0e69e5991f.js +1 -0
  215. package/.next/static/chunks/app/api/feedback/[id]/route-2390ea0e69e5991f.js +1 -0
  216. package/.next/static/chunks/app/api/feedback/[id]/vote/route-2390ea0e69e5991f.js +1 -0
  217. package/.next/static/chunks/app/api/feedback/route-2390ea0e69e5991f.js +1 -0
  218. package/.next/static/chunks/app/api/flags/route-2390ea0e69e5991f.js +1 -0
  219. package/.next/static/chunks/app/api/ingest/route-2390ea0e69e5991f.js +1 -0
  220. package/.next/static/chunks/app/api/init/route-2390ea0e69e5991f.js +1 -0
  221. package/.next/static/chunks/app/api/lesson/close/route-2390ea0e69e5991f.js +1 -0
  222. package/.next/static/chunks/app/api/lesson/presence/route-2390ea0e69e5991f.js +1 -0
  223. package/.next/static/chunks/app/api/lesson/questions/route-2390ea0e69e5991f.js +1 -0
  224. package/.next/static/chunks/app/api/lesson/route-2390ea0e69e5991f.js +1 -0
  225. package/.next/static/chunks/app/api/lesson/save/route-2390ea0e69e5991f.js +1 -0
  226. package/.next/static/chunks/app/api/lesson/verdict/route-2390ea0e69e5991f.js +1 -0
  227. package/.next/static/chunks/app/api/map/describe/route-2390ea0e69e5991f.js +1 -0
  228. package/.next/static/chunks/app/api/map/files/route-2390ea0e69e5991f.js +1 -0
  229. package/.next/static/chunks/app/api/map/finish/route-2390ea0e69e5991f.js +1 -0
  230. package/.next/static/chunks/app/api/map/route-2390ea0e69e5991f.js +1 -0
  231. package/.next/static/chunks/app/api/map/start/route-2390ea0e69e5991f.js +1 -0
  232. package/.next/static/chunks/app/api/map/touch-active/route-2390ea0e69e5991f.js +1 -0
  233. package/.next/static/chunks/app/api/mention-search/route-2390ea0e69e5991f.js +1 -0
  234. package/.next/static/chunks/app/api/nodes/[id]/position/route-2390ea0e69e5991f.js +1 -0
  235. package/.next/static/chunks/app/api/nodes/[id]/route-2390ea0e69e5991f.js +1 -0
  236. package/.next/static/chunks/app/api/nodes/positions/route-2390ea0e69e5991f.js +1 -0
  237. package/.next/static/chunks/app/api/nodes/route-2390ea0e69e5991f.js +1 -0
  238. package/.next/static/chunks/app/api/nodes/subtasks/route-2390ea0e69e5991f.js +1 -0
  239. package/.next/static/chunks/app/api/notes/[id]/route-2390ea0e69e5991f.js +1 -0
  240. package/.next/static/chunks/app/api/notes/route-2390ea0e69e5991f.js +1 -0
  241. package/.next/static/chunks/app/api/open/route-2390ea0e69e5991f.js +1 -0
  242. package/.next/static/chunks/app/api/plan/annotations/route-2390ea0e69e5991f.js +1 -0
  243. package/.next/static/chunks/app/api/plan/approve/route-2390ea0e69e5991f.js +1 -0
  244. package/.next/static/chunks/app/api/plan/history/route-2390ea0e69e5991f.js +1 -0
  245. package/.next/static/chunks/app/api/plan/markdown/route-2390ea0e69e5991f.js +1 -0
  246. package/.next/static/chunks/app/api/plan/presence/route-2390ea0e69e5991f.js +1 -0
  247. package/.next/static/chunks/app/api/plan/route-2390ea0e69e5991f.js +1 -0
  248. package/.next/static/chunks/app/api/plan/verdict/route-2390ea0e69e5991f.js +1 -0
  249. package/.next/static/chunks/app/api/preferences/route-2390ea0e69e5991f.js +1 -0
  250. package/.next/static/chunks/app/api/project-meta/route-2390ea0e69e5991f.js +1 -0
  251. package/.next/static/chunks/app/api/reset/route-2390ea0e69e5991f.js +1 -0
  252. package/.next/static/chunks/app/api/scope-guard/check/route-2390ea0e69e5991f.js +1 -0
  253. package/.next/static/chunks/app/api/share/create/route-2390ea0e69e5991f.js +1 -0
  254. package/.next/static/chunks/app/api/share/route-2390ea0e69e5991f.js +1 -0
  255. package/.next/static/chunks/app/api/stream/route-2390ea0e69e5991f.js +1 -0
  256. package/.next/static/chunks/app/api/tab/nav/route-2390ea0e69e5991f.js +1 -0
  257. package/.next/static/chunks/app/api/tab/presence/route-2390ea0e69e5991f.js +1 -0
  258. package/.next/static/chunks/app/api/telemetry/route-2390ea0e69e5991f.js +1 -0
  259. package/.next/static/chunks/app/api/telemetry/stats/route-2390ea0e69e5991f.js +1 -0
  260. package/.next/static/chunks/app/api/version/route-2390ea0e69e5991f.js +1 -0
  261. package/.next/static/chunks/app/api/workspace/activate/route-2390ea0e69e5991f.js +1 -0
  262. package/.next/static/chunks/app/api/workspace/route-2390ea0e69e5991f.js +1 -0
  263. package/.next/static/chunks/app/layout-0c993f55d3a798f4.js +1 -0
  264. package/.next/static/chunks/app/learn/page-797d74e02b98fa88.js +5 -0
  265. package/.next/static/chunks/app/map/page-634b6d5d98e921b3.js +1 -0
  266. package/.next/static/chunks/app/page-84dc684d45002cfb.js +1 -0
  267. package/.next/static/chunks/app/plan/page-df829b2054c40611.js +1 -0
  268. package/.next/static/chunks/app/s/[token]/page-f97dec75856a7952.js +1 -0
  269. package/.next/static/chunks/app/settings/page-59d90685cd17fc1f.js +1 -0
  270. package/.next/static/chunks/next/dist/client/components/builtin/app-error-2390ea0e69e5991f.js +1 -0
  271. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-2390ea0e69e5991f.js +1 -0
  272. package/.next/static/chunks/next/dist/client/components/builtin/not-found-2390ea0e69e5991f.js +1 -0
  273. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-2390ea0e69e5991f.js +1 -0
  274. package/.next/static/css/b3d3212da726bbfb.css +1 -0
  275. package/.next/trace +43 -42
  276. package/.next/trace-build +1 -1
  277. package/.next/types/app/api/lesson/close/route.ts +351 -0
  278. package/.next/types/app/api/lesson/presence/route.ts +351 -0
  279. package/.next/types/app/api/lesson/questions/route.ts +351 -0
  280. package/.next/types/app/api/lesson/route.ts +351 -0
  281. package/.next/types/app/api/lesson/save/route.ts +351 -0
  282. package/.next/types/app/api/lesson/verdict/route.ts +351 -0
  283. package/.next/types/app/learn/page.ts +87 -0
  284. package/.next/types/routes.d.ts +9 -2
  285. package/.next/types/validator.ts +63 -0
  286. package/README.md +2 -1
  287. package/dist/bin/doctor.js +92 -22
  288. package/dist/bin/hook.js +91 -21
  289. package/dist/bin/mcp.js +107 -35
  290. package/dist/bin/plan.js +92 -22
  291. package/dist/bin/uninstall.js +95 -25
  292. package/dist/lib/assets.js +81 -14
  293. package/dist/lib/codex-install.js +92 -22
  294. package/dist/lib/global-install.js +93 -23
  295. package/package.json +1 -1
  296. package/plugin/skills/beacon-explain/SKILL.md +63 -0
  297. package/.next/server/chunks/2942.js +0 -1
  298. package/.next/server/chunks/2994.js +0 -2
  299. package/.next/server/chunks/3284.js +0 -154
  300. package/.next/server/chunks/5719.js +0 -1
  301. package/.next/static/chunks/3415-05007c2bd98125c7.js +0 -1
  302. package/.next/static/chunks/5957-83f611fcd5a08b45.js +0 -1
  303. package/.next/static/chunks/766-242213d211df0afd.js +0 -1
  304. package/.next/static/chunks/874-c750840a8644deb1.js +0 -1
  305. package/.next/static/chunks/8915-fa61a860c63a7c85.js +0 -62
  306. package/.next/static/chunks/8997-78a359d0d238622e.js +0 -1
  307. package/.next/static/chunks/app/_global-error/page-548a84d85e061550.js +0 -1
  308. package/.next/static/chunks/app/api/board-annotations/[id]/route-548a84d85e061550.js +0 -1
  309. package/.next/static/chunks/app/api/board-annotations/route-548a84d85e061550.js +0 -1
  310. package/.next/static/chunks/app/api/board-layout/route-548a84d85e061550.js +0 -1
  311. package/.next/static/chunks/app/api/bug-flags/[id]/route-548a84d85e061550.js +0 -1
  312. package/.next/static/chunks/app/api/bug-flags/route-548a84d85e061550.js +0 -1
  313. package/.next/static/chunks/app/api/code-graph/position/route-548a84d85e061550.js +0 -1
  314. package/.next/static/chunks/app/api/code-graph/route-548a84d85e061550.js +0 -1
  315. package/.next/static/chunks/app/api/context/feature/route-548a84d85e061550.js +0 -1
  316. package/.next/static/chunks/app/api/context/file/route-548a84d85e061550.js +0 -1
  317. package/.next/static/chunks/app/api/context/route-548a84d85e061550.js +0 -1
  318. package/.next/static/chunks/app/api/db/arrange/route-548a84d85e061550.js +0 -1
  319. package/.next/static/chunks/app/api/db/backfill-access/route-548a84d85e061550.js +0 -1
  320. package/.next/static/chunks/app/api/db/position/route-548a84d85e061550.js +0 -1
  321. package/.next/static/chunks/app/api/db/prune-planned/route-548a84d85e061550.js +0 -1
  322. package/.next/static/chunks/app/api/db/reconcile-endpoints/route-548a84d85e061550.js +0 -1
  323. package/.next/static/chunks/app/api/db/relations/[id]/route-548a84d85e061550.js +0 -1
  324. package/.next/static/chunks/app/api/db/tables/[id]/route-548a84d85e061550.js +0 -1
  325. package/.next/static/chunks/app/api/draft/approve/route-548a84d85e061550.js +0 -1
  326. package/.next/static/chunks/app/api/draft/route-548a84d85e061550.js +0 -1
  327. package/.next/static/chunks/app/api/draft/status/route-548a84d85e061550.js +0 -1
  328. package/.next/static/chunks/app/api/edges/[id]/route-548a84d85e061550.js +0 -1
  329. package/.next/static/chunks/app/api/edges/route-548a84d85e061550.js +0 -1
  330. package/.next/static/chunks/app/api/endpoints/[id]/route-548a84d85e061550.js +0 -1
  331. package/.next/static/chunks/app/api/entities/route-548a84d85e061550.js +0 -1
  332. package/.next/static/chunks/app/api/feedback/[id]/route-548a84d85e061550.js +0 -1
  333. package/.next/static/chunks/app/api/feedback/[id]/vote/route-548a84d85e061550.js +0 -1
  334. package/.next/static/chunks/app/api/feedback/route-548a84d85e061550.js +0 -1
  335. package/.next/static/chunks/app/api/flags/route-548a84d85e061550.js +0 -1
  336. package/.next/static/chunks/app/api/ingest/route-548a84d85e061550.js +0 -1
  337. package/.next/static/chunks/app/api/init/route-548a84d85e061550.js +0 -1
  338. package/.next/static/chunks/app/api/map/describe/route-548a84d85e061550.js +0 -1
  339. package/.next/static/chunks/app/api/map/files/route-548a84d85e061550.js +0 -1
  340. package/.next/static/chunks/app/api/map/finish/route-548a84d85e061550.js +0 -1
  341. package/.next/static/chunks/app/api/map/route-548a84d85e061550.js +0 -1
  342. package/.next/static/chunks/app/api/map/start/route-548a84d85e061550.js +0 -1
  343. package/.next/static/chunks/app/api/map/touch-active/route-548a84d85e061550.js +0 -1
  344. package/.next/static/chunks/app/api/mention-search/route-548a84d85e061550.js +0 -1
  345. package/.next/static/chunks/app/api/nodes/[id]/position/route-548a84d85e061550.js +0 -1
  346. package/.next/static/chunks/app/api/nodes/[id]/route-548a84d85e061550.js +0 -1
  347. package/.next/static/chunks/app/api/nodes/positions/route-548a84d85e061550.js +0 -1
  348. package/.next/static/chunks/app/api/nodes/route-548a84d85e061550.js +0 -1
  349. package/.next/static/chunks/app/api/nodes/subtasks/route-548a84d85e061550.js +0 -1
  350. package/.next/static/chunks/app/api/notes/[id]/route-548a84d85e061550.js +0 -1
  351. package/.next/static/chunks/app/api/notes/route-548a84d85e061550.js +0 -1
  352. package/.next/static/chunks/app/api/open/route-548a84d85e061550.js +0 -1
  353. package/.next/static/chunks/app/api/plan/annotations/route-548a84d85e061550.js +0 -1
  354. package/.next/static/chunks/app/api/plan/approve/route-548a84d85e061550.js +0 -1
  355. package/.next/static/chunks/app/api/plan/history/route-548a84d85e061550.js +0 -1
  356. package/.next/static/chunks/app/api/plan/markdown/route-548a84d85e061550.js +0 -1
  357. package/.next/static/chunks/app/api/plan/presence/route-548a84d85e061550.js +0 -1
  358. package/.next/static/chunks/app/api/plan/route-548a84d85e061550.js +0 -1
  359. package/.next/static/chunks/app/api/plan/verdict/route-548a84d85e061550.js +0 -1
  360. package/.next/static/chunks/app/api/preferences/route-548a84d85e061550.js +0 -1
  361. package/.next/static/chunks/app/api/project-meta/route-548a84d85e061550.js +0 -1
  362. package/.next/static/chunks/app/api/reset/route-548a84d85e061550.js +0 -1
  363. package/.next/static/chunks/app/api/scope-guard/check/route-548a84d85e061550.js +0 -1
  364. package/.next/static/chunks/app/api/share/create/route-548a84d85e061550.js +0 -1
  365. package/.next/static/chunks/app/api/share/route-548a84d85e061550.js +0 -1
  366. package/.next/static/chunks/app/api/stream/route-548a84d85e061550.js +0 -1
  367. package/.next/static/chunks/app/api/tab/nav/route-548a84d85e061550.js +0 -1
  368. package/.next/static/chunks/app/api/tab/presence/route-548a84d85e061550.js +0 -1
  369. package/.next/static/chunks/app/api/telemetry/route-548a84d85e061550.js +0 -1
  370. package/.next/static/chunks/app/api/telemetry/stats/route-548a84d85e061550.js +0 -1
  371. package/.next/static/chunks/app/api/version/route-548a84d85e061550.js +0 -1
  372. package/.next/static/chunks/app/api/workspace/activate/route-548a84d85e061550.js +0 -1
  373. package/.next/static/chunks/app/api/workspace/route-548a84d85e061550.js +0 -1
  374. package/.next/static/chunks/app/layout-3115f8503ff00902.js +0 -1
  375. package/.next/static/chunks/app/map/page-491d4767dbc4e954.js +0 -1
  376. package/.next/static/chunks/app/page-d08947a671077569.js +0 -1
  377. package/.next/static/chunks/app/plan/page-a90e0981499546e3.js +0 -1
  378. package/.next/static/chunks/app/s/[token]/page-5c8f260e75758b02.js +0 -1
  379. package/.next/static/chunks/app/settings/page-7e176d120b1effa9.js +0 -1
  380. package/.next/static/chunks/next/dist/client/components/builtin/app-error-548a84d85e061550.js +0 -1
  381. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-548a84d85e061550.js +0 -1
  382. package/.next/static/chunks/next/dist/client/components/builtin/not-found-548a84d85e061550.js +0 -1
  383. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-548a84d85e061550.js +0 -1
  384. package/.next/static/css/490566ec68a48e1a.css +0 -1
  385. package/.next/static/qoq7TibU72duRZATxeVnT/_buildManifest.js +0 -1
  386. /package/.next/static/{qoq7TibU72duRZATxeVnT → P3uXQySdS-m6_bxuiezYe}/_ssgManifest.js +0 -0
@@ -0,0 +1,87 @@
1
+ // File: /home/runner/work/beacon/beacon/app/learn/page.tsx
2
+ import * as entry from '../../../../app/learn/page.js'
3
+ import type { ResolvingMetadata, ResolvingViewport } from 'next/dist/lib/metadata/types/metadata-interface.js'
4
+
5
+ import type { InstantConfigForTypeCheckInternal } from 'next/dist/build/segment-config/app/app-segment-config.js'
6
+
7
+ type TEntry = typeof import('../../../../app/learn/page.js')
8
+
9
+ type SegmentParams<T extends Object = any> = T extends Record<string, any>
10
+ ? { [K in keyof T]: T[K] extends string ? string | string[] | undefined : never }
11
+ : T
12
+
13
+ // Check that the entry is a valid entry
14
+ checkFields<Diff<{
15
+ default: Function
16
+ config?: {}
17
+ generateStaticParams?: Function
18
+ unstable_instant?: InstantConfigForTypeCheckInternal
19
+ unstable_dynamicStaleTime?: number
20
+ revalidate?: RevalidateRange<TEntry> | false
21
+ dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static'
22
+ dynamicParams?: boolean
23
+ fetchCache?: 'auto' | 'force-no-store' | 'only-no-store' | 'default-no-store' | 'default-cache' | 'only-cache' | 'force-cache'
24
+ preferredRegion?: 'auto' | 'global' | 'home' | string | string[]
25
+ runtime?: 'nodejs' | 'experimental-edge' | 'edge'
26
+ maxDuration?: number
27
+
28
+ metadata?: any
29
+ generateMetadata?: Function
30
+ viewport?: any
31
+ generateViewport?: Function
32
+
33
+ }, TEntry, ''>>()
34
+
35
+
36
+ // Check the prop type of the entry function
37
+ checkFields<Diff<PageProps, FirstArg<TEntry['default']>, 'default'>>()
38
+
39
+ // Check the arguments and return type of the generateMetadata function
40
+ if ('generateMetadata' in entry) {
41
+ checkFields<Diff<PageProps, FirstArg<MaybeField<TEntry, 'generateMetadata'>>, 'generateMetadata'>>()
42
+ checkFields<Diff<ResolvingMetadata, SecondArg<MaybeField<TEntry, 'generateMetadata'>>, 'generateMetadata'>>()
43
+ }
44
+
45
+ // Check the arguments and return type of the generateViewport function
46
+ if ('generateViewport' in entry) {
47
+ checkFields<Diff<PageProps, FirstArg<MaybeField<TEntry, 'generateViewport'>>, 'generateViewport'>>()
48
+ checkFields<Diff<ResolvingViewport, SecondArg<MaybeField<TEntry, 'generateViewport'>>, 'generateViewport'>>()
49
+ }
50
+
51
+ // Check the arguments and return type of the generateStaticParams function
52
+ if ('generateStaticParams' in entry) {
53
+ checkFields<Diff<{ params: SegmentParams }, FirstArg<MaybeField<TEntry, 'generateStaticParams'>>, 'generateStaticParams'>>()
54
+ checkFields<Diff<{ __tag__: 'generateStaticParams', __return_type__: any[] | Promise<any[]> }, { __tag__: 'generateStaticParams', __return_type__: ReturnType<MaybeField<TEntry, 'generateStaticParams'>> }>>()
55
+ }
56
+
57
+ export interface PageProps {
58
+ params?: Promise<SegmentParams>
59
+ searchParams?: Promise<any>
60
+ }
61
+ export interface LayoutProps {
62
+ children?: React.ReactNode
63
+
64
+ params?: Promise<SegmentParams>
65
+ }
66
+
67
+ // =============
68
+ // Utility types
69
+ type RevalidateRange<T> = T extends { revalidate: any } ? NonNegative<T['revalidate']> : never
70
+
71
+ // If T is unknown or any, it will be an empty {} type. Otherwise, it will be the same as Omit<T, keyof Base>.
72
+ type OmitWithTag<T, K extends keyof any, _M> = Omit<T, K>
73
+ type Diff<Base, T extends Base, Message extends string = ''> = 0 extends (1 & T) ? {} : OmitWithTag<T, keyof Base, Message>
74
+
75
+ type FirstArg<T extends Function> = T extends (...args: [infer T, any]) => any ? unknown extends T ? any : T : never
76
+ type SecondArg<T extends Function> = T extends (...args: [any, infer T]) => any ? unknown extends T ? any : T : never
77
+ type MaybeField<T, K extends string> = T extends { [k in K]: infer G } ? G extends Function ? G : never : never
78
+
79
+
80
+
81
+ function checkFields<_ extends { [k in keyof any]: never }>() {}
82
+
83
+ // https://github.com/sindresorhus/type-fest
84
+ type Numeric = number | bigint
85
+ type Zero = 0 | 0n
86
+ type Negative<T extends Numeric> = T extends Zero ? never : `${T}` extends `-${string}` ? T : never
87
+ type NonNegative<T extends Numeric> = T extends Zero ? T : Negative<T> extends never ? T : '__invalid_negative_number__'
@@ -1,8 +1,8 @@
1
1
  // This file is generated automatically by Next.js
2
2
  // Do not edit this file manually
3
3
 
4
- type AppRoutes = "/" | "/docs" | "/feedback" | "/help" | "/map" | "/plan" | "/s/[token]" | "/settings"
5
- type AppRouteHandlerRoutes = "/api/board-annotations" | "/api/board-annotations/[id]" | "/api/board-layout" | "/api/bug-flags" | "/api/bug-flags/[id]" | "/api/code-graph" | "/api/code-graph/position" | "/api/context" | "/api/context/feature" | "/api/context/file" | "/api/db/arrange" | "/api/db/backfill-access" | "/api/db/position" | "/api/db/prune-planned" | "/api/db/reconcile-endpoints" | "/api/db/relations/[id]" | "/api/db/tables/[id]" | "/api/draft" | "/api/draft/approve" | "/api/draft/status" | "/api/edges" | "/api/edges/[id]" | "/api/endpoints/[id]" | "/api/entities" | "/api/feedback" | "/api/feedback/[id]" | "/api/feedback/[id]/vote" | "/api/flags" | "/api/ingest" | "/api/init" | "/api/map" | "/api/map/describe" | "/api/map/files" | "/api/map/finish" | "/api/map/start" | "/api/map/touch-active" | "/api/mention-search" | "/api/nodes" | "/api/nodes/[id]" | "/api/nodes/[id]/position" | "/api/nodes/positions" | "/api/nodes/subtasks" | "/api/notes" | "/api/notes/[id]" | "/api/open" | "/api/plan" | "/api/plan/annotations" | "/api/plan/approve" | "/api/plan/history" | "/api/plan/markdown" | "/api/plan/presence" | "/api/plan/verdict" | "/api/preferences" | "/api/project-meta" | "/api/reset" | "/api/scope-guard/check" | "/api/share" | "/api/share/create" | "/api/stream" | "/api/tab/nav" | "/api/tab/presence" | "/api/telemetry" | "/api/telemetry/stats" | "/api/version" | "/api/workspace" | "/api/workspace/activate"
4
+ type AppRoutes = "/" | "/docs" | "/feedback" | "/help" | "/learn" | "/map" | "/plan" | "/s/[token]" | "/settings"
5
+ type AppRouteHandlerRoutes = "/api/board-annotations" | "/api/board-annotations/[id]" | "/api/board-layout" | "/api/bug-flags" | "/api/bug-flags/[id]" | "/api/code-graph" | "/api/code-graph/position" | "/api/context" | "/api/context/feature" | "/api/context/file" | "/api/db/arrange" | "/api/db/backfill-access" | "/api/db/position" | "/api/db/prune-planned" | "/api/db/reconcile-endpoints" | "/api/db/relations/[id]" | "/api/db/tables/[id]" | "/api/draft" | "/api/draft/approve" | "/api/draft/status" | "/api/edges" | "/api/edges/[id]" | "/api/endpoints/[id]" | "/api/entities" | "/api/feedback" | "/api/feedback/[id]" | "/api/feedback/[id]/vote" | "/api/flags" | "/api/ingest" | "/api/init" | "/api/lesson" | "/api/lesson/close" | "/api/lesson/presence" | "/api/lesson/questions" | "/api/lesson/save" | "/api/lesson/verdict" | "/api/map" | "/api/map/describe" | "/api/map/files" | "/api/map/finish" | "/api/map/start" | "/api/map/touch-active" | "/api/mention-search" | "/api/nodes" | "/api/nodes/[id]" | "/api/nodes/[id]/position" | "/api/nodes/positions" | "/api/nodes/subtasks" | "/api/notes" | "/api/notes/[id]" | "/api/open" | "/api/plan" | "/api/plan/annotations" | "/api/plan/approve" | "/api/plan/history" | "/api/plan/markdown" | "/api/plan/presence" | "/api/plan/verdict" | "/api/preferences" | "/api/project-meta" | "/api/reset" | "/api/scope-guard/check" | "/api/share" | "/api/share/create" | "/api/stream" | "/api/tab/nav" | "/api/tab/presence" | "/api/telemetry" | "/api/telemetry/stats" | "/api/version" | "/api/workspace" | "/api/workspace/activate"
6
6
  type PageRoutes = never
7
7
  type LayoutRoutes = "/"
8
8
  type RedirectRoutes = never
@@ -42,6 +42,12 @@ interface ParamMap {
42
42
  "/api/flags": {}
43
43
  "/api/ingest": {}
44
44
  "/api/init": {}
45
+ "/api/lesson": {}
46
+ "/api/lesson/close": {}
47
+ "/api/lesson/presence": {}
48
+ "/api/lesson/questions": {}
49
+ "/api/lesson/save": {}
50
+ "/api/lesson/verdict": {}
45
51
  "/api/map": {}
46
52
  "/api/map/describe": {}
47
53
  "/api/map/files": {}
@@ -81,6 +87,7 @@ interface ParamMap {
81
87
  "/docs": {}
82
88
  "/feedback": {}
83
89
  "/help": {}
90
+ "/learn": {}
84
91
  "/map": {}
85
92
  "/plan": {}
86
93
  "/s/[token]": { "token": string; }
@@ -74,6 +74,15 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
74
74
  type __Unused = __Check
75
75
  }
76
76
 
77
+ // Validate ../../app/learn/page.tsx
78
+ {
79
+ type __IsExpected<Specific extends AppPageConfig<"/learn">> = Specific
80
+ const handler = {} as typeof import("../../app/learn/page.js")
81
+ type __Check = __IsExpected<typeof handler>
82
+ // @ts-ignore
83
+ type __Unused = __Check
84
+ }
85
+
77
86
  // Validate ../../app/map/page.tsx
78
87
  {
79
88
  type __IsExpected<Specific extends AppPageConfig<"/map">> = Specific
@@ -389,6 +398,60 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
389
398
  type __Unused = __Check
390
399
  }
391
400
 
401
+ // Validate ../../app/api/lesson/close/route.ts
402
+ {
403
+ type __IsExpected<Specific extends RouteHandlerConfig<"/api/lesson/close">> = Specific
404
+ const handler = {} as typeof import("../../app/api/lesson/close/route.js")
405
+ type __Check = __IsExpected<typeof handler>
406
+ // @ts-ignore
407
+ type __Unused = __Check
408
+ }
409
+
410
+ // Validate ../../app/api/lesson/presence/route.ts
411
+ {
412
+ type __IsExpected<Specific extends RouteHandlerConfig<"/api/lesson/presence">> = Specific
413
+ const handler = {} as typeof import("../../app/api/lesson/presence/route.js")
414
+ type __Check = __IsExpected<typeof handler>
415
+ // @ts-ignore
416
+ type __Unused = __Check
417
+ }
418
+
419
+ // Validate ../../app/api/lesson/questions/route.ts
420
+ {
421
+ type __IsExpected<Specific extends RouteHandlerConfig<"/api/lesson/questions">> = Specific
422
+ const handler = {} as typeof import("../../app/api/lesson/questions/route.js")
423
+ type __Check = __IsExpected<typeof handler>
424
+ // @ts-ignore
425
+ type __Unused = __Check
426
+ }
427
+
428
+ // Validate ../../app/api/lesson/route.ts
429
+ {
430
+ type __IsExpected<Specific extends RouteHandlerConfig<"/api/lesson">> = Specific
431
+ const handler = {} as typeof import("../../app/api/lesson/route.js")
432
+ type __Check = __IsExpected<typeof handler>
433
+ // @ts-ignore
434
+ type __Unused = __Check
435
+ }
436
+
437
+ // Validate ../../app/api/lesson/save/route.ts
438
+ {
439
+ type __IsExpected<Specific extends RouteHandlerConfig<"/api/lesson/save">> = Specific
440
+ const handler = {} as typeof import("../../app/api/lesson/save/route.js")
441
+ type __Check = __IsExpected<typeof handler>
442
+ // @ts-ignore
443
+ type __Unused = __Check
444
+ }
445
+
446
+ // Validate ../../app/api/lesson/verdict/route.ts
447
+ {
448
+ type __IsExpected<Specific extends RouteHandlerConfig<"/api/lesson/verdict">> = Specific
449
+ const handler = {} as typeof import("../../app/api/lesson/verdict/route.js")
450
+ type __Check = __IsExpected<typeof handler>
451
+ // @ts-ignore
452
+ type __Unused = __Check
453
+ }
454
+
392
455
  // Validate ../../app/api/map/describe/route.ts
393
456
  {
394
457
  type __IsExpected<Specific extends RouteHandlerConfig<"/api/map/describe">> = Specific
package/README.md CHANGED
@@ -57,7 +57,8 @@ beacon stop # stop the shared background server
57
57
  ```
58
58
 
59
59
  > Prefer Claude Code's plugin system? Add the marketplace and install the plugin instead:
60
- > `/plugin marketplace add wenzorithelly/beacon-plugin` then `/plugin install beacon@trybeacon`.
60
+ > `/plugin marketplace add wenzorithelly/beacon` then `/plugin install beacon@trybeacon`.
61
+ > (The plugin ships inside the `trybeacon` npm package — same artifacts, no separate repo.)
61
62
 
62
63
  One shared Beacon server (daemon) serves every repo you open; each repo keeps its own data in
63
64
  `~/.beacon/<id>/` (override the root with `BEACON_HOME`). On first run in a repo, run
@@ -1,22 +1,22 @@
1
1
  #!/usr/bin/env bun
2
2
  // @bun
3
- var uZ=Object.defineProperty;var RZ=(Q)=>Q;function gZ(Q,Z){this[Q]=RZ.bind(null,Z)}var BQ=(Q,Z)=>{for(var $ in Z)uZ(Q,$,{get:Z[$],enumerable:!0,configurable:!0,set:gZ.bind(Z,$)})};var F=(Q,Z)=>()=>(Q&&(Z=Q(Q=0)),Z);var m0=1500,p0=480000,c0=1800000,k=3600000,l0=3000;var pQ=()=>{};var KQ={};BQ(KQ,{removeRepoAssets:()=>_Z,installRefreshSkill:()=>IZ,installPlanSkill:()=>DZ,installInitSkill:()=>EZ,installCodexRepoSkills:()=>yZ,ensureWorkflowDoc:()=>AZ,ensureMcp:()=>bZ,auditRepo:()=>xQ,REFRESH_SKILL:()=>PQ,PLAN_SKILL:()=>lQ,INIT_SKILL:()=>NQ});import{existsSync as u,mkdirSync as h,readFileSync as K,rmSync as S,writeFileSync as P}from"fs";import{join as U}from"path";function EZ(Q){let Z=U(Q,".claude","skills","beacon-init");h(Z,{recursive:!0});let $=U(Z,"SKILL.md");return P($,NQ),$}function IZ(Q){let Z=U(Q,".claude","skills","beacon-refresh");h(Z,{recursive:!0});let $=U(Z,"SKILL.md");return P($,PQ),$}function DZ(Q){let Z=U(Q,".claude","skills","beacon-plan");h(Z,{recursive:!0});let $=U(Z,"SKILL.md");return P($,lQ),$}function yZ(Q){let Z=[];for(let $ of OZ){let J=U(Q,".agents","skills",$.name);h(J,{recursive:!0});let Y=U(J,"SKILL.md");P(Y,$.body()),Z.push(Y)}return Z}function AZ(Q){let Z=U(Q,"AGENTS.md"),$="";try{$=K(Z,"utf8")}catch{}let J=new RegExp(`${m}[\\s\\S]*?${GQ}`);$=J.test($)?$.replace(J,cQ):`${$.trim()}
3
+ var RZ=Object.defineProperty;var gZ=(Q)=>Q;function EZ(Q,Z){this[Q]=gZ.bind(null,Z)}var BQ=(Q,Z)=>{for(var $ in Z)RZ(Q,$,{get:Z[$],enumerable:!0,configurable:!0,set:EZ.bind(Z,$)})};var u=(Q,Z)=>()=>(Q&&(Z=Q(Q=0)),Z);var c0=1500,l0=480000,n0=1800000,S=3600000,s0=3000;var pQ=()=>{};var KQ={};BQ(KQ,{removeRepoAssets:()=>LZ,installRefreshSkill:()=>IZ,installPlanSkill:()=>OZ,installInitSkill:()=>DZ,installExplainSkill:()=>yZ,installCodexRepoSkills:()=>bZ,ensureWorkflowDoc:()=>_Z,ensureMcp:()=>kZ,auditRepo:()=>xQ,REFRESH_SKILL:()=>PQ,PLAN_SKILL:()=>lQ,INIT_SKILL:()=>NQ,EXPLAIN_SKILL:()=>nQ});import{existsSync as F,mkdirSync as D,readFileSync as K,rmSync as h,writeFileSync as N}from"fs";import{join as X}from"path";function DZ(Q){let Z=X(Q,".claude","skills","beacon-init");D(Z,{recursive:!0});let $=X(Z,"SKILL.md");return N($,NQ),$}function IZ(Q){let Z=X(Q,".claude","skills","beacon-refresh");D(Z,{recursive:!0});let $=X(Z,"SKILL.md");return N($,PQ),$}function OZ(Q){let Z=X(Q,".claude","skills","beacon-plan");D(Z,{recursive:!0});let $=X(Z,"SKILL.md");return N($,lQ),$}function yZ(Q){let Z=X(Q,".claude","skills","beacon-explain");D(Z,{recursive:!0});let $=X(Z,"SKILL.md");return N($,nQ),$}function bZ(Q){let Z=[];for(let $ of AZ){let J=X(Q,".agents","skills",$.name);D(J,{recursive:!0});let Y=X(J,"SKILL.md");N(Y,$.body()),Z.push(Y)}return Z}function _Z(Q){let Z=X(Q,"AGENTS.md"),$="";try{$=K(Z,"utf8")}catch{}let J=new RegExp(`${m}[\\s\\S]*?${GQ}`);$=J.test($)?$.replace(J,cQ):`${$.trim()}
4
4
 
5
5
  ${cQ}
6
- `.trimStart(),P(Z,$.endsWith(`
6
+ `.trimStart(),N(Z,$.endsWith(`
7
7
  `)?$:`${$}
8
- `);let Y=U(Q,"CLAUDE.md"),V="";try{V=K(Y,"utf8")}catch{}if(!/@AGENTS\.md/.test(V))P(Y,`${V?`${V.trim()}
8
+ `);let Y=X(Q,"CLAUDE.md"),V="";try{V=K(Y,"utf8")}catch{}if(!/@AGENTS\.md/.test(V))N(Y,`${V?`${V.trim()}
9
9
 
10
10
  `:""}@AGENTS.md
11
- `)}function bZ(Q){let Z=U(Q,".mcp.json"),$={};try{$=JSON.parse(K(Z,"utf8"))}catch{}$.mcpServers=$.mcpServers??{};let J=$.mcpServers.beacon;if(J){if(!J.timeout||J.timeout<k)return J.timeout=k,P(Z,JSON.stringify($,null,2)+`
12
- `),{path:Z,added:!1,updated:!0};return{path:Z,added:!1,updated:!1}}return $.mcpServers.beacon={command:"beacon",args:["mcp"],timeout:k},P(Z,JSON.stringify($,null,2)+`
13
- `),{path:Z,added:!0,updated:!1}}function xQ(Q){let Z=U(Q,".mcp.json"),$=!1;try{$=!!JSON.parse(K(Z,"utf8")).mcpServers?.beacon}catch{}let J=!1;try{J=K(U(Q,"AGENTS.md"),"utf8").includes(m)}catch{}let Y=!1;try{Y=/@AGENTS\.md/.test(K(U(Q,"CLAUDE.md"),"utf8"))}catch{}return{repo:Q,mcpRegistered:$,agentsMdBlock:J,claudeMdImport:Y,skills:{"beacon-init":u(U(Q,".claude","skills","beacon-init","SKILL.md")),"beacon-refresh":u(U(Q,".claude","skills","beacon-refresh","SKILL.md"))},codexSkills:{"beacon-init":u(U(Q,".agents","skills","beacon-init","SKILL.md")),"beacon-refresh":u(U(Q,".agents","skills","beacon-refresh","SKILL.md"))}}}function _Z(Q){let Z=[];for(let z of["beacon-init","beacon-refresh","beacon-db-design"]){let v=U(Q,".claude","skills",z);if(u(v))S(v,{recursive:!0,force:!0}),Z.push(z)}for(let z of["beacon-init","beacon-refresh"]){let v=U(Q,".agents","skills",z);if(u(v))S(v,{recursive:!0,force:!0}),Z.push(`codex:${z}`)}let $=!1,J=U(Q,".mcp.json");try{let z=JSON.parse(K(J,"utf8"));if(z.mcpServers?.beacon){if(delete z.mcpServers.beacon,$=!0,z.mcpServers&&Object.keys(z.mcpServers).length===0)delete z.mcpServers;if(Object.keys(z).length===0)S(J,{force:!0});else P(J,JSON.stringify(z,null,2)+`
14
- `)}}catch{}let Y=!1,V=U(Q,"AGENTS.md");try{let z=K(V,"utf8"),v=new RegExp(`\\n?${m}[\\s\\S]*?${GQ}\\n?`);if(v.test(z)){let vQ=z.replace(v,`
11
+ `)}function kZ(Q){let Z=X(Q,".mcp.json"),$={};try{$=JSON.parse(K(Z,"utf8"))}catch{}$.mcpServers=$.mcpServers??{};let J=$.mcpServers.beacon;if(J){if(!J.timeout||J.timeout<S)return J.timeout=S,N(Z,JSON.stringify($,null,2)+`
12
+ `),{path:Z,added:!1,updated:!0};return{path:Z,added:!1,updated:!1}}return $.mcpServers.beacon={command:"beacon",args:["mcp"],timeout:S},N(Z,JSON.stringify($,null,2)+`
13
+ `),{path:Z,added:!0,updated:!1}}function xQ(Q){let Z=X(Q,".mcp.json"),$=!1;try{$=!!JSON.parse(K(Z,"utf8")).mcpServers?.beacon}catch{}let J=!1;try{J=K(X(Q,"AGENTS.md"),"utf8").includes(m)}catch{}let Y=!1;try{Y=/@AGENTS\.md/.test(K(X(Q,"CLAUDE.md"),"utf8"))}catch{}return{repo:Q,mcpRegistered:$,agentsMdBlock:J,claudeMdImport:Y,skills:{"beacon-init":F(X(Q,".claude","skills","beacon-init","SKILL.md")),"beacon-refresh":F(X(Q,".claude","skills","beacon-refresh","SKILL.md"))},codexSkills:{"beacon-init":F(X(Q,".agents","skills","beacon-init","SKILL.md")),"beacon-refresh":F(X(Q,".agents","skills","beacon-refresh","SKILL.md"))}}}function LZ(Q){let Z=[];for(let z of["beacon-init","beacon-refresh","beacon-db-design"]){let U=X(Q,".claude","skills",z);if(F(U))h(U,{recursive:!0,force:!0}),Z.push(z)}for(let z of["beacon-init","beacon-refresh"]){let U=X(Q,".agents","skills",z);if(F(U))h(U,{recursive:!0,force:!0}),Z.push(`codex:${z}`)}let $=!1,J=X(Q,".mcp.json");try{let z=JSON.parse(K(J,"utf8"));if(z.mcpServers?.beacon){if(delete z.mcpServers.beacon,$=!0,z.mcpServers&&Object.keys(z.mcpServers).length===0)delete z.mcpServers;if(Object.keys(z).length===0)h(J,{force:!0});else N(J,JSON.stringify(z,null,2)+`
14
+ `)}}catch{}let Y=!1,V=X(Q,"AGENTS.md");try{let z=K(V,"utf8"),U=new RegExp(`\\n?${m}[\\s\\S]*?${GQ}\\n?`);if(U.test(z)){let vQ=z.replace(U,`
15
15
  `).replace(/\n{3,}/g,`
16
16
 
17
- `).trimStart();P(V,vQ.endsWith(`
17
+ `).trimStart();N(V,vQ.endsWith(`
18
18
  `)?vQ:`${vQ}
19
- `),Y=!0}}catch{}let q=!1,X=U(Q,"CLAUDE.md");try{let z=K(X,"utf8"),v=z.replace(/^[ \t]*@AGENTS\.md[ \t]*\n?/m,"");if(v!==z){if(!v.trim())S(X,{force:!0});else P(X,v);q=!0}}catch{}return{skillsRemoved:Z,mcpUnregistered:$,agentsBlockRemoved:Y,claudeImportRemoved:q}}var NQ=`---
19
+ `),Y=!0}}catch{}let q=!1,H=X(Q,"CLAUDE.md");try{let z=K(H,"utf8"),U=z.replace(/^[ \t]*@AGENTS\.md[ \t]*\n?/m,"");if(U!==z){if(!U.trim())h(H,{force:!0});else N(H,U);q=!0}}catch{}return{skillsRemoved:Z,mcpUnregistered:$,agentsBlockRemoved:Y,claudeImportRemoved:q}}var NQ=`---
20
20
  name: beacon-init
21
21
  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.
22
22
  ---
@@ -158,7 +158,70 @@ If it returns feedback, revise and call it again.
158
158
  If \`beacon_present_plan\` isn't available, the panel isn't wired here \u2014 fall back to ExitPlanMode
159
159
  with the same \`\`\`beacon block (Claude Code only; Codex has no ExitPlanMode), or tell the user to
160
160
  run \`beacon\` in this repo once.
161
- `,OZ,m="<!-- beacon:workflow:start -->",GQ="<!-- beacon:workflow:end -->",cQ;var p=F(()=>{pQ();OZ=[{name:"beacon-init",body:()=>NQ},{name:"beacon-refresh",body:()=>PQ}];cQ=`${m}
161
+ `,nQ=`---
162
+ name: beacon-explain
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".
164
+ ---
165
+
166
+ # Explain the codebase visually (/beacon-explain)
167
+
168
+ When the user wants to UNDERSTAND part of the code (not build something), don't dump prose in the
169
+ terminal and don't open a plan \u2014 plans are for building. Author an interactive **Lesson** and push it
170
+ with the \`beacon_explain\` MCP tool: a curated concept map (boxes + labeled arrows) beside a
171
+ plain-English narrative on Beacon's /learn page. The tool BLOCKS while the user reads, highlights text
172
+ to ask questions, and drops question notes; it returns their questions, you ANSWER and re-push, looping
173
+ until they Save the lesson. There is NO approve/discard \u2014 understanding, not building.
174
+
175
+ ## 1. Load context first \u2014 don't explain blind
176
+
177
+ Before writing, call \`beacon_context_for_feature\` / \`beacon_map\` and read the relevant files so the
178
+ lesson is accurate. Name real files, functions, tables, and endpoints \u2014 never vague descriptions.
179
+
180
+ ## 2. Write like a great teacher \u2014 the house style (this is the whole point)
181
+
182
+ Every lesson must read like a patient senior engineer explaining to a sharp newcomer:
183
+
184
+ - **Plain English, always.** Define any term the first time it appears. No unexplained jargon, no
185
+ wall of nouns.
186
+ - **Problem-first.** Open each component with the PROBLEM it solves \u2014 a concrete human scenario, the
187
+ tension that forced the design, then the decision and what it means. (e.g. "When a salesperson
188
+ confirms an order it must also land in the ERP \u2014 but the ERP can be slow or down, and you do *not*
189
+ want confirmation to hang. So the sync is *decoupled*: confirming succeeds immediately and the push
190
+ happens in the background, with retries.")
191
+ - **Concrete step-by-step flow.** Walk the real path as a numbered list. Each step is ONE clear
192
+ action and names the real identifier in backticks \u2014 file (\`order-placed-sync-erp.ts\`), function
193
+ (\`syncOrderToErpWorkflow\`), event (\`order.placed\`), column (\`erp_sync_record\`), value
194
+ (\`requires_human_action\`). Enumerate the cases (success / retryable / rejected / \u2026) with the plain
195
+ meaning of each.
196
+ - **Anticipate-and-answer "Why X?".** After the flow, add short sections that answer the confusions a
197
+ reader will actually have ("Why two status columns?", "Why is the ledger append-only?"). ALWAYS
198
+ explain why the alternative is worse ("claiming success could hide a real failure; claiming hard
199
+ failure could cause a duplicate order later").
200
+ - **A worked example with real data.** Show the mechanism running on one concrete case \u2014 ideally a
201
+ small markdown table of state transitions \u2014 and land the insight ("that's 8 rows for one order, and
202
+ that's the point").
203
+ - **Typographic discipline.** **Bold** the decisions, *italic* the concepts being introduced, and put
204
+ \`inline code\` around every real identifier \u2014 on /learn, backticked real file paths become clickable
205
+ to open in the user's editor.
206
+
207
+ ## 3. Map the prose to the board
208
+
209
+ Every component/flow you NAME in the narrative becomes a \`node\` (title + a one-line \`summary\` for its
210
+ face + a fuller \`detail\` + the real \`files\` it maps to). Every "A does X to B" becomes an \`edge\` with
211
+ a relationship VERB \u2014 one of: imports, calls, persists to, reads from, writes to, routes to, depends
212
+ on, emits, returns, contains, extends \u2014 never a bare line. Keep the resting set small (~4\u20137 nodes);
213
+ push depth into \`detail\`, not the node face. Supply \`steps\` for the guided walkthrough: the first step
214
+ is the overview (empty \`focusIds\`), then teach one node (or a few) per step in order, each with its
215
+ \`focusIds\`.
216
+
217
+ ## 4. Answer in the loop \u2014 don't stop after one round
218
+
219
+ \`beacon_explain\` returns the user's questions, each tagged \`[q:ID]\`. Answer EACH by calling
220
+ \`beacon_explain\` AGAIN with the SAME lesson plus \`answers: [{ questionId, answer }]\` (keyed by the id).
221
+ Every answer must ADD understanding (rationale, trade-off) \u2014 never just restate the question. Expand
222
+ the narrative or add nodes where it helps. Keep looping until the tool reports the user saved or closed
223
+ the lesson.
224
+ `,AZ,m="<!-- beacon:workflow:start -->",GQ="<!-- beacon:workflow:end -->",cQ;var p=u(()=>{pQ();AZ=[{name:"beacon-init",body:()=>NQ},{name:"beacon-refresh",body:()=>PQ}];cQ=`${m}
162
225
  ## Beacon \u2014 feature workflow
163
226
 
164
227
  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:
@@ -215,6 +278,10 @@ Beacon extracts it deterministically and **strips the block from the prose** (it
215
278
 
216
279
  **The board is built ONLY from the block \u2014 prose is NOT parsed.** If your plan describes ANY database models/tables/columns in the prose (e.g. "Model \`legal_precedent.py\` \u2014 natural key (court, \u2026)"), you MUST also put them in the block's \`tables\` array (with \`columns\`), or the /db tab will be empty for that plan. Same for endpoints (\`endpoints\` with \`uses:[{table,access}]\`) and features (\`features\`). A plan that lists five tables in prose but ships a block with only \`features\` renders an empty database board \u2014 exactly the "I described models but the DB tab is empty" failure. Mirror every DB entity you mention into the block.
217
280
 
281
+ ### 2c. Mark the files you mention \u2014 write repo-relative paths in backticks
282
+
283
+ When a plan, feature, or architecture-component description mentions a source file, write its **repo-relative path inside backticks** \u2014 \`app/api/plan/route.ts\`, not "the plan route". On the /plan canvas Beacon turns every backticked token that matches a REAL repo file into a clickable mention that opens it in the user's editor; a bare filename matching several files (e.g. \`route.ts\`) opens a pick-one dropdown of the same-named candidates. The match is deterministic against the live code graph, so a path that isn't a real file just stays plain text \u2014 there's no special syntax to learn and no downside to over-marking: always name files by their real path so the reader can jump straight to the code.
284
+
218
285
  ### 3. At the end, register the work \u2014 in ONE call
219
286
 
220
287
  Call \`beacon_feature({ action: "done" })\` **ONCE** with a \`features\` array \u2014 one entry per feature the plan created \u2014 each with the files you touched and a short markdown description. This flips each one to **Done** \u2014 including its sub-tasks (the cascade completes every PENDING/IN_PROGRESS child; a sub-task you did NOT finish must be set BLOCKED or CANCELLED before registering, so it survives visibly) \u2014 and keeps \`beacon_context_for_feature\` accurate for the next session.
@@ -226,18 +293,18 @@ Register them all in that single batched call. If a plan added five features, th
226
293
  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.
227
294
 
228
295
  Pull raw planning data anytime with \`beacon_entities\` (features / architecture / tables / endpoints).
229
- ${GQ}`});import{existsSync as c,mkdirSync as CQ,readdirSync as LZ,readFileSync as I,rmSync as kZ,writeFileSync as l}from"fs";import{dirname as nQ,join as w}from"path";function sQ(){return!!process.env.CLAUDE_PLUGIN_ROOT}function n(Q=process.env.HOME||process.env.USERPROFILE||""){if(!Q)return null;let Z=w(Q,".claude","plugins");if(!c(Z))return null;let $=[Z];for(let J=0;J<3&&$.length;J++){let Y=[];for(let V of $){let q=w(V,".claude-plugin","plugin.json");try{if(c(q)&&JSON.parse(I(q,"utf8")).name==="beacon")return V}catch{}try{for(let X of LZ(V,{withFileTypes:!0}))if(X.isDirectory())Y.push(w(V,X.name))}catch{}}$=Y}return null}function tQ(Q){return n(Q)!==null}function MQ(Q){try{return JSON.parse(I(Q,"utf8"))}catch{return{}}}function aQ(Q,Z){CQ(nQ(Q),{recursive:!0}),l(Q,JSON.stringify(Z,null,2)+`
230
- `)}function t(Q,Z){let $=MQ(Q);$.hooks=$.hooks??{},$.hooks[Z.event]=$.hooks[Z.event]??[];let J=$.hooks[Z.event];if(J.some((V)=>V.matcher===Z.matcher&&V.hooks?.some((q)=>q.command===Z.command)))return!1;return J.push({matcher:Z.matcher,hooks:[{type:"command",command:Z.command}]}),aQ(Q,$),!0}function a(Q,Z){return(MQ(Q).hooks?.[Z.event]??[]).some((Y)=>Y.hooks?.some((V)=>V.command===Z.command))}function d(Q,Z){let $=MQ(Q),J=$.hooks?.[Z.event];if(!J)return!1;let Y=!1,V=J.map((q)=>{let X=q.hooks?.length??0,z=(q.hooks??[]).filter((v)=>v.command!==Z.command);if(z.length!==X)Y=!0;return{...q,hooks:z}}).filter((q)=>(q.hooks??[]).length>0);if(!Y)return!1;if(V.length)$.hooks[Z.event]=V;else delete $.hooks[Z.event];if($.hooks&&Object.keys($.hooks).length===0)delete $.hooks;return aQ(Q,$),!0}function r(Q,Z,$,J){let Y=`${Z}
296
+ ${GQ}`});import{existsSync as c,mkdirSync as CQ,readdirSync as SZ,readFileSync as I,rmSync as hZ,writeFileSync as l}from"fs";import{dirname as sQ,join as w}from"path";function tQ(){return!!process.env.CLAUDE_PLUGIN_ROOT}function n(Q=process.env.HOME||process.env.USERPROFILE||""){if(!Q)return null;let Z=w(Q,".claude","plugins");if(!c(Z))return null;let $=[Z];for(let J=0;J<3&&$.length;J++){let Y=[];for(let V of $){let q=w(V,".claude-plugin","plugin.json");try{if(c(q)&&JSON.parse(I(q,"utf8")).name==="beacon")return V}catch{}try{for(let H of SZ(V,{withFileTypes:!0}))if(H.isDirectory())Y.push(w(V,H.name))}catch{}}$=Y}return null}function aQ(Q){return n(Q)!==null}function MQ(Q){try{return JSON.parse(I(Q,"utf8"))}catch{return{}}}function dQ(Q,Z){CQ(sQ(Q),{recursive:!0}),l(Q,JSON.stringify(Z,null,2)+`
297
+ `)}function t(Q,Z){let $=MQ(Q);$.hooks=$.hooks??{},$.hooks[Z.event]=$.hooks[Z.event]??[];let J=$.hooks[Z.event];if(J.some((V)=>V.matcher===Z.matcher&&V.hooks?.some((q)=>q.command===Z.command)))return!1;return J.push({matcher:Z.matcher,hooks:[{type:"command",command:Z.command}]}),dQ(Q,$),!0}function a(Q,Z){return(MQ(Q).hooks?.[Z.event]??[]).some((Y)=>Y.hooks?.some((V)=>V.command===Z.command))}function d(Q,Z){let $=MQ(Q),J=$.hooks?.[Z.event];if(!J)return!1;let Y=!1,V=J.map((q)=>{let H=q.hooks?.length??0,z=(q.hooks??[]).filter((U)=>U.command!==Z.command);if(z.length!==H)Y=!0;return{...q,hooks:z}}).filter((q)=>(q.hooks??[]).length>0);if(!Y)return!1;if(V.length)$.hooks[Z.event]=V;else delete $.hooks[Z.event];if($.hooks&&Object.keys($.hooks).length===0)delete $.hooks;return dQ(Q,$),!0}function r(Q,Z,$,J){let Y=`${Z}
231
298
  ${J.trim()}
232
299
  ${$}`,V="";try{V=I(Q,"utf8")}catch{}let q=new RegExp(`${Z}[\\s\\S]*?${$}`);V=q.test(V)?V.replace(q,Y):V.trim()?`${V.trim()}
233
300
 
234
301
  ${Y}
235
302
  `:`${Y}
236
- `,CQ(nQ(Q),{recursive:!0}),l(Q,V.endsWith(`
303
+ `,CQ(sQ(Q),{recursive:!0}),l(Q,V.endsWith(`
237
304
  `)?V:`${V}
238
- `)}function D(Q,Z){try{return I(Q,"utf8").includes(Z)}catch{return!1}}function o(Q,Z,$){let J="";try{J=I(Q,"utf8")}catch{return!1}let Y=new RegExp(`${Z}[\\s\\S]*?${$}\\n?`);if(!Y.test(J))return!1;let V=J.replace(Y,"").replace(/\n{3,}/g,`
305
+ `)}function O(Q,Z){try{return I(Q,"utf8").includes(Z)}catch{return!1}}function o(Q,Z,$){let J="";try{J=I(Q,"utf8")}catch{return!1}let Y=new RegExp(`${Z}[\\s\\S]*?${$}\\n?`);if(!Y.test(J))return!1;let V=J.replace(Y,"").replace(/\n{3,}/g,`
239
306
 
240
- `).trimStart();return l(Q,V),!0}function i(Q,Z,$){let J=w(Q,Z);CQ(J,{recursive:!0});let Y=w(J,"SKILL.md");return l(Y,$),Y}function O(Q,Z){return c(w(Q,Z,"SKILL.md"))}function e(Q,Z){let $=w(Q,Z);if(!c($))return!1;return kZ($,{recursive:!0,force:!0}),!0}var B,s=`## Beacon (visual planning panel)
307
+ `).trimStart();return l(Q,V),!0}function i(Q,Z,$){let J=w(Q,Z);CQ(J,{recursive:!0});let Y=w(J,"SKILL.md");return l(Y,$),Y}function y(Q,Z){return c(w(Q,Z,"SKILL.md"))}function e(Q,Z){let $=w(Q,Z);if(!c($))return!1;return hZ($,{recursive:!0,force:!0}),!0}var B,s=`## Beacon (visual planning panel)
241
308
 
242
309
  This machine has Beacon installed \u2014 a local visual planning surface for the terminal-side
243
310
  agent. Beacon proposes feature plans (roadmap features + DB schema + endpoints) via MCP,
@@ -251,6 +318,9 @@ the user reviews on a canvas at /plan, and feedback flows back as the next round
251
318
  - User asks to "refresh Beacon" / "update the map" / "bring Beacon up to date" \u2192 invoke
252
319
  the \`beacon-refresh\` skill. Re-surveys the repo and updates init-derived nodes while
253
320
  preserving anything the user added by hand.
321
+ - User asks to "explain" / "teach me" / "walk me through" / "how does X work" \u2192 if the
322
+ \`beacon_explain\` MCP tool is available, author an interactive Lesson (a concept map +
323
+ plain-English narrative on /learn the user questions back) via the \`beacon-explain\` skill.
254
324
  - Run \`beacon doctor\` to audit what's wired (global hooks, repo's .mcp.json, AGENTS.md block).
255
325
 
256
326
  **The plan feedback loop**
@@ -258,19 +328,19 @@ the user reviews on a canvas at /plan, and feedback flows back as the next round
258
328
  Feedback bundles inline annotations on the markdown PLUS any edits the user made directly
259
329
  on the /map and /db boards (added features, attached subtasks, edited columns, new
260
330
  endpoints). Treat board edits as the user's revision intent \u2014 re-propose matching them
261
- verbatim. Do NOT implement until the tool returns approval.`;var wQ=F(()=>{B=["beacon-init","beacon-refresh","beacon-plan"]});import{mkdirSync as SZ,renameSync as hZ,rmSync as mZ,writeFileSync as pZ}from"fs";import{dirname as cZ}from"path";function QQ(Q,Z){SZ(cZ(Q),{recursive:!0});let $=`${Q}.tmp`;try{pZ($,Z),hZ($,Q)}catch(J){throw mZ($,{force:!0}),J}}function Q1(Q,Z,$=!1){QQ(Q,JSON.stringify(Z,null,$?2:void 0))}var dQ=()=>{};var $Z={};BQ($Z,{setupCodexAssets:()=>sZ,removeCodexMcp:()=>ZZ,removeCodexArtifacts:()=>tZ,hasCodexMcp:()=>uQ,ensureCodexMcp:()=>QZ,codexMcpProblem:()=>RQ,codexDetected:()=>VQ,auditCodex:()=>gQ,CODEX_HOOKS:()=>f});import{readFileSync as YQ}from"fs";import{homedir as lZ}from"os";import{join as b}from"path";function rQ(){return process.env.HOME||process.env.USERPROFILE||lZ()}function VQ(){if(process.env.BEACON_CODEX==="1")return!0;if(process.env.BEACON_CODEX==="0")return!1;if(fQ===void 0)fQ=Bun.which("codex")!==null;return fQ}function A(Q){try{return Bun.TOML.parse(Q)}catch{return null}}function uQ(){try{return Boolean(A(YQ(R(),"utf8"))?.mcp_servers?.beacon)}catch{return!1}}function RQ(){let Q="";try{Q=YQ(R(),"utf8")}catch{return null}let Z=A(Q);if(!Z)return`~/.codex/config.toml does not parse \u2014 ${y}`;if(Z.mcp_servers?.beacon)return null;if(/^\s*mcp_servers\s*=/m.test(Q))return`mcp_servers is an inline table \u2014 ${y}`;return null}function QZ(){let Q="",Z=!1;try{Q=YQ(R(),"utf8"),Z=!0}catch{}if(Z){let V=A(Q);if(!V)return{added:!1,error:`~/.codex/config.toml does not parse \u2014 ${y}`};if(V.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 ${y}`}}let $=!Q?"":Q.endsWith(`
331
+ verbatim. Do NOT implement until the tool returns approval.`;var wQ=u(()=>{B=["beacon-init","beacon-refresh","beacon-plan","beacon-explain"]});import{mkdirSync as mZ,renameSync as pZ,rmSync as cZ,writeFileSync as lZ}from"fs";import{dirname as nZ}from"path";function QQ(Q,Z){mZ(nZ(Q),{recursive:!0});let $=`${Q}.tmp`;try{lZ($,Z),pZ($,Q)}catch(J){throw cZ($,{force:!0}),J}}function $1(Q,Z,$=!1){QQ(Q,JSON.stringify(Z,null,$?2:void 0))}var rQ=()=>{};var JZ={};BQ(JZ,{setupCodexAssets:()=>aZ,removeCodexMcp:()=>$Z,removeCodexArtifacts:()=>dZ,hasCodexMcp:()=>FQ,ensureCodexMcp:()=>ZZ,codexMcpProblem:()=>RQ,codexDetected:()=>VQ,auditCodex:()=>gQ,CODEX_HOOKS:()=>f});import{readFileSync as YQ}from"fs";import{homedir as sZ}from"os";import{join as _}from"path";function oQ(){return process.env.HOME||process.env.USERPROFILE||sZ()}function VQ(){if(process.env.BEACON_CODEX==="1")return!0;if(process.env.BEACON_CODEX==="0")return!1;if(fQ===void 0)fQ=Bun.which("codex")!==null;return fQ}function b(Q){try{return Bun.TOML.parse(Q)}catch{return null}}function FQ(){try{return Boolean(b(YQ(R(),"utf8"))?.mcp_servers?.beacon)}catch{return!1}}function RQ(){let Q="";try{Q=YQ(R(),"utf8")}catch{return null}let Z=b(Q);if(!Z)return`~/.codex/config.toml does not parse \u2014 ${A}`;if(Z.mcp_servers?.beacon)return null;if(/^\s*mcp_servers\s*=/m.test(Q))return`mcp_servers is an inline table \u2014 ${A}`;return null}function ZZ(){let Q="",Z=!1;try{Q=YQ(R(),"utf8"),Z=!0}catch{}if(Z){let V=b(Q);if(!V)return{added:!1,error:`~/.codex/config.toml does not parse \u2014 ${A}`};if(V.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 ${A}`}}let $=!Q?"":Q.endsWith(`
262
332
  `)?`
263
333
  `:`
264
334
 
265
- `,J=Q+$+nZ;if(A(J)?.mcp_servers?.beacon?.command!=="beacon")return{added:!1,error:`could not safely append [mcp_servers.beacon] \u2014 ${y}`};return QQ(R(),J),{added:!0}}function ZZ(){let Q="";try{Q=YQ(R(),"utf8")}catch{return{removed:!1}}let Z=Q.split(`
266
- `),$=Z.indexOf(iQ);if($===-1)return{removed:!1,skipped:uQ()};let J=Z.indexOf(eQ,$);if(J===-1)return{removed:!1,skipped:!0};Z.splice($,J-$+1);let Y=Z.join(`
335
+ `,J=Q+$+tZ;if(b(J)?.mcp_servers?.beacon?.command!=="beacon")return{added:!1,error:`could not safely append [mcp_servers.beacon] \u2014 ${A}`};return QQ(R(),J),{added:!0}}function $Z(){let Q="";try{Q=YQ(R(),"utf8")}catch{return{removed:!1}}let Z=Q.split(`
336
+ `),$=Z.indexOf(eQ);if($===-1)return{removed:!1,skipped:FQ()};let J=Z.indexOf(QZ,$);if(J===-1)return{removed:!1,skipped:!0};Z.splice($,J-$+1);let Y=Z.join(`
267
337
  `).replace(/\n{3,}/g,`
268
338
 
269
- `).replace(/^\n+/,"");if(A(Y)===null)return{removed:!1,skipped:!0};return QQ(R(),Y),{removed:!0}}async function sZ(){let{INIT_SKILL:Q,REFRESH_SKILL:Z,PLAN_SKILL:$}=await Promise.resolve().then(() => (p(),KQ)),J={"beacon-init":Q,"beacon-refresh":Z,"beacon-plan":$},Y=[];for(let z of B){if(!O($Q(),z))Y.push(z);i($Q(),z,J[z])}let V=0;for(let z of f)if(t(FQ(),{event:z.event,matcher:z.matcher,command:z.command}))V++;let q=D(ZQ(),JQ);r(ZQ(),JQ,oQ,s);let X=QZ();return{skillsAdded:Y,hooksAdded:V,agentsMdBlockTouched:!q,mcp:X}}function gQ(){let Q={};for(let $ of B)Q[$]=O($Q(),$);let Z={};for(let $ of f)Z[$.event]=a(FQ(),{event:$.event,command:$.command});return{detected:VQ(),skills:Q,hooks:Z,agentsMdBlock:D(ZQ(),JQ),mcp:uQ()}}function tZ(){let Q=[];for(let Y of B)if(e($Q(),Y))Q.push(Y);let Z=0;for(let Y of f)if(d(FQ(),{event:Y.event,command:Y.command}))Z++;let $=o(ZQ(),JQ,oQ),J=ZZ();return{skillsRemoved:Q,hooksRemoved:Z,agentsMdBlockRemoved:$,mcpRemoved:J.removed,mcpSkipped:J.skipped}}var TQ=()=>b(rQ(),".codex"),FQ=()=>b(TQ(),"hooks.json"),R=()=>b(TQ(),"config.toml"),ZQ=()=>b(TQ(),"AGENTS.md"),$Q=()=>b(rQ(),".agents","skills"),JQ="<!-- beacon:global:start -->",oQ="<!-- beacon:global:end -->",f,fQ,iQ="# beacon:start (managed by Beacon \u2014 `beacon uninstall` removes this block)",eQ="# beacon:end",nZ,y="add it manually: codex mcp add beacon -- beacon mcp";var EQ=F(()=>{wQ();dQ();f=[{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."}];nZ=`${iQ}
339
+ `).replace(/^\n+/,"");if(b(Y)===null)return{removed:!1,skipped:!0};return QQ(R(),Y),{removed:!0}}async function aZ(){let{INIT_SKILL:Q,REFRESH_SKILL:Z,PLAN_SKILL:$,EXPLAIN_SKILL:J}=await Promise.resolve().then(() => (p(),KQ)),Y={"beacon-init":Q,"beacon-refresh":Z,"beacon-plan":$,"beacon-explain":J},V=[];for(let U of B){if(!y($Q(),U))V.push(U);i($Q(),U,Y[U])}let q=0;for(let U of f)if(t(uQ(),{event:U.event,matcher:U.matcher,command:U.command}))q++;let H=O(ZQ(),JQ);r(ZQ(),JQ,iQ,s);let z=ZZ();return{skillsAdded:V,hooksAdded:q,agentsMdBlockTouched:!H,mcp:z}}function gQ(){let Q={};for(let $ of B)Q[$]=y($Q(),$);let Z={};for(let $ of f)Z[$.event]=a(uQ(),{event:$.event,command:$.command});return{detected:VQ(),skills:Q,hooks:Z,agentsMdBlock:O(ZQ(),JQ),mcp:FQ()}}function dZ(){let Q=[];for(let Y of B)if(e($Q(),Y))Q.push(Y);let Z=0;for(let Y of f)if(d(uQ(),{event:Y.event,command:Y.command}))Z++;let $=o(ZQ(),JQ,iQ),J=$Z();return{skillsRemoved:Q,hooksRemoved:Z,agentsMdBlockRemoved:$,mcpRemoved:J.removed,mcpSkipped:J.skipped}}var TQ=()=>_(oQ(),".codex"),uQ=()=>_(TQ(),"hooks.json"),R=()=>_(TQ(),"config.toml"),ZQ=()=>_(TQ(),"AGENTS.md"),$Q=()=>_(oQ(),".agents","skills"),JQ="<!-- beacon:global:start -->",iQ="<!-- beacon:global:end -->",f,fQ,eQ="# beacon:start (managed by Beacon \u2014 `beacon uninstall` removes this block)",QZ="# beacon:end",tZ,A="add it manually: codex mcp add beacon -- beacon mcp";var EQ=u(()=>{wQ();rQ();f=[{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."}];tZ=`${eQ}
270
340
  [mcp_servers.beacon]
271
341
  command = "beacon"
272
342
  args = ["mcp"]
273
- ${eQ}
274
- `});var XZ={};BQ(XZ,{provisionDb:()=>x0});import{createClient as q0}from"@libsql/client";import{drizzle as X0}from"drizzle-orm/libsql";import{migrate as U0}from"drizzle-orm/libsql/migrator";import{readMigrationFiles as W0}from"drizzle-orm/migrator";import{dirname as AQ,join as H0}from"path";import{fileURLToPath as j0}from"url";async function XQ(Q,Z){return(await Q.execute({sql:"SELECT 1 FROM sqlite_master WHERE type='table' AND name = ?",args:[Z]})).rows.length>0}async function P0(Q,Z){let $=await Q.execute(`PRAGMA table_info("${Z}")`);return new Set($.rows.map((J)=>String(J.name)))}async function qZ(Q){if(!await XQ(Q,"__drizzle_migrations"))return 0;let Z=await Q.execute('SELECT count(*) AS n FROM "__drizzle_migrations"');return Number(Z.rows[0]?.n??0)}async function G0(Q){for(let[Z,$]of Object.entries(N0)){if(!await XQ(Q,Z))continue;let J=await P0(Q,Z);for(let Y of $){if(!J.has(Y))continue;await Q.execute(`UPDATE "${Z}" SET "${Y}" = CAST((julianday("${Y}") - 2440587.5) * 86400000 AS INTEGER) WHERE typeof("${Y}") = 'text'`)}}}async function x0(Q,Z=B0){let $=q0({url:Q});try{await $.execute("PRAGMA journal_mode = WAL;"),await $.execute("PRAGMA foreign_keys = ON;"),await $.execute("PRAGMA busy_timeout = 5000;");let J=await XQ($,"__drizzle_migrations"),Y=await XQ($,"Node"),V=!1;if(Y&&!J){let X=W0({migrationsFolder:Z})[0];if(X)await $.execute('CREATE TABLE IF NOT EXISTS "__drizzle_migrations" (id SERIAL PRIMARY KEY, hash text NOT NULL, created_at numeric)'),await $.execute({sql:'INSERT INTO "__drizzle_migrations" ("hash", "created_at") VALUES (?, ?)',args:[X.hash,X.folderMillis]}),V=!0}let q=await qZ($);if(await U0(X0($),{migrationsFolder:Z}),await qZ($)>q)V=!0;return await G0($),{migrated:V}}finally{$.close()}}var v0,B0,N0;var UZ=F(async()=>{v0=AQ(AQ(AQ(j0(import.meta.url)))),B0=process.env.BEACON_MIGRATIONS_DIR||H0(v0,"drizzle"),N0={Node:["createdAt","updatedAt"],Note:["createdAt","updatedAt"],DbTable:["createdAt","updatedAt"],Endpoint:["createdAt","updatedAt"],DraftTable:["createdAt"],SyncState:["codeGraphSyncedAt","updatedAt"],AppSetting:["updatedAt"],ProjectMeta:["updatedAt"],CodeFile:["updatedAt"]}});wQ();import{existsSync as aZ}from"fs";import{homedir as dZ}from"os";import{join as zQ}from"path";function rZ(){return process.env.HOME||process.env.USERPROFILE||dZ()}var qQ=()=>zQ(rZ(),".claude"),IQ=()=>zQ(qQ(),"skills"),DQ=()=>zQ(qQ(),"settings.json"),OQ=()=>zQ(qQ(),"CLAUDE.md"),yQ="<!-- beacon:global:start -->",JZ="<!-- beacon:global:end -->";var oZ=s,g=[{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 iZ(Q,Z){return i(IQ(),Q,Z)}function YZ(Q){return O(IQ(),Q)}function eZ(Q){return e(IQ(),Q)}function Q0(Q){return t(DQ(),Q)}function Z0(Q){return a(DQ(),Q)}function $0(Q){return d(DQ(),Q)}function J0(Q){r(OQ(),yQ,JZ,Q)}function VZ(){return D(OQ(),yQ)}function Y0(){return o(OQ(),yQ,JZ)}function zZ(){let Q={};for(let $ of B)Q[$]=YZ($);let Z={};for(let $ of g)Z[$.event]=Z0({event:$.event,command:$.command});return{homeExists:aZ(qQ()),skills:Q,hooks:Z,claudeMdBlock:VZ()}}async function V0(){let{INIT_SKILL:Q,REFRESH_SKILL:Z,PLAN_SKILL:$}=await Promise.resolve().then(() => (p(),KQ)),J={"beacon-init":Q,"beacon-refresh":Z,"beacon-plan":$},Y=[];for(let X of B){if(!YZ(X))Y.push(X);iZ(X,J[X])}let V=0;for(let X of g)if(Q0({event:X.event,matcher:X.matcher,command:X.command}))V++;let q=VZ();return J0(oZ),{skillsAdded:Y,hooksAdded:V,claudeMdBlockTouched:!q}}async function H1(){if(sQ())return{ok:!0,skipped:"plugin",skillsAdded:[],hooksAdded:0,claudeMdBlockTouched:!1};let Q;if(tQ()){try{z0()}catch{}Q={ok:!0,skipped:"plugin-present",skillsAdded:[],hooksAdded:0,claudeMdBlockTouched:!1}}else try{Q={ok:!0,...await V0()}}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(() => (EQ(),$Z));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 z0(){let Q=[];for(let J of B)if(eZ(J))Q.push(J);let Z=0;for(let J of g)if($0(J))Z++;let $=Y0();return{skillsRemoved:Q,hooksRemoved:Z,claudeMdBlockRemoved:$}}import{AsyncLocalStorage as K0}from"async_hooks";import{spawnSync as C0}from"child_process";import{createHash as M0}from"crypto";import{existsSync as HZ,mkdirSync as _,readFileSync as _Q,writeFileSync as LQ}from"fs";import{homedir as jZ}from"os";import{basename as w0,join as C,parse as f0,resolve as WZ}from"path";function G(){return process.env.BEACON_HOME||C(jZ(),".beacon")}function kQ(){return C(G(),"workspaces.json")}function UQ(Q){return M0("sha256").update(Q).digest("hex").slice(0,12)}function F1(Q=process.cwd()){let Z=C0("git",["rev-parse","--show-toplevel"],{cwd:Q,stdio:["ignore","pipe","ignore"]});if(Z.status===0){let $=Z.stdout?.toString().trim();if($)return $}return Q}function vZ(Q){let Z=WZ(Q);return Z!==WZ(jZ())&&Z!==f0(Z).root}function BZ(){return C(G(),"deleted.json")}function SQ(){try{let Q=JSON.parse(_Q(BZ(),"utf8"));return Array.isArray(Q)?Q:[]}catch{return[]}}function NZ(Q){_(G(),{recursive:!0}),LQ(BZ(),JSON.stringify(Q,null,2))}function PZ(Q){return SQ().includes(Q)}function u1(Q){let Z=SQ();if(!Z.includes(Q))NZ([...Z,Q])}function T0(Q){let Z=SQ();if(Z.includes(Q))NZ(Z.filter(($)=>$!==Q))}function WQ(Q){return C(G(),Q)}function F0(Q){return`file:${C(WQ(Q),"db.sqlite")}`}function L(){try{let Q=JSON.parse(_Q(kQ(),"utf8"));return Array.isArray(Q)?Q:[]}catch{return[]}}function hQ(Q){_(G(),{recursive:!0}),LQ(kQ(),JSON.stringify(Q,null,2))}function HQ(){return L().sort((Q,Z)=>Z.lastOpenedAt.localeCompare(Q.lastOpenedAt))}function T(Q){return L().find((Z)=>Z.id===Q)??null}function GZ(Q,Z,$=new Date().toISOString()){if(!vZ(Q))throw Error(`beacon: refusing to register a non-repo path as a workspace: ${Q}`);let J=UQ(Q);if(PZ(J))throw Error(`beacon: workspace ${J} (${Q}) was deleted \u2014 run \`beacon\` or /beacon-init to re-add it`);let Y=L(),V=Y.find((z)=>z.id===J),q={id:J,path:Q,name:Z||V?.name||w0(Q),lastOpenedAt:$},X=[q,...Y.filter((z)=>z.id!==J)];return _(WQ(J),{recursive:!0}),hQ(X),q}function R1(Q,Z){return T0(UQ(Q)),GZ(Q,Z)}function g1(Q,Z=new Date().toISOString()){let $=L(),J=$.find((Y)=>Y.id===Q);if(!J)return;J.lastOpenedAt=Z,hQ($)}function E1(Q){if(hQ(L().filter((Z)=>Z.id!==Q)),mQ()===Q)u0(HQ()[0]?.id??null)}function xZ(){return C(G(),"active")}function mQ(){try{return _Q(xZ(),"utf8").trim()||null}catch{return null}}function u0(Q){_(G(),{recursive:!0}),LQ(xZ(),Q??"")}function I1(){let Q=mQ();return Q?T(Q):null}function D1(){let Q=E0()??mQ();return Q?T(Q):null}function O1(Q){return T(Q)?.path??null}function y1(){return HZ(kQ())}var KZ="beacon_ws";function CZ(Q,Z){let $=Q.headers.get("cookie");if(!$)return null;for(let J of $.split(";")){let Y=J.indexOf("=");if(Y===-1)continue;if(J.slice(0,Y).trim()===Z)return decodeURIComponent(J.slice(Y+1).trim())}return null}function A1(Q){let Z=Q.headers.get("x-beacon-workspace");if(Z&&T(Z))return Z;let $=CZ(Q,KZ);if($&&T($))return $;return R0()}function R0(){let Q=HQ();return Q.length===1?Q[0].id:null}var g0="x-beacon-workspace-path";async function b1(Q){let Z=Q.headers.get("x-beacon-workspace");if(Z&&T(Z))return Z;let $=Q.headers.get(g0);if($&&vZ($)&&!PZ(UQ($))&&(!Z||UQ($)===Z)){let Y=GZ($);return await I0(Y.id),Y.id}let J=CZ(Q,KZ);if(J&&T(J))return J;return null}var MZ=new K0;function _1(Q,Z){return Q?MZ.run(Q,Z):Z()}function E0(){return MZ.getStore()??null}var bQ=new Set;function L1(Q){bQ.delete(C(WQ(Q),"db.sqlite"))}async function I0(Q){let Z=WQ(Q),$=C(Z,"db.sqlite"),J=HZ($);if(J&&bQ.has($))return{ok:!0,created:!1,migrated:!1};try{_(Z,{recursive:!0});let{provisionDb:Y}=await UZ().then(() => XZ),V=await Y(F0(Q));return bQ.add($),{ok:!0,created:!J,migrated:J&&V.migrated}}catch(Y){return{ok:!1,created:!1,migrated:!1,error:Y instanceof Error?Y.message:String(Y)}}}p();EQ();import{execSync as D0,spawnSync as fZ}from"child_process";import{existsSync as O0,readFileSync as y0}from"fs";import{join as TZ}from"path";var W=(Q)=>`\x1B[32m\u2713\x1B[0m ${Q}`,H=(Q)=>`\x1B[31m\u2717\x1B[0m ${Q}`,x=(Q)=>`\x1B[2m${Q}\x1B[0m`,E=(Q)=>`
275
- \x1B[1m${Q}\x1B[0m`;function A0(){try{return D0("git rev-parse --show-toplevel",{cwd:process.cwd(),stdio:["ignore","pipe","ignore"]}).toString().trim()}catch{return""}}function b0(){let Q=TZ(G(),"server.json");try{let Z=JSON.parse(y0(Q,"utf8"));if(!Z.pid)return H("daemon: no server.json yet");try{return process.kill(Z.pid,0),W(`daemon running (pid ${Z.pid}, port ${Z.port??"?"})`)}catch{return H(`daemon NOT running (server.json stale: pid ${Z.pid})`)}}catch{return H("daemon: no server.json (never started)")}}function _0(){let Q=fZ("bun",["--version"],{stdio:["ignore","pipe","ignore"]});if(Q.status===0)return W(`bun ${Q.stdout.toString().trim()}`);return H("bun NOT found on PATH (required to run Beacon)")}function L0(){return A0()||process.cwd()}var jQ=L0(),M=zZ(),FZ=HQ(),k0=FZ.some((Q)=>Q.path===jQ),j=k0||O0(TZ(jQ,".mcp.json"))?xQ(jQ):null;console.log(E("Beacon \xB7 doctor"));console.log(E("Runtime"));console.log(` ${_0()}`);console.log(` ${b0()}`);console.log(` ${W(`home: ${G()}`)}`);console.log(` ${W(`workspaces registered: ${FZ.length}`)}`);console.log(E("Global (~/.claude/)"));for(let Q of B)console.log(` ${M.skills[Q]?W(`skill ${Q}`):H(`skill ${Q} \u2014 missing`)}`);for(let Q of g)console.log(` ${M.hooks[Q.event]?W(`hook ${Q.event} \u2192 ${Q.command}`):H(`hook ${Q.event} \u2192 ${Q.command} \u2014 missing`)} ${x(Q.description)}`);console.log(` ${M.claudeMdBlock?W("global CLAUDE.md block"):H("global CLAUDE.md block \u2014 missing (every Claude session won't auto-discover Beacon)")}`);console.log(E("Plugin (Claude Code)"));var wZ=n();if(wZ)if(console.log(` ${W(`installed as a Claude Code plugin \u2192 ${wZ}`)}`),console.log(` ${x("the plugin owns the Claude-side skills/hooks/MCP")}`),M.hooks.PostToolUse||B.some((Q)=>M.skills[Q]))console.log(` ${x("npm-global ~/.claude entries still present \u2014 they'll be removed automatically on the next `beacon` run (run `beacon` once to deconflict now).")}`);else console.log(` ${W("npm-global ~/.claude layer stepped aside \u2014 no double-registration")}`);else console.log(` ${x("not installed as a Claude Code plugin (using the npm `trybeacon` CLI).")}`);console.log(E("Codex (~/.codex/ + ~/.agents/)"));var N=VQ()?gQ():null;if(!N)console.log(` ${x("codex not on PATH \u2014 Codex integration inactive (wires automatically once codex is installed)")}`);else{let Q=fZ("codex",["--version"],{stdio:["ignore","pipe","ignore"]});console.log(` ${Q.status===0?W(`codex ${Q.stdout.toString().trim()}`):x("codex version unavailable (BEACON_CODEX override?)")}`);for(let $ of B)console.log(` ${N.skills[$]?W(`skill ${$} (~/.agents/skills)`):H(`skill ${$} (~/.agents/skills) \u2014 missing`)}`);for(let $ of f)console.log(` ${N.hooks[$.event]?W(`hook ${$.event} \u2192 ${$.command}`):H(`hook ${$.event} \u2192 ${$.command} \u2014 missing`)} ${x($.description)}`);console.log(` ${N.agentsMdBlock?W("global ~/.codex/AGENTS.md block"):H("global ~/.codex/AGENTS.md block \u2014 missing")}`);let Z=RQ();console.log(` ${N.mcp?W("config.toml has [mcp_servers.beacon]"):H(`config.toml missing [mcp_servers.beacon]${Z?` \u2014 ${Z}`:""}`)}`)}console.log(E(`Current repo (${jQ})`));if(!j)console.log(` ${x("not registered with Beacon and no .mcp.json \u2014 run `beacon` here to wire it.")}`);else if(console.log(` ${j.mcpRegistered?W(".mcp.json has beacon entry"):H(".mcp.json missing beacon entry")}`),console.log(` ${j.agentsMdBlock?W("AGENTS.md has Beacon workflow block"):H("AGENTS.md missing Beacon workflow block")}`),console.log(` ${j.claudeMdImport?W("CLAUDE.md @-imports AGENTS.md"):H("CLAUDE.md does NOT @-import AGENTS.md")}`),console.log(` ${j.skills["beacon-init"]?W("skill beacon-init (repo)"):H("skill beacon-init (repo) \u2014 missing")}`),console.log(` ${j.skills["beacon-refresh"]?W("skill beacon-refresh (repo)"):H("skill beacon-refresh (repo) \u2014 missing")}`),N)console.log(` ${j.codexSkills["beacon-init"]?W("skill beacon-init (.agents/skills)"):H("skill beacon-init (.agents/skills) \u2014 missing")}`),console.log(` ${j.codexSkills["beacon-refresh"]?W("skill beacon-refresh (.agents/skills)"):H("skill beacon-refresh (.agents/skills) \u2014 missing")}`);var S0=B.some((Q)=>!M.skills[Q])||g.some((Q)=>!M.hooks[Q.event])||!M.claudeMdBlock||(N?B.some((Q)=>!N.skills[Q])||f.some((Q)=>!N.hooks[Q.event])||!N.agentsMdBlock||!N.mcp:!1)||(j?!j.mcpRegistered||!j.agentsMdBlock||!j.claudeMdImport||!j.skills["beacon-init"]||!j.skills["beacon-refresh"]||(N?!j.codexSkills["beacon-init"]||!j.codexSkills["beacon-refresh"]:!1):!1);if(S0)console.log(`
343
+ ${QZ}
344
+ `});var UZ={};BQ(UZ,{provisionDb:()=>C0});import{createClient as U0}from"@libsql/client";import{drizzle as W0}from"drizzle-orm/libsql";import{migrate as H0}from"drizzle-orm/libsql/migrator";import{readMigrationFiles as j0}from"drizzle-orm/migrator";import{dirname as AQ,join as v0}from"path";import{fileURLToPath as B0}from"url";async function XQ(Q,Z){return(await Q.execute({sql:"SELECT 1 FROM sqlite_master WHERE type='table' AND name = ?",args:[Z]})).rows.length>0}async function x0(Q,Z){let $=await Q.execute(`PRAGMA table_info("${Z}")`);return new Set($.rows.map((J)=>String(J.name)))}async function XZ(Q){if(!await XQ(Q,"__drizzle_migrations"))return 0;let Z=await Q.execute('SELECT count(*) AS n FROM "__drizzle_migrations"');return Number(Z.rows[0]?.n??0)}async function K0(Q){for(let[Z,$]of Object.entries(G0)){if(!await XQ(Q,Z))continue;let J=await x0(Q,Z);for(let Y of $){if(!J.has(Y))continue;await Q.execute(`UPDATE "${Z}" SET "${Y}" = CAST((julianday("${Y}") - 2440587.5) * 86400000 AS INTEGER) WHERE typeof("${Y}") = 'text'`)}}}async function C0(Q,Z=P0){let $=U0({url:Q});try{await $.execute("PRAGMA journal_mode = WAL;"),await $.execute("PRAGMA foreign_keys = ON;"),await $.execute("PRAGMA busy_timeout = 5000;");let J=await XQ($,"__drizzle_migrations"),Y=await XQ($,"Node"),V=!1;if(Y&&!J){let H=j0({migrationsFolder:Z})[0];if(H)await $.execute('CREATE TABLE IF NOT EXISTS "__drizzle_migrations" (id SERIAL PRIMARY KEY, hash text NOT NULL, created_at numeric)'),await $.execute({sql:'INSERT INTO "__drizzle_migrations" ("hash", "created_at") VALUES (?, ?)',args:[H.hash,H.folderMillis]}),V=!0}let q=await XZ($);if(await H0(W0($),{migrationsFolder:Z}),await XZ($)>q)V=!0;return await K0($),{migrated:V}}finally{$.close()}}var N0,P0,G0;var WZ=u(async()=>{N0=AQ(AQ(AQ(B0(import.meta.url)))),P0=process.env.BEACON_MIGRATIONS_DIR||v0(N0,"drizzle"),G0={Node:["createdAt","updatedAt"],Note:["createdAt","updatedAt"],DbTable:["createdAt","updatedAt"],Endpoint:["createdAt","updatedAt"],DraftTable:["createdAt"],SyncState:["codeGraphSyncedAt","updatedAt"],AppSetting:["updatedAt"],ProjectMeta:["updatedAt"],CodeFile:["updatedAt"]}});wQ();import{existsSync as rZ}from"fs";import{homedir as oZ}from"os";import{join as zQ}from"path";function iZ(){return process.env.HOME||process.env.USERPROFILE||oZ()}var qQ=()=>zQ(iZ(),".claude"),DQ=()=>zQ(qQ(),"skills"),IQ=()=>zQ(qQ(),"settings.json"),OQ=()=>zQ(qQ(),"CLAUDE.md"),yQ="<!-- beacon:global:start -->",YZ="<!-- beacon:global:end -->";var eZ=s,g=[{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 Q0(Q,Z){return i(DQ(),Q,Z)}function VZ(Q){return y(DQ(),Q)}function Z0(Q){return e(DQ(),Q)}function $0(Q){return t(IQ(),Q)}function J0(Q){return a(IQ(),Q)}function Y0(Q){return d(IQ(),Q)}function V0(Q){r(OQ(),yQ,YZ,Q)}function zZ(){return O(OQ(),yQ)}function z0(){return o(OQ(),yQ,YZ)}function qZ(){let Q={};for(let $ of B)Q[$]=VZ($);let Z={};for(let $ of g)Z[$.event]=J0({event:$.event,command:$.command});return{homeExists:rZ(qQ()),skills:Q,hooks:Z,claudeMdBlock:zZ()}}async function q0(){let{INIT_SKILL:Q,REFRESH_SKILL:Z,PLAN_SKILL:$,EXPLAIN_SKILL:J}=await Promise.resolve().then(() => (p(),KQ)),Y={"beacon-init":Q,"beacon-refresh":Z,"beacon-plan":$,"beacon-explain":J},V=[];for(let z of B){if(!VZ(z))V.push(z);Q0(z,Y[z])}let q=0;for(let z of g)if($0({event:z.event,matcher:z.matcher,command:z.command}))q++;let H=zZ();return V0(eZ),{skillsAdded:V,hooksAdded:q,claudeMdBlockTouched:!H}}async function v1(){if(tQ())return{ok:!0,skipped:"plugin",skillsAdded:[],hooksAdded:0,claudeMdBlockTouched:!1};let Q;if(aQ()){try{X0()}catch{}Q={ok:!0,skipped:"plugin-present",skillsAdded:[],hooksAdded:0,claudeMdBlockTouched:!1}}else try{Q={ok:!0,...await q0()}}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(() => (EQ(),JZ));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 X0(){let Q=[];for(let J of B)if(Z0(J))Q.push(J);let Z=0;for(let J of g)if(Y0(J))Z++;let $=z0();return{skillsRemoved:Q,hooksRemoved:Z,claudeMdBlockRemoved:$}}import{AsyncLocalStorage as M0}from"async_hooks";import{spawnSync as w0}from"child_process";import{createHash as f0}from"crypto";import{existsSync as jZ,mkdirSync as k,readFileSync as _Q,writeFileSync as kQ}from"fs";import{homedir as vZ}from"os";import{basename as T0,join as C,parse as u0,resolve as HZ}from"path";function G(){return process.env.BEACON_HOME||C(vZ(),".beacon")}function LQ(){return C(G(),"workspaces.json")}function UQ(Q){return f0("sha256").update(Q).digest("hex").slice(0,12)}function R1(Q=process.cwd()){let Z=w0("git",["rev-parse","--show-toplevel"],{cwd:Q,stdio:["ignore","pipe","ignore"]});if(Z.status===0){let $=Z.stdout?.toString().trim();if($)return $}return Q}function BZ(Q){let Z=HZ(Q);return Z!==HZ(vZ())&&Z!==u0(Z).root}function NZ(){return C(G(),"deleted.json")}function SQ(){try{let Q=JSON.parse(_Q(NZ(),"utf8"));return Array.isArray(Q)?Q:[]}catch{return[]}}function PZ(Q){k(G(),{recursive:!0}),kQ(NZ(),JSON.stringify(Q,null,2))}function GZ(Q){return SQ().includes(Q)}function g1(Q){let Z=SQ();if(!Z.includes(Q))PZ([...Z,Q])}function F0(Q){let Z=SQ();if(Z.includes(Q))PZ(Z.filter(($)=>$!==Q))}function WQ(Q){return C(G(),Q)}function R0(Q){return`file:${C(WQ(Q),"db.sqlite")}`}function L(){try{let Q=JSON.parse(_Q(LQ(),"utf8"));return Array.isArray(Q)?Q:[]}catch{return[]}}function hQ(Q){k(G(),{recursive:!0}),kQ(LQ(),JSON.stringify(Q,null,2))}function HQ(){return L().sort((Q,Z)=>Z.lastOpenedAt.localeCompare(Q.lastOpenedAt))}function T(Q){return L().find((Z)=>Z.id===Q)??null}function xZ(Q,Z,$=new Date().toISOString()){if(!BZ(Q))throw Error(`beacon: refusing to register a non-repo path as a workspace: ${Q}`);let J=UQ(Q);if(GZ(J))throw Error(`beacon: workspace ${J} (${Q}) was deleted \u2014 run \`beacon\` or /beacon-init to re-add it`);let Y=L(),V=Y.find((z)=>z.id===J),q={id:J,path:Q,name:Z||V?.name||T0(Q),lastOpenedAt:$},H=[q,...Y.filter((z)=>z.id!==J)];return k(WQ(J),{recursive:!0}),hQ(H),q}function E1(Q,Z){return F0(UQ(Q)),xZ(Q,Z)}function D1(Q,Z=new Date().toISOString()){let $=L(),J=$.find((Y)=>Y.id===Q);if(!J)return;J.lastOpenedAt=Z,hQ($)}function I1(Q){if(hQ(L().filter((Z)=>Z.id!==Q)),mQ()===Q)g0(HQ()[0]?.id??null)}function KZ(){return C(G(),"active")}function mQ(){try{return _Q(KZ(),"utf8").trim()||null}catch{return null}}function g0(Q){k(G(),{recursive:!0}),kQ(KZ(),Q??"")}function O1(){let Q=mQ();return Q?T(Q):null}function y1(){let Q=I0()??mQ();return Q?T(Q):null}function A1(Q){return T(Q)?.path??null}function b1(){return jZ(LQ())}var CZ="beacon_ws";function MZ(Q,Z){let $=Q.headers.get("cookie");if(!$)return null;for(let J of $.split(";")){let Y=J.indexOf("=");if(Y===-1)continue;if(J.slice(0,Y).trim()===Z)return decodeURIComponent(J.slice(Y+1).trim())}return null}function _1(Q){let Z=Q.headers.get("x-beacon-workspace");if(Z&&T(Z))return Z;let $=MZ(Q,CZ);if($&&T($))return $;return E0()}function E0(){let Q=HQ();return Q.length===1?Q[0].id:null}var D0="x-beacon-workspace-path";async function k1(Q){let Z=Q.headers.get("x-beacon-workspace");if(Z&&T(Z))return Z;let $=Q.headers.get(D0);if($&&BZ($)&&!GZ(UQ($))&&(!Z||UQ($)===Z)){let Y=xZ($);return await O0(Y.id),Y.id}let J=MZ(Q,CZ);if(J&&T(J))return J;return null}var wZ=new M0;function L1(Q,Z){return Q?wZ.run(Q,Z):Z()}function I0(){return wZ.getStore()??null}var bQ=new Set;function S1(Q){bQ.delete(C(WQ(Q),"db.sqlite"))}async function O0(Q){let Z=WQ(Q),$=C(Z,"db.sqlite"),J=jZ($);if(J&&bQ.has($))return{ok:!0,created:!1,migrated:!1};try{k(Z,{recursive:!0});let{provisionDb:Y}=await WZ().then(() => UZ),V=await Y(R0(Q));return bQ.add($),{ok:!0,created:!J,migrated:J&&V.migrated}}catch(Y){return{ok:!1,created:!1,migrated:!1,error:Y instanceof Error?Y.message:String(Y)}}}p();EQ();import{execSync as y0,spawnSync as TZ}from"child_process";import{existsSync as A0,readFileSync as b0}from"fs";import{join as uZ}from"path";var W=(Q)=>`\x1B[32m\u2713\x1B[0m ${Q}`,j=(Q)=>`\x1B[31m\u2717\x1B[0m ${Q}`,x=(Q)=>`\x1B[2m${Q}\x1B[0m`,E=(Q)=>`
345
+ \x1B[1m${Q}\x1B[0m`;function _0(){try{return y0("git rev-parse --show-toplevel",{cwd:process.cwd(),stdio:["ignore","pipe","ignore"]}).toString().trim()}catch{return""}}function k0(){let Q=uZ(G(),"server.json");try{let Z=JSON.parse(b0(Q,"utf8"));if(!Z.pid)return j("daemon: no server.json yet");try{return process.kill(Z.pid,0),W(`daemon running (pid ${Z.pid}, port ${Z.port??"?"})`)}catch{return j(`daemon NOT running (server.json stale: pid ${Z.pid})`)}}catch{return j("daemon: no server.json (never started)")}}function L0(){let Q=TZ("bun",["--version"],{stdio:["ignore","pipe","ignore"]});if(Q.status===0)return W(`bun ${Q.stdout.toString().trim()}`);return j("bun NOT found on PATH (required to run Beacon)")}function S0(){return _0()||process.cwd()}var jQ=S0(),M=qZ(),FZ=HQ(),h0=FZ.some((Q)=>Q.path===jQ),v=h0||A0(uZ(jQ,".mcp.json"))?xQ(jQ):null;console.log(E("Beacon \xB7 doctor"));console.log(E("Runtime"));console.log(` ${L0()}`);console.log(` ${k0()}`);console.log(` ${W(`home: ${G()}`)}`);console.log(` ${W(`workspaces registered: ${FZ.length}`)}`);console.log(E("Global (~/.claude/)"));for(let Q of B)console.log(` ${M.skills[Q]?W(`skill ${Q}`):j(`skill ${Q} \u2014 missing`)}`);for(let Q of g)console.log(` ${M.hooks[Q.event]?W(`hook ${Q.event} \u2192 ${Q.command}`):j(`hook ${Q.event} \u2192 ${Q.command} \u2014 missing`)} ${x(Q.description)}`);console.log(` ${M.claudeMdBlock?W("global CLAUDE.md block"):j("global CLAUDE.md block \u2014 missing (every Claude session won't auto-discover Beacon)")}`);console.log(E("Plugin (Claude Code)"));var fZ=n();if(fZ)if(console.log(` ${W(`installed as a Claude Code plugin \u2192 ${fZ}`)}`),console.log(` ${x("the plugin owns the Claude-side skills/hooks/MCP")}`),M.hooks.PostToolUse||B.some((Q)=>M.skills[Q]))console.log(` ${x("npm-global ~/.claude entries still present \u2014 they'll be removed automatically on the next `beacon` run (run `beacon` once to deconflict now).")}`);else console.log(` ${W("npm-global ~/.claude layer stepped aside \u2014 no double-registration")}`);else console.log(` ${x("not installed as a Claude Code plugin (using the npm `trybeacon` CLI).")}`);console.log(E("Codex (~/.codex/ + ~/.agents/)"));var P=VQ()?gQ():null;if(!P)console.log(` ${x("codex not on PATH \u2014 Codex integration inactive (wires automatically once codex is installed)")}`);else{let Q=TZ("codex",["--version"],{stdio:["ignore","pipe","ignore"]});console.log(` ${Q.status===0?W(`codex ${Q.stdout.toString().trim()}`):x("codex version unavailable (BEACON_CODEX override?)")}`);for(let $ of B)console.log(` ${P.skills[$]?W(`skill ${$} (~/.agents/skills)`):j(`skill ${$} (~/.agents/skills) \u2014 missing`)}`);for(let $ of f)console.log(` ${P.hooks[$.event]?W(`hook ${$.event} \u2192 ${$.command}`):j(`hook ${$.event} \u2192 ${$.command} \u2014 missing`)} ${x($.description)}`);console.log(` ${P.agentsMdBlock?W("global ~/.codex/AGENTS.md block"):j("global ~/.codex/AGENTS.md block \u2014 missing")}`);let Z=RQ();console.log(` ${P.mcp?W("config.toml has [mcp_servers.beacon]"):j(`config.toml missing [mcp_servers.beacon]${Z?` \u2014 ${Z}`:""}`)}`)}console.log(E(`Current repo (${jQ})`));if(!v)console.log(` ${x("not registered with Beacon and no .mcp.json \u2014 run `beacon` here to wire it.")}`);else if(console.log(` ${v.mcpRegistered?W(".mcp.json has beacon entry"):j(".mcp.json missing beacon entry")}`),console.log(` ${v.agentsMdBlock?W("AGENTS.md has Beacon workflow block"):j("AGENTS.md missing Beacon workflow block")}`),console.log(` ${v.claudeMdImport?W("CLAUDE.md @-imports AGENTS.md"):j("CLAUDE.md does NOT @-import AGENTS.md")}`),console.log(` ${v.skills["beacon-init"]?W("skill beacon-init (repo)"):j("skill beacon-init (repo) \u2014 missing")}`),console.log(` ${v.skills["beacon-refresh"]?W("skill beacon-refresh (repo)"):j("skill beacon-refresh (repo) \u2014 missing")}`),P)console.log(` ${v.codexSkills["beacon-init"]?W("skill beacon-init (.agents/skills)"):j("skill beacon-init (.agents/skills) \u2014 missing")}`),console.log(` ${v.codexSkills["beacon-refresh"]?W("skill beacon-refresh (.agents/skills)"):j("skill beacon-refresh (.agents/skills) \u2014 missing")}`);var m0=B.some((Q)=>!M.skills[Q])||g.some((Q)=>!M.hooks[Q.event])||!M.claudeMdBlock||(P?B.some((Q)=>!P.skills[Q])||f.some((Q)=>!P.hooks[Q.event])||!P.agentsMdBlock||!P.mcp:!1)||(v?!v.mcpRegistered||!v.agentsMdBlock||!v.claudeMdImport||!v.skills["beacon-init"]||!v.skills["beacon-refresh"]||(P?!v.codexSkills["beacon-init"]||!v.codexSkills["beacon-refresh"]:!1):!1);if(m0)console.log(`
276
346
  ${x("Fix everything marked \u2717 by running")} \x1B[1mbeacon\x1B[0m ${x("in this repo.")}`);console.log();