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/plan.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
// @bun
|
|
3
|
-
var gZ=Object.defineProperty;var
|
|
3
|
+
var gZ=Object.defineProperty;var wZ=(Q)=>Q;function fZ(Q,Z){this[Q]=wZ.bind(null,Z)}var JQ=(Q,Z)=>{for(var $ in Z)gZ(Q,$,{get:Z[$],enumerable:!0,configurable:!0,set:fZ.bind(Z,$)})};var v=(Q,Z)=>()=>(Q&&(Z=Q(Q=0)),Z);var OQ=1500,yQ=480000,U1=1800000,D=3600000,W1=3000;var VQ=()=>{};var UQ={};JQ(UQ,{removeRepoAssets:()=>kZ,installRefreshSkill:()=>AZ,installPlanSkill:()=>IZ,installInitSkill:()=>DZ,installCodexRepoSkills:()=>bZ,ensureWorkflowDoc:()=>OZ,ensureMcp:()=>yZ,auditRepo:()=>LZ,REFRESH_SKILL:()=>qQ,PLAN_SKILL:()=>kQ,INIT_SKILL:()=>zQ});import{existsSync as C,mkdirSync as I,readFileSync as G,rmSync as A,writeFileSync as B}from"fs";import{join as U}from"path";function DZ(Q){let Z=U(Q,".claude","skills","beacon-init");I(Z,{recursive:!0});let $=U(Z,"SKILL.md");return B($,zQ),$}function AZ(Q){let Z=U(Q,".claude","skills","beacon-refresh");I(Z,{recursive:!0});let $=U(Z,"SKILL.md");return B($,qQ),$}function IZ(Q){let Z=U(Q,".claude","skills","beacon-plan");I(Z,{recursive:!0});let $=U(Z,"SKILL.md");return B($,kQ),$}function bZ(Q){let Z=[];for(let $ of EZ){let Y=U(Q,".agents","skills",$.name);I(Y,{recursive:!0});let J=U(Y,"SKILL.md");B(J,$.body()),Z.push(J)}return Z}function OZ(Q){let Z=U(Q,"AGENTS.md"),$="";try{$=G(Z,"utf8")}catch{}let Y=new RegExp(`${E}[\\s\\S]*?${XQ}`);$=Y.test($)?$.replace(Y,LQ):`${$.trim()}
|
|
4
4
|
|
|
5
|
-
${
|
|
6
|
-
`.trimStart(),
|
|
5
|
+
${LQ}
|
|
6
|
+
`.trimStart(),B(Z,$.endsWith(`
|
|
7
7
|
`)?$:`${$}
|
|
8
|
-
`);let J=U(Q,"CLAUDE.md"),V="";try{V=G(J,"utf8")}catch{}if(!/@AGENTS\.md/.test(V))
|
|
8
|
+
`);let J=U(Q,"CLAUDE.md"),V="";try{V=G(J,"utf8")}catch{}if(!/@AGENTS\.md/.test(V))B(J,`${V?`${V.trim()}
|
|
9
9
|
|
|
10
10
|
`:""}@AGENTS.md
|
|
11
|
-
`)}function
|
|
12
|
-
`),{path:Z,added:!0}
|
|
13
|
-
`)}}catch{}let
|
|
11
|
+
`)}function yZ(Q){let Z=U(Q,".mcp.json"),$={};try{$=JSON.parse(G(Z,"utf8"))}catch{}$.mcpServers=$.mcpServers??{};let Y=$.mcpServers.beacon;if(Y){if(!Y.timeout||Y.timeout<D)return Y.timeout=D,B(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:D},B(Z,JSON.stringify($,null,2)+`
|
|
13
|
+
`),{path:Z,added:!0,updated:!1}}function LZ(Q){let Z=U(Q,".mcp.json"),$=!1;try{$=!!JSON.parse(G(Z,"utf8")).mcpServers?.beacon}catch{}let Y=!1;try{Y=G(U(Q,"AGENTS.md"),"utf8").includes(E)}catch{}let J=!1;try{J=/@AGENTS\.md/.test(G(U(Q,"CLAUDE.md"),"utf8"))}catch{}return{repo:Q,mcpRegistered:$,agentsMdBlock:Y,claudeMdImport:J,skills:{"beacon-init":C(U(Q,".claude","skills","beacon-init","SKILL.md")),"beacon-refresh":C(U(Q,".claude","skills","beacon-refresh","SKILL.md"))},codexSkills:{"beacon-init":C(U(Q,".agents","skills","beacon-init","SKILL.md")),"beacon-refresh":C(U(Q,".agents","skills","beacon-refresh","SKILL.md"))}}}function kZ(Q){let Z=[];for(let z of["beacon-init","beacon-refresh","beacon-db-design"]){let W=U(Q,".claude","skills",z);if(C(W))A(W,{recursive:!0,force:!0}),Z.push(z)}for(let z of["beacon-init","beacon-refresh"]){let W=U(Q,".agents","skills",z);if(C(W))A(W,{recursive:!0,force:!0}),Z.push(`codex:${z}`)}let $=!1,Y=U(Q,".mcp.json");try{let z=JSON.parse(G(Y,"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)A(Y,{force:!0});else B(Y,JSON.stringify(z,null,2)+`
|
|
14
|
+
`)}}catch{}let J=!1,V=U(Q,"AGENTS.md");try{let z=G(V,"utf8"),W=new RegExp(`\\n?${E}[\\s\\S]*?${XQ}\\n?`);if(W.test(z)){let H=z.replace(W,`
|
|
14
15
|
`).replace(/\n{3,}/g,`
|
|
15
16
|
|
|
16
|
-
`).trimStart();
|
|
17
|
-
`)?
|
|
18
|
-
`),J=!0}}catch{}let q=!1,X=U(Q,"CLAUDE.md");try{let z=G(X,"utf8"),W=z.replace(/^[ \t]*@AGENTS\.md[ \t]*\n?/m,"");if(W!==z){if(!W.trim())
|
|
17
|
+
`).trimStart();B(V,H.endsWith(`
|
|
18
|
+
`)?H:`${H}
|
|
19
|
+
`),J=!0}}catch{}let q=!1,X=U(Q,"CLAUDE.md");try{let z=G(X,"utf8"),W=z.replace(/^[ \t]*@AGENTS\.md[ \t]*\n?/m,"");if(W!==z){if(!W.trim())A(X,{force:!0});else B(X,W);q=!0}}catch{}return{skillsRemoved:Z,mcpUnregistered:$,agentsBlockRemoved:J,claudeImportRemoved:q}}var zQ=`---
|
|
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
|
+
`,qQ=`---
|
|
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
|
+
`,kQ=`---
|
|
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
|
-
`,EZ,
|
|
153
|
+
`,EZ,E="<!-- beacon:workflow:start -->",XQ="<!-- beacon:workflow:end -->",LQ;var WQ=v(()=>{VQ();EZ=[{name:"beacon-init",body:()=>zQ},{name:"beacon-refresh",body:()=>qQ}];LQ=`${E}
|
|
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
|
+
${XQ}`});import{existsSync as _Q,mkdirSync as HQ,readFileSync as O,rmSync as _Z,writeFileSync as y}from"fs";import{dirname as SQ,join as b}from"path";function BQ(Q){try{return JSON.parse(O(Q,"utf8"))}catch{return{}}}function hQ(Q,Z){HQ(SQ(Q),{recursive:!0}),y(Q,JSON.stringify(Z,null,2)+`
|
|
212
|
+
`)}function k(Q,Z){let $=BQ(Q);$.hooks=$.hooks??{},$.hooks[Z.event]=$.hooks[Z.event]??[];let Y=$.hooks[Z.event];if(Y.some((V)=>V.matcher===Z.matcher&&V.hooks?.some((q)=>q.command===Z.command)))return!1;return Y.push({matcher:Z.matcher,hooks:[{type:"command",command:Z.command}]}),hQ(Q,$),!0}function _(Q,Z){return(BQ(Q).hooks?.[Z.event]??[]).some((J)=>J.hooks?.some((V)=>V.command===Z.command))}function S(Q,Z){let $=BQ(Q),Y=$.hooks?.[Z.event];if(!Y)return!1;let J=!1,V=Y.map((q)=>{let X=q.hooks?.length??0,z=(q.hooks??[]).filter((W)=>W.command!==Z.command);if(z.length!==X)J=!0;return{...q,hooks:z}}).filter((q)=>(q.hooks??[]).length>0);if(!J)return!1;if(V.length)$.hooks[Z.event]=V;else delete $.hooks[Z.event];if($.hooks&&Object.keys($.hooks).length===0)delete $.hooks;return hQ(Q,$),!0}function h(Q,Z,$,Y){let J=`${Z}
|
|
206
213
|
${Y.trim()}
|
|
207
214
|
${$}`,V="";try{V=O(Q,"utf8")}catch{}let q=new RegExp(`${Z}[\\s\\S]*?${$}`);V=q.test(V)?V.replace(q,J):V.trim()?`${V.trim()}
|
|
208
215
|
|
|
209
216
|
${J}
|
|
210
217
|
`:`${J}
|
|
211
|
-
`,
|
|
218
|
+
`,HQ(SQ(Q),{recursive:!0}),y(Q,V.endsWith(`
|
|
212
219
|
`)?V:`${V}
|
|
213
|
-
`)}function T(Q,Z){try{return O(Q,"utf8").includes(Z)}catch{return!1}}function
|
|
220
|
+
`)}function T(Q,Z){try{return O(Q,"utf8").includes(Z)}catch{return!1}}function m(Q,Z,$){let Y="";try{Y=O(Q,"utf8")}catch{return!1}let J=new RegExp(`${Z}[\\s\\S]*?${$}\\n?`);if(!J.test(Y))return!1;let V=Y.replace(J,"").replace(/\n{3,}/g,`
|
|
214
221
|
|
|
215
|
-
`).trimStart();return
|
|
222
|
+
`).trimStart();return y(Q,V),!0}function p(Q,Z,$){let Y=b(Q,Z);HQ(Y,{recursive:!0});let J=b(Y,"SKILL.md");return y(J,$),J}function F(Q,Z){return _Q(b(Q,Z,"SKILL.md"))}function c(Q,Z){let $=b(Q,Z);if(!_Q($))return!1;return _Z($,{recursive:!0,force:!0}),!0}var x,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,24 +240,24 @@ 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 jQ=v(()=>{x=["beacon-init","beacon-refresh","beacon-plan"]});import{mkdirSync as SZ,renameSync as hZ,rmSync as mZ,writeFileSync as pZ}from"fs";import{dirname as cZ}from"path";function l(Q,Z){SZ(cZ(Q),{recursive:!0});let $=`${Q}.tmp`;try{pZ($,Z),hZ($,Q)}catch(Y){throw mZ($,{force:!0}),Y}}function C1(Q,Z,$=!1){l(Q,JSON.stringify(Z,null,$?2:void 0))}var mQ=()=>{};var sQ={};JQ(sQ,{setupCodexAssets:()=>aZ,removeCodexMcp:()=>tQ,removeCodexArtifacts:()=>sZ,hasCodexMcp:()=>PQ,ensureCodexMcp:()=>aQ,codexMcpProblem:()=>nZ,codexDetected:()=>lQ,auditCodex:()=>tZ,CODEX_HOOKS:()=>s});import{readFileSync as t}from"fs";import{homedir as lZ}from"os";import{join as g}from"path";function pQ(){return process.env.HOME||process.env.USERPROFILE||lZ()}function lQ(){if(process.env.BEACON_CODEX==="1")return!0;if(process.env.BEACON_CODEX==="0")return!1;if(GQ===void 0)GQ=Bun.which("codex")!==null;return GQ}function R(Q){try{return Bun.TOML.parse(Q)}catch{return null}}function PQ(){try{return Boolean(R(t(M(),"utf8"))?.mcp_servers?.beacon)}catch{return!1}}function nZ(){let Q="";try{Q=t(M(),"utf8")}catch{return null}let Z=R(Q);if(!Z)return`~/.codex/config.toml does not parse \u2014 ${u}`;if(Z.mcp_servers?.beacon)return null;if(/^\s*mcp_servers\s*=/m.test(Q))return`mcp_servers is an inline table \u2014 ${u}`;return null}function aQ(){let Q="",Z=!1;try{Q=t(M(),"utf8"),Z=!0}catch{}if(Z){let V=R(Q);if(!V)return{added:!1,error:`~/.codex/config.toml does not parse \u2014 ${u}`};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 ${u}`}}let $=!Q?"":Q.endsWith(`
|
|
237
244
|
`)?`
|
|
238
245
|
`:`
|
|
239
246
|
|
|
240
|
-
`,Y=Q+$+
|
|
241
|
-
`),$=Z.indexOf(
|
|
247
|
+
`,Y=Q+$+dZ;if(R(Y)?.mcp_servers?.beacon?.command!=="beacon")return{added:!1,error:`could not safely append [mcp_servers.beacon] \u2014 ${u}`};return l(M(),Y),{added:!0}}function tQ(){let Q="";try{Q=t(M(),"utf8")}catch{return{removed:!1}}let Z=Q.split(`
|
|
248
|
+
`),$=Z.indexOf(dQ);if($===-1)return{removed:!1,skipped:PQ()};let Y=Z.indexOf(nQ,$);if(Y===-1)return{removed:!1,skipped:!0};Z.splice($,Y-$+1);let J=Z.join(`
|
|
242
249
|
`).replace(/\n{3,}/g,`
|
|
243
250
|
|
|
244
|
-
`).replace(/^\n+/,"");if(R(J)===null)return{removed:!1,skipped:!0};return
|
|
251
|
+
`).replace(/^\n+/,"");if(R(J)===null)return{removed:!1,skipped:!0};return l(M(),J),{removed:!0}}async function aZ(){let{INIT_SKILL:Q,REFRESH_SKILL:Z,PLAN_SKILL:$}=await Promise.resolve().then(() => (WQ(),UQ)),Y={"beacon-init":Q,"beacon-refresh":Z,"beacon-plan":$},J=[];for(let z of x){if(!F(n(),z))J.push(z);p(n(),z,Y[z])}let V=0;for(let z of s)if(k(KQ(),{event:z.event,matcher:z.matcher,command:z.command}))V++;let q=T(d(),a);h(d(),a,cQ,L);let X=aQ();return{skillsAdded:J,hooksAdded:V,agentsMdBlockTouched:!q,mcp:X}}function tZ(){let Q={};for(let $ of x)Q[$]=F(n(),$);let Z={};for(let $ of s)Z[$.event]=_(KQ(),{event:$.event,command:$.command});return{detected:lQ(),skills:Q,hooks:Z,agentsMdBlock:T(d(),a),mcp:PQ()}}function sZ(){let Q=[];for(let J of x)if(c(n(),J))Q.push(J);let Z=0;for(let J of s)if(S(KQ(),{event:J.event,command:J.command}))Z++;let $=m(d(),a,cQ),Y=tQ();return{skillsRemoved:Q,hooksRemoved:Z,agentsMdBlockRemoved:$,mcpRemoved:Y.removed,mcpSkipped:Y.skipped}}var xQ=()=>g(pQ(),".codex"),KQ=()=>g(xQ(),"hooks.json"),M=()=>g(xQ(),"config.toml"),d=()=>g(xQ(),"AGENTS.md"),n=()=>g(pQ(),".agents","skills"),a="<!-- beacon:global:start -->",cQ="<!-- beacon:global:end -->",s,GQ,dQ="# beacon:start (managed by Beacon \u2014 `beacon uninstall` removes this block)",nQ="# beacon:end",dZ,u="add it manually: codex mcp add beacon -- beacon mcp";var rQ=v(()=>{jQ();mQ();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."}];dZ=`${dQ}
|
|
245
252
|
[mcp_servers.beacon]
|
|
246
253
|
command = "beacon"
|
|
247
254
|
args = ["mcp"]
|
|
248
|
-
${
|
|
249
|
-
`});var iQ={};YQ(iQ,{provisionDb:()=>P0});import{createClient as V0}from"@libsql/client";import{drizzle as z0}from"drizzle-orm/libsql";import{migrate as q0}from"drizzle-orm/libsql/migrator";import{readMigrationFiles as X0}from"drizzle-orm/migrator";import{dirname as MQ,join as U0}from"path";import{fileURLToPath as W0}from"url";async function o(Q,Z){return(await Q.execute({sql:"SELECT 1 FROM sqlite_master WHERE type='table' AND name = ?",args:[Z]})).rows.length>0}async function G0(Q,Z){let $=await Q.execute(`PRAGMA table_info("${Z}")`);return new Set($.rows.map((Y)=>String(Y.name)))}async function oQ(Q){if(!await o(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 x0(Q){for(let[Z,$]of Object.entries(j0)){if(!await o(Q,Z))continue;let Y=await G0(Q,Z);for(let J of $){if(!Y.has(J))continue;await Q.execute(`UPDATE "${Z}" SET "${J}" = CAST((julianday("${J}") - 2440587.5) * 86400000 AS INTEGER) WHERE typeof("${J}") = 'text'`)}}}async function P0(Q,Z=H0){let $=V0({url:Q});try{await $.execute("PRAGMA journal_mode = WAL;"),await $.execute("PRAGMA foreign_keys = ON;"),await $.execute("PRAGMA busy_timeout = 5000;");let Y=await o($,"__drizzle_migrations"),J=await o($,"Node"),V=!1;if(J&&!Y){let X=X0({migrationsFolder:Z})[0];if(X)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:[X.hash,X.folderMillis]}),V=!0}let q=await oQ($);if(await q0(z0($),{migrationsFolder:Z}),await oQ($)>q)V=!0;return await x0($),{migrated:V}}finally{$.close()}}var B0,H0,j0;var eQ=M(async()=>{B0=MQ(MQ(MQ(W0(import.meta.url)))),H0=process.env.BEACON_MIGRATIONS_DIR||U0(B0,"drizzle"),j0={Node:["createdAt","updatedAt"],Note:["createdAt","updatedAt"],DbTable:["createdAt","updatedAt"],Endpoint:["createdAt","updatedAt"],DraftTable:["createdAt"],SyncState:["codeGraphSyncedAt","updatedAt"],AppSetting:["updatedAt"],ProjectMeta:["updatedAt"],CodeFile:["updatedAt"]}});BQ();import{existsSync as aZ}from"fs";import{homedir as sZ}from"os";import{join as t}from"path";function tZ(){return process.env.HOME||process.env.USERPROFILE||sZ()}var r=()=>t(tZ(),".claude"),PQ=()=>t(r(),"skills"),KQ=()=>t(r(),"settings.json"),NQ=()=>t(r(),"CLAUDE.md"),vQ="<!-- beacon:global:start -->",aQ="<!-- beacon:global:end -->";var rZ=y,CQ=[{event:"PostToolUse",matcher:"Edit|Write|MultiEdit",command:"beacon hook",description:"Report file edits to Beacon's active feature so the map stays fresh."},{event:"PermissionRequest",matcher:"ExitPlanMode",command:"beacon plan",description:"Pipe the agent's plan markdown into Beacon's /plan canvas for review."},{event:"UserPromptSubmit",matcher:"*",command:"beacon prompt",description:"On feature-y prompts in a Beacon-wired repo, remind the agent to run the context\u2192propose\u2192describe loop (no-op otherwise)."},{event:"Stop",matcher:"*",command:"beacon stop-hook",description:"When the agent ends a turn asking for plan approval in prose (instead of presenting it), nudge it to present the plan on Beacon's /plan canvas. Bounded by stop_hook_active \u2014 at most one nudge."}];function oZ(Q,Z){return m(PQ(),Q,Z)}function sQ(Q){return g(PQ(),Q)}function iZ(Q){return p(PQ(),Q)}function eZ(Q){return L(KQ(),Q)}function Q0(Q){return k(KQ(),Q)}function Z0(Q){return _(KQ(),Q)}function $0(Q){S(NQ(),vQ,aQ,Q)}function tQ(){return T(NQ(),vQ)}function Y0(){return h(NQ(),vQ,aQ)}function F1(){let Q={};for(let $ of x)Q[$]=sQ($);let Z={};for(let $ of CQ)Z[$.event]=Q0({event:$.event,command:$.command});return{homeExists:aZ(r()),skills:Q,hooks:Z,claudeMdBlock:tQ()}}async function J0(){let{INIT_SKILL:Q,REFRESH_SKILL:Z,PLAN_SKILL:$}=await Promise.resolve().then(() => (XQ(),qQ)),Y={"beacon-init":Q,"beacon-refresh":Z,"beacon-plan":$},J=[];for(let X of x){if(!sQ(X))J.push(X);oZ(X,Y[X])}let V=0;for(let X of CQ)if(eZ({event:X.event,matcher:X.matcher,command:X.command}))V++;let q=tQ();return $0(rZ),{skillsAdded:J,hooksAdded:V,claudeMdBlockTouched:!q}}async function rQ(){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(() => (nQ(),dQ));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 R1(){let Q=[];for(let Y of x)if(iZ(Y))Q.push(Y);let Z=0;for(let Y of CQ)if(Z0(Y))Z++;let $=Y0();return{skillsRemoved:Q,hooksRemoved:Z,claudeMdBlockRemoved:$}}import{AsyncLocalStorage as K0}from"async_hooks";import{spawnSync as N0}from"child_process";import{createHash as v0}from"crypto";import{existsSync as ZZ,mkdirSync as w,readFileSync as gQ,writeFileSync as FQ}from"fs";import{homedir as $Z}from"os";import{basename as C0,join as P,parse as M0,resolve as QZ}from"path";function j(){return process.env.BEACON_HOME||P($Z(),".beacon")}function RQ(){return P(j(),"workspaces.json")}function i(Q){return v0("sha256").update(Q).digest("hex").slice(0,12)}function S1(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 YZ(Q){let Z=QZ(Q);return Z!==QZ($Z())&&Z!==M0(Z).root}function JZ(){return P(j(),"deleted.json")}function uQ(){try{let Q=JSON.parse(gQ(JZ(),"utf8"));return Array.isArray(Q)?Q:[]}catch{return[]}}function VZ(Q){w(j(),{recursive:!0}),FQ(JZ(),JSON.stringify(Q,null,2))}function zZ(Q){return uQ().includes(Q)}function h1(Q){let Z=uQ();if(!Z.includes(Q))VZ([...Z,Q])}function T0(Q){let Z=uQ();if(Z.includes(Q))VZ(Z.filter(($)=>$!==Q))}function e(Q){return P(j(),Q)}function g0(Q){return`file:${P(e(Q),"db.sqlite")}`}function A(){try{let Q=JSON.parse(gQ(RQ(),"utf8"));return Array.isArray(Q)?Q:[]}catch{return[]}}function wQ(Q){w(j(),{recursive:!0}),FQ(RQ(),JSON.stringify(Q,null,2))}function F0(){return A().sort((Q,Z)=>Z.lastOpenedAt.localeCompare(Q.lastOpenedAt))}function K(Q){return A().find((Z)=>Z.id===Q)??null}function qZ(Q,Z,$=new Date().toISOString()){if(!YZ(Q))throw Error(`beacon: refusing to register a non-repo path as a workspace: ${Q}`);let Y=i(Q);if(zZ(Y))throw Error(`beacon: workspace ${Y} (${Q}) was deleted \u2014 run \`beacon\` or /beacon-init to re-add it`);let J=A(),V=J.find((z)=>z.id===Y),q={id:Y,path:Q,name:Z||V?.name||C0(Q),lastOpenedAt:$},X=[q,...J.filter((z)=>z.id!==Y)];return w(e(Y),{recursive:!0}),wQ(X),q}function m1(Q,Z){return T0(i(Q)),qZ(Q,Z)}function p1(Q,Z=new Date().toISOString()){let $=A(),Y=$.find((J)=>J.id===Q);if(!Y)return;Y.lastOpenedAt=Z,wQ($)}function c1(Q){if(wQ(A().filter((Z)=>Z.id!==Q)),AQ()===Q)R0(F0()[0]?.id??null)}function XZ(){return P(j(),"active")}function AQ(){try{return gQ(XZ(),"utf8").trim()||null}catch{return null}}function R0(Q){w(j(),{recursive:!0}),FQ(XZ(),Q??"")}function l1(){let Q=AQ();return Q?K(Q):null}function d1(){let Q=w0()??AQ();return Q?K(Q):null}function n1(Q){return K(Q)?.path??null}function a1(){return ZZ(RQ())}var UZ="beacon_ws";function WZ(Q,Z){let $=Q.headers.get("cookie");if(!$)return null;for(let Y of $.split(";")){let J=Y.indexOf("=");if(J===-1)continue;if(Y.slice(0,J).trim()===Z)return decodeURIComponent(Y.slice(J+1).trim())}return null}function s1(Q){let Z=Q.headers.get("x-beacon-workspace");if(Z&&K(Z))return Z;let $=WZ(Q,UZ);if($&&K($))return $;return null}var u0="x-beacon-workspace-path";async function t1(Q){let Z=Q.headers.get("x-beacon-workspace");if(Z&&K(Z))return Z;let $=Q.headers.get(u0);if($&&YZ($)&&!zZ(i($))&&(!Z||i($)===Z)){let J=qZ($);return await A0(J.id),J.id}let Y=WZ(Q,UZ);if(Y&&K(Y))return Y;return null}var BZ=new K0;function r1(Q,Z){return Q?BZ.run(Q,Z):Z()}function w0(){return BZ.getStore()??null}var TQ=new Set;function o1(Q){TQ.delete(P(e(Q),"db.sqlite"))}async function A0(Q){let Z=e(Q),$=P(Z,"db.sqlite"),Y=ZZ($);if(Y&&TQ.has($))return{ok:!0,created:!1,migrated:!1};try{w(Z,{recursive:!0});let{provisionDb:J}=await eQ().then(() => iQ),V=await J(g0(Q));return TQ.add($),{ok:!0,created:!Y,migrated:Y&&V.migrated}}catch(J){return{ok:!1,created:!1,migrated:!1,error:J instanceof Error?J.message:String(J)}}}import{connect as E0}from"net";var Q2=4319;function f0(Q,Z,$=400){return new Promise((Y)=>{let J=E0({host:Q,port:Z}),V=!1,q=(X)=>{if(V)return;V=!0,J.destroy(),Y(X)};J.once("connect",()=>q(!0)),J.once("error",()=>q(!1)),J.setTimeout($,()=>q(!1))})}async function D0(Q){for(let Z of["127.0.0.1","::1"])if(await f0(Z,Q))return!1;return!0}async function HZ(Q,Z=20){for(let $=Q;$<Q+Z;$++)if(await D0($))return $;return Q}import{execSync as S0,spawn as h0}from"child_process";import{mkdirSync as m0,openSync as p0,readFileSync as c0,writeFileSync as l0}from"fs";import{homedir as d0}from"os";import{dirname as n0,join as ZQ}from"path";import{fileURLToPath as a0}from"url";import{createHash as s0}from"crypto";var jZ=1500,GZ=345600000,$2=1800000,Y2=3000;import{mkdirSync as O0,readFileSync as b0,writeFileSync as y0}from"fs";import{join as L0}from"path";var I0=["default","acceptEdits","bypassPermissions","auto"];function xZ(Q){return typeof Q==="string"&&I0.includes(Q)}function PZ(Q,Z){let $={behavior:"allow"};if(Q)$.updatedPermissions=[{type:"setMode",mode:Q,destination:"session"}];let Y={hookEventName:"PermissionRequest",decision:$};if(Z?.trim())Y.additionalContext=Z;return{hookSpecificOutput:Y}}function KZ(){return L0(j(),"preferences.json")}function EQ(){try{let Q=JSON.parse(b0(KZ(),"utf8"));return{planApprovalMode:xZ(Q.planApprovalMode)?Q.planApprovalMode:void 0,planApprovalModeConfigured:Q.planApprovalModeConfigured===!0,telemetryUuid:typeof Q.telemetryUuid==="string"?Q.telemetryUuid:void 0,telemetryEnabled:Q.telemetryEnabled===!1?!1:Q.telemetryEnabled===!0?!0:void 0}}catch{return{}}}function W2(Q){let Z={...EQ(),...Q};return O0(j(),{recursive:!0}),y0(KZ(),JSON.stringify(Z,null,2)),Z}function NZ(Q){if(!Q?.length)return"";let Z=Q.map((Y)=>Y.id?` \u2022 ${Y.title} \u2014 id: ${Y.id}`:` \u2022 ${Y.title}`),$=Q.some((Y)=>Y.id);return`
|
|
255
|
+
${nQ}
|
|
256
|
+
`});var $Z={};JQ($Z,{provisionDb:()=>v0});import{createClient as X0}from"@libsql/client";import{drizzle as U0}from"drizzle-orm/libsql";import{migrate as W0}from"drizzle-orm/libsql/migrator";import{readMigrationFiles as H0}from"drizzle-orm/migrator";import{dirname as FQ,join as B0}from"path";import{fileURLToPath as j0}from"url";async function i(Q,Z){return(await Q.execute({sql:"SELECT 1 FROM sqlite_master WHERE type='table' AND name = ?",args:[Z]})).rows.length>0}async function P0(Q,Z){let $=await Q.execute(`PRAGMA table_info("${Z}")`);return new Set($.rows.map((Y)=>String(Y.name)))}async function ZZ(Q){if(!await i(Q,"__drizzle_migrations"))return 0;let Z=await Q.execute('SELECT count(*) AS n FROM "__drizzle_migrations"');return Number(Z.rows[0]?.n??0)}async function N0(Q){for(let[Z,$]of Object.entries(K0)){if(!await i(Q,Z))continue;let Y=await P0(Q,Z);for(let J of $){if(!Y.has(J))continue;await Q.execute(`UPDATE "${Z}" SET "${J}" = CAST((julianday("${J}") - 2440587.5) * 86400000 AS INTEGER) WHERE typeof("${J}") = 'text'`)}}}async function v0(Q,Z=x0){let $=X0({url:Q});try{await $.execute("PRAGMA journal_mode = WAL;"),await $.execute("PRAGMA foreign_keys = ON;"),await $.execute("PRAGMA busy_timeout = 5000;");let Y=await i($,"__drizzle_migrations"),J=await i($,"Node"),V=!1;if(J&&!Y){let X=H0({migrationsFolder:Z})[0];if(X)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:[X.hash,X.folderMillis]}),V=!0}let q=await ZZ($);if(await W0(U0($),{migrationsFolder:Z}),await ZZ($)>q)V=!0;return await N0($),{migrated:V}}finally{$.close()}}var G0,x0,K0;var YZ=v(async()=>{G0=FQ(FQ(FQ(j0(import.meta.url)))),x0=process.env.BEACON_MIGRATIONS_DIR||B0(G0,"drizzle"),K0={Node:["createdAt","updatedAt"],Note:["createdAt","updatedAt"],DbTable:["createdAt","updatedAt"],Endpoint:["createdAt","updatedAt"],DraftTable:["createdAt"],SyncState:["codeGraphSyncedAt","updatedAt"],AppSetting:["updatedAt"],ProjectMeta:["updatedAt"],CodeFile:["updatedAt"]}});jQ();import{existsSync as rZ}from"fs";import{homedir as oZ}from"os";import{join as r}from"path";function iZ(){return process.env.HOME||process.env.USERPROFILE||oZ()}var o=()=>r(iZ(),".claude"),NQ=()=>r(o(),"skills"),vQ=()=>r(o(),"settings.json"),CQ=()=>r(o(),"CLAUDE.md"),MQ="<!-- beacon:global:start -->",oQ="<!-- beacon:global:end -->";var eZ=L,TQ=[{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 Q0(Q,Z){return p(NQ(),Q,Z)}function iQ(Q){return F(NQ(),Q)}function Z0(Q){return c(NQ(),Q)}function $0(Q){return k(vQ(),Q)}function Y0(Q){return _(vQ(),Q)}function J0(Q){return S(vQ(),Q)}function V0(Q){h(CQ(),MQ,oQ,Q)}function eQ(){return T(CQ(),MQ)}function z0(){return m(CQ(),MQ,oQ)}function I1(){let Q={};for(let $ of x)Q[$]=iQ($);let Z={};for(let $ of TQ)Z[$.event]=Y0({event:$.event,command:$.command});return{homeExists:rZ(o()),skills:Q,hooks:Z,claudeMdBlock:eQ()}}async function q0(){let{INIT_SKILL:Q,REFRESH_SKILL:Z,PLAN_SKILL:$}=await Promise.resolve().then(() => (WQ(),UQ)),Y={"beacon-init":Q,"beacon-refresh":Z,"beacon-plan":$},J=[];for(let X of x){if(!iQ(X))J.push(X);Q0(X,Y[X])}let V=0;for(let X of TQ)if($0({event:X.event,matcher:X.matcher,command:X.command}))V++;let q=eQ();return V0(eZ),{skillsAdded:J,hooksAdded:V,claudeMdBlockTouched:!q}}async function QZ(){let Q;try{Q={ok:!0,...await q0()}}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(),sQ));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 E1(){let Q=[];for(let Y of x)if(Z0(Y))Q.push(Y);let Z=0;for(let Y of TQ)if(J0(Y))Z++;let $=z0();return{skillsRemoved:Q,hooksRemoved:Z,claudeMdBlockRemoved:$}}import{AsyncLocalStorage as C0}from"async_hooks";import{spawnSync as M0}from"child_process";import{createHash as T0}from"crypto";import{existsSync as VZ,mkdirSync as w,readFileSync as RQ,writeFileSync as gQ}from"fs";import{homedir as zZ}from"os";import{basename as F0,join as K,parse as u0,resolve as JZ}from"path";function j(){return process.env.BEACON_HOME||K(zZ(),".beacon")}function wQ(){return K(j(),"workspaces.json")}function e(Q){return T0("sha256").update(Q).digest("hex").slice(0,12)}function n1(Q=process.cwd()){let Z=M0("git",["rev-parse","--show-toplevel"],{cwd:Q,stdio:["ignore","pipe","ignore"]});if(Z.status===0){let $=Z.stdout?.toString().trim();if($)return $}return Q}function qZ(Q){let Z=JZ(Q);return Z!==JZ(zZ())&&Z!==u0(Z).root}function XZ(){return K(j(),"deleted.json")}function fQ(){try{let Q=JSON.parse(RQ(XZ(),"utf8"));return Array.isArray(Q)?Q:[]}catch{return[]}}function UZ(Q){w(j(),{recursive:!0}),gQ(XZ(),JSON.stringify(Q,null,2))}function WZ(Q){return fQ().includes(Q)}function a1(Q){let Z=fQ();if(!Z.includes(Q))UZ([...Z,Q])}function R0(Q){let Z=fQ();if(Z.includes(Q))UZ(Z.filter(($)=>$!==Q))}function QQ(Q){return K(j(),Q)}function g0(Q){return`file:${K(QQ(Q),"db.sqlite")}`}function f(){try{let Q=JSON.parse(RQ(wQ(),"utf8"));return Array.isArray(Q)?Q:[]}catch{return[]}}function DQ(Q){w(j(),{recursive:!0}),gQ(wQ(),JSON.stringify(Q,null,2))}function HZ(){return f().sort((Q,Z)=>Z.lastOpenedAt.localeCompare(Q.lastOpenedAt))}function P(Q){return f().find((Z)=>Z.id===Q)??null}function BZ(Q,Z,$=new Date().toISOString()){if(!qZ(Q))throw Error(`beacon: refusing to register a non-repo path as a workspace: ${Q}`);let Y=e(Q);if(WZ(Y))throw Error(`beacon: workspace ${Y} (${Q}) was deleted \u2014 run \`beacon\` or /beacon-init to re-add it`);let J=f(),V=J.find((z)=>z.id===Y),q={id:Y,path:Q,name:Z||V?.name||F0(Q),lastOpenedAt:$},X=[q,...J.filter((z)=>z.id!==Y)];return w(QQ(Y),{recursive:!0}),DQ(X),q}function t1(Q,Z){return R0(e(Q)),BZ(Q,Z)}function s1(Q,Z=new Date().toISOString()){let $=f(),Y=$.find((J)=>J.id===Q);if(!Y)return;Y.lastOpenedAt=Z,DQ($)}function r1(Q){if(DQ(f().filter((Z)=>Z.id!==Q)),AQ()===Q)w0(HZ()[0]?.id??null)}function jZ(){return K(j(),"active")}function AQ(){try{return RQ(jZ(),"utf8").trim()||null}catch{return null}}function w0(Q){w(j(),{recursive:!0}),gQ(jZ(),Q??"")}function o1(){let Q=AQ();return Q?P(Q):null}function i1(){let Q=A0()??AQ();return Q?P(Q):null}function e1(Q){return P(Q)?.path??null}function Q2(){return VZ(wQ())}var GZ="beacon_ws";function xZ(Q,Z){let $=Q.headers.get("cookie");if(!$)return null;for(let Y of $.split(";")){let J=Y.indexOf("=");if(J===-1)continue;if(Y.slice(0,J).trim()===Z)return decodeURIComponent(Y.slice(J+1).trim())}return null}function Z2(Q){let Z=Q.headers.get("x-beacon-workspace");if(Z&&P(Z))return Z;let $=xZ(Q,GZ);if($&&P($))return $;return f0()}function f0(){let Q=HZ();return Q.length===1?Q[0].id:null}var D0="x-beacon-workspace-path";async function $2(Q){let Z=Q.headers.get("x-beacon-workspace");if(Z&&P(Z))return Z;let $=Q.headers.get(D0);if($&&qZ($)&&!WZ(e($))&&(!Z||e($)===Z)){let J=BZ($);return await I0(J.id),J.id}let Y=xZ(Q,GZ);if(Y&&P(Y))return Y;return null}var KZ=new C0;function Y2(Q,Z){return Q?KZ.run(Q,Z):Z()}function A0(){return KZ.getStore()??null}var uQ=new Set;function J2(Q){uQ.delete(K(QQ(Q),"db.sqlite"))}async function I0(Q){let Z=QQ(Q),$=K(Z,"db.sqlite"),Y=VZ($);if(Y&&uQ.has($))return{ok:!0,created:!1,migrated:!1};try{w(Z,{recursive:!0});let{provisionDb:J}=await YZ().then(() => $Z),V=await J(g0(Q));return uQ.add($),{ok:!0,created:!Y,migrated:Y&&V.migrated}}catch(J){return{ok:!1,created:!1,migrated:!1,error:J instanceof Error?J.message:String(J)}}}import{connect as E0}from"net";var q2=4319;function b0(Q,Z,$=400){return new Promise((Y)=>{let J=E0({host:Q,port:Z}),V=!1,q=(X)=>{if(V)return;V=!0,J.destroy(),Y(X)};J.once("connect",()=>q(!0)),J.once("error",()=>q(!1)),J.setTimeout($,()=>q(!1))})}async function O0(Q){for(let Z of["127.0.0.1","::1"])if(await b0(Z,Q))return!1;return!0}async function PZ(Q,Z=20){for(let $=Q;$<Q+Z;$++)if(await O0($))return $;return Q}import{execSync as p0,spawn as c0}from"child_process";import{mkdirSync as l0,openSync as d0,readFileSync as n0,writeFileSync as a0}from"fs";import{homedir as t0}from"os";import{dirname as s0,join as $Q}from"path";import{fileURLToPath as r0}from"url";import{createHash as o0}from"crypto";VQ();import{mkdirSync as L0,readFileSync as k0,writeFileSync as _0}from"fs";import{join as S0}from"path";var y0=["default","acceptEdits","bypassPermissions","auto"];function NZ(Q){return typeof Q==="string"&&y0.includes(Q)}function vZ(Q,Z){let $={behavior:"allow"};if(Q)$.updatedPermissions=[{type:"setMode",mode:Q,destination:"session"}];let Y={hookEventName:"PermissionRequest",decision:$};if(Z?.trim())Y.additionalContext=Z;return{hookSpecificOutput:Y}}function CZ(){return S0(j(),"preferences.json")}function IQ(){try{let Q=JSON.parse(k0(CZ(),"utf8"));return{planApprovalMode:NZ(Q.planApprovalMode)?Q.planApprovalMode:void 0,planApprovalModeConfigured:Q.planApprovalModeConfigured===!0,telemetryUuid:typeof Q.telemetryUuid==="string"?Q.telemetryUuid:void 0,telemetryEnabled:Q.telemetryEnabled===!1?!1:Q.telemetryEnabled===!0?!0:void 0}}catch{return{}}}function G2(Q){let Z={...IQ(),...Q};return L0(j(),{recursive:!0}),_0(CZ(),JSON.stringify(Z,null,2)),Z}function MZ(Q){if(!Q?.length)return"";let Z=Q.map((Y)=>Y.id?` \u2022 ${Y.title} \u2014 id: ${Y.id}`:` \u2022 ${Y.title}`),$=Q.some((Y)=>Y.id);return`
|
|
250
257
|
|
|
251
258
|
This plan created these roadmap feature(s):
|
|
252
259
|
`+Z.join(`
|
|
253
|
-
`)+"\n\nWhen the work ships, register them in ONE call: `beacon_describe_feature` with a "+"`features` array \u2014 one entry per feature"+($?", each keyed by the `id` above (no title-matching needed)":"")+", each with the files you touched + a short markdown summary. Do them all in that single "+"batched call so every feature flips to Done \u2014 do NOT register only the umbrella, and do "+"NOT make one call per feature."}import{execSync as
|
|
254
|
-
`,1)[0]?.replace(/^#+\s*/,"").slice(0,160)||"Plan review",X=await fetch(`${Y}/api/plan`,{method:"POST",headers:{"content-type":"application/json","x-beacon-workspace":V},body:JSON.stringify({description:q,markdown:Z})});if(X.status===422){let
|
|
260
|
+
`)+"\n\nWhen the work ships, register them in ONE call: `beacon_describe_feature` with a "+"`features` array \u2014 one entry per feature"+($?", each keyed by the `id` above (no title-matching needed)":"")+", each with the files you touched + a short markdown summary. Do them all in that single "+"batched call so every feature flips to Done \u2014 do NOT register only the umbrella, and do "+"NOT make one call per feature."}import{execSync as h0}from"child_process";import{platform as TZ}from"os";function m0(Q){if(process.env.BEACON_NO_OPEN)return;let Z=TZ()==="darwin"?"open":TZ()==="win32"?"start":"xdg-open";try{h0(`${Z} "${Q}"`,{stdio:"ignore"})}catch{}}async function FZ(Q,Z){if(await fetch(`${Q}/api/plan/presence`,{headers:{"x-beacon-workspace":Z}}).then((J)=>J.json()).then((J)=>!!J?.live).catch(()=>!1))return;let Y=encodeURIComponent(`/plan?ws=${Z}`);m0(`${Q}/api/workspace/activate?id=${Z}&redirect=${Y}`)}var i0=$Q(s0(r0(import.meta.url)),".."),bQ=process.env.BEACON_HOME||$Q(t0(),".beacon"),uZ=$Q(bQ,"server.json"),e0=process.env.PORT||"4319";function Q1(Q){try{return process.kill(Q,0),!0}catch{return!1}}function Z1(Q){try{return JSON.parse(n0(Q,"utf8"))}catch{return null}}async function RZ(Q){try{return(await fetch(Q)).ok}catch{return!1}}async function $1(Q,Z=60){for(let $=0;$<Z;$++){if(await RZ(Q))return!0;await new Promise((Y)=>setTimeout(Y,500))}return!1}function Y1(Q){l0(bQ,{recursive:!0});let Z=d0($Q(bQ,"server.log"),"a"),$={...process.env,PORT:Q,BEACON_NO_OPEN:"1"};delete $.BEACON_REPO,delete $.BEACON_DATA_DIR,delete $.DATABASE_URL;let Y=c0("bun",["run","dev"],{cwd:i0,env:$,detached:!0,stdio:["ignore",Z,Z]});Y.unref();let J={pid:Y.pid??0,port:Q};return a0(uZ,JSON.stringify(J)),J}async function J1(){let Q=Z1(uZ);if(Q&&Q1(Q.pid)&&await RZ(`http://localhost:${Q.port}/api/workspace`))return Q.port;let Z=String(await PZ(Number(e0))),{port:$}=Y1(Z);return await $1(`http://localhost:${$}/api/workspace`),$}function V1(){try{return p0("git rev-parse --show-toplevel",{cwd:process.cwd(),stdio:["ignore","pipe","ignore"]}).toString().trim()}catch{return""}}function z1(Q){return o0("sha256").update(Q).digest("hex").slice(0,12)}async function q1(){if(process.stdin.isTTY)return null;let Q=[];for await(let $ of process.stdin)Q.push($);let Z=Buffer.concat(Q).toString("utf8").trim();if(!Z)return null;try{return JSON.parse(Z)}catch{return null}}function EQ(Q,Z){return vZ(Q,Z)}function ZQ(Q){return{hookSpecificOutput:{hookEventName:"PermissionRequest",decision:{behavior:"deny",message:Q}}}}function N(Q){process.stdout.write(JSON.stringify(Q)),process.exit(0)}(async()=>{await QZ();let Z=(await q1())?.tool_input?.plan;if(!Z||!Z.trim())N(EQ());let Y=`http://localhost:${await J1()}`,J=V1()||process.cwd(),V=z1(J);await fetch(`${Y}/api/workspace/activate?id=${V}`).catch(()=>{});let q=Z.split(`
|
|
261
|
+
`,1)[0]?.replace(/^#+\s*/,"").slice(0,160)||"Plan review",X=await fetch(`${Y}/api/plan`,{method:"POST",headers:{"content-type":"application/json","x-beacon-workspace":V},body:JSON.stringify({description:q,markdown:Z})});if(X.status===422){let H=await X.json().catch(()=>({}));N(ZQ(H.error??"Beacon rejected the plan: every roadmap feature needs a category and a priority. Add them and re-present."))}if(!X.ok)N(EQ());await FZ(Y,V);let z=Date.now()+yQ,W=(H)=>new Promise((YQ)=>setTimeout(YQ,H));while(Date.now()<z){await W(OQ);let H=await fetch(`${Y}/api/plan/verdict`,{headers:{"x-beacon-workspace":V}}).then((YQ)=>YQ.json()).catch(()=>null);if(!H)continue;if(H.kind==="approved")N(EQ(IQ().planApprovalMode,MZ(H.features)));if(H.kind==="discarded")N(ZQ("The user discarded the plan in Beacon. Ask what they want to adjust before re-presenting."));if(H.kind==="feedback")N(ZQ(`The user left feedback on the plan in Beacon (inline comments and/or edits on the /map and /db boards). Revise the plan based on the feedback below, then re-present (call ExitPlanMode again):
|
|
255
262
|
|
|
256
|
-
`+
|
|
263
|
+
`+H.feedback))}N(ZQ("\u23F3 Still awaiting your review in Beacon \u2014 the plan is open on /plan and nothing was lost. "+"Claude Code caps a single plan-review hook at ~10 minutes, so to keep waiting you MUST call ExitPlanMode again now with the SAME plan. Re-presenting resumes the same review (your in-progress annotations and any decision are preserved). Do NOT implement, and do "+"NOT ask in the terminal \u2014 just re-present."))})();
|