trybeacon 0.1.47 → 0.1.49
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/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +14 -12
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/routes-manifest.json +12 -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_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- 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 +2 -2
- 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 -0
- package/.next/server/app/api/flags/route.js.nft.json +1 -0
- package/.next/server/app/api/flags/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/ingest/route.js +2 -2
- package/.next/server/app/api/init/route.js +1 -1
- 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/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 -0
- package/.next/server/app/api/scope-guard/check/route.js.nft.json +1 -0
- package/.next/server/app/api/scope-guard/check/route_client-reference-manifest.js +1 -0
- 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 +2 -2
- package/.next/server/app/docs.segments/_full.segment.rsc +2 -2
- package/.next/server/app/docs.segments/_head.segment.rsc +1 -1
- package/.next/server/app/docs.segments/_index.segment.rsc +2 -2
- 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 +2 -2
- package/.next/server/app/feedback.segments/_full.segment.rsc +2 -2
- package/.next/server/app/feedback.segments/_head.segment.rsc +1 -1
- package/.next/server/app/feedback.segments/_index.segment.rsc +2 -2
- 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 +2 -2
- package/.next/server/app/help.segments/_full.segment.rsc +2 -2
- package/.next/server/app/help.segments/_head.segment.rsc +1 -1
- package/.next/server/app/help.segments/_index.segment.rsc +2 -2
- 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 +3 -3
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- 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_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/settings/page.js +2 -2
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +14 -12
- package/.next/server/chunks/1341.js +1 -1
- package/.next/server/chunks/249.js +1 -1
- package/.next/server/chunks/2933.js +1 -1
- package/.next/server/chunks/{7208.js → 2999.js} +3 -3
- package/.next/server/chunks/3221.js +2 -2
- package/.next/server/chunks/3622.js +1 -1
- package/.next/server/chunks/4378.js +1 -1
- package/.next/server/chunks/4940.js +1 -1
- package/.next/server/chunks/7331.js +1 -0
- package/.next/server/chunks/9213.js +1 -1
- package/.next/server/chunks/9683.js +1 -1
- package/.next/server/chunks/9734.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/3343-af1292b51a276724.js +1 -0
- package/.next/static/chunks/7323-480fb88e9d24f9e9.js +1 -0
- package/.next/static/chunks/app/_global-error/page-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/board-annotations/[id]/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/board-annotations/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/board-layout/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/bug-flags/[id]/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/bug-flags/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/code-graph/position/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/code-graph/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/context/feature/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/context/file/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/context/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/db/arrange/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/db/backfill-access/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/db/position/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/db/prune-planned/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/db/reconcile-endpoints/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/db/relations/[id]/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/db/tables/[id]/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/draft/approve/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/draft/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/draft/status/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/edges/[id]/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/edges/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/endpoints/[id]/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/entities/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/feedback/[id]/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/feedback/[id]/vote/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/feedback/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/flags/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/ingest/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/init/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/map/describe/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/map/files/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/map/finish/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/map/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/map/start/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/map/touch-active/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/nodes/[id]/position/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/nodes/[id]/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/nodes/positions/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/nodes/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/nodes/subtasks/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/notes/[id]/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/notes/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/open/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/plan/annotations/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/plan/approve/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/plan/history/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/plan/markdown/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/plan/presence/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/plan/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/plan/verdict/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/preferences/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/project-meta/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/reset/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/scope-guard/check/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/stream/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/tab/nav/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/tab/presence/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/telemetry/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/telemetry/stats/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/version/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/workspace/activate/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/api/workspace/route-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/app/map/page-66d71744ae3363d7.js +1 -0
- package/.next/static/chunks/app/page-541e900d67f17dae.js +1 -0
- package/.next/static/chunks/app/plan/page-e7d16fa2a3713a92.js +1 -0
- package/.next/static/chunks/app/settings/page-7e176d120b1effa9.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-dc3f0f4fd9e88c4e.js +1 -0
- package/.next/static/css/629ab377241de9ca.css +1 -0
- package/.next/static/qeqVD-yeoYO_3C0pw9kHg/_buildManifest.js +1 -0
- package/.next/trace +39 -39
- package/.next/trace-build +1 -1
- package/.next/types/app/api/flags/route.ts +351 -0
- package/.next/types/app/api/scope-guard/check/route.ts +351 -0
- package/.next/types/routes.d.ts +3 -1
- package/.next/types/validator.ts +18 -0
- package/dist/bin/beacon.js +7 -7
- package/dist/bin/doctor.js +33 -26
- package/dist/bin/guard.js +3 -0
- package/dist/bin/hook.js +33 -26
- package/dist/bin/mcp.js +42 -35
- package/dist/bin/plan.js +34 -27
- package/dist/bin/remove.js +7 -6
- package/dist/bin/uninstall.js +33 -26
- package/dist/lib/assets.js +20 -13
- package/dist/lib/codex-install.js +30 -23
- package/dist/lib/global-install.js +30 -23
- package/dist/lib/telemetry.js +1 -1
- package/dist/lib/workspaces.js +1 -1
- package/drizzle/0008_good_lucky_pierre.sql +21 -0
- package/drizzle/meta/0008_snapshot.json +1904 -0
- package/drizzle/meta/_journal.json +7 -0
- package/package.json +1 -1
- package/public/install.sh +37 -6
- package/.next/server/chunks/142.js +0 -1
- package/.next/static/OO5fwNXOYFYnu4W91Z44C/_buildManifest.js +0 -1
- package/.next/static/chunks/5811-4d1f942c37146b40.js +0 -1
- package/.next/static/chunks/8074-a6b2725786399e2c.js +0 -1
- package/.next/static/chunks/app/_global-error/page-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/board-annotations/[id]/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/board-annotations/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/board-layout/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/bug-flags/[id]/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/bug-flags/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/code-graph/position/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/code-graph/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/context/feature/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/context/file/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/context/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/db/arrange/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/db/backfill-access/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/db/position/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/db/prune-planned/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/db/reconcile-endpoints/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/db/relations/[id]/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/db/tables/[id]/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/draft/approve/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/draft/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/draft/status/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/edges/[id]/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/edges/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/endpoints/[id]/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/entities/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/feedback/[id]/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/feedback/[id]/vote/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/feedback/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/ingest/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/init/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/map/describe/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/map/files/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/map/finish/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/map/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/map/start/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/map/touch-active/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/nodes/[id]/position/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/nodes/[id]/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/nodes/positions/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/nodes/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/nodes/subtasks/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/notes/[id]/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/notes/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/open/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/plan/annotations/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/plan/approve/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/plan/history/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/plan/markdown/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/plan/presence/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/plan/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/plan/verdict/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/preferences/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/project-meta/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/reset/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/stream/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/tab/nav/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/tab/presence/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/telemetry/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/telemetry/stats/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/version/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/workspace/activate/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/api/workspace/route-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/app/map/page-a0bcd15b8dbfb3d3.js +0 -1
- package/.next/static/chunks/app/page-968dd5a6f667bff9.js +0 -1
- package/.next/static/chunks/app/plan/page-376f36858e187c73.js +0 -1
- package/.next/static/chunks/app/settings/page-67cab634be8bfef2.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-16ca2ed05a1d74d1.js +0 -1
- package/.next/static/css/2d019ca6e0582481.css +0 -1
- /package/.next/static/{OO5fwNXOYFYnu4W91Z44C → qeqVD-yeoYO_3C0pw9kHg}/_ssgManifest.js +0 -0
package/dist/bin/uninstall.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
// @bun
|
|
3
|
-
var
|
|
3
|
+
var wZ=Object.defineProperty;var FZ=(Q)=>Q;function RZ(Q,Z){this[Q]=FZ.bind(null,Z)}var PQ=(Q,Z)=>{for(var $ in Z)wZ(Q,$,{get:Z[$],enumerable:!0,configurable:!0,set:RZ.bind(Z,$)})};var C=(Q,Z)=>()=>(Q&&(Z=Q(Q=0)),Z);var A0=1500,O0=480000,y0=1800000,L=3600000,L0=3000;var mQ=()=>{};var NQ={};PQ(NQ,{removeRepoAssets:()=>xQ,installRefreshSkill:()=>IZ,installPlanSkill:()=>EZ,installInitSkill:()=>gZ,installCodexRepoSkills:()=>DZ,ensureWorkflowDoc:()=>AZ,ensureMcp:()=>OZ,auditRepo:()=>yZ,REFRESH_SKILL:()=>BQ,PLAN_SKILL:()=>cQ,INIT_SKILL:()=>jQ});import{existsSync as M,mkdirSync as k,readFileSync as v,rmSync as _,writeFileSync as H}from"fs";import{join as q}from"path";function gZ(Q){let Z=q(Q,".claude","skills","beacon-init");k(Z,{recursive:!0});let $=q(Z,"SKILL.md");return H($,jQ),$}function IZ(Q){let Z=q(Q,".claude","skills","beacon-refresh");k(Z,{recursive:!0});let $=q(Z,"SKILL.md");return H($,BQ),$}function EZ(Q){let Z=q(Q,".claude","skills","beacon-plan");k(Z,{recursive:!0});let $=q(Z,"SKILL.md");return H($,cQ),$}function DZ(Q){let Z=[];for(let $ of bZ){let J=q(Q,".agents","skills",$.name);k(J,{recursive:!0});let Y=q(J,"SKILL.md");H(Y,$.body()),Z.push(Y)}return Z}function AZ(Q){let Z=q(Q,"AGENTS.md"),$="";try{$=v(Z,"utf8")}catch{}let J=new RegExp(`${S}[\\s\\S]*?${vQ}`);$=J.test($)?$.replace(J,pQ):`${$.trim()}
|
|
4
4
|
|
|
5
|
-
${
|
|
5
|
+
${pQ}
|
|
6
6
|
`.trimStart(),H(Z,$.endsWith(`
|
|
7
7
|
`)?$:`${$}
|
|
8
|
-
`);let Y=q(Q,"CLAUDE.md"),V="";try{V=
|
|
8
|
+
`);let Y=q(Q,"CLAUDE.md"),V="";try{V=v(Y,"utf8")}catch{}if(!/@AGENTS\.md/.test(V))H(Y,`${V?`${V.trim()}
|
|
9
9
|
|
|
10
10
|
`:""}@AGENTS.md
|
|
11
|
-
`)}function OZ(Q){let Z=q(Q,".mcp.json"),$={};try{$=JSON.parse(
|
|
12
|
-
`),{path:Z,added:!0}
|
|
13
|
-
`)}}catch{}let
|
|
11
|
+
`)}function OZ(Q){let Z=q(Q,".mcp.json"),$={};try{$=JSON.parse(v(Z,"utf8"))}catch{}$.mcpServers=$.mcpServers??{};let J=$.mcpServers.beacon;if(J){if(!J.timeout||J.timeout<L)return J.timeout=L,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:L},H(Z,JSON.stringify($,null,2)+`
|
|
13
|
+
`),{path:Z,added:!0,updated:!1}}function yZ(Q){let Z=q(Q,".mcp.json"),$=!1;try{$=!!JSON.parse(v(Z,"utf8")).mcpServers?.beacon}catch{}let J=!1;try{J=v(q(Q,"AGENTS.md"),"utf8").includes(S)}catch{}let Y=!1;try{Y=/@AGENTS\.md/.test(v(q(Q,"CLAUDE.md"),"utf8"))}catch{}return{repo:Q,mcpRegistered:$,agentsMdBlock:J,claudeMdImport:Y,skills:{"beacon-init":M(q(Q,".claude","skills","beacon-init","SKILL.md")),"beacon-refresh":M(q(Q,".claude","skills","beacon-refresh","SKILL.md"))},codexSkills:{"beacon-init":M(q(Q,".agents","skills","beacon-init","SKILL.md")),"beacon-refresh":M(q(Q,".agents","skills","beacon-refresh","SKILL.md"))}}}function xQ(Q){let Z=[];for(let z of["beacon-init","beacon-refresh","beacon-db-design"]){let W=q(Q,".claude","skills",z);if(M(W))_(W,{recursive:!0,force:!0}),Z.push(z)}for(let z of["beacon-init","beacon-refresh"]){let W=q(Q,".agents","skills",z);if(M(W))_(W,{recursive:!0,force:!0}),Z.push(`codex:${z}`)}let $=!1,J=q(Q,".mcp.json");try{let z=JSON.parse(v(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)_(J,{force:!0});else H(J,JSON.stringify(z,null,2)+`
|
|
14
|
+
`)}}catch{}let Y=!1,V=q(Q,"AGENTS.md");try{let z=v(V,"utf8"),W=new RegExp(`\\n?${S}[\\s\\S]*?${vQ}\\n?`);if(W.test(z)){let HQ=z.replace(W,`
|
|
14
15
|
`).replace(/\n{3,}/g,`
|
|
15
16
|
|
|
16
|
-
`).trimStart();H(V,
|
|
17
|
-
`)?
|
|
18
|
-
`),Y=!0}}catch{}let X=!1,U=q(Q,"CLAUDE.md");try{let z=
|
|
17
|
+
`).trimStart();H(V,HQ.endsWith(`
|
|
18
|
+
`)?HQ:`${HQ}
|
|
19
|
+
`),Y=!0}}catch{}let X=!1,U=q(Q,"CLAUDE.md");try{let z=v(U,"utf8"),W=z.replace(/^[ \t]*@AGENTS\.md[ \t]*\n?/m,"");if(W!==z){if(!W.trim())_(U,{force:!0});else H(U,W);X=!0}}catch{}return{skillsRemoved:Z,mcpUnregistered:$,agentsBlockRemoved:Y,claudeImportRemoved:X}}var jQ=`---
|
|
19
20
|
name: beacon-init
|
|
20
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.
|
|
21
22
|
---
|
|
@@ -54,7 +55,7 @@ A single \`beacon_init_persist\` MCP tool call with:
|
|
|
54
55
|
If \`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-init.
|
|
55
56
|
|
|
56
57
|
After the tool returns, tell the user the counts (components / roadmap / tables / endpoints) and point them at the running Beacon panel.
|
|
57
|
-
`,
|
|
58
|
+
`,BQ=`---
|
|
58
59
|
name: beacon-refresh
|
|
59
60
|
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.
|
|
60
61
|
---
|
|
@@ -101,7 +102,7 @@ The one caveat: if the user manually edited an INIT-source node on the canvas (e
|
|
|
101
102
|
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.
|
|
102
103
|
|
|
103
104
|
After the tool returns, report the final counts plus a one-line summary of the diff you surfaced.
|
|
104
|
-
`,
|
|
105
|
+
`,cQ=`---
|
|
105
106
|
name: beacon-plan
|
|
106
107
|
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.
|
|
107
108
|
---
|
|
@@ -129,6 +130,12 @@ Beacon extracts that block deterministically, strips it from the prose, and rend
|
|
|
129
130
|
board on /plan. The board is built ONLY from the block \u2014 prose is never parsed \u2014 so mirror EVERY
|
|
130
131
|
table/endpoint/feature you mention in the prose into the block, or that board will be empty.
|
|
131
132
|
|
|
133
|
+
- **Declare your scope.** List the repo-relative files this plan will touch in a top-level
|
|
134
|
+
\`"contract"\` array in the block (or the \`contract\` arg of \`beacon_propose_plan\`). When the user
|
|
135
|
+
has the plan scope-guard enabled, those files are frozen at approval and you're held to them while
|
|
136
|
+
implementing \u2014 editing an undeclared file pauses for the user's authorization (which then adds it
|
|
137
|
+
to the contract). Harmless when the guard is off. Declare the files you genuinely expect to edit.
|
|
138
|
+
|
|
132
139
|
\`beacon_present_plan\` opens /plan and BLOCKS until the user clicks Approve / Discard / submits
|
|
133
140
|
feedback, then returns their verdict. Implement code or migrations ONLY after it returns approval.
|
|
134
141
|
If it returns feedback, revise and call it again.
|
|
@@ -143,7 +150,7 @@ If it returns feedback, revise and call it again.
|
|
|
143
150
|
If \`beacon_present_plan\` isn't available, the panel isn't wired here \u2014 fall back to ExitPlanMode
|
|
144
151
|
with the same \`\`\`beacon block (Claude Code only; Codex has no ExitPlanMode), or tell the user to
|
|
145
152
|
run \`beacon\` in this repo once.
|
|
146
|
-
`,
|
|
153
|
+
`,bZ,S="<!-- beacon:workflow:start -->",vQ="<!-- beacon:workflow:end -->",pQ;var h=C(()=>{mQ();bZ=[{name:"beacon-init",body:()=>jQ},{name:"beacon-refresh",body:()=>BQ}];pQ=`${S}
|
|
147
154
|
## Beacon \u2014 feature workflow
|
|
148
155
|
|
|
149
156
|
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:
|
|
@@ -201,18 +208,18 @@ Register them all in that single batched call. If a plan added five features, th
|
|
|
201
208
|
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.
|
|
202
209
|
|
|
203
210
|
Pull raw planning data anytime with \`beacon_entities\` (features / architecture / tables / endpoints).
|
|
204
|
-
${
|
|
205
|
-
`)}function
|
|
211
|
+
${vQ}`});import{existsSync as lQ,mkdirSync as GQ,readFileSync as p,rmSync as LZ,writeFileSync as c}from"fs";import{dirname as nQ,join as m}from"path";function uQ(Q){try{return JSON.parse(p(Q,"utf8"))}catch{return{}}}function tQ(Q,Z){GQ(nQ(Q),{recursive:!0}),c(Q,JSON.stringify(Z,null,2)+`
|
|
212
|
+
`)}function n(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((X)=>X.command===Z.command)))return!1;return J.push({matcher:Z.matcher,hooks:[{type:"command",command:Z.command}]}),tQ(Q,$),!0}function t(Q,Z){return(uQ(Q).hooks?.[Z.event]??[]).some((Y)=>Y.hooks?.some((V)=>V.command===Z.command))}function d(Q,Z){let $=uQ(Q),J=$.hooks?.[Z.event];if(!J)return!1;let Y=!1,V=J.map((X)=>{let U=X.hooks?.length??0,z=(X.hooks??[]).filter((W)=>W.command!==Z.command);if(z.length!==U)Y=!0;return{...X,hooks:z}}).filter((X)=>(X.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 tQ(Q,$),!0}function a(Q,Z,$,J){let Y=`${Z}
|
|
206
213
|
${J.trim()}
|
|
207
|
-
${$}`,V="";try{V=
|
|
214
|
+
${$}`,V="";try{V=p(Q,"utf8")}catch{}let X=new RegExp(`${Z}[\\s\\S]*?${$}`);V=X.test(V)?V.replace(X,Y):V.trim()?`${V.trim()}
|
|
208
215
|
|
|
209
216
|
${Y}
|
|
210
217
|
`:`${Y}
|
|
211
|
-
`,
|
|
218
|
+
`,GQ(nQ(Q),{recursive:!0}),c(Q,V.endsWith(`
|
|
212
219
|
`)?V:`${V}
|
|
213
|
-
`)}function
|
|
220
|
+
`)}function R(Q,Z){try{return p(Q,"utf8").includes(Z)}catch{return!1}}function s(Q,Z,$){let J="";try{J=p(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,`
|
|
214
221
|
|
|
215
|
-
`).trimStart();return
|
|
222
|
+
`).trimStart();return c(Q,V),!0}function r(Q,Z,$){let J=m(Q,Z);GQ(J,{recursive:!0});let Y=m(J,"SKILL.md");return c(Y,$),Y}function g(Q,Z){return lQ(m(Q,Z,"SKILL.md"))}function o(Q,Z){let $=m(Q,Z);if(!lQ($))return!1;return LZ($,{recursive:!0,force:!0}),!0}var P,l=`## Beacon (visual planning panel)
|
|
216
223
|
|
|
217
224
|
This machine has Beacon installed \u2014 a local visual planning surface for the terminal-side
|
|
218
225
|
agent. Beacon proposes feature plans (roadmap features + DB schema + endpoints) via MCP,
|
|
@@ -233,20 +240,20 @@ the user reviews on a canvas at /plan, and feedback flows back as the next round
|
|
|
233
240
|
Feedback bundles inline annotations on the markdown PLUS any edits the user made directly
|
|
234
241
|
on the /map and /db boards (added features, attached subtasks, edited columns, new
|
|
235
242
|
endpoints). Treat board edits as the user's revision intent \u2014 re-propose matching them
|
|
236
|
-
verbatim. Do NOT implement until the tool returns approval.`;var
|
|
243
|
+
verbatim. Do NOT implement until the tool returns approval.`;var KQ=C(()=>{P=["beacon-init","beacon-refresh","beacon-plan"]});import{mkdirSync as _Z,renameSync as kZ,rmSync as SZ,writeFileSync as hZ}from"fs";import{dirname as mZ}from"path";function i(Q,Z){_Z(mZ(Q),{recursive:!0});let $=`${Q}.tmp`;try{hZ($,Z),kZ($,Q)}catch(J){throw SZ($,{force:!0}),J}}function t0(Q,Z,$=!1){i(Q,JSON.stringify(Z,null,$?2:void 0))}var dQ=()=>{};var ZZ={};PQ(ZZ,{setupCodexAssets:()=>nZ,removeCodexMcp:()=>QZ,removeCodexArtifacts:()=>FQ,hasCodexMcp:()=>TQ,ensureCodexMcp:()=>eQ,codexMcpProblem:()=>lZ,codexDetected:()=>rQ,auditCodex:()=>wQ,CODEX_HOOKS:()=>w});import{readFileSync as $Q}from"fs";import{homedir as pZ}from"os";import{join as b}from"path";function aQ(){return process.env.HOME||process.env.USERPROFILE||pZ()}function rQ(){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 E(Q){try{return Bun.TOML.parse(Q)}catch{return null}}function TQ(){try{return Boolean(E($Q(T(),"utf8"))?.mcp_servers?.beacon)}catch{return!1}}function lZ(){let Q="";try{Q=$Q(T(),"utf8")}catch{return null}let Z=E(Q);if(!Z)return`~/.codex/config.toml does not parse \u2014 ${I}`;if(Z.mcp_servers?.beacon)return null;if(/^\s*mcp_servers\s*=/m.test(Q))return`mcp_servers is an inline table \u2014 ${I}`;return null}function eQ(){let Q="",Z=!1;try{Q=$Q(T(),"utf8"),Z=!0}catch{}if(Z){let V=E(Q);if(!V)return{added:!1,error:`~/.codex/config.toml does not parse \u2014 ${I}`};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 ${I}`}}let $=!Q?"":Q.endsWith(`
|
|
237
244
|
`)?`
|
|
238
245
|
`:`
|
|
239
246
|
|
|
240
|
-
`,J=Q+$+
|
|
241
|
-
`),$=Z.indexOf(
|
|
247
|
+
`,J=Q+$+cZ;if(E(J)?.mcp_servers?.beacon?.command!=="beacon")return{added:!1,error:`could not safely append [mcp_servers.beacon] \u2014 ${I}`};return i(T(),J),{added:!0}}function QZ(){let Q="";try{Q=$Q(T(),"utf8")}catch{return{removed:!1}}let Z=Q.split(`
|
|
248
|
+
`),$=Z.indexOf(oQ);if($===-1)return{removed:!1,skipped:TQ()};let J=Z.indexOf(iQ,$);if(J===-1)return{removed:!1,skipped:!0};Z.splice($,J-$+1);let Y=Z.join(`
|
|
242
249
|
`).replace(/\n{3,}/g,`
|
|
243
250
|
|
|
244
|
-
`).replace(/^\n+/,"");if(
|
|
251
|
+
`).replace(/^\n+/,"");if(E(Y)===null)return{removed:!1,skipped:!0};return i(T(),Y),{removed:!0}}async function nZ(){let{INIT_SKILL:Q,REFRESH_SKILL:Z,PLAN_SKILL:$}=await Promise.resolve().then(() => (h(),NQ)),J={"beacon-init":Q,"beacon-refresh":Z,"beacon-plan":$},Y=[];for(let z of P){if(!g(QQ(),z))Y.push(z);r(QQ(),z,J[z])}let V=0;for(let z of w)if(n(MQ(),{event:z.event,matcher:z.matcher,command:z.command}))V++;let X=R(e(),ZQ);a(e(),ZQ,sQ,l);let U=eQ();return{skillsAdded:Y,hooksAdded:V,agentsMdBlockTouched:!X,mcp:U}}function wQ(){let Q={};for(let $ of P)Q[$]=g(QQ(),$);let Z={};for(let $ of w)Z[$.event]=t(MQ(),{event:$.event,command:$.command});return{detected:rQ(),skills:Q,hooks:Z,agentsMdBlock:R(e(),ZQ),mcp:TQ()}}function FQ(){let Q=[];for(let Y of P)if(o(QQ(),Y))Q.push(Y);let Z=0;for(let Y of w)if(d(MQ(),{event:Y.event,command:Y.command}))Z++;let $=s(e(),ZQ,sQ),J=QZ();return{skillsRemoved:Q,hooksRemoved:Z,agentsMdBlockRemoved:$,mcpRemoved:J.removed,mcpSkipped:J.skipped}}var CQ=()=>b(aQ(),".codex"),MQ=()=>b(CQ(),"hooks.json"),T=()=>b(CQ(),"config.toml"),e=()=>b(CQ(),"AGENTS.md"),QQ=()=>b(aQ(),".agents","skills"),ZQ="<!-- beacon:global:start -->",sQ="<!-- beacon:global:end -->",w,fQ,oQ="# beacon:start (managed by Beacon \u2014 `beacon uninstall` removes this block)",iQ="# beacon:end",cZ,I="add it manually: codex mcp add beacon -- beacon mcp";var RQ=C(()=>{KQ();dQ();w=[{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=`${oQ}
|
|
245
252
|
[mcp_servers.beacon]
|
|
246
253
|
command = "beacon"
|
|
247
254
|
args = ["mcp"]
|
|
248
|
-
${
|
|
249
|
-
`});var
|
|
250
|
-
\x1B[1m${Q}\x1B[0m`,
|
|
251
|
-
`),process.exit(0);console.log(
|
|
255
|
+
${iQ}
|
|
256
|
+
`});var XZ={};PQ(XZ,{provisionDb:()=>v0});import{createClient as Y0}from"@libsql/client";import{drizzle as V0}from"drizzle-orm/libsql";import{migrate as z0}from"drizzle-orm/libsql/migrator";import{readMigrationFiles as q0}from"drizzle-orm/migrator";import{dirname as DQ,join as X0}from"path";import{fileURLToPath as U0}from"url";async function VQ(Q,Z){return(await Q.execute({sql:"SELECT 1 FROM sqlite_master WHERE type='table' AND name = ?",args:[Z]})).rows.length>0}async function j0(Q,Z){let $=await Q.execute(`PRAGMA table_info("${Z}")`);return new Set($.rows.map((J)=>String(J.name)))}async function qZ(Q){if(!await VQ(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 B0(Q){for(let[Z,$]of Object.entries(P0)){if(!await VQ(Q,Z))continue;let J=await j0(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 v0(Q,Z=H0){let $=Y0({url:Q});try{await $.execute("PRAGMA journal_mode = WAL;"),await $.execute("PRAGMA foreign_keys = ON;"),await $.execute("PRAGMA busy_timeout = 5000;");let J=await VQ($,"__drizzle_migrations"),Y=await VQ($,"Node"),V=!1;if(Y&&!J){let U=q0({migrationsFolder:Z})[0];if(U)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:[U.hash,U.folderMillis]}),V=!0}let X=await qZ($);if(await z0(V0($),{migrationsFolder:Z}),await qZ($)>X)V=!0;return await B0($),{migrated:V}}finally{$.close()}}var W0,H0,P0;var UZ=C(async()=>{W0=DQ(DQ(DQ(U0(import.meta.url)))),H0=process.env.BEACON_MIGRATIONS_DIR||X0(W0,"drizzle"),P0={Node:["createdAt","updatedAt"],Note:["createdAt","updatedAt"],DbTable:["createdAt","updatedAt"],Endpoint:["createdAt","updatedAt"],DraftTable:["createdAt"],SyncState:["codeGraphSyncedAt","updatedAt"],AppSetting:["updatedAt"],ProjectMeta:["updatedAt"],CodeFile:["updatedAt"]}});KQ();import{existsSync as tZ}from"fs";import{homedir as dZ}from"os";import{join as JQ}from"path";function aZ(){return process.env.HOME||process.env.USERPROFILE||dZ()}var YQ=()=>JQ(aZ(),".claude"),gQ=()=>JQ(YQ(),"skills"),IQ=()=>JQ(YQ(),"settings.json"),EQ=()=>JQ(YQ(),"CLAUDE.md"),bQ="<!-- beacon:global:start -->",$Z="<!-- beacon:global:end -->";var sZ=l,D=[{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 rZ(Q,Z){return r(gQ(),Q,Z)}function JZ(Q){return g(gQ(),Q)}function oZ(Q){return o(gQ(),Q)}function iZ(Q){return n(IQ(),Q)}function eZ(Q){return t(IQ(),Q)}function Q0(Q){return d(IQ(),Q)}function Z0(Q){a(EQ(),bQ,$Z,Q)}function YZ(){return R(EQ(),bQ)}function $0(){return s(EQ(),bQ,$Z)}function VZ(){let Q={};for(let $ of P)Q[$]=JZ($);let Z={};for(let $ of D)Z[$.event]=eZ({event:$.event,command:$.command});return{homeExists:tZ(YQ()),skills:Q,hooks:Z,claudeMdBlock:YZ()}}async function J0(){let{INIT_SKILL:Q,REFRESH_SKILL:Z,PLAN_SKILL:$}=await Promise.resolve().then(() => (h(),NQ)),J={"beacon-init":Q,"beacon-refresh":Z,"beacon-plan":$},Y=[];for(let U of P){if(!JZ(U))Y.push(U);rZ(U,J[U])}let V=0;for(let U of D)if(iZ({event:U.event,matcher:U.matcher,command:U.command}))V++;let X=YZ();return Z0(sZ),{skillsAdded:Y,hooksAdded:V,claudeMdBlockTouched:!X}}async function J1(){let Q;try{Q={ok:!0,...await J0()}}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(() => (RQ(),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 zZ(){let Q=[];for(let J of P)if(oZ(J))Q.push(J);let Z=0;for(let J of D)if(Q0(J))Z++;let $=$0();return{skillsRemoved:Q,hooksRemoved:Z,claudeMdBlockRemoved:$}}import{AsyncLocalStorage as x0}from"async_hooks";import{spawnSync as N0}from"child_process";import{createHash as G0}from"crypto";import{existsSync as HZ,mkdirSync as A,readFileSync as OQ,writeFileSync as yQ}from"fs";import{homedir as PZ}from"os";import{basename as u0,join as N,parse as K0,resolve as WZ}from"path";function x(){return process.env.BEACON_HOME||N(PZ(),".beacon")}function LQ(){return N(x(),"workspaces.json")}function zQ(Q){return G0("sha256").update(Q).digest("hex").slice(0,12)}function N1(Q=process.cwd()){let Z=N0("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 jZ(Q){let Z=WZ(Q);return Z!==WZ(PZ())&&Z!==K0(Z).root}function BZ(){return N(x(),"deleted.json")}function _Q(){try{let Q=JSON.parse(OQ(BZ(),"utf8"));return Array.isArray(Q)?Q:[]}catch{return[]}}function vZ(Q){A(x(),{recursive:!0}),yQ(BZ(),JSON.stringify(Q,null,2))}function xZ(Q){return _Q().includes(Q)}function G1(Q){let Z=_Q();if(!Z.includes(Q))vZ([...Z,Q])}function f0(Q){let Z=_Q();if(Z.includes(Q))vZ(Z.filter(($)=>$!==Q))}function qQ(Q){return N(x(),Q)}function C0(Q){return`file:${N(qQ(Q),"db.sqlite")}`}function O(){try{let Q=JSON.parse(OQ(LQ(),"utf8"));return Array.isArray(Q)?Q:[]}catch{return[]}}function kQ(Q){A(x(),{recursive:!0}),yQ(LQ(),JSON.stringify(Q,null,2))}function XQ(){return O().sort((Q,Z)=>Z.lastOpenedAt.localeCompare(Q.lastOpenedAt))}function u(Q){return O().find((Z)=>Z.id===Q)??null}function NZ(Q,Z,$=new Date().toISOString()){if(!jZ(Q))throw Error(`beacon: refusing to register a non-repo path as a workspace: ${Q}`);let J=zQ(Q);if(xZ(J))throw Error(`beacon: workspace ${J} (${Q}) was deleted \u2014 run \`beacon\` or /beacon-init to re-add it`);let Y=O(),V=Y.find((z)=>z.id===J),X={id:J,path:Q,name:Z||V?.name||u0(Q),lastOpenedAt:$},U=[X,...Y.filter((z)=>z.id!==J)];return A(qQ(J),{recursive:!0}),kQ(U),X}function u1(Q,Z){return f0(zQ(Q)),NZ(Q,Z)}function K1(Q,Z=new Date().toISOString()){let $=O(),J=$.find((Y)=>Y.id===Q);if(!J)return;J.lastOpenedAt=Z,kQ($)}function f1(Q){if(kQ(O().filter((Z)=>Z.id!==Q)),SQ()===Q)M0(XQ()[0]?.id??null)}function GZ(){return N(x(),"active")}function SQ(){try{return OQ(GZ(),"utf8").trim()||null}catch{return null}}function M0(Q){A(x(),{recursive:!0}),yQ(GZ(),Q??"")}function C1(){let Q=SQ();return Q?u(Q):null}function M1(){let Q=F0()??SQ();return Q?u(Q):null}function T1(Q){return u(Q)?.path??null}function w1(){return HZ(LQ())}var uZ="beacon_ws";function KZ(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&&u(Z))return Z;let $=KZ(Q,uZ);if($&&u($))return $;return T0()}function T0(){let Q=XQ();return Q.length===1?Q[0].id:null}var w0="x-beacon-workspace-path";async function R1(Q){let Z=Q.headers.get("x-beacon-workspace");if(Z&&u(Z))return Z;let $=Q.headers.get(w0);if($&&jZ($)&&!xZ(zQ($))&&(!Z||zQ($)===Z)){let Y=NZ($);return await R0(Y.id),Y.id}let J=KZ(Q,uZ);if(J&&u(J))return J;return null}var fZ=new x0;function g1(Q,Z){return Q?fZ.run(Q,Z):Z()}function F0(){return fZ.getStore()??null}var AQ=new Set;function I1(Q){AQ.delete(N(qQ(Q),"db.sqlite"))}async function R0(Q){let Z=qQ(Q),$=N(Z,"db.sqlite"),J=HZ($);if(J&&AQ.has($))return{ok:!0,created:!1,migrated:!1};try{A(Z,{recursive:!0});let{provisionDb:Y}=await UZ().then(() => XZ),V=await Y(C0(Q));return AQ.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)}}}h();RQ();import{existsSync as UQ,readFileSync as g0,rmSync as I0}from"fs";import{join as E0}from"path";var CZ=process.argv.slice(3),MZ=CZ.includes("--yes")||CZ.includes("-y"),B=(Q)=>`\x1B[32m\u2713\x1B[0m ${Q}`,j=(Q)=>`\x1B[2m${Q}\x1B[0m`,f=(Q)=>`
|
|
257
|
+
\x1B[1m${Q}\x1B[0m`,TZ=(Q)=>`\x1B[33m!\x1B[0m ${Q}`,K=x(),y=XQ(),hQ=VZ();console.log(f(MZ?"Beacon \xB7 uninstall":"Beacon \xB7 uninstall (dry run)"));console.log(f("Global"));console.log(` ${UQ(K)?`wipe ${K} (${y.length} workspaces)`:`${j(`${K} \u2014 already gone`)}`}`);for(let Q of P)console.log(` ${hQ.skills[Q]?`remove ~/.claude/skills/${Q}/`:j(`skill ${Q} \u2014 already gone`)}`);for(let Q of D)console.log(` ${hQ.hooks[Q.event]?`remove hook ${Q.event} \u2192 ${Q.command}`:j(`hook ${Q.event} \u2192 ${Q.command} \u2014 already gone`)}`);console.log(` ${hQ.claudeMdBlock?"strip Beacon block from ~/.claude/CLAUDE.md":j("global CLAUDE.md block \u2014 already gone")}`);var WQ=wQ();console.log(f("Codex"));for(let Q of P)console.log(` ${WQ.skills[Q]?`remove ~/.agents/skills/${Q}/`:j(`skill ${Q} \u2014 already gone`)}`);for(let Q of w)console.log(` ${WQ.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(` ${WQ.agentsMdBlock?"strip Beacon block from ~/.codex/AGENTS.md":j("global ~/.codex/AGENTS.md block \u2014 already gone")}`);console.log(` ${WQ.mcp?"strip [mcp_servers.beacon] from ~/.codex/config.toml (if Beacon wrote it)":j("config.toml beacon entry \u2014 already gone")}`);if(y.length){console.log(f(`Per-repo (${y.length})`));for(let Q of y){if(!UQ(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(!MZ)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.
|
|
258
|
+
`),process.exit(0);console.log(f("Applying\u2026"));var F=zZ();if(F.skillsRemoved.length)console.log(` ${B(`removed skills: ${F.skillsRemoved.join(", ")}`)}`);if(F.hooksRemoved)console.log(` ${B(`removed ${F.hooksRemoved} hook${F.hooksRemoved===1?"":"s"} from ~/.claude/settings.json`)}`);if(F.claudeMdBlockRemoved)console.log(` ${B("stripped Beacon block from ~/.claude/CLAUDE.md")}`);var G=FQ();if(G.skillsRemoved.length)console.log(` ${B(`removed ~/.agents/skills: ${G.skillsRemoved.join(", ")}`)}`);if(G.hooksRemoved)console.log(` ${B(`removed ${G.hooksRemoved} hook${G.hooksRemoved===1?"":"s"} from ~/.codex/hooks.json`)}`);if(G.agentsMdBlockRemoved)console.log(` ${B("stripped Beacon block from ~/.codex/AGENTS.md")}`);if(G.mcpRemoved)console.log(` ${B("stripped [mcp_servers.beacon] from ~/.codex/config.toml")}`);if(G.mcpSkipped)console.log(` ${TZ("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 y){if(!UQ(Q.path))continue;let Z=xQ(Q.path),$=[];if(Z.skillsRemoved.length)$.push(`skills(${Z.skillsRemoved.length})`);if(Z.mcpUnregistered)$.push(".mcp.json");if(Z.agentsBlockRemoved)$.push("AGENTS.md");if(Z.claudeImportRemoved)$.push("CLAUDE.md");if($.length)console.log(` ${B(`${Q.path} \u2192 ${$.join(", ")}`)}`)}var b0=E0(K,"server.json");try{let{pid:Q}=JSON.parse(g0(b0,"utf8"));if(Q)try{process.kill(Q),console.log(` ${B(`stopped daemon (pid ${Q})`)}`)}catch{}}catch{}if(UQ(K))I0(K,{recursive:!0,force:!0}),console.log(` ${B(`removed ${K}`)}`);console.log(f("Done."));console.log(` ${TZ("The `beacon` binary on your PATH is still there \u2014 run the matching uninstall step from your installer to remove it.")}
|
|
252
259
|
`);
|
package/dist/lib/assets.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var
|
|
2
|
+
var u=Object.defineProperty;var W=(z)=>z;function E(z,J){this[z]=W.bind(null,J)}var M=(z,J)=>{for(var q in J)u(z,q,{get:J[q],enumerable:!0,configurable:!0,set:E.bind(J,q)})};var A=(z,J)=>()=>(z&&(J=z(z=0)),J);var S=1500,s=480000,a=1800000,B=3600000,d=3000;var I=()=>{};var m={};M(m,{removeRepoAssets:()=>R,installRefreshSkill:()=>j,installPlanSkill:()=>L,installInitSkill:()=>K,installCodexRepoSkills:()=>g,ensureWorkflowDoc:()=>F,ensureMcp:()=>_,auditRepo:()=>h,REFRESH_SKILL:()=>P,PLAN_SKILL:()=>f,INIT_SKILL:()=>k});import{existsSync as D,mkdirSync as U,readFileSync as X,rmSync as C,writeFileSync as G}from"fs";import{join as Q}from"path";function K(z){let J=Q(z,".claude","skills","beacon-init");U(J,{recursive:!0});let q=Q(J,"SKILL.md");return G(q,k),q}function j(z){let J=Q(z,".claude","skills","beacon-refresh");U(J,{recursive:!0});let q=Q(J,"SKILL.md");return G(q,P),q}function L(z){let J=Q(z,".claude","skills","beacon-plan");U(J,{recursive:!0});let q=Q(J,"SKILL.md");return G(q,f),q}function g(z){let J=[];for(let q of O){let Y=Q(z,".agents","skills",q.name);U(Y,{recursive:!0});let $=Q(Y,"SKILL.md");G($,q.body()),J.push($)}return J}function F(z){let J=Q(z,"AGENTS.md"),q="";try{q=X(J,"utf8")}catch{}let Y=new RegExp(`${v}[\\s\\S]*?${b}`);q=Y.test(q)?q.replace(Y,T):`${q.trim()}
|
|
3
3
|
|
|
4
4
|
${T}
|
|
5
|
-
`.trimStart(),G(J,
|
|
6
|
-
`)?
|
|
7
|
-
`);let $=Q(
|
|
5
|
+
`.trimStart(),G(J,q.endsWith(`
|
|
6
|
+
`)?q:`${q}
|
|
7
|
+
`);let $=Q(z,"CLAUDE.md"),H="";try{H=X($,"utf8")}catch{}if(!/@AGENTS\.md/.test(H))G($,`${H?`${H.trim()}
|
|
8
8
|
|
|
9
9
|
`:""}@AGENTS.md
|
|
10
|
-
`)}function
|
|
11
|
-
`),{path:J,added:!0}
|
|
12
|
-
`)}}catch{}let
|
|
10
|
+
`)}function _(z){let J=Q(z,".mcp.json"),q={};try{q=JSON.parse(X(J,"utf8"))}catch{}q.mcpServers=q.mcpServers??{};let Y=q.mcpServers.beacon;if(Y){if(!Y.timeout||Y.timeout<B)return Y.timeout=B,G(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:B},G(J,JSON.stringify(q,null,2)+`
|
|
12
|
+
`),{path:J,added:!0,updated:!1}}function h(z){let J=Q(z,".mcp.json"),q=!1;try{q=!!JSON.parse(X(J,"utf8")).mcpServers?.beacon}catch{}let Y=!1;try{Y=X(Q(z,"AGENTS.md"),"utf8").includes(v)}catch{}let $=!1;try{$=/@AGENTS\.md/.test(X(Q(z,"CLAUDE.md"),"utf8"))}catch{}return{repo:z,mcpRegistered:q,agentsMdBlock:Y,claudeMdImport:$,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 R(z){let J=[];for(let V of["beacon-init","beacon-refresh","beacon-db-design"]){let Z=Q(z,".claude","skills",V);if(D(Z))C(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))C(Z,{recursive:!0,force:!0}),J.push(`codex:${V}`)}let q=!1,Y=Q(z,".mcp.json");try{let V=JSON.parse(X(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)C(Y,{force:!0});else G(Y,JSON.stringify(V,null,2)+`
|
|
13
|
+
`)}}catch{}let $=!1,H=Q(z,"AGENTS.md");try{let V=X(H,"utf8"),Z=new RegExp(`\\n?${v}[\\s\\S]*?${b}\\n?`);if(Z.test(V)){let N=V.replace(Z,`
|
|
13
14
|
`).replace(/\n{3,}/g,`
|
|
14
15
|
|
|
15
|
-
`).trimStart();G(
|
|
16
|
+
`).trimStart();G(H,N.endsWith(`
|
|
16
17
|
`)?N:`${N}
|
|
17
|
-
`),$=!0}}catch{}let
|
|
18
|
+
`),$=!0}}catch{}let w=!1,x=Q(z,"CLAUDE.md");try{let V=X(x,"utf8"),Z=V.replace(/^[ \t]*@AGENTS\.md[ \t]*\n?/m,"");if(Z!==V){if(!Z.trim())C(x,{force:!0});else G(x,Z);w=!0}}catch{}return{skillsRemoved:J,mcpUnregistered:q,agentsBlockRemoved:$,claudeImportRemoved:w}}var k=`---
|
|
18
19
|
name: beacon-init
|
|
19
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.
|
|
20
21
|
---
|
|
@@ -53,7 +54,7 @@ A single \`beacon_init_persist\` MCP tool call with:
|
|
|
53
54
|
If \`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-init.
|
|
54
55
|
|
|
55
56
|
After the tool returns, tell the user the counts (components / roadmap / tables / endpoints) and point them at the running Beacon panel.
|
|
56
|
-
`,
|
|
57
|
+
`,P=`---
|
|
57
58
|
name: beacon-refresh
|
|
58
59
|
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.
|
|
59
60
|
---
|
|
@@ -100,7 +101,7 @@ The one caveat: if the user manually edited an INIT-source node on the canvas (e
|
|
|
100
101
|
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.
|
|
101
102
|
|
|
102
103
|
After the tool returns, report the final counts plus a one-line summary of the diff you surfaced.
|
|
103
|
-
`,
|
|
104
|
+
`,f=`---
|
|
104
105
|
name: beacon-plan
|
|
105
106
|
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.
|
|
106
107
|
---
|
|
@@ -128,6 +129,12 @@ Beacon extracts that block deterministically, strips it from the prose, and rend
|
|
|
128
129
|
board on /plan. The board is built ONLY from the block \u2014 prose is never parsed \u2014 so mirror EVERY
|
|
129
130
|
table/endpoint/feature you mention in the prose into the block, or that board will be empty.
|
|
130
131
|
|
|
132
|
+
- **Declare your scope.** List the repo-relative files this plan will touch in a top-level
|
|
133
|
+
\`"contract"\` array in the block (or the \`contract\` arg of \`beacon_propose_plan\`). When the user
|
|
134
|
+
has the plan scope-guard enabled, those files are frozen at approval and you're held to them while
|
|
135
|
+
implementing \u2014 editing an undeclared file pauses for the user's authorization (which then adds it
|
|
136
|
+
to the contract). Harmless when the guard is off. Declare the files you genuinely expect to edit.
|
|
137
|
+
|
|
131
138
|
\`beacon_present_plan\` opens /plan and BLOCKS until the user clicks Approve / Discard / submits
|
|
132
139
|
feedback, then returns their verdict. Implement code or migrations ONLY after it returns approval.
|
|
133
140
|
If it returns feedback, revise and call it again.
|
|
@@ -142,7 +149,7 @@ If it returns feedback, revise and call it again.
|
|
|
142
149
|
If \`beacon_present_plan\` isn't available, the panel isn't wired here \u2014 fall back to ExitPlanMode
|
|
143
150
|
with the same \`\`\`beacon block (Claude Code only; Codex has no ExitPlanMode), or tell the user to
|
|
144
151
|
run \`beacon\` in this repo once.
|
|
145
|
-
`,
|
|
152
|
+
`,O,v="<!-- beacon:workflow:start -->",b="<!-- beacon:workflow:end -->",T;var y=A(()=>{I();O=[{name:"beacon-init",body:()=>k},{name:"beacon-refresh",body:()=>P}];T=`${v}
|
|
146
153
|
## Beacon \u2014 feature workflow
|
|
147
154
|
|
|
148
155
|
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:
|
|
@@ -200,4 +207,4 @@ Register them all in that single batched call. If a plan added five features, th
|
|
|
200
207
|
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.
|
|
201
208
|
|
|
202
209
|
Pull raw planning data anytime with \`beacon_entities\` (features / architecture / tables / endpoints).
|
|
203
|
-
${
|
|
210
|
+
${b}`});y();export{R as removeRepoAssets,j as installRefreshSkill,L as installPlanSkill,K as installInitSkill,g as installCodexRepoSkills,F as ensureWorkflowDoc,_ as ensureMcp,h as auditRepo,P as REFRESH_SKILL,f as PLAN_SKILL,k as INIT_SKILL};
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var
|
|
2
|
+
var bq=Object.defineProperty;var uq=(q)=>q;function wq(q,z){this[q]=uq.bind(null,z)}var d=(q,z)=>{for(var J in z)bq(q,J,{get:z[J],enumerable:!0,configurable:!0,set:wq.bind(z,J)})};var X=(q,z)=>()=>(q&&(z=q(q=0)),z);var lq=1500,dq=480000,sq=1800000,w=3600000,cq=3000;var s=()=>{};var n={};d(n,{removeRepoAssets:()=>Dq,installRefreshSkill:()=>gq,installPlanSkill:()=>Kq,installInitSkill:()=>jq,installCodexRepoSkills:()=>Nq,ensureWorkflowDoc:()=>Mq,ensureMcp:()=>fq,auditRepo:()=>Rq,REFRESH_SKILL:()=>L,PLAN_SKILL:()=>t,INIT_SKILL:()=>E});import{existsSync as v,mkdirSync as g,readFileSync as H,rmSync as j,writeFileSync as W}from"fs";import{join as $}from"path";function jq(q){let z=$(q,".claude","skills","beacon-init");g(z,{recursive:!0});let J=$(z,"SKILL.md");return W(J,E),J}function gq(q){let z=$(q,".claude","skills","beacon-refresh");g(z,{recursive:!0});let J=$(z,"SKILL.md");return W(J,L),J}function Kq(q){let z=$(q,".claude","skills","beacon-plan");g(z,{recursive:!0});let J=$(z,"SKILL.md");return W(J,t),J}function Nq(q){let z=[];for(let J of Cq){let Q=$(q,".agents","skills",J.name);g(Q,{recursive:!0});let V=$(Q,"SKILL.md");W(V,J.body()),z.push(V)}return z}function Mq(q){let z=$(q,"AGENTS.md"),J="";try{J=H(z,"utf8")}catch{}let Q=new RegExp(`${K}[\\s\\S]*?${y}`);J=Q.test(J)?J.replace(Q,c):`${J.trim()}
|
|
3
3
|
|
|
4
|
-
${
|
|
5
|
-
`.trimStart(),
|
|
4
|
+
${c}
|
|
5
|
+
`.trimStart(),W(z,J.endsWith(`
|
|
6
6
|
`)?J:`${J}
|
|
7
|
-
`);let V=$(q,"CLAUDE.md"),Y="";try{Y=
|
|
7
|
+
`);let V=$(q,"CLAUDE.md"),Y="";try{Y=H(V,"utf8")}catch{}if(!/@AGENTS\.md/.test(Y))W(V,`${Y?`${Y.trim()}
|
|
8
8
|
|
|
9
9
|
`:""}@AGENTS.md
|
|
10
|
-
`)}function
|
|
11
|
-
`),{path:z,added:!0}
|
|
12
|
-
`)}}catch{}let
|
|
10
|
+
`)}function fq(q){let z=$(q,".mcp.json"),J={};try{J=JSON.parse(H(z,"utf8"))}catch{}J.mcpServers=J.mcpServers??{};let Q=J.mcpServers.beacon;if(Q){if(!Q.timeout||Q.timeout<w)return Q.timeout=w,W(z,JSON.stringify(J,null,2)+`
|
|
11
|
+
`),{path:z,added:!1,updated:!0};return{path:z,added:!1,updated:!1}}return J.mcpServers.beacon={command:"beacon",args:["mcp"],timeout:w},W(z,JSON.stringify(J,null,2)+`
|
|
12
|
+
`),{path:z,added:!0,updated:!1}}function Rq(q){let z=$(q,".mcp.json"),J=!1;try{J=!!JSON.parse(H(z,"utf8")).mcpServers?.beacon}catch{}let Q=!1;try{Q=H($(q,"AGENTS.md"),"utf8").includes(K)}catch{}let V=!1;try{V=/@AGENTS\.md/.test(H($(q,"CLAUDE.md"),"utf8"))}catch{}return{repo:q,mcpRegistered:J,agentsMdBlock:Q,claudeMdImport:V,skills:{"beacon-init":v($(q,".claude","skills","beacon-init","SKILL.md")),"beacon-refresh":v($(q,".claude","skills","beacon-refresh","SKILL.md"))},codexSkills:{"beacon-init":v($(q,".agents","skills","beacon-init","SKILL.md")),"beacon-refresh":v($(q,".agents","skills","beacon-refresh","SKILL.md"))}}}function Dq(q){let z=[];for(let Z of["beacon-init","beacon-refresh","beacon-db-design"]){let P=$(q,".claude","skills",Z);if(v(P))j(P,{recursive:!0,force:!0}),z.push(Z)}for(let Z of["beacon-init","beacon-refresh"]){let P=$(q,".agents","skills",Z);if(v(P))j(P,{recursive:!0,force:!0}),z.push(`codex:${Z}`)}let J=!1,Q=$(q,".mcp.json");try{let Z=JSON.parse(H(Q,"utf8"));if(Z.mcpServers?.beacon){if(delete Z.mcpServers.beacon,J=!0,Z.mcpServers&&Object.keys(Z.mcpServers).length===0)delete Z.mcpServers;if(Object.keys(Z).length===0)j(Q,{force:!0});else W(Q,JSON.stringify(Z,null,2)+`
|
|
13
|
+
`)}}catch{}let V=!1,Y=$(q,"AGENTS.md");try{let Z=H(Y,"utf8"),P=new RegExp(`\\n?${K}[\\s\\S]*?${y}\\n?`);if(P.test(Z)){let k=Z.replace(P,`
|
|
13
14
|
`).replace(/\n{3,}/g,`
|
|
14
15
|
|
|
15
|
-
`).trimStart();
|
|
16
|
-
`)?
|
|
17
|
-
`),V=!0}}catch{}let U=!1,
|
|
16
|
+
`).trimStart();W(Y,k.endsWith(`
|
|
17
|
+
`)?k:`${k}
|
|
18
|
+
`),V=!0}}catch{}let U=!1,B=$(q,"CLAUDE.md");try{let Z=H(B,"utf8"),P=Z.replace(/^[ \t]*@AGENTS\.md[ \t]*\n?/m,"");if(P!==Z){if(!P.trim())j(B,{force:!0});else W(B,P);U=!0}}catch{}return{skillsRemoved:z,mcpUnregistered:J,agentsBlockRemoved:V,claudeImportRemoved:U}}var E=`---
|
|
18
19
|
name: beacon-init
|
|
19
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.
|
|
20
21
|
---
|
|
@@ -53,7 +54,7 @@ A single \`beacon_init_persist\` MCP tool call with:
|
|
|
53
54
|
If \`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-init.
|
|
54
55
|
|
|
55
56
|
After the tool returns, tell the user the counts (components / roadmap / tables / endpoints) and point them at the running Beacon panel.
|
|
56
|
-
`,
|
|
57
|
+
`,L=`---
|
|
57
58
|
name: beacon-refresh
|
|
58
59
|
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.
|
|
59
60
|
---
|
|
@@ -128,6 +129,12 @@ Beacon extracts that block deterministically, strips it from the prose, and rend
|
|
|
128
129
|
board on /plan. The board is built ONLY from the block \u2014 prose is never parsed \u2014 so mirror EVERY
|
|
129
130
|
table/endpoint/feature you mention in the prose into the block, or that board will be empty.
|
|
130
131
|
|
|
132
|
+
- **Declare your scope.** List the repo-relative files this plan will touch in a top-level
|
|
133
|
+
\`"contract"\` array in the block (or the \`contract\` arg of \`beacon_propose_plan\`). When the user
|
|
134
|
+
has the plan scope-guard enabled, those files are frozen at approval and you're held to them while
|
|
135
|
+
implementing \u2014 editing an undeclared file pauses for the user's authorization (which then adds it
|
|
136
|
+
to the contract). Harmless when the guard is off. Declare the files you genuinely expect to edit.
|
|
137
|
+
|
|
131
138
|
\`beacon_present_plan\` opens /plan and BLOCKS until the user clicks Approve / Discard / submits
|
|
132
139
|
feedback, then returns their verdict. Implement code or migrations ONLY after it returns approval.
|
|
133
140
|
If it returns feedback, revise and call it again.
|
|
@@ -142,7 +149,7 @@ If it returns feedback, revise and call it again.
|
|
|
142
149
|
If \`beacon_present_plan\` isn't available, the panel isn't wired here \u2014 fall back to ExitPlanMode
|
|
143
150
|
with the same \`\`\`beacon block (Claude Code only; Codex has no ExitPlanMode), or tell the user to
|
|
144
151
|
run \`beacon\` in this repo once.
|
|
145
|
-
`,
|
|
152
|
+
`,Cq,K="<!-- beacon:workflow:start -->",y="<!-- beacon:workflow:end -->",c;var r=X(()=>{s();Cq=[{name:"beacon-init",body:()=>E},{name:"beacon-refresh",body:()=>L}];c=`${K}
|
|
146
153
|
## Beacon \u2014 feature workflow
|
|
147
154
|
|
|
148
155
|
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:
|
|
@@ -200,18 +207,18 @@ Register them all in that single batched call. If a plan added five features, th
|
|
|
200
207
|
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.
|
|
201
208
|
|
|
202
209
|
Pull raw planning data anytime with \`beacon_entities\` (features / architecture / tables / endpoints).
|
|
203
|
-
${
|
|
204
|
-
`)}function
|
|
210
|
+
${y}`});import{existsSync as i,mkdirSync as O,readFileSync as N,rmSync as Iq,writeFileSync as M}from"fs";import{dirname as o,join as C}from"path";function h(q){try{return JSON.parse(N(q,"utf8"))}catch{return{}}}function qq(q,z){O(o(q),{recursive:!0}),M(q,JSON.stringify(z,null,2)+`
|
|
211
|
+
`)}function zq(q,z){let J=h(q);J.hooks=J.hooks??{},J.hooks[z.event]=J.hooks[z.event]??[];let Q=J.hooks[z.event];if(Q.some((Y)=>Y.matcher===z.matcher&&Y.hooks?.some((U)=>U.command===z.command)))return!1;return Q.push({matcher:z.matcher,hooks:[{type:"command",command:z.command}]}),qq(q,J),!0}function Jq(q,z){return(h(q).hooks?.[z.event]??[]).some((V)=>V.hooks?.some((Y)=>Y.command===z.command))}function Qq(q,z){let J=h(q),Q=J.hooks?.[z.event];if(!Q)return!1;let V=!1,Y=Q.map((U)=>{let B=U.hooks?.length??0,Z=(U.hooks??[]).filter((P)=>P.command!==z.command);if(Z.length!==B)V=!0;return{...U,hooks:Z}}).filter((U)=>(U.hooks??[]).length>0);if(!V)return!1;if(Y.length)J.hooks[z.event]=Y;else delete J.hooks[z.event];if(J.hooks&&Object.keys(J.hooks).length===0)delete J.hooks;return qq(q,J),!0}function Vq(q,z,J,Q){let V=`${z}
|
|
205
212
|
${Q.trim()}
|
|
206
213
|
${J}`,Y="";try{Y=N(q,"utf8")}catch{}let U=new RegExp(`${z}[\\s\\S]*?${J}`);Y=U.test(Y)?Y.replace(U,V):Y.trim()?`${Y.trim()}
|
|
207
214
|
|
|
208
215
|
${V}
|
|
209
216
|
`:`${V}
|
|
210
|
-
`,
|
|
217
|
+
`,O(o(q),{recursive:!0}),M(q,Y.endsWith(`
|
|
211
218
|
`)?Y:`${Y}
|
|
212
|
-
`)}function
|
|
219
|
+
`)}function _(q,z){try{return N(q,"utf8").includes(z)}catch{return!1}}function Yq(q,z,J){let Q="";try{Q=N(q,"utf8")}catch{return!1}let V=new RegExp(`${z}[\\s\\S]*?${J}\\n?`);if(!V.test(Q))return!1;let Y=Q.replace(V,"").replace(/\n{3,}/g,`
|
|
213
220
|
|
|
214
|
-
`).trimStart();return
|
|
221
|
+
`).trimStart();return M(q,Y),!0}function Zq(q,z,J){let Q=C(q,z);O(Q,{recursive:!0});let V=C(Q,"SKILL.md");return M(V,J),V}function m(q,z){return i(C(q,z,"SKILL.md"))}function $q(q,z){let J=C(q,z);if(!i(J))return!1;return Iq(J,{recursive:!0,force:!0}),!0}var f,e=`## Beacon (visual planning panel)
|
|
215
222
|
|
|
216
223
|
This machine has Beacon installed \u2014 a local visual planning surface for the terminal-side
|
|
217
224
|
agent. Beacon proposes feature plans (roadmap features + DB schema + endpoints) via MCP,
|
|
@@ -232,17 +239,17 @@ the user reviews on a canvas at /plan, and feedback flows back as the next round
|
|
|
232
239
|
Feedback bundles inline annotations on the markdown PLUS any edits the user made directly
|
|
233
240
|
on the /map and /db boards (added features, attached subtasks, edited columns, new
|
|
234
241
|
endpoints). Treat board edits as the user's revision intent \u2014 re-propose matching them
|
|
235
|
-
verbatim. Do NOT implement until the tool returns approval.`;var
|
|
242
|
+
verbatim. Do NOT implement until the tool returns approval.`;var Uq=X(()=>{f=["beacon-init","beacon-refresh","beacon-plan"]});import{mkdirSync as Aq,renameSync as Tq,rmSync as Fq,writeFileSync as kq}from"fs";import{dirname as Eq}from"path";function R(q,z){Aq(Eq(q),{recursive:!0});let J=`${q}.tmp`;try{kq(J,z),Tq(J,q)}catch(Q){throw Fq(J,{force:!0}),Q}}function Qz(q,z,J=!1){R(q,JSON.stringify(z,null,J?2:void 0))}var Pq=()=>{};var Sq={};d(Sq,{setupCodexAssets:()=>hq,removeCodexMcp:()=>Gq,removeCodexArtifacts:()=>mq,hasCodexMcp:()=>l,ensureCodexMcp:()=>Xq,codexMcpProblem:()=>Oq,codexDetected:()=>Bq,auditCodex:()=>_q,CODEX_HOOKS:()=>F});import{readFileSync as T}from"fs";import{homedir as Lq}from"os";import{join as u}from"path";function Wq(){return process.env.HOME||process.env.USERPROFILE||Lq()}function Bq(){if(process.env.BEACON_CODEX==="1")return!0;if(process.env.BEACON_CODEX==="0")return!1;if(S===void 0)S=Bun.which("codex")!==null;return S}function b(q){try{return Bun.TOML.parse(q)}catch{return null}}function l(){try{return Boolean(b(T(x(),"utf8"))?.mcp_servers?.beacon)}catch{return!1}}function Oq(){let q="";try{q=T(x(),"utf8")}catch{return null}let z=b(q);if(!z)return`~/.codex/config.toml does not parse \u2014 ${G}`;if(z.mcp_servers?.beacon)return null;if(/^\s*mcp_servers\s*=/m.test(q))return`mcp_servers is an inline table \u2014 ${G}`;return null}function Xq(){let q="",z=!1;try{q=T(x(),"utf8"),z=!0}catch{}if(z){let Y=b(q);if(!Y)return{added:!1,error:`~/.codex/config.toml does not parse \u2014 ${G}`};if(Y.mcp_servers?.beacon)return{added:!1};if(/^\s*mcp_servers\s*=/m.test(q))return{added:!1,error:`mcp_servers is an inline table \u2014 ${G}`}}let J=!q?"":q.endsWith(`
|
|
236
243
|
`)?`
|
|
237
244
|
`:`
|
|
238
245
|
|
|
239
|
-
`,Q=q+J+
|
|
240
|
-
`),J=z.indexOf(
|
|
246
|
+
`,Q=q+J+yq;if(b(Q)?.mcp_servers?.beacon?.command!=="beacon")return{added:!1,error:`could not safely append [mcp_servers.beacon] \u2014 ${G}`};return R(x(),Q),{added:!0}}function Gq(){let q="";try{q=T(x(),"utf8")}catch{return{removed:!1}}let z=q.split(`
|
|
247
|
+
`),J=z.indexOf(vq);if(J===-1)return{removed:!1,skipped:l()};let Q=z.indexOf(xq,J);if(Q===-1)return{removed:!1,skipped:!0};z.splice(J,Q-J+1);let V=z.join(`
|
|
241
248
|
`).replace(/\n{3,}/g,`
|
|
242
249
|
|
|
243
|
-
`).replace(/^\n+/,"");if(
|
|
250
|
+
`).replace(/^\n+/,"");if(b(V)===null)return{removed:!1,skipped:!0};return R(x(),V),{removed:!0}}async function hq(){let{INIT_SKILL:q,REFRESH_SKILL:z,PLAN_SKILL:J}=await Promise.resolve().then(() => (r(),n)),Q={"beacon-init":q,"beacon-refresh":z,"beacon-plan":J},V=[];for(let Z of f){if(!m(I(),Z))V.push(Z);Zq(I(),Z,Q[Z])}let Y=0;for(let Z of F)if(zq(a(),{event:Z.event,matcher:Z.matcher,command:Z.command}))Y++;let U=_(D(),A);Vq(D(),A,Hq,e);let B=Xq();return{skillsAdded:V,hooksAdded:Y,agentsMdBlockTouched:!U,mcp:B}}function _q(){let q={};for(let J of f)q[J]=m(I(),J);let z={};for(let J of F)z[J.event]=Jq(a(),{event:J.event,command:J.command});return{detected:Bq(),skills:q,hooks:z,agentsMdBlock:_(D(),A),mcp:l()}}function mq(){let q=[];for(let V of f)if($q(I(),V))q.push(V);let z=0;for(let V of F)if(Qq(a(),{event:V.event,command:V.command}))z++;let J=Yq(D(),A,Hq),Q=Gq();return{skillsRemoved:q,hooksRemoved:z,agentsMdBlockRemoved:J,mcpRemoved:Q.removed,mcpSkipped:Q.skipped}}var p=()=>u(Wq(),".codex"),a=()=>u(p(),"hooks.json"),x=()=>u(p(),"config.toml"),D=()=>u(p(),"AGENTS.md"),I=()=>u(Wq(),".agents","skills"),A="<!-- beacon:global:start -->",Hq="<!-- beacon:global:end -->",F,S,vq="# beacon:start (managed by Beacon \u2014 `beacon uninstall` removes this block)",xq="# beacon:end",yq,G="add it manually: codex mcp add beacon -- beacon mcp";var pq=X(()=>{Uq();Pq();F=[{event:"PostToolUse",matcher:"apply_patch",command:"beacon hook",description:"Report file edits to Beacon's active feature so the map stays fresh."},{event:"UserPromptSubmit",matcher:"*",command:"beacon prompt",description:"On feature-y prompts in a Beacon-wired repo, remind the agent to run the context\u2192propose\u2192describe loop (no-op otherwise)."},{event:"Stop",matcher:"*",command:"beacon stop-hook",description:"When the agent ends a turn asking for plan approval in prose, nudge it to present the plan on Beacon's /plan canvas."}];yq=`${vq}
|
|
244
251
|
[mcp_servers.beacon]
|
|
245
252
|
command = "beacon"
|
|
246
253
|
args = ["mcp"]
|
|
247
|
-
${
|
|
248
|
-
`});
|
|
254
|
+
${xq}
|
|
255
|
+
`});pq();export{hq as setupCodexAssets,Gq as removeCodexMcp,mq as removeCodexArtifacts,l as hasCodexMcp,Xq as ensureCodexMcp,Oq as codexMcpProblem,Bq as codexDetected,_q as auditCodex,F as CODEX_HOOKS};
|