trybeacon 0.1.65 → 0.1.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +19 -12
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/routes-manifest.json +42 -0
- package/.next/server/app/_global-error/page.js +2 -2
- 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_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +11 -11
- package/.next/server/app/_not-found.segments/_full.segment.rsc +11 -11
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +11 -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/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/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/feedback/[id]/route.js +1 -1
- package/.next/server/app/api/feedback/[id]/vote/route.js +1 -1
- package/.next/server/app/api/feedback/route.js +1 -1
- package/.next/server/app/api/flags/route.js +1 -1
- package/.next/server/app/api/ingest/route.js +2 -2
- package/.next/server/app/api/init/route.js +2 -2
- package/.next/server/app/api/lesson/close/route.js +1 -0
- package/.next/server/app/api/lesson/close/route.js.nft.json +1 -0
- package/.next/server/app/api/lesson/close/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/lesson/presence/route.js +1 -0
- package/.next/server/app/api/lesson/presence/route.js.nft.json +1 -0
- package/.next/server/app/api/lesson/presence/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/lesson/questions/route.js +1 -0
- package/.next/server/app/api/lesson/questions/route.js.nft.json +1 -0
- package/.next/server/app/api/lesson/questions/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/lesson/route.js +1 -0
- package/.next/server/app/api/lesson/route.js.nft.json +1 -0
- package/.next/server/app/api/lesson/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/lesson/save/route.js +1 -0
- package/.next/server/app/api/lesson/save/route.js.nft.json +1 -0
- package/.next/server/app/api/lesson/save/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/lesson/verdict/route.js +1 -0
- package/.next/server/app/api/lesson/verdict/route.js.nft.json +1 -0
- package/.next/server/app/api/lesson/verdict/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/map/describe/route.js +2 -2
- 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 +2 -2
- 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 +1 -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_client-reference-manifest.js +1 -1
- package/.next/server/app/docs.html +1 -1
- package/.next/server/app/docs.rsc +11 -11
- package/.next/server/app/docs.segments/_full.segment.rsc +11 -11
- package/.next/server/app/docs.segments/_head.segment.rsc +1 -1
- package/.next/server/app/docs.segments/_index.segment.rsc +11 -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/feedback/page.js +2 -2
- package/.next/server/app/feedback/page_client-reference-manifest.js +1 -1
- package/.next/server/app/feedback.html +1 -1
- package/.next/server/app/feedback.rsc +11 -11
- package/.next/server/app/feedback.segments/_full.segment.rsc +11 -11
- package/.next/server/app/feedback.segments/_head.segment.rsc +1 -1
- package/.next/server/app/feedback.segments/_index.segment.rsc +11 -11
- package/.next/server/app/feedback.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/feedback.segments/feedback/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/feedback.segments/feedback.segment.rsc +1 -1
- package/.next/server/app/help/page.js +2 -2
- 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 +11 -11
- package/.next/server/app/help.segments/_full.segment.rsc +11 -11
- package/.next/server/app/help.segments/_head.segment.rsc +1 -1
- package/.next/server/app/help.segments/_index.segment.rsc +11 -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 +12 -12
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +12 -12
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +11 -11
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/learn/page.js +6 -0
- package/.next/server/app/learn/page.js.nft.json +1 -0
- package/.next/server/app/learn/page_client-reference-manifest.js +1 -0
- 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 +2 -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 +19 -12
- package/.next/server/chunks/2050.js +1 -1
- package/.next/server/chunks/3584.js +154 -0
- package/.next/server/chunks/4307.js +1 -1
- package/.next/server/chunks/6024.js +2 -0
- package/.next/server/chunks/{2813.js → 7187.js} +1 -1
- package/.next/server/chunks/8035.js +1 -0
- package/.next/server/chunks/9338.js +8 -8
- 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/P3uXQySdS-m6_bxuiezYe/_buildManifest.js +1 -0
- package/.next/static/chunks/1936-7fea5225b5bfcfda.js +1 -0
- package/.next/static/chunks/2019-3be80edc82176878.js +1 -0
- package/.next/static/chunks/4549-591415d55ca009a3.js +62 -0
- package/.next/static/chunks/6638-4e53879181b1df75.js +1 -0
- package/.next/static/chunks/{4888-911c0da3c2d785d2.js → 7043-254590cf9891391f.js} +1 -1
- package/.next/static/chunks/7643-6c7ff4b9400f68fc.js +1 -0
- package/.next/static/chunks/app/_global-error/page-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/board-annotations/[id]/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/board-annotations/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/board-layout/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/bug-flags/[id]/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/bug-flags/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/code-graph/position/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/code-graph/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/context/feature/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/context/file/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/context/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/db/arrange/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/db/backfill-access/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/db/position/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/db/prune-planned/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/db/reconcile-endpoints/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/db/relations/[id]/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/db/tables/[id]/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/draft/approve/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/draft/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/draft/status/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/edges/[id]/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/edges/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/endpoints/[id]/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/entities/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/feedback/[id]/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/feedback/[id]/vote/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/feedback/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/flags/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/ingest/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/init/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/lesson/close/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/lesson/presence/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/lesson/questions/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/lesson/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/lesson/save/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/lesson/verdict/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/map/describe/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/map/files/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/map/finish/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/map/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/map/start/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/map/touch-active/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/mention-search/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/nodes/[id]/position/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/nodes/[id]/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/nodes/positions/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/nodes/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/nodes/subtasks/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/notes/[id]/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/notes/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/open/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/plan/annotations/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/plan/approve/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/plan/history/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/plan/markdown/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/plan/presence/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/plan/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/plan/verdict/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/preferences/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/project-meta/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/reset/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/scope-guard/check/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/share/create/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/share/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/stream/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/tab/nav/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/tab/presence/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/telemetry/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/telemetry/stats/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/version/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/workspace/activate/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/workspace/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/layout-0c993f55d3a798f4.js +1 -0
- package/.next/static/chunks/app/learn/page-797d74e02b98fa88.js +5 -0
- package/.next/static/chunks/app/map/page-634b6d5d98e921b3.js +1 -0
- package/.next/static/chunks/app/page-84dc684d45002cfb.js +1 -0
- package/.next/static/chunks/app/plan/page-df829b2054c40611.js +1 -0
- package/.next/static/chunks/app/s/[token]/page-f97dec75856a7952.js +1 -0
- package/.next/static/chunks/app/settings/page-59d90685cd17fc1f.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-2390ea0e69e5991f.js +1 -0
- package/.next/static/css/b3d3212da726bbfb.css +1 -0
- package/.next/trace +43 -42
- package/.next/trace-build +1 -1
- package/.next/types/app/api/lesson/close/route.ts +351 -0
- package/.next/types/app/api/lesson/presence/route.ts +351 -0
- package/.next/types/app/api/lesson/questions/route.ts +351 -0
- package/.next/types/app/api/lesson/route.ts +351 -0
- package/.next/types/app/api/lesson/save/route.ts +351 -0
- package/.next/types/app/api/lesson/verdict/route.ts +351 -0
- package/.next/types/app/learn/page.ts +87 -0
- package/.next/types/routes.d.ts +9 -2
- package/.next/types/validator.ts +63 -0
- package/dist/bin/doctor.js +88 -22
- package/dist/bin/hook.js +87 -21
- package/dist/bin/mcp.js +103 -35
- package/dist/bin/plan.js +88 -22
- package/dist/bin/uninstall.js +91 -25
- package/dist/lib/assets.js +77 -14
- package/dist/lib/codex-install.js +88 -22
- package/dist/lib/global-install.js +89 -23
- package/package.json +1 -1
- package/plugin/skills/beacon-explain/SKILL.md +63 -0
- package/.next/server/chunks/2994.js +0 -2
- package/.next/server/chunks/3284.js +0 -154
- package/.next/server/chunks/5719.js +0 -1
- package/.next/static/chunks/4491-0cd79f4195f4b111.js +0 -1
- package/.next/static/chunks/5957-83f611fcd5a08b45.js +0 -1
- package/.next/static/chunks/766-242213d211df0afd.js +0 -1
- package/.next/static/chunks/8915-fa61a860c63a7c85.js +0 -62
- package/.next/static/chunks/8997-78a359d0d238622e.js +0 -1
- package/.next/static/chunks/app/_global-error/page-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/board-annotations/[id]/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/board-annotations/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/board-layout/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/bug-flags/[id]/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/bug-flags/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/code-graph/position/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/code-graph/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/context/feature/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/context/file/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/context/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/db/arrange/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/db/backfill-access/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/db/position/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/db/prune-planned/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/db/reconcile-endpoints/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/db/relations/[id]/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/db/tables/[id]/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/draft/approve/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/draft/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/draft/status/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/edges/[id]/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/edges/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/endpoints/[id]/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/entities/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/feedback/[id]/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/feedback/[id]/vote/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/feedback/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/flags/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/ingest/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/init/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/map/describe/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/map/files/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/map/finish/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/map/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/map/start/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/map/touch-active/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/mention-search/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/nodes/[id]/position/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/nodes/[id]/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/nodes/positions/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/nodes/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/nodes/subtasks/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/notes/[id]/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/notes/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/open/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/plan/annotations/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/plan/approve/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/plan/history/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/plan/markdown/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/plan/presence/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/plan/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/plan/verdict/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/preferences/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/project-meta/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/reset/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/scope-guard/check/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/share/create/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/share/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/stream/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/tab/nav/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/tab/presence/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/telemetry/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/telemetry/stats/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/version/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/workspace/activate/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/workspace/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/layout-3115f8503ff00902.js +0 -1
- package/.next/static/chunks/app/map/page-66ec4b62a4153de8.js +0 -1
- package/.next/static/chunks/app/page-d08947a671077569.js +0 -1
- package/.next/static/chunks/app/plan/page-008565f9049d55c9.js +0 -1
- package/.next/static/chunks/app/s/[token]/page-1c10b26b300faffc.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-548a84d85e061550.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-548a84d85e061550.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-548a84d85e061550.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-548a84d85e061550.js +0 -1
- package/.next/static/css/f871d81e526502c1.css +0 -1
- package/.next/static/fwNWsob4GcVUD5_xV0f1h/_buildManifest.js +0 -1
- /package/.next/static/{fwNWsob4GcVUD5_xV0f1h → P3uXQySdS-m6_bxuiezYe}/_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
|
|
3
|
+
var EZ=Object.defineProperty;var DZ=(Q)=>Q;function IZ(Q,Z){this[Q]=DZ.bind(null,Z)}var jQ=(Q,Z)=>{for(var $ in Z)EZ(Q,$,{get:Z[$],enumerable:!0,configurable:!0,set:IZ.bind(Z,$)})};var M=(Q,Z)=>()=>(Q&&(Z=Q(Q=0)),Z);var S0=1500,h0=480000,m0=1800000,S=3600000,p0=3000;var cQ=()=>{};var xQ={};jQ(xQ,{removeRepoAssets:()=>NQ,installRefreshSkill:()=>OZ,installPlanSkill:()=>AZ,installInitSkill:()=>bZ,installExplainSkill:()=>yZ,installCodexRepoSkills:()=>LZ,ensureWorkflowDoc:()=>_Z,ensureMcp:()=>SZ,auditRepo:()=>hZ,REFRESH_SKILL:()=>GQ,PLAN_SKILL:()=>nQ,INIT_SKILL:()=>PQ,EXPLAIN_SKILL:()=>tQ});import{existsSync as T,mkdirSync as g,readFileSync as G,rmSync as h,writeFileSync as H}from"fs";import{join as X}from"path";function bZ(Q){let Z=X(Q,".claude","skills","beacon-init");g(Z,{recursive:!0});let $=X(Z,"SKILL.md");return H($,PQ),$}function OZ(Q){let Z=X(Q,".claude","skills","beacon-refresh");g(Z,{recursive:!0});let $=X(Z,"SKILL.md");return H($,GQ),$}function AZ(Q){let Z=X(Q,".claude","skills","beacon-plan");g(Z,{recursive:!0});let $=X(Z,"SKILL.md");return H($,nQ),$}function yZ(Q){let Z=X(Q,".claude","skills","beacon-explain");g(Z,{recursive:!0});let $=X(Z,"SKILL.md");return H($,tQ),$}function LZ(Q){let Z=[];for(let $ of kZ){let J=X(Q,".agents","skills",$.name);g(J,{recursive:!0});let Y=X(J,"SKILL.md");H(Y,$.body()),Z.push(Y)}return Z}function _Z(Q){let Z=X(Q,"AGENTS.md"),$="";try{$=G(Z,"utf8")}catch{}let J=new RegExp(`${m}[\\s\\S]*?${vQ}`);$=J.test($)?$.replace(J,lQ):`${$.trim()}
|
|
4
4
|
|
|
5
5
|
${lQ}
|
|
6
6
|
`.trimStart(),H(Z,$.endsWith(`
|
|
7
7
|
`)?$:`${$}
|
|
8
|
-
`);let Y=
|
|
8
|
+
`);let Y=X(Q,"CLAUDE.md"),V="";try{V=G(Y,"utf8")}catch{}if(!/@AGENTS\.md/.test(V))H(Y,`${V?`${V.trim()}
|
|
9
9
|
|
|
10
10
|
`:""}@AGENTS.md
|
|
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=
|
|
11
|
+
`)}function SZ(Q){let Z=X(Q,".mcp.json"),$={};try{$=JSON.parse(G(Z,"utf8"))}catch{}$.mcpServers=$.mcpServers??{};let J=$.mcpServers.beacon;if(J){if(!J.timeout||J.timeout<S)return J.timeout=S,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:S},H(Z,JSON.stringify($,null,2)+`
|
|
13
|
+
`),{path:Z,added:!0,updated:!1}}function hZ(Q){let Z=X(Q,".mcp.json"),$=!1;try{$=!!JSON.parse(G(Z,"utf8")).mcpServers?.beacon}catch{}let J=!1;try{J=G(X(Q,"AGENTS.md"),"utf8").includes(m)}catch{}let Y=!1;try{Y=/@AGENTS\.md/.test(G(X(Q,"CLAUDE.md"),"utf8"))}catch{}return{repo:Q,mcpRegistered:$,agentsMdBlock:J,claudeMdImport:Y,skills:{"beacon-init":T(X(Q,".claude","skills","beacon-init","SKILL.md")),"beacon-refresh":T(X(Q,".claude","skills","beacon-refresh","SKILL.md"))},codexSkills:{"beacon-init":T(X(Q,".agents","skills","beacon-init","SKILL.md")),"beacon-refresh":T(X(Q,".agents","skills","beacon-refresh","SKILL.md"))}}}function NQ(Q){let Z=[];for(let z of["beacon-init","beacon-refresh","beacon-db-design"]){let U=X(Q,".claude","skills",z);if(T(U))h(U,{recursive:!0,force:!0}),Z.push(z)}for(let z of["beacon-init","beacon-refresh"]){let U=X(Q,".agents","skills",z);if(T(U))h(U,{recursive:!0,force:!0}),Z.push(`codex:${z}`)}let $=!1,J=X(Q,".mcp.json");try{let z=JSON.parse(G(J,"utf8"));if(z.mcpServers?.beacon){if(delete z.mcpServers.beacon,$=!0,z.mcpServers&&Object.keys(z.mcpServers).length===0)delete z.mcpServers;if(Object.keys(z).length===0)h(J,{force:!0});else H(J,JSON.stringify(z,null,2)+`
|
|
14
|
+
`)}}catch{}let Y=!1,V=X(Q,"AGENTS.md");try{let z=G(V,"utf8"),U=new RegExp(`\\n?${m}[\\s\\S]*?${vQ}\\n?`);if(U.test(z)){let BQ=z.replace(U,`
|
|
15
15
|
`).replace(/\n{3,}/g,`
|
|
16
16
|
|
|
17
|
-
`).trimStart();H(V,
|
|
18
|
-
`)?
|
|
19
|
-
`),Y=!0}}catch{}let q=!1,X
|
|
17
|
+
`).trimStart();H(V,BQ.endsWith(`
|
|
18
|
+
`)?BQ:`${BQ}
|
|
19
|
+
`),Y=!0}}catch{}let q=!1,W=X(Q,"CLAUDE.md");try{let z=G(W,"utf8"),U=z.replace(/^[ \t]*@AGENTS\.md[ \t]*\n?/m,"");if(U!==z){if(!U.trim())h(W,{force:!0});else H(W,U);q=!0}}catch{}return{skillsRemoved:Z,mcpUnregistered:$,agentsBlockRemoved:Y,claudeImportRemoved:q}}var PQ=`---
|
|
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
|
+
`,GQ=`---
|
|
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
|
---
|
|
@@ -158,7 +158,70 @@ If it returns feedback, revise and call it again.
|
|
|
158
158
|
If \`beacon_present_plan\` isn't available, the panel isn't wired here \u2014 fall back to ExitPlanMode
|
|
159
159
|
with the same \`\`\`beacon block (Claude Code only; Codex has no ExitPlanMode), or tell the user to
|
|
160
160
|
run \`beacon\` in this repo once.
|
|
161
|
-
`,
|
|
161
|
+
`,tQ=`---
|
|
162
|
+
name: beacon-explain
|
|
163
|
+
description: Teach the user part of THIS codebase as an interactive visual lesson on Beacon's /learn page \u2014 a concept map + plain-English narrative they can question \u2014 instead of a wall of text. Use when the user says "explain", "teach me", "walk me through", "how does X work", or "help me understand the Y category".
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
# Explain the codebase visually (/beacon-explain)
|
|
167
|
+
|
|
168
|
+
When the user wants to UNDERSTAND part of the code (not build something), don't dump prose in the
|
|
169
|
+
terminal and don't open a plan \u2014 plans are for building. Author an interactive **Lesson** and push it
|
|
170
|
+
with the \`beacon_explain\` MCP tool: a curated concept map (boxes + labeled arrows) beside a
|
|
171
|
+
plain-English narrative on Beacon's /learn page. The tool BLOCKS while the user reads, highlights text
|
|
172
|
+
to ask questions, and drops question notes; it returns their questions, you ANSWER and re-push, looping
|
|
173
|
+
until they Save the lesson. There is NO approve/discard \u2014 understanding, not building.
|
|
174
|
+
|
|
175
|
+
## 1. Load context first \u2014 don't explain blind
|
|
176
|
+
|
|
177
|
+
Before writing, call \`beacon_context_for_feature\` / \`beacon_map\` and read the relevant files so the
|
|
178
|
+
lesson is accurate. Name real files, functions, tables, and endpoints \u2014 never vague descriptions.
|
|
179
|
+
|
|
180
|
+
## 2. Write like a great teacher \u2014 the house style (this is the whole point)
|
|
181
|
+
|
|
182
|
+
Every lesson must read like a patient senior engineer explaining to a sharp newcomer:
|
|
183
|
+
|
|
184
|
+
- **Plain English, always.** Define any term the first time it appears. No unexplained jargon, no
|
|
185
|
+
wall of nouns.
|
|
186
|
+
- **Problem-first.** Open each component with the PROBLEM it solves \u2014 a concrete human scenario, the
|
|
187
|
+
tension that forced the design, then the decision and what it means. (e.g. "When a salesperson
|
|
188
|
+
confirms an order it must also land in the ERP \u2014 but the ERP can be slow or down, and you do *not*
|
|
189
|
+
want confirmation to hang. So the sync is *decoupled*: confirming succeeds immediately and the push
|
|
190
|
+
happens in the background, with retries.")
|
|
191
|
+
- **Concrete step-by-step flow.** Walk the real path as a numbered list. Each step is ONE clear
|
|
192
|
+
action and names the real identifier in backticks \u2014 file (\`order-placed-sync-erp.ts\`), function
|
|
193
|
+
(\`syncOrderToErpWorkflow\`), event (\`order.placed\`), column (\`erp_sync_record\`), value
|
|
194
|
+
(\`requires_human_action\`). Enumerate the cases (success / retryable / rejected / \u2026) with the plain
|
|
195
|
+
meaning of each.
|
|
196
|
+
- **Anticipate-and-answer "Why X?".** After the flow, add short sections that answer the confusions a
|
|
197
|
+
reader will actually have ("Why two status columns?", "Why is the ledger append-only?"). ALWAYS
|
|
198
|
+
explain why the alternative is worse ("claiming success could hide a real failure; claiming hard
|
|
199
|
+
failure could cause a duplicate order later").
|
|
200
|
+
- **A worked example with real data.** Show the mechanism running on one concrete case \u2014 ideally a
|
|
201
|
+
small markdown table of state transitions \u2014 and land the insight ("that's 8 rows for one order, and
|
|
202
|
+
that's the point").
|
|
203
|
+
- **Typographic discipline.** **Bold** the decisions, *italic* the concepts being introduced, and put
|
|
204
|
+
\`inline code\` around every real identifier \u2014 on /learn, backticked real file paths become clickable
|
|
205
|
+
to open in the user's editor.
|
|
206
|
+
|
|
207
|
+
## 3. Map the prose to the board
|
|
208
|
+
|
|
209
|
+
Every component/flow you NAME in the narrative becomes a \`node\` (title + a one-line \`summary\` for its
|
|
210
|
+
face + a fuller \`detail\` + the real \`files\` it maps to). Every "A does X to B" becomes an \`edge\` with
|
|
211
|
+
a relationship VERB \u2014 one of: imports, calls, persists to, reads from, writes to, routes to, depends
|
|
212
|
+
on, emits, returns, contains, extends \u2014 never a bare line. Keep the resting set small (~4\u20137 nodes);
|
|
213
|
+
push depth into \`detail\`, not the node face. Supply \`steps\` for the guided walkthrough: the first step
|
|
214
|
+
is the overview (empty \`focusIds\`), then teach one node (or a few) per step in order, each with its
|
|
215
|
+
\`focusIds\`.
|
|
216
|
+
|
|
217
|
+
## 4. Answer in the loop \u2014 don't stop after one round
|
|
218
|
+
|
|
219
|
+
\`beacon_explain\` returns the user's questions, each tagged \`[q:ID]\`. Answer EACH by calling
|
|
220
|
+
\`beacon_explain\` AGAIN with the SAME lesson plus \`answers: [{ questionId, answer }]\` (keyed by the id).
|
|
221
|
+
Every answer must ADD understanding (rationale, trade-off) \u2014 never just restate the question. Expand
|
|
222
|
+
the narrative or add nodes where it helps. Keep looping until the tool reports the user saved or closed
|
|
223
|
+
the lesson.
|
|
224
|
+
`,kZ,m="<!-- beacon:workflow:start -->",vQ="<!-- beacon:workflow:end -->",lQ;var p=M(()=>{cQ();kZ=[{name:"beacon-init",body:()=>PQ},{name:"beacon-refresh",body:()=>GQ}];lQ=`${m}
|
|
162
225
|
## Beacon \u2014 feature workflow
|
|
163
226
|
|
|
164
227
|
This project uses Beacon (a local planning/visualization panel; run \`beacon\` to open it). When you start work on a FEATURE \u2014 whether referenced via an \`@beacon:feature://\u2026\` mention, an \`@beacon:note://\u2026\` note the user wrote in the Notes panel (treat its checkbox \`- [ ]\` todos as subtasks and order features by their dependencies), or just described in chat \u2014 follow these steps in order:
|
|
@@ -230,18 +293,18 @@ Register them all in that single batched call. If a plan added five features, th
|
|
|
230
293
|
If the feature added or materially changed a REAL architectural component (a subsystem \u2014 NOT a file), also pass \`architecture: [{ title, domain, role, \u2026 }]\` so the Architecture map stays accurate. It upserts curated components by title; never list files as components. If you found a bug or something worth investigating in a component's code, add \`bugs: [{ note }]\` to its architecture entry \u2014 it renders as a bug flag on the node (attributed to the agent); identical open flags are not duplicated. Only flag what you actually saw in the code.
|
|
231
294
|
|
|
232
295
|
Pull raw planning data anytime with \`beacon_entities\` (features / architecture / tables / endpoints).
|
|
233
|
-
${
|
|
234
|
-
`)}function t(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}]}),
|
|
296
|
+
${vQ}`});import{existsSync as c,mkdirSync as KQ,readdirSync as mZ,readFileSync as E,rmSync as pZ,writeFileSync as l}from"fs";import{dirname as dQ,join as K}from"path";function aQ(){return!!process.env.CLAUDE_PLUGIN_ROOT}function sQ(Q=process.env.HOME||process.env.USERPROFILE||""){if(!Q)return null;let Z=K(Q,".claude","plugins");if(!c(Z))return null;let $=[Z];for(let J=0;J<3&&$.length;J++){let Y=[];for(let V of $){let q=K(V,".claude-plugin","plugin.json");try{if(c(q)&&JSON.parse(E(q,"utf8")).name==="beacon")return V}catch{}try{for(let W of mZ(V,{withFileTypes:!0}))if(W.isDirectory())Y.push(K(V,W.name))}catch{}}$=Y}return null}function rQ(Q){return sQ(Q)!==null}function uQ(Q){try{return JSON.parse(E(Q,"utf8"))}catch{return{}}}function oQ(Q,Z){KQ(dQ(Q),{recursive:!0}),l(Q,JSON.stringify(Z,null,2)+`
|
|
297
|
+
`)}function t(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}]}),oQ(Q,$),!0}function d(Q,Z){return(uQ(Q).hooks?.[Z.event]??[]).some((Y)=>Y.hooks?.some((V)=>V.command===Z.command))}function a(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 oQ(Q,$),!0}function s(Q,Z,$,J){let Y=`${Z}
|
|
235
298
|
${J.trim()}
|
|
236
|
-
${$}`,V="";try{V=
|
|
299
|
+
${$}`,V="";try{V=E(Q,"utf8")}catch{}let q=new RegExp(`${Z}[\\s\\S]*?${$}`);V=q.test(V)?V.replace(q,Y):V.trim()?`${V.trim()}
|
|
237
300
|
|
|
238
301
|
${Y}
|
|
239
302
|
`:`${Y}
|
|
240
|
-
`,KQ(
|
|
303
|
+
`,KQ(dQ(Q),{recursive:!0}),l(Q,V.endsWith(`
|
|
241
304
|
`)?V:`${V}
|
|
242
|
-
`)}function
|
|
305
|
+
`)}function D(Q,Z){try{return E(Q,"utf8").includes(Z)}catch{return!1}}function r(Q,Z,$){let J="";try{J=E(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,`
|
|
243
306
|
|
|
244
|
-
`).trimStart();return l(Q,V),!0}function o(Q,Z,$){let J=K(Q,Z);KQ(J,{recursive:!0});let Y=K(J,"SKILL.md");return l(Y,$),Y}function I(Q,Z){return c(K(Q,Z,"SKILL.md"))}function i(Q,Z){let $=K(Q,Z);if(!c($))return!1;return
|
|
307
|
+
`).trimStart();return l(Q,V),!0}function o(Q,Z,$){let J=K(Q,Z);KQ(J,{recursive:!0});let Y=K(J,"SKILL.md");return l(Y,$),Y}function I(Q,Z){return c(K(Q,Z,"SKILL.md"))}function i(Q,Z){let $=K(Q,Z);if(!c($))return!1;return pZ($,{recursive:!0,force:!0}),!0}var B,n=`## Beacon (visual planning panel)
|
|
245
308
|
|
|
246
309
|
This machine has Beacon installed \u2014 a local visual planning surface for the terminal-side
|
|
247
310
|
agent. Beacon proposes feature plans (roadmap features + DB schema + endpoints) via MCP,
|
|
@@ -255,6 +318,9 @@ the user reviews on a canvas at /plan, and feedback flows back as the next round
|
|
|
255
318
|
- User asks to "refresh Beacon" / "update the map" / "bring Beacon up to date" \u2192 invoke
|
|
256
319
|
the \`beacon-refresh\` skill. Re-surveys the repo and updates init-derived nodes while
|
|
257
320
|
preserving anything the user added by hand.
|
|
321
|
+
- User asks to "explain" / "teach me" / "walk me through" / "how does X work" \u2192 if the
|
|
322
|
+
\`beacon_explain\` MCP tool is available, author an interactive Lesson (a concept map +
|
|
323
|
+
plain-English narrative on /learn the user questions back) via the \`beacon-explain\` skill.
|
|
258
324
|
- Run \`beacon doctor\` to audit what's wired (global hooks, repo's .mcp.json, AGENTS.md block).
|
|
259
325
|
|
|
260
326
|
**The plan feedback loop**
|
|
@@ -262,20 +328,20 @@ the user reviews on a canvas at /plan, and feedback flows back as the next round
|
|
|
262
328
|
Feedback bundles inline annotations on the markdown PLUS any edits the user made directly
|
|
263
329
|
on the /map and /db boards (added features, attached subtasks, edited columns, new
|
|
264
330
|
endpoints). Treat board edits as the user's revision intent \u2014 re-propose matching them
|
|
265
|
-
verbatim. Do NOT implement until the tool returns approval.`;var CQ=M(()=>{
|
|
331
|
+
verbatim. Do NOT implement until the tool returns approval.`;var CQ=M(()=>{B=["beacon-init","beacon-refresh","beacon-plan","beacon-explain"]});import{mkdirSync as cZ,renameSync as lZ,rmSync as nZ,writeFileSync as tZ}from"fs";import{dirname as dZ}from"path";function e(Q,Z){cZ(dZ(Q),{recursive:!0});let $=`${Q}.tmp`;try{tZ($,Z),lZ($,Q)}catch(J){throw nZ($,{force:!0}),J}}function i0(Q,Z,$=!1){e(Q,JSON.stringify(Z,null,$?2:void 0))}var iQ=()=>{};var zZ={};jQ(zZ,{setupCodexAssets:()=>oZ,removeCodexMcp:()=>VZ,removeCodexArtifacts:()=>FQ,hasCodexMcp:()=>wQ,ensureCodexMcp:()=>YZ,codexMcpProblem:()=>rZ,codexDetected:()=>ZZ,auditCodex:()=>RQ,CODEX_HOOKS:()=>R});import{readFileSync as JQ}from"fs";import{homedir as aZ}from"os";import{join as A}from"path";function eQ(){return process.env.HOME||process.env.USERPROFILE||aZ()}function ZZ(){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 O(Q){try{return Bun.TOML.parse(Q)}catch{return null}}function wQ(){try{return Boolean(O(JQ(w(),"utf8"))?.mcp_servers?.beacon)}catch{return!1}}function rZ(){let Q="";try{Q=JQ(w(),"utf8")}catch{return null}let Z=O(Q);if(!Z)return`~/.codex/config.toml does not parse \u2014 ${b}`;if(Z.mcp_servers?.beacon)return null;if(/^\s*mcp_servers\s*=/m.test(Q))return`mcp_servers is an inline table \u2014 ${b}`;return null}function YZ(){let Q="",Z=!1;try{Q=JQ(w(),"utf8"),Z=!0}catch{}if(Z){let V=O(Q);if(!V)return{added:!1,error:`~/.codex/config.toml does not parse \u2014 ${b}`};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 ${b}`}}let $=!Q?"":Q.endsWith(`
|
|
266
332
|
`)?`
|
|
267
333
|
`:`
|
|
268
334
|
|
|
269
|
-
`,J=Q+$+
|
|
270
|
-
`),$=Z.indexOf(
|
|
335
|
+
`,J=Q+$+sZ;if(O(J)?.mcp_servers?.beacon?.command!=="beacon")return{added:!1,error:`could not safely append [mcp_servers.beacon] \u2014 ${b}`};return e(w(),J),{added:!0}}function VZ(){let Q="";try{Q=JQ(w(),"utf8")}catch{return{removed:!1}}let Z=Q.split(`
|
|
336
|
+
`),$=Z.indexOf($Z);if($===-1)return{removed:!1,skipped:wQ()};let J=Z.indexOf(JZ,$);if(J===-1)return{removed:!1,skipped:!0};Z.splice($,J-$+1);let Y=Z.join(`
|
|
271
337
|
`).replace(/\n{3,}/g,`
|
|
272
338
|
|
|
273
|
-
`).replace(/^\n+/,"");if(
|
|
339
|
+
`).replace(/^\n+/,"");if(O(Y)===null)return{removed:!1,skipped:!0};return e(w(),Y),{removed:!0}}async function oZ(){let{INIT_SKILL:Q,REFRESH_SKILL:Z,PLAN_SKILL:$,EXPLAIN_SKILL:J}=await Promise.resolve().then(() => (p(),xQ)),Y={"beacon-init":Q,"beacon-refresh":Z,"beacon-plan":$,"beacon-explain":J},V=[];for(let U of B){if(!I(ZQ(),U))V.push(U);o(ZQ(),U,Y[U])}let q=0;for(let U of R)if(t(TQ(),{event:U.event,matcher:U.matcher,command:U.command}))q++;let W=D(QQ(),$Q);s(QQ(),$Q,QZ,n);let z=YZ();return{skillsAdded:V,hooksAdded:q,agentsMdBlockTouched:!W,mcp:z}}function RQ(){let Q={};for(let $ of B)Q[$]=I(ZQ(),$);let Z={};for(let $ of R)Z[$.event]=d(TQ(),{event:$.event,command:$.command});return{detected:ZZ(),skills:Q,hooks:Z,agentsMdBlock:D(QQ(),$Q),mcp:wQ()}}function FQ(){let Q=[];for(let Y of B)if(i(ZQ(),Y))Q.push(Y);let Z=0;for(let Y of R)if(a(TQ(),{event:Y.event,command:Y.command}))Z++;let $=r(QQ(),$Q,QZ),J=VZ();return{skillsRemoved:Q,hooksRemoved:Z,agentsMdBlockRemoved:$,mcpRemoved:J.removed,mcpSkipped:J.skipped}}var MQ=()=>A(eQ(),".codex"),TQ=()=>A(MQ(),"hooks.json"),w=()=>A(MQ(),"config.toml"),QQ=()=>A(MQ(),"AGENTS.md"),ZQ=()=>A(eQ(),".agents","skills"),$Q="<!-- beacon:global:start -->",QZ="<!-- beacon:global:end -->",R,fQ,$Z="# beacon:start (managed by Beacon \u2014 `beacon uninstall` removes this block)",JZ="# beacon:end",sZ,b="add it manually: codex mcp add beacon -- beacon mcp";var gQ=M(()=>{CQ();iQ();R=[{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."}];sZ=`${$Z}
|
|
274
340
|
[mcp_servers.beacon]
|
|
275
341
|
command = "beacon"
|
|
276
342
|
args = ["mcp"]
|
|
277
|
-
${
|
|
278
|
-
`});var
|
|
279
|
-
\x1B[1m${Q}\x1B[0m`,
|
|
280
|
-
`),process.exit(0);console.log(f("Applying\u2026"));var F=
|
|
343
|
+
${JZ}
|
|
344
|
+
`});var BZ={};jQ(BZ,{provisionDb:()=>C0});import{createClient as W0}from"@libsql/client";import{drizzle as H0}from"drizzle-orm/libsql";import{migrate as B0}from"drizzle-orm/libsql/migrator";import{readMigrationFiles as j0}from"drizzle-orm/migrator";import{dirname as AQ,join as P0}from"path";import{fileURLToPath as G0}from"url";async function zQ(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 HZ(Q){if(!await zQ(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 u0(Q){for(let[Z,$]of Object.entries(x0)){if(!await zQ(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 C0(Q,Z=N0){let $=W0({url:Q});try{await $.execute("PRAGMA journal_mode = WAL;"),await $.execute("PRAGMA foreign_keys = ON;"),await $.execute("PRAGMA busy_timeout = 5000;");let J=await zQ($,"__drizzle_migrations"),Y=await zQ($,"Node"),V=!1;if(Y&&!J){let W=j0({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 HZ($);if(await B0(H0($),{migrationsFolder:Z}),await HZ($)>q)V=!0;return await u0($),{migrated:V}}finally{$.close()}}var v0,N0,x0;var jZ=M(async()=>{v0=AQ(AQ(AQ(G0(import.meta.url)))),N0=process.env.BEACON_MIGRATIONS_DIR||P0(v0,"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"]}});CQ();import{existsSync as iZ}from"fs";import{homedir as eZ}from"os";import{join as YQ}from"path";function Q0(){return process.env.HOME||process.env.USERPROFILE||eZ()}var VQ=()=>YQ(Q0(),".claude"),EQ=()=>YQ(VQ(),"skills"),DQ=()=>YQ(VQ(),"settings.json"),IQ=()=>YQ(VQ(),"CLAUDE.md"),bQ="<!-- beacon:global:start -->",qZ="<!-- beacon:global:end -->";var Z0=n,y=[{event:"PreToolUse",matcher:"Edit|Write|MultiEdit",command:"beacon guard",description:"Gate edits against the active plan's scope contract (when the scope-guard flag is on): in-scope \u2192 allow, off-scope \u2192 ask the user to authorize. No-op + fail-open otherwise."},{event:"PostToolUse",matcher:"Edit|Write|MultiEdit",command:"beacon hook",description:"Report file edits to Beacon's active feature so the map stays fresh."},{event:"PermissionRequest",matcher:"ExitPlanMode",command:"beacon plan",description:"Pipe the agent's plan markdown into Beacon's /plan canvas for review."},{event:"UserPromptSubmit",matcher:"*",command:"beacon prompt",description:"On feature-y prompts in a Beacon-wired repo, remind the agent to run the context\u2192propose\u2192describe loop (no-op otherwise)."},{event:"Stop",matcher:"*",command:"beacon stop-hook",description:"When the agent ends a turn asking for plan approval in prose (instead of presenting it), nudge it to present the plan on Beacon's /plan canvas. Bounded by stop_hook_active \u2014 at most one nudge."}];function $0(Q,Z){return o(EQ(),Q,Z)}function XZ(Q){return I(EQ(),Q)}function J0(Q){return i(EQ(),Q)}function Y0(Q){return t(DQ(),Q)}function V0(Q){return d(DQ(),Q)}function z0(Q){return a(DQ(),Q)}function q0(Q){s(IQ(),bQ,qZ,Q)}function UZ(){return D(IQ(),bQ)}function X0(){return r(IQ(),bQ,qZ)}function WZ(){let Q={};for(let $ of B)Q[$]=XZ($);let Z={};for(let $ of y)Z[$.event]=V0({event:$.event,command:$.command});return{homeExists:iZ(VQ()),skills:Q,hooks:Z,claudeMdBlock:UZ()}}async function U0(){let{INIT_SKILL:Q,REFRESH_SKILL:Z,PLAN_SKILL:$,EXPLAIN_SKILL:J}=await Promise.resolve().then(() => (p(),xQ)),Y={"beacon-init":Q,"beacon-refresh":Z,"beacon-plan":$,"beacon-explain":J},V=[];for(let z of B){if(!XZ(z))V.push(z);$0(z,Y[z])}let q=0;for(let z of y)if(Y0({event:z.event,matcher:z.matcher,command:z.command}))q++;let W=UZ();return q0(Z0),{skillsAdded:V,hooksAdded:q,claudeMdBlockTouched:!W}}async function U1(){if(aQ())return{ok:!0,skipped:"plugin",skillsAdded:[],hooksAdded:0,claudeMdBlockTouched:!1};let Q;if(rQ()){try{OQ()}catch{}Q={ok:!0,skipped:"plugin-present",skillsAdded:[],hooksAdded:0,claudeMdBlockTouched:!1}}else try{Q={ok:!0,...await U0()}}catch(Z){Q={ok:!1,error:Z instanceof Error?Z.message:String(Z),skillsAdded:[],hooksAdded:0,claudeMdBlockTouched:!1}}try{let Z=await Promise.resolve().then(() => (gQ(),zZ));if(Z.codexDetected())Q.codex={ok:!0,...await Z.setupCodexAssets()}}catch(Z){Q.codex={ok:!1,error:Z instanceof Error?Z.message:String(Z),skillsAdded:[],hooksAdded:0,agentsMdBlockTouched:!1,mcp:{added:!1}}}return Q}function OQ(){let Q=[];for(let J of B)if(J0(J))Q.push(J);let Z=0;for(let J of y)if(z0(J))Z++;let $=X0();return{skillsRemoved:Q,hooksRemoved:Z,claudeMdBlockRemoved:$}}import{AsyncLocalStorage as f0}from"async_hooks";import{spawnSync as M0}from"child_process";import{createHash as T0}from"crypto";import{existsSync as GZ,mkdirSync as k,readFileSync as kQ,writeFileSync as LQ}from"fs";import{homedir as vZ}from"os";import{basename as w0,join as N,parse as R0,resolve as PZ}from"path";function v(){return process.env.BEACON_HOME||N(vZ(),".beacon")}function _Q(){return N(v(),"workspaces.json")}function qQ(Q){return T0("sha256").update(Q).digest("hex").slice(0,12)}function M1(Q=process.cwd()){let Z=M0("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 NZ(Q){let Z=PZ(Q);return Z!==PZ(vZ())&&Z!==R0(Z).root}function xZ(){return N(v(),"deleted.json")}function SQ(){try{let Q=JSON.parse(kQ(xZ(),"utf8"));return Array.isArray(Q)?Q:[]}catch{return[]}}function KZ(Q){k(v(),{recursive:!0}),LQ(xZ(),JSON.stringify(Q,null,2))}function uZ(Q){return SQ().includes(Q)}function T1(Q){let Z=SQ();if(!Z.includes(Q))KZ([...Z,Q])}function F0(Q){let Z=SQ();if(Z.includes(Q))KZ(Z.filter(($)=>$!==Q))}function XQ(Q){return N(v(),Q)}function g0(Q){return`file:${N(XQ(Q),"db.sqlite")}`}function L(){try{let Q=JSON.parse(kQ(_Q(),"utf8"));return Array.isArray(Q)?Q:[]}catch{return[]}}function hQ(Q){k(v(),{recursive:!0}),LQ(_Q(),JSON.stringify(Q,null,2))}function UQ(){return L().sort((Q,Z)=>Z.lastOpenedAt.localeCompare(Q.lastOpenedAt))}function u(Q){return L().find((Z)=>Z.id===Q)??null}function CZ(Q,Z,$=new Date().toISOString()){if(!NZ(Q))throw Error(`beacon: refusing to register a non-repo path as a workspace: ${Q}`);let J=qQ(Q);if(uZ(J))throw Error(`beacon: workspace ${J} (${Q}) was deleted \u2014 run \`beacon\` or /beacon-init to re-add it`);let Y=L(),V=Y.find((z)=>z.id===J),q={id:J,path:Q,name:Z||V?.name||w0(Q),lastOpenedAt:$},W=[q,...Y.filter((z)=>z.id!==J)];return k(XQ(J),{recursive:!0}),hQ(W),q}function w1(Q,Z){return F0(qQ(Q)),CZ(Q,Z)}function R1(Q,Z=new Date().toISOString()){let $=L(),J=$.find((Y)=>Y.id===Q);if(!J)return;J.lastOpenedAt=Z,hQ($)}function F1(Q){if(hQ(L().filter((Z)=>Z.id!==Q)),mQ()===Q)E0(UQ()[0]?.id??null)}function fZ(){return N(v(),"active")}function mQ(){try{return kQ(fZ(),"utf8").trim()||null}catch{return null}}function E0(Q){k(v(),{recursive:!0}),LQ(fZ(),Q??"")}function g1(){let Q=mQ();return Q?u(Q):null}function E1(){let Q=b0()??mQ();return Q?u(Q):null}function D1(Q){return u(Q)?.path??null}function I1(){return GZ(_Q())}var MZ="beacon_ws";function TZ(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 b1(Q){let Z=Q.headers.get("x-beacon-workspace");if(Z&&u(Z))return Z;let $=TZ(Q,MZ);if($&&u($))return $;return D0()}function D0(){let Q=UQ();return Q.length===1?Q[0].id:null}var I0="x-beacon-workspace-path";async function O1(Q){let Z=Q.headers.get("x-beacon-workspace");if(Z&&u(Z))return Z;let $=Q.headers.get(I0);if($&&NZ($)&&!uZ(qQ($))&&(!Z||qQ($)===Z)){let Y=CZ($);return await O0(Y.id),Y.id}let J=TZ(Q,MZ);if(J&&u(J))return J;return null}var wZ=new f0;function A1(Q,Z){return Q?wZ.run(Q,Z):Z()}function b0(){return wZ.getStore()??null}var yQ=new Set;function y1(Q){yQ.delete(N(XQ(Q),"db.sqlite"))}async function O0(Q){let Z=XQ(Q),$=N(Z,"db.sqlite"),J=GZ($);if(J&&yQ.has($))return{ok:!0,created:!1,migrated:!1};try{k(Z,{recursive:!0});let{provisionDb:Y}=await jZ().then(() => BZ),V=await Y(g0(Q));return yQ.add($),{ok:!0,created:!J,migrated:J&&V.migrated}}catch(Y){return{ok:!1,created:!1,migrated:!1,error:Y instanceof Error?Y.message:String(Y)}}}p();gQ();import{existsSync as WQ,readFileSync as A0,rmSync as y0}from"fs";import{join as k0}from"path";var RZ=process.argv.slice(3),FZ=RZ.includes("--yes")||RZ.includes("-y"),P=(Q)=>`\x1B[32m\u2713\x1B[0m ${Q}`,j=(Q)=>`\x1B[2m${Q}\x1B[0m`,f=(Q)=>`
|
|
345
|
+
\x1B[1m${Q}\x1B[0m`,gZ=(Q)=>`\x1B[33m!\x1B[0m ${Q}`,C=v(),_=UQ(),pQ=WZ();console.log(f(FZ?"Beacon \xB7 uninstall":"Beacon \xB7 uninstall (dry run)"));console.log(f("Global"));console.log(` ${WQ(C)?`wipe ${C} (${_.length} workspaces)`:`${j(`${C} \u2014 already gone`)}`}`);for(let Q of B)console.log(` ${pQ.skills[Q]?`remove ~/.claude/skills/${Q}/`:j(`skill ${Q} \u2014 already gone`)}`);for(let Q of y)console.log(` ${pQ.hooks[Q.event]?`remove hook ${Q.event} \u2192 ${Q.command}`:j(`hook ${Q.event} \u2192 ${Q.command} \u2014 already gone`)}`);console.log(` ${pQ.claudeMdBlock?"strip Beacon block from ~/.claude/CLAUDE.md":j("global CLAUDE.md block \u2014 already gone")}`);var HQ=RQ();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 R)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(_.length){console.log(f(`Per-repo (${_.length})`));for(let Q of _){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(!FZ)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.
|
|
346
|
+
`),process.exit(0);console.log(f("Applying\u2026"));var F=OQ();if(F.skillsRemoved.length)console.log(` ${P(`removed skills: ${F.skillsRemoved.join(", ")}`)}`);if(F.hooksRemoved)console.log(` ${P(`removed ${F.hooksRemoved} hook${F.hooksRemoved===1?"":"s"} from ~/.claude/settings.json`)}`);if(F.claudeMdBlockRemoved)console.log(` ${P("stripped Beacon block from ~/.claude/CLAUDE.md")}`);var x=FQ();if(x.skillsRemoved.length)console.log(` ${P(`removed ~/.agents/skills: ${x.skillsRemoved.join(", ")}`)}`);if(x.hooksRemoved)console.log(` ${P(`removed ${x.hooksRemoved} hook${x.hooksRemoved===1?"":"s"} from ~/.codex/hooks.json`)}`);if(x.agentsMdBlockRemoved)console.log(` ${P("stripped Beacon block from ~/.codex/AGENTS.md")}`);if(x.mcpRemoved)console.log(` ${P("stripped [mcp_servers.beacon] from ~/.codex/config.toml")}`);if(x.mcpSkipped)console.log(` ${gZ("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 _){if(!WQ(Q.path))continue;let Z=NQ(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(` ${P(`${Q.path} \u2192 ${$.join(", ")}`)}`)}var L0=k0(C,"server.json");try{let{pid:Q}=JSON.parse(A0(L0,"utf8"));if(Q)try{process.kill(Q),console.log(` ${P(`stopped daemon (pid ${Q})`)}`)}catch{}}catch{}if(WQ(C))y0(C,{recursive:!0,force:!0}),console.log(` ${P(`removed ${C}`)}`);console.log(f("Done."));console.log(` ${gZ("The `beacon` binary on your PATH is still there \u2014 run the matching uninstall step from your installer to remove it.")}
|
|
281
347
|
`);
|
package/dist/lib/assets.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var
|
|
2
|
+
var I=Object.defineProperty;var E=(z)=>z;function M(z,J){this[z]=E.bind(null,J)}var K=(z,J)=>{for(var q in J)I(z,q,{get:J[q],enumerable:!0,configurable:!0,set:M.bind(J,q)})};var T=(z,J)=>()=>(z&&(J=z(z=0)),J);var a=1500,d=480000,p=1800000,C=3600000,c=3000;var f=()=>{};var y={};K(y,{removeRepoAssets:()=>l,installRefreshSkill:()=>O,installPlanSkill:()=>L,installInitSkill:()=>j,installExplainSkill:()=>g,installCodexRepoSkills:()=>_,ensureWorkflowDoc:()=>h,ensureMcp:()=>R,auditRepo:()=>m,REFRESH_SKILL:()=>b,PLAN_SKILL:()=>A,INIT_SKILL:()=>k,EXPLAIN_SKILL:()=>W});import{existsSync as D,mkdirSync as B,readFileSync as H,rmSync as U,writeFileSync as $}from"fs";import{join as Q}from"path";function j(z){let J=Q(z,".claude","skills","beacon-init");B(J,{recursive:!0});let q=Q(J,"SKILL.md");return $(q,k),q}function O(z){let J=Q(z,".claude","skills","beacon-refresh");B(J,{recursive:!0});let q=Q(J,"SKILL.md");return $(q,b),q}function L(z){let J=Q(z,".claude","skills","beacon-plan");B(J,{recursive:!0});let q=Q(J,"SKILL.md");return $(q,A),q}function g(z){let J=Q(z,".claude","skills","beacon-explain");B(J,{recursive:!0});let q=Q(J,"SKILL.md");return $(q,W),q}function _(z){let J=[];for(let q of F){let Y=Q(z,".agents","skills",q.name);B(Y,{recursive:!0});let G=Q(Y,"SKILL.md");$(G,q.body()),J.push(G)}return J}function h(z){let J=Q(z,"AGENTS.md"),q="";try{q=H(J,"utf8")}catch{}let Y=new RegExp(`${v}[\\s\\S]*?${P}`);q=Y.test(q)?q.replace(Y,u):`${q.trim()}
|
|
3
3
|
|
|
4
|
-
${
|
|
5
|
-
`.trimStart()
|
|
4
|
+
${u}
|
|
5
|
+
`.trimStart(),$(J,q.endsWith(`
|
|
6
6
|
`)?q:`${q}
|
|
7
|
-
`);let
|
|
7
|
+
`);let G=Q(z,"CLAUDE.md"),X="";try{X=H(G,"utf8")}catch{}if(!/@AGENTS\.md/.test(X))$(G,`${X?`${X.trim()}
|
|
8
8
|
|
|
9
9
|
`:""}@AGENTS.md
|
|
10
|
-
`)}function
|
|
11
|
-
`),{path:J,added:!1,updated:!0};return{path:J,added:!1,updated:!1}}return q.mcpServers.beacon={command:"beacon",args:["mcp"],timeout:
|
|
12
|
-
`),{path:J,added:!0,updated:!1}}function
|
|
13
|
-
`)}}catch{}let
|
|
10
|
+
`)}function R(z){let J=Q(z,".mcp.json"),q={};try{q=JSON.parse(H(J,"utf8"))}catch{}q.mcpServers=q.mcpServers??{};let Y=q.mcpServers.beacon;if(Y){if(!Y.timeout||Y.timeout<C)return Y.timeout=C,$(J,JSON.stringify(q,null,2)+`
|
|
11
|
+
`),{path:J,added:!1,updated:!0};return{path:J,added:!1,updated:!1}}return q.mcpServers.beacon={command:"beacon",args:["mcp"],timeout:C},$(J,JSON.stringify(q,null,2)+`
|
|
12
|
+
`),{path:J,added:!0,updated:!1}}function m(z){let J=Q(z,".mcp.json"),q=!1;try{q=!!JSON.parse(H(J,"utf8")).mcpServers?.beacon}catch{}let Y=!1;try{Y=H(Q(z,"AGENTS.md"),"utf8").includes(v)}catch{}let G=!1;try{G=/@AGENTS\.md/.test(H(Q(z,"CLAUDE.md"),"utf8"))}catch{}return{repo:z,mcpRegistered:q,agentsMdBlock:Y,claudeMdImport:G,skills:{"beacon-init":D(Q(z,".claude","skills","beacon-init","SKILL.md")),"beacon-refresh":D(Q(z,".claude","skills","beacon-refresh","SKILL.md"))},codexSkills:{"beacon-init":D(Q(z,".agents","skills","beacon-init","SKILL.md")),"beacon-refresh":D(Q(z,".agents","skills","beacon-refresh","SKILL.md"))}}}function l(z){let J=[];for(let V of["beacon-init","beacon-refresh","beacon-db-design"]){let Z=Q(z,".claude","skills",V);if(D(Z))U(Z,{recursive:!0,force:!0}),J.push(V)}for(let V of["beacon-init","beacon-refresh"]){let Z=Q(z,".agents","skills",V);if(D(Z))U(Z,{recursive:!0,force:!0}),J.push(`codex:${V}`)}let q=!1,Y=Q(z,".mcp.json");try{let V=JSON.parse(H(Y,"utf8"));if(V.mcpServers?.beacon){if(delete V.mcpServers.beacon,q=!0,V.mcpServers&&Object.keys(V.mcpServers).length===0)delete V.mcpServers;if(Object.keys(V).length===0)U(Y,{force:!0});else $(Y,JSON.stringify(V,null,2)+`
|
|
13
|
+
`)}}catch{}let G=!1,X=Q(z,"AGENTS.md");try{let V=H(X,"utf8"),Z=new RegExp(`\\n?${v}[\\s\\S]*?${P}\\n?`);if(Z.test(V)){let N=V.replace(Z,`
|
|
14
14
|
`).replace(/\n{3,}/g,`
|
|
15
15
|
|
|
16
|
-
`).trimStart()
|
|
16
|
+
`).trimStart();$(X,N.endsWith(`
|
|
17
17
|
`)?N:`${N}
|
|
18
|
-
`)
|
|
18
|
+
`),G=!0}}catch{}let w=!1,x=Q(z,"CLAUDE.md");try{let V=H(x,"utf8"),Z=V.replace(/^[ \t]*@AGENTS\.md[ \t]*\n?/m,"");if(Z!==V){if(!Z.trim())U(x,{force:!0});else $(x,Z);w=!0}}catch{}return{skillsRemoved:J,mcpUnregistered:q,agentsBlockRemoved:G,claudeImportRemoved:w}}var k=`---
|
|
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
|
+
`,b=`---
|
|
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
|
+
`,A=`---
|
|
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
|
---
|
|
@@ -157,7 +157,70 @@ If it returns feedback, revise and call it again.
|
|
|
157
157
|
If \`beacon_present_plan\` isn't available, the panel isn't wired here \u2014 fall back to ExitPlanMode
|
|
158
158
|
with the same \`\`\`beacon block (Claude Code only; Codex has no ExitPlanMode), or tell the user to
|
|
159
159
|
run \`beacon\` in this repo once.
|
|
160
|
-
`,
|
|
160
|
+
`,W=`---
|
|
161
|
+
name: beacon-explain
|
|
162
|
+
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
|
+
|
|
165
|
+
# Explain the codebase visually (/beacon-explain)
|
|
166
|
+
|
|
167
|
+
When the user wants to UNDERSTAND part of the code (not build something), don't dump prose in the
|
|
168
|
+
terminal and don't open a plan \u2014 plans are for building. Author an interactive **Lesson** and push it
|
|
169
|
+
with the \`beacon_explain\` MCP tool: a curated concept map (boxes + labeled arrows) beside a
|
|
170
|
+
plain-English narrative on Beacon's /learn page. The tool BLOCKS while the user reads, highlights text
|
|
171
|
+
to ask questions, and drops question notes; it returns their questions, you ANSWER and re-push, looping
|
|
172
|
+
until they Save the lesson. There is NO approve/discard \u2014 understanding, not building.
|
|
173
|
+
|
|
174
|
+
## 1. Load context first \u2014 don't explain blind
|
|
175
|
+
|
|
176
|
+
Before writing, call \`beacon_context_for_feature\` / \`beacon_map\` and read the relevant files so the
|
|
177
|
+
lesson is accurate. Name real files, functions, tables, and endpoints \u2014 never vague descriptions.
|
|
178
|
+
|
|
179
|
+
## 2. Write like a great teacher \u2014 the house style (this is the whole point)
|
|
180
|
+
|
|
181
|
+
Every lesson must read like a patient senior engineer explaining to a sharp newcomer:
|
|
182
|
+
|
|
183
|
+
- **Plain English, always.** Define any term the first time it appears. No unexplained jargon, no
|
|
184
|
+
wall of nouns.
|
|
185
|
+
- **Problem-first.** Open each component with the PROBLEM it solves \u2014 a concrete human scenario, the
|
|
186
|
+
tension that forced the design, then the decision and what it means. (e.g. "When a salesperson
|
|
187
|
+
confirms an order it must also land in the ERP \u2014 but the ERP can be slow or down, and you do *not*
|
|
188
|
+
want confirmation to hang. So the sync is *decoupled*: confirming succeeds immediately and the push
|
|
189
|
+
happens in the background, with retries.")
|
|
190
|
+
- **Concrete step-by-step flow.** Walk the real path as a numbered list. Each step is ONE clear
|
|
191
|
+
action and names the real identifier in backticks \u2014 file (\`order-placed-sync-erp.ts\`), function
|
|
192
|
+
(\`syncOrderToErpWorkflow\`), event (\`order.placed\`), column (\`erp_sync_record\`), value
|
|
193
|
+
(\`requires_human_action\`). Enumerate the cases (success / retryable / rejected / \u2026) with the plain
|
|
194
|
+
meaning of each.
|
|
195
|
+
- **Anticipate-and-answer "Why X?".** After the flow, add short sections that answer the confusions a
|
|
196
|
+
reader will actually have ("Why two status columns?", "Why is the ledger append-only?"). ALWAYS
|
|
197
|
+
explain why the alternative is worse ("claiming success could hide a real failure; claiming hard
|
|
198
|
+
failure could cause a duplicate order later").
|
|
199
|
+
- **A worked example with real data.** Show the mechanism running on one concrete case \u2014 ideally a
|
|
200
|
+
small markdown table of state transitions \u2014 and land the insight ("that's 8 rows for one order, and
|
|
201
|
+
that's the point").
|
|
202
|
+
- **Typographic discipline.** **Bold** the decisions, *italic* the concepts being introduced, and put
|
|
203
|
+
\`inline code\` around every real identifier \u2014 on /learn, backticked real file paths become clickable
|
|
204
|
+
to open in the user's editor.
|
|
205
|
+
|
|
206
|
+
## 3. Map the prose to the board
|
|
207
|
+
|
|
208
|
+
Every component/flow you NAME in the narrative becomes a \`node\` (title + a one-line \`summary\` for its
|
|
209
|
+
face + a fuller \`detail\` + the real \`files\` it maps to). Every "A does X to B" becomes an \`edge\` with
|
|
210
|
+
a relationship VERB \u2014 one of: imports, calls, persists to, reads from, writes to, routes to, depends
|
|
211
|
+
on, emits, returns, contains, extends \u2014 never a bare line. Keep the resting set small (~4\u20137 nodes);
|
|
212
|
+
push depth into \`detail\`, not the node face. Supply \`steps\` for the guided walkthrough: the first step
|
|
213
|
+
is the overview (empty \`focusIds\`), then teach one node (or a few) per step in order, each with its
|
|
214
|
+
\`focusIds\`.
|
|
215
|
+
|
|
216
|
+
## 4. Answer in the loop \u2014 don't stop after one round
|
|
217
|
+
|
|
218
|
+
\`beacon_explain\` returns the user's questions, each tagged \`[q:ID]\`. Answer EACH by calling
|
|
219
|
+
\`beacon_explain\` AGAIN with the SAME lesson plus \`answers: [{ questionId, answer }]\` (keyed by the id).
|
|
220
|
+
Every answer must ADD understanding (rationale, trade-off) \u2014 never just restate the question. Expand
|
|
221
|
+
the narrative or add nodes where it helps. Keep looping until the tool reports the user saved or closed
|
|
222
|
+
the lesson.
|
|
223
|
+
`,F,v="<!-- beacon:workflow:start -->",P="<!-- beacon:workflow:end -->",u;var S=T(()=>{f();F=[{name:"beacon-init",body:()=>k},{name:"beacon-refresh",body:()=>b}];u=`${v}
|
|
161
224
|
## Beacon \u2014 feature workflow
|
|
162
225
|
|
|
163
226
|
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:
|
|
@@ -229,4 +292,4 @@ Register them all in that single batched call. If a plan added five features, th
|
|
|
229
292
|
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.
|
|
230
293
|
|
|
231
294
|
Pull raw planning data anytime with \`beacon_entities\` (features / architecture / tables / endpoints).
|
|
232
|
-
${
|
|
295
|
+
${P}`});S();export{l as removeRepoAssets,O as installRefreshSkill,L as installPlanSkill,j as installInitSkill,g as installExplainSkill,_ as installCodexRepoSkills,h as ensureWorkflowDoc,R as ensureMcp,m as auditRepo,b as REFRESH_SKILL,A as PLAN_SKILL,k as INIT_SKILL,W as EXPLAIN_SKILL};
|