trybeacon 0.1.33 → 0.1.35
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 -13
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/routes-manifest.json +6 -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/position/route.js.nft.json +1 -1
- package/.next/server/app/api/db/prune-planned/route.js +1 -1
- package/.next/server/app/api/db/reconcile-endpoints/route.js +1 -1
- package/.next/server/app/api/db/relations/[id]/route.js +1 -1
- package/.next/server/app/api/db/tables/[id]/route.js +1 -1
- package/.next/server/app/api/draft/approve/route.js +1 -1
- package/.next/server/app/api/draft/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/edges/route.js.nft.json +1 -1
- package/.next/server/app/api/endpoints/[id]/route.js +1 -1
- package/.next/server/app/api/entities/route.js +1 -1
- package/.next/server/app/api/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/ingest/route.js +2 -2
- package/.next/server/app/api/init/route.js +2 -2
- package/.next/server/app/api/init/route.js.nft.json +1 -1
- package/.next/server/app/api/map/describe/route.js +2 -2
- package/.next/server/app/api/map/describe/route.js.nft.json +1 -1
- package/.next/server/app/api/map/files/route.js +1 -1
- package/.next/server/app/api/map/files/route.js.nft.json +1 -1
- package/.next/server/app/api/map/finish/route.js +1 -1
- package/.next/server/app/api/map/finish/route.js.nft.json +1 -1
- package/.next/server/app/api/map/route.js +1 -1
- package/.next/server/app/api/map/route.js.nft.json +1 -1
- package/.next/server/app/api/map/start/route.js +1 -1
- package/.next/server/app/api/map/start/route.js.nft.json +1 -1
- package/.next/server/app/api/map/touch-active/route.js +1 -1
- package/.next/server/app/api/map/touch-active/route.js.nft.json +1 -1
- package/.next/server/app/api/nodes/[id]/position/route.js +1 -1
- package/.next/server/app/api/nodes/[id]/position/route.js.nft.json +1 -1
- package/.next/server/app/api/nodes/[id]/route.js +1 -1
- package/.next/server/app/api/nodes/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/nodes/positions/route.js +1 -1
- package/.next/server/app/api/nodes/positions/route.js.nft.json +1 -1
- package/.next/server/app/api/nodes/route.js +1 -1
- package/.next/server/app/api/nodes/route.js.nft.json +1 -1
- package/.next/server/app/api/nodes/subtasks/route.js +1 -1
- package/.next/server/app/api/nodes/subtasks/route.js.nft.json +1 -1
- package/.next/server/app/api/notes/[id]/route.js +1 -1
- package/.next/server/app/api/notes/route.js +1 -1
- package/.next/server/app/api/open/route.js +1 -1
- package/.next/server/app/api/plan/annotations/route.js +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/markdown/route.js.nft.json +1 -1
- package/.next/server/app/api/plan/presence/route.js +1 -1
- package/.next/server/app/api/plan/route.js +1 -1
- package/.next/server/app/api/plan/route.js.nft.json +1 -1
- package/.next/server/app/api/plan/verdict/route.js +1 -1
- package/.next/server/app/api/preferences/route.js +1 -1
- package/.next/server/app/api/project-meta/route.js +1 -0
- package/.next/server/app/api/project-meta/route.js.nft.json +1 -0
- package/.next/server/app/api/project-meta/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/reset/route.js +1 -1
- package/.next/server/app/api/stream/route.js +2 -2
- 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.js.nft.json +1 -1
- package/.next/server/app/help/page_client-reference-manifest.js +1 -1
- package/.next/server/app/help.html +1 -1
- package/.next/server/app/help.rsc +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 +2 -2
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/index.segments/_full.segment.rsc +2 -2
- 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.js.nft.json +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +14 -13
- package/.next/server/chunks/1130.js +1 -0
- package/.next/server/chunks/1341.js +1 -0
- package/.next/server/chunks/249.js +1 -1
- package/.next/server/chunks/2933.js +1 -1
- package/.next/server/chunks/{4274.js → 3269.js} +2 -2
- package/.next/server/chunks/3622.js +1 -0
- package/.next/server/chunks/4378.js +1 -1
- package/.next/server/chunks/4940.js +1 -0
- package/.next/server/chunks/7154.js +1 -0
- package/.next/server/chunks/9213.js +1 -1
- package/.next/server/chunks/9313.js +3 -3
- 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/middleware.js +3 -3
- 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/1551-c19a41da7732c31e.js +1 -0
- package/.next/static/chunks/{1202-dfeac8ec49693586.js → 6955-c21412b6dcd86d80.js} +1 -1
- package/.next/static/chunks/app/_global-error/page-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/board-annotations/[id]/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/board-annotations/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/board-layout/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/bug-flags/[id]/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/bug-flags/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/code-graph/position/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/code-graph/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/context/feature/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/context/file/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/context/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/db/arrange/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/db/backfill-access/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/db/position/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/db/prune-planned/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/db/reconcile-endpoints/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/db/relations/[id]/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/db/tables/[id]/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/draft/approve/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/draft/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/draft/status/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/edges/[id]/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/edges/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/endpoints/[id]/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/entities/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/feedback/[id]/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/feedback/[id]/vote/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/feedback/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/ingest/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/init/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/map/describe/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/map/files/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/map/finish/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/map/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/map/start/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/map/touch-active/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/nodes/[id]/position/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/nodes/[id]/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/nodes/positions/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/nodes/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/nodes/subtasks/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/notes/[id]/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/notes/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/open/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/plan/annotations/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/plan/approve/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/plan/history/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/plan/markdown/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/plan/presence/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/plan/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/plan/verdict/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/preferences/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/project-meta/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/reset/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/stream/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/version/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/workspace/activate/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/api/workspace/route-68515a67eece5248.js +1 -0
- package/.next/static/chunks/app/map/page-8417d6e5dc33e7fb.js +1 -0
- package/.next/static/chunks/app/plan/page-af54cdc9fb6058a3.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-68515a67eece5248.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-68515a67eece5248.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-68515a67eece5248.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-68515a67eece5248.js +1 -0
- package/.next/static/css/496162fa86c30a1d.css +1 -0
- package/.next/static/p7RuAgL_wa-K9PsrN1Js0/_buildManifest.js +1 -0
- package/.next/trace +38 -38
- package/.next/trace-build +1 -1
- package/.next/types/app/api/{plan → project-meta}/route.ts +3 -3
- package/.next/types/routes.d.ts +2 -1
- package/.next/types/validator.ts +9 -0
- package/dist/bin/beacon.js +9 -6
- package/dist/bin/doctor.js +31 -28
- package/dist/bin/hook.js +28 -25
- package/dist/bin/mcp.js +40 -37
- package/dist/bin/plan.js +31 -28
- package/dist/bin/remove.js +6 -6
- package/dist/bin/uninstall.js +30 -27
- package/dist/lib/assets.js +6 -3
- package/dist/lib/codex-install.js +6 -3
- package/dist/lib/global-install.js +6 -3
- package/dist/lib/release.js +2 -0
- package/dist/lib/semver.js +2 -0
- package/dist/lib/workspaces.js +1 -1
- package/drizzle/0006_optimal_chronomancer.sql +2 -0
- package/drizzle/meta/0006_snapshot.json +1765 -0
- package/drizzle/meta/_journal.json +7 -0
- package/package.json +1 -1
- package/.next/server/chunks/7138.js +0 -1
- package/.next/server/chunks/7373.js +0 -1
- package/.next/static/chunks/8252-326851ad274762f5.js +0 -1
- package/.next/static/chunks/app/_global-error/page-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/board-annotations/[id]/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/board-annotations/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/board-layout/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/bug-flags/[id]/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/bug-flags/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/code-graph/position/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/code-graph/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/context/feature/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/context/file/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/context/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/db/arrange/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/db/backfill-access/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/db/position/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/db/prune-planned/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/db/reconcile-endpoints/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/db/relations/[id]/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/db/tables/[id]/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/draft/approve/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/draft/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/draft/status/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/edges/[id]/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/edges/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/endpoints/[id]/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/entities/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/feedback/[id]/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/feedback/[id]/vote/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/feedback/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/ingest/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/init/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/map/describe/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/map/files/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/map/finish/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/map/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/map/start/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/map/touch-active/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/nodes/[id]/position/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/nodes/[id]/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/nodes/positions/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/nodes/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/nodes/subtasks/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/notes/[id]/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/notes/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/open/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/plan/annotations/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/plan/approve/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/plan/history/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/plan/markdown/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/plan/presence/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/plan/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/plan/verdict/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/preferences/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/reset/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/stream/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/version/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/workspace/activate/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/api/workspace/route-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/app/map/page-ac03f88297a40d47.js +0 -1
- package/.next/static/chunks/app/plan/page-47e880f3e83a2753.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-4cdc03c65547f289.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-4cdc03c65547f289.js +0 -1
- package/.next/static/css/cb2ba3334a6b2336.css +0 -1
- package/.next/static/kJSpkyKRHr2jFBQoOGP8P/_buildManifest.js +0 -1
- /package/.next/static/{kJSpkyKRHr2jFBQoOGP8P → p7RuAgL_wa-K9PsrN1Js0}/_ssgManifest.js +0 -0
package/dist/bin/hook.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
// @bun
|
|
3
|
-
var
|
|
3
|
+
var XZ=Object.defineProperty;var UZ=(Q)=>Q;function WZ(Q,Z){this[Q]=UZ.bind(null,Z)}var i=(Q,Z)=>{for(var $ in Z)XZ(Q,$,{get:Z[$],enumerable:!0,configurable:!0,set:WZ.bind(Z,$)})};var v=(Q,Z)=>()=>(Q&&(Z=Q(Q=0)),Z);var $Q={};i($Q,{removeRepoAssets:()=>uZ,installRefreshSkill:()=>HZ,installPlanSkill:()=>BZ,installInitSkill:()=>xZ,installCodexRepoSkills:()=>PZ,ensureWorkflowDoc:()=>GZ,ensureMcp:()=>NZ,auditRepo:()=>KZ,REFRESH_SKILL:()=>QQ,PLAN_SKILL:()=>fQ,INIT_SKILL:()=>e});import{existsSync as N,mkdirSync as b,readFileSync as H,rmSync as R,writeFileSync as x}from"fs";import{join as X}from"path";function xZ(Q){let Z=X(Q,".claude","skills","beacon-init");b(Z,{recursive:!0});let $=X(Z,"SKILL.md");return x($,e),$}function HZ(Q){let Z=X(Q,".claude","skills","beacon-refresh");b(Z,{recursive:!0});let $=X(Z,"SKILL.md");return x($,QQ),$}function BZ(Q){let Z=X(Q,".claude","skills","beacon-plan");b(Z,{recursive:!0});let $=X(Z,"SKILL.md");return x($,fQ),$}function PZ(Q){let Z=[];for(let $ of jZ){let J=X(Q,".agents","skills",$.name);b(J,{recursive:!0});let Y=X(J,"SKILL.md");x(Y,$.body()),Z.push(Y)}return Z}function GZ(Q){let Z=X(Q,"AGENTS.md"),$="";try{$=H(Z,"utf8")}catch{}let J=new RegExp(`${I}[\\s\\S]*?${ZQ}`);$=J.test($)?$.replace(J,TQ):`${$.trim()}
|
|
4
4
|
|
|
5
|
-
${
|
|
5
|
+
${TQ}
|
|
6
6
|
`.trimStart(),x(Z,$.endsWith(`
|
|
7
7
|
`)?$:`${$}
|
|
8
|
-
`);let Y=X(Q,"CLAUDE.md"),V="";try{V=
|
|
8
|
+
`);let Y=X(Q,"CLAUDE.md"),V="";try{V=H(Y,"utf8")}catch{}if(!/@AGENTS\.md/.test(V))x(Y,`${V?`${V.trim()}
|
|
9
9
|
|
|
10
10
|
`:""}@AGENTS.md
|
|
11
|
-
`)}function
|
|
12
|
-
`),{path:Z,added:!0}}function
|
|
13
|
-
`)}}catch{}let Y=!1,V=X(Q,"AGENTS.md");try{let z=
|
|
11
|
+
`)}function NZ(Q){let Z=X(Q,".mcp.json"),$={};try{$=JSON.parse(H(Z,"utf8"))}catch{}if($.mcpServers=$.mcpServers??{},$.mcpServers.beacon)return{path:Z,added:!1};return $.mcpServers.beacon={command:"beacon",args:["mcp"]},x(Z,JSON.stringify($,null,2)+`
|
|
12
|
+
`),{path:Z,added:!0}}function KZ(Q){let Z=X(Q,".mcp.json"),$=!1;try{$=!!JSON.parse(H(Z,"utf8")).mcpServers?.beacon}catch{}let J=!1;try{J=H(X(Q,"AGENTS.md"),"utf8").includes(I)}catch{}let Y=!1;try{Y=/@AGENTS\.md/.test(H(X(Q,"CLAUDE.md"),"utf8"))}catch{}return{repo:Q,mcpRegistered:$,agentsMdBlock:J,claudeMdImport:Y,skills:{"beacon-init":N(X(Q,".claude","skills","beacon-init","SKILL.md")),"beacon-refresh":N(X(Q,".claude","skills","beacon-refresh","SKILL.md"))},codexSkills:{"beacon-init":N(X(Q,".agents","skills","beacon-init","SKILL.md")),"beacon-refresh":N(X(Q,".agents","skills","beacon-refresh","SKILL.md"))}}}function uZ(Q){let Z=[];for(let z of["beacon-init","beacon-refresh","beacon-db-design"]){let W=X(Q,".claude","skills",z);if(N(W))R(W,{recursive:!0,force:!0}),Z.push(z)}for(let z of["beacon-init","beacon-refresh"]){let W=X(Q,".agents","skills",z);if(N(W))R(W,{recursive:!0,force:!0}),Z.push(`codex:${z}`)}let $=!1,J=X(Q,".mcp.json");try{let z=JSON.parse(H(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)R(J,{force:!0});else x(J,JSON.stringify(z,null,2)+`
|
|
13
|
+
`)}}catch{}let Y=!1,V=X(Q,"AGENTS.md");try{let z=H(V,"utf8"),W=new RegExp(`\\n?${I}[\\s\\S]*?${ZQ}\\n?`);if(W.test(z)){let o=z.replace(W,`
|
|
14
14
|
`).replace(/\n{3,}/g,`
|
|
15
15
|
|
|
16
16
|
`).trimStart();x(V,o.endsWith(`
|
|
17
17
|
`)?o:`${o}
|
|
18
|
-
`),Y=!0}}catch{}let q=!1,U=X(Q,"CLAUDE.md");try{let z=
|
|
18
|
+
`),Y=!0}}catch{}let q=!1,U=X(Q,"CLAUDE.md");try{let z=H(U,"utf8"),W=z.replace(/^[ \t]*@AGENTS\.md[ \t]*\n?/m,"");if(W!==z){if(!W.trim())R(U,{force:!0});else x(U,W);q=!0}}catch{}return{skillsRemoved:Z,mcpUnregistered:$,agentsBlockRemoved:Y,claudeImportRemoved:q}}var e=`---
|
|
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
|
---
|
|
@@ -28,8 +28,9 @@ The user already has Beacon running. You're going to map this repository's archi
|
|
|
28
28
|
|
|
29
29
|
A single \`beacon_init_persist\` MCP tool call with:
|
|
30
30
|
|
|
31
|
-
- **
|
|
32
|
-
- **
|
|
31
|
+
- **hasFrontend**: \`true\` or \`false\` \u2014 does this repo have a frontend surface (UI code)? You just read the repo, so you know. Set it explicitly; it gates the frontend/backend \`layer\` distinction on the boards (a pure-backend repo never shows it).
|
|
32
|
+
- **components**: 8\u201325 main building blocks of this codebase. NOT every file. Group them by \`domain\` (short UPPERCASE: AUTH, API, DATA, UI, JOBS, INFRA, BILLING, SEARCH, \u2026). For each: a one-line technical \`role\`, a one-sentence plain-language \`plain\`, the few \`files\` that implement it (repo-relative), \`depends\` listing other component titles it relies on \u2014 and, when \`hasFrontend\` is true, \`layer\` (\`"frontend" | "backend" | "fullstack"\`). Use the dependency graph you can see in the source \u2014 files that import each other heavily usually belong together. If you spot a bug or something worth investigating while reading a component's code, add \`bugs: [{ note }]\` to that component \u2014 it renders as a bug flag on the node (attributed to the agent). Only flag what you actually saw in the code; don't speculate.
|
|
33
|
+
- **roadmap**: 3\u20136 BROAD strategic directions. Big-picture themes only \u2014 "Harden auth & security", "Add observability", "Scale the data layer", "Pay down test-coverage debt". NOT detailed tasks. NOT file-level. Each gets a short title and one-line \`why\`. If one of them is a concrete BUG to fix (something broken you saw in the code), add \`kind: "BUG"\` so it renders as a typed bug card. When \`hasFrontend\` is true, give each a \`layer\` too (\`"frontend" | "backend" | "fullstack"\`).
|
|
33
34
|
- **overview**: one paragraph describing what this project is and its stack. This lands in AGENTS.md as the project intro.
|
|
34
35
|
- **conventions**: 3\u20138 concrete rules a contributor MUST follow \u2014 build/test commands, where code goes, patterns, things easy to get wrong. Infer from actual files, not assumptions.
|
|
35
36
|
- **snapshot** (optional but encouraged): \`{ tables, relations, endpoints }\` for the existing database. If the project uses Prisma, read \`prisma/schema.prisma\`. If SQLAlchemy, read the model files. If Django, read \`models.py\`. If you find no obvious schema source, skip the snapshot \u2014 don't fabricate.
|
|
@@ -87,7 +88,7 @@ The one caveat: if the user manually edited an INIT-source node on the canvas (e
|
|
|
87
88
|
- **~ changed**: COMPONENT_X (role expanded to cover Y)
|
|
88
89
|
- **schema**: + 2 new tables (TableA, TableB); + 3 new endpoints; \u2212 1 deprecated endpoint
|
|
89
90
|
No need to wait for confirmation \u2014 just show the diff so the user sees what's about to land.
|
|
90
|
-
5. **Call \`beacon_init_persist\`** ONCE with the refreshed full analysis (same shape as init: \`components\`, \`roadmap\`, \`overview\`, \`conventions\`, \`snapshot\`). It replaces all init-source nodes and regenerates \`AGENTS.md\`. Bug flags already on a component survive the refresh (they're carried over by title); add \`bugs: [{ note }]\` for anything NEW you found worth investigating \u2014 identical open flags are not duplicated.
|
|
91
|
+
5. **Call \`beacon_init_persist\`** ONCE with the refreshed full analysis (same shape as init: \`components\`, \`roadmap\`, \`overview\`, \`conventions\`, \`snapshot\`, \`hasFrontend\` \u2014 re-assert it, the stack may have changed). It replaces all init-source nodes and regenerates \`AGENTS.md\`. Bug flags already on a component survive the refresh (they're carried over by title); add \`bugs: [{ note }]\` for anything NEW you found worth investigating \u2014 identical open flags are not duplicated.
|
|
91
92
|
|
|
92
93
|
## What you should NOT do
|
|
93
94
|
|
|
@@ -99,7 +100,7 @@ The one caveat: if the user manually edited an INIT-source node on the canvas (e
|
|
|
99
100
|
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.
|
|
100
101
|
|
|
101
102
|
After the tool returns, report the final counts plus a one-line summary of the diff you surfaced.
|
|
102
|
-
`,
|
|
103
|
+
`,fQ=`---
|
|
103
104
|
name: beacon-plan
|
|
104
105
|
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.
|
|
105
106
|
---
|
|
@@ -141,7 +142,7 @@ If it returns feedback, revise and call it again.
|
|
|
141
142
|
If \`beacon_present_plan\` isn't available, the panel isn't wired here \u2014 fall back to ExitPlanMode
|
|
142
143
|
with the same \`\`\`beacon block (Claude Code only; Codex has no ExitPlanMode), or tell the user to
|
|
143
144
|
run \`beacon\` in this repo once.
|
|
144
|
-
`,
|
|
145
|
+
`,jZ,I="<!-- beacon:workflow:start -->",ZQ="<!-- beacon:workflow:end -->",TQ;var JQ=v(()=>{jZ=[{name:"beacon-init",body:()=>e},{name:"beacon-refresh",body:()=>QQ}];TQ=`${I}
|
|
145
146
|
## Beacon \u2014 feature workflow
|
|
146
147
|
|
|
147
148
|
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:
|
|
@@ -166,6 +167,8 @@ When listing endpoints, give each \`uses: [{ table, access }]\` so the endpoint\
|
|
|
166
167
|
|
|
167
168
|
EVERY feature MUST carry \`category\` (e.g. AUTH | SEARCH | DATA | INTEL | BILLING | \u2026; \`cluster\` is accepted as an alias) and \`priority\` (0 = P0 critical, 1 = P1 high, 2 = P2 medium, 3 = P3 low). Beacon REJECTS a plan whose features omit either \u2014 \`beacon_propose_plan\` returns the list of what's missing, and an ExitPlanMode \`\`\`beacon block is denied \u2014 so set both on every feature instead of relying on defaults.
|
|
168
169
|
|
|
170
|
+
When the workspace HAS A FRONTEND (Beacon knows \u2014 the agent set \`hasFrontend\` at init, or frontend files were detected), every feature must ALSO carry \`layer\`: \`"frontend" | "backend" | "fullstack"\` \u2014 which side of the stack the work lands on. Plans omitting it are REJECTED the same way category/priority are. It works on every surface that creates roadmap cards (\`beacon_propose_plan\`, the \`\`\`beacon block, \`beacon_start_feature\`, \`beacon_add_subtasks\` \u2014 sub-tasks default to the parent's layer) and on architecture components (\`beacon_describe_feature\` / \`beacon_init_persist\`). In a pure-backend repo, never set it \u2014 the boards don't show it there.
|
|
171
|
+
|
|
169
172
|
REUSE before you create. Call \`beacon_map\` to see the features + categories that already exist. Beacon HARD-BLOCKS a feature that duplicates an existing one (it returns the existing feature to use instead) and one created without a category \u2014 so don't re-create work that's already on the board, and reuse an existing category rather than a near-synonym. \`category\` is the ONLY domain field. \`front\` (in \`beacon_start_feature\`) nests a feature UNDER an existing parent feature \u2014 it is NOT a domain tag; a \`front\` that matches no real feature is rejected.
|
|
170
173
|
|
|
171
174
|
When listing features, give each \`dependsOn: ["Other feature title", \u2026]\` for any feature that must ship after another in the same plan. Beacon draws these as "depends on" links so the roadmap shows the dependency chain instead of loose, disconnected cards.
|
|
@@ -197,18 +200,18 @@ Register them all in that single batched call. If a plan added five features, th
|
|
|
197
200
|
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.
|
|
198
201
|
|
|
199
202
|
Pull raw planning data anytime with \`beacon_entities\` (features / architecture / tables / endpoints).
|
|
200
|
-
${ZQ}`});import{existsSync as
|
|
201
|
-
`)}function
|
|
203
|
+
${ZQ}`});import{existsSync as FQ,mkdirSync as YQ,readFileSync as E,rmSync as vZ,writeFileSync as A}from"fs";import{dirname as RQ,join as O}from"path";function VQ(Q){try{return JSON.parse(E(Q,"utf8"))}catch{return{}}}function bQ(Q,Z){YQ(RQ(Q),{recursive:!0}),A(Q,JSON.stringify(Z,null,2)+`
|
|
204
|
+
`)}function y(Q,Z){let $=VQ(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}]}),bQ(Q,$),!0}function k(Q,Z){return(VQ(Q).hooks?.[Z.event]??[]).some((Y)=>Y.hooks?.some((V)=>V.command===Z.command))}function L(Q,Z){let $=VQ(Q),J=$.hooks?.[Z.event];if(!J)return!1;let Y=!1,V=J.map((q)=>{let U=q.hooks?.length??0,z=(q.hooks??[]).filter((W)=>W.command!==Z.command);if(z.length!==U)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 bQ(Q,$),!0}function _(Q,Z,$,J){let Y=`${Z}
|
|
202
205
|
${J.trim()}
|
|
203
|
-
${$}`,V="";try{V=
|
|
206
|
+
${$}`,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()}
|
|
204
207
|
|
|
205
208
|
${Y}
|
|
206
209
|
`:`${Y}
|
|
207
|
-
`,YQ(
|
|
210
|
+
`,YQ(RQ(Q),{recursive:!0}),A(Q,V.endsWith(`
|
|
208
211
|
`)?V:`${V}
|
|
209
|
-
`)}function
|
|
212
|
+
`)}function C(Q,Z){try{return E(Q,"utf8").includes(Z)}catch{return!1}}function h(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,`
|
|
210
213
|
|
|
211
|
-
`).trimStart();return
|
|
214
|
+
`).trimStart();return A(Q,V),!0}function S(Q,Z,$){let J=O(Q,Z);YQ(J,{recursive:!0});let Y=O(J,"SKILL.md");return A(Y,$),Y}function M(Q,Z){return FQ(O(Q,Z,"SKILL.md"))}function m(Q,Z){let $=O(Q,Z);if(!FQ($))return!1;return vZ($,{recursive:!0,force:!0}),!0}var B,D=`## Beacon (visual planning panel)
|
|
212
215
|
|
|
213
216
|
This machine has Beacon installed \u2014 a local visual planning surface for the terminal-side
|
|
214
217
|
agent. Beacon proposes feature plans (roadmap features + DB schema + endpoints) via MCP,
|
|
@@ -229,18 +232,18 @@ the user reviews on a canvas at /plan, and feedback flows back as the next round
|
|
|
229
232
|
Feedback bundles inline annotations on the markdown PLUS any edits the user made directly
|
|
230
233
|
on the /map and /db boards (added features, attached subtasks, edited columns, new
|
|
231
234
|
endpoints). Treat board edits as the user's revision intent \u2014 re-propose matching them
|
|
232
|
-
verbatim. Do NOT implement until the tool returns approval.`;var zQ=
|
|
235
|
+
verbatim. Do NOT implement until the tool returns approval.`;var zQ=v(()=>{B=["beacon-init","beacon-refresh","beacon-plan"]});import{mkdirSync as CZ,renameSync as MZ,rmSync as wZ,writeFileSync as gZ}from"fs";import{dirname as TZ}from"path";function qQ(Q,Z){CZ(TZ(Q),{recursive:!0});let $=`${Q}.tmp`;try{gZ($,Z),MZ($,Q)}catch(J){throw wZ($,{force:!0}),J}}var IQ=()=>{};var _Q={};i(_Q,{setupCodexAssets:()=>bZ,removeCodexMcp:()=>LQ,removeCodexArtifacts:()=>OZ,hasCodexMcp:()=>xQ,ensureCodexMcp:()=>kQ,codexMcpProblem:()=>RZ,codexDetected:()=>AQ,auditCodex:()=>IZ,CODEX_HOOKS:()=>s});import{readFileSync as l}from"fs";import{homedir as fZ}from"os";import{join as T}from"path";function OQ(){return process.env.HOME||process.env.USERPROFILE||fZ()}function AQ(){if(process.env.BEACON_CODEX==="1")return!0;if(process.env.BEACON_CODEX==="0")return!1;if(XQ===void 0)XQ=Bun.which("codex")!==null;return XQ}function g(Q){try{return Bun.TOML.parse(Q)}catch{return null}}function xQ(){try{return Boolean(g(l(K(),"utf8"))?.mcp_servers?.beacon)}catch{return!1}}function RZ(){let Q="";try{Q=l(K(),"utf8")}catch{return null}let Z=g(Q);if(!Z)return`~/.codex/config.toml does not parse \u2014 ${w}`;if(Z.mcp_servers?.beacon)return null;if(/^\s*mcp_servers\s*=/m.test(Q))return`mcp_servers is an inline table \u2014 ${w}`;return null}function kQ(){let Q="",Z=!1;try{Q=l(K(),"utf8"),Z=!0}catch{}if(Z){let V=g(Q);if(!V)return{added:!1,error:`~/.codex/config.toml does not parse \u2014 ${w}`};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 ${w}`}}let $=!Q?"":Q.endsWith(`
|
|
233
236
|
`)?`
|
|
234
237
|
`:`
|
|
235
238
|
|
|
236
|
-
`,J=Q+$+
|
|
237
|
-
`),$=Z.indexOf(
|
|
239
|
+
`,J=Q+$+FZ;if(g(J)?.mcp_servers?.beacon?.command!=="beacon")return{added:!1,error:`could not safely append [mcp_servers.beacon] \u2014 ${w}`};return qQ(K(),J),{added:!0}}function LQ(){let Q="";try{Q=l(K(),"utf8")}catch{return{removed:!1}}let Z=Q.split(`
|
|
240
|
+
`),$=Z.indexOf(DQ);if($===-1)return{removed:!1,skipped:xQ()};let J=Z.indexOf(yQ,$);if(J===-1)return{removed:!1,skipped:!0};Z.splice($,J-$+1);let Y=Z.join(`
|
|
238
241
|
`).replace(/\n{3,}/g,`
|
|
239
242
|
|
|
240
|
-
`).replace(/^\n+/,"");if(
|
|
243
|
+
`).replace(/^\n+/,"");if(g(Y)===null)return{removed:!1,skipped:!0};return qQ(K(),Y),{removed:!0}}async function bZ(){let{INIT_SKILL:Q,REFRESH_SKILL:Z,PLAN_SKILL:$}=await Promise.resolve().then(() => (JQ(),$Q)),J={"beacon-init":Q,"beacon-refresh":Z,"beacon-plan":$},Y=[];for(let z of B){if(!M(c(),z))Y.push(z);S(c(),z,J[z])}let V=0;for(let z of s)if(y(WQ(),{event:z.event,matcher:z.matcher,command:z.command}))V++;let q=C(p(),n);_(p(),n,EQ,D);let U=kQ();return{skillsAdded:Y,hooksAdded:V,agentsMdBlockTouched:!q,mcp:U}}function IZ(){let Q={};for(let $ of B)Q[$]=M(c(),$);let Z={};for(let $ of s)Z[$.event]=k(WQ(),{event:$.event,command:$.command});return{detected:AQ(),skills:Q,hooks:Z,agentsMdBlock:C(p(),n),mcp:xQ()}}function OZ(){let Q=[];for(let Y of B)if(m(c(),Y))Q.push(Y);let Z=0;for(let Y of s)if(L(WQ(),{event:Y.event,command:Y.command}))Z++;let $=h(p(),n,EQ),J=LQ();return{skillsRemoved:Q,hooksRemoved:Z,agentsMdBlockRemoved:$,mcpRemoved:J.removed,mcpSkipped:J.skipped}}var UQ=()=>T(OQ(),".codex"),WQ=()=>T(UQ(),"hooks.json"),K=()=>T(UQ(),"config.toml"),p=()=>T(UQ(),"AGENTS.md"),c=()=>T(OQ(),".agents","skills"),n="<!-- beacon:global:start -->",EQ="<!-- beacon:global:end -->",s,XQ,DQ="# beacon:start (managed by Beacon \u2014 `beacon uninstall` removes this block)",yQ="# beacon:end",FZ,w="add it manually: codex mcp add beacon -- beacon mcp";var hQ=v(()=>{zQ();IQ();s=[{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."}];FZ=`${DQ}
|
|
241
244
|
[mcp_servers.beacon]
|
|
242
245
|
command = "beacon"
|
|
243
246
|
args = ["mcp"]
|
|
244
|
-
${
|
|
245
|
-
`});var
|
|
246
|
-
`)){let J=
|
|
247
|
+
${yQ}
|
|
248
|
+
`});var lQ={};i(lQ,{provisionDb:()=>Z0});import{createClient as nZ}from"@libsql/client";import{drizzle as lZ}from"drizzle-orm/libsql";import{migrate as sZ}from"drizzle-orm/libsql/migrator";import{readMigrationFiles as aZ}from"drizzle-orm/migrator";import{dirname as NQ,join as dZ}from"path";import{fileURLToPath as tZ}from"url";async function t(Q,Z){return(await Q.execute({sql:"SELECT 1 FROM sqlite_master WHERE type='table' AND name = ?",args:[Z]})).rows.length>0}async function eZ(Q,Z){let $=await Q.execute(`PRAGMA table_info("${Z}")`);return new Set($.rows.map((J)=>String(J.name)))}async function nQ(Q){if(!await t(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 Q0(Q){for(let[Z,$]of Object.entries(iZ)){if(!await t(Q,Z))continue;let J=await eZ(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 Z0(Q,Z=oZ){let $=nZ({url:Q});try{await $.execute("PRAGMA journal_mode = WAL;"),await $.execute("PRAGMA foreign_keys = ON;"),await $.execute("PRAGMA busy_timeout = 5000;");let J=await t($,"__drizzle_migrations"),Y=await t($,"Node"),V=!1;if(Y&&!J){let U=aZ({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 q=await nQ($);if(await sZ(lZ($),{migrationsFolder:Z}),await nQ($)>q)V=!0;return await Q0($),{migrated:V}}finally{$.close()}}var rZ,oZ,iZ;var sQ=v(async()=>{rZ=NQ(NQ(NQ(tZ(import.meta.url)))),oZ=process.env.BEACON_MIGRATIONS_DIR||dZ(rZ,"drizzle"),iZ={Node:["createdAt","updatedAt"],Note:["createdAt","updatedAt"],DbTable:["createdAt","updatedAt"],Endpoint:["createdAt","updatedAt"],DraftTable:["createdAt"],SyncState:["codeGraphSyncedAt","updatedAt"],AppSetting:["updatedAt"],ProjectMeta:["updatedAt"],CodeFile:["updatedAt"]}});zQ();import{existsSync as EZ}from"fs";import{homedir as AZ}from"os";import{join as a}from"path";function DZ(){return process.env.HOME||process.env.USERPROFILE||AZ()}var d=()=>a(DZ(),".claude"),HQ=()=>a(d(),"skills"),BQ=()=>a(d(),"settings.json"),jQ=()=>a(d(),"CLAUDE.md"),PQ="<!-- beacon:global:start -->",SQ="<!-- beacon:global:end -->";var yZ=D,GQ=[{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 kZ(Q,Z){return S(HQ(),Q,Z)}function mQ(Q){return M(HQ(),Q)}function LZ(Q){return m(HQ(),Q)}function _Z(Q){return y(BQ(),Q)}function hZ(Q){return k(BQ(),Q)}function SZ(Q){return L(BQ(),Q)}function mZ(Q){_(jQ(),PQ,SQ,Q)}function pQ(){return C(jQ(),PQ)}function pZ(){return h(jQ(),PQ,SQ)}function L0(){let Q={};for(let $ of B)Q[$]=mQ($);let Z={};for(let $ of GQ)Z[$.event]=hZ({event:$.event,command:$.command});return{homeExists:EZ(d()),skills:Q,hooks:Z,claudeMdBlock:pQ()}}async function cZ(){let{INIT_SKILL:Q,REFRESH_SKILL:Z,PLAN_SKILL:$}=await Promise.resolve().then(() => (JQ(),$Q)),J={"beacon-init":Q,"beacon-refresh":Z,"beacon-plan":$},Y=[];for(let U of B){if(!mQ(U))Y.push(U);kZ(U,J[U])}let V=0;for(let U of GQ)if(_Z({event:U.event,matcher:U.matcher,command:U.command}))V++;let q=pQ();return mZ(yZ),{skillsAdded:Y,hooksAdded:V,claudeMdBlockTouched:!q}}async function cQ(){let Q;try{Q={ok:!0,...await cZ()}}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(() => (hQ(),_Q));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 _0(){let Q=[];for(let J of B)if(LZ(J))Q.push(J);let Z=0;for(let J of GQ)if(SZ(J))Z++;let $=pZ();return{skillsRemoved:Q,hooksRemoved:Z,claudeMdBlockRemoved:$}}import{AsyncLocalStorage as $0}from"async_hooks";import{spawnSync as J0}from"child_process";import{createHash as Y0}from"crypto";import{existsSync as dQ,mkdirSync as f,readFileSync as uQ,writeFileSync as vQ}from"fs";import{homedir as tQ}from"os";import{basename as V0,join as j,parse as z0,resolve as aQ}from"path";function G(){return process.env.BEACON_HOME||j(tQ(),".beacon")}function CQ(){return j(G(),"workspaces.json")}function u(Q){return Y0("sha256").update(Q).digest("hex").slice(0,12)}function rQ(Q=process.cwd()){let Z=J0("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 oQ(Q){let Z=aQ(Q);return Z!==aQ(tQ())&&Z!==z0(Z).root}function iQ(){return j(G(),"deleted.json")}function MQ(){try{let Q=JSON.parse(uQ(iQ(),"utf8"));return Array.isArray(Q)?Q:[]}catch{return[]}}function eQ(Q){f(G(),{recursive:!0}),vQ(iQ(),JSON.stringify(Q,null,2))}function QZ(Q){return MQ().includes(Q)}function i0(Q){let Z=MQ();if(!Z.includes(Q))eQ([...Z,Q])}function q0(Q){let Z=MQ();if(Z.includes(Q))eQ(Z.filter(($)=>$!==Q))}function r(Q){return j(G(),Q)}function X0(Q){return`file:${j(r(Q),"db.sqlite")}`}function F(){try{let Q=JSON.parse(uQ(CQ(),"utf8"));return Array.isArray(Q)?Q:[]}catch{return[]}}function wQ(Q){f(G(),{recursive:!0}),vQ(CQ(),JSON.stringify(Q,null,2))}function U0(){return F().sort((Q,Z)=>Z.lastOpenedAt.localeCompare(Q.lastOpenedAt))}function P(Q){return F().find((Z)=>Z.id===Q)??null}function ZZ(Q,Z,$=new Date().toISOString()){if(!oQ(Q))throw Error(`beacon: refusing to register a non-repo path as a workspace: ${Q}`);let J=u(Q);if(QZ(J))throw Error(`beacon: workspace ${J} (${Q}) was deleted \u2014 run \`beacon\` or /beacon-init to re-add it`);let Y=F(),V=Y.find((z)=>z.id===J),q={id:J,path:Q,name:Z||V?.name||V0(Q),lastOpenedAt:$},U=[q,...Y.filter((z)=>z.id!==J)];return f(r(J),{recursive:!0}),wQ(U),q}function e0(Q,Z){return q0(u(Q)),ZZ(Q,Z)}function Q1(Q,Z=new Date().toISOString()){let $=F(),J=$.find((Y)=>Y.id===Q);if(!J)return;J.lastOpenedAt=Z,wQ($)}function Z1(Q){if(wQ(F().filter((Z)=>Z.id!==Q)),gQ()===Q)W0(U0()[0]?.id??null)}function $Z(){return j(G(),"active")}function gQ(){try{return uQ($Z(),"utf8").trim()||null}catch{return null}}function W0(Q){f(G(),{recursive:!0}),vQ($Z(),Q??"")}function $1(){let Q=gQ();return Q?P(Q):null}function J1(){let Q=H0()??gQ();return Q?P(Q):null}function Y1(Q){return P(Q)?.path??null}function V1(){return dQ(CQ())}var JZ="beacon_ws";function YZ(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 z1(Q){let Z=Q.headers.get("x-beacon-workspace");if(Z&&P(Z))return Z;let $=YZ(Q,JZ);if($&&P($))return $;return null}var x0="x-beacon-workspace-path";async function q1(Q){let Z=Q.headers.get("x-beacon-workspace");if(Z&&P(Z))return Z;let $=Q.headers.get(x0);if($&&oQ($)&&!QZ(u($))&&(!Z||u($)===Z)){let Y=ZZ($);return await B0(Y.id),Y.id}let J=YZ(Q,JZ);if(J&&P(J))return J;return null}var VZ=new $0;function X1(Q,Z){return Q?VZ.run(Q,Z):Z()}function H0(){return VZ.getStore()??null}var KQ=new Set;function U1(Q){KQ.delete(j(r(Q),"db.sqlite"))}async function B0(Q){let Z=r(Q),$=j(Z,"db.sqlite"),J=dQ($);if(J&&KQ.has($))return{ok:!0,created:!1,migrated:!1};try{f(Z,{recursive:!0});let{provisionDb:Y}=await sQ().then(() => lQ),V=await Y(X0(Q));return KQ.add($),{ok:!0,created:!J,migrated:J&&V.migrated}}catch(Y){return{ok:!1,created:!1,migrated:!1,error:Y instanceof Error?Y.message:String(Y)}}}import{resolve as j0}from"path";var P0="*** Begin Patch",G0=/^\*\*\* (Update File|Add File|Move to): (.+)$/;function N0(Q){let Z=[];for(let $ of Q.split(`
|
|
249
|
+
`)){let J=G0.exec($.trim());if(!J)continue;let Y=J[2].trim();if(J[1]==="Move to")Z.pop();Z.push(Y)}return Z}function zZ(Q){let Z=Q.tool_input;if(Z===null||typeof Z!=="object")return[];let $=Z,J=[];if(typeof $.file_path==="string")J.push($.file_path);if(typeof $.path==="string")J.push($.path);if(Array.isArray($.files))for(let V of $.files){let q=V?.file_path;if(typeof q==="string")J.push(q)}if(J.length)return J;let Y=typeof Q.cwd==="string"?Q.cwd:process.cwd();for(let V of Object.values($)){if(typeof V!=="string"||!V.includes(P0))continue;return N0(V).map((q)=>j0(Y,q))}return[]}var K0=process.env.BEACON_URL||`http://localhost:${process.env.PORT||4319}`;await cQ();var qZ="";for await(let Q of process.stdin)qZ+=Q;try{let Q=JSON.parse(qZ||"{}"),Z=zZ(Q);if(Z.length){let $=u(rQ(typeof Q.cwd==="string"?Q.cwd:void 0));await fetch(`${K0}/api/map/touch-active`,{method:"POST",headers:{"content-type":"application/json","x-beacon-workspace":$},body:JSON.stringify({files:Z})}).catch(()=>{})}}catch{}process.exit(0);
|