kontexta 4.7.1 → 5.1.0
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/bundle/standalone/CHANGELOG.md +38 -0
- package/bundle/standalone/apps/web/.next/BUILD_ID +1 -1
- package/bundle/standalone/apps/web/.next/app-build-manifest.json +109 -88
- package/bundle/standalone/apps/web/.next/app-path-routes-manifest.json +15 -12
- package/bundle/standalone/apps/web/.next/build-manifest.json +2 -2
- package/bundle/standalone/apps/web/.next/prerender-manifest.json +13 -13
- package/bundle/standalone/apps/web/.next/required-server-files.json +1 -0
- package/bundle/standalone/apps/web/.next/routes-manifest.json +16 -0
- package/bundle/standalone/apps/web/.next/server/app/_not-found/page.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/_not-found.html +1 -1
- package/bundle/standalone/apps/web/.next/server/app/_not-found.rsc +4 -4
- package/bundle/standalone/apps/web/.next/server/app/api/about/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/about/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/agents/[id]/hooks/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/agents/[id]/hooks/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/agents/[id]/hooks/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/agents/[id]/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/agents/[id]/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/agents/[id]/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/agents/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/agents/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/agents/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/auth/login/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/auth/login/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/auth/setup/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/auth/setup/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/auth/setup/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/auth/status/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/auth/status/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/auth/token/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/auth/token/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/auth/token/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/conflicts/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/conflicts/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/conflicts/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/[id]/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/[id]/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/[id]/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/[id]/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/[id]/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/[id]/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/ics/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/ics/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/ics/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/links/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/links/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/links/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/settings/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/settings/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/settings/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/clip/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/clip/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/clip/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/docker-config/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/docker-config/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/docker-config/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/export/zip/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/export/zip/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/export/zip/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/backlinks/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/backlinks/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/backlinks/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/download/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/download/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/download/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/export-html/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/export-html/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/export-html/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/export-pdf/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/export-pdf/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/export-pdf/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/restore/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/restore/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/restore/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/move/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/move/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/move/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/files/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/files/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/files/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/files/upload/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/files/upload/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/files/upload/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/folders/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/folders/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/folders/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/git/remote/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/git/remote/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/git/remote/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/git/sync-all/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/git/sync-all/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/git/sync-all/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/hands/test-pattern/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/hands/test-pattern/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/hands/validate/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/hands/validate/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/health/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/health/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/install-snippets/route.js +2 -2
- package/bundle/standalone/apps/web/.next/server/app/api/install-snippets/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/install-snippets/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/mcp-tools/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/mcp-tools/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/mcp-tools/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/profile/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/profile/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/hands-config/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/hands-config/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/hands-config/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-config/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-config/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-config/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-status/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-status/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-status/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/onboard/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/onboard/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/onboard/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/refresh/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/refresh/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/refresh/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/sync/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/sync/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/sync/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/projects/onboard/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/projects/onboard/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/projects/onboard/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/projects/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/projects/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/publish/html/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/publish/html/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/publish/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/publish/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/refresh/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/refresh/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/refresh/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/reindex/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/reindex/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/reindex/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/reports/resources/[name]/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/reports/resources/[name]/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/reports/resources/[name]/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/search/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/search/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/search/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/tags/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/tags/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/tags/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/version-check/route.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/version-check/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/version-check/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/welcome/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/welcome/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/ws-config/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/api/ws-config/route_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/apple-icon.png/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/calendar/page.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/calendar/page.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/calendar/page_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/favicon.ico/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/icon.png/route.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/login/page.js +2 -2
- package/bundle/standalone/apps/web/.next/server/app/login/page.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/page.js +4 -4
- package/bundle/standalone/apps/web/.next/server/app/page.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/preview/motifs/page.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/preview/motifs/page.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/app/preview/motifs/page_client-reference-manifest.js +1 -1
- package/bundle/standalone/apps/web/.next/server/app/preview/motifs.html +2 -2
- package/bundle/standalone/apps/web/.next/server/app/preview/motifs.rsc +23 -22
- package/bundle/standalone/apps/web/.next/server/app-paths-manifest.json +15 -12
- package/bundle/standalone/apps/web/.next/server/chunks/6680.js +1 -1
- package/bundle/standalone/apps/web/.next/server/pages/404.html +1 -1
- package/bundle/standalone/apps/web/.next/server/pages/500.html +1 -1
- package/bundle/standalone/apps/web/.next/server/pages/_app.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/pages/_document.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/pages/_error.js.nft.json +1 -1
- package/bundle/standalone/apps/web/.next/server/server-reference-manifest.json +1 -1
- package/bundle/standalone/apps/web/.next/static/IxgiSiK05GtQGxU41f-Mx/_buildManifest.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/771-863c84c2b052163a.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/about/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/agents/[id]/hooks/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/agents/[id]/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/agents/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/login/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/logout/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/setup/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/status/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/token/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/conflicts/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/entities/[id]/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/entities/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/events/[id]/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/events/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/ics/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/links/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/settings/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/clip/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/docker-config/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/export/zip/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/backlinks/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/download/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/export-html/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/export-pdf/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/history/restore/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/history/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/move/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/upload/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/folders/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/git/remote/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/git/sync-all/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/hands/test-pattern/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/hands/validate/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/health/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/install-snippets/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/mcp-tools/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/profile/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/hands-config/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/journal-config/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/journal-status/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/onboard/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/refresh/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/sync/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/onboard/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/publish/html/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/publish/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/refresh/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/reindex/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/reports/resources/[name]/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/search/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/tags/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/version-check/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/welcome/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/ws-config/route-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/{layout-3050c58d9809581a.js → layout-da10917c290d5da7.js} +1 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/page-4c19cddc721d832e.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/preview/motifs/page-0cc6597bb67aea3b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/css/198c34172598da00.css +3 -0
- package/bundle/standalone/apps/web/package.json +5 -5
- package/bundle/standalone/apps/web/server.js +1 -1
- package/bundle/standalone/apps/web/src/lib/mcp-tools.json +238 -543
- package/bundle/standalone/node_modules/kontexta-mcp/dist/agent-rules/rules-block.md +24 -35
- package/bundle/standalone/node_modules/kontexta-mcp/dist/calendar-tools.js +1 -1
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/formatter.js +1 -1
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/formatter.js.map +1 -1
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/schema-doc.js +1 -1
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks/emit.mjs +397 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-block.d.ts +13 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-block.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-block.js +27 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-block.js.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-cli.d.ts +3 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-cli.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-cli.js +141 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-cli.js.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/index.js +479 -475
- package/bundle/standalone/node_modules/kontexta-mcp/dist/index.js.map +1 -1
- package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-capture.d.ts.map +1 -1
- package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-capture.js +55 -9
- package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-capture.js.map +1 -1
- package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-tools.d.ts.map +1 -1
- package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-tools.js +1 -27
- package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-tools.js.map +1 -1
- package/bundle/standalone/node_modules/kontexta-mcp/dist/migrations/010-agents.sql +14 -0
- package/bundle/standalone/node_modules/kontexta-mcp/package.json +2 -2
- package/bundle/standalone/node_modules/kxta-core/dist/agent-rules/index.js +1 -1
- package/bundle/standalone/node_modules/kxta-core/dist/agent-rules/index.js.map +1 -1
- package/bundle/standalone/node_modules/kxta-core/dist/agent-rules/rules-block.md +24 -35
- package/bundle/standalone/node_modules/kxta-core/dist/db/index.d.ts +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/db/index.d.ts.map +1 -1
- package/bundle/standalone/node_modules/kxta-core/dist/db/index.js +19 -4
- package/bundle/standalone/node_modules/kxta-core/dist/db/index.js.map +1 -1
- package/bundle/standalone/node_modules/kxta-core/dist/db/migrations/010-agents.sql +14 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/agents.d.ts +86 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/agents.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/agents.js +24 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/agents.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/alerts.d.ts +25 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/alerts.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/alerts.js +44 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/alerts.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/emit.mjs +397 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/index.d.ts +14 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/index.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/index.js +8 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/index.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/install-mode.d.ts +3 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/install-mode.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/install-mode.js +15 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/install-mode.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/install.d.ts +30 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/install.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/install.js +92 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/install.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/claude-code.d.ts +2 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/claude-code.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/claude-code.js +13 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/claude-code.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/cline.d.ts +3 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/cline.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/cline.js +51 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/cline.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/codex.d.ts +2 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/codex.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/codex.js +16 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/codex.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/copilot.d.ts +3 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/copilot.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/copilot.js +41 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/copilot.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/flat.d.ts +13 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/flat.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/flat.js +76 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/flat.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/gemini.d.ts +2 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/gemini.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/gemini.js +12 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/gemini.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/grouped.d.ts +16 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/grouped.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/grouped.js +75 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/grouped.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/index.d.ts +5 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/index.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/index.js +19 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/index.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/json-config.d.ts +13 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/json-config.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/json-config.js +80 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/json-config.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/opencode.d.ts +3 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/opencode.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/opencode.js +76 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/opencode.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/types.d.ts +29 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/types.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/types.js +2 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/types.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/registry.d.ts +20 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/registry.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/registry.js +58 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/registry.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/stage.d.ts +18 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/stage.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/stage.js +115 -0
- package/bundle/standalone/node_modules/kxta-core/dist/hooks/stage.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/index.d.ts +2 -1
- package/bundle/standalone/node_modules/kxta-core/dist/index.d.ts.map +1 -1
- package/bundle/standalone/node_modules/kxta-core/dist/index.js +2 -1
- package/bundle/standalone/node_modules/kxta-core/dist/index.js.map +1 -1
- package/bundle/standalone/node_modules/kxta-core/dist/journal/distill.d.ts +5 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/distill.d.ts.map +1 -1
- package/bundle/standalone/node_modules/kxta-core/dist/journal/distill.js +136 -52
- package/bundle/standalone/node_modules/kxta-core/dist/journal/distill.js.map +1 -1
- package/bundle/standalone/node_modules/kxta-core/dist/journal/git-watcher.js +2 -2
- package/bundle/standalone/node_modules/kxta-core/dist/journal/git-watcher.js.map +1 -1
- package/bundle/standalone/node_modules/kxta-core/dist/journal/high-water.d.ts +4 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/high-water.d.ts.map +1 -1
- package/bundle/standalone/node_modules/kxta-core/dist/journal/high-water.js.map +1 -1
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/exploration.d.ts.map +1 -1
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/exploration.js +3 -14
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/exploration.js.map +1 -1
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/read-only-investigation.d.ts.map +1 -1
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/read-only-investigation.js +2 -13
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/read-only-investigation.js.map +1 -1
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/tool-classes.d.ts +3 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/tool-classes.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/tool-classes.js +64 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/tool-classes.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/renderer.d.ts +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/renderer.d.ts.map +1 -1
- package/bundle/standalone/node_modules/kxta-core/dist/journal/renderer.js +69 -2
- package/bundle/standalone/node_modules/kxta-core/dist/journal/renderer.js.map +1 -1
- package/bundle/standalone/node_modules/kxta-core/dist/journal/repository.d.ts +4 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/repository.d.ts.map +1 -1
- package/bundle/standalone/node_modules/kxta-core/dist/journal/repository.js +14 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/repository.js.map +1 -1
- package/bundle/standalone/node_modules/kxta-core/dist/journal/strict-mode.d.ts.map +1 -1
- package/bundle/standalone/node_modules/kxta-core/dist/journal/strict-mode.js +2 -17
- package/bundle/standalone/node_modules/kxta-core/dist/journal/strict-mode.js.map +1 -1
- package/bundle/standalone/node_modules/kxta-core/dist/journal/topic-detector.d.ts +14 -1
- package/bundle/standalone/node_modules/kxta-core/dist/journal/topic-detector.d.ts.map +1 -1
- package/bundle/standalone/node_modules/kxta-core/dist/journal/topic-detector.js +107 -20
- package/bundle/standalone/node_modules/kxta-core/dist/journal/topic-detector.js.map +1 -1
- package/bundle/standalone/node_modules/kxta-core/dist/journal/types.d.ts +15 -2
- package/bundle/standalone/node_modules/kxta-core/dist/journal/types.d.ts.map +1 -1
- package/bundle/standalone/node_modules/kxta-core/dist/metadata/index.d.ts.map +1 -1
- package/bundle/standalone/node_modules/kxta-core/dist/metadata/index.js +9 -0
- package/bundle/standalone/node_modules/kxta-core/dist/metadata/index.js.map +1 -1
- package/bundle/standalone/node_modules/kxta-core/dist/profile/index.d.ts.map +1 -1
- package/bundle/standalone/node_modules/kxta-core/dist/profile/index.js +14 -3
- package/bundle/standalone/node_modules/kxta-core/dist/profile/index.js.map +1 -1
- package/bundle/standalone/node_modules/kxta-core/dist/reports/sanitize.d.ts +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/reports/sanitize.d.ts.map +1 -1
- package/bundle/standalone/node_modules/kxta-core/dist/reports/sanitize.js +23 -3
- package/bundle/standalone/node_modules/kxta-core/dist/reports/sanitize.js.map +1 -1
- package/bundle/standalone/node_modules/kxta-core/dist/util/paths.d.ts.map +1 -1
- package/bundle/standalone/node_modules/kxta-core/dist/util/paths.js +16 -0
- package/bundle/standalone/node_modules/kxta-core/dist/util/paths.js.map +1 -1
- package/bundle/standalone/node_modules/kxta-core/package.json +2 -2
- package/bundle/standalone/node_modules/kxta-publish/package.json +3 -3
- package/bundle/standalone/package.json +2 -2
- package/dist/{mcp-DGMGR3MZ.js → chunk-C4XU73GP.js} +2 -0
- package/dist/{doctor-NTVE43EI.js → doctor-HQBEQUUQ.js} +10 -1
- package/dist/hooks-6RQ5CCTW.js +22 -0
- package/dist/index.js +10 -4
- package/dist/mcp-VGISMLKH.js +9 -0
- package/dist/{start-66WKQRN5.js → start-RJVUJT4B.js} +9 -0
- package/package.json +2 -2
- package/bundle/standalone/apps/web/.next/static/DWDlM7S8dTnMlrhKW9K_X/_buildManifest.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/1480-3e4f4a95f11429a9.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/about/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/login/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/logout/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/setup/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/status/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/token/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/conflicts/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/entities/[id]/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/entities/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/events/[id]/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/events/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/ics/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/links/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/settings/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/clip/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/docker-config/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/export/zip/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/backlinks/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/download/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/export-html/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/export-pdf/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/history/restore/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/history/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/move/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/upload/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/folders/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/git/remote/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/git/sync-all/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/hands/test-pattern/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/hands/validate/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/health/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/install-snippets/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/mcp-tools/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/profile/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/hands-config/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/journal-config/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/journal-status/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/onboard/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/refresh/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/sync/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/onboard/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/publish/html/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/publish/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/refresh/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/reindex/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/reports/resources/[name]/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/search/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/tags/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/version-check/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/welcome/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/ws-config/route-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/page-eccc7438c998fcce.js +0 -1
- package/bundle/standalone/apps/web/.next/static/chunks/app/preview/motifs/page-f5e054069fb68dd7.js +0 -1
- package/bundle/standalone/apps/web/.next/static/css/35a6a6dfd2c31933.css +0 -3
- /package/bundle/standalone/apps/web/.next/static/{DWDlM7S8dTnMlrhKW9K_X → IxgiSiK05GtQGxU41f-Mx}/_ssgManifest.js +0 -0
|
@@ -21,17 +21,19 @@ This project is registered with kontexta. Honor these rules to keep the index, h
|
|
|
21
21
|
|
|
22
22
|
**Print the session welcome as your first message.** On the very first turn of any new session, call `admin.refresh_session_context` and print a brief greeting to the user based on what it returns — today's date, their name from the profile, upcoming events / conflicts if any, a nudge if the profile is empty or stale. 1–3 lines, not a report. Two reasons: (1) if the client lazy-loads MCP servers, this is what actually triggers `initialize`; (2) the user sees kontexta is connected and knows what context you have. Skip if the user's first message is already a work request — do the work.
|
|
23
23
|
|
|
24
|
-
**Search before reading.** Use `files.search
|
|
24
|
+
**Search before reading.** Use `files.search` (pass `include_bodies: true` for token-budgeted bodies) or `files.regex_search` to find context first. Skipping straight to `files.read` on a guessed path wastes tokens and often misses the right file.
|
|
25
25
|
|
|
26
|
-
**All KB writes go through kontexta.** Use `files.create` / `files.update`
|
|
26
|
+
**All KB writes go through kontexta.** Use `files.create` / `files.update` (pass `section` for a surgical single-heading edit) / `journal.write`. **Never** edit a KB file with raw filesystem tools (Edit/Write/cat) — the watcher and FTS index will diverge until `projects.refresh_index` runs, and subsequent searches will return stale results.
|
|
27
27
|
|
|
28
|
-
**Batch reads. Don't loop `files.read`.** Need ≥2 files? Call `files.
|
|
28
|
+
**Batch reads. Don't loop `files.read`.** Need ≥2 files? Call `files.read` with `ids: [...]` (one round-trip, up to 200 IDs) or `files.search` with `include_bodies: true` (token-budgeted blob). Looping single-ID `files.read` calls wastes round-trips and inflates response overhead.
|
|
29
29
|
|
|
30
30
|
**Address `journal.suggested_action` before the next tool call.** Many tool responses include a `journal` envelope. If `journal.suggested_action` is set (e.g., `"journal.distill"`), call that tool before issuing your next tool. To dismiss for the rest of the session, pass `journal_acknowledge: true` on your next tool call.
|
|
31
31
|
|
|
32
|
-
**
|
|
32
|
+
**Relay `hooks` prompts once per session.** If a tool response carries a `hooks.prompt` (or the session welcome mentions hooks), tell the user once that kontexta can capture their conversation and shell commands for the agents they enabled. Only call `admin.onboard_agent` with `hooks: true` after they agree.
|
|
33
33
|
|
|
34
|
-
**Use `journal.
|
|
34
|
+
**Use `journal.write({kind: "note", text, tags})` for decisions and abandonments.** When you make a non-obvious call, try something that doesn't work, or capture a workaround, log it. Hands runs are auto-captured now.
|
|
35
|
+
|
|
36
|
+
**Use `journal.write({kind: "intent", summary})` when the user pivots.** One short sentence so the distillation step knows the topic shifted.
|
|
35
37
|
|
|
36
38
|
**Strict mode awareness.** If a project sets `journal.mode = "strict"` in its `kontexta.json`, the MCP server returns a `JOURNAL_BACKLOG` error on read tools (search/read_*/list_*) when undistilled events exist. The error includes `next_action: "journal.distill"`. Either run `journal.distill` first, OR pass `journal_bypass: true` on the read call to override (logged for audit).
|
|
37
39
|
|
|
@@ -41,7 +43,7 @@ This project is registered with kontexta. Honor these rules to keep the index, h
|
|
|
41
43
|
|
|
42
44
|
**Tag new KB files at creation time.** Pass `tags` on `files.create`, or call `tags.add` immediately after. Untagged files are recoverable but invisible to `files.find_related`.
|
|
43
45
|
|
|
44
|
-
**`admin.whats_new` early. `admin.commit_backup` late.** Run
|
|
46
|
+
**`admin.overview({mode: "whats_new"})` early. `admin.commit_backup` late.** Run it at session start if you've been away — it returns files added/changed since a cutoff. End the session with `admin.commit_backup` if you mutated KB files and the project has a remote.
|
|
45
47
|
|
|
46
48
|
**Use `.mmd` for diagrams, not fenced code in `.md`.** When creating an architecture / flow / sequence diagram, call `files.create` with `format: "mmd"` and put the raw mermaid source as the body (no ```` ```mermaid ```` fence). The web UI renders `.mmd` files as live diagrams with SVG/PNG export; mermaid embedded in markdown is just text. Default folder: `mermaid/` (or `<project>/mermaid/` for project-scoped diagrams).
|
|
47
49
|
|
|
@@ -52,7 +54,7 @@ KIs are curated, distilled KB files — the highest-signal context in the vault.
|
|
|
52
54
|
They save tokens and prevent redundant research when used correctly.
|
|
53
55
|
|
|
54
56
|
**Check KIs before independent research.** At the start of any task, run
|
|
55
|
-
`files.search`
|
|
57
|
+
`files.search` (optionally `include_bodies: true`) over the KB for the task topic. If a matching KI
|
|
56
58
|
exists, read it before writing code, designing architecture, or forming a plan.
|
|
57
59
|
Skipping this step is the single most common source of duplicated work.
|
|
58
60
|
|
|
@@ -62,17 +64,17 @@ cross-reference a KI's API patterns, file paths, and config values against the
|
|
|
62
64
|
|
|
63
65
|
**Close the loop: update the KI after significant changes.** When you ship a
|
|
64
66
|
meaningful change (new API, config schema change, architecture shift), update
|
|
65
|
-
the relevant KI via `files.update` or `
|
|
67
|
+
the relevant KI via `files.update` (whole file or, with `section`, one heading). If no KI exists
|
|
66
68
|
yet, create one with `files.create` under `knowledge/` with appropriate tags.
|
|
67
69
|
A KI that isn't maintained becomes noise — which is worse than no KI.
|
|
68
70
|
|
|
69
|
-
**Use `admin.whats_new` at session start after a gap.** If you haven't touched the
|
|
70
|
-
project in a while, run `
|
|
71
|
+
**Use `admin.overview({mode: "whats_new"})` at session start after a gap.** If you haven't touched the
|
|
72
|
+
project in a while, run it with `since: "7d"` to surface recently changed
|
|
71
73
|
files — including KIs updated by other agents or the user.
|
|
72
74
|
|
|
73
75
|
### Content class
|
|
74
76
|
|
|
75
|
-
`files.create`
|
|
77
|
+
`files.create` requires `kind` for KB writes (single file or `files` array, both):
|
|
76
78
|
- **`dictionary`** = source of truth (mappings, glossaries, runbooks, PR templates, architecture docs)
|
|
77
79
|
- **`note`** = snapshot (meeting notes, PR findings, sprint reviews, post-mortems, working thoughts)
|
|
78
80
|
|
|
@@ -86,10 +88,8 @@ The matrix below is grouped by intent. For each tool: when to reach for it, the
|
|
|
86
88
|
|
|
87
89
|
| Tool | When | Not when | Use instead |
|
|
88
90
|
|---|---|---|---|
|
|
89
|
-
| `files.search` | Natural-language keyword across KB (FTS) | Substrings, URLs, code idents | `files.regex_search` |
|
|
90
|
-
| `files.regex_search` | Substrings, URLs, code identifiers | Natural-language queries | `files.search` |
|
|
91
|
-
| `files.grep` | Substring/regex within ONE known file | Searching across files | `files.regex_search` |
|
|
92
|
-
| `files.bundle_search` | Need search hits + bodies in a token budget | Only need IDs | `files.search` |
|
|
91
|
+
| `files.search` | Natural-language keyword across KB (FTS); pass `include_bodies: true` for a token-budgeted bundle of hits + bodies | Substrings, URLs, code idents | `files.regex_search` |
|
|
92
|
+
| `files.regex_search` | Substrings, URLs, code identifiers across files; pass `file_id` to scan just one known file | Natural-language queries | `files.search` |
|
|
93
93
|
| `files.find_related` | Discover siblings via tag overlap | Text content matching | `files.search` |
|
|
94
94
|
| `tags.suggest` | Propose tags for an existing file | Finding files by tag | `files.find_related` |
|
|
95
95
|
|
|
@@ -97,11 +97,7 @@ The matrix below is grouped by intent. For each tool: when to reach for it, the
|
|
|
97
97
|
|
|
98
98
|
| Tool | When | Not when | Use instead |
|
|
99
99
|
|---|---|---|---|
|
|
100
|
-
| `files.read` | One file
|
|
101
|
-
| `files.read_many` | 2–200 file IDs in one call | Only need a section of one file | `files.read_section` |
|
|
102
|
-
| `files.read_by_path` | Known absolute path, no ID handy | You already have the ID | `files.read` |
|
|
103
|
-
| `files.read_lines` | Known line range | Guessing line numbers | `files.read_section` |
|
|
104
|
-
| `files.read_section` | Known heading | Need the whole file | `files.read` |
|
|
100
|
+
| `files.read` | One file (`id` or `path`), a batch (`ids`), or a partial read (`section` or `lines`) | Only metadata needed | `files.describe` |
|
|
105
101
|
| `files.read_outline` | Triaging an unfamiliar file's structure | Structure already known | `files.describe` |
|
|
106
102
|
| `files.describe` | Metadata only (size, tags, mtime) | Need content | `files.read` |
|
|
107
103
|
| `admin.get_profile` | Read user profile/context at session start | Reading normal files | `files.read` |
|
|
@@ -110,12 +106,9 @@ The matrix below is grouped by intent. For each tool: when to reach for it, the
|
|
|
110
106
|
|
|
111
107
|
| Tool | When | Not when | Use instead |
|
|
112
108
|
|---|---|---|---|
|
|
113
|
-
| `files.create` | One new file (md, mmd, or html via `format`) |
|
|
114
|
-
| `files.
|
|
115
|
-
| `files.
|
|
116
|
-
| `files.update_section` | Surgical edit at a known heading | Replacing the whole file | `files.update` |
|
|
117
|
-
| `files.delete` | One file | Bulk delete | `files.delete_many` |
|
|
118
|
-
| `files.delete_many` | 2+ files in one call | Single file | `files.delete` |
|
|
109
|
+
| `files.create` | One new file, or a `files` array for bulk-creating ≥2 (md, mmd, or html via `format`) | File already exists | `files.update` |
|
|
110
|
+
| `files.update` | Replacing the whole body, or a surgical edit at a known heading via `section` | File doesn't exist yet | `files.create` |
|
|
111
|
+
| `files.delete` | One file, or an `ids` array for bulk delete | Want to keep the file but hide it | `tags.remove` / `tags.set_favorite` |
|
|
119
112
|
| `files.move` | Rename or relocate a file | File content needs changing | `files.update` |
|
|
120
113
|
|
|
121
114
|
#### Organize
|
|
@@ -127,17 +120,15 @@ The matrix below is grouped by intent. For each tool: when to reach for it, the
|
|
|
127
120
|
| `tags.list` | Enumerate all tags in the vault | Want files for a given tag | `files.find_related` |
|
|
128
121
|
| `tags.set_favorite` | Pin / unpin a file | Semantic categorization | `tags.add` |
|
|
129
122
|
| `tags.search` | Bulk-tag every hit from a search | Tagging a single file | `tags.add` |
|
|
130
|
-
| `journal.
|
|
131
|
-
| `journal.
|
|
132
|
-
| `journal.append` | Append timestamped text to today's daily KB journal file | Structured notes | `journal.note` |
|
|
133
|
-
| `journal.distill` | Summarize accumulated journal events | Individual events | `journal.note` |
|
|
123
|
+
| `journal.write` | Log an event: `kind: "note"` (decision/workaround), `kind: "intent"` (topic pivot), or `kind: "append"` (timestamped daily journal entry) | Summarizing accumulated events | `journal.distill` |
|
|
124
|
+
| `journal.distill` | Summarize accumulated journal events | Individual events | `journal.write` |
|
|
134
125
|
| `journal.status` | Check backlog size and high-water mark before distilling | Need the raw events themselves | `journal.distill` |
|
|
135
126
|
| `journal.commit_upgrades` | Mark journal entries upgraded after a subagent rewrites them | Running the initial distillation | `journal.distill` |
|
|
136
127
|
| `journal.housekeep` | Prune old raw journal files and archive cold tasks | Need to distill new events first | `journal.distill` |
|
|
137
128
|
| `resources.clip_url` | Capture a web URL into the KB | Saving a local file | `files.create` |
|
|
138
129
|
| `folders.list` | Enumerate folders in the project | Finding files | `files.list` |
|
|
139
130
|
| `folders.create` | Create a new (possibly nested) folder | Files don't need explicit folders | |
|
|
140
|
-
| `folders.delete` | Remove an empty folder | Folder still has files | `files.
|
|
131
|
+
| `folders.delete` | Remove an empty folder | Folder still has files | `files.delete` (bulk) first |
|
|
141
132
|
|
|
142
133
|
#### Reports
|
|
143
134
|
|
|
@@ -166,8 +157,7 @@ The matrix below is grouped by intent. For each tool: when to reach for it, the
|
|
|
166
157
|
| `projects.list` | Enumerate registered projects | Files within one project | `files.list` |
|
|
167
158
|
| `files.list` | Files in a project (filterable) | Full-text content matters | `files.search` |
|
|
168
159
|
| `projects.map` | Folder/file tree for a project | Flat file list | `files.list` |
|
|
169
|
-
| `admin.
|
|
170
|
-
| `admin.whats_new` | Files added/changed since a cutoff | Full-text search | `files.search` |
|
|
160
|
+
| `admin.overview` | `mode: "stats"` for counts/health, `mode: "whats_new"` for files changed since a cutoff | Per-file detail or full-text search | `files.describe` / `files.search` |
|
|
171
161
|
| `admin.refresh_session_context` | Re-fetch profile + upcoming events after mid-session edits | Reading a single profile field | `admin.get_profile` |
|
|
172
162
|
|
|
173
163
|
#### Calendar
|
|
@@ -190,8 +180,7 @@ The matrix below is grouped by intent. For each tool: when to reach for it, the
|
|
|
190
180
|
|
|
191
181
|
| Tool | When | Not when | Use instead |
|
|
192
182
|
|---|---|---|---|
|
|
193
|
-
| `hands.list` | Enumerate Hands tools
|
|
194
|
-
| `hands.describe_schema` | Explain the `hands.yaml` format | Listing tools | `hands.list` |
|
|
183
|
+
| `hands.list` | Enumerate Hands tools; pass `schema: true` for the `kontexta.json` authoring reference | Neither list nor schema needed | |
|
|
195
184
|
| `hands.confirm` | Approve a Hands token within 60s of issue | Normal MCP tool calls | |
|
|
196
185
|
| `hands.reload` | Re-read `hands.yaml` after editing it | First-time use (auto-loads) | |
|
|
197
186
|
|
|
@@ -29,7 +29,7 @@ function withLinks(entity) {
|
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
export function registerCalendarTools(server) {
|
|
32
|
-
server.tool("calendar.entities.add", "SIDE-EFFECTFUL. Create a new tracked entity — any named thing you schedule events against (a server, a delivery van, a store location, a piece of equipment, a room, etc.). Not idempotent: a duplicate name (case-insensitive) throws. Returns `{entity}`. Use `
|
|
32
|
+
server.tool("calendar.entities.add", "SIDE-EFFECTFUL. Create a new tracked entity — any named thing you schedule events against (a server, a delivery van, a store location, a piece of equipment, a room, etc.). Not idempotent: a duplicate name (case-insensitive) throws. Returns `{entity}`. Use `calendar.entities.link` afterwards to record dependencies for conflict detection.", {
|
|
33
33
|
name: z.string().min(1).describe("Unique display name for the entity (case-insensitive)."),
|
|
34
34
|
kind: z.string().optional().describe("Freeform category, e.g. 'server', 'vehicle', 'location', 'equipment'."),
|
|
35
35
|
notes: z.string().optional().describe("Freeform notes."),
|
|
@@ -32,7 +32,7 @@ export function formatPendingConfirm(p) {
|
|
|
32
32
|
...p.resolvedArgv.map((a, i) => ` [${i}] ${a}`),
|
|
33
33
|
` Working dir: ${p.workingDir}`,
|
|
34
34
|
``,
|
|
35
|
-
`To approve, call:
|
|
35
|
+
`To approve, call: hands.confirm({ token: "${p.token}" })`,
|
|
36
36
|
`This token expires in 60 seconds.`,
|
|
37
37
|
].join("\n");
|
|
38
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatter.js","sourceRoot":"","sources":["../../src/hands/formatter.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,gBAAgB,CAAC,QAAgB,EAAE,CAAa;IAC9D,MAAM,UAAU,GAAI;QAClB,OAAO,EAAE,iBAAiB,CAAC,CAAC,QAAQ,GAAG;QACvC,MAAM,EAAG,gBAAgB,CAAC,CAAC,QAAQ,GAAG;QACtC,OAAO,EAAE,SAAS;QAClB,QAAQ,EAAE,WAAW,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE;KAC/D,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAEtB,MAAM,MAAM,GAAG,CAAC,CAAC,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAChD,MAAM,KAAK,GAAG;QACZ,YAAY,QAAQ,EAAE;QACtB,eAAe,UAAU,EAAE;QAC3B,iBAAiB,MAAM,GAAG;QAC1B,0BAA0B,CAAC,CAAC,UAAU,EAAE;QACxC,EAAE;QACF,YAAY;QACZ,KAAK;QACL,CAAC,CAAC,MAAM,IAAI,EAAE;QACd,KAAK;KACN,CAAC;IACF,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACvD,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAUD,MAAM,UAAU,oBAAoB,CAAC,CAAqB;IACxD,OAAO;QACL,mDAAmD;QACnD,EAAE;QACF,cAAc,CAAC,CAAC,QAAQ,EAAE;QAC1B,cAAc,CAAC,CAAC,WAAW,EAAE;QAC7B,uBAAuB;QACvB,GAAG,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAClD,kBAAkB,CAAC,CAAC,UAAU,EAAE;QAChC,EAAE;QACF,
|
|
1
|
+
{"version":3,"file":"formatter.js","sourceRoot":"","sources":["../../src/hands/formatter.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,gBAAgB,CAAC,QAAgB,EAAE,CAAa;IAC9D,MAAM,UAAU,GAAI;QAClB,OAAO,EAAE,iBAAiB,CAAC,CAAC,QAAQ,GAAG;QACvC,MAAM,EAAG,gBAAgB,CAAC,CAAC,QAAQ,GAAG;QACtC,OAAO,EAAE,SAAS;QAClB,QAAQ,EAAE,WAAW,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE;KAC/D,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAEtB,MAAM,MAAM,GAAG,CAAC,CAAC,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAChD,MAAM,KAAK,GAAG;QACZ,YAAY,QAAQ,EAAE;QACtB,eAAe,UAAU,EAAE;QAC3B,iBAAiB,MAAM,GAAG;QAC1B,0BAA0B,CAAC,CAAC,UAAU,EAAE;QACxC,EAAE;QACF,YAAY;QACZ,KAAK;QACL,CAAC,CAAC,MAAM,IAAI,EAAE;QACd,KAAK;KACN,CAAC;IACF,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACvD,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAUD,MAAM,UAAU,oBAAoB,CAAC,CAAqB;IACxD,OAAO;QACL,mDAAmD;QACnD,EAAE;QACF,cAAc,CAAC,CAAC,QAAQ,EAAE;QAC1B,cAAc,CAAC,CAAC,WAAW,EAAE;QAC7B,uBAAuB;QACvB,GAAG,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAClD,kBAAkB,CAAC,CAAC,UAAU,EAAE;QAChC,EAAE;QACF,6CAA6C,CAAC,CAAC,KAAK,MAAM;QAC1D,mCAAmC;KACpC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -63,7 +63,7 @@ export function buildSchemaDoc() {
|
|
|
63
63
|
- **\`workingDir\`** — optional, relative to project root. Must not contain \`..\`. Symlinks are resolved and verified to remain inside the project root.
|
|
64
64
|
- **\`timeout\`** — optional, milliseconds. Default 60000, max 300000 (clamped).
|
|
65
65
|
- **\`danger\`** — \`safe | moderate | high\`. Default \`safe\`. Informational; \`confirm: true\` is what actually pauses execution.
|
|
66
|
-
- **\`confirm\`** — boolean, default false. When true, the first call returns a token; agent must call \`
|
|
66
|
+
- **\`confirm\`** — boolean, default false. When true, the first call returns a token; agent must call \`hands.confirm({ token })\` to actually execute.
|
|
67
67
|
- **\`disabled\`** — boolean, default false. Disabled tools are validated but never registered. Agent never sees them.
|
|
68
68
|
- **\`argSeparator\`** — boolean, default false. When true, \`--\` is inserted in argv before the first substituted element.
|
|
69
69
|
- **\`maxOutputBytes\`** — optional, per-stream output cap. Default 100000, max 1000000 (clamped).
|
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
// kontexta-hooks v0.0.0-dev
|
|
2
|
+
// Dependency-free journal emitter invoked by coding-agent hooks. Prints nothing, always exits 0.
|
|
3
|
+
import { readFileSync, appendFileSync, mkdirSync, writeFileSync, statSync } from "node:fs";
|
|
4
|
+
import { join, dirname, resolve, isAbsolute } from "node:path";
|
|
5
|
+
import { homedir, platform } from "node:os";
|
|
6
|
+
import { pathToFileURL } from "node:url";
|
|
7
|
+
|
|
8
|
+
const MAX_STDIN_BYTES = 1_000_000;
|
|
9
|
+
const DEFAULT_CAPS = { prompt_max_bytes: 8192, reply_max_bytes: 4096, command_max_bytes: 2048 };
|
|
10
|
+
const BLOCKED_KEY_RE = /(password|token|secret|auth|cookie|bearer|api[_-]?key)/i;
|
|
11
|
+
const REDACTED = "<redacted>";
|
|
12
|
+
// Bounded quantifiers around the key words keep the key=value pattern linear on long unbroken tokens.
|
|
13
|
+
const VALUE_PATTERNS = [
|
|
14
|
+
[/ghp_[A-Za-z0-9]{20,}/g, REDACTED],
|
|
15
|
+
[/github_pat_[A-Za-z0-9_]{20,}/g, REDACTED],
|
|
16
|
+
[/glpat-[A-Za-z0-9_-]{20,}/g, REDACTED],
|
|
17
|
+
[/AIza[0-9A-Za-z_-]{30,}/g, REDACTED],
|
|
18
|
+
[/sk-[A-Za-z0-9_-]{20,}/g, REDACTED],
|
|
19
|
+
[/sk_(?:live|test)_[A-Za-z0-9]{16,}/g, REDACTED],
|
|
20
|
+
[/xox[baprs]-[A-Za-z0-9-]{10,}/g, REDACTED],
|
|
21
|
+
[/xapp-[A-Za-z0-9-]{10,}/g, REDACTED],
|
|
22
|
+
[/AKIA[0-9A-Z]{16}/g, REDACTED],
|
|
23
|
+
[/(?:npm|hf)_[A-Za-z0-9]{30,}/g, REDACTED],
|
|
24
|
+
[/eyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}/g, REDACTED],
|
|
25
|
+
[/-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z ]*PRIVATE KEY-----/g, REDACTED],
|
|
26
|
+
[/\b(Bearer|Basic)\s+[A-Za-z0-9._~+/=-]{16,}/gi, `$1 ${REDACTED}`],
|
|
27
|
+
[/(:\/\/)[^\s:@/]+:[^\s@/]+@/g, `$1${REDACTED}@`],
|
|
28
|
+
[/(^|\s)(-u|--user)\s+[^\s:]+:\S+/g, `$1$2 ${REDACTED}`],
|
|
29
|
+
[/([A-Za-z0-9_.-]{0,40}(?:password|passwd|pwd|secret|token|api[_-]?key|access[_-]?key|private[_-]?key)[A-Za-z0-9_.-]{0,40})\s*[=:]\s*("[^"]*"|'[^']*'|[^\s"']+)/gi, `$1=${REDACTED}`],
|
|
30
|
+
[/\b(password|passwd|pwd)\s+is\s+\S+/gi, `$1 is ${REDACTED}`],
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
// ---------- small helpers ----------
|
|
34
|
+
const str = (v) => typeof v === "string" && v.length > 0;
|
|
35
|
+
|
|
36
|
+
export function redactText(s) {
|
|
37
|
+
let out = s;
|
|
38
|
+
for (const [re, replacement] of VALUE_PATTERNS) out = out.replace(re, replacement);
|
|
39
|
+
return out;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function redactDeep(v) {
|
|
43
|
+
if (typeof v === "string") return redactText(v);
|
|
44
|
+
if (Array.isArray(v)) return v.map(redactDeep);
|
|
45
|
+
if (v && typeof v === "object") {
|
|
46
|
+
const o = {};
|
|
47
|
+
for (const [k, val] of Object.entries(v)) o[k] = BLOCKED_KEY_RE.test(k) ? REDACTED : redactDeep(val);
|
|
48
|
+
return o;
|
|
49
|
+
}
|
|
50
|
+
return v;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function capUtf8(s, max) {
|
|
54
|
+
const buf = Buffer.from(s, "utf8");
|
|
55
|
+
if (buf.length <= max) return { text: s, truncated: false, bytes: buf.length };
|
|
56
|
+
let cut = max;
|
|
57
|
+
while (cut > 0 && (buf[cut] & 0xc0) === 0x80) cut--;
|
|
58
|
+
return { text: buf.subarray(0, cut).toString("utf8"), truncated: true, bytes: buf.length };
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function defaultDataDir() {
|
|
62
|
+
const home = homedir();
|
|
63
|
+
switch (platform()) {
|
|
64
|
+
case "darwin": return join(home, "Library", "Application Support", "kontexta");
|
|
65
|
+
case "win32": return join(process.env.APPDATA ?? join(home, "AppData", "Roaming"), "kontexta");
|
|
66
|
+
default: return join(process.env.XDG_DATA_HOME ?? join(home, ".local", "share"), "kontexta");
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function resolveDataDir(argv, env) {
|
|
71
|
+
if (str(env.KONTEXTA_DATA_DIR)) return resolve(env.KONTEXTA_DATA_DIR);
|
|
72
|
+
const i = argv.indexOf("--data-dir");
|
|
73
|
+
if (i >= 0 && str(argv[i + 1])) return resolve(argv[i + 1]);
|
|
74
|
+
try {
|
|
75
|
+
const cached = readFileSync(join(homedir(), ".kontexta_datadir"), "utf8").trim();
|
|
76
|
+
if (cached && isAbsolute(cached)) return cached;
|
|
77
|
+
} catch {}
|
|
78
|
+
return defaultDataDir();
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function argValue(argv, flag) {
|
|
82
|
+
const i = argv.indexOf(flag);
|
|
83
|
+
return i >= 0 && str(argv[i + 1]) ? argv[i + 1] : undefined;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function readCaps(dataDir) {
|
|
87
|
+
try {
|
|
88
|
+
const cfg = JSON.parse(readFileSync(join(dataDir, "kontexta.json"), "utf8"));
|
|
89
|
+
const h = cfg?.journal?.hooks ?? {};
|
|
90
|
+
const pick = (k) => (Number.isInteger(h[k]) && h[k] > 0 ? h[k] : DEFAULT_CAPS[k]);
|
|
91
|
+
return { prompt_max_bytes: pick("prompt_max_bytes"), reply_max_bytes: pick("reply_max_bytes"), command_max_bytes: pick("command_max_bytes") };
|
|
92
|
+
} catch { return { ...DEFAULT_CAPS }; }
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Windows paths differ in separator and drive-letter case between the registered path and the agent-reported cwd, so compare a normalised form.
|
|
96
|
+
function normPath(p) {
|
|
97
|
+
const win = /^[A-Za-z]:[\\/]/.test(p);
|
|
98
|
+
let q = p.replace(/\\/g, "/");
|
|
99
|
+
if (win) q = q.toLowerCase();
|
|
100
|
+
return q.endsWith("/") ? q : q + "/";
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export function slugFor(cwd, dataDir) {
|
|
104
|
+
try {
|
|
105
|
+
const { projects } = JSON.parse(readFileSync(join(dataDir, "hooks", "projects.json"), "utf8"));
|
|
106
|
+
const c = normPath(cwd);
|
|
107
|
+
let best = null;
|
|
108
|
+
for (const p of projects ?? []) {
|
|
109
|
+
if (!str(p?.path) || !str(p?.slug)) continue;
|
|
110
|
+
const base = normPath(p.path);
|
|
111
|
+
if (c.startsWith(base) && (!best || base.length > best.len)) best = { slug: p.slug, len: base.length };
|
|
112
|
+
}
|
|
113
|
+
return best ? best.slug : "default";
|
|
114
|
+
} catch { return "default"; }
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function findGitDir(start) {
|
|
118
|
+
let dir = start;
|
|
119
|
+
for (let i = 0; i < 64; i++) {
|
|
120
|
+
const candidate = join(dir, ".git");
|
|
121
|
+
try {
|
|
122
|
+
const st = statSync(candidate);
|
|
123
|
+
if (st.isDirectory()) return candidate;
|
|
124
|
+
const m = readFileSync(candidate, "utf8").match(/^gitdir:\s*(.+)$/m);
|
|
125
|
+
if (m) return isAbsolute(m[1].trim()) ? m[1].trim() : resolve(dir, m[1].trim());
|
|
126
|
+
} catch {}
|
|
127
|
+
const parent = dirname(dir);
|
|
128
|
+
if (parent === dir) return null;
|
|
129
|
+
dir = parent;
|
|
130
|
+
}
|
|
131
|
+
return null;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function gitBranch(cwd) {
|
|
135
|
+
const gitDir = findGitDir(cwd);
|
|
136
|
+
if (!gitDir) return null;
|
|
137
|
+
try {
|
|
138
|
+
const head = readFileSync(join(gitDir, "HEAD"), "utf8").trim();
|
|
139
|
+
const ref = head.match(/^ref:\s*refs\/heads\/(.+)$/);
|
|
140
|
+
if (ref) return { branch: ref[1], head: null };
|
|
141
|
+
return { branch: head.slice(0, 7), head };
|
|
142
|
+
} catch { return null; }
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function stdinTimeoutMs(env) {
|
|
146
|
+
const n = Number(env.KONTEXTA_HOOK_STDIN_TIMEOUT_MS);
|
|
147
|
+
return Number.isInteger(n) && n > 0 ? n : 5000;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// Stream (not readFileSync) so a non-blocking or never-closing stdin can't hang or crash the agent's turn; gives up after the timeout.
|
|
151
|
+
function readStdin(timeoutMs) {
|
|
152
|
+
return new Promise((resolve) => {
|
|
153
|
+
const chunks = [];
|
|
154
|
+
let total = 0;
|
|
155
|
+
let done = false;
|
|
156
|
+
const finish = (v) => { if (done) return; done = true; clearTimeout(timer); resolve(v); };
|
|
157
|
+
const timer = setTimeout(() => finish(null), timeoutMs);
|
|
158
|
+
process.stdin.on("data", (c) => {
|
|
159
|
+
total += c.length;
|
|
160
|
+
if (total > MAX_STDIN_BYTES) { finish(null); return; }
|
|
161
|
+
chunks.push(c);
|
|
162
|
+
});
|
|
163
|
+
process.stdin.on("end", () => finish(Buffer.concat(chunks).toString("utf8")));
|
|
164
|
+
process.stdin.on("error", () => finish(null));
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
function commandString(v) {
|
|
169
|
+
if (str(v)) return v;
|
|
170
|
+
if (Array.isArray(v) && v.length > 0 && v.every(str)) return v.join(" ");
|
|
171
|
+
return null;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// ---------- adapters: agent payload → partial events ----------
|
|
175
|
+
function askUserQuestion(p, sid) {
|
|
176
|
+
const qs = Array.isArray(p.tool_input?.questions) ? p.tool_input.questions : [];
|
|
177
|
+
const resp = p.tool_response;
|
|
178
|
+
const answers = resp && typeof resp === "object" && resp.answers && typeof resp.answers === "object" ? resp.answers : null;
|
|
179
|
+
const questions = [];
|
|
180
|
+
qs.forEach((q, i) => {
|
|
181
|
+
const question = str(q?.question) ? q.question : str(q?.header) ? q.header : null;
|
|
182
|
+
if (!question) return;
|
|
183
|
+
let a = answers ? (answers[question] ?? answers[q?.header] ?? (Array.isArray(answers) ? answers[i] : undefined)) : undefined;
|
|
184
|
+
if (a !== undefined && typeof a !== "string") a = JSON.stringify(a);
|
|
185
|
+
questions.push(a === undefined ? { question } : { question, answer: a });
|
|
186
|
+
});
|
|
187
|
+
return questions.length ? [{ event: "agent_question", questions, sid }] : [];
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
function adaptClaudeCode(p) {
|
|
191
|
+
const sid = p.session_id;
|
|
192
|
+
switch (p.hook_event_name) {
|
|
193
|
+
case "UserPromptSubmit": return str(p.prompt) ? [{ event: "user_prompt", text: p.prompt, sid }] : [];
|
|
194
|
+
case "Stop": return str(p.last_assistant_message) ? [{ event: "agent_reply", text: p.last_assistant_message, sid }] : [];
|
|
195
|
+
case "SubagentStop": return str(p.last_assistant_message) ? [{ event: "agent_reply", text: p.last_assistant_message, sid, subagent: true }] : [];
|
|
196
|
+
case "PostToolUse":
|
|
197
|
+
if (p.tool_name === "Bash" && str(p.tool_input?.command)) return [{ event: "shell", command: p.tool_input.command, sid }];
|
|
198
|
+
if (p.tool_name === "AskUserQuestion") return askUserQuestion(p, sid);
|
|
199
|
+
return [];
|
|
200
|
+
default: return [];
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
function adaptGemini(p) {
|
|
205
|
+
const sid = p.session_id;
|
|
206
|
+
switch (p.hook_event_name) {
|
|
207
|
+
case "BeforeAgent": return str(p.prompt) ? [{ event: "user_prompt", text: p.prompt, sid }] : [];
|
|
208
|
+
case "AfterAgent": return str(p.prompt_response) ? [{ event: "agent_reply", text: p.prompt_response, sid }] : [];
|
|
209
|
+
case "AfterTool": {
|
|
210
|
+
const c = p.tool_name === "run_shell_command" ? commandString(p.tool_input?.command) : null;
|
|
211
|
+
return c ? [{ event: "shell", command: c, sid }] : [];
|
|
212
|
+
}
|
|
213
|
+
default: return [];
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
const CODEX_SHELL_TOOLS = new Set(["shell", "local_shell", "exec_command", "bash", "container.exec"]);
|
|
218
|
+
function adaptCodex(p) {
|
|
219
|
+
const sid = p.session_id ?? p.turn_id;
|
|
220
|
+
switch (p.hook_event_name) {
|
|
221
|
+
case "UserPromptSubmit": return str(p.prompt) ? [{ event: "user_prompt", text: p.prompt, sid }] : [];
|
|
222
|
+
case "Stop": return str(p.last_assistant_message) ? [{ event: "agent_reply", text: p.last_assistant_message, sid }] : [];
|
|
223
|
+
case "SubagentStop": return str(p.last_assistant_message) ? [{ event: "agent_reply", text: p.last_assistant_message, sid, subagent: true }] : [];
|
|
224
|
+
case "PostToolUse": {
|
|
225
|
+
const c = CODEX_SHELL_TOOLS.has(p.tool_name) ? commandString(p.tool_input?.command ?? p.tool_input?.cmd) : null;
|
|
226
|
+
return c ? [{ event: "shell", command: c, sid }] : [];
|
|
227
|
+
}
|
|
228
|
+
default: return [];
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// Copilot payloads carry no event name; the installer passes --event, and we infer from fields as a fallback.
|
|
233
|
+
function adaptCopilot(p, hint) {
|
|
234
|
+
const sid = p.sessionId;
|
|
235
|
+
const ev = hint ?? (str(p.prompt) ? "userPromptSubmitted" : str(p.response) ? "subagentStop" : str(p.toolName) ? "postToolUse" : "");
|
|
236
|
+
switch (ev) {
|
|
237
|
+
case "userPromptSubmitted": return str(p.prompt) ? [{ event: "user_prompt", text: p.prompt, sid }] : [];
|
|
238
|
+
case "subagentStop": return str(p.response) ? [{ event: "agent_reply", text: p.response, sid, subagent: true }] : [];
|
|
239
|
+
case "postToolUse": {
|
|
240
|
+
if (p.toolName !== "bash" && p.toolName !== "powershell") return [];
|
|
241
|
+
let args = p.toolArgs;
|
|
242
|
+
if (str(args)) { try { args = JSON.parse(args); } catch { return []; } }
|
|
243
|
+
const c = commandString(args?.command);
|
|
244
|
+
return c ? [{ event: "shell", command: c, sid }] : [];
|
|
245
|
+
}
|
|
246
|
+
default: return [];
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
function adaptCursor(p) {
|
|
251
|
+
const sid = p.conversation_id;
|
|
252
|
+
switch (p.hook_event_name) {
|
|
253
|
+
case "beforeSubmitPrompt": return str(p.prompt) ? [{ event: "user_prompt", text: p.prompt, sid }] : [];
|
|
254
|
+
case "afterAgentResponse": return str(p.text) ? [{ event: "agent_reply", text: p.text, sid }] : [];
|
|
255
|
+
case "afterShellExecution": return str(p.command) ? [{ event: "shell", command: p.command, sid }] : [];
|
|
256
|
+
default: return [];
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
function adaptWindsurf(p, hint) {
|
|
261
|
+
const sid = p.trajectory_id;
|
|
262
|
+
const info = p.tool_info ?? {};
|
|
263
|
+
switch (p.agent_action_name ?? hint) {
|
|
264
|
+
case "pre_user_prompt": return str(info.user_prompt) ? [{ event: "user_prompt", text: info.user_prompt, sid }] : [];
|
|
265
|
+
case "post_cascade_response": return str(info.response) ? [{ event: "agent_reply", text: info.response, sid }] : [];
|
|
266
|
+
case "post_run_command": return str(info.command_line) ? [{ event: "shell", command: info.command_line, sid }] : [];
|
|
267
|
+
default: return [];
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// Kiro's payload has no session id, so sessions are keyed by working directory; the shell tool is `execute_bash` in older docs and `shell` in current agent configs.
|
|
272
|
+
function adaptKiro(p) {
|
|
273
|
+
const sid = p.session_id ?? p.cwd;
|
|
274
|
+
switch (p.hook_event_name) {
|
|
275
|
+
case "userPromptSubmit": return str(p.prompt) ? [{ event: "user_prompt", text: p.prompt, sid }] : [];
|
|
276
|
+
case "postToolUse": {
|
|
277
|
+
const c = p.tool_name === "execute_bash" || p.tool_name === "shell" ? commandString(p.tool_input?.command) : null;
|
|
278
|
+
return c ? [{ event: "shell", command: c, sid }] : [];
|
|
279
|
+
}
|
|
280
|
+
default: return [];
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
function adaptCline(p) {
|
|
285
|
+
const sid = p.taskId;
|
|
286
|
+
switch (p.hookName) {
|
|
287
|
+
case "UserPromptSubmit": return str(p.userPromptSubmit?.prompt) ? [{ event: "user_prompt", text: p.userPromptSubmit.prompt, sid }] : [];
|
|
288
|
+
case "PostToolUse": {
|
|
289
|
+
const t = p.postToolUse;
|
|
290
|
+
const c = t?.toolName === "execute_command" ? commandString(t.parameters?.command) : null;
|
|
291
|
+
return c ? [{ event: "shell", command: c, sid }] : [];
|
|
292
|
+
}
|
|
293
|
+
default: return [];
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
// The OpenCode plugin (installed by kontexta) already normalises; it sends { kontexta_event, session_id, text | command }.
|
|
298
|
+
function adaptOpenCode(p) {
|
|
299
|
+
const sid = p.session_id;
|
|
300
|
+
if (p.kontexta_event === "user_prompt" && str(p.text)) return [{ event: "user_prompt", text: p.text, sid }];
|
|
301
|
+
if (p.kontexta_event === "shell" && str(p.command)) return [{ event: "shell", command: p.command, sid }];
|
|
302
|
+
return [];
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export const ADAPTERS = {
|
|
306
|
+
"claude-code": adaptClaudeCode,
|
|
307
|
+
gemini: adaptGemini,
|
|
308
|
+
codex: adaptCodex,
|
|
309
|
+
copilot: adaptCopilot,
|
|
310
|
+
cursor: adaptCursor,
|
|
311
|
+
windsurf: adaptWindsurf,
|
|
312
|
+
kiro: adaptKiro,
|
|
313
|
+
cline: adaptCline,
|
|
314
|
+
opencode: adaptOpenCode,
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
// ---------- normalise + write ----------
|
|
318
|
+
export function normalise(partials, ctx) {
|
|
319
|
+
const out = [];
|
|
320
|
+
for (const pe of partials) {
|
|
321
|
+
const ev = { ts: ctx.ts, agent: ctx.agent, sid: `${ctx.agent}:${str(pe.sid) ? pe.sid : "unknown"}`, event: pe.event, source: "hook", cwd: ctx.cwd };
|
|
322
|
+
if (ctx.branch) ev.branch = ctx.branch;
|
|
323
|
+
if (pe.subagent) ev.subagent = true;
|
|
324
|
+
if (pe.event === "user_prompt" || pe.event === "agent_reply") {
|
|
325
|
+
const max = pe.event === "user_prompt" ? ctx.caps.prompt_max_bytes : ctx.caps.reply_max_bytes;
|
|
326
|
+
const c = capUtf8(redactText(pe.text), max);
|
|
327
|
+
ev.text = c.text; if (c.truncated) { ev.truncated = true; ev.bytes = c.bytes; }
|
|
328
|
+
} else if (pe.event === "shell") {
|
|
329
|
+
const c = capUtf8(redactText(pe.command), ctx.caps.command_max_bytes);
|
|
330
|
+
ev.command = c.text; if (c.truncated) { ev.truncated = true; ev.bytes = c.bytes; }
|
|
331
|
+
} else if (pe.event === "agent_question") {
|
|
332
|
+
ev.questions = redactDeep(pe.questions);
|
|
333
|
+
} else {
|
|
334
|
+
continue;
|
|
335
|
+
}
|
|
336
|
+
out.push(ev);
|
|
337
|
+
}
|
|
338
|
+
return out;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
function stateFile(dataDir, sid) {
|
|
342
|
+
return join(dataDir, "hooks", "state", `${sid.replace(/[^A-Za-z0-9._-]/g, "_")}.json`);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
function gitContextIfChanged(dataDir, sid, git, ctx) {
|
|
346
|
+
if (!git?.branch) return [];
|
|
347
|
+
const f = stateFile(dataDir, sid);
|
|
348
|
+
let prev = null;
|
|
349
|
+
try { prev = JSON.parse(readFileSync(f, "utf8")).branch ?? null; } catch {}
|
|
350
|
+
if (prev === git.branch) return [];
|
|
351
|
+
try { mkdirSync(dirname(f), { recursive: true }); writeFileSync(f, JSON.stringify({ branch: git.branch, ts: ctx.ts })); } catch {}
|
|
352
|
+
const ev = { ts: ctx.ts, agent: ctx.agent, sid, event: "git_context", source: "hook", cwd: ctx.cwd, branch: git.branch };
|
|
353
|
+
if (git.head) ev.head = git.head;
|
|
354
|
+
return [ev];
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
function appendEvents(dataDir, slug, events) {
|
|
358
|
+
if (events.length === 0) return;
|
|
359
|
+
const day = events[0].ts.slice(0, 10);
|
|
360
|
+
const dir = join(dataDir, "knowledge", "journal", slug, "raw");
|
|
361
|
+
mkdirSync(dir, { recursive: true });
|
|
362
|
+
const file = join(dir, `${day}.jsonl`);
|
|
363
|
+
for (const ev of events) appendFileSync(file, JSON.stringify(ev) + "\n");
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
export async function run(argv = process.argv.slice(2), env = process.env) {
|
|
367
|
+
const agent = argValue(argv, "--agent");
|
|
368
|
+
const adapter = agent ? ADAPTERS[agent] : undefined;
|
|
369
|
+
if (!adapter) return;
|
|
370
|
+
const raw = await readStdin(stdinTimeoutMs(env));
|
|
371
|
+
if (raw === null || raw.trim() === "") return;
|
|
372
|
+
let payload;
|
|
373
|
+
try { payload = JSON.parse(raw); } catch { return; }
|
|
374
|
+
if (!payload || typeof payload !== "object") return;
|
|
375
|
+
|
|
376
|
+
const dataDir = resolveDataDir(argv, env);
|
|
377
|
+
const partials = adapter(payload, argValue(argv, "--event"));
|
|
378
|
+
if (partials.length === 0) return;
|
|
379
|
+
|
|
380
|
+
const cwd = str(payload.cwd) ? payload.cwd
|
|
381
|
+
: str(payload.tool_info?.cwd) ? payload.tool_info.cwd
|
|
382
|
+
: Array.isArray(payload.workspace_roots) && str(payload.workspace_roots[0]) ? payload.workspace_roots[0]
|
|
383
|
+
: Array.isArray(payload.workspaceRoots) && str(payload.workspaceRoots[0]) ? payload.workspaceRoots[0]
|
|
384
|
+
: process.cwd();
|
|
385
|
+
const git = gitBranch(cwd);
|
|
386
|
+
const ctx = { ts: new Date().toISOString(), agent, cwd, branch: git?.branch, caps: readCaps(dataDir) };
|
|
387
|
+
const events = normalise(partials, ctx);
|
|
388
|
+
if (events.length === 0) return;
|
|
389
|
+
const sid = events[0].sid;
|
|
390
|
+
appendEvents(dataDir, slugFor(cwd, dataDir), [...gitContextIfChanged(dataDir, sid, git, ctx), ...events]);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
|
|
394
|
+
run()
|
|
395
|
+
.catch((e) => { try { process.stderr.write(`[kontexta-hooks] ${e?.message ?? e}\n`); } catch {} })
|
|
396
|
+
.finally(() => process.exit(0));
|
|
397
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type HooksBlock, type AgentHookOutcome } from "kxta-core";
|
|
2
|
+
export declare function currentHooksBlock(version: string): HooksBlock | null;
|
|
3
|
+
export interface HooksInstallResult {
|
|
4
|
+
agent: string;
|
|
5
|
+
mode: string;
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
outcome?: AgentHookOutcome;
|
|
8
|
+
docker_command?: string;
|
|
9
|
+
note?: string;
|
|
10
|
+
error?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function enableAndInstallHooks(agent: string, version: string): HooksInstallResult;
|
|
13
|
+
//# sourceMappingURL=hooks-block.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks-block.d.ts","sourceRoot":"","sources":["../src/hooks-block.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,UAAU,EAAE,KAAK,gBAAgB,EACvC,MAAM,WAAW,CAAC;AAInB,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAOpE;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAC9C,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACpF;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,kBAAkB,CAWxF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { getDataDir, buildHooksBlock, detectInstallMode, installHooks, setEnabled, syncAgentRows, isAgentId, agentMeta, dockerInstallCommand, } from "kxta-core";
|
|
2
|
+
const hostDir = () => process.env.KONTEXTA_HOST_DATA_DIR ?? null;
|
|
3
|
+
export function currentHooksBlock(version) {
|
|
4
|
+
try {
|
|
5
|
+
const block = buildHooksBlock({ installMode: detectInstallMode(), version, hostDataDir: hostDir() });
|
|
6
|
+
return block.alerts.length > 0 ? block : null;
|
|
7
|
+
}
|
|
8
|
+
catch {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export function enableAndInstallHooks(agent, version) {
|
|
13
|
+
const mode = detectInstallMode();
|
|
14
|
+
if (!isAgentId(agent))
|
|
15
|
+
return { agent, mode, enabled: false, error: `unknown agent: ${agent}` };
|
|
16
|
+
const meta = agentMeta(agent);
|
|
17
|
+
syncAgentRows();
|
|
18
|
+
setEnabled(agent, true);
|
|
19
|
+
if (!meta.hooksSupported)
|
|
20
|
+
return { agent, mode, enabled: true, note: `${meta.name} has no hook API — MCP capture only.` };
|
|
21
|
+
if (mode === "docker")
|
|
22
|
+
return { agent, mode, enabled: true, docker_command: dockerInstallCommand({ agent, version, hostDataDir: hostDir() }) };
|
|
23
|
+
// KONTEXTA_HOOKS_HOME lets an MCP running in a container/SSH session point at the home whose agent configs matter.
|
|
24
|
+
const [outcome] = installHooks([agent], { dataDir: getDataDir(), home: process.env.KONTEXTA_HOOKS_HOME || undefined });
|
|
25
|
+
return { agent, mode, enabled: true, outcome };
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=hooks-block.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks-block.js","sourceRoot":"","sources":["../src/hooks-block.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAAE,eAAe,EAAE,iBAAiB,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,EAAE,oBAAoB,GAEpI,MAAM,WAAW,CAAC;AAEnB,MAAM,OAAO,GAAG,GAAkB,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,IAAI,IAAI,CAAC;AAEhF,MAAM,UAAU,iBAAiB,CAAC,OAAe;IAC/C,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,eAAe,CAAC,EAAE,WAAW,EAAE,iBAAiB,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;QACrG,OAAO,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;IAChD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAOD,MAAM,UAAU,qBAAqB,CAAC,KAAa,EAAE,OAAe;IAClE,MAAM,IAAI,GAAG,iBAAiB,EAAE,CAAC;IACjC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;QAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,kBAAkB,KAAK,EAAE,EAAE,CAAC;IAChG,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,CAAE,CAAC;IAC/B,aAAa,EAAE,CAAC;IAChB,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACxB,IAAI,CAAC,IAAI,CAAC,cAAc;QAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,sCAAsC,EAAE,CAAC;IAC1H,IAAI,IAAI,KAAK,QAAQ;QAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,oBAAoB,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC;IAC/I,mHAAmH;IACnH,MAAM,CAAC,OAAO,CAAC,GAAG,YAAY,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,SAAS,EAAE,CAAC,CAAC;IACvH,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACjD,CAAC"}
|