trybeacon 0.1.80 → 0.1.82
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.
- package/.claude-plugin/plugin.json +1 -1
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +22 -21
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/routes-manifest.json +20 -1
- package/.next/server/app/@modal/(.)settings/page.js +2 -0
- package/.next/server/app/@modal/(.)settings/page.js.nft.json +1 -0
- package/.next/server/app/@modal/(.)settings/page_client-reference-manifest.js +1 -0
- package/.next/server/app/_global-error/page.js +3 -3
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +2 -2
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +27 -25
- package/.next/server/app/_not-found.segments/_full.segment.rsc +27 -25
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +16 -14
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/api/ask/answer/route.js +1 -1
- package/.next/server/app/api/ask/route.js +1 -1
- package/.next/server/app/api/ask/verdict/route.js +1 -1
- package/.next/server/app/api/board-annotations/[id]/route.js +1 -1
- package/.next/server/app/api/board-annotations/route.js +1 -1
- package/.next/server/app/api/board-layout/route.js +1 -1
- package/.next/server/app/api/bug-flags/[id]/route.js +1 -1
- package/.next/server/app/api/bug-flags/route.js +1 -1
- package/.next/server/app/api/changes/comment/answer/route.js +1 -1
- package/.next/server/app/api/changes/comment/claim/route.js +2 -2
- package/.next/server/app/api/changes/comment/route.js +2 -2
- package/.next/server/app/api/changes/quality/route.js +1 -1
- package/.next/server/app/api/changes/route.js +1 -1
- package/.next/server/app/api/changes/viewed/route.js +1 -1
- package/.next/server/app/api/code-graph/position/route.js +1 -1
- package/.next/server/app/api/code-graph/route.js +1 -1
- package/.next/server/app/api/context/feature/route.js +1 -1
- package/.next/server/app/api/context/file/route.js +1 -1
- package/.next/server/app/api/context/route.js +1 -1
- package/.next/server/app/api/db/arrange/route.js +1 -1
- package/.next/server/app/api/db/backfill-access/route.js +1 -1
- package/.next/server/app/api/db/position/route.js +1 -1
- package/.next/server/app/api/db/prune-planned/route.js +1 -1
- package/.next/server/app/api/db/reconcile-endpoints/route.js +1 -1
- package/.next/server/app/api/db/relations/[id]/route.js +1 -1
- package/.next/server/app/api/db/tables/[id]/route.js +1 -1
- package/.next/server/app/api/draft/approve/route.js +1 -1
- package/.next/server/app/api/draft/route.js +1 -1
- package/.next/server/app/api/draft/status/route.js +1 -1
- package/.next/server/app/api/edges/[id]/route.js +1 -1
- package/.next/server/app/api/edges/route.js +1 -1
- package/.next/server/app/api/endpoints/[id]/route.js +1 -1
- package/.next/server/app/api/entities/route.js +1 -1
- package/.next/server/app/api/ingest/route.js +1 -1
- package/.next/server/app/api/init/route.js +1 -1
- package/.next/server/app/api/lesson/close/route.js +1 -1
- package/.next/server/app/api/lesson/presence/route.js +1 -1
- package/.next/server/app/api/lesson/questions/route.js +1 -1
- package/.next/server/app/api/lesson/route.js +1 -1
- package/.next/server/app/api/lesson/save/route.js +1 -1
- package/.next/server/app/api/lesson/verdict/route.js +1 -1
- package/.next/server/app/api/linear/route.js +2 -2
- package/.next/server/app/api/linear/scopes/route.js +1 -1
- package/.next/server/app/api/linear/sync/route.js +2 -2
- package/.next/server/app/api/map/describe/route.js +1 -1
- package/.next/server/app/api/map/files/route.js +1 -1
- package/.next/server/app/api/map/finish/route.js +1 -1
- package/.next/server/app/api/map/route.js +1 -1
- package/.next/server/app/api/map/start/route.js +1 -1
- package/.next/server/app/api/map/touch-active/route.js +1 -1
- package/.next/server/app/api/mention-search/route.js +1 -1
- package/.next/server/app/api/nodes/[id]/position/route.js +1 -1
- package/.next/server/app/api/nodes/[id]/route.js +1 -1
- package/.next/server/app/api/nodes/positions/route.js +1 -1
- package/.next/server/app/api/nodes/route.js +1 -1
- package/.next/server/app/api/nodes/subtasks/route.js +1 -1
- package/.next/server/app/api/notes/[id]/route.js +1 -1
- package/.next/server/app/api/notes/route.js +1 -1
- package/.next/server/app/api/open/route.js +1 -1
- package/.next/server/app/api/plan/annotations/route.js +2 -2
- package/.next/server/app/api/plan/approve/route.js +1 -1
- package/.next/server/app/api/plan/history/route.js +1 -1
- package/.next/server/app/api/plan/markdown/route.js +1 -1
- package/.next/server/app/api/plan/presence/route.js +1 -1
- package/.next/server/app/api/plan/route.js +1 -1
- package/.next/server/app/api/plan/verdict/route.js +1 -1
- package/.next/server/app/api/preferences/route.js +1 -1
- package/.next/server/app/api/project-meta/route.js +1 -1
- package/.next/server/app/api/reset/route.js +1 -1
- package/.next/server/app/api/scope-guard/check/route.js +2 -2
- package/.next/server/app/api/share/create/route.js +1 -1
- package/.next/server/app/api/share/route.js +1 -1
- package/.next/server/app/api/stream/route.js +2 -2
- package/.next/server/app/api/tab/nav/route.js +1 -1
- package/.next/server/app/api/tab/presence/route.js +1 -1
- package/.next/server/app/api/tab/view/route.js +1 -1
- package/.next/server/app/api/telemetry/route.js +1 -1
- package/.next/server/app/api/telemetry/stats/route.js +1 -1
- package/.next/server/app/api/version/route.js +1 -1
- package/.next/server/app/api/workspace/activate/route.js +1 -1
- package/.next/server/app/api/workspace/route.js +1 -1
- package/.next/server/app/apple-icon.png/route.js +1 -1
- package/.next/server/app/docs/page.js +2 -2
- package/.next/server/app/docs/page.js.nft.json +1 -1
- package/.next/server/app/docs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/docs.html +1 -1
- package/.next/server/app/docs.meta +1 -0
- package/.next/server/app/docs.rsc +31 -27
- package/.next/server/app/docs.segments/@modal/__DEFAULT__.segment.rsc +2 -0
- package/.next/server/app/docs.segments/_full.segment.rsc +31 -27
- package/.next/server/app/docs.segments/_head.segment.rsc +1 -1
- package/.next/server/app/docs.segments/_index.segment.rsc +17 -15
- package/.next/server/app/docs.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/docs.segments/docs.segment.rsc +1 -1
- package/.next/server/app/help/page.js +2 -2
- package/.next/server/app/help/page.js.nft.json +1 -1
- package/.next/server/app/help/page_client-reference-manifest.js +1 -1
- package/.next/server/app/help.html +1 -1
- package/.next/server/app/help.meta +1 -0
- package/.next/server/app/help.rsc +40 -35
- package/.next/server/app/help.segments/@modal/__DEFAULT__.segment.rsc +2 -0
- package/.next/server/app/help.segments/_full.segment.rsc +40 -35
- package/.next/server/app/help.segments/_head.segment.rsc +1 -1
- package/.next/server/app/help.segments/_index.segment.rsc +17 -15
- package/.next/server/app/help.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/help.segments/help/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/help.segments/help.segment.rsc +1 -1
- package/.next/server/app/icon.svg/route.js +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.meta +1 -0
- package/.next/server/app/index.rsc +30 -25
- package/.next/server/app/index.segments/@modal/__DEFAULT__.segment.rsc +2 -0
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +30 -25
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +17 -15
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/learn/page.js +4 -4
- package/.next/server/app/learn/page.js.nft.json +1 -1
- package/.next/server/app/learn/page_client-reference-manifest.js +1 -1
- package/.next/server/app/map/page.js +2 -2
- package/.next/server/app/map/page.js.nft.json +1 -1
- package/.next/server/app/map/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js +2 -2
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/plan/page.js +3 -3
- package/.next/server/app/plan/page.js.nft.json +1 -1
- package/.next/server/app/plan/page_client-reference-manifest.js +1 -1
- package/.next/server/app/s/[token]/page.js +2 -2
- package/.next/server/app/s/[token]/page.js.nft.json +1 -1
- package/.next/server/app/s/[token]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/page.js +2 -2
- package/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +22 -21
- package/.next/server/chunks/2025.js +1 -1
- package/.next/server/chunks/2693.js +5 -5
- package/.next/server/chunks/3174.js +1 -1
- package/.next/server/chunks/3237.js +1 -0
- package/.next/server/chunks/3825.js +1 -0
- package/.next/server/chunks/4990.js +1 -0
- package/.next/server/chunks/5081.js +1 -0
- package/.next/server/chunks/6469.js +2 -2
- package/.next/server/chunks/6819.js +2 -0
- package/.next/server/chunks/{7720.js → 7436.js} +4 -4
- package/.next/server/chunks/7999.js +1 -0
- package/.next/server/interception-route-rewrite-manifest.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/32-hn-zWkepUstH6QZVnt/_buildManifest.js +1 -0
- package/.next/static/chunks/1569-ea8e739cccfb69b5.js +1 -0
- package/.next/static/chunks/1909-0f500ebe4df09208.js +1 -0
- package/.next/static/chunks/2114-74736df56930b46c.js +1 -0
- package/.next/static/chunks/4752-81a4fc25de32efa2.js +1 -0
- package/.next/static/chunks/4853-43350f60d0d9135b.js +1 -0
- package/.next/static/chunks/{9887-e8954568a4031ed3.js → 5547-2c07851028a9033a.js} +1 -1
- package/.next/static/chunks/569-b6c0e292fbfa6038.js +1 -0
- package/.next/static/chunks/{2059-fba06ba63ba64522.js → 6283-20a6abe3453496ae.js} +3 -3
- package/.next/static/chunks/6639-f0b63e1e7d03a20a.js +1 -0
- package/.next/static/chunks/6818-85b9a09bb74062ef.js +1 -0
- package/.next/static/chunks/7437-686839cf9b298bd8.js +1 -0
- package/.next/static/chunks/{5957-83f611fcd5a08b45.js → 8710-6b2685272a1e1ff7.js} +1 -1
- package/.next/static/chunks/app/@modal/(.)settings/page-58f068e66bf2fdf6.js +1 -0
- package/.next/static/chunks/app/@modal/default-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/_global-error/page-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/ask/answer/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/ask/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/ask/verdict/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/board-annotations/[id]/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/board-annotations/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/board-layout/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/bug-flags/[id]/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/bug-flags/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/changes/comment/answer/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/changes/comment/claim/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/changes/comment/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/changes/quality/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/changes/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/changes/viewed/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/code-graph/position/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/code-graph/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/context/feature/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/context/file/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/context/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/db/arrange/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/db/backfill-access/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/db/position/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/db/prune-planned/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/db/reconcile-endpoints/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/db/relations/[id]/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/db/tables/[id]/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/draft/approve/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/draft/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/draft/status/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/edges/[id]/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/edges/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/endpoints/[id]/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/entities/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/ingest/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/init/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/lesson/close/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/lesson/presence/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/lesson/questions/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/lesson/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/lesson/save/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/lesson/verdict/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/linear/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/linear/scopes/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/linear/sync/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/map/describe/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/map/files/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/map/finish/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/map/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/map/start/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/map/touch-active/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/mention-search/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/nodes/[id]/position/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/nodes/[id]/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/nodes/positions/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/nodes/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/nodes/subtasks/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/notes/[id]/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/notes/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/open/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/plan/annotations/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/plan/approve/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/plan/history/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/plan/markdown/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/plan/presence/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/plan/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/plan/verdict/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/preferences/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/project-meta/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/reset/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/scope-guard/check/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/share/create/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/share/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/stream/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/tab/nav/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/tab/presence/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/tab/view/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/telemetry/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/telemetry/stats/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/version/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/workspace/activate/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/api/workspace/route-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/app/layout-b78f34d56f9d5aea.js +1 -0
- package/.next/static/chunks/app/learn/page-c01e1092ca9135e6.js +7 -0
- package/.next/static/chunks/app/map/page-9075091c6ba84c19.js +1 -0
- package/.next/static/chunks/app/page-62c53092bdab1224.js +1 -0
- package/.next/static/chunks/app/plan/page-6645cae32f5767c2.js +11 -0
- package/.next/static/chunks/app/s/[token]/page-2cf9b4a9b7740e56.js +1 -0
- package/.next/static/chunks/app/settings/page-435bfb2ac6f01744.js +1 -0
- package/.next/static/chunks/main-eef923c08f6b5e3c.js +5 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/default-null-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-b0a80080b8e8a17d.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-b0a80080b8e8a17d.js +1 -0
- package/.next/static/css/95077158c5710c9e.css +1 -0
- package/.next/trace +47 -46
- package/.next/trace-build +1 -1
- package/.next/types/app/@modal/(.)settings/page.ts +87 -0
- package/.next/types/routes.d.ts +1 -1
- package/.next/types/validator.ts +9 -0
- package/dist/bin/beacon.js +16 -15
- package/dist/bin/doctor.js +61 -60
- package/dist/bin/hook.js +58 -57
- package/dist/bin/mcp.js +70 -69
- package/dist/bin/plan.js +61 -60
- package/dist/bin/uninstall.js +59 -58
- package/dist/lib/assets.js +55 -20
- package/dist/lib/codex-install.js +62 -61
- package/dist/lib/daemon-boot.js +37 -0
- package/dist/lib/global-install.js +62 -61
- package/package.json +1 -1
- package/.next/server/chunks/2994.js +0 -2
- package/.next/server/chunks/374.js +0 -1
- package/.next/server/chunks/5295.js +0 -1
- package/.next/server/chunks/7350.js +0 -1
- package/.next/server/chunks/7652.js +0 -1
- package/.next/static/chunks/1909-98243a0473be2aae.js +0 -1
- package/.next/static/chunks/3908-80efc60050779adf.js +0 -1
- package/.next/static/chunks/4477-cda153702c7812d2.js +0 -1
- package/.next/static/chunks/4607-a668ea431c41e60e.js +0 -1
- package/.next/static/chunks/4853-0082a1e1b820a293.js +0 -1
- package/.next/static/chunks/5520-32e29b8bbff59f44.js +0 -1
- package/.next/static/chunks/5697-5b9719b81806b4cf.js +0 -1
- package/.next/static/chunks/7424-d7fa15ef452064dd.js +0 -1
- package/.next/static/chunks/app/_global-error/page-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/ask/answer/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/ask/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/ask/verdict/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/board-annotations/[id]/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/board-annotations/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/board-layout/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/bug-flags/[id]/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/bug-flags/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/changes/comment/answer/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/changes/comment/claim/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/changes/comment/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/changes/quality/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/changes/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/changes/viewed/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/code-graph/position/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/code-graph/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/context/feature/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/context/file/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/context/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/db/arrange/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/db/backfill-access/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/db/position/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/db/prune-planned/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/db/reconcile-endpoints/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/db/relations/[id]/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/db/tables/[id]/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/draft/approve/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/draft/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/draft/status/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/edges/[id]/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/edges/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/endpoints/[id]/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/entities/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/ingest/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/init/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/lesson/close/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/lesson/presence/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/lesson/questions/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/lesson/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/lesson/save/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/lesson/verdict/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/linear/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/linear/scopes/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/linear/sync/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/map/describe/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/map/files/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/map/finish/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/map/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/map/start/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/map/touch-active/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/mention-search/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/nodes/[id]/position/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/nodes/[id]/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/nodes/positions/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/nodes/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/nodes/subtasks/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/notes/[id]/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/notes/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/open/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/plan/annotations/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/plan/approve/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/plan/history/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/plan/markdown/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/plan/presence/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/plan/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/plan/verdict/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/preferences/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/project-meta/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/reset/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/scope-guard/check/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/share/create/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/share/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/stream/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/tab/nav/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/tab/presence/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/tab/view/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/telemetry/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/telemetry/stats/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/version/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/workspace/activate/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/api/workspace/route-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/app/layout-e728d45f193e3b95.js +0 -1
- package/.next/static/chunks/app/learn/page-fc0bf8bce602526b.js +0 -7
- package/.next/static/chunks/app/map/page-847b374e7dfed924.js +0 -1
- package/.next/static/chunks/app/page-ec00130a7a249f14.js +0 -1
- package/.next/static/chunks/app/plan/page-1108bdf804b8a1bd.js +0 -11
- package/.next/static/chunks/app/s/[token]/page-2fc7806fc2f205a5.js +0 -1
- package/.next/static/chunks/app/settings/page-7e86fd456b92c248.js +0 -1
- package/.next/static/chunks/main-4140465958bbcd36.js +0 -5
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-18eb7d6678dc0ddd.js +0 -1
- package/.next/static/css/6eabb17c2a2081f2.css +0 -1
- package/.next/static/zI2f5SCpeUG4MfjJNbXnf/_buildManifest.js +0 -1
- /package/.next/static/{zI2f5SCpeUG4MfjJNbXnf → 32-hn-zWkepUstH6QZVnt}/_ssgManifest.js +0 -0
package/dist/bin/hook.js
CHANGED
|
@@ -1,22 +1,57 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
// @bun
|
|
3
|
-
var
|
|
3
|
+
var IZ=Object.defineProperty;var AZ=(Q)=>Q;function DZ(Q,Z){this[Q]=AZ.bind(null,Z)}var zQ=(Q,Z)=>{for(var $ in Z)IZ(Q,$,{get:Z[$],enumerable:!0,configurable:!0,set:DZ.bind(Z,$)})};var w=(Q,Z)=>()=>(Q&&(Z=Q(Q=0)),Z);import{existsSync as T,mkdirSync as XQ,readdirSync as bZ,readFileSync as R,rmSync as fZ,writeFileSync as y}from"fs";import{basename as EZ,dirname as fQ,join as B}from"path";function EQ(){return!!process.env.CLAUDE_PLUGIN_ROOT}function yQ(Q=process.env.HOME||process.env.USERPROFILE||""){if(!Q)return null;let Z=B(Q,".claude","plugins");if(!T(Z))return null;let $=[Z];for(let J=0;J<3&&$.length;J++){let Y=[];for(let V of $){let q=B(V,".claude-plugin","plugin.json");try{if(T(q)&&JSON.parse(R(q,"utf8")).name==="beacon")return V}catch{}try{for(let W of bZ(V,{withFileTypes:!0}))if(W.isDirectory())Y.push(B(V,W.name))}catch{}}$=Y}return null}function kQ(Q){return yQ(Q)!==null}function yZ(Q){return/[\\/]\.claude[\\/]plugins[\\/]/.test(Q)}function v(){let Q=process.env.BEACON_CLI_PATH;if(Q)return Q;if(T(bQ))return bQ;return"beacon"}function UQ(Q){let Z=Q.indexOf(" ");return Z===-1?Q:Q.slice(0,Z)}function k(Q){let Z=v();if(Z==="beacon")return Q;return Q.replace(/^beacon(\s|$)/,`${Z}$1`)}function K(Q){let Z=UQ(Q);return EZ(Z)+Q.slice(Z.length)}function kZ(Q=process.env.HOME||process.env.USERPROFILE||""){if(!Q)return null;try{let Z=JSON.parse(R(B(Q,".claude","plugins","installed_plugins.json"),"utf8"));for(let $ of Object.keys(Z.plugins??{}))if(/^beacon@/.test($))return{key:$,marketplace:$.split("@")[1]??""}}catch{}return null}function _(Q){try{return JSON.parse(R(Q,"utf8"))}catch{return{}}}function LQ(Q,Z){XQ(fQ(Q),{recursive:!0}),y(Q,JSON.stringify(Z,null,2)+`
|
|
4
|
+
`)}function S(Q,Z){let $=_(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)=>K(q.command)===K(Z.command))))return!1;return J.push({matcher:Z.matcher,hooks:[{type:"command",command:Z.command}]}),LQ(Q,$),!0}function h(Q,Z){return(_(Q).hooks?.[Z.event]??[]).some((Y)=>Y.hooks?.some((V)=>K(V.command)===K(Z.command)))}function _Q(Q,Z){let J=_(Q).hooks?.[Z.event]??[];for(let Y of J)for(let V of Y.hooks??[])if(K(V.command)===K(Z.command))return V.command;return null}function p(Q,Z){let $=_(Q),J=$.hooks?.[Z.event];if(!J)return!1;let Y=!1,V=J.map((q)=>{let W=q.hooks?.length??0,z=(q.hooks??[]).filter((U)=>K(U.command)!==K(Z.command));if(z.length!==W)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 LQ(Q,$),!0}function m(Q,Z,$,J){let Y=`${Z}
|
|
5
|
+
${J.trim()}
|
|
6
|
+
${$}`,V="";try{V=R(Q,"utf8")}catch{}let q=new RegExp(`${Z}[\\s\\S]*?${$}`);V=q.test(V)?V.replace(q,Y):V.trim()?`${V.trim()}
|
|
7
|
+
|
|
8
|
+
${Y}
|
|
9
|
+
`:`${Y}
|
|
10
|
+
`,XQ(fQ(Q),{recursive:!0}),y(Q,V.endsWith(`
|
|
11
|
+
`)?V:`${V}
|
|
12
|
+
`)}function g(Q,Z){try{return R(Q,"utf8").includes(Z)}catch{return!1}}function c(Q,Z,$){let J="";try{J=R(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,`
|
|
13
|
+
|
|
14
|
+
`).trimStart();return y(Q,V),!0}function l(Q,Z,$){let J=B(Q,Z);XQ(J,{recursive:!0});let Y=B(J,"SKILL.md");return y(Y,$),Y}function O(Q,Z){return T(B(Q,Z,"SKILL.md"))}function d(Q,Z){let $=B(Q,Z);if(!T($))return!1;return fZ($,{recursive:!0,force:!0}),!0}var N,bQ="/Applications/Beacon.app/Contents/Resources/bin/beacon",L=`## Beacon (visual planning panel)
|
|
15
|
+
|
|
16
|
+
This machine has Beacon installed \u2014 a local visual planning surface for the terminal-side
|
|
17
|
+
agent. Beacon proposes feature plans (roadmap features + DB schema + endpoints) via MCP,
|
|
18
|
+
the user reviews on a canvas at /plan, and feedback flows back as the next round.
|
|
19
|
+
|
|
20
|
+
**When to invoke**
|
|
21
|
+
- User asks to "plan a feature" / "design a schema" \u2192 if the \`beacon_propose_plan\`
|
|
22
|
+
MCP tool is available, design the plan and call it. If it is NOT available, the panel
|
|
23
|
+
isn't wired in this repo \u2014 run \`beacon\` here once, then retry.
|
|
24
|
+
- User asks to "set up Beacon" / "map this repo" \u2192 invoke the \`beacon-init\` skill.
|
|
25
|
+
- User asks to "refresh Beacon" / "update the map" / "bring Beacon up to date" \u2192 invoke
|
|
26
|
+
the \`beacon-refresh\` skill. Re-surveys the repo and updates init-derived nodes while
|
|
27
|
+
preserving anything the user added by hand.
|
|
28
|
+
- User asks to "explain" / "teach me" / "walk me through" / "how does X work" \u2192 if the
|
|
29
|
+
\`beacon_explain\` MCP tool is available, author an interactive Lesson (a concept map +
|
|
30
|
+
plain-English narrative on /learn the user questions back) via the \`beacon-explain\` skill.
|
|
31
|
+
- Run \`beacon doctor\` to audit what's wired (global hooks, repo's .mcp.json, AGENTS.md block).
|
|
32
|
+
|
|
33
|
+
**The plan feedback loop**
|
|
34
|
+
\`beacon_propose_plan\` BLOCKS until the user clicks Approve / Discard / submits feedback.
|
|
35
|
+
Feedback bundles inline annotations on the markdown PLUS any edits the user made directly
|
|
36
|
+
on the /map and /db boards (added features, attached subtasks, edited columns, new
|
|
37
|
+
endpoints). Treat board edits as the user's revision intent \u2014 re-propose matching them
|
|
38
|
+
verbatim. Do NOT implement until the tool returns approval.`;var s=w(()=>{N=["beacon-init","beacon-refresh","beacon-plan","beacon-explain"]});var z1=1500,X1=480000,U1=1800000,t=3600000,W1=3000;var SQ=()=>{};var xQ={};zQ(xQ,{stripAgentsPointer:()=>cQ,repoMcpCliTarget:()=>dZ,removeRepoAssets:()=>tZ,installRefreshSkill:()=>_Z,installPlanSkill:()=>SZ,installInitSkill:()=>LZ,installExplainSkill:()=>hZ,installCodexRepoSkills:()=>mZ,ensureWorkflowDoc:()=>cZ,ensureMcp:()=>lZ,contextDocTargets:()=>GQ,auditRepo:()=>sZ,REFRESH_SKILL:()=>HQ,PLAN_SKILL:()=>pQ,INIT_SKILL:()=>WQ,EXPLAIN_SKILL:()=>mQ});import{existsSync as j,mkdirSync as I,readFileSync as G,rmSync as n,writeFileSync as H}from"fs";import{join as X}from"path";function LZ(Q){let Z=X(Q,".claude","skills","beacon-init");I(Z,{recursive:!0});let $=X(Z,"SKILL.md");return H($,WQ),$}function _Z(Q){let Z=X(Q,".claude","skills","beacon-refresh");I(Z,{recursive:!0});let $=X(Z,"SKILL.md");return H($,HQ),$}function SZ(Q){let Z=X(Q,".claude","skills","beacon-plan");I(Z,{recursive:!0});let $=X(Z,"SKILL.md");return H($,pQ),$}function hZ(Q){let Z=X(Q,".claude","skills","beacon-explain");I(Z,{recursive:!0});let $=X(Z,"SKILL.md");return H($,mQ),$}function mZ(Q){let Z=[];for(let $ of pZ){let J=X(Q,".agents","skills",$.name);I(J,{recursive:!0});let Y=X(J,"SKILL.md");H(Y,$.body()),Z.push(Y)}return Z}function GQ(Q){let Z=X(Q,"AGENTS.md"),$=X(Q,"CLAUDE.md"),J=j(Z),Y=j($);if(!J&&!Y)return[Z,$];let V=[];if(J)V.push(Z);if(Y)V.push($);return V}function cQ(Q){let Z=X(Q,"CLAUDE.md");if(!j(Z))return;let $=G(Z,"utf8"),J=$.split(`
|
|
4
39
|
`).filter((Y)=>!/^\s*@\.?\/?AGENTS\.md\s*$/.test(Y)).join(`
|
|
5
40
|
`).trim();if(J&&J!==$.trim())H(Z,`${J}
|
|
6
|
-
`)}function
|
|
41
|
+
`)}function cZ(Q){let Z=new RegExp(`${r}[\\s\\S]*?${jQ}`);for(let $ of GQ(Q)){let J="";try{J=G($,"utf8")}catch{}J=Z.test(J)?J.replace(Z,hQ):`${J.trim()}
|
|
7
42
|
|
|
8
|
-
${
|
|
43
|
+
${hQ}
|
|
9
44
|
`.trimStart(),H($,J.endsWith(`
|
|
10
45
|
`)?J:`${J}
|
|
11
|
-
`)}
|
|
12
|
-
`),{path:Z,added:!1,updated:!0};return{path:Z,added:!1,updated:!1}}return $.mcpServers.beacon={command:
|
|
13
|
-
`),{path:Z,added:!0,updated:!1}}function
|
|
14
|
-
`)}}catch{}let Y=!1,V=new RegExp(`\\n?${
|
|
46
|
+
`)}cQ(Q)}function lZ(Q){let Z=X(Q,".mcp.json"),$={};try{$=JSON.parse(G(Z,"utf8"))}catch{}$.mcpServers=$.mcpServers??{};let J=$.mcpServers.beacon;if(J){if(!J.timeout||J.timeout<t)return J.timeout=t,H(Z,JSON.stringify($,null,2)+`
|
|
47
|
+
`),{path:Z,added:!1,updated:!0};return{path:Z,added:!1,updated:!1}}return $.mcpServers.beacon={command:v(),args:["mcp"],timeout:t},H(Z,JSON.stringify($,null,2)+`
|
|
48
|
+
`),{path:Z,added:!0,updated:!1}}function dZ(Q){try{return JSON.parse(G(X(Q,".mcp.json"),"utf8")).mcpServers?.beacon?.command??null}catch{return null}}function sZ(Q){let Z=X(Q,".mcp.json"),$=!1;try{$=!!JSON.parse(G(Z,"utf8")).mcpServers?.beacon}catch{}let J=GQ(Q).some((Y)=>{try{return G(Y,"utf8").includes(r)}catch{return!1}});return{repo:Q,mcpRegistered:$,workflowBlock:J,skills:{"beacon-init":j(X(Q,".claude","skills","beacon-init","SKILL.md")),"beacon-refresh":j(X(Q,".claude","skills","beacon-refresh","SKILL.md"))},codexSkills:{"beacon-init":j(X(Q,".agents","skills","beacon-init","SKILL.md")),"beacon-refresh":j(X(Q,".agents","skills","beacon-refresh","SKILL.md"))}}}function tZ(Q){let Z=[];for(let z of["beacon-init","beacon-refresh","beacon-db-design"]){let U=X(Q,".claude","skills",z);if(j(U))n(U,{recursive:!0,force:!0}),Z.push(z)}for(let z of["beacon-init","beacon-refresh"]){let U=X(Q,".agents","skills",z);if(j(U))n(U,{recursive:!0,force:!0}),Z.push(`codex:${z}`)}let $=!1,J=X(Q,".mcp.json");try{let z=JSON.parse(G(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)n(J,{force:!0});else H(J,JSON.stringify(z,null,2)+`
|
|
49
|
+
`)}}catch{}let Y=!1,V=new RegExp(`\\n?${r}[\\s\\S]*?${jQ}\\n?`);for(let z of[X(Q,"AGENTS.md"),X(Q,"CLAUDE.md")])try{let U=G(z,"utf8");if(V.test(U)){let qQ=U.replace(V,`
|
|
15
50
|
`).replace(/\n{3,}/g,`
|
|
16
51
|
|
|
17
|
-
`).trimStart();H(z,
|
|
18
|
-
`)?
|
|
19
|
-
`),Y=!0}}catch{}let q=!1,W=X(Q,"CLAUDE.md");try{let z=
|
|
52
|
+
`).trimStart();H(z,qQ.endsWith(`
|
|
53
|
+
`)?qQ:`${qQ}
|
|
54
|
+
`),Y=!0}}catch{}let q=!1,W=X(Q,"CLAUDE.md");try{let z=G(W,"utf8"),U=z.replace(/^[ \t]*@AGENTS\.md[ \t]*\n?/m,"");if(U!==z){if(!U.trim())n(W,{force:!0});else H(W,U);q=!0}}catch{}return{skillsRemoved:Z,mcpUnregistered:$,agentsBlockRemoved:Y,claudeImportRemoved:q}}var WQ=`---
|
|
20
55
|
name: beacon-init
|
|
21
56
|
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
57
|
---
|
|
@@ -63,7 +98,7 @@ beacon init-persist /tmp/beacon-init.json # or: beacon init-persist < /tmp/bea
|
|
|
63
98
|
That one command wires the repo (writes \`.mcp.json\` + skills so your NEXT session gets the \`beacon_*\` tools natively, heals the global install), starts the Beacon daemon if it isn't running, registers + provisions this workspace, and POSTs your analysis to the same \`/api/init\` endpoint the MCP tool uses \u2014 so init completes in THIS session. Read the counts it prints and report them.
|
|
64
99
|
|
|
65
100
|
After the tool (or \`beacon init-persist\`) returns, tell the user the counts (components / roadmap / tables / endpoints) and point them at the running Beacon panel.
|
|
66
|
-
`,
|
|
101
|
+
`,HQ=`---
|
|
67
102
|
name: beacon-refresh
|
|
68
103
|
description: Re-survey the repo and update Beacon's architecture / schema / endpoints map after /beacon-init was already run \u2014 picks up new components, removed ones, schema changes, and new routes. Use when the user runs /beacon-refresh or asks to "refresh", "update", "re-sync", or "bring Beacon up to date" with the current code.
|
|
69
104
|
---
|
|
@@ -110,7 +145,7 @@ The one caveat: if the user manually edited an INIT-source node on the canvas (e
|
|
|
110
145
|
If \`beacon_entities\` or \`beacon_init_persist\` isn't available, the Beacon panel isn't running in this repo. Tell the user to run \`beacon\` here first, then re-invoke /beacon-refresh.
|
|
111
146
|
|
|
112
147
|
After the tool returns, report the final counts plus a one-line summary of the diff you surfaced.
|
|
113
|
-
`,
|
|
148
|
+
`,pQ=`---
|
|
114
149
|
name: beacon-plan
|
|
115
150
|
description: Present your current plan or approach to the user on Beacon's /plan canvas for review \u2014 instead of asking for approval in prose. Use when the user says "present the plan", "show me the plan", "let me see it / the plan", or whenever you are about to end a turn asking whether to proceed with a plan, design, or approach.
|
|
116
151
|
---
|
|
@@ -159,7 +194,7 @@ If it returns feedback, revise and call it again.
|
|
|
159
194
|
If \`beacon_present_plan\` isn't available, the panel isn't wired here \u2014 fall back to ExitPlanMode
|
|
160
195
|
with the same \`\`\`beacon block (Claude Code only; Codex has no ExitPlanMode), or tell the user to
|
|
161
196
|
run \`beacon\` in this repo once.
|
|
162
|
-
`,
|
|
197
|
+
`,mQ=`---
|
|
163
198
|
name: beacon-explain
|
|
164
199
|
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".
|
|
165
200
|
---
|
|
@@ -229,7 +264,7 @@ so the learner sees the table IN CONTEXT, wired to the code that uses it.
|
|
|
229
264
|
Every answer must ADD understanding (rationale, trade-off) \u2014 never just restate the question. Expand
|
|
230
265
|
the narrative or add nodes where it helps. Keep looping until the tool reports the user saved or closed
|
|
231
266
|
the lesson.
|
|
232
|
-
`,
|
|
267
|
+
`,pZ,r="<!-- beacon:workflow:start -->",jQ="<!-- beacon:workflow:end -->",hQ;var BQ=w(()=>{s();SQ();pZ=[{name:"beacon-init",body:()=>WQ},{name:"beacon-refresh",body:()=>HQ}];hQ=`${r}
|
|
233
268
|
## Beacon \u2014 feature workflow
|
|
234
269
|
|
|
235
270
|
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:
|
|
@@ -301,53 +336,19 @@ Register them all in that single batched call. If a plan added five features, th
|
|
|
301
336
|
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.
|
|
302
337
|
|
|
303
338
|
Pull raw planning data anytime with \`beacon_entities\` (features / architecture / tables / endpoints).
|
|
304
|
-
${
|
|
305
|
-
`)
|
|
306
|
-
${J.trim()}
|
|
307
|
-
${$}`,V="";try{V=C(Q,"utf8")}catch{}let q=new RegExp(`${Z}[\\s\\S]*?${$}`);V=q.test(V)?V.replace(q,Y):V.trim()?`${V.trim()}
|
|
308
|
-
|
|
309
|
-
${Y}
|
|
310
|
-
`:`${Y}
|
|
311
|
-
`,XQ(EQ(Q),{recursive:!0}),y(Q,V.endsWith(`
|
|
312
|
-
`)?V:`${V}
|
|
313
|
-
`)}function w(Q,Z){try{return C(Q,"utf8").includes(Z)}catch{return!1}}function h(Q,Z,$){let J="";try{J=C(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,`
|
|
314
|
-
|
|
315
|
-
`).trimStart();return y(Q,V),!0}function p(Q,Z,$){let J=G(Q,Z);XQ(J,{recursive:!0});let Y=G(J,"SKILL.md");return y(Y,$),Y}function R(Q,Z){return A(G(Q,Z,"SKILL.md"))}function c(Q,Z){let $=G(Q,Z);if(!A($))return!1;return AZ($,{recursive:!0,force:!0}),!0}var K,k=`## Beacon (visual planning panel)
|
|
316
|
-
|
|
317
|
-
This machine has Beacon installed \u2014 a local visual planning surface for the terminal-side
|
|
318
|
-
agent. Beacon proposes feature plans (roadmap features + DB schema + endpoints) via MCP,
|
|
319
|
-
the user reviews on a canvas at /plan, and feedback flows back as the next round.
|
|
320
|
-
|
|
321
|
-
**When to invoke**
|
|
322
|
-
- User asks to "plan a feature" / "design a schema" \u2192 if the \`beacon_propose_plan\`
|
|
323
|
-
MCP tool is available, design the plan and call it. If it is NOT available, the panel
|
|
324
|
-
isn't wired in this repo \u2014 run \`beacon\` here once, then retry.
|
|
325
|
-
- User asks to "set up Beacon" / "map this repo" \u2192 invoke the \`beacon-init\` skill.
|
|
326
|
-
- User asks to "refresh Beacon" / "update the map" / "bring Beacon up to date" \u2192 invoke
|
|
327
|
-
the \`beacon-refresh\` skill. Re-surveys the repo and updates init-derived nodes while
|
|
328
|
-
preserving anything the user added by hand.
|
|
329
|
-
- User asks to "explain" / "teach me" / "walk me through" / "how does X work" \u2192 if the
|
|
330
|
-
\`beacon_explain\` MCP tool is available, author an interactive Lesson (a concept map +
|
|
331
|
-
plain-English narrative on /learn the user questions back) via the \`beacon-explain\` skill.
|
|
332
|
-
- Run \`beacon doctor\` to audit what's wired (global hooks, repo's .mcp.json, AGENTS.md block).
|
|
333
|
-
|
|
334
|
-
**The plan feedback loop**
|
|
335
|
-
\`beacon_propose_plan\` BLOCKS until the user clicks Approve / Discard / submits feedback.
|
|
336
|
-
Feedback bundles inline annotations on the markdown PLUS any edits the user made directly
|
|
337
|
-
on the /map and /db boards (added features, attached subtasks, edited columns, new
|
|
338
|
-
endpoints). Treat board edits as the user's revision intent \u2014 re-propose matching them
|
|
339
|
-
verbatim. Do NOT implement until the tool returns approval.`;var WQ=v(()=>{K=["beacon-init","beacon-refresh","beacon-plan","beacon-explain"]});import{mkdirSync as LZ,renameSync as _Z,rmSync as SZ,writeFileSync as mZ}from"fs";import{dirname as hZ}from"path";function d(Q,Z){LZ(hZ(Q),{recursive:!0});let $=`${Q}.tmp`;try{mZ($,Z),_Z($,Q)}catch(J){throw SZ($,{force:!0}),J}}function Z1(Q,Z,$=!1){d(Q,JSON.stringify(Z,null,$?2:void 0))}var _Q=()=>{};var nQ={};ZQ(nQ,{setupCodexAssets:()=>lZ,removeCodexMcp:()=>lQ,removeCodexArtifacts:()=>aZ,hasCodexMcp:()=>xQ,ensureCodexMcp:()=>dQ,codexMcpProblem:()=>dZ,codexDetected:()=>hQ,auditCodex:()=>nZ,CODEX_HOOKS:()=>t});import{readFileSync as s}from"fs";import{homedir as pZ}from"os";import{join as g}from"path";function SQ(){return process.env.HOME||process.env.USERPROFILE||pZ()}function hQ(){if(process.env.BEACON_CODEX==="1")return!0;if(process.env.BEACON_CODEX==="0")return!1;if(HQ===void 0)HQ=Bun.which("codex")!==null;return HQ}function F(Q){try{return Bun.TOML.parse(Q)}catch{return null}}function xQ(){try{return Boolean(F(s(M(),"utf8"))?.mcp_servers?.beacon)}catch{return!1}}function dZ(){let Q="";try{Q=s(M(),"utf8")}catch{return null}let Z=F(Q);if(!Z)return`~/.codex/config.toml does not parse \u2014 ${T}`;if(Z.mcp_servers?.beacon)return null;if(/^\s*mcp_servers\s*=/m.test(Q))return`mcp_servers is an inline table \u2014 ${T}`;return null}function dQ(){let Q="",Z=!1;try{Q=s(M(),"utf8"),Z=!0}catch{}if(Z){let V=F(Q);if(!V)return{added:!1,error:`~/.codex/config.toml does not parse \u2014 ${T}`};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 ${T}`}}let $=!Q?"":Q.endsWith(`
|
|
339
|
+
${jQ}`});import{mkdirSync as nZ,renameSync as rZ,rmSync as aZ,writeFileSync as oZ}from"fs";import{dirname as iZ}from"path";function a(Q,Z){nZ(iZ(Q),{recursive:!0});let $=`${Q}.tmp`;try{oZ($,Z),rZ($,Q)}catch(J){throw aZ($,{force:!0}),J}}function P1(Q,Z,$=!1){a(Q,JSON.stringify(Z,null,$?2:void 0))}var lQ=()=>{};var ZZ={};zQ(ZZ,{setupCodexAssets:()=>z0,removeCodexMcp:()=>QZ,removeCodexArtifacts:()=>U0,parseTomlBeacon:()=>iQ,nodeWhich:()=>tQ,hasCodexMcp:()=>vQ,ensureCodexMcp:()=>eQ,commandExists:()=>nQ,codexMcpProblem:()=>V0,codexMcpCliTarget:()=>q0,codexDetected:()=>rQ,auditCodex:()=>X0,CODEX_HOOKS:()=>QQ});import{accessSync as eZ,constants as Q0,readFileSync as D}from"fs";import{homedir as Z0}from"os";import{delimiter as $0,join as C}from"path";function dQ(){return process.env.HOME||process.env.USERPROFILE||Z0()}function tQ(Q,Z=process.env.PATH||"",$=J0){if(!Q)return null;for(let J of Z.split($0)){if(!J)continue;let Y=C(J,Q);if($(Y))return Y}return null}function J0(Q){try{return eZ(Q,Q0.X_OK),!0}catch{return!1}}function nQ(Q){if(typeof Bun<"u"&&typeof Bun.which==="function")return Bun.which(Q)!==null;return tQ(Q)!==null}function rQ(){if(process.env.BEACON_CODEX==="1")return!0;if(process.env.BEACON_CODEX==="0")return!1;if(KQ===void 0)KQ=nQ("codex");return KQ}function iQ(Q){let Z={},$=!1;for(let J of Q.split(`
|
|
340
|
+
`)){let Y=J.trim();if(!Y||Y.startsWith("#"))continue;let V=/^\[([^\]]+)\]/.exec(Y);if(V){if($=V[1].trim()==="mcp_servers.beacon",$)Z.mcp_servers=Z.mcp_servers??{},Z.mcp_servers.beacon=Z.mcp_servers.beacon??{};continue}if($){let q=/^command\s*=\s*["']([^"']*)["']/.exec(Y);if(q)Z.mcp_servers.beacon.command=q[1]}}return Z}function F(Q){try{if(typeof Bun<"u"&&Bun.TOML?.parse)return Bun.TOML.parse(Q);return iQ(Q)}catch{return null}}function vQ(){try{return Boolean(F(D(M(),"utf8"))?.mcp_servers?.beacon)}catch{return!1}}function V0(){let Q="";try{Q=D(M(),"utf8")}catch{return null}let Z=F(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 eQ(){let Q="",Z=!1;try{Q=D(M(),"utf8"),Z=!0}catch{}if(Z){let V=F(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(`
|
|
340
341
|
`)?`
|
|
341
342
|
`:`
|
|
342
343
|
|
|
343
|
-
`,J=Q+$+
|
|
344
|
-
`),$=Z.indexOf(
|
|
344
|
+
`,J=Q+$+Y0();if(F(J)?.mcp_servers?.beacon?.command!==v())return{added:!1,error:`could not safely append [mcp_servers.beacon] \u2014 ${A}`};return a(M(),J),{added:!0}}function q0(){try{return F(D(M(),"utf8"))?.mcp_servers?.beacon?.command??null}catch{return null}}function QZ(){let Q="";try{Q=D(M(),"utf8")}catch{return{removed:!1}}let Z=Q.split(`
|
|
345
|
+
`),$=Z.indexOf(aQ);if($===-1)return{removed:!1,skipped:vQ()};let J=Z.indexOf(oQ,$);if(J===-1)return{removed:!1,skipped:!0};Z.splice($,J-$+1);let Y=Z.join(`
|
|
345
346
|
`).replace(/\n{3,}/g,`
|
|
346
347
|
|
|
347
|
-
`).replace(/^\n+/,"");if(F(Y)===null)return{removed:!1,skipped:!0};return
|
|
348
|
+
`).replace(/^\n+/,"");if(F(Y)===null)return{removed:!1,skipped:!0};return a(M(),Y),{removed:!0}}async function z0(){let{INIT_SKILL:Q,REFRESH_SKILL:Z,PLAN_SKILL:$,EXPLAIN_SKILL:J}=await Promise.resolve().then(() => (BQ(),xQ)),Y={"beacon-init":Q,"beacon-refresh":Z,"beacon-plan":$,"beacon-explain":J},V=[];for(let U of N){if(!O(i(),U))V.push(U);l(i(),U,Y[U])}let q=0;for(let U of QQ)if(S(PQ(),{event:U.event,matcher:U.matcher,command:k(U.command)}))q++;let W=g(o(),e);m(o(),e,sQ,L);let z=eQ();return{skillsAdded:V,hooksAdded:q,agentsMdBlockTouched:!W,mcp:z}}function X0(){let Q={};for(let $ of N)Q[$]=O(i(),$);let Z={};for(let $ of QQ)Z[$.event]=h(PQ(),{event:$.event,command:$.command});return{detected:rQ(),skills:Q,hooks:Z,agentsMdBlock:g(o(),e),mcp:vQ()}}function U0(){let Q=[];for(let Y of N)if(d(i(),Y))Q.push(Y);let Z=0;for(let Y of QQ)if(p(PQ(),{event:Y.event,command:Y.command}))Z++;let $=c(o(),e,sQ),J=QZ();return{skillsRemoved:Q,hooksRemoved:Z,agentsMdBlockRemoved:$,mcpRemoved:J.removed,mcpSkipped:J.skipped}}var NQ=()=>C(dQ(),".codex"),PQ=()=>C(NQ(),"hooks.json"),M=()=>C(NQ(),"config.toml"),o=()=>C(NQ(),"AGENTS.md"),i=()=>C(dQ(),".agents","skills"),e="<!-- beacon:global:start -->",sQ="<!-- beacon:global:end -->",QQ,KQ,aQ="# beacon:start (managed by Beacon \u2014 `beacon uninstall` removes this block)",oQ="# beacon:end",Y0=()=>`${aQ}
|
|
348
349
|
[mcp_servers.beacon]
|
|
349
|
-
command = "
|
|
350
|
+
command = "${v()}"
|
|
350
351
|
args = ["mcp"]
|
|
351
|
-
${
|
|
352
|
-
`});var eQ={};ZQ(eQ,{provisionDb:()=>P0});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 CQ,join as H0}from"path";import{fileURLToPath as B0}from"url";async function i(Q,Z){return(await Q.execute({sql:"SELECT 1 FROM sqlite_master WHERE type='table' AND name = ?",args:[Z]})).rows.length>0}async function K0(Q,Z){let $=await Q.execute(`PRAGMA table_info("${Z}")`);return new Set($.rows.map((J)=>String(J.name)))}async function iQ(Q){if(!await i(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 N0(Q){for(let[Z,$]of Object.entries(G0)){if(!await i(Q,Z))continue;let J=await K0(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 P0(Q,Z=x0){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 i($,"__drizzle_migrations"),Y=await i($,"Node"),V=!1;if(Y&&!J){let W=W0({migrationsFolder:Z})[0];if(W)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:[W.hash,W.folderMillis]}),V=!0}let q=await iQ($);if(await U0(X0($),{migrationsFolder:Z}),await iQ($)>q)V=!0;return await N0($),{migrated:V}}finally{$.close()}}var j0,x0,G0;var QZ=v(async()=>{j0=CQ(CQ(CQ(B0(import.meta.url)))),x0=process.env.BEACON_MIGRATIONS_DIR||H0(j0,"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 sZ}from"fs";import{homedir as tZ}from"os";import{join as r}from"path";function rZ(){return process.env.HOME||process.env.USERPROFILE||tZ()}var o=()=>r(rZ(),".claude"),GQ=()=>r(o(),"skills"),KQ=()=>r(o(),"settings.json"),NQ=()=>r(o(),"CLAUDE.md"),PQ="<!-- beacon:global:start -->",sQ="<!-- beacon:global:end -->";var oZ=k,vQ=[{event:"PreToolUse",matcher:"Edit|Write|MultiEdit",command:"beacon guard",description:"Gate edits against the active plan's scope contract: in-scope \u2192 allow, off-scope \u2192 ask the user to authorize. Fail-open when there's no active contract."},{event:"PostToolUse",matcher:"Edit|Write|MultiEdit",command:"beacon hook",description:"Report file edits to Beacon's active feature so the map stays fresh."},{event:"PermissionRequest",matcher:"ExitPlanMode",command:"beacon plan",description:"Pipe the agent's plan markdown into Beacon's /plan canvas for review."},{event:"PreToolUse",matcher:"AskUserQuestion",command:"beacon ask",description:"Surface the agent's AskUserQuestion in Beacon's modal; your pick flows back as the answer (falls through to the terminal if Beacon isn't open)."},{event:"PermissionRequest",matcher:"Edit|Write|MultiEdit|Bash|NotebookEdit",command:"beacon ask",description:"Surface edit/create/run approvals in Beacon's modal; your allow/deny flows back (falls through to the terminal prompt if Beacon isn't open)."},{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 p(GQ(),Q,Z)}function tQ(Q){return R(GQ(),Q)}function eZ(Q){return c(GQ(),Q)}function Q0(Q){return L(KQ(),Q)}function Z0(Q){return _(KQ(),Q)}function $0(Q){return S(KQ(),Q)}function J0(Q){m(NQ(),PQ,sQ,Q)}function rQ(){return w(NQ(),PQ)}function Y0(){return h(NQ(),PQ,sQ)}function B1(){let Q={};for(let $ of K)Q[$]=tQ($);let Z={};for(let $ of vQ)Z[$.event]=Z0({event:$.event,command:$.command});return{homeExists:sZ(o()),skills:Q,hooks:Z,claudeMdBlock:rQ()}}async function V0(){let{INIT_SKILL:Q,REFRESH_SKILL:Z,PLAN_SKILL:$,EXPLAIN_SKILL:J}=await Promise.resolve().then(() => (qQ(),zQ)),Y={"beacon-init":Q,"beacon-refresh":Z,"beacon-plan":$,"beacon-explain":J},V=[];for(let z of K){if(!tQ(z))V.push(z);iZ(z,Y[z])}let q=0;for(let z of vQ)if(Q0({event:z.event,matcher:z.matcher,command:z.command}))q++;let W=rQ();return J0(oZ),{skillsAdded:V,hooksAdded:q,claudeMdBlockTouched:!W}}async function oQ(){if(AQ())return{ok:!0,skipped:"plugin",skillsAdded:[],hooksAdded:0,claudeMdBlockTouched:!1};let Q;if(kQ()){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(() => (aQ(),nQ));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 K)if(eZ(J))Q.push(J);let Z=0;for(let J of vQ)if($0(J))Z++;let $=Y0();return{skillsRemoved:Q,hooksRemoved:Z,claudeMdBlockRemoved:$}}import{AsyncLocalStorage as v0}from"async_hooks";import{spawnSync as C0}from"child_process";import{createHash as M0}from"crypto";import{existsSync as $Z,mkdirSync as b,readFileSync as uQ,writeFileSync as wQ}from"fs";import{homedir as JZ}from"os";import{basename as u0,join as N,parse as w0,resolve as ZZ}from"path";function j(){return process.env.BEACON_HOME||N(JZ(),".beacon")}function RQ(){return N(j(),"workspaces.json")}function O(Q){return M0("sha256").update(Q).digest("hex").slice(0,12)}function R0(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 YZ(Q){let Z=ZZ(Q);return Z!==ZZ(JZ())&&Z!==w0(Z).root}function VZ(){return N(j(),"deleted.json")}function TQ(){try{let Q=JSON.parse(uQ(VZ(),"utf8"));return Array.isArray(Q)?Q:[]}catch{return[]}}function zZ(Q){b(j(),{recursive:!0}),wQ(VZ(),JSON.stringify(Q,null,2))}function qZ(Q){return TQ().includes(Q)}function F1(Q){let Z=TQ();if(!Z.includes(Q))zZ([...Z,Q])}function T0(Q){let Z=TQ();if(Z.includes(Q))zZ(Z.filter(($)=>$!==Q))}function e(Q){return N(j(),Q)}function F0(Q){return`file:${N(e(Q),"db.sqlite")}`}function I(){try{let Q=JSON.parse(uQ(RQ(),"utf8"));return Array.isArray(Q)?Q:[]}catch{return[]}}function FQ(Q){b(j(),{recursive:!0}),wQ(RQ(),JSON.stringify(Q,null,2))}function XZ(){return I().sort((Q,Z)=>Z.lastOpenedAt.localeCompare(Q.lastOpenedAt))}function P(Q){return I().find((Z)=>Z.id===Q)??null}function UZ(Q,Z,$=new Date().toISOString()){if(!YZ(Q))throw Error(`beacon: refusing to register a non-repo path as a workspace: ${Q}`);let J=O(Q);if(qZ(J))throw Error(`beacon: workspace ${J} (${Q}) was deleted \u2014 run \`beacon\` or /beacon-init to re-add it`);let Y=I(),V=Y.find((z)=>z.id===J),q={id:J,path:Q,name:Z||V?.name||u0(Q),lastOpenedAt:$},W=[q,...Y.filter((z)=>z.id!==J)];return b(e(J),{recursive:!0}),FQ(W),q}function g1(Q,Z){return T0(O(Q)),UZ(Q,Z)}function O1(Q,Z=new Date().toISOString()){let $=I(),J=$.find((Y)=>Y.id===Q);if(!J)return;J.lastOpenedAt=Z,FQ($)}function b1(Q){if(FQ(I().filter((Z)=>Z.id!==Q)),gQ()===Q)g0(XZ()[0]?.id??null)}function WZ(){return N(j(),"active")}function gQ(){try{return uQ(WZ(),"utf8").trim()||null}catch{return null}}function g0(Q){b(j(),{recursive:!0}),wQ(WZ(),Q??"")}function I1(){let Q=gQ();return Q?P(Q):null}function f1(){let Q=b0()??gQ();return Q?P(Q):null}function D1(Q){return P(Q)?.path??null}function E1(){return $Z(RQ())}var HZ="beacon_ws";function BZ(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&&P(Z))return Z;let $=BZ(Q,HZ);if($&&P($))return $;return O0()}function O0(){let Q=XZ();return Q.length===1?Q[0].id:null}var jZ="x-beacon-workspace-path";function xZ(Q=process.cwd()){let Z=R0(Q);return{"x-beacon-workspace":O(Z),[jZ]:Z}}async function y1(Q){let Z=Q.headers.get("x-beacon-workspace");if(Z&&P(Z))return Z;let $=Q.headers.get(jZ);if($&&YZ($)&&!qZ(O($))&&(!Z||O($)===Z)){let Y=UZ($);return await I0(Y.id),Y.id}let J=BZ(Q,HZ);if(J&&P(J))return J;return null}var GZ=new v0;function k1(Q,Z){return Q?GZ.run(Q,Z):Z()}function b0(){return GZ.getStore()??null}var MQ=new Set;function L1(Q){MQ.delete(N(e(Q),"db.sqlite"))}async function I0(Q){let Z=e(Q),$=N(Z,"db.sqlite"),J=$Z($);if(J&&MQ.has($))return{ok:!0,created:!1,migrated:!1};try{b(Z,{recursive:!0});let{provisionDb:Y}=await QZ().then(() => eQ),V=await Y(F0(Q));return MQ.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)}}}import{connect as f0}from"net";var KZ=4319;function D0(Q,Z,$=400){return new Promise((J)=>{let Y=f0({host:Q,port:Z}),V=!1,q=(W)=>{if(V)return;V=!0,Y.destroy(),J(W)};Y.once("connect",()=>q(!0)),Y.once("error",()=>q(!1)),Y.setTimeout($,()=>q(!1))})}async function E0(Q){for(let Z of["127.0.0.1","::1"])if(await D0(Z,Q))return!1;return!0}async function m1(Q,Z=20){for(let $=Q;$<Q+Z;$++)if(await E0($))return $;return Q}import{resolve as A0}from"path";var y0="*** Begin Patch",k0=/^\*\*\* (Update File|Add File|Move to): (.+)$/;function L0(Q){let Z=[];for(let $ of Q.split(`
|
|
353
|
-
`)){let J=
|
|
352
|
+
${oQ}
|
|
353
|
+
`,A="add it manually: codex mcp add beacon -- beacon mcp";var $Z=w(()=>{s();lQ();QQ=[{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."}]});var XZ={};zQ(XZ,{provisionDb:()=>E0});import{createClient as R0}from"@libsql/client";import{drizzle as F0}from"drizzle-orm/libsql";import{migrate as C0}from"drizzle-orm/libsql/migrator";import{readMigrationFiles as T0}from"drizzle-orm/migrator";import{dirname as FQ,join as g0}from"path";import{fileURLToPath as O0}from"url";async function YQ(Q,Z){return(await Q.execute({sql:"SELECT 1 FROM sqlite_master WHERE type='table' AND name = ?",args:[Z]})).rows.length>0}async function b0(Q,Z){let $=await Q.execute(`PRAGMA table_info("${Z}")`);return new Set($.rows.map((J)=>String(J.name)))}async function zZ(Q){if(!await YQ(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 f0(Q){for(let[Z,$]of Object.entries(D0)){if(!await YQ(Q,Z))continue;let J=await b0(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 E0(Q,Z=A0){let $=R0({url:Q});try{await $.execute("PRAGMA journal_mode = WAL;"),await $.execute("PRAGMA foreign_keys = ON;"),await $.execute("PRAGMA busy_timeout = 5000;");let J=await YQ($,"__drizzle_migrations"),Y=await YQ($,"Node"),V=!1;if(Y&&!J){let W=T0({migrationsFolder:Z})[0];if(W)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:[W.hash,W.folderMillis]}),V=!0}let q=await zZ($);if(await C0(F0($),{migrationsFolder:Z}),await zZ($)>q)V=!0;return await f0($),{migrated:V}}finally{$.close()}}var I0,A0,D0;var UZ=w(async()=>{I0=FQ(FQ(FQ(O0(import.meta.url)))),A0=process.env.BEACON_MIGRATIONS_DIR||g0(I0,"drizzle"),D0={Node:["createdAt","updatedAt"],Note:["createdAt","updatedAt"],DbTable:["createdAt","updatedAt"],Endpoint:["createdAt","updatedAt"],DraftTable:["createdAt"],SyncState:["codeGraphSyncedAt","updatedAt"],AppSetting:["updatedAt"],ProjectMeta:["updatedAt"],CodeFile:["updatedAt"]}});s();import{existsSync as W0}from"fs";import{homedir as H0}from"os";import{join as ZQ}from"path";function j0(){return process.env.HOME||process.env.USERPROFILE||H0()}var $Q=()=>ZQ(j0(),".claude"),MQ=()=>ZQ($Q(),"skills"),JQ=()=>ZQ($Q(),"settings.json"),uQ=()=>ZQ($Q(),"CLAUDE.md"),wQ="<!-- beacon:global:start -->",JZ="<!-- beacon:global:end -->";var G0=L,RQ=[{event:"PreToolUse",matcher:"Edit|Write|MultiEdit",command:"beacon guard",description:"Gate edits against the active plan's scope contract: in-scope \u2192 allow, off-scope \u2192 ask the user to authorize. Fail-open when there's no active contract."},{event:"PostToolUse",matcher:"Edit|Write|MultiEdit",command:"beacon hook",description:"Report file edits to Beacon's active feature so the map stays fresh."},{event:"PermissionRequest",matcher:"ExitPlanMode",command:"beacon plan",description:"Pipe the agent's plan markdown into Beacon's /plan canvas for review."},{event:"PreToolUse",matcher:"AskUserQuestion",command:"beacon ask",description:"Surface the agent's AskUserQuestion in Beacon's modal; your pick flows back as the answer (falls through to the terminal if Beacon isn't open)."},{event:"PermissionRequest",matcher:"Edit|Write|MultiEdit|Bash|NotebookEdit",command:"beacon ask",description:"Surface edit/create/run approvals in Beacon's modal; your allow/deny flows back (falls through to the terminal prompt if Beacon isn't open)."},{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 x0(Q,Z){return l(MQ(),Q,Z)}function YZ(Q){return O(MQ(),Q)}function B0(Q){return d(MQ(),Q)}function K0(Q){return S(JQ(),Q)}function N0(Q){return h(JQ(),Q)}function P0(Q){return p(JQ(),Q)}function v0(Q){m(uQ(),wQ,JZ,Q)}function VZ(){return g(uQ(),wQ)}function M0(){return c(uQ(),wQ,JZ)}function I1(){let Q={};for(let $ of N)Q[$]=YZ($);let Z={};for(let $ of RQ)Z[$.event]=N0({event:$.event,command:$.command});return{homeExists:W0($Q()),skills:Q,hooks:Z,claudeMdBlock:VZ()}}function A1(){let Q=_Q(JQ(),{event:"PostToolUse",command:"beacon hook"});return Q?UQ(Q):null}async function u0(){let{INIT_SKILL:Q,REFRESH_SKILL:Z,PLAN_SKILL:$,EXPLAIN_SKILL:J}=await Promise.resolve().then(() => (BQ(),xQ)),Y={"beacon-init":Q,"beacon-refresh":Z,"beacon-plan":$,"beacon-explain":J},V=[];for(let z of N){if(!YZ(z))V.push(z);x0(z,Y[z])}let q=0;for(let z of RQ)if(K0({event:z.event,matcher:z.matcher,command:k(z.command)}))q++;let W=VZ();return v0(G0),{skillsAdded:V,hooksAdded:q,claudeMdBlockTouched:!W}}async function qZ(){if(EQ())return{ok:!0,skipped:"plugin",skillsAdded:[],hooksAdded:0,claudeMdBlockTouched:!1};let Q;if(kQ()){try{w0()}catch{}Q={ok:!0,skipped:"plugin-present",skillsAdded:[],hooksAdded:0,claudeMdBlockTouched:!1}}else try{Q={ok:!0,...await u0()}}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(() => ($Z(),ZZ));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 w0(){let Q=[];for(let J of N)if(B0(J))Q.push(J);let Z=0;for(let J of RQ)if(P0(J))Z++;let $=M0();return{skillsRemoved:Q,hooksRemoved:Z,claudeMdBlockRemoved:$}}import{AsyncLocalStorage as y0}from"async_hooks";import{spawnSync as k0}from"child_process";import{createHash as L0}from"crypto";import{existsSync as HZ,mkdirSync as f,readFileSync as TQ,writeFileSync as gQ}from"fs";import{homedir as jZ}from"os";import{basename as _0,join as P,parse as S0,resolve as WZ}from"path";function x(){return process.env.BEACON_HOME||P(jZ(),".beacon")}function OQ(){return P(x(),"workspaces.json")}function b(Q){return L0("sha256").update(Q).digest("hex").slice(0,12)}function h0(Q=process.cwd()){let Z=k0("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 GZ(Q){let Z=WZ(Q);return Z!==WZ(jZ())&&Z!==S0(Z).root}function xZ(){return P(x(),"deleted.json")}function IQ(){try{let Q=JSON.parse(TQ(xZ(),"utf8"));return Array.isArray(Q)?Q:[]}catch{return[]}}function BZ(Q){f(x(),{recursive:!0}),gQ(xZ(),JSON.stringify(Q,null,2))}function KZ(Q){return IQ().includes(Q)}function l1(Q){let Z=IQ();if(!Z.includes(Q))BZ([...Z,Q])}function p0(Q){let Z=IQ();if(Z.includes(Q))BZ(Z.filter(($)=>$!==Q))}function VQ(Q){return P(x(),Q)}function m0(Q){return`file:${P(VQ(Q),"db.sqlite")}`}function E(){try{let Q=JSON.parse(TQ(OQ(),"utf8"));return Array.isArray(Q)?Q:[]}catch{return[]}}function AQ(Q){f(x(),{recursive:!0}),gQ(OQ(),JSON.stringify(Q,null,2))}function NZ(){return E().sort((Q,Z)=>Z.lastOpenedAt.localeCompare(Q.lastOpenedAt))}function u(Q){return E().find((Z)=>Z.id===Q)??null}function PZ(Q,Z,$=new Date().toISOString()){if(!GZ(Q))throw Error(`beacon: refusing to register a non-repo path as a workspace: ${Q}`);let J=b(Q);if(KZ(J))throw Error(`beacon: workspace ${J} (${Q}) was deleted \u2014 run \`beacon\` or /beacon-init to re-add it`);let Y=E(),V=Y.find((z)=>z.id===J),q={id:J,path:Q,name:Z||V?.name||_0(Q),lastOpenedAt:$},W=[q,...Y.filter((z)=>z.id!==J)];return f(VQ(J),{recursive:!0}),AQ(W),q}function d1(Q,Z){return p0(b(Q)),PZ(Q,Z)}function s1(Q,Z=new Date().toISOString()){let $=E(),J=$.find((Y)=>Y.id===Q);if(!J)return;J.lastOpenedAt=Z,AQ($)}function t1(Q){if(AQ(E().filter((Z)=>Z.id!==Q)),DQ()===Q)c0(NZ()[0]?.id??null)}function vZ(){return P(x(),"active")}function DQ(){try{return TQ(vZ(),"utf8").trim()||null}catch{return null}}function c0(Q){f(x(),{recursive:!0}),gQ(vZ(),Q??"")}function n1(){let Q=DQ();return Q?u(Q):null}function r1(){let Q=d0()??DQ();return Q?u(Q):null}function a1(Q){return u(Q)?.path??null}function o1(){return HZ(OQ())}var MZ="beacon_ws";function uZ(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 i1(Q){let Z=Q.headers.get("x-beacon-workspace");if(Z&&u(Z))return Z;let $=uZ(Q,MZ);if($&&u($))return $;return l0()}function l0(){let Q=NZ();return Q.length===1?Q[0].id:null}var wZ="x-beacon-workspace-path";function RZ(Q=process.cwd()){let Z=h0(Q);return{"x-beacon-workspace":b(Z),[wZ]:Z}}async function e1(Q){let Z=Q.headers.get("x-beacon-workspace");if(Z&&u(Z))return Z;let $=Q.headers.get(wZ);if($&&GZ($)&&!KZ(b($))&&(!Z||b($)===Z)){let Y=PZ($);return await s0(Y.id),Y.id}let J=uZ(Q,MZ);if(J&&u(J))return J;return null}var FZ=new y0;function Q2(Q,Z){return Q?FZ.run(Q,Z):Z()}function d0(){return FZ.getStore()??null}var CQ=new Set;function Z2(Q){CQ.delete(P(VQ(Q),"db.sqlite"))}async function s0(Q){let Z=VQ(Q),$=P(Z,"db.sqlite"),J=HZ($);if(J&&CQ.has($))return{ok:!0,created:!1,migrated:!1};try{f(Z,{recursive:!0});let{provisionDb:Y}=await UZ().then(() => XZ),V=await Y(m0(Q));return CQ.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)}}}import{connect as t0}from"net";var CZ=4319;function n0(Q,Z,$=400){return new Promise((J)=>{let Y=t0({host:Q,port:Z}),V=!1,q=(W)=>{if(V)return;V=!0,Y.destroy(),J(W)};Y.once("connect",()=>q(!0)),Y.once("error",()=>q(!1)),Y.setTimeout($,()=>q(!1))})}async function r0(Q){for(let Z of["127.0.0.1","::1"])if(await n0(Z,Q))return!1;return!0}async function Y2(Q,Z=20){for(let $=Q;$<Q+Z;$++)if(await r0($))return $;return Q}import{resolve as a0}from"path";var o0="*** Begin Patch",i0=/^\*\*\* (Update File|Add File|Move to): (.+)$/;function e0(Q){let Z=[];for(let $ of Q.split(`
|
|
354
|
+
`)){let J=i0.exec($.trim());if(!J)continue;let Y=J[2].trim();if(J[1]==="Move to")Z.pop();Z.push(Y)}return Z}function TZ(Q){let Z=Q.tool_input;if(Z===null||typeof Z!=="object")return[];let $=Z,J=[];if(typeof $.file_path==="string")J.push($.file_path);if(typeof $.path==="string")J.push($.path);if(Array.isArray($.files))for(let V of $.files){let q=V?.file_path;if(typeof q==="string")J.push(q)}if(J.length)return J;let Y=typeof Q.cwd==="string"?Q.cwd:process.cwd();for(let V of Object.values($)){if(typeof V!=="string"||!V.includes(o0))continue;return e0(V).map((q)=>a0(Y,q))}return[]}import{readFileSync as Q1}from"fs";import{join as Z1}from"path";function $1(){try{return JSON.parse(Q1(Z1(x(),"server.json"),"utf8"))}catch{return null}}function gZ(){if(process.env.BEACON_URL)return process.env.BEACON_URL;return`http://localhost:${$1()?.port||process.env.PORT||CZ}`}await qZ();var OZ="";for await(let Q of process.stdin)OZ+=Q;try{let Q=JSON.parse(OZ||"{}"),Z=TZ(Q);if(Z.length)await fetch(`${gZ()}/api/map/touch-active`,{method:"POST",headers:{"content-type":"application/json",...RZ(typeof Q.cwd==="string"?Q.cwd:void 0)},body:JSON.stringify({files:Z,session:typeof Q.session_id==="string"?Q.session_id:void 0})}).catch(()=>{})}catch{}process.exit(0);
|