trybeacon 0.1.72 → 0.1.74
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 +17 -9
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/routes-manifest.json +54 -6
- 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 +23 -22
- package/.next/server/app/_not-found.segments/_full.segment.rsc +23 -22
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +12 -11
- 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 -0
- package/.next/server/app/api/ask/answer/route.js.nft.json +1 -0
- package/.next/server/app/api/ask/answer/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/ask/route.js +1 -0
- package/.next/server/app/api/ask/route.js.nft.json +1 -0
- package/.next/server/app/api/ask/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/ask/verdict/route.js +1 -0
- package/.next/server/app/api/ask/verdict/route.js.nft.json +1 -0
- package/.next/server/app/api/ask/verdict/route_client-reference-manifest.js +1 -0
- 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 +4 -0
- package/.next/server/app/api/changes/comment/answer/route.js.nft.json +1 -0
- package/.next/server/app/api/changes/comment/answer/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/changes/comment/claim/route.js +4 -0
- package/.next/server/app/api/changes/comment/claim/route.js.nft.json +1 -0
- package/.next/server/app/api/changes/comment/claim/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/changes/comment/route.js +4 -0
- package/.next/server/app/api/changes/comment/route.js.nft.json +1 -0
- package/.next/server/app/api/changes/comment/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/changes/quality/route.js +1 -0
- package/.next/server/app/api/changes/quality/route.js.nft.json +1 -0
- package/.next/server/app/api/changes/quality/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/changes/route.js +1 -0
- package/.next/server/app/api/{flags → changes}/route.js.nft.json +1 -1
- package/.next/server/app/api/changes/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/changes/viewed/route.js +1 -0
- package/.next/server/app/api/changes/viewed/route.js.nft.json +1 -0
- package/.next/server/app/api/changes/viewed/route_client-reference-manifest.js +1 -0
- 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 -9
- package/.next/server/app/api/context/route.js.nft.json +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/position/route.js.nft.json +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/approve/route.js.nft.json +1 -1
- package/.next/server/app/api/draft/route.js +1 -1
- package/.next/server/app/api/draft/route.js.nft.json +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/edges/route.js.nft.json +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 -9
- package/.next/server/app/api/ingest/route.js.nft.json +1 -1
- package/.next/server/app/api/init/route.js +1 -9
- package/.next/server/app/api/init/route.js.nft.json +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/map/describe/route.js +1 -9
- package/.next/server/app/api/map/describe/route.js.nft.json +1 -1
- package/.next/server/app/api/map/files/route.js +1 -1
- package/.next/server/app/api/map/files/route.js.nft.json +1 -1
- package/.next/server/app/api/map/finish/route.js +1 -1
- package/.next/server/app/api/map/finish/route.js.nft.json +1 -1
- package/.next/server/app/api/map/route.js +1 -1
- package/.next/server/app/api/map/route.js.nft.json +1 -1
- package/.next/server/app/api/map/start/route.js +1 -1
- package/.next/server/app/api/map/start/route.js.nft.json +1 -1
- package/.next/server/app/api/map/touch-active/route.js +1 -1
- package/.next/server/app/api/map/touch-active/route.js.nft.json +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]/position/route.js.nft.json +1 -1
- package/.next/server/app/api/nodes/[id]/route.js +1 -1
- package/.next/server/app/api/nodes/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/nodes/positions/route.js +1 -1
- package/.next/server/app/api/nodes/positions/route.js.nft.json +1 -1
- package/.next/server/app/api/nodes/route.js +1 -1
- package/.next/server/app/api/nodes/route.js.nft.json +1 -1
- package/.next/server/app/api/nodes/subtasks/route.js +1 -1
- package/.next/server/app/api/nodes/subtasks/route.js.nft.json +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 -9
- package/.next/server/app/api/plan/approve/route.js.nft.json +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/markdown/route.js.nft.json +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/route.js.nft.json +1 -1
- package/.next/server/app/api/plan/verdict/route.js +1 -1
- package/.next/server/app/api/plan/verdict/route.js.nft.json +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 +4 -1
- package/.next/server/app/api/scope-guard/check/route.js.nft.json +1 -1
- package/.next/server/app/api/share/create/route.js +1 -1
- package/.next/server/app/api/share/create/route.js.nft.json +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/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.rsc +24 -23
- package/.next/server/app/docs.segments/_full.segment.rsc +24 -23
- package/.next/server/app/docs.segments/_head.segment.rsc +1 -1
- package/.next/server/app/docs.segments/_index.segment.rsc +12 -11
- 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.rsc +32 -31
- package/.next/server/app/help.segments/_full.segment.rsc +32 -31
- package/.next/server/app/help.segments/_head.segment.rsc +1 -1
- package/.next/server/app/help.segments/_index.segment.rsc +12 -11
- 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.rsc +22 -21
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/index.segments/_full.segment.rsc +22 -21
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +12 -11
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/learn/page.js +3 -3
- 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 +12 -2
- 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 +17 -9
- package/.next/server/chunks/1130.js +1 -1
- package/.next/server/chunks/2031.js +1 -0
- package/.next/server/chunks/230.js +1 -0
- package/.next/server/chunks/2693.js +8 -0
- package/.next/server/chunks/374.js +1 -0
- package/.next/server/chunks/5295.js +1 -0
- package/.next/server/chunks/{4700.js → 5704.js} +2 -2
- package/.next/server/chunks/6469.js +10 -0
- package/.next/server/chunks/6962.js +1 -0
- package/.next/server/chunks/8227.js +1 -0
- package/.next/server/chunks/8674.js +7 -0
- 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/chunks/3151-861a6caa40f70f79.js +1 -0
- package/.next/static/chunks/3908-80efc60050779adf.js +1 -0
- package/.next/static/chunks/5697-5b9719b81806b4cf.js +1 -0
- package/.next/static/chunks/654-8e68a43e4c589e9c.js +1 -0
- package/.next/static/chunks/7424-d7fa15ef452064dd.js +1 -0
- package/.next/static/chunks/app/_global-error/page-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/ask/answer/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/ask/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/ask/verdict/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/board-annotations/[id]/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/board-annotations/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/board-layout/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/bug-flags/[id]/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/bug-flags/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/changes/comment/answer/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/changes/comment/claim/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/changes/comment/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/changes/quality/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/changes/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/changes/viewed/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/code-graph/position/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/code-graph/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/context/feature/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/context/file/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/context/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/db/arrange/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/db/backfill-access/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/db/position/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/db/prune-planned/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/db/reconcile-endpoints/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/db/relations/[id]/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/db/tables/[id]/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/draft/approve/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/draft/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/draft/status/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/edges/[id]/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/edges/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/endpoints/[id]/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/entities/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/ingest/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/init/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/lesson/close/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/lesson/presence/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/lesson/questions/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/lesson/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/lesson/save/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/lesson/verdict/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/map/describe/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/map/files/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/map/finish/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/map/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/map/start/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/map/touch-active/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/mention-search/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/nodes/[id]/position/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/nodes/[id]/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/nodes/positions/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/nodes/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/nodes/subtasks/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/notes/[id]/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/notes/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/open/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/plan/annotations/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/plan/approve/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/plan/history/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/plan/markdown/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/plan/presence/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/plan/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/plan/verdict/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/preferences/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/project-meta/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/reset/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/scope-guard/check/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/share/create/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/share/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/stream/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/tab/nav/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/tab/presence/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/telemetry/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/telemetry/stats/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/version/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/workspace/activate/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/api/workspace/route-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/app/layout-f908dc26e06f4302.js +1 -0
- package/.next/static/chunks/app/learn/{page-e5bd3257170098e7.js → page-bc40746566d115e5.js} +1 -1
- package/.next/static/chunks/app/map/{page-5ab46e5ea28ecd79.js → page-233ccd830873114b.js} +1 -1
- package/.next/static/chunks/app/plan/page-8ec1e1d8ea40686a.js +11 -0
- package/.next/static/chunks/app/s/[token]/{page-8e4ffccdf7cd0309.js → page-2a3f04bc3f60ec49.js} +1 -1
- package/.next/static/chunks/app/settings/page-a751eabdd933f685.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-d54a69e7dc6b4008.js +1 -0
- package/.next/static/chunks/{webpack-de4a0d9611ec2cad.js → webpack-6c27b0ed1ac1459c.js} +1 -1
- package/.next/static/css/60048003a8c96562.css +1 -0
- package/.next/static/css/a5d17568738ef1e9.css +1 -0
- package/.next/static/yescmIM6BeSzGgwZ-Dwpq/_buildManifest.js +1 -0
- package/.next/trace +46 -43
- package/.next/trace-build +1 -1
- package/.next/types/app/api/ask/answer/route.ts +351 -0
- package/.next/types/app/api/{flags → ask}/route.ts +3 -3
- package/.next/types/app/api/ask/verdict/route.ts +351 -0
- package/.next/types/app/api/changes/comment/answer/route.ts +351 -0
- package/.next/types/app/api/changes/comment/claim/route.ts +351 -0
- package/.next/types/app/api/changes/comment/route.ts +351 -0
- package/.next/types/app/api/changes/quality/route.ts +351 -0
- package/.next/types/app/api/changes/route.ts +351 -0
- package/.next/types/app/api/changes/viewed/route.ts +351 -0
- package/.next/types/routes.d.ts +10 -2
- package/.next/types/validator.ts +81 -9
- package/bun.lock +54 -0
- package/dist/bin/answer.js +8 -0
- package/dist/bin/ask.js +5 -0
- package/dist/bin/beacon.js +5 -5
- package/dist/bin/doctor.js +36 -35
- package/dist/bin/guard.js +1 -1
- package/dist/bin/hook.js +33 -32
- package/dist/bin/mcp.js +45 -44
- package/dist/bin/plan.js +36 -35
- package/dist/bin/remove.js +6 -6
- package/dist/bin/stop-hook.js +7 -3
- package/dist/bin/uninstall.js +35 -34
- package/dist/lib/assets.js +25 -24
- package/dist/lib/codex-install.js +32 -31
- package/dist/lib/global-install.js +33 -32
- package/dist/lib/telemetry.js +1 -1
- package/dist/lib/workspaces.js +1 -1
- package/package.json +3 -1
- package/plugin/skills/beacon-plan/SKILL.md +5 -4
- package/.next/server/app/api/flags/route.js +0 -1
- package/.next/server/app/api/flags/route_client-reference-manifest.js +0 -1
- package/.next/server/chunks/3098.js +0 -1
- package/.next/server/chunks/3221.js +0 -5
- package/.next/server/chunks/4307.js +0 -1
- package/.next/server/chunks/5719.js +0 -1
- package/.next/server/chunks/7604.js +0 -1
- package/.next/static/chunks/2231-63ad38ec8fb7cb6f.js +0 -1
- package/.next/static/chunks/2416-dbbbff4e4c9abad1.js +0 -1
- package/.next/static/chunks/766-242213d211df0afd.js +0 -1
- package/.next/static/chunks/8997-78a359d0d238622e.js +0 -1
- package/.next/static/chunks/app/_global-error/page-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/board-annotations/[id]/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/board-annotations/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/board-layout/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/bug-flags/[id]/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/bug-flags/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/code-graph/position/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/code-graph/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/context/feature/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/context/file/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/context/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/db/arrange/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/db/backfill-access/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/db/position/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/db/prune-planned/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/db/reconcile-endpoints/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/db/relations/[id]/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/db/tables/[id]/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/draft/approve/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/draft/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/draft/status/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/edges/[id]/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/edges/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/endpoints/[id]/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/entities/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/flags/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/ingest/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/init/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/lesson/close/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/lesson/presence/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/lesson/questions/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/lesson/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/lesson/save/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/lesson/verdict/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/map/describe/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/map/files/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/map/finish/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/map/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/map/start/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/map/touch-active/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/mention-search/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/nodes/[id]/position/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/nodes/[id]/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/nodes/positions/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/nodes/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/nodes/subtasks/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/notes/[id]/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/notes/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/open/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/plan/annotations/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/plan/approve/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/plan/history/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/plan/markdown/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/plan/presence/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/plan/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/plan/verdict/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/preferences/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/project-meta/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/reset/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/scope-guard/check/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/share/create/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/share/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/stream/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/tab/nav/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/tab/presence/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/telemetry/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/telemetry/stats/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/version/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/workspace/activate/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/api/workspace/route-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/app/layout-d3b7276f116dce46.js +0 -1
- package/.next/static/chunks/app/plan/page-948f3eca400e746a.js +0 -1
- package/.next/static/chunks/app/settings/page-7e176d120b1effa9.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-93569b5eb93a61e9.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-93569b5eb93a61e9.js +0 -1
- package/.next/static/css/446974879473fd01.css +0 -1
- package/.next/static/lnOOQsWRymiliRmMEQ95F/_buildManifest.js +0 -1
- /package/.next/static/{lnOOQsWRymiliRmMEQ95F → yescmIM6BeSzGgwZ-Dwpq}/_ssgManifest.js +0 -0
package/dist/bin/uninstall.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
// @bun
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
`)}function
|
|
12
|
-
`),{path:Z,added:!1,updated:!0};return{path:Z,added:!1,updated:!1}}return $.mcpServers.beacon={command:"beacon",args:["mcp"],timeout:
|
|
13
|
-
`),{path:Z,added:!0,updated:!1}}function
|
|
14
|
-
`)}}catch{}let Y=!1,V=
|
|
3
|
+
var OZ=Object.defineProperty;var bZ=(Q)=>Q;function AZ(Q,Z){this[Q]=bZ.bind(null,Z)}var jQ=(Q,Z)=>{for(var $ in Z)OZ(Q,$,{get:Z[$],enumerable:!0,configurable:!0,set:AZ.bind(Z,$)})};var T=(Q,Z)=>()=>(Q&&(Z=Q(Q=0)),Z);var l0=1500,n0=480000,d0=1800000,h=3600000,t0=3000;var lQ=()=>{};var KQ={};jQ(KQ,{stripAgentsPointer:()=>aQ,removeRepoAssets:()=>xQ,installRefreshSkill:()=>LZ,installPlanSkill:()=>kZ,installInitSkill:()=>yZ,installExplainSkill:()=>_Z,installCodexRepoSkills:()=>hZ,ensureWorkflowDoc:()=>mZ,ensureMcp:()=>pZ,contextDocTargets:()=>NQ,auditRepo:()=>cZ,REFRESH_SKILL:()=>vQ,PLAN_SKILL:()=>dQ,INIT_SKILL:()=>GQ,EXPLAIN_SKILL:()=>tQ});import{existsSync as v,mkdirSync as E,readFileSync as N,rmSync as m,writeFileSync as H}from"fs";import{join as X}from"path";function yZ(Q){let Z=X(Q,".claude","skills","beacon-init");E(Z,{recursive:!0});let $=X(Z,"SKILL.md");return H($,GQ),$}function LZ(Q){let Z=X(Q,".claude","skills","beacon-refresh");E(Z,{recursive:!0});let $=X(Z,"SKILL.md");return H($,vQ),$}function kZ(Q){let Z=X(Q,".claude","skills","beacon-plan");E(Z,{recursive:!0});let $=X(Z,"SKILL.md");return H($,dQ),$}function _Z(Q){let Z=X(Q,".claude","skills","beacon-explain");E(Z,{recursive:!0});let $=X(Z,"SKILL.md");return H($,tQ),$}function hZ(Q){let Z=[];for(let $ of SZ){let J=X(Q,".agents","skills",$.name);E(J,{recursive:!0});let Y=X(J,"SKILL.md");H(Y,$.body()),Z.push(Y)}return Z}function NQ(Q){let Z=X(Q,"AGENTS.md"),$=X(Q,"CLAUDE.md"),J=v(Z),Y=v($);if(!J&&!Y)return[Z,$];let V=[];if(J)V.push(Z);if(Y)V.push($);return V}function aQ(Q){let Z=X(Q,"CLAUDE.md");if(!v(Z))return;let $=N(Z,"utf8"),J=$.split(`
|
|
4
|
+
`).filter((Y)=>!/^\s*@\.?\/?AGENTS\.md\s*$/.test(Y)).join(`
|
|
5
|
+
`).trim();if(J&&J!==$.trim())H(Z,`${J}
|
|
6
|
+
`)}function mZ(Q){let Z=new RegExp(`${p}[\\s\\S]*?${PQ}`);for(let $ of NQ(Q)){let J="";try{J=N($,"utf8")}catch{}J=Z.test(J)?J.replace(Z,nQ):`${J.trim()}
|
|
7
|
+
|
|
8
|
+
${nQ}
|
|
9
|
+
`.trimStart(),H($,J.endsWith(`
|
|
10
|
+
`)?J:`${J}
|
|
11
|
+
`)}aQ(Q)}function pZ(Q){let Z=X(Q,".mcp.json"),$={};try{$=JSON.parse(N(Z,"utf8"))}catch{}$.mcpServers=$.mcpServers??{};let J=$.mcpServers.beacon;if(J){if(!J.timeout||J.timeout<h)return J.timeout=h,H(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:h},H(Z,JSON.stringify($,null,2)+`
|
|
13
|
+
`),{path:Z,added:!0,updated:!1}}function cZ(Q){let Z=X(Q,".mcp.json"),$=!1;try{$=!!JSON.parse(N(Z,"utf8")).mcpServers?.beacon}catch{}let J=NQ(Q).some((Y)=>{try{return N(Y,"utf8").includes(p)}catch{return!1}});return{repo:Q,mcpRegistered:$,workflowBlock:J,skills:{"beacon-init":v(X(Q,".claude","skills","beacon-init","SKILL.md")),"beacon-refresh":v(X(Q,".claude","skills","beacon-refresh","SKILL.md"))},codexSkills:{"beacon-init":v(X(Q,".agents","skills","beacon-init","SKILL.md")),"beacon-refresh":v(X(Q,".agents","skills","beacon-refresh","SKILL.md"))}}}function xQ(Q){let Z=[];for(let z of["beacon-init","beacon-refresh","beacon-db-design"]){let U=X(Q,".claude","skills",z);if(v(U))m(U,{recursive:!0,force:!0}),Z.push(z)}for(let z of["beacon-init","beacon-refresh"]){let U=X(Q,".agents","skills",z);if(v(U))m(U,{recursive:!0,force:!0}),Z.push(`codex:${z}`)}let $=!1,J=X(Q,".mcp.json");try{let z=JSON.parse(N(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)m(J,{force:!0});else H(J,JSON.stringify(z,null,2)+`
|
|
14
|
+
`)}}catch{}let Y=!1,V=new RegExp(`\\n?${p}[\\s\\S]*?${PQ}\\n?`);for(let z of[X(Q,"AGENTS.md"),X(Q,"CLAUDE.md")])try{let U=N(z,"utf8");if(V.test(U)){let BQ=U.replace(V,`
|
|
15
15
|
`).replace(/\n{3,}/g,`
|
|
16
16
|
|
|
17
|
-
`).trimStart();H(
|
|
17
|
+
`).trimStart();H(z,BQ.endsWith(`
|
|
18
18
|
`)?BQ:`${BQ}
|
|
19
|
-
`),Y=!0}}catch{}let q=!1,W=X(Q,"CLAUDE.md");try{let z=
|
|
19
|
+
`),Y=!0}}catch{}let q=!1,W=X(Q,"CLAUDE.md");try{let z=N(W,"utf8"),U=z.replace(/^[ \t]*@AGENTS\.md[ \t]*\n?/m,"");if(U!==z){if(!U.trim())m(W,{force:!0});else H(W,U);q=!0}}catch{}return{skillsRemoved:Z,mcpUnregistered:$,agentsBlockRemoved:Y,claudeImportRemoved:q}}var GQ=`---
|
|
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
|
---
|
|
@@ -63,7 +63,7 @@ beacon init-persist /tmp/beacon-init.json # or: beacon init-persist < /tmp/bea
|
|
|
63
63
|
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
64
|
|
|
65
65
|
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
|
-
`,
|
|
66
|
+
`,vQ=`---
|
|
67
67
|
name: beacon-refresh
|
|
68
68
|
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
69
|
---
|
|
@@ -110,7 +110,7 @@ The one caveat: if the user manually edited an INIT-source node on the canvas (e
|
|
|
110
110
|
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
111
|
|
|
112
112
|
After the tool returns, report the final counts plus a one-line summary of the diff you surfaced.
|
|
113
|
-
`,
|
|
113
|
+
`,dQ=`---
|
|
114
114
|
name: beacon-plan
|
|
115
115
|
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
116
|
---
|
|
@@ -139,10 +139,11 @@ board on /plan. The board is built ONLY from the block \u2014 prose is never par
|
|
|
139
139
|
table/endpoint/feature you mention in the prose into the block, or that board will be empty.
|
|
140
140
|
|
|
141
141
|
- **Declare your scope.** List the repo-relative files this plan will touch in a top-level
|
|
142
|
-
\`"contract"\` array in the block (or the \`contract\` arg of \`beacon_propose_plan\`).
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
142
|
+
\`"contract"\` array in the block (or the \`contract\` arg of \`beacon_propose_plan\`). Those files are
|
|
143
|
+
frozen at approval and you're held to them while implementing \u2014 editing an undeclared file pauses
|
|
144
|
+
for the user's authorization (which then adds it to the contract), and the /plan Changes view
|
|
145
|
+
groups your edits On-plan vs Strayed against them. Declare the files you genuinely expect to edit
|
|
146
|
+
(if omitted, the scope is inferred from the files you name in backticks).
|
|
146
147
|
|
|
147
148
|
\`beacon_present_plan\` opens /plan and BLOCKS until the user clicks Approve / Discard / submits
|
|
148
149
|
feedback, then returns their verdict. Implement code or migrations ONLY after it returns approval.
|
|
@@ -228,7 +229,7 @@ so the learner sees the table IN CONTEXT, wired to the code that uses it.
|
|
|
228
229
|
Every answer must ADD understanding (rationale, trade-off) \u2014 never just restate the question. Expand
|
|
229
230
|
the narrative or add nodes where it helps. Keep looping until the tool reports the user saved or closed
|
|
230
231
|
the lesson.
|
|
231
|
-
`,
|
|
232
|
+
`,SZ,p="<!-- beacon:workflow:start -->",PQ="<!-- beacon:workflow:end -->",nQ;var c=T(()=>{lQ();SZ=[{name:"beacon-init",body:()=>GQ},{name:"beacon-refresh",body:()=>vQ}];nQ=`${p}
|
|
232
233
|
## Beacon \u2014 feature workflow
|
|
233
234
|
|
|
234
235
|
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:
|
|
@@ -300,18 +301,18 @@ Register them all in that single batched call. If a plan added five features, th
|
|
|
300
301
|
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.
|
|
301
302
|
|
|
302
303
|
Pull raw planning data anytime with \`beacon_entities\` (features / architecture / tables / endpoints).
|
|
303
|
-
${
|
|
304
|
-
`)}function t(Q,Z){let $=
|
|
304
|
+
${PQ}`});import{existsSync as l,mkdirSync as uQ,readdirSync as lZ,readFileSync as w,rmSync as nZ,writeFileSync as n}from"fs";import{dirname as sQ,join as x}from"path";function rQ(){return!!process.env.CLAUDE_PLUGIN_ROOT}function oQ(Q=process.env.HOME||process.env.USERPROFILE||""){if(!Q)return null;let Z=x(Q,".claude","plugins");if(!l(Z))return null;let $=[Z];for(let J=0;J<3&&$.length;J++){let Y=[];for(let V of $){let q=x(V,".claude-plugin","plugin.json");try{if(l(q)&&JSON.parse(w(q,"utf8")).name==="beacon")return V}catch{}try{for(let W of lZ(V,{withFileTypes:!0}))if(W.isDirectory())Y.push(x(V,W.name))}catch{}}$=Y}return null}function iQ(Q){return oQ(Q)!==null}function dZ(Q){return/[\\/]\.claude[\\/]plugins[\\/]/.test(Q)}function tZ(Q=process.env.HOME||process.env.USERPROFILE||""){if(!Q)return null;try{let Z=JSON.parse(w(x(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 MQ(Q){try{return JSON.parse(w(Q,"utf8"))}catch{return{}}}function eQ(Q,Z){uQ(sQ(Q),{recursive:!0}),n(Q,JSON.stringify(Z,null,2)+`
|
|
305
|
+
`)}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}]}),eQ(Q,$),!0}function a(Q,Z){return(MQ(Q).hooks?.[Z.event]??[]).some((Y)=>Y.hooks?.some((V)=>V.command===Z.command))}function s(Q,Z){let $=MQ(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)=>U.command!==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 eQ(Q,$),!0}function r(Q,Z,$,J){let Y=`${Z}
|
|
305
306
|
${J.trim()}
|
|
306
307
|
${$}`,V="";try{V=w(Q,"utf8")}catch{}let q=new RegExp(`${Z}[\\s\\S]*?${$}`);V=q.test(V)?V.replace(q,Y):V.trim()?`${V.trim()}
|
|
307
308
|
|
|
308
309
|
${Y}
|
|
309
310
|
`:`${Y}
|
|
310
|
-
`,
|
|
311
|
+
`,uQ(sQ(Q),{recursive:!0}),n(Q,V.endsWith(`
|
|
311
312
|
`)?V:`${V}
|
|
312
|
-
`)}function
|
|
313
|
+
`)}function I(Q,Z){try{return w(Q,"utf8").includes(Z)}catch{return!1}}function o(Q,Z,$){let J="";try{J=w(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,`
|
|
313
314
|
|
|
314
|
-
`).trimStart();return
|
|
315
|
+
`).trimStart();return n(Q,V),!0}function i(Q,Z,$){let J=x(Q,Z);uQ(J,{recursive:!0});let Y=x(J,"SKILL.md");return n(Y,$),Y}function D(Q,Z){return l(x(Q,Z,"SKILL.md"))}function e(Q,Z){let $=x(Q,Z);if(!l($))return!1;return nZ($,{recursive:!0,force:!0}),!0}var B,d=`## Beacon (visual planning panel)
|
|
315
316
|
|
|
316
317
|
This machine has Beacon installed \u2014 a local visual planning surface for the terminal-side
|
|
317
318
|
agent. Beacon proposes feature plans (roadmap features + DB schema + endpoints) via MCP,
|
|
@@ -335,20 +336,20 @@ the user reviews on a canvas at /plan, and feedback flows back as the next round
|
|
|
335
336
|
Feedback bundles inline annotations on the markdown PLUS any edits the user made directly
|
|
336
337
|
on the /map and /db boards (added features, attached subtasks, edited columns, new
|
|
337
338
|
endpoints). Treat board edits as the user's revision intent \u2014 re-propose matching them
|
|
338
|
-
verbatim. Do NOT implement until the tool returns approval.`;var CQ=
|
|
339
|
+
verbatim. Do NOT implement until the tool returns approval.`;var CQ=T(()=>{B=["beacon-init","beacon-refresh","beacon-plan","beacon-explain"]});import{mkdirSync as aZ,renameSync as sZ,rmSync as rZ,writeFileSync as oZ}from"fs";import{dirname as iZ}from"path";function QQ(Q,Z){aZ(iZ(Q),{recursive:!0});let $=`${Q}.tmp`;try{oZ($,Z),sZ($,Q)}catch(J){throw rZ($,{force:!0}),J}}function J1(Q,Z,$=!1){QQ(Q,JSON.stringify(Z,null,$?2:void 0))}var QZ=()=>{};var XZ={};jQ(XZ,{setupCodexAssets:()=>$0,removeCodexMcp:()=>qZ,removeCodexArtifacts:()=>gQ,hasCodexMcp:()=>RQ,ensureCodexMcp:()=>zZ,codexMcpProblem:()=>Z0,codexDetected:()=>JZ,auditCodex:()=>FQ,CODEX_HOOKS:()=>F});import{readFileSync as YQ}from"fs";import{homedir as eZ}from"os";import{join as A}from"path";function ZZ(){return process.env.HOME||process.env.USERPROFILE||eZ()}function JZ(){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 RQ(){try{return Boolean(b(YQ(R(),"utf8"))?.mcp_servers?.beacon)}catch{return!1}}function Z0(){let Q="";try{Q=YQ(R(),"utf8")}catch{return null}let Z=b(Q);if(!Z)return`~/.codex/config.toml does not parse \u2014 ${O}`;if(Z.mcp_servers?.beacon)return null;if(/^\s*mcp_servers\s*=/m.test(Q))return`mcp_servers is an inline table \u2014 ${O}`;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 ${O}`};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 ${O}`}}let $=!Q?"":Q.endsWith(`
|
|
339
340
|
`)?`
|
|
340
341
|
`:`
|
|
341
342
|
|
|
342
|
-
`,J=Q+$+
|
|
343
|
-
`),$=Z.indexOf(
|
|
343
|
+
`,J=Q+$+Q0;if(b(J)?.mcp_servers?.beacon?.command!=="beacon")return{added:!1,error:`could not safely append [mcp_servers.beacon] \u2014 ${O}`};return QQ(R(),J),{added:!0}}function qZ(){let Q="";try{Q=YQ(R(),"utf8")}catch{return{removed:!1}}let Z=Q.split(`
|
|
344
|
+
`),$=Z.indexOf(YZ);if($===-1)return{removed:!1,skipped:RQ()};let J=Z.indexOf(VZ,$);if(J===-1)return{removed:!1,skipped:!0};Z.splice($,J-$+1);let Y=Z.join(`
|
|
344
345
|
`).replace(/\n{3,}/g,`
|
|
345
346
|
|
|
346
|
-
`).replace(/^\n+/,"");if(
|
|
347
|
+
`).replace(/^\n+/,"");if(b(Y)===null)return{removed:!1,skipped:!0};return QQ(R(),Y),{removed:!0}}async function $0(){let{INIT_SKILL:Q,REFRESH_SKILL:Z,PLAN_SKILL:$,EXPLAIN_SKILL:J}=await Promise.resolve().then(() => (c(),KQ)),Y={"beacon-init":Q,"beacon-refresh":Z,"beacon-plan":$,"beacon-explain":J},V=[];for(let U of B){if(!D($Q(),U))V.push(U);i($Q(),U,Y[U])}let q=0;for(let U of F)if(t(wQ(),{event:U.event,matcher:U.matcher,command:U.command}))q++;let W=I(ZQ(),JQ);r(ZQ(),JQ,$Z,d);let z=zZ();return{skillsAdded:V,hooksAdded:q,agentsMdBlockTouched:!W,mcp:z}}function FQ(){let Q={};for(let $ of B)Q[$]=D($Q(),$);let Z={};for(let $ of F)Z[$.event]=a(wQ(),{event:$.event,command:$.command});return{detected:JZ(),skills:Q,hooks:Z,agentsMdBlock:I(ZQ(),JQ),mcp:RQ()}}function gQ(){let Q=[];for(let Y of B)if(e($Q(),Y))Q.push(Y);let Z=0;for(let Y of F)if(s(wQ(),{event:Y.event,command:Y.command}))Z++;let $=o(ZQ(),JQ,$Z),J=qZ();return{skillsRemoved:Q,hooksRemoved:Z,agentsMdBlockRemoved:$,mcpRemoved:J.removed,mcpSkipped:J.skipped}}var TQ=()=>A(ZZ(),".codex"),wQ=()=>A(TQ(),"hooks.json"),R=()=>A(TQ(),"config.toml"),ZQ=()=>A(TQ(),"AGENTS.md"),$Q=()=>A(ZZ(),".agents","skills"),JQ="<!-- beacon:global:start -->",$Z="<!-- beacon:global:end -->",F,fQ,YZ="# beacon:start (managed by Beacon \u2014 `beacon uninstall` removes this block)",VZ="# beacon:end",Q0,O="add it manually: codex mcp add beacon -- beacon mcp";var EQ=T(()=>{CQ();QZ();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."}];Q0=`${YZ}
|
|
347
348
|
[mcp_servers.beacon]
|
|
348
349
|
command = "beacon"
|
|
349
350
|
args = ["mcp"]
|
|
350
|
-
${
|
|
351
|
-
`});var
|
|
352
|
-
\x1B[1m${Q}\x1B[0m`,
|
|
353
|
-
`),process.exit(0);console.log(
|
|
351
|
+
${VZ}
|
|
352
|
+
`});var GZ={};jQ(GZ,{provisionDb:()=>R0});import{createClient as v0}from"@libsql/client";import{drizzle as P0}from"drizzle-orm/libsql";import{migrate as N0}from"drizzle-orm/libsql/migrator";import{readMigrationFiles as x0}from"drizzle-orm/migrator";import{dirname as yQ,join as K0}from"path";import{fileURLToPath as u0}from"url";async function qQ(Q,Z){return(await Q.execute({sql:"SELECT 1 FROM sqlite_master WHERE type='table' AND name = ?",args:[Z]})).rows.length>0}async function T0(Q,Z){let $=await Q.execute(`PRAGMA table_info("${Z}")`);return new Set($.rows.map((J)=>String(J.name)))}async function jZ(Q){if(!await qQ(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 w0(Q){for(let[Z,$]of Object.entries(f0)){if(!await qQ(Q,Z))continue;let J=await T0(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 R0(Q,Z=C0){let $=v0({url:Q});try{await $.execute("PRAGMA journal_mode = WAL;"),await $.execute("PRAGMA foreign_keys = ON;"),await $.execute("PRAGMA busy_timeout = 5000;");let J=await qQ($,"__drizzle_migrations"),Y=await qQ($,"Node"),V=!1;if(Y&&!J){let W=x0({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 jZ($);if(await N0(P0($),{migrationsFolder:Z}),await jZ($)>q)V=!0;return await w0($),{migrated:V}}finally{$.close()}}var M0,C0,f0;var vZ=T(async()=>{M0=yQ(yQ(yQ(u0(import.meta.url)))),C0=process.env.BEACON_MIGRATIONS_DIR||K0(M0,"drizzle"),f0={Node:["createdAt","updatedAt"],Note:["createdAt","updatedAt"],DbTable:["createdAt","updatedAt"],Endpoint:["createdAt","updatedAt"],DraftTable:["createdAt"],SyncState:["codeGraphSyncedAt","updatedAt"],AppSetting:["updatedAt"],ProjectMeta:["updatedAt"],CodeFile:["updatedAt"]}});CQ();import{existsSync as J0}from"fs";import{homedir as Y0}from"os";import{join as VQ}from"path";function V0(){return process.env.HOME||process.env.USERPROFILE||Y0()}var zQ=()=>VQ(V0(),".claude"),IQ=()=>VQ(zQ(),"skills"),DQ=()=>VQ(zQ(),"settings.json"),OQ=()=>VQ(zQ(),"CLAUDE.md"),bQ="<!-- beacon:global:start -->",UZ="<!-- beacon:global:end -->";var z0=d,y=[{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 q0(Q,Z){return i(IQ(),Q,Z)}function WZ(Q){return D(IQ(),Q)}function X0(Q){return e(IQ(),Q)}function U0(Q){return t(DQ(),Q)}function W0(Q){return a(DQ(),Q)}function H0(Q){return s(DQ(),Q)}function B0(Q){r(OQ(),bQ,UZ,Q)}function HZ(){return I(OQ(),bQ)}function j0(){return o(OQ(),bQ,UZ)}function BZ(){let Q={};for(let $ of B)Q[$]=WZ($);let Z={};for(let $ of y)Z[$.event]=W0({event:$.event,command:$.command});return{homeExists:J0(zQ()),skills:Q,hooks:Z,claudeMdBlock:HZ()}}async function G0(){let{INIT_SKILL:Q,REFRESH_SKILL:Z,PLAN_SKILL:$,EXPLAIN_SKILL:J}=await Promise.resolve().then(() => (c(),KQ)),Y={"beacon-init":Q,"beacon-refresh":Z,"beacon-plan":$,"beacon-explain":J},V=[];for(let z of B){if(!WZ(z))V.push(z);q0(z,Y[z])}let q=0;for(let z of y)if(U0({event:z.event,matcher:z.matcher,command:z.command}))q++;let W=HZ();return B0(z0),{skillsAdded:V,hooksAdded:q,claudeMdBlockTouched:!W}}async function G1(){if(rQ())return{ok:!0,skipped:"plugin",skillsAdded:[],hooksAdded:0,claudeMdBlockTouched:!1};let Q;if(iQ()){try{AQ()}catch{}Q={ok:!0,skipped:"plugin-present",skillsAdded:[],hooksAdded:0,claudeMdBlockTouched:!1}}else try{Q={ok:!0,...await G0()}}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(),XZ));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 AQ(){let Q=[];for(let J of B)if(X0(J))Q.push(J);let Z=0;for(let J of y)if(H0(J))Z++;let $=j0();return{skillsRemoved:Q,hooksRemoved:Z,claudeMdBlockRemoved:$}}import{AsyncLocalStorage as F0}from"async_hooks";import{spawnSync as g0}from"child_process";import{createHash as E0}from"crypto";import{existsSync as NZ,mkdirSync as k,readFileSync as kQ,writeFileSync as _Q}from"fs";import{homedir as xZ}from"os";import{basename as I0,join as K,parse as D0,resolve as PZ}from"path";function P(){return process.env.BEACON_HOME||K(xZ(),".beacon")}function SQ(){return K(P(),"workspaces.json")}function L(Q){return E0("sha256").update(Q).digest("hex").slice(0,12)}function O0(Q=process.cwd()){let Z=g0("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 KZ(Q){let Z=PZ(Q);return Z!==PZ(xZ())&&Z!==D0(Z).root}function uZ(){return K(P(),"deleted.json")}function hQ(){try{let Q=JSON.parse(kQ(uZ(),"utf8"));return Array.isArray(Q)?Q:[]}catch{return[]}}function MZ(Q){k(P(),{recursive:!0}),_Q(uZ(),JSON.stringify(Q,null,2))}function CZ(Q){return hQ().includes(Q)}function g1(Q){let Z=hQ();if(!Z.includes(Q))MZ([...Z,Q])}function b0(Q){let Z=hQ();if(Z.includes(Q))MZ(Z.filter(($)=>$!==Q))}function XQ(Q){return K(P(),Q)}function A0(Q){return`file:${K(XQ(Q),"db.sqlite")}`}function _(){try{let Q=JSON.parse(kQ(SQ(),"utf8"));return Array.isArray(Q)?Q:[]}catch{return[]}}function mQ(Q){k(P(),{recursive:!0}),_Q(SQ(),JSON.stringify(Q,null,2))}function UQ(){return _().sort((Q,Z)=>Z.lastOpenedAt.localeCompare(Q.lastOpenedAt))}function M(Q){return _().find((Z)=>Z.id===Q)??null}function fZ(Q,Z,$=new Date().toISOString()){if(!KZ(Q))throw Error(`beacon: refusing to register a non-repo path as a workspace: ${Q}`);let J=L(Q);if(CZ(J))throw Error(`beacon: workspace ${J} (${Q}) was deleted \u2014 run \`beacon\` or /beacon-init to re-add it`);let Y=_(),V=Y.find((z)=>z.id===J),q={id:J,path:Q,name:Z||V?.name||I0(Q),lastOpenedAt:$},W=[q,...Y.filter((z)=>z.id!==J)];return k(XQ(J),{recursive:!0}),mQ(W),q}function E1(Q,Z){return b0(L(Q)),fZ(Q,Z)}function I1(Q,Z=new Date().toISOString()){let $=_(),J=$.find((Y)=>Y.id===Q);if(!J)return;J.lastOpenedAt=Z,mQ($)}function D1(Q){if(mQ(_().filter((Z)=>Z.id!==Q)),pQ()===Q)y0(UQ()[0]?.id??null)}function TZ(){return K(P(),"active")}function pQ(){try{return kQ(TZ(),"utf8").trim()||null}catch{return null}}function y0(Q){k(P(),{recursive:!0}),_Q(TZ(),Q??"")}function O1(){let Q=pQ();return Q?M(Q):null}function b1(){let Q=k0()??pQ();return Q?M(Q):null}function A1(Q){return M(Q)?.path??null}function y1(){return NZ(SQ())}var wZ="beacon_ws";function RZ(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 L1(Q){let Z=Q.headers.get("x-beacon-workspace");if(Z&&M(Z))return Z;let $=RZ(Q,wZ);if($&&M($))return $;return L0()}function L0(){let Q=UQ();return Q.length===1?Q[0].id:null}var FZ="x-beacon-workspace-path";function k1(Q=process.cwd()){let Z=O0(Q);return{"x-beacon-workspace":L(Z),[FZ]:Z}}async function _1(Q){let Z=Q.headers.get("x-beacon-workspace");if(Z&&M(Z))return Z;let $=Q.headers.get(FZ);if($&&KZ($)&&!CZ(L($))&&(!Z||L($)===Z)){let Y=fZ($);return await _0(Y.id),Y.id}let J=RZ(Q,wZ);if(J&&M(J))return J;return null}var gZ=new F0;function S1(Q,Z){return Q?gZ.run(Q,Z):Z()}function k0(){return gZ.getStore()??null}var LQ=new Set;function h1(Q){LQ.delete(K(XQ(Q),"db.sqlite"))}async function _0(Q){let Z=XQ(Q),$=K(Z,"db.sqlite"),J=NZ($);if(J&&LQ.has($))return{ok:!0,created:!1,migrated:!1};try{k(Z,{recursive:!0});let{provisionDb:Y}=await vZ().then(() => GZ),V=await Y(A0(Q));return LQ.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)}}}c();EQ();import{existsSync as WQ,readFileSync as S0,rmSync as h0}from"fs";import{join as m0}from"path";var EZ=process.argv.slice(3),IZ=EZ.includes("--yes")||EZ.includes("-y"),G=(Q)=>`\x1B[32m\u2713\x1B[0m ${Q}`,j=(Q)=>`\x1B[2m${Q}\x1B[0m`,f=(Q)=>`
|
|
353
|
+
\x1B[1m${Q}\x1B[0m`,DZ=(Q)=>`\x1B[33m!\x1B[0m ${Q}`,C=P(),S=UQ(),cQ=BZ();console.log(f(IZ?"Beacon \xB7 uninstall":"Beacon \xB7 uninstall (dry run)"));console.log(f("Global"));console.log(` ${WQ(C)?`wipe ${C} (${S.length} workspaces)`:`${j(`${C} \u2014 already gone`)}`}`);for(let Q of B)console.log(` ${cQ.skills[Q]?`remove ~/.claude/skills/${Q}/`:j(`skill ${Q} \u2014 already gone`)}`);for(let Q of y)console.log(` ${cQ.hooks[Q.event]?`remove hook ${Q.event} \u2192 ${Q.command}`:j(`hook ${Q.event} \u2192 ${Q.command} \u2014 already gone`)}`);console.log(` ${cQ.claudeMdBlock?"strip Beacon block from ~/.claude/CLAUDE.md":j("global CLAUDE.md block \u2014 already gone")}`);var HQ=FQ();console.log(f("Codex"));for(let Q of B)console.log(` ${HQ.skills[Q]?`remove ~/.agents/skills/${Q}/`:j(`skill ${Q} \u2014 already gone`)}`);for(let Q of F)console.log(` ${HQ.hooks[Q.event]?`remove hook ${Q.event} \u2192 ${Q.command} from ~/.codex/hooks.json`:j(`hook ${Q.event} \u2192 ${Q.command} \u2014 already gone`)}`);console.log(` ${HQ.agentsMdBlock?"strip Beacon block from ~/.codex/AGENTS.md":j("global ~/.codex/AGENTS.md block \u2014 already gone")}`);console.log(` ${HQ.mcp?"strip [mcp_servers.beacon] from ~/.codex/config.toml (if Beacon wrote it)":j("config.toml beacon entry \u2014 already gone")}`);if(S.length){console.log(f(`Per-repo (${S.length})`));for(let Q of S){if(!WQ(Q.path)){console.log(` ${j(`${Q.path} \u2014 repo no longer on disk, skipping`)}`);continue}console.log(` ${Q.path}`),console.log(` ${j("strip beacon entry from .mcp.json, workflow block from AGENTS.md, skills, CLAUDE.md @-import")}`)}}if(!IZ)console.log(f("Nothing was changed.")),console.log(" Run \x1B[1mbeacon uninstall --yes\x1B[0m to apply."),console.log(` The \x1B[1mbeacon\x1B[0m binary itself (the cloned source + your PATH symlink) is NOT removed by this \u2014 your install script handles that.
|
|
354
|
+
`),process.exit(0);console.log(f("Applying\u2026"));var g=AQ();if(g.skillsRemoved.length)console.log(` ${G(`removed skills: ${g.skillsRemoved.join(", ")}`)}`);if(g.hooksRemoved)console.log(` ${G(`removed ${g.hooksRemoved} hook${g.hooksRemoved===1?"":"s"} from ~/.claude/settings.json`)}`);if(g.claudeMdBlockRemoved)console.log(` ${G("stripped Beacon block from ~/.claude/CLAUDE.md")}`);var u=gQ();if(u.skillsRemoved.length)console.log(` ${G(`removed ~/.agents/skills: ${u.skillsRemoved.join(", ")}`)}`);if(u.hooksRemoved)console.log(` ${G(`removed ${u.hooksRemoved} hook${u.hooksRemoved===1?"":"s"} from ~/.codex/hooks.json`)}`);if(u.agentsMdBlockRemoved)console.log(` ${G("stripped Beacon block from ~/.codex/AGENTS.md")}`);if(u.mcpRemoved)console.log(` ${G("stripped [mcp_servers.beacon] from ~/.codex/config.toml")}`);if(u.mcpSkipped)console.log(` ${DZ("left [mcp_servers.beacon] in ~/.codex/config.toml \u2014 it wasn't written by Beacon (remove with: codex mcp remove beacon)")}`);for(let Q of S){if(!WQ(Q.path))continue;let Z=xQ(Q.path),$=[];if(Z.skillsRemoved.length)$.push(`skills(${Z.skillsRemoved.length})`);if(Z.mcpUnregistered)$.push(".mcp.json");if(Z.agentsBlockRemoved)$.push("AGENTS.md");if(Z.claudeImportRemoved)$.push("CLAUDE.md");if($.length)console.log(` ${G(`${Q.path} \u2192 ${$.join(", ")}`)}`)}var p0=m0(C,"server.json");try{let{pid:Q}=JSON.parse(S0(p0,"utf8"));if(Q)try{process.kill(Q),console.log(` ${G(`stopped daemon (pid ${Q})`)}`)}catch{}}catch{}if(WQ(C))h0(C,{recursive:!0,force:!0}),console.log(` ${G(`removed ${C}`)}`);console.log(f("Done."));console.log(` ${DZ("The `beacon` binary on your PATH is still there \u2014 run the matching uninstall step from your installer to remove it.")}
|
|
354
355
|
`);
|
package/dist/lib/assets.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
`)}function
|
|
11
|
-
`),{path:
|
|
12
|
-
`),{path:
|
|
13
|
-
`)}}catch{}let
|
|
2
|
+
var f=Object.defineProperty;var K=(z)=>z;function j(z,q){this[z]=K.bind(null,q)}var O=(z,q)=>{for(var J in q)f(z,J,{get:q[J],enumerable:!0,configurable:!0,set:j.bind(q,J)})};var w=(z,q)=>()=>(z&&(q=z(z=0)),q);var c=1500,p=480000,n=1800000,U=3600000,t=3000;var W=()=>{};var d={};O(d,{stripAgentsPointer:()=>A,removeRepoAssets:()=>S,installRefreshSkill:()=>F,installPlanSkill:()=>_,installInitSkill:()=>L,installExplainSkill:()=>g,installCodexRepoSkills:()=>R,ensureWorkflowDoc:()=>h,ensureMcp:()=>y,contextDocTargets:()=>b,auditRepo:()=>l,REFRESH_SKILL:()=>x,PLAN_SKILL:()=>u,INIT_SKILL:()=>P,EXPLAIN_SKILL:()=>E});import{existsSync as H,mkdirSync as D,readFileSync as X,rmSync as v,writeFileSync as G}from"fs";import{join as V}from"path";function L(z){let q=V(z,".claude","skills","beacon-init");D(q,{recursive:!0});let J=V(q,"SKILL.md");return G(J,P),J}function F(z){let q=V(z,".claude","skills","beacon-refresh");D(q,{recursive:!0});let J=V(q,"SKILL.md");return G(J,x),J}function _(z){let q=V(z,".claude","skills","beacon-plan");D(q,{recursive:!0});let J=V(q,"SKILL.md");return G(J,u),J}function g(z){let q=V(z,".claude","skills","beacon-explain");D(q,{recursive:!0});let J=V(q,"SKILL.md");return G(J,E),J}function R(z){let q=[];for(let J of m){let Q=V(z,".agents","skills",J.name);D(Q,{recursive:!0});let Z=V(Q,"SKILL.md");G(Z,J.body()),q.push(Z)}return q}function b(z){let q=V(z,"AGENTS.md"),J=V(z,"CLAUDE.md"),Q=H(q),Z=H(J);if(!Q&&!Z)return[q,J];let B=[];if(Q)B.push(q);if(Z)B.push(J);return B}function A(z){let q=V(z,"CLAUDE.md");if(!H(q))return;let J=X(q,"utf8"),Q=J.split(`
|
|
3
|
+
`).filter((Z)=>!/^\s*@\.?\/?AGENTS\.md\s*$/.test(Z)).join(`
|
|
4
|
+
`).trim();if(Q&&Q!==J.trim())G(q,`${Q}
|
|
5
|
+
`)}function h(z){let q=new RegExp(`${C}[\\s\\S]*?${M}`);for(let J of b(z)){let Q="";try{Q=X(J,"utf8")}catch{}Q=q.test(Q)?Q.replace(q,T):`${Q.trim()}
|
|
6
|
+
|
|
7
|
+
${T}
|
|
8
|
+
`.trimStart(),G(J,Q.endsWith(`
|
|
9
|
+
`)?Q:`${Q}
|
|
10
|
+
`)}A(z)}function y(z){let q=V(z,".mcp.json"),J={};try{J=JSON.parse(X(q,"utf8"))}catch{}J.mcpServers=J.mcpServers??{};let Q=J.mcpServers.beacon;if(Q){if(!Q.timeout||Q.timeout<U)return Q.timeout=U,G(q,JSON.stringify(J,null,2)+`
|
|
11
|
+
`),{path:q,added:!1,updated:!0};return{path:q,added:!1,updated:!1}}return J.mcpServers.beacon={command:"beacon",args:["mcp"],timeout:U},G(q,JSON.stringify(J,null,2)+`
|
|
12
|
+
`),{path:q,added:!0,updated:!1}}function l(z){let q=V(z,".mcp.json"),J=!1;try{J=!!JSON.parse(X(q,"utf8")).mcpServers?.beacon}catch{}let Q=b(z).some((Z)=>{try{return X(Z,"utf8").includes(C)}catch{return!1}});return{repo:z,mcpRegistered:J,workflowBlock:Q,skills:{"beacon-init":H(V(z,".claude","skills","beacon-init","SKILL.md")),"beacon-refresh":H(V(z,".claude","skills","beacon-refresh","SKILL.md"))},codexSkills:{"beacon-init":H(V(z,".agents","skills","beacon-init","SKILL.md")),"beacon-refresh":H(V(z,".agents","skills","beacon-refresh","SKILL.md"))}}}function S(z){let q=[];for(let Y of["beacon-init","beacon-refresh","beacon-db-design"]){let $=V(z,".claude","skills",Y);if(H($))v($,{recursive:!0,force:!0}),q.push(Y)}for(let Y of["beacon-init","beacon-refresh"]){let $=V(z,".agents","skills",Y);if(H($))v($,{recursive:!0,force:!0}),q.push(`codex:${Y}`)}let J=!1,Q=V(z,".mcp.json");try{let Y=JSON.parse(X(Q,"utf8"));if(Y.mcpServers?.beacon){if(delete Y.mcpServers.beacon,J=!0,Y.mcpServers&&Object.keys(Y.mcpServers).length===0)delete Y.mcpServers;if(Object.keys(Y).length===0)v(Q,{force:!0});else G(Q,JSON.stringify(Y,null,2)+`
|
|
13
|
+
`)}}catch{}let Z=!1,B=new RegExp(`\\n?${C}[\\s\\S]*?${M}\\n?`);for(let Y of[V(z,"AGENTS.md"),V(z,"CLAUDE.md")])try{let $=X(Y,"utf8");if(B.test($)){let k=$.replace(B,`
|
|
14
14
|
`).replace(/\n{3,}/g,`
|
|
15
15
|
|
|
16
|
-
`).trimStart()
|
|
17
|
-
`)?
|
|
18
|
-
`),
|
|
16
|
+
`).trimStart();G(Y,k.endsWith(`
|
|
17
|
+
`)?k:`${k}
|
|
18
|
+
`),Z=!0}}catch{}let I=!1,N=V(z,"CLAUDE.md");try{let Y=X(N,"utf8"),$=Y.replace(/^[ \t]*@AGENTS\.md[ \t]*\n?/m,"");if($!==Y){if(!$.trim())v(N,{force:!0});else G(N,$);I=!0}}catch{}return{skillsRemoved:q,mcpUnregistered:J,agentsBlockRemoved:Z,claudeImportRemoved:I}}var P=`---
|
|
19
19
|
name: beacon-init
|
|
20
20
|
description: Read this repository and map its architecture, schema, and roadmap into Beacon (the local visual planning panel). Use when the user runs /beacon-init, asks to "set up Beacon for this repo", or asks to initialize/bootstrap Beacon's map of this codebase.
|
|
21
21
|
---
|
|
@@ -62,7 +62,7 @@ beacon init-persist /tmp/beacon-init.json # or: beacon init-persist < /tmp/bea
|
|
|
62
62
|
That one command wires the repo (writes \`.mcp.json\` + skills so your NEXT session gets the \`beacon_*\` tools natively, heals the global install), starts the Beacon daemon if it isn't running, registers + provisions this workspace, and POSTs your analysis to the same \`/api/init\` endpoint the MCP tool uses \u2014 so init completes in THIS session. Read the counts it prints and report them.
|
|
63
63
|
|
|
64
64
|
After the tool (or \`beacon init-persist\`) returns, tell the user the counts (components / roadmap / tables / endpoints) and point them at the running Beacon panel.
|
|
65
|
-
`,
|
|
65
|
+
`,x=`---
|
|
66
66
|
name: beacon-refresh
|
|
67
67
|
description: Re-survey the repo and update Beacon's architecture / schema / endpoints map after /beacon-init was already run \u2014 picks up new components, removed ones, schema changes, and new routes. Use when the user runs /beacon-refresh or asks to "refresh", "update", "re-sync", or "bring Beacon up to date" with the current code.
|
|
68
68
|
---
|
|
@@ -109,7 +109,7 @@ The one caveat: if the user manually edited an INIT-source node on the canvas (e
|
|
|
109
109
|
If \`beacon_entities\` or \`beacon_init_persist\` isn't available, the Beacon panel isn't running in this repo. Tell the user to run \`beacon\` here first, then re-invoke /beacon-refresh.
|
|
110
110
|
|
|
111
111
|
After the tool returns, report the final counts plus a one-line summary of the diff you surfaced.
|
|
112
|
-
`,
|
|
112
|
+
`,u=`---
|
|
113
113
|
name: beacon-plan
|
|
114
114
|
description: Present your current plan or approach to the user on Beacon's /plan canvas for review \u2014 instead of asking for approval in prose. Use when the user says "present the plan", "show me the plan", "let me see it / the plan", or whenever you are about to end a turn asking whether to proceed with a plan, design, or approach.
|
|
115
115
|
---
|
|
@@ -138,10 +138,11 @@ board on /plan. The board is built ONLY from the block \u2014 prose is never par
|
|
|
138
138
|
table/endpoint/feature you mention in the prose into the block, or that board will be empty.
|
|
139
139
|
|
|
140
140
|
- **Declare your scope.** List the repo-relative files this plan will touch in a top-level
|
|
141
|
-
\`"contract"\` array in the block (or the \`contract\` arg of \`beacon_propose_plan\`).
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
141
|
+
\`"contract"\` array in the block (or the \`contract\` arg of \`beacon_propose_plan\`). Those files are
|
|
142
|
+
frozen at approval and you're held to them while implementing \u2014 editing an undeclared file pauses
|
|
143
|
+
for the user's authorization (which then adds it to the contract), and the /plan Changes view
|
|
144
|
+
groups your edits On-plan vs Strayed against them. Declare the files you genuinely expect to edit
|
|
145
|
+
(if omitted, the scope is inferred from the files you name in backticks).
|
|
145
146
|
|
|
146
147
|
\`beacon_present_plan\` opens /plan and BLOCKS until the user clicks Approve / Discard / submits
|
|
147
148
|
feedback, then returns their verdict. Implement code or migrations ONLY after it returns approval.
|
|
@@ -157,7 +158,7 @@ If it returns feedback, revise and call it again.
|
|
|
157
158
|
If \`beacon_present_plan\` isn't available, the panel isn't wired here \u2014 fall back to ExitPlanMode
|
|
158
159
|
with the same \`\`\`beacon block (Claude Code only; Codex has no ExitPlanMode), or tell the user to
|
|
159
160
|
run \`beacon\` in this repo once.
|
|
160
|
-
`,
|
|
161
|
+
`,E=`---
|
|
161
162
|
name: beacon-explain
|
|
162
163
|
description: Teach the user part of THIS codebase as an interactive visual lesson on Beacon's /learn page \u2014 a concept map + plain-English narrative they can question \u2014 instead of a wall of text. Use when the user says "explain", "teach me", "walk me through", "how does X work", or "help me understand the Y category".
|
|
163
164
|
---
|
|
@@ -227,7 +228,7 @@ so the learner sees the table IN CONTEXT, wired to the code that uses it.
|
|
|
227
228
|
Every answer must ADD understanding (rationale, trade-off) \u2014 never just restate the question. Expand
|
|
228
229
|
the narrative or add nodes where it helps. Keep looping until the tool reports the user saved or closed
|
|
229
230
|
the lesson.
|
|
230
|
-
`,
|
|
231
|
+
`,m,C="<!-- beacon:workflow:start -->",M="<!-- beacon:workflow:end -->",T;var s=w(()=>{W();m=[{name:"beacon-init",body:()=>P},{name:"beacon-refresh",body:()=>x}];T=`${C}
|
|
231
232
|
## Beacon \u2014 feature workflow
|
|
232
233
|
|
|
233
234
|
This project uses Beacon (a local planning/visualization panel; run \`beacon\` to open it). When you start work on a FEATURE \u2014 whether referenced via an \`@beacon:feature://\u2026\` mention, an \`@beacon:note://\u2026\` note the user wrote in the Notes panel (treat its checkbox \`- [ ]\` todos as subtasks and order features by their dependencies), or just described in chat \u2014 follow these steps in order:
|
|
@@ -299,4 +300,4 @@ Register them all in that single batched call. If a plan added five features, th
|
|
|
299
300
|
If the feature added or materially changed a REAL architectural component (a subsystem \u2014 NOT a file), also pass \`architecture: [{ title, domain, role, \u2026 }]\` so the Architecture map stays accurate. It upserts curated components by title; never list files as components. If you found a bug or something worth investigating in a component's code, add \`bugs: [{ note }]\` to its architecture entry \u2014 it renders as a bug flag on the node (attributed to the agent); identical open flags are not duplicated. Only flag what you actually saw in the code.
|
|
300
301
|
|
|
301
302
|
Pull raw planning data anytime with \`beacon_entities\` (features / architecture / tables / endpoints).
|
|
302
|
-
${
|
|
303
|
+
${M}`});s();export{A as stripAgentsPointer,S as removeRepoAssets,F as installRefreshSkill,_ as installPlanSkill,L as installInitSkill,g as installExplainSkill,R as installCodexRepoSkills,h as ensureWorkflowDoc,y as ensureMcp,b as contextDocTargets,l as auditRepo,x as REFRESH_SKILL,u as PLAN_SKILL,P as INIT_SKILL,E as EXPLAIN_SKILL};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var
|
|
2
|
+
var jq=Object.defineProperty;var gq=(q)=>q;function Kq(q,z){this[q]=gq.bind(null,z)}var s=(q,z)=>{for(var J in z)jq(q,J,{get:z[J],enumerable:!0,configurable:!0,set:Kq.bind(z,J)})};var b=(q,z)=>()=>(q&&(z=q(q=0)),z);var rq=1500,oq=480000,iq=1800000,K=3600000,eq=3000;var n=()=>{};var e={};s(e,{stripAgentsPointer:()=>i,removeRepoAssets:()=>Fq,installRefreshSkill:()=>Nq,installPlanSkill:()=>Mq,installInitSkill:()=>Cq,installExplainSkill:()=>Rq,installCodexRepoSkills:()=>Dq,ensureWorkflowDoc:()=>Tq,ensureMcp:()=>fq,contextDocTargets:()=>h,auditRepo:()=>Aq,REFRESH_SKILL:()=>L,PLAN_SKILL:()=>r,INIT_SKILL:()=>O,EXPLAIN_SKILL:()=>o});import{existsSync as B,mkdirSync as w,readFileSync as v,rmSync as C,writeFileSync as W}from"fs";import{join as Z}from"path";function Cq(q){let z=Z(q,".claude","skills","beacon-init");w(z,{recursive:!0});let J=Z(z,"SKILL.md");return W(J,O),J}function Nq(q){let z=Z(q,".claude","skills","beacon-refresh");w(z,{recursive:!0});let J=Z(z,"SKILL.md");return W(J,L),J}function Mq(q){let z=Z(q,".claude","skills","beacon-plan");w(z,{recursive:!0});let J=Z(z,"SKILL.md");return W(J,r),J}function Rq(q){let z=Z(q,".claude","skills","beacon-explain");w(z,{recursive:!0});let J=Z(z,"SKILL.md");return W(J,o),J}function Dq(q){let z=[];for(let J of Iq){let Q=Z(q,".agents","skills",J.name);w(Q,{recursive:!0});let V=Z(Q,"SKILL.md");W(V,J.body()),z.push(V)}return z}function h(q){let z=Z(q,"AGENTS.md"),J=Z(q,"CLAUDE.md"),Q=B(z),V=B(J);if(!Q&&!V)return[z,J];let Y=[];if(Q)Y.push(z);if(V)Y.push(J);return Y}function i(q){let z=Z(q,"CLAUDE.md");if(!B(z))return;let J=v(z,"utf8"),Q=J.split(`
|
|
3
|
+
`).filter((V)=>!/^\s*@\.?\/?AGENTS\.md\s*$/.test(V)).join(`
|
|
4
|
+
`).trim();if(Q&&Q!==J.trim())W(z,`${Q}
|
|
5
|
+
`)}function Tq(q){let z=new RegExp(`${N}[\\s\\S]*?${y}`);for(let J of h(q)){let Q="";try{Q=v(J,"utf8")}catch{}Q=z.test(Q)?Q.replace(z,t):`${Q.trim()}
|
|
3
6
|
|
|
4
7
|
${t}
|
|
5
|
-
`.trimStart(),
|
|
6
|
-
`)?
|
|
7
|
-
`)
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
`)}
|
|
11
|
-
`),{path:J,added:!1,updated:!0};return{path:J,added:!1,updated:!1}}return z.mcpServers.beacon={command:"beacon",args:["mcp"],timeout:C},H(J,JSON.stringify(z,null,2)+`
|
|
12
|
-
`),{path:J,added:!0,updated:!1}}function Tq(q){let J=Z(q,".mcp.json"),z=!1;try{z=!!JSON.parse(B(J,"utf8")).mcpServers?.beacon}catch{}let Q=!1;try{Q=B(Z(q,"AGENTS.md"),"utf8").includes(N)}catch{}let V=!1;try{V=/@AGENTS\.md/.test(B(Z(q,"CLAUDE.md"),"utf8"))}catch{}return{repo:q,mcpRegistered:z,agentsMdBlock:Q,claudeMdImport:V,skills:{"beacon-init":G(Z(q,".claude","skills","beacon-init","SKILL.md")),"beacon-refresh":G(Z(q,".claude","skills","beacon-refresh","SKILL.md"))},codexSkills:{"beacon-init":G(Z(q,".agents","skills","beacon-init","SKILL.md")),"beacon-refresh":G(Z(q,".agents","skills","beacon-refresh","SKILL.md"))}}}function Aq(q){let J=[];for(let $ of["beacon-init","beacon-refresh","beacon-db-design"]){let U=Z(q,".claude","skills",$);if(G(U))K(U,{recursive:!0,force:!0}),J.push($)}for(let $ of["beacon-init","beacon-refresh"]){let U=Z(q,".agents","skills",$);if(G(U))K(U,{recursive:!0,force:!0}),J.push(`codex:${$}`)}let z=!1,Q=Z(q,".mcp.json");try{let $=JSON.parse(B(Q,"utf8"));if($.mcpServers?.beacon){if(delete $.mcpServers.beacon,z=!0,$.mcpServers&&Object.keys($.mcpServers).length===0)delete $.mcpServers;if(Object.keys($).length===0)K(Q,{force:!0});else H(Q,JSON.stringify($,null,2)+`
|
|
13
|
-
`)}}catch{}let V=!1,Y=Z(q,"AGENTS.md");try{let $=B(Y,"utf8"),U=new RegExp(`\\n?${N}[\\s\\S]*?${y}\\n?`);if(U.test($)){let k=$.replace(U,`
|
|
8
|
+
`.trimStart(),W(J,Q.endsWith(`
|
|
9
|
+
`)?Q:`${Q}
|
|
10
|
+
`)}i(q)}function fq(q){let z=Z(q,".mcp.json"),J={};try{J=JSON.parse(v(z,"utf8"))}catch{}J.mcpServers=J.mcpServers??{};let Q=J.mcpServers.beacon;if(Q){if(!Q.timeout||Q.timeout<K)return Q.timeout=K,W(z,JSON.stringify(J,null,2)+`
|
|
11
|
+
`),{path:z,added:!1,updated:!0};return{path:z,added:!1,updated:!1}}return J.mcpServers.beacon={command:"beacon",args:["mcp"],timeout:K},W(z,JSON.stringify(J,null,2)+`
|
|
12
|
+
`),{path:z,added:!0,updated:!1}}function Aq(q){let z=Z(q,".mcp.json"),J=!1;try{J=!!JSON.parse(v(z,"utf8")).mcpServers?.beacon}catch{}let Q=h(q).some((V)=>{try{return v(V,"utf8").includes(N)}catch{return!1}});return{repo:q,mcpRegistered:J,workflowBlock:Q,skills:{"beacon-init":B(Z(q,".claude","skills","beacon-init","SKILL.md")),"beacon-refresh":B(Z(q,".claude","skills","beacon-refresh","SKILL.md"))},codexSkills:{"beacon-init":B(Z(q,".agents","skills","beacon-init","SKILL.md")),"beacon-refresh":B(Z(q,".agents","skills","beacon-refresh","SKILL.md"))}}}function Fq(q){let z=[];for(let $ of["beacon-init","beacon-refresh","beacon-db-design"]){let U=Z(q,".claude","skills",$);if(B(U))C(U,{recursive:!0,force:!0}),z.push($)}for(let $ of["beacon-init","beacon-refresh"]){let U=Z(q,".agents","skills",$);if(B(U))C(U,{recursive:!0,force:!0}),z.push(`codex:${$}`)}let J=!1,Q=Z(q,".mcp.json");try{let $=JSON.parse(v(Q,"utf8"));if($.mcpServers?.beacon){if(delete $.mcpServers.beacon,J=!0,$.mcpServers&&Object.keys($.mcpServers).length===0)delete $.mcpServers;if(Object.keys($).length===0)C(Q,{force:!0});else W(Q,JSON.stringify($,null,2)+`
|
|
13
|
+
`)}}catch{}let V=!1,Y=new RegExp(`\\n?${N}[\\s\\S]*?${y}\\n?`);for(let $ of[Z(q,"AGENTS.md"),Z(q,"CLAUDE.md")])try{let U=v($,"utf8");if(Y.test(U)){let k=U.replace(Y,`
|
|
14
14
|
`).replace(/\n{3,}/g,`
|
|
15
15
|
|
|
16
|
-
`).trimStart();
|
|
16
|
+
`).trimStart();W($,k.endsWith(`
|
|
17
17
|
`)?k:`${k}
|
|
18
|
-
`),V=!0}}catch{}let
|
|
18
|
+
`),V=!0}}catch{}let P=!1,H=Z(q,"CLAUDE.md");try{let $=v(H,"utf8"),U=$.replace(/^[ \t]*@AGENTS\.md[ \t]*\n?/m,"");if(U!==$){if(!U.trim())C(H,{force:!0});else W(H,U);P=!0}}catch{}return{skillsRemoved:z,mcpUnregistered:J,agentsBlockRemoved:V,claudeImportRemoved:P}}var O=`---
|
|
19
19
|
name: beacon-init
|
|
20
20
|
description: Read this repository and map its architecture, schema, and roadmap into Beacon (the local visual planning panel). Use when the user runs /beacon-init, asks to "set up Beacon for this repo", or asks to initialize/bootstrap Beacon's map of this codebase.
|
|
21
21
|
---
|
|
@@ -109,7 +109,7 @@ The one caveat: if the user manually edited an INIT-source node on the canvas (e
|
|
|
109
109
|
If \`beacon_entities\` or \`beacon_init_persist\` isn't available, the Beacon panel isn't running in this repo. Tell the user to run \`beacon\` here first, then re-invoke /beacon-refresh.
|
|
110
110
|
|
|
111
111
|
After the tool returns, report the final counts plus a one-line summary of the diff you surfaced.
|
|
112
|
-
`,
|
|
112
|
+
`,r=`---
|
|
113
113
|
name: beacon-plan
|
|
114
114
|
description: Present your current plan or approach to the user on Beacon's /plan canvas for review \u2014 instead of asking for approval in prose. Use when the user says "present the plan", "show me the plan", "let me see it / the plan", or whenever you are about to end a turn asking whether to proceed with a plan, design, or approach.
|
|
115
115
|
---
|
|
@@ -138,10 +138,11 @@ board on /plan. The board is built ONLY from the block \u2014 prose is never par
|
|
|
138
138
|
table/endpoint/feature you mention in the prose into the block, or that board will be empty.
|
|
139
139
|
|
|
140
140
|
- **Declare your scope.** List the repo-relative files this plan will touch in a top-level
|
|
141
|
-
\`"contract"\` array in the block (or the \`contract\` arg of \`beacon_propose_plan\`).
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
141
|
+
\`"contract"\` array in the block (or the \`contract\` arg of \`beacon_propose_plan\`). Those files are
|
|
142
|
+
frozen at approval and you're held to them while implementing \u2014 editing an undeclared file pauses
|
|
143
|
+
for the user's authorization (which then adds it to the contract), and the /plan Changes view
|
|
144
|
+
groups your edits On-plan vs Strayed against them. Declare the files you genuinely expect to edit
|
|
145
|
+
(if omitted, the scope is inferred from the files you name in backticks).
|
|
145
146
|
|
|
146
147
|
\`beacon_present_plan\` opens /plan and BLOCKS until the user clicks Approve / Discard / submits
|
|
147
148
|
feedback, then returns their verdict. Implement code or migrations ONLY after it returns approval.
|
|
@@ -157,7 +158,7 @@ If it returns feedback, revise and call it again.
|
|
|
157
158
|
If \`beacon_present_plan\` isn't available, the panel isn't wired here \u2014 fall back to ExitPlanMode
|
|
158
159
|
with the same \`\`\`beacon block (Claude Code only; Codex has no ExitPlanMode), or tell the user to
|
|
159
160
|
run \`beacon\` in this repo once.
|
|
160
|
-
`,
|
|
161
|
+
`,o=`---
|
|
161
162
|
name: beacon-explain
|
|
162
163
|
description: Teach the user part of THIS codebase as an interactive visual lesson on Beacon's /learn page \u2014 a concept map + plain-English narrative they can question \u2014 instead of a wall of text. Use when the user says "explain", "teach me", "walk me through", "how does X work", or "help me understand the Y category".
|
|
163
164
|
---
|
|
@@ -227,7 +228,7 @@ so the learner sees the table IN CONTEXT, wired to the code that uses it.
|
|
|
227
228
|
Every answer must ADD understanding (rationale, trade-off) \u2014 never just restate the question. Expand
|
|
228
229
|
the narrative or add nodes where it helps. Keep looping until the tool reports the user saved or closed
|
|
229
230
|
the lesson.
|
|
230
|
-
`,
|
|
231
|
+
`,Iq,N="<!-- beacon:workflow:start -->",y="<!-- beacon:workflow:end -->",t;var qq=b(()=>{n();Iq=[{name:"beacon-init",body:()=>O},{name:"beacon-refresh",body:()=>L}];t=`${N}
|
|
231
232
|
## Beacon \u2014 feature workflow
|
|
232
233
|
|
|
233
234
|
This project uses Beacon (a local planning/visualization panel; run \`beacon\` to open it). When you start work on a FEATURE \u2014 whether referenced via an \`@beacon:feature://\u2026\` mention, an \`@beacon:note://\u2026\` note the user wrote in the Notes panel (treat its checkbox \`- [ ]\` todos as subtasks and order features by their dependencies), or just described in chat \u2014 follow these steps in order:
|
|
@@ -299,18 +300,18 @@ Register them all in that single batched call. If a plan added five features, th
|
|
|
299
300
|
If the feature added or materially changed a REAL architectural component (a subsystem \u2014 NOT a file), also pass \`architecture: [{ title, domain, role, \u2026 }]\` so the Architecture map stays accurate. It upserts curated components by title; never list files as components. If you found a bug or something worth investigating in a component's code, add \`bugs: [{ note }]\` to its architecture entry \u2014 it renders as a bug flag on the node (attributed to the agent); identical open flags are not duplicated. Only flag what you actually saw in the code.
|
|
300
301
|
|
|
301
302
|
Pull raw planning data anytime with \`beacon_entities\` (features / architecture / tables / endpoints).
|
|
302
|
-
${y}`});import{existsSync as M,mkdirSync as
|
|
303
|
-
`)}function
|
|
303
|
+
${y}`});import{existsSync as M,mkdirSync as _,readdirSync as Eq,readFileSync as X,rmSync as kq,writeFileSync as R}from"fs";import{dirname as zq,join as G}from"path";function Zz(){return!!process.env.CLAUDE_PLUGIN_ROOT}function Oq(q=process.env.HOME||process.env.USERPROFILE||""){if(!q)return null;let z=G(q,".claude","plugins");if(!M(z))return null;let J=[z];for(let Q=0;Q<3&&J.length;Q++){let V=[];for(let Y of J){let P=G(Y,".claude-plugin","plugin.json");try{if(M(P)&&JSON.parse(X(P,"utf8")).name==="beacon")return Y}catch{}try{for(let H of Eq(Y,{withFileTypes:!0}))if(H.isDirectory())V.push(G(Y,H.name))}catch{}}J=V}return null}function $z(q){return Oq(q)!==null}function Uz(q){return/[\\/]\.claude[\\/]plugins[\\/]/.test(q)}function Pz(q=process.env.HOME||process.env.USERPROFILE||""){if(!q)return null;try{let z=JSON.parse(X(G(q,".claude","plugins","installed_plugins.json"),"utf8"));for(let J of Object.keys(z.plugins??{}))if(/^beacon@/.test(J))return{key:J,marketplace:J.split("@")[1]??""}}catch{}return null}function m(q){try{return JSON.parse(X(q,"utf8"))}catch{return{}}}function Qq(q,z){_(zq(q),{recursive:!0}),R(q,JSON.stringify(z,null,2)+`
|
|
304
|
+
`)}function Vq(q,z){let J=m(q);J.hooks=J.hooks??{},J.hooks[z.event]=J.hooks[z.event]??[];let Q=J.hooks[z.event];if(Q.some((Y)=>Y.matcher===z.matcher&&Y.hooks?.some((P)=>P.command===z.command)))return!1;return Q.push({matcher:z.matcher,hooks:[{type:"command",command:z.command}]}),Qq(q,J),!0}function Yq(q,z){return(m(q).hooks?.[z.event]??[]).some((V)=>V.hooks?.some((Y)=>Y.command===z.command))}function Zq(q,z){let J=m(q),Q=J.hooks?.[z.event];if(!Q)return!1;let V=!1,Y=Q.map((P)=>{let H=P.hooks?.length??0,$=(P.hooks??[]).filter((U)=>U.command!==z.command);if($.length!==H)V=!0;return{...P,hooks:$}}).filter((P)=>(P.hooks??[]).length>0);if(!V)return!1;if(Y.length)J.hooks[z.event]=Y;else delete J.hooks[z.event];if(J.hooks&&Object.keys(J.hooks).length===0)delete J.hooks;return Qq(q,J),!0}function $q(q,z,J,Q){let V=`${z}
|
|
304
305
|
${Q.trim()}
|
|
305
|
-
${
|
|
306
|
+
${J}`,Y="";try{Y=X(q,"utf8")}catch{}let P=new RegExp(`${z}[\\s\\S]*?${J}`);Y=P.test(Y)?Y.replace(P,V):Y.trim()?`${Y.trim()}
|
|
306
307
|
|
|
307
308
|
${V}
|
|
308
309
|
`:`${V}
|
|
309
|
-
`,
|
|
310
|
+
`,_(zq(q),{recursive:!0}),R(q,Y.endsWith(`
|
|
310
311
|
`)?Y:`${Y}
|
|
311
|
-
`)}function
|
|
312
|
+
`)}function S(q,z){try{return X(q,"utf8").includes(z)}catch{return!1}}function Uq(q,z,J){let Q="";try{Q=X(q,"utf8")}catch{return!1}let V=new RegExp(`${z}[\\s\\S]*?${J}\\n?`);if(!V.test(Q))return!1;let Y=Q.replace(V,"").replace(/\n{3,}/g,`
|
|
312
313
|
|
|
313
|
-
`).trimStart();return R(q,Y),!0}function
|
|
314
|
+
`).trimStart();return R(q,Y),!0}function Pq(q,z,J){let Q=G(q,z);_(Q,{recursive:!0});let V=G(Q,"SKILL.md");return R(V,J),V}function p(q,z){return M(G(q,z,"SKILL.md"))}function Wq(q,z){let J=G(q,z);if(!M(J))return!1;return kq(J,{recursive:!0,force:!0}),!0}var I,Jq=`## Beacon (visual planning panel)
|
|
314
315
|
|
|
315
316
|
This machine has Beacon installed \u2014 a local visual planning surface for the terminal-side
|
|
316
317
|
agent. Beacon proposes feature plans (roadmap features + DB schema + endpoints) via MCP,
|
|
@@ -334,17 +335,17 @@ the user reviews on a canvas at /plan, and feedback flows back as the next round
|
|
|
334
335
|
Feedback bundles inline annotations on the markdown PLUS any edits the user made directly
|
|
335
336
|
on the /map and /db boards (added features, attached subtasks, edited columns, new
|
|
336
337
|
endpoints). Treat board edits as the user's revision intent \u2014 re-propose matching them
|
|
337
|
-
verbatim. Do NOT implement until the tool returns approval.`;var
|
|
338
|
+
verbatim. Do NOT implement until the tool returns approval.`;var Hq=b(()=>{I=["beacon-init","beacon-refresh","beacon-plan","beacon-explain"]});import{mkdirSync as Lq,renameSync as yq,rmSync as hq,writeFileSync as _q}from"fs";import{dirname as mq}from"path";function D(q,z){Lq(mq(q),{recursive:!0});let J=`${q}.tmp`;try{_q(J,z),yq(J,q)}catch(Q){throw hq(J,{force:!0}),Q}}function vz(q,z,J=!1){D(q,JSON.stringify(z,null,J?2:void 0))}var Bq=()=>{};var sq={};s(sq,{setupCodexAssets:()=>aq,removeCodexMcp:()=>xq,removeCodexArtifacts:()=>cq,hasCodexMcp:()=>c,ensureCodexMcp:()=>wq,codexMcpProblem:()=>lq,codexDetected:()=>Xq,auditCodex:()=>dq,CODEX_HOOKS:()=>E});import{readFileSync as F}from"fs";import{homedir as Sq}from"os";import{join as g}from"path";function vq(){return process.env.HOME||process.env.USERPROFILE||Sq()}function Xq(){if(process.env.BEACON_CODEX==="1")return!0;if(process.env.BEACON_CODEX==="0")return!1;if(l===void 0)l=Bun.which("codex")!==null;return l}function j(q){try{return Bun.TOML.parse(q)}catch{return null}}function c(){try{return Boolean(j(F(u(),"utf8"))?.mcp_servers?.beacon)}catch{return!1}}function lq(){let q="";try{q=F(u(),"utf8")}catch{return null}let z=j(q);if(!z)return`~/.codex/config.toml does not parse \u2014 ${x}`;if(z.mcp_servers?.beacon)return null;if(/^\s*mcp_servers\s*=/m.test(q))return`mcp_servers is an inline table \u2014 ${x}`;return null}function wq(){let q="",z=!1;try{q=F(u(),"utf8"),z=!0}catch{}if(z){let Y=j(q);if(!Y)return{added:!1,error:`~/.codex/config.toml does not parse \u2014 ${x}`};if(Y.mcp_servers?.beacon)return{added:!1};if(/^\s*mcp_servers\s*=/m.test(q))return{added:!1,error:`mcp_servers is an inline table \u2014 ${x}`}}let J=!q?"":q.endsWith(`
|
|
338
339
|
`)?`
|
|
339
340
|
`:`
|
|
340
341
|
|
|
341
|
-
`,Q=q+
|
|
342
|
-
`),z
|
|
342
|
+
`,Q=q+J+pq;if(j(Q)?.mcp_servers?.beacon?.command!=="beacon")return{added:!1,error:`could not safely append [mcp_servers.beacon] \u2014 ${x}`};return D(u(),Q),{added:!0}}function xq(){let q="";try{q=F(u(),"utf8")}catch{return{removed:!1}}let z=q.split(`
|
|
343
|
+
`),J=z.indexOf(uq);if(J===-1)return{removed:!1,skipped:c()};let Q=z.indexOf(bq,J);if(Q===-1)return{removed:!1,skipped:!0};z.splice(J,Q-J+1);let V=z.join(`
|
|
343
344
|
`).replace(/\n{3,}/g,`
|
|
344
345
|
|
|
345
|
-
`).replace(/^\n+/,"");if(
|
|
346
|
+
`).replace(/^\n+/,"");if(j(V)===null)return{removed:!1,skipped:!0};return D(u(),V),{removed:!0}}async function aq(){let{INIT_SKILL:q,REFRESH_SKILL:z,PLAN_SKILL:J,EXPLAIN_SKILL:Q}=await Promise.resolve().then(() => (qq(),e)),V={"beacon-init":q,"beacon-refresh":z,"beacon-plan":J,"beacon-explain":Q},Y=[];for(let U of I){if(!p(f(),U))Y.push(U);Pq(f(),U,V[U])}let P=0;for(let U of E)if(Vq(d(),{event:U.event,matcher:U.matcher,command:U.command}))P++;let H=S(T(),A);$q(T(),A,Gq,Jq);let $=wq();return{skillsAdded:Y,hooksAdded:P,agentsMdBlockTouched:!H,mcp:$}}function dq(){let q={};for(let J of I)q[J]=p(f(),J);let z={};for(let J of E)z[J.event]=Yq(d(),{event:J.event,command:J.command});return{detected:Xq(),skills:q,hooks:z,agentsMdBlock:S(T(),A),mcp:c()}}function cq(){let q=[];for(let V of I)if(Wq(f(),V))q.push(V);let z=0;for(let V of E)if(Zq(d(),{event:V.event,command:V.command}))z++;let J=Uq(T(),A,Gq),Q=xq();return{skillsRemoved:q,hooksRemoved:z,agentsMdBlockRemoved:J,mcpRemoved:Q.removed,mcpSkipped:Q.skipped}}var a=()=>g(vq(),".codex"),d=()=>g(a(),"hooks.json"),u=()=>g(a(),"config.toml"),T=()=>g(a(),"AGENTS.md"),f=()=>g(vq(),".agents","skills"),A="<!-- beacon:global:start -->",Gq="<!-- beacon:global:end -->",E,l,uq="# beacon:start (managed by Beacon \u2014 `beacon uninstall` removes this block)",bq="# beacon:end",pq,x="add it manually: codex mcp add beacon -- beacon mcp";var nq=b(()=>{Hq();Bq();E=[{event:"PostToolUse",matcher:"apply_patch",command:"beacon hook",description:"Report file edits to Beacon's active feature so the map stays fresh."},{event:"UserPromptSubmit",matcher:"*",command:"beacon prompt",description:"On feature-y prompts in a Beacon-wired repo, remind the agent to run the context\u2192propose\u2192describe loop (no-op otherwise)."},{event:"Stop",matcher:"*",command:"beacon stop-hook",description:"When the agent ends a turn asking for plan approval in prose, nudge it to present the plan on Beacon's /plan canvas."}];pq=`${uq}
|
|
346
347
|
[mcp_servers.beacon]
|
|
347
348
|
command = "beacon"
|
|
348
349
|
args = ["mcp"]
|
|
349
|
-
${
|
|
350
|
-
`});
|
|
350
|
+
${bq}
|
|
351
|
+
`});nq();export{aq as setupCodexAssets,xq as removeCodexMcp,cq as removeCodexArtifacts,c as hasCodexMcp,wq as ensureCodexMcp,lq as codexMcpProblem,Xq as codexDetected,dq as auditCodex,E as CODEX_HOOKS};
|