trybeacon 0.1.16 → 0.1.18
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 +9 -9
- package/.next/build-manifest.json +3 -3
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +3 -3
- package/.next/required-server-files.js +4 -4
- package/.next/required-server-files.json +4 -4
- package/.next/server/app/_global-error/page.js +3 -3
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +2 -2
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +9 -9
- package/.next/server/app/_not-found.segments/_full.segment.rsc +9 -9
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +9 -9
- 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 +1 -1
- package/.next/server/app/api/board-annotations/[id]/route.js +1 -1
- package/.next/server/app/api/board-annotations/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/board-annotations/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/board-annotations/route.js +1 -1
- package/.next/server/app/api/board-annotations/route.js.nft.json +1 -1
- package/.next/server/app/api/board-annotations/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/bug-flags/[id]/route.js +1 -1
- package/.next/server/app/api/bug-flags/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/bug-flags/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/bug-flags/route.js +1 -1
- package/.next/server/app/api/bug-flags/route.js.nft.json +1 -1
- package/.next/server/app/api/bug-flags/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/code-graph/position/route.js +1 -1
- package/.next/server/app/api/code-graph/position/route.js.nft.json +1 -1
- package/.next/server/app/api/code-graph/position/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/code-graph/route.js +1 -1
- package/.next/server/app/api/code-graph/route.js.nft.json +1 -1
- package/.next/server/app/api/code-graph/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/context/feature/route.js +1 -1
- package/.next/server/app/api/context/feature/route.js.nft.json +1 -1
- package/.next/server/app/api/context/feature/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/context/file/route.js +1 -1
- package/.next/server/app/api/context/file/route.js.nft.json +1 -1
- package/.next/server/app/api/context/file/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/context/route.js +1 -1
- package/.next/server/app/api/context/route.js.nft.json +1 -1
- package/.next/server/app/api/context/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/db/arrange/route.js +1 -1
- package/.next/server/app/api/db/arrange/route.js.nft.json +1 -1
- package/.next/server/app/api/db/arrange/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/db/backfill-access/route.js +1 -1
- package/.next/server/app/api/db/backfill-access/route.js.nft.json +1 -1
- package/.next/server/app/api/db/backfill-access/route_client-reference-manifest.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/position/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/db/reconcile-endpoints/route.js +1 -1
- package/.next/server/app/api/db/reconcile-endpoints/route.js.nft.json +1 -1
- package/.next/server/app/api/db/reconcile-endpoints/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/db/relations/[id]/route.js +1 -1
- package/.next/server/app/api/db/relations/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/db/relations/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/db/tables/[id]/route.js +1 -1
- package/.next/server/app/api/db/tables/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/db/tables/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/draft/approve/route.js +2 -2
- package/.next/server/app/api/draft/approve/route.js.nft.json +1 -1
- package/.next/server/app/api/draft/approve/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/draft/route.js +2 -2
- package/.next/server/app/api/draft/route.js.nft.json +1 -1
- package/.next/server/app/api/draft/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/draft/status/route.js +1 -1
- package/.next/server/app/api/draft/status/route.js.nft.json +1 -1
- package/.next/server/app/api/draft/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/edges/[id]/route.js +1 -1
- package/.next/server/app/api/edges/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/edges/[id]/route_client-reference-manifest.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/edges/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/endpoints/[id]/route.js +1 -1
- package/.next/server/app/api/endpoints/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/endpoints/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/entities/route.js +1 -1
- package/.next/server/app/api/entities/route.js.nft.json +1 -1
- package/.next/server/app/api/entities/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/feedback/[id]/route.js +1 -1
- package/.next/server/app/api/feedback/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/feedback/[id]/vote/route.js +1 -1
- package/.next/server/app/api/feedback/[id]/vote/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/feedback/route.js +1 -1
- package/.next/server/app/api/feedback/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/ingest/route.js +2 -2
- package/.next/server/app/api/ingest/route.js.nft.json +1 -1
- package/.next/server/app/api/ingest/route_client-reference-manifest.js +1 -1
- 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/init/route_client-reference-manifest.js +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/describe/route_client-reference-manifest.js +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/files/route_client-reference-manifest.js +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/finish/route_client-reference-manifest.js +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/route_client-reference-manifest.js +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/start/route_client-reference-manifest.js +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/map/touch-active/route_client-reference-manifest.js +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]/position/route_client-reference-manifest.js +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/[id]/route_client-reference-manifest.js +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/positions/route_client-reference-manifest.js +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/route_client-reference-manifest.js +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/nodes/subtasks/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/notes/[id]/route.js +1 -1
- package/.next/server/app/api/notes/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/notes/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/notes/route.js +1 -1
- package/.next/server/app/api/notes/route.js.nft.json +1 -1
- package/.next/server/app/api/notes/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/open/route.js +1 -1
- package/.next/server/app/api/open/route.js.nft.json +1 -1
- package/.next/server/app/api/open/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/plan/annotations/route.js +2 -2
- package/.next/server/app/api/plan/annotations/route.js.nft.json +1 -1
- package/.next/server/app/api/plan/annotations/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/plan/approve/route.js +1 -1
- package/.next/server/app/api/plan/approve/route.js.nft.json +1 -1
- package/.next/server/app/api/plan/approve/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/plan/history/route.js +1 -1
- package/.next/server/app/api/plan/history/route.js.nft.json +1 -1
- package/.next/server/app/api/plan/history/route_client-reference-manifest.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/markdown/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/plan/presence/route.js +1 -1
- package/.next/server/app/api/plan/presence/route.js.nft.json +1 -1
- package/.next/server/app/api/plan/presence/route_client-reference-manifest.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/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/plan/verdict/route.js +2 -2
- package/.next/server/app/api/plan/verdict/route.js.nft.json +1 -1
- package/.next/server/app/api/plan/verdict/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/preferences/route.js +1 -1
- package/.next/server/app/api/preferences/route.js.nft.json +1 -1
- package/.next/server/app/api/preferences/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/reset/route.js +1 -1
- package/.next/server/app/api/reset/route.js.nft.json +1 -1
- package/.next/server/app/api/reset/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/stream/route.js +2 -2
- package/.next/server/app/api/stream/route.js.nft.json +1 -1
- package/.next/server/app/api/stream/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/version/route.js +1 -1
- package/.next/server/app/api/version/route.js.nft.json +1 -1
- package/.next/server/app/api/version/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/workspace/activate/route.js +1 -1
- package/.next/server/app/api/workspace/activate/route.js.nft.json +1 -1
- package/.next/server/app/api/workspace/activate/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/workspace/route.js +1 -1
- package/.next/server/app/api/workspace/route.js.nft.json +1 -1
- package/.next/server/app/api/workspace/route_client-reference-manifest.js +1 -1
- package/.next/server/app/apple-icon.png/route.js +1 -1
- package/.next/server/app/docs/page.js +2 -2
- package/.next/server/app/docs/page.js.nft.json +1 -1
- package/.next/server/app/docs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/docs.html +1 -1
- package/.next/server/app/docs.rsc +10 -10
- package/.next/server/app/docs.segments/_full.segment.rsc +10 -10
- package/.next/server/app/docs.segments/_head.segment.rsc +1 -1
- package/.next/server/app/docs.segments/_index.segment.rsc +9 -9
- package/.next/server/app/docs.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +2 -2
- 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.js.nft.json +1 -1
- 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 +10 -10
- package/.next/server/app/feedback.segments/_full.segment.rsc +10 -10
- package/.next/server/app/feedback.segments/_head.segment.rsc +1 -1
- package/.next/server/app/feedback.segments/_index.segment.rsc +9 -9
- package/.next/server/app/feedback.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/feedback.segments/feedback/__PAGE__.segment.rsc +2 -2
- 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 +28 -29
- package/.next/server/app/help.segments/_full.segment.rsc +28 -29
- package/.next/server/app/help.segments/_head.segment.rsc +1 -1
- package/.next/server/app/help.segments/_index.segment.rsc +9 -9
- package/.next/server/app/help.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/help.segments/help/__PAGE__.segment.rsc +3 -3
- 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 +10 -10
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +10 -10
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +9 -9
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/map/page.js +2 -2
- package/.next/server/app/map/page.js.nft.json +1 -1
- package/.next/server/app/map/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js +2 -2
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/plan/page.js +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 +9 -9
- package/.next/server/chunks/2981.js +1 -1
- package/.next/server/chunks/3015.js +1 -0
- package/.next/server/chunks/319.js +3 -3
- package/.next/server/chunks/5258.js +1 -1
- package/.next/server/chunks/7604.js +1 -0
- package/.next/server/chunks/9127.js +1 -1
- package/.next/server/instrumentation.js +1 -1
- package/.next/server/instrumentation.js.nft.json +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware.js +2 -2
- package/.next/server/next-font-manifest.js +1 -1
- package/.next/server/next-font-manifest.json +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/9185-2dc95ca34d3ed35e.js +1 -0
- package/.next/static/chunks/app/_not-found/page-57c7dfeb659fcab6.js +1 -0
- package/.next/static/chunks/app/docs/page-5b14c5cfd82e6427.js +1 -0
- package/.next/static/chunks/app/feedback/{page-24a5b2f8d24d9024.js → page-9c313281ba613e34.js} +1 -1
- package/.next/static/chunks/app/help/page-d720609312abff8b.js +1 -0
- package/.next/static/chunks/app/layout-78fefdd943b8c8f9.js +1 -0
- package/.next/static/chunks/app/map/{page-5020db02dba43678.js → page-8a50ebc7430720f9.js} +1 -1
- package/.next/static/chunks/app/{page-2c4582b256e877c0.js → page-bb6bef10a857544d.js} +1 -1
- package/.next/static/chunks/app/plan/{page-cd3785902dd95dce.js → page-8c84c74359ee2ea0.js} +1 -1
- package/.next/static/chunks/app/settings/page-d1b0fe0c79c8a745.js +1 -0
- package/.next/static/chunks/main-app-1a32dc335629e4e4.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/global-error-df87398e192c5e45.js +1 -0
- package/.next/trace +37 -37
- package/.next/trace-build +1 -1
- package/.next/types/app/api/board-annotations/[id]/route.ts +1 -1
- package/.next/types/app/api/board-annotations/route.ts +1 -1
- package/.next/types/app/api/bug-flags/[id]/route.ts +1 -1
- package/.next/types/app/api/bug-flags/route.ts +1 -1
- package/.next/types/app/api/code-graph/position/route.ts +1 -1
- package/.next/types/app/api/code-graph/route.ts +1 -1
- package/.next/types/app/api/context/feature/route.ts +1 -1
- package/.next/types/app/api/context/file/route.ts +1 -1
- package/.next/types/app/api/context/route.ts +1 -1
- package/.next/types/app/api/db/arrange/route.ts +1 -1
- package/.next/types/app/api/db/backfill-access/route.ts +1 -1
- package/.next/types/app/api/db/position/route.ts +1 -1
- package/.next/types/app/api/db/reconcile-endpoints/route.ts +1 -1
- package/.next/types/app/api/db/relations/[id]/route.ts +1 -1
- package/.next/types/app/api/db/tables/[id]/route.ts +1 -1
- package/.next/types/app/api/draft/approve/route.ts +1 -1
- package/.next/types/app/api/draft/route.ts +1 -1
- package/.next/types/app/api/draft/status/route.ts +1 -1
- package/.next/types/app/api/edges/[id]/route.ts +1 -1
- package/.next/types/app/api/edges/route.ts +1 -1
- package/.next/types/app/api/endpoints/[id]/route.ts +1 -1
- package/.next/types/app/api/entities/route.ts +1 -1
- package/.next/types/app/api/feedback/[id]/route.ts +1 -1
- package/.next/types/app/api/feedback/[id]/vote/route.ts +1 -1
- package/.next/types/app/api/feedback/route.ts +1 -1
- package/.next/types/app/api/ingest/route.ts +1 -1
- package/.next/types/app/api/init/route.ts +1 -1
- package/.next/types/app/api/map/describe/route.ts +1 -1
- package/.next/types/app/api/map/files/route.ts +1 -1
- package/.next/types/app/api/map/finish/route.ts +1 -1
- package/.next/types/app/api/map/route.ts +1 -1
- package/.next/types/app/api/map/start/route.ts +1 -1
- package/.next/types/app/api/map/touch-active/route.ts +1 -1
- package/.next/types/app/api/nodes/[id]/position/route.ts +1 -1
- package/.next/types/app/api/nodes/[id]/route.ts +1 -1
- package/.next/types/app/api/nodes/positions/route.ts +1 -1
- package/.next/types/app/api/nodes/route.ts +1 -1
- package/.next/types/app/api/nodes/subtasks/route.ts +1 -1
- package/.next/types/app/api/notes/[id]/route.ts +1 -1
- package/.next/types/app/api/notes/route.ts +1 -1
- package/.next/types/app/api/open/route.ts +1 -1
- package/.next/types/app/api/plan/annotations/route.ts +1 -1
- package/.next/types/app/api/plan/approve/route.ts +1 -1
- package/.next/types/app/api/plan/history/route.ts +1 -1
- package/.next/types/app/api/plan/markdown/route.ts +1 -1
- package/.next/types/app/api/plan/presence/route.ts +1 -1
- package/.next/types/app/api/plan/verdict/route.ts +1 -1
- package/.next/types/app/api/preferences/route.ts +1 -1
- package/.next/types/app/api/reset/route.ts +1 -1
- package/.next/types/app/api/stream/route.ts +1 -1
- package/.next/types/app/api/version/route.ts +1 -1
- package/.next/types/app/api/workspace/activate/route.ts +1 -1
- package/.next/types/app/api/workspace/route.ts +1 -1
- package/.next/types/app/docs/page.ts +1 -1
- package/.next/types/app/feedback/page.ts +1 -1
- package/.next/types/app/help/page.ts +1 -1
- package/.next/types/app/map/page.ts +1 -1
- package/.next/types/app/page.ts +1 -1
- package/.next/types/app/plan/page.ts +1 -1
- package/.next/types/app/settings/page.ts +1 -1
- package/dist/bin/doctor.js +16 -16
- package/dist/bin/hook.js +16 -16
- package/dist/bin/mcp.js +16 -16
- package/dist/bin/plan.js +16 -16
- package/dist/bin/uninstall.js +17 -17
- package/dist/lib/{global-install.js → codex-install.js} +15 -15
- package/package.json +1 -1
- package/.next/server/chunks/1263.js +0 -1
- package/.next/server/chunks/333.js +0 -1
- package/.next/static/chunks/6666-31528aed4743588c.js +0 -1
- package/.next/static/chunks/app/_not-found/page-b2c1eefe2cdbb8c3.js +0 -1
- package/.next/static/chunks/app/docs/page-c28a9d071c9f4e9a.js +0 -1
- package/.next/static/chunks/app/help/page-7ece210a72cf4a67.js +0 -1
- package/.next/static/chunks/app/layout-d4b764b7fd4ec5c6.js +0 -1
- package/.next/static/chunks/app/settings/page-36505744af5d38d8.js +0 -1
- package/.next/static/chunks/main-app-cb1a040ffaced80b.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/global-error-c82bd7a72a198de4.js +0 -1
- /package/.next/static/{fnj-duECSYw_AlTFP7r7a → zLC93esTvoKLzicL2UsF6}/_buildManifest.js +0 -0
- /package/.next/static/{fnj-duECSYw_AlTFP7r7a → zLC93esTvoKLzicL2UsF6}/_ssgManifest.js +0 -0
package/dist/bin/plan.js
CHANGED
|
@@ -206,20 +206,7 @@ ${J}
|
|
|
206
206
|
`)?V:`${V}
|
|
207
207
|
`)}function w(Q,Z){try{return E(Q,"utf8").includes(Z)}catch{return!1}}function h(Q,Z,$){let Y="";try{Y=E(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,`
|
|
208
208
|
|
|
209
|
-
`).trimStart();return O(Q,V),!0}function S(Q,Z,$){let Y=D(Q,Z);zQ(Y,{recursive:!0});let J=D(Y,"SKILL.md");return O(J,$),J}function g(Q,Z){return IQ(D(Q,Z,"SKILL.md"))}function m(Q,Z){let $=D(Q,Z);if(!IQ($))return!1;return fZ($,{recursive:!0,force:!0}),!0}var XQ=()=>{};import{mkdirSync as bZ,renameSync as IZ,rmSync as AZ,writeFileSync as DZ}from"fs";import{dirname as EZ}from"path";function WQ(Q,Z){bZ(EZ(Q),{recursive:!0});let $=`${Q}.tmp`;try{DZ($,Z),IZ($,Q)}catch(Y){throw AZ($,{force:!0}),Y}}var EQ=()=>{};
|
|
210
|
-
`)?`
|
|
211
|
-
`:`
|
|
212
|
-
|
|
213
|
-
`,Y=Q+$+yZ;if(u(Y)?.mcp_servers?.beacon?.command!=="beacon")return{added:!1,error:`could not safely append [mcp_servers.beacon] \u2014 ${F}`};return WQ(C(),Y),{added:!0}}function SQ(){let Q="";try{Q=l(C(),"utf8")}catch{return{removed:!1}}let Z=Q.split(`
|
|
214
|
-
`),$=Z.indexOf(LQ);if($===-1)return{removed:!1,skipped:PQ()};let Y=Z.indexOf(_Q,$);if(Y===-1)return{removed:!1,skipped:!0};Z.splice($,Y-$+1);let J=Z.join(`
|
|
215
|
-
`).replace(/\n{3,}/g,`
|
|
216
|
-
|
|
217
|
-
`).replace(/^\n+/,"");if(u(J)===null)return{removed:!1,skipped:!0};return WQ(C(),J),{removed:!0}}async function LZ(){let{INIT_SKILL:Q,REFRESH_SKILL:Z,PLAN_SKILL:$}=await Promise.resolve().then(() => (VQ(),JQ)),Y={"beacon-init":Q,"beacon-refresh":Z,"beacon-plan":$},J=[];for(let z of j){if(!g(c(),z))J.push(z);S(c(),z,Y[z])}let V=0;for(let z of a)if(y(HQ(),{event:z.event,matcher:z.matcher,command:z.command}))V++;let X=w(p(),d);_(p(),d,yQ,jQ);let q=hQ();return{skillsAdded:J,hooksAdded:V,agentsMdBlockTouched:!X,mcp:q}}function _Z(){let Q={};for(let $ of j)Q[$]=g(c(),$);let Z={};for(let $ of a)Z[$.event]=k(HQ(),{event:$.event,command:$.command});return{detected:kQ(),skills:Q,hooks:Z,agentsMdBlock:w(p(),d),mcp:PQ()}}function hZ(){let Q=[];for(let J of j)if(m(c(),J))Q.push(J);let Z=0;for(let J of a)if(L(HQ(),{event:J.event,command:J.command}))Z++;let $=h(p(),d,yQ),Y=SQ();return{skillsRemoved:Q,hooksRemoved:Z,agentsMdBlockRemoved:$,mcpRemoved:Y.removed,mcpSkipped:Y.skipped}}var BQ=()=>R(OQ(),".codex"),HQ=()=>R(BQ(),"hooks.json"),C=()=>R(BQ(),"config.toml"),p=()=>R(BQ(),"AGENTS.md"),c=()=>R(OQ(),".agents","skills"),d="<!-- beacon:global:start -->",yQ="<!-- beacon:global:end -->",a,UQ,LQ="# beacon:start (managed by Beacon \u2014 `beacon uninstall` removes this block)",_Q="# beacon:end",yZ,F="add it manually: codex mcp add beacon -- beacon mcp";var pQ=N(()=>{XQ();EQ();GQ();a=[{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."}];yZ=`${LQ}
|
|
218
|
-
[mcp_servers.beacon]
|
|
219
|
-
command = "beacon"
|
|
220
|
-
args = ["mcp"]
|
|
221
|
-
${_Q}
|
|
222
|
-
`});import{existsSync as SZ}from"fs";import{homedir as mZ}from"os";import{join as n}from"path";function pZ(){return process.env.HOME||process.env.USERPROFILE||mZ()}function cZ(Q,Z){return S(xQ(),Q,Z)}function dQ(Q){return g(xQ(),Q)}function dZ(Q){return m(xQ(),Q)}function lZ(Q){return y(KQ(),Q)}function aZ(Q){return k(KQ(),Q)}function nZ(Q){return L(KQ(),Q)}function tZ(Q){_(NQ(),vQ,cQ,Q)}function lQ(){return w(NQ(),vQ)}function sZ(){return h(NQ(),vQ,cQ)}function W1(){let Q={};for(let $ of j)Q[$]=dQ($);let Z={};for(let $ of CQ)Z[$.event]=aZ({event:$.event,command:$.command});return{homeExists:SZ(t()),skills:Q,hooks:Z,claudeMdBlock:lQ()}}async function rZ(){let{INIT_SKILL:Q,REFRESH_SKILL:Z,PLAN_SKILL:$}=await Promise.resolve().then(() => (VQ(),JQ)),Y={"beacon-init":Q,"beacon-refresh":Z,"beacon-plan":$},J=[];for(let q of j){if(!dQ(q))J.push(q);cZ(q,Y[q])}let V=0;for(let q of CQ)if(lZ({event:q.event,matcher:q.matcher,command:q.command}))V++;let X=lQ();return tZ(jQ),{skillsAdded:J,hooksAdded:V,claudeMdBlockTouched:!X}}async function aQ(){let Q;try{Q={ok:!0,...await rZ()}}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(() => (pQ(),mQ));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 U1(){let Q=[];for(let Y of j)if(dZ(Y))Q.push(Y);let Z=0;for(let Y of CQ)if(nZ(Y))Z++;let $=sZ();return{skillsRemoved:Q,hooksRemoved:Z,claudeMdBlockRemoved:$}}var t=()=>n(pZ(),".claude"),xQ=()=>n(t(),"skills"),KQ=()=>n(t(),"settings.json"),NQ=()=>n(t(),"CLAUDE.md"),vQ="<!-- beacon:global:start -->",cQ="<!-- beacon:global:end -->",j,CQ,jQ=`## Beacon (visual planning panel)
|
|
209
|
+
`).trimStart();return O(Q,V),!0}function S(Q,Z,$){let Y=D(Q,Z);zQ(Y,{recursive:!0});let J=D(Y,"SKILL.md");return O(J,$),J}function g(Q,Z){return IQ(D(Q,Z,"SKILL.md"))}function m(Q,Z){let $=D(Q,Z);if(!IQ($))return!1;return fZ($,{recursive:!0,force:!0}),!0}var XQ=()=>{};import{mkdirSync as bZ,renameSync as IZ,rmSync as AZ,writeFileSync as DZ}from"fs";import{dirname as EZ}from"path";function WQ(Q,Z){bZ(EZ(Q),{recursive:!0});let $=`${Q}.tmp`;try{DZ($,Z),IZ($,Q)}catch(Y){throw AZ($,{force:!0}),Y}}var EQ=()=>{};import{existsSync as OZ}from"fs";import{homedir as yZ}from"os";import{join as p}from"path";function kZ(){return process.env.HOME||process.env.USERPROFILE||yZ()}function LZ(Q,Z){return S(UQ(),Q,Z)}function LQ(Q){return g(UQ(),Q)}function _Z(Q){return m(UQ(),Q)}function hZ(Q){return y(BQ(),Q)}function SZ(Q){return k(BQ(),Q)}function mZ(Q){return L(BQ(),Q)}function pZ(Q){_(HQ(),PQ,kQ,Q)}function _Q(){return w(HQ(),PQ)}function cZ(){return h(HQ(),PQ,kQ)}function Y1(){let Q={};for(let $ of j)Q[$]=LQ($);let Z={};for(let $ of jQ)Z[$.event]=SZ({event:$.event,command:$.command});return{homeExists:OZ(c()),skills:Q,hooks:Z,claudeMdBlock:_Q()}}async function dZ(){let{INIT_SKILL:Q,REFRESH_SKILL:Z,PLAN_SKILL:$}=await Promise.resolve().then(() => (VQ(),JQ)),Y={"beacon-init":Q,"beacon-refresh":Z,"beacon-plan":$},J=[];for(let q of j){if(!LQ(q))J.push(q);LZ(q,Y[q])}let V=0;for(let q of jQ)if(hZ({event:q.event,matcher:q.matcher,command:q.command}))V++;let X=_Q();return pZ(GQ),{skillsAdded:J,hooksAdded:V,claudeMdBlockTouched:!X}}async function hQ(){let Q;try{Q={ok:!0,...await dZ()}}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(() => (yQ(),OQ));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 J1(){let Q=[];for(let Y of j)if(_Z(Y))Q.push(Y);let Z=0;for(let Y of jQ)if(mZ(Y))Z++;let $=cZ();return{skillsRemoved:Q,hooksRemoved:Z,claudeMdBlockRemoved:$}}var c=()=>p(kZ(),".claude"),UQ=()=>p(c(),"skills"),BQ=()=>p(c(),"settings.json"),HQ=()=>p(c(),"CLAUDE.md"),PQ="<!-- beacon:global:start -->",kQ="<!-- beacon:global:end -->",j,jQ,GQ=`## Beacon (visual planning panel)
|
|
223
210
|
|
|
224
211
|
This machine has Beacon installed \u2014 a local visual planning surface for the terminal-side
|
|
225
212
|
agent. Beacon proposes feature plans (roadmap features + DB schema + endpoints) via MCP,
|
|
@@ -240,11 +227,24 @@ the user reviews on a canvas at /plan, and feedback flows back as the next round
|
|
|
240
227
|
Feedback bundles inline annotations on the markdown PLUS any edits the user made directly
|
|
241
228
|
on the /map and /db boards (added features, attached subtasks, edited columns, new
|
|
242
229
|
endpoints). Treat board edits as the user's revision intent \u2014 re-propose matching them
|
|
243
|
-
verbatim. Do NOT implement until the tool returns approval.`;var
|
|
230
|
+
verbatim. Do NOT implement until the tool returns approval.`;var xQ=N(()=>{XQ();j=["beacon-init","beacon-refresh","beacon-plan"],jQ=[{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."}]});var OQ={};QQ(OQ,{setupCodexAssets:()=>tZ,removeCodexMcp:()=>aQ,removeCodexArtifacts:()=>rZ,hasCodexMcp:()=>CQ,ensureCodexMcp:()=>lQ,codexMcpProblem:()=>nZ,codexDetected:()=>pQ,auditCodex:()=>sZ,CODEX_HOOKS:()=>t});import{readFileSync as n}from"fs";import{homedir as lZ}from"os";import{join as R}from"path";function SQ(){return process.env.HOME||process.env.USERPROFILE||lZ()}function pQ(){if(process.env.BEACON_CODEX==="1")return!0;if(process.env.BEACON_CODEX==="0")return!1;if(KQ===void 0)KQ=Bun.which("codex")!==null;return KQ}function u(Q){try{return Bun.TOML.parse(Q)}catch{return null}}function CQ(){try{return Boolean(u(n(C(),"utf8"))?.mcp_servers?.beacon)}catch{return!1}}function nZ(){let Q="";try{Q=n(C(),"utf8")}catch{return null}let Z=u(Q);if(!Z)return`~/.codex/config.toml does not parse \u2014 ${F}`;if(Z.mcp_servers?.beacon)return null;if(/^\s*mcp_servers\s*=/m.test(Q))return`mcp_servers is an inline table \u2014 ${F}`;return null}function lQ(){let Q="",Z=!1;try{Q=n(C(),"utf8"),Z=!0}catch{}if(Z){let V=u(Q);if(!V)return{added:!1,error:`~/.codex/config.toml does not parse \u2014 ${F}`};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 ${F}`}}let $=!Q?"":Q.endsWith(`
|
|
231
|
+
`)?`
|
|
232
|
+
`:`
|
|
233
|
+
|
|
234
|
+
`,Y=Q+$+aZ;if(u(Y)?.mcp_servers?.beacon?.command!=="beacon")return{added:!1,error:`could not safely append [mcp_servers.beacon] \u2014 ${F}`};return WQ(C(),Y),{added:!0}}function aQ(){let Q="";try{Q=n(C(),"utf8")}catch{return{removed:!1}}let Z=Q.split(`
|
|
235
|
+
`),$=Z.indexOf(cQ);if($===-1)return{removed:!1,skipped:CQ()};let Y=Z.indexOf(dQ,$);if(Y===-1)return{removed:!1,skipped:!0};Z.splice($,Y-$+1);let J=Z.join(`
|
|
236
|
+
`).replace(/\n{3,}/g,`
|
|
237
|
+
|
|
238
|
+
`).replace(/^\n+/,"");if(u(J)===null)return{removed:!1,skipped:!0};return WQ(C(),J),{removed:!0}}async function tZ(){let{INIT_SKILL:Q,REFRESH_SKILL:Z,PLAN_SKILL:$}=await Promise.resolve().then(() => (VQ(),JQ)),Y={"beacon-init":Q,"beacon-refresh":Z,"beacon-plan":$},J=[];for(let z of j){if(!g(l(),z))J.push(z);S(l(),z,Y[z])}let V=0;for(let z of t)if(y(vQ(),{event:z.event,matcher:z.matcher,command:z.command}))V++;let X=w(d(),a);_(d(),a,mQ,GQ);let q=lQ();return{skillsAdded:J,hooksAdded:V,agentsMdBlockTouched:!X,mcp:q}}function sZ(){let Q={};for(let $ of j)Q[$]=g(l(),$);let Z={};for(let $ of t)Z[$.event]=k(vQ(),{event:$.event,command:$.command});return{detected:pQ(),skills:Q,hooks:Z,agentsMdBlock:w(d(),a),mcp:CQ()}}function rZ(){let Q=[];for(let J of j)if(m(l(),J))Q.push(J);let Z=0;for(let J of t)if(L(vQ(),{event:J.event,command:J.command}))Z++;let $=h(d(),a,mQ),Y=aQ();return{skillsRemoved:Q,hooksRemoved:Z,agentsMdBlockRemoved:$,mcpRemoved:Y.removed,mcpSkipped:Y.skipped}}var NQ=()=>R(SQ(),".codex"),vQ=()=>R(NQ(),"hooks.json"),C=()=>R(NQ(),"config.toml"),d=()=>R(NQ(),"AGENTS.md"),l=()=>R(SQ(),".agents","skills"),a="<!-- beacon:global:start -->",mQ="<!-- beacon:global:end -->",t,KQ,cQ="# beacon:start (managed by Beacon \u2014 `beacon uninstall` removes this block)",dQ="# beacon:end",aZ,F="add it manually: codex mcp add beacon -- beacon mcp";var yQ=N(()=>{XQ();EQ();xQ();t=[{event:"PostToolUse",matcher:"apply_patch",command:"beacon hook",description:"Report file edits to Beacon's active feature so the map stays fresh."},{event:"UserPromptSubmit",matcher:"*",command:"beacon prompt",description:"On feature-y prompts in a Beacon-wired repo, remind the agent to run the context\u2192propose\u2192describe loop (no-op otherwise)."},{event:"Stop",matcher:"*",command:"beacon stop-hook",description:"When the agent ends a turn asking for plan approval in prose, nudge it to present the plan on Beacon's /plan canvas."}];aZ=`${cQ}
|
|
239
|
+
[mcp_servers.beacon]
|
|
240
|
+
command = "beacon"
|
|
241
|
+
args = ["mcp"]
|
|
242
|
+
${dQ}
|
|
243
|
+
`});var tQ={};QQ(tQ,{provisionDb:()=>X0});import{createClient as oZ}from"@libsql/client";import{drizzle as iZ}from"drizzle-orm/libsql";import{migrate as eZ}from"drizzle-orm/libsql/migrator";import{readMigrationFiles as Q0}from"drizzle-orm/migrator";import{dirname as MQ,join as Z0}from"path";import{fileURLToPath as $0}from"url";async function s(Q,Z){return(await Q.execute({sql:"SELECT 1 FROM sqlite_master WHERE type='table' AND name = ?",args:[Z]})).rows.length>0}async function z0(Q,Z){let $=await Q.execute(`PRAGMA table_info("${Z}")`);return new Set($.rows.map((Y)=>String(Y.name)))}async function nQ(Q){if(!await s(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(V0)){if(!await s(Q,Z))continue;let Y=await z0(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 X0(Q,Z=J0){let $=oZ({url:Q});try{await $.execute("PRAGMA journal_mode = WAL;"),await $.execute("PRAGMA foreign_keys = ON;");let Y=await s($,"__drizzle_migrations"),J=await s($,"Node"),V=!1;if(J&&!Y){let q=Q0({migrationsFolder:Z})[0];if(q)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:[q.hash,q.folderMillis]}),V=!0}let X=await nQ($);if(await eZ(iZ($),{migrationsFolder:Z}),await nQ($)>X)V=!0;return await q0($),{migrated:V}}finally{$.close()}}var Y0,J0,V0;var sQ=N(async()=>{Y0=MQ(MQ(MQ($0(import.meta.url)))),J0=process.env.BEACON_MIGRATIONS_DIR||Z0(Y0,"drizzle"),V0={Node:["createdAt","updatedAt"],Note:["createdAt","updatedAt"],DbTable:["createdAt","updatedAt"],Endpoint:["createdAt","updatedAt"],DraftTable:["createdAt"],SyncState:["codeGraphSyncedAt","updatedAt"],AppSetting:["updatedAt"],ProjectMeta:["updatedAt"],CodeFile:["updatedAt"]}});import{AsyncLocalStorage as W0}from"async_hooks";import{spawnSync as U0}from"child_process";import{createHash as B0}from"crypto";import{existsSync as oQ,mkdirSync as r,readFileSync as iQ,writeFileSync as eQ}from"fs";import{homedir as H0}from"os";import{basename as P0,join as M}from"path";function x(){return process.env.BEACON_HOME||M(H0(),".beacon")}function TQ(){return M(x(),"workspaces.json")}function QZ(Q){return B0("sha256").update(Q).digest("hex").slice(0,12)}function g1(Q=process.cwd()){let Z=U0("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 wQ(Q){return M(x(),Q)}function j0(Q){return`file:${M(wQ(Q),"db.sqlite")}`}function f(){try{let Q=JSON.parse(iQ(TQ(),"utf8"));return Array.isArray(Q)?Q:[]}catch{return[]}}function gQ(Q){r(x(),{recursive:!0}),eQ(TQ(),JSON.stringify(Q,null,2))}function G0(){return f().sort((Q,Z)=>Z.lastOpenedAt.localeCompare(Q.lastOpenedAt))}function G(Q){return f().find((Z)=>Z.id===Q)??null}function x0(Q,Z,$=new Date().toISOString()){let Y=QZ(Q),J=f(),V=J.find((z)=>z.id===Y),X={id:Y,path:Q,name:Z||V?.name||P0(Q),lastOpenedAt:$},q=[X,...J.filter((z)=>z.id!==Y)];return r(wQ(Y),{recursive:!0}),gQ(q),X}function F1(Q,Z=new Date().toISOString()){let $=f(),Y=$.find((J)=>J.id===Q);if(!Y)return;Y.lastOpenedAt=Z,gQ($)}function u1(Q){if(gQ(f().filter((Z)=>Z.id!==Q)),FQ()===Q)K0(G0()[0]?.id??null)}function ZZ(){return M(x(),"active")}function FQ(){try{return iQ(ZZ(),"utf8").trim()||null}catch{return null}}function K0(Q){r(x(),{recursive:!0}),eQ(ZZ(),Q??"")}function R1(){let Q=FQ();return Q?G(Q):null}function f1(){let Q=v0()??FQ();return Q?G(Q):null}function b1(Q){return G(Q)?.path??null}function I1(){return oQ(TQ())}var $Z="beacon_ws";function YZ(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 A1(Q){let Z=Q.headers.get("x-beacon-workspace");if(Z&&G(Z))return Z;let $=YZ(Q,$Z);if($&&G($))return $;return null}var N0="x-beacon-workspace-path";async function D1(Q){let Z=Q.headers.get("x-beacon-workspace");if(Z&&G(Z))return Z;let $=Q.headers.get(N0);if($&&(!Z||QZ($)===Z)){let J=x0($);return await C0(J.id),J.id}let Y=YZ(Q,$Z);if(Y&&G(Y))return Y;return null}var JZ=new W0;function E1(Q,Z){return Q?JZ.run(Q,Z):Z()}function v0(){return JZ.getStore()??null}var rQ=new Set;async function C0(Q){let Z=wQ(Q),$=M(Z,"db.sqlite"),Y=oQ($);if(Y&&rQ.has($))return{ok:!0,created:!1,migrated:!1};try{r(Z,{recursive:!0});let{provisionDb:J}=await sQ().then(() => tQ),V=await J(j0(Q));return rQ.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)}}}xQ();import{execSync as PZ,spawn as F0}from"child_process";import{mkdirSync as u0,openSync as R0,readFileSync as f0,writeFileSync as b0}from"fs";import{homedir as I0,platform as BZ}from"os";import{dirname as A0,join as i}from"path";import{fileURLToPath as D0}from"url";import{createHash as E0}from"crypto";var VZ=1500,zZ=345600000,y1=1800000,k1=3000;import{mkdirSync as S1,readFileSync as T0,writeFileSync as m1}from"fs";import{join as w0}from"path";var M0=["default","acceptEdits","bypassPermissions","auto"];function qZ(Q){return typeof Q==="string"&&M0.includes(Q)}function XZ(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 g0(){return w0(x(),"preferences.json")}function WZ(){try{let Q=JSON.parse(T0(g0(),"utf8"));return{planApprovalMode:qZ(Q.planApprovalMode)?Q.planApprovalMode:void 0,planApprovalModeConfigured:Q.planApprovalModeConfigured===!0}}catch{return{}}}function UZ(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`
|
|
244
244
|
|
|
245
245
|
This plan created these roadmap feature(s):
|
|
246
246
|
`+Z.join(`
|
|
247
|
-
`)+"\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."}var O0=i(A0(D0(import.meta.url)),".."),RQ=process.env.BEACON_HOME||i(I0(),".beacon"),jZ=i(RQ,"server.json"),HZ=process.env.PORT||"4319";function y0(Q){try{return process.kill(Q,0),!0}catch{return!1}}function k0(Q){try{return JSON.parse(f0(Q,"utf8"))}catch{return null}}async function GZ(Q){try{return(await fetch(Q)).ok}catch{return!1}}async function L0(Q,Z=60){for(let $=0;$<Z;$++){if(await GZ(Q))return!0;await new Promise((Y)=>setTimeout(Y,500))}return!1}function _0(){u0(RQ,{recursive:!0});let Q=R0(i(RQ,"server.log"),"a"),Z={...process.env,PORT:HZ,BEACON_NO_OPEN:"1"};delete Z.BEACON_REPO,delete Z.BEACON_DATA_DIR,delete Z.DATABASE_URL;let $=F0("bun",["run","dev"],{cwd:O0,env:Z,detached:!0,stdio:["ignore",Q,Q]});$.unref();let Y={pid:$.pid??0,port:HZ};return b0(jZ,JSON.stringify(Y)),Y}async function h0(){let Q=k0(jZ);if(Q&&y0(Q.pid)&&await GZ(`http://localhost:${Q.port}/api/workspace`))return Q.port;let{port:Z}=_0();return await L0(`http://localhost:${Z}/api/workspace`),Z}function S0(Q){if(process.env.BEACON_NO_OPEN)return;let Z=BZ()==="darwin"?"open":BZ()==="win32"?"start":"xdg-open";try{PZ(`${Z} "${Q}"`,{stdio:"ignore"})}catch{}}function m0(){try{return PZ("git rev-parse --show-toplevel",{cwd:process.cwd(),stdio:["ignore","pipe","ignore"]}).toString().trim()}catch{return""}}function p0(Q){return E0("sha256").update(Q).digest("hex").slice(0,12)}async function c0(){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 uQ(Q,Z){return XZ(Q,Z)}function o(Q){return{hookSpecificOutput:{hookEventName:"PermissionRequest",decision:{behavior:"deny",message:Q}}}}function K(Q){process.stdout.write(JSON.stringify(Q)),process.exit(0)}(async()=>{await
|
|
247
|
+
`)+"\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."}var O0=i(A0(D0(import.meta.url)),".."),RQ=process.env.BEACON_HOME||i(I0(),".beacon"),jZ=i(RQ,"server.json"),HZ=process.env.PORT||"4319";function y0(Q){try{return process.kill(Q,0),!0}catch{return!1}}function k0(Q){try{return JSON.parse(f0(Q,"utf8"))}catch{return null}}async function GZ(Q){try{return(await fetch(Q)).ok}catch{return!1}}async function L0(Q,Z=60){for(let $=0;$<Z;$++){if(await GZ(Q))return!0;await new Promise((Y)=>setTimeout(Y,500))}return!1}function _0(){u0(RQ,{recursive:!0});let Q=R0(i(RQ,"server.log"),"a"),Z={...process.env,PORT:HZ,BEACON_NO_OPEN:"1"};delete Z.BEACON_REPO,delete Z.BEACON_DATA_DIR,delete Z.DATABASE_URL;let $=F0("bun",["run","dev"],{cwd:O0,env:Z,detached:!0,stdio:["ignore",Q,Q]});$.unref();let Y={pid:$.pid??0,port:HZ};return b0(jZ,JSON.stringify(Y)),Y}async function h0(){let Q=k0(jZ);if(Q&&y0(Q.pid)&&await GZ(`http://localhost:${Q.port}/api/workspace`))return Q.port;let{port:Z}=_0();return await L0(`http://localhost:${Z}/api/workspace`),Z}function S0(Q){if(process.env.BEACON_NO_OPEN)return;let Z=BZ()==="darwin"?"open":BZ()==="win32"?"start":"xdg-open";try{PZ(`${Z} "${Q}"`,{stdio:"ignore"})}catch{}}function m0(){try{return PZ("git rev-parse --show-toplevel",{cwd:process.cwd(),stdio:["ignore","pipe","ignore"]}).toString().trim()}catch{return""}}function p0(Q){return E0("sha256").update(Q).digest("hex").slice(0,12)}async function c0(){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 uQ(Q,Z){return XZ(Q,Z)}function o(Q){return{hookSpecificOutput:{hookEventName:"PermissionRequest",decision:{behavior:"deny",message:Q}}}}function K(Q){process.stdout.write(JSON.stringify(Q)),process.exit(0)}(async()=>{await hQ();let Z=(await c0())?.tool_input?.plan;if(!Z||!Z.trim())K(uQ());let Y=`http://localhost:${await h0()}`,J=m0()||process.cwd(),V=p0(J);await fetch(`${Y}/api/workspace/activate?id=${V}`).catch(()=>{});let X=Z.split(`
|
|
248
248
|
`,1)[0]?.replace(/^#+\s*/,"").slice(0,160)||"Plan review",q=await fetch(`${Y}/api/plan`,{method:"POST",headers:{"content-type":"application/json","x-beacon-workspace":V},body:JSON.stringify({description:X,markdown:Z})});if(q.status===422){let B=await q.json().catch(()=>({}));K(o(B.error??"Beacon rejected the plan: every roadmap feature needs a category and a priority. Add them and re-present."))}if(!q.ok)K(uQ());if(!await fetch(`${Y}/api/plan/presence`,{headers:{"x-beacon-workspace":V}}).then((B)=>B.json()).then((B)=>!!B?.live).catch(()=>!1)){let B=encodeURIComponent(`/plan?ws=${V}`);S0(`${Y}/api/workspace/activate?id=${V}&redirect=${B}`)}let U=Date.now()+zZ,T=(B)=>new Promise((e)=>setTimeout(e,B));while(Date.now()<U){await T(VZ);let B=await fetch(`${Y}/api/plan/verdict`,{headers:{"x-beacon-workspace":V}}).then((e)=>e.json()).catch(()=>null);if(!B)continue;if(B.kind==="approved")K(uQ(WZ().planApprovalMode,UZ(B.features)));if(B.kind==="discarded")K(o("The user discarded the plan in Beacon. Ask what they want to adjust before re-presenting."));if(B.kind==="feedback")K(o(`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):
|
|
249
249
|
|
|
250
250
|
`+B.feedback))}K(o("Beacon plan review timed out without a verdict. Re-present the plan and ask the user to review it."))})();
|
package/dist/bin/uninstall.js
CHANGED
|
@@ -206,20 +206,7 @@ ${Y}
|
|
|
206
206
|
`)?V:`${V}
|
|
207
207
|
`)}function g(Q,Z){try{return S(Q,"utf8").includes(Z)}catch{return!1}}function n(Q,Z,$){let J="";try{J=S(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,`
|
|
208
208
|
|
|
209
|
-
`).trimStart();return p(Q,V),!0}function d(Q,Z,$){let J=h(Q,Z);HQ(J,{recursive:!0});let Y=h(J,"SKILL.md");return p(Y,$),Y}function R(Q,Z){return kQ(h(Q,Z,"SKILL.md"))}function a(Q,Z){let $=h(Q,Z);if(!kQ($))return!1;return gZ($,{recursive:!0,force:!0}),!0}var jQ=()=>{};import{mkdirSync as RZ,renameSync as EZ,rmSync as IZ,writeFileSync as bZ}from"fs";import{dirname as DZ}from"path";function vQ(Q,Z){RZ(DZ(Q),{recursive:!0});let $=`${Q}.tmp`;try{bZ($,Z),EZ($,Q)}catch(J){throw IZ($,{force:!0}),J}}var pQ=()=>{};
|
|
210
|
-
`)?`
|
|
211
|
-
`:`
|
|
212
|
-
|
|
213
|
-
`,J=Q+$+AZ;if(I(J)?.mcp_servers?.beacon?.command!=="beacon")return{added:!1,error:`could not safely append [mcp_servers.beacon] \u2014 ${E}`};return vQ(f(),J),{added:!0}}function aQ(){let Q="";try{Q=i(f(),"utf8")}catch{return{removed:!1}}let Z=Q.split(`
|
|
214
|
-
`),$=Z.indexOf(tQ);if($===-1)return{removed:!1,skipped:uQ()};let J=Z.indexOf(nQ,$);if(J===-1)return{removed:!1,skipped:!0};Z.splice($,J-$+1);let Y=Z.join(`
|
|
215
|
-
`).replace(/\n{3,}/g,`
|
|
216
|
-
|
|
217
|
-
`).replace(/^\n+/,"");if(I(Y)===null)return{removed:!1,skipped:!0};return vQ(f(),Y),{removed:!0}}async function LZ(){let{INIT_SKILL:Q,REFRESH_SKILL:Z,PLAN_SKILL:$}=await Promise.resolve().then(() => (k(),WQ)),J={"beacon-init":Q,"beacon-refresh":Z,"beacon-plan":$},Y=[];for(let z of H){if(!R(r(),z))Y.push(z);d(r(),z,J[z])}let V=0;for(let z of T)if(m(GQ(),{event:z.event,matcher:z.matcher,command:z.command}))V++;let X=g(s(),o);t(s(),o,cQ,fQ);let U=dQ();return{skillsAdded:Y,hooksAdded:V,agentsMdBlockTouched:!X,mcp:U}}function KQ(){let Q={};for(let $ of H)Q[$]=R(r(),$);let Z={};for(let $ of T)Z[$.event]=c(GQ(),{event:$.event,command:$.command});return{detected:lQ(),skills:Q,hooks:Z,agentsMdBlock:g(s(),o),mcp:uQ()}}function CQ(){let Q=[];for(let Y of H)if(a(r(),Y))Q.push(Y);let Z=0;for(let Y of T)if(l(GQ(),{event:Y.event,command:Y.command}))Z++;let $=n(s(),o,cQ),J=aQ();return{skillsRemoved:Q,hooksRemoved:Z,agentsMdBlockRemoved:$,mcpRemoved:J.removed,mcpSkipped:J.skipped}}var NQ=()=>b(mQ(),".codex"),GQ=()=>b(NQ(),"hooks.json"),f=()=>b(NQ(),"config.toml"),s=()=>b(NQ(),"AGENTS.md"),r=()=>b(mQ(),".agents","skills"),o="<!-- beacon:global:start -->",cQ="<!-- beacon:global:end -->",T,xQ,tQ="# beacon:start (managed by Beacon \u2014 `beacon uninstall` removes this block)",nQ="# beacon:end",AZ,E="add it manually: codex mcp add beacon -- beacon mcp";var MQ=C(()=>{jQ();pQ();TQ();T=[{event:"PostToolUse",matcher:"apply_patch",command:"beacon hook",description:"Report file edits to Beacon's active feature so the map stays fresh."},{event:"UserPromptSubmit",matcher:"*",command:"beacon prompt",description:"On feature-y prompts in a Beacon-wired repo, remind the agent to run the context\u2192propose\u2192describe loop (no-op otherwise)."},{event:"Stop",matcher:"*",command:"beacon stop-hook",description:"When the agent ends a turn asking for plan approval in prose, nudge it to present the plan on Beacon's /plan canvas."}];AZ=`${tQ}
|
|
218
|
-
[mcp_servers.beacon]
|
|
219
|
-
command = "beacon"
|
|
220
|
-
args = ["mcp"]
|
|
221
|
-
${nQ}
|
|
222
|
-
`});import{existsSync as _Z}from"fs";import{homedir as kZ}from"os";import{join as e}from"path";function hZ(){return process.env.HOME||process.env.USERPROFILE||kZ()}function SZ(Q,Z){return d(wQ(),Q,Z)}function oQ(Q){return R(wQ(),Q)}function pZ(Q){return a(wQ(),Q)}function mZ(Q){return m(FQ(),Q)}function cZ(Q){return c(FQ(),Q)}function lZ(Q){return l(FQ(),Q)}function tZ(Q){t(gQ(),RQ,rQ,Q)}function iQ(){return g(gQ(),RQ)}function nZ(){return n(gQ(),RQ,rQ)}function eQ(){let Q={};for(let $ of H)Q[$]=oQ($);let Z={};for(let $ of D)Z[$.event]=cZ({event:$.event,command:$.command});return{homeExists:_Z(QQ()),skills:Q,hooks:Z,claudeMdBlock:iQ()}}async function dZ(){let{INIT_SKILL:Q,REFRESH_SKILL:Z,PLAN_SKILL:$}=await Promise.resolve().then(() => (k(),WQ)),J={"beacon-init":Q,"beacon-refresh":Z,"beacon-plan":$},Y=[];for(let U of H){if(!oQ(U))Y.push(U);SZ(U,J[U])}let V=0;for(let U of D)if(mZ({event:U.event,matcher:U.matcher,command:U.command}))V++;let X=iQ();return tZ(fQ),{skillsAdded:Y,hooksAdded:V,claudeMdBlockTouched:!X}}async function S0(){let Q;try{Q={ok:!0,...await dZ()}}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(() => (MQ(),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 QZ(){let Q=[];for(let J of H)if(pZ(J))Q.push(J);let Z=0;for(let J of D)if(lZ(J))Z++;let $=nZ();return{skillsRemoved:Q,hooksRemoved:Z,claudeMdBlockRemoved:$}}var QQ=()=>e(hZ(),".claude"),wQ=()=>e(QQ(),"skills"),FQ=()=>e(QQ(),"settings.json"),gQ=()=>e(QQ(),"CLAUDE.md"),RQ="<!-- beacon:global:start -->",rQ="<!-- beacon:global:end -->",H,D,fQ=`## Beacon (visual planning panel)
|
|
209
|
+
`).trimStart();return p(Q,V),!0}function d(Q,Z,$){let J=h(Q,Z);HQ(J,{recursive:!0});let Y=h(J,"SKILL.md");return p(Y,$),Y}function R(Q,Z){return kQ(h(Q,Z,"SKILL.md"))}function a(Q,Z){let $=h(Q,Z);if(!kQ($))return!1;return gZ($,{recursive:!0,force:!0}),!0}var jQ=()=>{};import{mkdirSync as RZ,renameSync as EZ,rmSync as IZ,writeFileSync as bZ}from"fs";import{dirname as DZ}from"path";function vQ(Q,Z){RZ(DZ(Q),{recursive:!0});let $=`${Q}.tmp`;try{bZ($,Z),EZ($,Q)}catch(J){throw IZ($,{force:!0}),J}}var pQ=()=>{};import{existsSync as OZ}from"fs";import{homedir as AZ}from"os";import{join as s}from"path";function yZ(){return process.env.HOME||process.env.USERPROFILE||AZ()}function LZ(Q,Z){return d(NQ(),Q,Z)}function lQ(Q){return R(NQ(),Q)}function _Z(Q){return a(NQ(),Q)}function kZ(Q){return m(GQ(),Q)}function hZ(Q){return c(GQ(),Q)}function SZ(Q){return l(GQ(),Q)}function pZ(Q){t(uQ(),KQ,cQ,Q)}function tQ(){return g(uQ(),KQ)}function mZ(){return n(uQ(),KQ,cQ)}function nQ(){let Q={};for(let $ of H)Q[$]=lQ($);let Z={};for(let $ of E)Z[$.event]=hZ({event:$.event,command:$.command});return{homeExists:OZ(r()),skills:Q,hooks:Z,claudeMdBlock:tQ()}}async function cZ(){let{INIT_SKILL:Q,REFRESH_SKILL:Z,PLAN_SKILL:$}=await Promise.resolve().then(() => (k(),WQ)),J={"beacon-init":Q,"beacon-refresh":Z,"beacon-plan":$},Y=[];for(let U of H){if(!lQ(U))Y.push(U);LZ(U,J[U])}let V=0;for(let U of E)if(kZ({event:U.event,matcher:U.matcher,command:U.command}))V++;let X=tQ();return pZ(CQ),{skillsAdded:Y,hooksAdded:V,claudeMdBlockTouched:!X}}async function A0(){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(() => (xQ(),mQ));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 dQ(){let Q=[];for(let J of H)if(_Z(J))Q.push(J);let Z=0;for(let J of E)if(SZ(J))Z++;let $=mZ();return{skillsRemoved:Q,hooksRemoved:Z,claudeMdBlockRemoved:$}}var r=()=>s(yZ(),".claude"),NQ=()=>s(r(),"skills"),GQ=()=>s(r(),"settings.json"),uQ=()=>s(r(),"CLAUDE.md"),KQ="<!-- beacon:global:start -->",cQ="<!-- beacon:global:end -->",H,E,CQ=`## Beacon (visual planning panel)
|
|
223
210
|
|
|
224
211
|
This machine has Beacon installed \u2014 a local visual planning surface for the terminal-side
|
|
225
212
|
agent. Beacon proposes feature plans (roadmap features + DB schema + endpoints) via MCP,
|
|
@@ -240,7 +227,20 @@ the user reviews on a canvas at /plan, and feedback flows back as the next round
|
|
|
240
227
|
Feedback bundles inline annotations on the markdown PLUS any edits the user made directly
|
|
241
228
|
on the /map and /db boards (added features, attached subtasks, edited columns, new
|
|
242
229
|
endpoints). Treat board edits as the user's revision intent \u2014 re-propose matching them
|
|
243
|
-
verbatim. Do NOT implement until the tool returns approval.`;var
|
|
244
|
-
|
|
245
|
-
|
|
230
|
+
verbatim. Do NOT implement until the tool returns approval.`;var MQ=C(()=>{jQ();H=["beacon-init","beacon-refresh","beacon-plan"],E=[{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."}]});var mQ={};zQ(mQ,{setupCodexAssets:()=>dZ,removeCodexMcp:()=>QZ,removeCodexArtifacts:()=>RQ,hasCodexMcp:()=>FQ,ensureCodexMcp:()=>eQ,codexMcpProblem:()=>nZ,codexDetected:()=>rQ,auditCodex:()=>gQ,CODEX_HOOKS:()=>T});import{readFileSync as QQ}from"fs";import{homedir as lZ}from"os";import{join as D}from"path";function aQ(){return process.env.HOME||process.env.USERPROFILE||lZ()}function rQ(){if(process.env.BEACON_CODEX==="1")return!0;if(process.env.BEACON_CODEX==="0")return!1;if(fQ===void 0)fQ=Bun.which("codex")!==null;return fQ}function b(Q){try{return Bun.TOML.parse(Q)}catch{return null}}function FQ(){try{return Boolean(b(QQ(f(),"utf8"))?.mcp_servers?.beacon)}catch{return!1}}function nZ(){let Q="";try{Q=QQ(f(),"utf8")}catch{return null}let Z=b(Q);if(!Z)return`~/.codex/config.toml does not parse \u2014 ${I}`;if(Z.mcp_servers?.beacon)return null;if(/^\s*mcp_servers\s*=/m.test(Q))return`mcp_servers is an inline table \u2014 ${I}`;return null}function eQ(){let Q="",Z=!1;try{Q=QQ(f(),"utf8"),Z=!0}catch{}if(Z){let V=b(Q);if(!V)return{added:!1,error:`~/.codex/config.toml does not parse \u2014 ${I}`};if(V.mcp_servers?.beacon)return{added:!1};if(/^\s*mcp_servers\s*=/m.test(Q))return{added:!1,error:`mcp_servers is an inline table \u2014 ${I}`}}let $=!Q?"":Q.endsWith(`
|
|
231
|
+
`)?`
|
|
232
|
+
`:`
|
|
233
|
+
|
|
234
|
+
`,J=Q+$+tZ;if(b(J)?.mcp_servers?.beacon?.command!=="beacon")return{added:!1,error:`could not safely append [mcp_servers.beacon] \u2014 ${I}`};return vQ(f(),J),{added:!0}}function QZ(){let Q="";try{Q=QQ(f(),"utf8")}catch{return{removed:!1}}let Z=Q.split(`
|
|
235
|
+
`),$=Z.indexOf(oQ);if($===-1)return{removed:!1,skipped:FQ()};let J=Z.indexOf(iQ,$);if(J===-1)return{removed:!1,skipped:!0};Z.splice($,J-$+1);let Y=Z.join(`
|
|
236
|
+
`).replace(/\n{3,}/g,`
|
|
237
|
+
|
|
238
|
+
`).replace(/^\n+/,"");if(b(Y)===null)return{removed:!1,skipped:!0};return vQ(f(),Y),{removed:!0}}async function dZ(){let{INIT_SKILL:Q,REFRESH_SKILL:Z,PLAN_SKILL:$}=await Promise.resolve().then(() => (k(),WQ)),J={"beacon-init":Q,"beacon-refresh":Z,"beacon-plan":$},Y=[];for(let z of H){if(!R(i(),z))Y.push(z);d(i(),z,J[z])}let V=0;for(let z of T)if(m(wQ(),{event:z.event,matcher:z.matcher,command:z.command}))V++;let X=g(o(),e);t(o(),e,sQ,CQ);let U=eQ();return{skillsAdded:Y,hooksAdded:V,agentsMdBlockTouched:!X,mcp:U}}function gQ(){let Q={};for(let $ of H)Q[$]=R(i(),$);let Z={};for(let $ of T)Z[$.event]=c(wQ(),{event:$.event,command:$.command});return{detected:rQ(),skills:Q,hooks:Z,agentsMdBlock:g(o(),e),mcp:FQ()}}function RQ(){let Q=[];for(let Y of H)if(a(i(),Y))Q.push(Y);let Z=0;for(let Y of T)if(l(wQ(),{event:Y.event,command:Y.command}))Z++;let $=n(o(),e,sQ),J=QZ();return{skillsRemoved:Q,hooksRemoved:Z,agentsMdBlockRemoved:$,mcpRemoved:J.removed,mcpSkipped:J.skipped}}var TQ=()=>D(aQ(),".codex"),wQ=()=>D(TQ(),"hooks.json"),f=()=>D(TQ(),"config.toml"),o=()=>D(TQ(),"AGENTS.md"),i=()=>D(aQ(),".agents","skills"),e="<!-- beacon:global:start -->",sQ="<!-- beacon:global:end -->",T,fQ,oQ="# beacon:start (managed by Beacon \u2014 `beacon uninstall` removes this block)",iQ="# beacon:end",tZ,I="add it manually: codex mcp add beacon -- beacon mcp";var xQ=C(()=>{jQ();pQ();MQ();T=[{event:"PostToolUse",matcher:"apply_patch",command:"beacon hook",description:"Report file edits to Beacon's active feature so the map stays fresh."},{event:"UserPromptSubmit",matcher:"*",command:"beacon prompt",description:"On feature-y prompts in a Beacon-wired repo, remind the agent to run the context\u2192propose\u2192describe loop (no-op otherwise)."},{event:"Stop",matcher:"*",command:"beacon stop-hook",description:"When the agent ends a turn asking for plan approval in prose, nudge it to present the plan on Beacon's /plan canvas."}];tZ=`${oQ}
|
|
239
|
+
[mcp_servers.beacon]
|
|
240
|
+
command = "beacon"
|
|
241
|
+
args = ["mcp"]
|
|
242
|
+
${iQ}
|
|
243
|
+
`});var $Z={};zQ($Z,{provisionDb:()=>V0});import{createClient as aZ}from"@libsql/client";import{drizzle as sZ}from"drizzle-orm/libsql";import{migrate as rZ}from"drizzle-orm/libsql/migrator";import{readMigrationFiles as oZ}from"drizzle-orm/migrator";import{dirname as EQ,join as iZ}from"path";import{fileURLToPath as eZ}from"url";async function ZQ(Q,Z){return(await Q.execute({sql:"SELECT 1 FROM sqlite_master WHERE type='table' AND name = ?",args:[Z]})).rows.length>0}async function J0(Q,Z){let $=await Q.execute(`PRAGMA table_info("${Z}")`);return new Set($.rows.map((J)=>String(J.name)))}async function ZZ(Q){if(!await ZQ(Q,"__drizzle_migrations"))return 0;let Z=await Q.execute('SELECT count(*) AS n FROM "__drizzle_migrations"');return Number(Z.rows[0]?.n??0)}async function Y0(Q){for(let[Z,$]of Object.entries($0)){if(!await ZQ(Q,Z))continue;let J=await J0(Q,Z);for(let Y of $){if(!J.has(Y))continue;await Q.execute(`UPDATE "${Z}" SET "${Y}" = CAST((julianday("${Y}") - 2440587.5) * 86400000 AS INTEGER) WHERE typeof("${Y}") = 'text'`)}}}async function V0(Q,Z=Z0){let $=aZ({url:Q});try{await $.execute("PRAGMA journal_mode = WAL;"),await $.execute("PRAGMA foreign_keys = ON;");let J=await ZQ($,"__drizzle_migrations"),Y=await ZQ($,"Node"),V=!1;if(Y&&!J){let U=oZ({migrationsFolder:Z})[0];if(U)await $.execute('CREATE TABLE IF NOT EXISTS "__drizzle_migrations" (id SERIAL PRIMARY KEY, hash text NOT NULL, created_at numeric)'),await $.execute({sql:'INSERT INTO "__drizzle_migrations" ("hash", "created_at") VALUES (?, ?)',args:[U.hash,U.folderMillis]}),V=!0}let X=await ZZ($);if(await rZ(sZ($),{migrationsFolder:Z}),await ZZ($)>X)V=!0;return await Y0($),{migrated:V}}finally{$.close()}}var Q0,Z0,$0;var JZ=C(async()=>{Q0=EQ(EQ(EQ(eZ(import.meta.url)))),Z0=process.env.BEACON_MIGRATIONS_DIR||iZ(Q0,"drizzle"),$0={Node:["createdAt","updatedAt"],Note:["createdAt","updatedAt"],DbTable:["createdAt","updatedAt"],Endpoint:["createdAt","updatedAt"],DraftTable:["createdAt"],SyncState:["codeGraphSyncedAt","updatedAt"],AppSetting:["updatedAt"],ProjectMeta:["updatedAt"],CodeFile:["updatedAt"]}});import{AsyncLocalStorage as z0}from"async_hooks";import{spawnSync as q0}from"child_process";import{createHash as X0}from"crypto";import{existsSync as VZ,mkdirSync as $Q,readFileSync as zZ,writeFileSync as qZ}from"fs";import{homedir as U0}from"os";import{basename as P0,join as w}from"path";function G(){return process.env.BEACON_HOME||w(U0(),".beacon")}function IQ(){return w(G(),"workspaces.json")}function XZ(Q){return X0("sha256").update(Q).digest("hex").slice(0,12)}function Q1(Q=process.cwd()){let Z=q0("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 bQ(Q){return w(G(),Q)}function W0(Q){return`file:${w(bQ(Q),"db.sqlite")}`}function O(){try{let Q=JSON.parse(zZ(IQ(),"utf8"));return Array.isArray(Q)?Q:[]}catch{return[]}}function DQ(Q){$Q(G(),{recursive:!0}),qZ(IQ(),JSON.stringify(Q,null,2))}function OQ(){return O().sort((Q,Z)=>Z.lastOpenedAt.localeCompare(Q.lastOpenedAt))}function N(Q){return O().find((Z)=>Z.id===Q)??null}function H0(Q,Z,$=new Date().toISOString()){let J=XZ(Q),Y=O(),V=Y.find((z)=>z.id===J),X={id:J,path:Q,name:Z||V?.name||P0(Q),lastOpenedAt:$},U=[X,...Y.filter((z)=>z.id!==J)];return $Q(bQ(J),{recursive:!0}),DQ(U),X}function Z1(Q,Z=new Date().toISOString()){let $=O(),J=$.find((Y)=>Y.id===Q);if(!J)return;J.lastOpenedAt=Z,DQ($)}function $1(Q){if(DQ(O().filter((Z)=>Z.id!==Q)),AQ()===Q)B0(OQ()[0]?.id??null)}function UZ(){return w(G(),"active")}function AQ(){try{return zZ(UZ(),"utf8").trim()||null}catch{return null}}function B0(Q){$Q(G(),{recursive:!0}),qZ(UZ(),Q??"")}function J1(){let Q=AQ();return Q?N(Q):null}function Y1(){let Q=v0()??AQ();return Q?N(Q):null}function V1(Q){return N(Q)?.path??null}function z1(){return VZ(IQ())}var PZ="beacon_ws";function WZ(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 q1(Q){let Z=Q.headers.get("x-beacon-workspace");if(Z&&N(Z))return Z;let $=WZ(Q,PZ);if($&&N($))return $;return null}var j0="x-beacon-workspace-path";async function X1(Q){let Z=Q.headers.get("x-beacon-workspace");if(Z&&N(Z))return Z;let $=Q.headers.get(j0);if($&&(!Z||XZ($)===Z)){let Y=H0($);return await x0(Y.id),Y.id}let J=WZ(Q,PZ);if(J&&N(J))return J;return null}var HZ=new z0;function U1(Q,Z){return Q?HZ.run(Q,Z):Z()}function v0(){return HZ.getStore()??null}var YZ=new Set;async function x0(Q){let Z=bQ(Q),$=w(Z,"db.sqlite"),J=VZ($);if(J&&YZ.has($))return{ok:!0,created:!1,migrated:!1};try{$Q(Z,{recursive:!0});let{provisionDb:Y}=await JZ().then(() => $Z),V=await Y(W0(Q));return YZ.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)}}}k();xQ();MQ();import{existsSync as JQ,readFileSync as N0,rmSync as G0}from"fs";import{join as u0}from"path";var BZ=process.argv.slice(3),jZ=BZ.includes("--yes")||BZ.includes("-y"),j=(Q)=>`\x1B[32m\u2713\x1B[0m ${Q}`,B=(Q)=>`\x1B[2m${Q}\x1B[0m`,K=(Q)=>`
|
|
244
|
+
\x1B[1m${Q}\x1B[0m`,vZ=(Q)=>`\x1B[33m!\x1B[0m ${Q}`,u=G(),A=OQ(),yQ=nQ();console.log(K(jZ?"Beacon \xB7 uninstall":"Beacon \xB7 uninstall (dry run)"));console.log(K("Global"));console.log(` ${JQ(u)?`wipe ${u} (${A.length} workspaces)`:`${B(`${u} \u2014 already gone`)}`}`);for(let Q of H)console.log(` ${yQ.skills[Q]?`remove ~/.claude/skills/${Q}/`:B(`skill ${Q} \u2014 already gone`)}`);for(let Q of E)console.log(` ${yQ.hooks[Q.event]?`remove hook ${Q.event} \u2192 ${Q.command}`:B(`hook ${Q.event} \u2192 ${Q.command} \u2014 already gone`)}`);console.log(` ${yQ.claudeMdBlock?"strip Beacon block from ~/.claude/CLAUDE.md":B("global CLAUDE.md block \u2014 already gone")}`);var YQ=gQ();console.log(K("Codex"));for(let Q of H)console.log(` ${YQ.skills[Q]?`remove ~/.agents/skills/${Q}/`:B(`skill ${Q} \u2014 already gone`)}`);for(let Q of T)console.log(` ${YQ.hooks[Q.event]?`remove hook ${Q.event} \u2192 ${Q.command} from ~/.codex/hooks.json`:B(`hook ${Q.event} \u2192 ${Q.command} \u2014 already gone`)}`);console.log(` ${YQ.agentsMdBlock?"strip Beacon block from ~/.codex/AGENTS.md":B("global ~/.codex/AGENTS.md block \u2014 already gone")}`);console.log(` ${YQ.mcp?"strip [mcp_servers.beacon] from ~/.codex/config.toml (if Beacon wrote it)":B("config.toml beacon entry \u2014 already gone")}`);if(A.length){console.log(K(`Per-repo (${A.length})`));for(let Q of A){if(!JQ(Q.path)){console.log(` ${B(`${Q.path} \u2014 repo no longer on disk, skipping`)}`);continue}console.log(` ${Q.path}`),console.log(` ${B("strip beacon entry from .mcp.json, workflow block from AGENTS.md, skills, CLAUDE.md @-import")}`)}}if(!jZ)console.log(K("Nothing was changed.")),console.log(" Run \x1B[1mbeacon uninstall --yes\x1B[0m to apply."),console.log(` The \x1B[1mbeacon\x1B[0m binary itself (the cloned source + your PATH symlink) is NOT removed by this \u2014 your install script handles that.
|
|
245
|
+
`),process.exit(0);console.log(K("Applying\u2026"));var F=dQ();if(F.skillsRemoved.length)console.log(` ${j(`removed skills: ${F.skillsRemoved.join(", ")}`)}`);if(F.hooksRemoved)console.log(` ${j(`removed ${F.hooksRemoved} hook${F.hooksRemoved===1?"":"s"} from ~/.claude/settings.json`)}`);if(F.claudeMdBlockRemoved)console.log(` ${j("stripped Beacon block from ~/.claude/CLAUDE.md")}`);var x=RQ();if(x.skillsRemoved.length)console.log(` ${j(`removed ~/.agents/skills: ${x.skillsRemoved.join(", ")}`)}`);if(x.hooksRemoved)console.log(` ${j(`removed ${x.hooksRemoved} hook${x.hooksRemoved===1?"":"s"} from ~/.codex/hooks.json`)}`);if(x.agentsMdBlockRemoved)console.log(` ${j("stripped Beacon block from ~/.codex/AGENTS.md")}`);if(x.mcpRemoved)console.log(` ${j("stripped [mcp_servers.beacon] from ~/.codex/config.toml")}`);if(x.mcpSkipped)console.log(` ${vZ("left [mcp_servers.beacon] in ~/.codex/config.toml \u2014 it wasn't written by Beacon (remove with: codex mcp remove beacon)")}`);for(let Q of A){if(!JQ(Q.path))continue;let Z=PQ(Q.path),$=[];if(Z.skillsRemoved.length)$.push(`skills(${Z.skillsRemoved.length})`);if(Z.mcpUnregistered)$.push(".mcp.json");if(Z.agentsBlockRemoved)$.push("AGENTS.md");if(Z.claudeImportRemoved)$.push("CLAUDE.md");if($.length)console.log(` ${j(`${Q.path} \u2192 ${$.join(", ")}`)}`)}var K0=u0(u,"server.json");try{let{pid:Q}=JSON.parse(N0(K0,"utf8"));if(Q)try{process.kill(Q),console.log(` ${j(`stopped daemon (pid ${Q})`)}`)}catch{}}catch{}if(JQ(u))G0(u,{recursive:!0,force:!0}),console.log(` ${j(`removed ${u}`)}`);console.log(K("Done."));console.log(` ${vZ("The `beacon` binary on your PATH is still there \u2014 run the matching uninstall step from your installer to remove it.")}
|
|
246
246
|
`);
|
|
@@ -205,20 +205,7 @@ ${V}
|
|
|
205
205
|
`)?Y:`${Y}
|
|
206
206
|
`)}function j(q,z){try{return M(q,"utf8").includes(z)}catch{return!1}}function A(q,z,J){let Q="";try{Q=M(q,"utf8")}catch{return!1}let V=new RegExp(`${z}[\\s\\S]*?${J}\\n?`);if(!V.test(Q))return!1;let Y=Q.replace(V,"").replace(/\n{3,}/g,`
|
|
207
207
|
|
|
208
|
-
`).trimStart();return F(q,Y),!0}function y(q,z,J){let Q=C(q,z);r(Q,{recursive:!0});let V=C(Q,"SKILL.md");return F(V,J),V}function B(q,z){return xq(C(q,z,"SKILL.md"))}function O(q,z){let J=C(q,z);if(!xq(J))return!1;return mq(J,{recursive:!0,force:!0}),!0}var l=()=>{};import{mkdirSync as pq,renameSync as Sq,rmSync as aq,writeFileSync as tq}from"fs";import{dirname as cq}from"path";function i(q,z){pq(cq(q),{recursive:!0});let J=`${q}.tmp`;try{tq(J,z),Sq(J,q)}catch(Q){throw aq(J,{force:!0}),Q}}var Hq=()=>{};
|
|
209
|
-
`)?`
|
|
210
|
-
`:`
|
|
211
|
-
|
|
212
|
-
`,Q=q+J+nq;if(N(Q)?.mcp_servers?.beacon?.command!=="beacon")return{added:!1,error:`could not safely append [mcp_servers.beacon] \u2014 ${u}`};return i(v(),Q),{added:!0}}function Gq(){let q="";try{q=L(v(),"utf8")}catch{return{removed:!1}}let z=q.split(`
|
|
213
|
-
`),J=z.indexOf(Bq);if(J===-1)return{removed:!1,skipped:zq()};let Q=z.indexOf(uq,J);if(Q===-1)return{removed:!1,skipped:!0};z.splice(J,Q-J+1);let V=z.join(`
|
|
214
|
-
`).replace(/\n{3,}/g,`
|
|
215
|
-
|
|
216
|
-
`).replace(/^\n+/,"");if(N(V)===null)return{removed:!1,skipped:!0};return i(v(),V),{removed:!0}}async function sq(){let{INIT_SKILL:q,REFRESH_SKILL:z,PLAN_SKILL:J}=await Promise.resolve().then(() => (n(),d)),Q={"beacon-init":q,"beacon-refresh":z,"beacon-plan":J},V=[];for(let Z of w){if(!B(h(),Z))V.push(Z);y(h(),Z,Q[Z])}let Y=0;for(let Z of _)if(T(qq(),{event:Z.event,matcher:Z.matcher,command:Z.command}))Y++;let P=j(D(),k);E(D(),k,gq,Jq);let W=Nq();return{skillsAdded:V,hooksAdded:Y,agentsMdBlockTouched:!P,mcp:W}}function lq(){let q={};for(let J of w)q[J]=B(h(),J);let z={};for(let J of _)z[J.event]=R(qq(),{event:J.event,command:J.command});return{detected:jq(),skills:q,hooks:z,agentsMdBlock:j(D(),k),mcp:zq()}}function iq(){let q=[];for(let V of w)if(O(h(),V))q.push(V);let z=0;for(let V of _)if(I(qq(),{event:V.event,command:V.command}))z++;let J=A(D(),k,gq),Q=Gq();return{skillsRemoved:q,hooksRemoved:z,agentsMdBlockRemoved:J,mcpRemoved:Q.removed,mcpSkipped:Q.skipped}}var e=()=>G(vq(),".codex"),qq=()=>G(e(),"hooks.json"),v=()=>G(e(),"config.toml"),D=()=>G(e(),"AGENTS.md"),h=()=>G(vq(),".agents","skills"),k="<!-- beacon:global:start -->",gq="<!-- beacon:global:end -->",_,o,Bq="# beacon:start (managed by Beacon \u2014 `beacon uninstall` removes this block)",uq="# beacon:end",nq,u="add it manually: codex mcp add beacon -- beacon mcp";var Kq=g(()=>{l();Hq();fq();_=[{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."}];nq=`${Bq}
|
|
217
|
-
[mcp_servers.beacon]
|
|
218
|
-
command = "beacon"
|
|
219
|
-
args = ["mcp"]
|
|
220
|
-
${uq}
|
|
221
|
-
`});import{existsSync as oq}from"fs";import{homedir as eq}from"os";import{join as m}from"path";function qz(){return process.env.HOME||process.env.USERPROFILE||eq()}function zz(q,z){return y(Qq(),q,z)}function Mq(q){return B(Qq(),q)}function Jz(q){return O(Qq(),q)}function Qz(q){return T(Vq(),q)}function Vz(q){return R(Vq(),q)}function Yz(q){return I(Vq(),q)}function Zz(q){E(Yq(),Zq,Cq,q)}function Fq(){return j(Yq(),Zq)}function $z(){return A(Yq(),Zq,Cq)}function Tz(){let q={};for(let J of w)q[J]=Mq(J);let z={};for(let J of $q)z[J.event]=Vz({event:J.event,command:J.command});return{homeExists:oq(p()),skills:q,hooks:z,claudeMdBlock:Fq()}}async function Pz(){let{INIT_SKILL:q,REFRESH_SKILL:z,PLAN_SKILL:J}=await Promise.resolve().then(() => (n(),d)),Q={"beacon-init":q,"beacon-refresh":z,"beacon-plan":J},V=[];for(let W of w){if(!Mq(W))V.push(W);zz(W,Q[W])}let Y=0;for(let W of $q)if(Qz({event:W.event,matcher:W.matcher,command:W.command}))Y++;let P=Fq();return Zz(Jq),{skillsAdded:V,hooksAdded:Y,claudeMdBlockTouched:!P}}async function Rz(){let q;try{q={ok:!0,...await Pz()}}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(() => (Kq(),bq));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 Iz(){let q=[];for(let Q of w)if(Jz(Q))q.push(Q);let z=0;for(let Q of $q)if(Yz(Q))z++;let J=$z();return{skillsRemoved:q,hooksRemoved:z,claudeMdBlockRemoved:J}}var p=()=>m(qz(),".claude"),Qq=()=>m(p(),"skills"),Vq=()=>m(p(),"settings.json"),Yq=()=>m(p(),"CLAUDE.md"),Zq="<!-- beacon:global:start -->",Cq="<!-- beacon:global:end -->",w,$q,Jq=`## Beacon (visual planning panel)
|
|
208
|
+
`).trimStart();return F(q,Y),!0}function y(q,z,J){let Q=C(q,z);r(Q,{recursive:!0});let V=C(Q,"SKILL.md");return F(V,J),V}function B(q,z){return xq(C(q,z,"SKILL.md"))}function O(q,z){let J=C(q,z);if(!xq(J))return!1;return mq(J,{recursive:!0,force:!0}),!0}var l=()=>{};import{mkdirSync as pq,renameSync as Sq,rmSync as aq,writeFileSync as tq}from"fs";import{dirname as cq}from"path";function i(q,z){pq(cq(q),{recursive:!0});let J=`${q}.tmp`;try{tq(J,z),Sq(J,q)}catch(Q){throw aq(J,{force:!0}),Q}}var Hq=()=>{};import{existsSync as dq}from"fs";import{homedir as nq}from"os";import{join as D}from"path";function rq(){return process.env.HOME||process.env.USERPROFILE||nq()}function sq(q,z){return y(o(),q,z)}function Bq(q){return B(o(),q)}function lq(q){return O(o(),q)}function iq(q){return T(e(),q)}function oq(q){return R(e(),q)}function eq(q){return I(e(),q)}function qz(q){E(qq(),zq,jq,q)}function uq(){return j(qq(),zq)}function zz(){return A(qq(),zq,jq)}function bz(){let q={};for(let J of w)q[J]=Bq(J);let z={};for(let J of Jq)z[J.event]=oq({event:J.event,command:J.command});return{homeExists:dq(h()),skills:q,hooks:z,claudeMdBlock:uq()}}async function Jz(){let{INIT_SKILL:q,REFRESH_SKILL:z,PLAN_SKILL:J}=await Promise.resolve().then(() => (n(),d)),Q={"beacon-init":q,"beacon-refresh":z,"beacon-plan":J},V=[];for(let W of w){if(!Bq(W))V.push(W);sq(W,Q[W])}let Y=0;for(let W of Jq)if(iq({event:W.event,matcher:W.matcher,command:W.command}))Y++;let P=uq();return qz(Qq),{skillsAdded:V,hooksAdded:Y,claudeMdBlockTouched:!P}}async function Kz(){let q;try{q={ok:!0,...await Jz()}}catch(z){q={ok:!1,error:z instanceof Error?z.message:String(z),skillsAdded:[],hooksAdded:0,claudeMdBlockTouched:!1}}try{let z=await Promise.resolve().then(() => (gq(),vq));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 fz(){let q=[];for(let Q of w)if(lq(Q))q.push(Q);let z=0;for(let Q of Jq)if(eq(Q))z++;let J=zz();return{skillsRemoved:q,hooksRemoved:z,claudeMdBlockRemoved:J}}var h=()=>D(rq(),".claude"),o=()=>D(h(),"skills"),e=()=>D(h(),"settings.json"),qq=()=>D(h(),"CLAUDE.md"),zq="<!-- beacon:global:start -->",jq="<!-- beacon:global:end -->",w,Jq,Qq=`## Beacon (visual planning panel)
|
|
222
209
|
|
|
223
210
|
This machine has Beacon installed \u2014 a local visual planning surface for the terminal-side
|
|
224
211
|
agent. Beacon proposes feature plans (roadmap features + DB schema + endpoints) via MCP,
|
|
@@ -239,4 +226,17 @@ the user reviews on a canvas at /plan, and feedback flows back as the next round
|
|
|
239
226
|
Feedback bundles inline annotations on the markdown PLUS any edits the user made directly
|
|
240
227
|
on the /map and /db boards (added features, attached subtasks, edited columns, new
|
|
241
228
|
endpoints). Treat board edits as the user's revision intent \u2014 re-propose matching them
|
|
242
|
-
verbatim. Do NOT implement until the tool returns approval.`;var
|
|
229
|
+
verbatim. Do NOT implement until the tool returns approval.`;var Nq=g(()=>{l();w=["beacon-init","beacon-refresh","beacon-plan"],Jq=[{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."}]});var vq={};Pq(vq,{setupCodexAssets:()=>Zz,removeCodexMcp:()=>Fq,removeCodexArtifacts:()=>Pz,hasCodexMcp:()=>$q,ensureCodexMcp:()=>Mq,codexMcpProblem:()=>Yz,codexDetected:()=>Kq,auditCodex:()=>$z,CODEX_HOOKS:()=>p});import{readFileSync as m}from"fs";import{homedir as Qz}from"os";import{join as G}from"path";function Gq(){return process.env.HOME||process.env.USERPROFILE||Qz()}function Kq(){if(process.env.BEACON_CODEX==="1")return!0;if(process.env.BEACON_CODEX==="0")return!1;if(Vq===void 0)Vq=Bun.which("codex")!==null;return Vq}function N(q){try{return Bun.TOML.parse(q)}catch{return null}}function $q(){try{return Boolean(N(m(v(),"utf8"))?.mcp_servers?.beacon)}catch{return!1}}function Yz(){let q="";try{q=m(v(),"utf8")}catch{return null}let z=N(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 Mq(){let q="",z=!1;try{q=m(v(),"utf8"),z=!0}catch{}if(z){let Y=N(q);if(!Y)return{added:!1,error:`~/.codex/config.toml does not parse \u2014 ${u}`};if(Y.mcp_servers?.beacon)return{added:!1};if(/^\s*mcp_servers\s*=/m.test(q))return{added:!1,error:`mcp_servers is an inline table \u2014 ${u}`}}let J=!q?"":q.endsWith(`
|
|
230
|
+
`)?`
|
|
231
|
+
`:`
|
|
232
|
+
|
|
233
|
+
`,Q=q+J+Vz;if(N(Q)?.mcp_servers?.beacon?.command!=="beacon")return{added:!1,error:`could not safely append [mcp_servers.beacon] \u2014 ${u}`};return i(v(),Q),{added:!0}}function Fq(){let q="";try{q=m(v(),"utf8")}catch{return{removed:!1}}let z=q.split(`
|
|
234
|
+
`),J=z.indexOf(fq);if(J===-1)return{removed:!1,skipped:$q()};let Q=z.indexOf(Cq,J);if(Q===-1)return{removed:!1,skipped:!0};z.splice(J,Q-J+1);let V=z.join(`
|
|
235
|
+
`).replace(/\n{3,}/g,`
|
|
236
|
+
|
|
237
|
+
`).replace(/^\n+/,"");if(N(V)===null)return{removed:!1,skipped:!0};return i(v(),V),{removed:!0}}async function Zz(){let{INIT_SKILL:q,REFRESH_SKILL:z,PLAN_SKILL:J}=await Promise.resolve().then(() => (n(),d)),Q={"beacon-init":q,"beacon-refresh":z,"beacon-plan":J},V=[];for(let Z of w){if(!B(L(),Z))V.push(Z);y(L(),Z,Q[Z])}let Y=0;for(let Z of p)if(T(Zq(),{event:Z.event,matcher:Z.matcher,command:Z.command}))Y++;let P=j(k(),_);E(k(),_,bq,Qq);let W=Mq();return{skillsAdded:V,hooksAdded:Y,agentsMdBlockTouched:!P,mcp:W}}function $z(){let q={};for(let J of w)q[J]=B(L(),J);let z={};for(let J of p)z[J.event]=R(Zq(),{event:J.event,command:J.command});return{detected:Kq(),skills:q,hooks:z,agentsMdBlock:j(k(),_),mcp:$q()}}function Pz(){let q=[];for(let V of w)if(O(L(),V))q.push(V);let z=0;for(let V of p)if(I(Zq(),{event:V.event,command:V.command}))z++;let J=A(k(),_,bq),Q=Fq();return{skillsRemoved:q,hooksRemoved:z,agentsMdBlockRemoved:J,mcpRemoved:Q.removed,mcpSkipped:Q.skipped}}var Yq=()=>G(Gq(),".codex"),Zq=()=>G(Yq(),"hooks.json"),v=()=>G(Yq(),"config.toml"),k=()=>G(Yq(),"AGENTS.md"),L=()=>G(Gq(),".agents","skills"),_="<!-- beacon:global:start -->",bq="<!-- beacon:global:end -->",p,Vq,fq="# beacon:start (managed by Beacon \u2014 `beacon uninstall` removes this block)",Cq="# beacon:end",Vz,u="add it manually: codex mcp add beacon -- beacon mcp";var gq=g(()=>{l();Hq();Nq();p=[{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."}];Vz=`${fq}
|
|
238
|
+
[mcp_servers.beacon]
|
|
239
|
+
command = "beacon"
|
|
240
|
+
args = ["mcp"]
|
|
241
|
+
${Cq}
|
|
242
|
+
`});gq();export{Zz as setupCodexAssets,Fq as removeCodexMcp,Pz as removeCodexArtifacts,$q as hasCodexMcp,Mq as ensureCodexMcp,Yz as codexMcpProblem,Kq as codexDetected,$z as auditCodex,p as CODEX_HOOKS};
|