trybeacon 0.1.73 → 0.1.75
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 +26 -22
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/routes-manifest.json +24 -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 +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 -1
- package/.next/server/app/api/changes/comment/route.js +4 -1
- 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/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 +3 -3
- 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 +4 -1
- 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/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 +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 +26 -22
- package/.next/server/chunks/1179.js +1 -0
- package/.next/server/chunks/2031.js +1 -0
- package/.next/server/chunks/2693.js +5 -2
- package/.next/server/chunks/374.js +1 -0
- package/.next/server/chunks/4378.js +1 -1
- package/.next/server/chunks/5295.js +1 -0
- package/.next/server/chunks/{4700.js → 5704.js} +2 -2
- package/.next/server/chunks/8227.js +1 -1
- package/.next/server/chunks/9683.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/chunks/1072-351ce2030dee0f4e.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/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-a14eaf5143e2df55.js → page-454e91fdcd29a1ee.js} +1 -1
- package/.next/static/chunks/app/map/{page-06282017c592fb3c.js → page-66f3cac308b215a7.js} +1 -1
- package/.next/static/chunks/app/plan/page-63b2f0d1f090f26f.js +11 -0
- package/.next/static/chunks/app/s/[token]/{page-a4deb16beff21840.js → page-6be414f07f63a402.js} +1 -1
- package/.next/static/chunks/app/settings/{page-67cab634be8bfef2.js → page-a751eabdd933f685.js} +1 -1
- 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/css/60048003a8c96562.css +1 -0
- package/.next/static/ldWTvBCY5D7kyH8PMAEWm/_buildManifest.js +1 -0
- package/.next/trace +46 -45
- package/.next/trace-build +1 -1
- package/.next/types/app/api/ask/answer/route.ts +351 -0
- package/.next/types/app/api/ask/route.ts +351 -0
- 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/routes.d.ts +5 -1
- package/.next/types/validator.ts +36 -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 +20 -20
- package/dist/bin/guard.js +1 -1
- package/dist/bin/hook.js +20 -20
- package/dist/bin/mcp.js +32 -32
- package/dist/bin/plan.js +18 -18
- package/dist/bin/remove.js +6 -6
- package/dist/bin/stop-hook.js +7 -3
- package/dist/bin/uninstall.js +20 -20
- package/dist/lib/global-install.js +1 -1
- package/dist/lib/telemetry.js +1 -1
- package/dist/lib/workspaces.js +1 -1
- package/package.json +1 -1
- package/.next/server/chunks/4307.js +0 -1
- package/.next/server/chunks/5719.js +0 -1
- package/.next/server/chunks/8190.js +0 -1
- package/.next/static/chunks/2231-63ad38ec8fb7cb6f.js +0 -1
- package/.next/static/chunks/5909-387573cddda35a48.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-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/board-annotations/[id]/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/board-annotations/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/board-layout/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/bug-flags/[id]/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/bug-flags/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/changes/comment/claim/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/changes/comment/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/changes/quality/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/changes/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/changes/viewed/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/code-graph/position/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/code-graph/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/context/feature/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/context/file/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/context/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/db/arrange/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/db/backfill-access/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/db/position/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/db/prune-planned/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/db/reconcile-endpoints/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/db/relations/[id]/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/db/tables/[id]/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/draft/approve/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/draft/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/draft/status/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/edges/[id]/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/edges/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/endpoints/[id]/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/entities/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/ingest/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/init/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/lesson/close/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/lesson/presence/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/lesson/questions/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/lesson/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/lesson/save/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/lesson/verdict/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/map/describe/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/map/files/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/map/finish/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/map/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/map/start/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/map/touch-active/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/mention-search/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/nodes/[id]/position/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/nodes/[id]/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/nodes/positions/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/nodes/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/nodes/subtasks/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/notes/[id]/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/notes/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/open/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/plan/annotations/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/plan/approve/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/plan/history/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/plan/markdown/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/plan/presence/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/plan/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/plan/verdict/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/preferences/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/project-meta/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/reset/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/scope-guard/check/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/share/create/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/share/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/stream/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/tab/nav/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/tab/presence/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/telemetry/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/telemetry/stats/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/version/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/workspace/activate/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/api/workspace/route-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/app/layout-6e934a2850efd223.js +0 -1
- package/.next/static/chunks/app/plan/page-41a3990cb858c5f2.js +0 -11
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-5f4c3e6e9cc8e6c9.js +0 -1
- package/.next/static/css/95dc31edc34789a7.css +0 -1
- package/.next/static/mB9lqGEsIvB7tTvv9GU48/_buildManifest.js +0 -1
- /package/.next/static/{mB9lqGEsIvB7tTvv9GU48 → ldWTvBCY5D7kyH8PMAEWm}/_ssgManifest.js +0 -0
package/dist/bin/hook.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
// @bun
|
|
3
|
-
var
|
|
3
|
+
var CZ=Object.defineProperty;var MZ=(Q)=>Q;function uZ(Q,Z){this[Q]=MZ.bind(null,Z)}var ZQ=(Q,Z)=>{for(var $ in Z)CZ(Q,$,{get:Z[$],enumerable:!0,configurable:!0,set:uZ.bind(Z,$)})};var v=(Q,Z)=>()=>(Q&&(Z=Q(Q=0)),Z);var p0=1500,c0=480000,d0=1800000,f=3600000,l0=3000;var OQ=()=>{};var zQ={};ZQ(zQ,{stripAgentsPointer:()=>DQ,removeRepoAssets:()=>DZ,installRefreshSkill:()=>RZ,installPlanSkill:()=>TZ,installInitSkill:()=>wZ,installExplainSkill:()=>FZ,installCodexRepoSkills:()=>OZ,ensureWorkflowDoc:()=>bZ,ensureMcp:()=>IZ,contextDocTargets:()=>VQ,auditRepo:()=>fZ,REFRESH_SKILL:()=>JQ,PLAN_SKILL:()=>IQ,INIT_SKILL:()=>$Q,EXPLAIN_SKILL:()=>fQ});import{existsSync as B,mkdirSync as u,readFileSync as x,rmSync as D,writeFileSync as H}from"fs";import{join as X}from"path";function wZ(Q){let Z=X(Q,".claude","skills","beacon-init");u(Z,{recursive:!0});let $=X(Z,"SKILL.md");return H($,$Q),$}function RZ(Q){let Z=X(Q,".claude","skills","beacon-refresh");u(Z,{recursive:!0});let $=X(Z,"SKILL.md");return H($,JQ),$}function TZ(Q){let Z=X(Q,".claude","skills","beacon-plan");u(Z,{recursive:!0});let $=X(Z,"SKILL.md");return H($,IQ),$}function FZ(Q){let Z=X(Q,".claude","skills","beacon-explain");u(Z,{recursive:!0});let $=X(Z,"SKILL.md");return H($,fQ),$}function OZ(Q){let Z=[];for(let $ of gZ){let J=X(Q,".agents","skills",$.name);u(J,{recursive:!0});let Y=X(J,"SKILL.md");H(Y,$.body()),Z.push(Y)}return Z}function VQ(Q){let Z=X(Q,"AGENTS.md"),$=X(Q,"CLAUDE.md"),J=B(Z),Y=B($);if(!J&&!Y)return[Z,$];let V=[];if(J)V.push(Z);if(Y)V.push($);return V}function DQ(Q){let Z=X(Q,"CLAUDE.md");if(!B(Z))return;let $=x(Z,"utf8"),J=$.split(`
|
|
4
4
|
`).filter((Y)=>!/^\s*@\.?\/?AGENTS\.md\s*$/.test(Y)).join(`
|
|
5
5
|
`).trim();if(J&&J!==$.trim())H(Z,`${J}
|
|
6
|
-
`)}function
|
|
6
|
+
`)}function bZ(Q){let Z=new RegExp(`${E}[\\s\\S]*?${YQ}`);for(let $ of VQ(Q)){let J="";try{J=x($,"utf8")}catch{}J=Z.test(J)?J.replace(Z,bQ):`${J.trim()}
|
|
7
7
|
|
|
8
8
|
${bQ}
|
|
9
9
|
`.trimStart(),H($,J.endsWith(`
|
|
10
10
|
`)?J:`${J}
|
|
11
|
-
`)}
|
|
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=new RegExp(`\\n?${
|
|
11
|
+
`)}DQ(Q)}function IZ(Q){let Z=X(Q,".mcp.json"),$={};try{$=JSON.parse(x(Z,"utf8"))}catch{}$.mcpServers=$.mcpServers??{};let J=$.mcpServers.beacon;if(J){if(!J.timeout||J.timeout<f)return J.timeout=f,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:f},H(Z,JSON.stringify($,null,2)+`
|
|
13
|
+
`),{path:Z,added:!0,updated:!1}}function fZ(Q){let Z=X(Q,".mcp.json"),$=!1;try{$=!!JSON.parse(x(Z,"utf8")).mcpServers?.beacon}catch{}let J=VQ(Q).some((Y)=>{try{return x(Y,"utf8").includes(E)}catch{return!1}});return{repo:Q,mcpRegistered:$,workflowBlock:J,skills:{"beacon-init":B(X(Q,".claude","skills","beacon-init","SKILL.md")),"beacon-refresh":B(X(Q,".claude","skills","beacon-refresh","SKILL.md"))},codexSkills:{"beacon-init":B(X(Q,".agents","skills","beacon-init","SKILL.md")),"beacon-refresh":B(X(Q,".agents","skills","beacon-refresh","SKILL.md"))}}}function DZ(Q){let Z=[];for(let z of["beacon-init","beacon-refresh","beacon-db-design"]){let U=X(Q,".claude","skills",z);if(B(U))D(U,{recursive:!0,force:!0}),Z.push(z)}for(let z of["beacon-init","beacon-refresh"]){let U=X(Q,".agents","skills",z);if(B(U))D(U,{recursive:!0,force:!0}),Z.push(`codex:${z}`)}let $=!1,J=X(Q,".mcp.json");try{let z=JSON.parse(x(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)D(J,{force:!0});else H(J,JSON.stringify(z,null,2)+`
|
|
14
|
+
`)}}catch{}let Y=!1,V=new RegExp(`\\n?${E}[\\s\\S]*?${YQ}\\n?`);for(let z of[X(Q,"AGENTS.md"),X(Q,"CLAUDE.md")])try{let U=x(z,"utf8");if(V.test(U)){let QQ=U.replace(V,`
|
|
15
15
|
`).replace(/\n{3,}/g,`
|
|
16
16
|
|
|
17
17
|
`).trimStart();H(z,QQ.endsWith(`
|
|
18
18
|
`)?QQ:`${QQ}
|
|
19
|
-
`),Y=!0}}catch{}let q=!1,W=X(Q,"CLAUDE.md");try{let z=x(W,"utf8"),U=z.replace(/^[ \t]*@AGENTS\.md[ \t]*\n?/m,"");if(U!==z){if(!U.trim())
|
|
19
|
+
`),Y=!0}}catch{}let q=!1,W=X(Q,"CLAUDE.md");try{let z=x(W,"utf8"),U=z.replace(/^[ \t]*@AGENTS\.md[ \t]*\n?/m,"");if(U!==z){if(!U.trim())D(W,{force:!0});else H(W,U);q=!0}}catch{}return{skillsRemoved:Z,mcpUnregistered:$,agentsBlockRemoved:Y,claudeImportRemoved:q}}var $Q=`---
|
|
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
|
---
|
|
@@ -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
|
+
`,IQ=`---
|
|
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
|
---
|
|
@@ -159,7 +159,7 @@ If it returns feedback, revise and call it again.
|
|
|
159
159
|
If \`beacon_present_plan\` isn't available, the panel isn't wired here \u2014 fall back to ExitPlanMode
|
|
160
160
|
with the same \`\`\`beacon block (Claude Code only; Codex has no ExitPlanMode), or tell the user to
|
|
161
161
|
run \`beacon\` in this repo once.
|
|
162
|
-
`,
|
|
162
|
+
`,fQ=`---
|
|
163
163
|
name: beacon-explain
|
|
164
164
|
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
165
|
---
|
|
@@ -229,7 +229,7 @@ so the learner sees the table IN CONTEXT, wired to the code that uses it.
|
|
|
229
229
|
Every answer must ADD understanding (rationale, trade-off) \u2014 never just restate the question. Expand
|
|
230
230
|
the narrative or add nodes where it helps. Keep looping until the tool reports the user saved or closed
|
|
231
231
|
the lesson.
|
|
232
|
-
`,
|
|
232
|
+
`,gZ,E="<!-- beacon:workflow:start -->",YQ="<!-- beacon:workflow:end -->",bQ;var qQ=v(()=>{OQ();gZ=[{name:"beacon-init",body:()=>$Q},{name:"beacon-refresh",body:()=>JQ}];bQ=`${E}
|
|
233
233
|
## Beacon \u2014 feature workflow
|
|
234
234
|
|
|
235
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:
|
|
@@ -301,18 +301,18 @@ Register them all in that single batched call. If a plan added five features, th
|
|
|
301
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.
|
|
302
302
|
|
|
303
303
|
Pull raw planning data anytime with \`beacon_entities\` (features / architecture / tables / endpoints).
|
|
304
|
-
${YQ}`});import{existsSync as A,mkdirSync as XQ,readdirSync as
|
|
305
|
-
`)}function L(Q,Z){let $=UQ(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}]}),LQ(Q,$),!0}function _(Q,Z){return(UQ(Q).hooks?.[Z.event]??[]).some((Y)=>Y.hooks?.some((V)=>V.command===Z.command))}function S(Q,Z){let $=UQ(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 LQ(Q,$),!0}function
|
|
304
|
+
${YQ}`});import{existsSync as A,mkdirSync as XQ,readdirSync as EZ,readFileSync as C,rmSync as AZ,writeFileSync as y}from"fs";import{dirname as EQ,join as G}from"path";function AQ(){return!!process.env.CLAUDE_PLUGIN_ROOT}function yQ(Q=process.env.HOME||process.env.USERPROFILE||""){if(!Q)return null;let Z=G(Q,".claude","plugins");if(!A(Z))return null;let $=[Z];for(let J=0;J<3&&$.length;J++){let Y=[];for(let V of $){let q=G(V,".claude-plugin","plugin.json");try{if(A(q)&&JSON.parse(C(q,"utf8")).name==="beacon")return V}catch{}try{for(let W of EZ(V,{withFileTypes:!0}))if(W.isDirectory())Y.push(G(V,W.name))}catch{}}$=Y}return null}function kQ(Q){return yQ(Q)!==null}function yZ(Q){return/[\\/]\.claude[\\/]plugins[\\/]/.test(Q)}function kZ(Q=process.env.HOME||process.env.USERPROFILE||""){if(!Q)return null;try{let Z=JSON.parse(C(G(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 UQ(Q){try{return JSON.parse(C(Q,"utf8"))}catch{return{}}}function LQ(Q,Z){XQ(EQ(Q),{recursive:!0}),y(Q,JSON.stringify(Z,null,2)+`
|
|
305
|
+
`)}function L(Q,Z){let $=UQ(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}]}),LQ(Q,$),!0}function _(Q,Z){return(UQ(Q).hooks?.[Z.event]??[]).some((Y)=>Y.hooks?.some((V)=>V.command===Z.command))}function S(Q,Z){let $=UQ(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 LQ(Q,$),!0}function m(Q,Z,$,J){let Y=`${Z}
|
|
306
306
|
${J.trim()}
|
|
307
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
308
|
|
|
309
309
|
${Y}
|
|
310
310
|
`:`${Y}
|
|
311
|
-
`,XQ(
|
|
311
|
+
`,XQ(EQ(Q),{recursive:!0}),y(Q,V.endsWith(`
|
|
312
312
|
`)?V:`${V}
|
|
313
|
-
`)}function
|
|
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
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
|
|
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
316
|
|
|
317
317
|
This machine has Beacon installed \u2014 a local visual planning surface for the terminal-side
|
|
318
318
|
agent. Beacon proposes feature plans (roadmap features + DB schema + endpoints) via MCP,
|
|
@@ -336,18 +336,18 @@ the user reviews on a canvas at /plan, and feedback flows back as the next round
|
|
|
336
336
|
Feedback bundles inline annotations on the markdown PLUS any edits the user made directly
|
|
337
337
|
on the /map and /db boards (added features, attached subtasks, edited columns, new
|
|
338
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(()=>{
|
|
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(`
|
|
340
340
|
`)?`
|
|
341
341
|
`:`
|
|
342
342
|
|
|
343
|
-
`,J=Q+$+
|
|
343
|
+
`,J=Q+$+cZ;if(F(J)?.mcp_servers?.beacon?.command!=="beacon")return{added:!1,error:`could not safely append [mcp_servers.beacon] \u2014 ${T}`};return d(M(),J),{added:!0}}function lQ(){let Q="";try{Q=s(M(),"utf8")}catch{return{removed:!1}}let Z=Q.split(`
|
|
344
344
|
`),$=Z.indexOf(pQ);if($===-1)return{removed:!1,skipped:xQ()};let J=Z.indexOf(cQ,$);if(J===-1)return{removed:!1,skipped:!0};Z.splice($,J-$+1);let Y=Z.join(`
|
|
345
345
|
`).replace(/\n{3,}/g,`
|
|
346
346
|
|
|
347
|
-
`).replace(/^\n+/,"");if(
|
|
347
|
+
`).replace(/^\n+/,"");if(F(Y)===null)return{removed:!1,skipped:!0};return d(M(),Y),{removed:!0}}async function lZ(){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 U of K){if(!R(n(),U))V.push(U);p(n(),U,Y[U])}let q=0;for(let U of t)if(L(jQ(),{event:U.event,matcher:U.matcher,command:U.command}))q++;let W=w(l(),a);m(l(),a,mQ,k);let z=dQ();return{skillsAdded:V,hooksAdded:q,agentsMdBlockTouched:!W,mcp:z}}function nZ(){let Q={};for(let $ of K)Q[$]=R(n(),$);let Z={};for(let $ of t)Z[$.event]=_(jQ(),{event:$.event,command:$.command});return{detected:hQ(),skills:Q,hooks:Z,agentsMdBlock:w(l(),a),mcp:xQ()}}function aZ(){let Q=[];for(let Y of K)if(c(n(),Y))Q.push(Y);let Z=0;for(let Y of t)if(S(jQ(),{event:Y.event,command:Y.command}))Z++;let $=h(l(),a,mQ),J=lQ();return{skillsRemoved:Q,hooksRemoved:Z,agentsMdBlockRemoved:$,mcpRemoved:J.removed,mcpSkipped:J.skipped}}var BQ=()=>g(SQ(),".codex"),jQ=()=>g(BQ(),"hooks.json"),M=()=>g(BQ(),"config.toml"),l=()=>g(BQ(),"AGENTS.md"),n=()=>g(SQ(),".agents","skills"),a="<!-- beacon:global:start -->",mQ="<!-- beacon:global:end -->",t,HQ,pQ="# beacon:start (managed by Beacon \u2014 `beacon uninstall` removes this block)",cQ="# beacon:end",cZ,T="add it manually: codex mcp add beacon -- beacon mcp";var aQ=v(()=>{WQ();_Q();t=[{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."}];cZ=`${pQ}
|
|
348
348
|
[mcp_servers.beacon]
|
|
349
349
|
command = "beacon"
|
|
350
350
|
args = ["mcp"]
|
|
351
351
|
${cQ}
|
|
352
|
-
`});var eQ={};ZQ(eQ,{provisionDb:()=>K0});import{createClient as z0}from"@libsql/client";import{drizzle as q0}from"drizzle-orm/libsql";import{migrate as X0}from"drizzle-orm/libsql/migrator";import{readMigrationFiles as U0}from"drizzle-orm/migrator";import{dirname as CQ,join as W0}from"path";import{fileURLToPath as H0}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 G0(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(x0)){if(!await i(Q,Z))continue;let J=await G0(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 K0(Q,Z=j0){let $=z0({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=U0({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 X0(q0($),{migrationsFolder:Z}),await iQ($)>q)V=!0;return await N0($),{migrated:V}}finally{$.close()}}var B0,j0,x0;var QZ=v(async()=>{B0=CQ(CQ(CQ(H0(import.meta.url)))),j0=process.env.BEACON_MIGRATIONS_DIR||W0(B0,"drizzle"),x0={Node:["createdAt","updatedAt"],Note:["createdAt","updatedAt"],DbTable:["createdAt","updatedAt"],Endpoint:["createdAt","updatedAt"],DraftTable:["createdAt"],SyncState:["codeGraphSyncedAt","updatedAt"],AppSetting:["updatedAt"],ProjectMeta:["updatedAt"],CodeFile:["updatedAt"]}});WQ();import{existsSync as aZ}from"fs";import{homedir as sZ}from"os";import{join as r}from"path";function tZ(){return process.env.HOME||process.env.USERPROFILE||sZ()}var o=()=>r(tZ(),".claude"),GQ=()=>r(o(),"skills"),NQ=()=>r(o(),"settings.json"),KQ=()=>r(o(),"CLAUDE.md"),PQ="<!-- beacon:global:start -->",sQ="<!-- beacon:global:end -->";var rZ=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:"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 oZ(Q,Z){return p(GQ(),Q,Z)}function tQ(Q){return T(GQ(),Q)}function iZ(Q){return c(GQ(),Q)}function eZ(Q){return L(NQ(),Q)}function Q0(Q){return _(NQ(),Q)}function Z0(Q){return S(NQ(),Q)}function $0(Q){h(KQ(),PQ,sQ,Q)}function rQ(){return R(KQ(),PQ)}function J0(){return m(KQ(),PQ,sQ)}function H1(){let Q={};for(let $ of N)Q[$]=tQ($);let Z={};for(let $ of vQ)Z[$.event]=Q0({event:$.event,command:$.command});return{homeExists:aZ(o()),skills:Q,hooks:Z,claudeMdBlock:rQ()}}async function Y0(){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 N){if(!tQ(z))V.push(z);oZ(z,Y[z])}let q=0;for(let z of vQ)if(eZ({event:z.event,matcher:z.matcher,command:z.command}))q++;let W=rQ();return $0(rZ),{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{V0()}catch{}Q={ok:!0,skipped:"plugin-present",skillsAdded:[],hooksAdded:0,claudeMdBlockTouched:!1}}else try{Q={ok:!0,...await Y0()}}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 V0(){let Q=[];for(let J of N)if(iZ(J))Q.push(J);let Z=0;for(let J of vQ)if(Z0(J))Z++;let $=J0();return{skillsRemoved:Q,hooksRemoved:Z,claudeMdBlockRemoved:$}}import{AsyncLocalStorage as P0}from"async_hooks";import{spawnSync as v0}from"child_process";import{createHash as C0}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 M0,join as K,parse as u0,resolve as ZZ}from"path";function j(){return process.env.BEACON_HOME||K(JZ(),".beacon")}function RQ(){return K(j(),"workspaces.json")}function u(Q){return C0("sha256").update(Q).digest("hex").slice(0,12)}function YZ(Q=process.cwd()){let Z=v0("git",["rev-parse","--show-toplevel"],{cwd:Q,stdio:["ignore","pipe","ignore"]});if(Z.status===0){let $=Z.stdout?.toString().trim();if($)return $}return Q}function VZ(Q){let Z=ZZ(Q);return Z!==ZZ(JZ())&&Z!==u0(Z).root}function zZ(){return K(j(),"deleted.json")}function TQ(){try{let Q=JSON.parse(uQ(zZ(),"utf8"));return Array.isArray(Q)?Q:[]}catch{return[]}}function qZ(Q){b(j(),{recursive:!0}),wQ(zZ(),JSON.stringify(Q,null,2))}function XZ(Q){return TQ().includes(Q)}function T1(Q){let Z=TQ();if(!Z.includes(Q))qZ([...Z,Q])}function w0(Q){let Z=TQ();if(Z.includes(Q))qZ(Z.filter(($)=>$!==Q))}function e(Q){return K(j(),Q)}function R0(Q){return`file:${K(e(Q),"db.sqlite")}`}function D(){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 UZ(){return D().sort((Q,Z)=>Z.lastOpenedAt.localeCompare(Q.lastOpenedAt))}function P(Q){return D().find((Z)=>Z.id===Q)??null}function WZ(Q,Z,$=new Date().toISOString()){if(!VZ(Q))throw Error(`beacon: refusing to register a non-repo path as a workspace: ${Q}`);let J=u(Q);if(XZ(J))throw Error(`beacon: workspace ${J} (${Q}) was deleted \u2014 run \`beacon\` or /beacon-init to re-add it`);let Y=D(),V=Y.find((z)=>z.id===J),q={id:J,path:Q,name:Z||V?.name||M0(Q),lastOpenedAt:$},W=[q,...Y.filter((z)=>z.id!==J)];return b(e(J),{recursive:!0}),FQ(W),q}function F1(Q,Z){return w0(u(Q)),WZ(Q,Z)}function g1(Q,Z=new Date().toISOString()){let $=D(),J=$.find((Y)=>Y.id===Q);if(!J)return;J.lastOpenedAt=Z,FQ($)}function O1(Q){if(FQ(D().filter((Z)=>Z.id!==Q)),gQ()===Q)T0(UZ()[0]?.id??null)}function HZ(){return K(j(),"active")}function gQ(){try{return uQ(HZ(),"utf8").trim()||null}catch{return null}}function T0(Q){b(j(),{recursive:!0}),wQ(HZ(),Q??"")}function b1(){let Q=gQ();return Q?P(Q):null}function D1(){let Q=O0()??gQ();return Q?P(Q):null}function E1(Q){return P(Q)?.path??null}function I1(){return $Z(RQ())}var BZ="beacon_ws";function jZ(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 f1(Q){let Z=Q.headers.get("x-beacon-workspace");if(Z&&P(Z))return Z;let $=jZ(Q,BZ);if($&&P($))return $;return F0()}function F0(){let Q=UZ();return Q.length===1?Q[0].id:null}var g0="x-beacon-workspace-path";async function A1(Q){let Z=Q.headers.get("x-beacon-workspace");if(Z&&P(Z))return Z;let $=Q.headers.get(g0);if($&&VZ($)&&!XZ(u($))&&(!Z||u($)===Z)){let Y=WZ($);return await b0(Y.id),Y.id}let J=jZ(Q,BZ);if(J&&P(J))return J;return null}var xZ=new P0;function y1(Q,Z){return Q?xZ.run(Q,Z):Z()}function O0(){return xZ.getStore()??null}var MQ=new Set;function k1(Q){MQ.delete(K(e(Q),"db.sqlite"))}async function b0(Q){let Z=e(Q),$=K(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(R0(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 D0}from"net";var GZ=4319;function E0(Q,Z,$=400){return new Promise((J)=>{let Y=D0({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 I0(Q){for(let Z of["127.0.0.1","::1"])if(await E0(Z,Q))return!1;return!0}async function S1(Q,Z=20){for(let $=Q;$<Q+Z;$++)if(await I0($))return $;return Q}import{resolve as f0}from"path";var A0="*** Begin Patch",y0=/^\*\*\* (Update File|Add File|Move to): (.+)$/;function k0(Q){let Z=[];for(let $ of Q.split(`
|
|
353
|
-
`)){let J=
|
|
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=k0.exec($.trim());if(!J)continue;let Y=J[2].trim();if(J[1]==="Move to")Z.pop();Z.push(Y)}return Z}function NZ(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(y0))continue;return L0(V).map((q)=>A0(Y,q))}return[]}import{readFileSync as _0}from"fs";import{join as S0}from"path";function m0(){try{return JSON.parse(_0(S0(j(),"server.json"),"utf8"))}catch{return null}}function PZ(){if(process.env.BEACON_URL)return process.env.BEACON_URL;return`http://localhost:${m0()?.port||process.env.PORT||KZ}`}await oQ();var vZ="";for await(let Q of process.stdin)vZ+=Q;try{let Q=JSON.parse(vZ||"{}"),Z=NZ(Q);if(Z.length)await fetch(`${PZ()}/api/map/touch-active`,{method:"POST",headers:{"content-type":"application/json",...xZ(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);
|