kontexta 4.3.1
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/LICENSE +191 -0
- package/README.md +58 -0
- package/bundle/standalone/CHANGELOG.md +382 -0
- package/bundle/standalone/apps/web/.next/BUILD_ID +1 -0
- package/bundle/standalone/apps/web/.next/app-build-manifest.json +403 -0
- package/bundle/standalone/apps/web/.next/app-path-routes-manifest.json +60 -0
- package/bundle/standalone/apps/web/.next/build-manifest.json +33 -0
- package/bundle/standalone/apps/web/.next/package.json +1 -0
- package/bundle/standalone/apps/web/.next/prerender-manifest.json +148 -0
- package/bundle/standalone/apps/web/.next/react-loadable-manifest.json +300 -0
- package/bundle/standalone/apps/web/.next/required-server-files.json +344 -0
- package/bundle/standalone/apps/web/.next/routes-manifest.json +210 -0
- package/bundle/standalone/apps/web/.next/server/app/_not-found/page.js +2 -0
- package/bundle/standalone/apps/web/.next/server/app/_not-found/page.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/_not-found.html +1 -0
- package/bundle/standalone/apps/web/.next/server/app/_not-found.meta +8 -0
- package/bundle/standalone/apps/web/.next/server/app/_not-found.rsc +22 -0
- package/bundle/standalone/apps/web/.next/server/app/api/about/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/about/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/about/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/auth/login/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/auth/login/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/auth/logout/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/auth/logout/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/auth/setup/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/auth/setup/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/auth/setup/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/auth/status/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/auth/status/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/auth/token/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/auth/token/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/auth/token/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/conflicts/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/conflicts/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/conflicts/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/[id]/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/[id]/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/[id]/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/[id]/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/[id]/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/[id]/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/ics/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/ics/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/ics/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/links/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/links/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/links/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/settings/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/settings/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/calendar/settings/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/clip/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/clip/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/clip/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/docker-config/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/docker-config/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/docker-config/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/export/zip/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/export/zip/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/export/zip/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/download/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/download/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/download/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/export-pdf/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/export-pdf/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/export-pdf/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/restore/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/restore/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/restore/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/move/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/move/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/move/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/files/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/files/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/files/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/files/upload/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/files/upload/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/files/upload/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/folders/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/folders/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/folders/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/git/remote/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/git/remote/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/git/remote/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/git/sync-all/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/git/sync-all/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/git/sync-all/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/hands/test-pattern/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/hands/test-pattern/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/hands/test-pattern/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/hands/validate/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/hands/validate/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/hands/validate/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/health/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/health/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/health/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/install-snippets/route.js +17 -0
- package/bundle/standalone/apps/web/.next/server/app/api/install-snippets/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/install-snippets/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/mcp-tools/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/mcp-tools/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/mcp-tools/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/profile/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/profile/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/profile/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/hands-config/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/hands-config/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/hands-config/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-config/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-config/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-config/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-status/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-status/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-status/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/onboard/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/onboard/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/onboard/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/refresh/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/refresh/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/refresh/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/sync/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/sync/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/sync/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/projects/onboard/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/projects/onboard/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/projects/onboard/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/projects/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/projects/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/projects/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/publish/html/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/publish/html/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/publish/html/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/publish/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/publish/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/publish/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/refresh/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/refresh/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/refresh/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/reindex/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/reindex/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/reindex/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/search/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/search/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/search/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/tags/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/tags/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/tags/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/ws-config/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/ws-config/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/api/ws-config/route_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/apple-icon.png/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/apple-icon.png/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/apple-icon.png.body +0 -0
- package/bundle/standalone/apps/web/.next/server/app/apple-icon.png.meta +1 -0
- package/bundle/standalone/apps/web/.next/server/app/calendar/page.js +2 -0
- package/bundle/standalone/apps/web/.next/server/app/calendar/page.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/calendar/page_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/favicon.ico/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/favicon.ico/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/favicon.ico.body +0 -0
- package/bundle/standalone/apps/web/.next/server/app/favicon.ico.meta +1 -0
- package/bundle/standalone/apps/web/.next/server/app/icon.png/route.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/icon.png/route.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/icon.png.body +0 -0
- package/bundle/standalone/apps/web/.next/server/app/icon.png.meta +1 -0
- package/bundle/standalone/apps/web/.next/server/app/login/page.js +2 -0
- package/bundle/standalone/apps/web/.next/server/app/login/page.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/login/page_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/page.js +9 -0
- package/bundle/standalone/apps/web/.next/server/app/page.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/page_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/preview/motifs/page.js +6 -0
- package/bundle/standalone/apps/web/.next/server/app/preview/motifs/page.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/app/preview/motifs/page_client-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/app/preview/motifs.html +5 -0
- package/bundle/standalone/apps/web/.next/server/app/preview/motifs.meta +7 -0
- package/bundle/standalone/apps/web/.next/server/app/preview/motifs.rsc +29 -0
- package/bundle/standalone/apps/web/.next/server/app-paths-manifest.json +60 -0
- package/bundle/standalone/apps/web/.next/server/chunks/1018.js +115 -0
- package/bundle/standalone/apps/web/.next/server/chunks/1096.js +23 -0
- package/bundle/standalone/apps/web/.next/server/chunks/1139.js +1 -0
- package/bundle/standalone/apps/web/.next/server/chunks/128.js +1 -0
- package/bundle/standalone/apps/web/.next/server/chunks/1921.js +1 -0
- package/bundle/standalone/apps/web/.next/server/chunks/2034.js +36 -0
- package/bundle/standalone/apps/web/.next/server/chunks/2048.js +64 -0
- package/bundle/standalone/apps/web/.next/server/chunks/2065.js +1 -0
- package/bundle/standalone/apps/web/.next/server/chunks/2144.js +1 -0
- package/bundle/standalone/apps/web/.next/server/chunks/2151.js +1 -0
- package/bundle/standalone/apps/web/.next/server/chunks/2161.js +153 -0
- package/bundle/standalone/apps/web/.next/server/chunks/2450.js +1 -0
- package/bundle/standalone/apps/web/.next/server/chunks/246.js +1 -0
- package/bundle/standalone/apps/web/.next/server/chunks/260.js +24 -0
- package/bundle/standalone/apps/web/.next/server/chunks/269.js +1 -0
- package/bundle/standalone/apps/web/.next/server/chunks/2792.js +287 -0
- package/bundle/standalone/apps/web/.next/server/chunks/2923.js +22 -0
- package/bundle/standalone/apps/web/.next/server/chunks/2944.js +77 -0
- package/bundle/standalone/apps/web/.next/server/chunks/3334.js +141 -0
- package/bundle/standalone/apps/web/.next/server/chunks/3668.js +9 -0
- package/bundle/standalone/apps/web/.next/server/chunks/3758.js +1 -0
- package/bundle/standalone/apps/web/.next/server/chunks/3833.js +1 -0
- package/bundle/standalone/apps/web/.next/server/chunks/3990.js +2 -0
- package/bundle/standalone/apps/web/.next/server/chunks/4274.js +1 -0
- package/bundle/standalone/apps/web/.next/server/chunks/4290.js +252 -0
- package/bundle/standalone/apps/web/.next/server/chunks/4347.js +1 -0
- package/bundle/standalone/apps/web/.next/server/chunks/4550.js +226 -0
- package/bundle/standalone/apps/web/.next/server/chunks/4824.js +166 -0
- package/bundle/standalone/apps/web/.next/server/chunks/509.js +43 -0
- package/bundle/standalone/apps/web/.next/server/chunks/5104.js +215 -0
- package/bundle/standalone/apps/web/.next/server/chunks/5186.js +1 -0
- package/bundle/standalone/apps/web/.next/server/chunks/5400.js +1 -0
- package/bundle/standalone/apps/web/.next/server/chunks/5558.js +80 -0
- package/bundle/standalone/apps/web/.next/server/chunks/6496.js +93 -0
- package/bundle/standalone/apps/web/.next/server/chunks/6693.js +148 -0
- package/bundle/standalone/apps/web/.next/server/chunks/6775.js +1 -0
- package/bundle/standalone/apps/web/.next/server/chunks/7020.js +29 -0
- package/bundle/standalone/apps/web/.next/server/chunks/7098.js +1 -0
- package/bundle/standalone/apps/web/.next/server/chunks/7117.js +1 -0
- package/bundle/standalone/apps/web/.next/server/chunks/7204.js +104 -0
- package/bundle/standalone/apps/web/.next/server/chunks/7342.js +1 -0
- package/bundle/standalone/apps/web/.next/server/chunks/7629.js +80 -0
- package/bundle/standalone/apps/web/.next/server/chunks/7784.js +1 -0
- package/bundle/standalone/apps/web/.next/server/chunks/8286.js +1 -0
- package/bundle/standalone/apps/web/.next/server/chunks/8349.js +1 -0
- package/bundle/standalone/apps/web/.next/server/chunks/8620.js +1 -0
- package/bundle/standalone/apps/web/.next/server/chunks/8675.js +1 -0
- package/bundle/standalone/apps/web/.next/server/chunks/8860.js +24 -0
- package/bundle/standalone/apps/web/.next/server/chunks/8896.js +1 -0
- package/bundle/standalone/apps/web/.next/server/chunks/8950.js +5 -0
- package/bundle/standalone/apps/web/.next/server/chunks/8960.js +79 -0
- package/bundle/standalone/apps/web/.next/server/chunks/899.js +2 -0
- package/bundle/standalone/apps/web/.next/server/chunks/9069.js +1 -0
- package/bundle/standalone/apps/web/.next/server/chunks/9315.js +34 -0
- package/bundle/standalone/apps/web/.next/server/chunks/9372.js +1 -0
- package/bundle/standalone/apps/web/.next/server/chunks/9555.js +6 -0
- package/bundle/standalone/apps/web/.next/server/chunks/9571.js +9 -0
- package/bundle/standalone/apps/web/.next/server/chunks/9681.js +1 -0
- package/bundle/standalone/apps/web/.next/server/chunks/97.js +90 -0
- package/bundle/standalone/apps/web/.next/server/chunks/9797.js +1 -0
- package/bundle/standalone/apps/web/.next/server/chunks/989.js +1 -0
- package/bundle/standalone/apps/web/.next/server/functions-config-manifest.json +4 -0
- package/bundle/standalone/apps/web/.next/server/instrumentation.js +1 -0
- package/bundle/standalone/apps/web/.next/server/middleware-build-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/middleware-manifest.json +6 -0
- package/bundle/standalone/apps/web/.next/server/middleware-react-loadable-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/next-font-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/next-font-manifest.json +1 -0
- package/bundle/standalone/apps/web/.next/server/pages/404.html +1 -0
- package/bundle/standalone/apps/web/.next/server/pages/500.html +1 -0
- package/bundle/standalone/apps/web/.next/server/pages/_app.js +1 -0
- package/bundle/standalone/apps/web/.next/server/pages/_app.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/pages/_document.js +1 -0
- package/bundle/standalone/apps/web/.next/server/pages/_document.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/pages/_error.js +19 -0
- package/bundle/standalone/apps/web/.next/server/pages/_error.js.nft.json +1 -0
- package/bundle/standalone/apps/web/.next/server/pages-manifest.json +6 -0
- package/bundle/standalone/apps/web/.next/server/server-reference-manifest.js +1 -0
- package/bundle/standalone/apps/web/.next/server/server-reference-manifest.json +1 -0
- package/bundle/standalone/apps/web/.next/server/webpack-runtime.js +1 -0
- package/bundle/standalone/apps/web/.next/static/TwaiLte1NHCp3gRYUc-go/_buildManifest.js +1 -0
- package/bundle/standalone/apps/web/.next/static/TwaiLte1NHCp3gRYUc-go/_ssgManifest.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/02852184.a3b62691cdc349cf.js +80 -0
- package/bundle/standalone/apps/web/.next/static/chunks/1226.49d217dc03a1770f.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/1286.8da72129ab3aa8fd.js +77 -0
- package/bundle/standalone/apps/web/.next/static/chunks/1403cfaa-33c2b74c127517c2.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/171.a4732e77e941b2cd.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/1733.3a6dae5cc3785d0b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/2081.313746c212bfc5c9.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/2086.0b05a08670aae1db.js +226 -0
- package/bundle/standalone/apps/web/.next/static/chunks/2377-956eb9b333193ac6.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/3034.e1171cbeeed85923.js +5 -0
- package/bundle/standalone/apps/web/.next/static/chunks/3068-293b252158eb9d15.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/3297.7664b51ee69c7513.js +23 -0
- package/bundle/standalone/apps/web/.next/static/chunks/338.77f45c7810885961.js +115 -0
- package/bundle/standalone/apps/web/.next/static/chunks/3471.7790a4192ef84a1a.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/3514.14aa56fe189fd052.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/3696.5d462babda0c0b9e.js +34 -0
- package/bundle/standalone/apps/web/.next/static/chunks/408.82356d1e11e880d9.js +93 -0
- package/bundle/standalone/apps/web/.next/static/chunks/46.9922e50f2158e1a9.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/4798.d851e8027b2db933.js +287 -0
- package/bundle/standalone/apps/web/.next/static/chunks/4908.2fed0b6fbc391b55.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/4915.97b9c59991c26fa7.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/492.234794e12315e4bb.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/4936.c65cdd63440ade70.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/5127.e5e917b5cb9c4e52.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/5141.93a42ebd1580da60.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/5159-7bcf68ab11c1091e.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/5514.f969d5c86c590512.js +73 -0
- package/bundle/standalone/apps/web/.next/static/chunks/559.c4615787d977bf47.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/5667.e0097b2112faa29b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/6367.fd87728718a97771.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/6394.c2172a59c01bd0bd.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/6396.d288334e13a70139.js +24 -0
- package/bundle/standalone/apps/web/.next/static/chunks/6483.88695b22b21b10f1.js +9 -0
- package/bundle/standalone/apps/web/.next/static/chunks/6561.176d35e576df3f9d.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/6584.87fc375a0510108d.js +104 -0
- package/bundle/standalone/apps/web/.next/static/chunks/693.71c8b97896628a66.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/6934.45e50410379dc377.js +79 -0
- package/bundle/standalone/apps/web/.next/static/chunks/6a2ca82e.c26cb70da3106c1c.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/6b5bb80a.c511153adad62faf.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/7216.d1b096d2a35967fd.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/7342.fcb52cf5f7ce0e17.js +29 -0
- package/bundle/standalone/apps/web/.next/static/chunks/7541.43ff810bb14fd5c0.js +43 -0
- package/bundle/standalone/apps/web/.next/static/chunks/7563.376c2692778a62b3.js +148 -0
- package/bundle/standalone/apps/web/.next/static/chunks/7756.b0dd00e996549a39.js +24 -0
- package/bundle/standalone/apps/web/.next/static/chunks/8052.69c066e56bbd5d6c.js +64 -0
- package/bundle/standalone/apps/web/.next/static/chunks/8080c6f4.ed360e7424d6fe99.js +62 -0
- package/bundle/standalone/apps/web/.next/static/chunks/8280.81c2b0d61e27a576.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/8547.5bef8f1afd162429.js +90 -0
- package/bundle/standalone/apps/web/.next/static/chunks/8602.0b457ca55bd2c08e.js +141 -0
- package/bundle/standalone/apps/web/.next/static/chunks/8794.401ab179d53aa5d5.js +80 -0
- package/bundle/standalone/apps/web/.next/static/chunks/9053.c953d758ff5dc6ee.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/9122.cf7fd16fc8d7fad0.js +36 -0
- package/bundle/standalone/apps/web/.next/static/chunks/9255.78469e88fa06e186.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/944.ba7dcdca1c72114a.js +166 -0
- package/bundle/standalone/apps/web/.next/static/chunks/9794-16144bed6de4bf26.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/9852.e1937ca867a99475.js +215 -0
- package/bundle/standalone/apps/web/.next/static/chunks/9981.8fa0bb90a26c66eb.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/a118fb18.9c3b4291884abee0.js +119 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/_not-found/page-972b01bf23ed0942.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/about/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/login/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/logout/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/setup/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/status/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/token/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/conflicts/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/entities/[id]/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/entities/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/events/[id]/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/events/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/ics/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/links/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/settings/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/clip/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/docker-config/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/export/zip/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/download/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/export-pdf/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/history/restore/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/history/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/move/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/upload/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/folders/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/git/remote/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/git/sync-all/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/hands/test-pattern/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/hands/validate/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/health/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/install-snippets/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/mcp-tools/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/profile/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/hands-config/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/journal-config/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/journal-status/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/onboard/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/refresh/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/sync/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/onboard/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/publish/html/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/publish/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/refresh/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/reindex/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/search/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/tags/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/api/ws-config/route-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/calendar/page-180fba7a5e149d79.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/layout-9a9569fc88cd95d2.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/login/page-d299785546ea6ab6.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/page-2b151d30cb29d2e5.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/app/preview/motifs/page-c1d02d72a16497fa.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/d185f5cd.71b8f43667fbf60d.js +153 -0
- package/bundle/standalone/apps/web/.next/static/chunks/framework-d5846a86e24c79c9.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/main-0205543fb3b69ad5.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/main-app-20d292116f434ff3.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/pages/_app-fe81927504f65cde.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/pages/_error-2973b69c43483f0b.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- package/bundle/standalone/apps/web/.next/static/chunks/webpack-8818fea786a923fe.js +1 -0
- package/bundle/standalone/apps/web/.next/static/css/c00514317f297826.css +3 -0
- package/bundle/standalone/apps/web/.next/static/media/0aa834ed78bf6d07-s.woff2 +0 -0
- package/bundle/standalone/apps/web/.next/static/media/19cfc7226ec3afaa-s.woff2 +0 -0
- package/bundle/standalone/apps/web/.next/static/media/21350d82a1f187e9-s.woff2 +0 -0
- package/bundle/standalone/apps/web/.next/static/media/438aa629764e75f3-s.woff2 +0 -0
- package/bundle/standalone/apps/web/.next/static/media/4c9affa5bc8f420e-s.p.woff2 +0 -0
- package/bundle/standalone/apps/web/.next/static/media/51251f8b9793cdb3-s.woff2 +0 -0
- package/bundle/standalone/apps/web/.next/static/media/67957d42bae0796d-s.woff2 +0 -0
- package/bundle/standalone/apps/web/.next/static/media/875ae681bfde4580-s.woff2 +0 -0
- package/bundle/standalone/apps/web/.next/static/media/886030b0b59bc5a7-s.woff2 +0 -0
- package/bundle/standalone/apps/web/.next/static/media/8e9860b6e62d6359-s.woff2 +0 -0
- package/bundle/standalone/apps/web/.next/static/media/939c4f875ee75fbb-s.woff2 +0 -0
- package/bundle/standalone/apps/web/.next/static/media/9b01607e2f794050-s.p.woff2 +0 -0
- package/bundle/standalone/apps/web/.next/static/media/a5ded5fed781d3c1-s.woff2 +0 -0
- package/bundle/standalone/apps/web/.next/static/media/ba9851c3c22cd980-s.woff2 +0 -0
- package/bundle/standalone/apps/web/.next/static/media/bb3ef058b751a6ad-s.p.woff2 +0 -0
- package/bundle/standalone/apps/web/.next/static/media/c5fe6dc8356a8c31-s.woff2 +0 -0
- package/bundle/standalone/apps/web/.next/static/media/cc978ac5ee68c2b6-s.woff2 +0 -0
- package/bundle/standalone/apps/web/.next/static/media/df0a9ae256c0569c-s.woff2 +0 -0
- package/bundle/standalone/apps/web/.next/static/media/e4af272ccee01ff0-s.p.woff2 +0 -0
- package/bundle/standalone/apps/web/.next/static/media/e857b654a2caa584-s.woff2 +0 -0
- package/bundle/standalone/apps/web/.next/static/media/f28ff2d15b1e9bd8-s.woff2 +0 -0
- package/bundle/standalone/apps/web/.next/static/media/f911b923c6adde36-s.woff2 +0 -0
- package/bundle/standalone/apps/web/package.json +66 -0
- package/bundle/standalone/apps/web/public/logo-dark.png +0 -0
- package/bundle/standalone/apps/web/public/logo.png +0 -0
- package/bundle/standalone/apps/web/server.js +38 -0
- package/bundle/standalone/apps/web/src/lib/mcp-tools.json +1941 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/agent-rules/rules-block.md +185 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/calendar-tools.d.ts +2 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/calendar-tools.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/calendar-tools.js +205 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/calendar-tools.js.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/confirm.d.ts +25 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/confirm.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/confirm.js +40 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/confirm.js.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/executor.d.ts +13 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/executor.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/executor.js +250 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/executor.js.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/formatter.d.ts +11 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/formatter.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/formatter.js +39 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/formatter.js.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/loader.d.ts +4 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/loader.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/loader.js +164 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/loader.js.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/registry.d.ts +42 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/registry.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/registry.js +143 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/registry.js.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/sanitizer.d.ts +16 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/sanitizer.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/sanitizer.js +86 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/sanitizer.js.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/schema-doc.d.ts +2 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/schema-doc.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/schema-doc.js +202 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/schema-doc.js.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/types.d.ts +50 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/types.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/types.js +2 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/types.js.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/index.d.ts +3 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/index.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/index.js +2117 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/index.js.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-capture.d.ts +31 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-capture.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-capture.js +293 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-capture.js.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-commit-upgrades-tool.d.ts +2 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-commit-upgrades-tool.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-commit-upgrades-tool.js +24 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-commit-upgrades-tool.js.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-housekeep-tool.d.ts +2 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-housekeep-tool.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-housekeep-tool.js +24 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-housekeep-tool.js.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-tools.d.ts +2 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-tools.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-tools.js +57 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-tools.js.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/migrations/001-initial.sql +72 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/migrations/002-remote-git.sql +2 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/migrations/003-source-path-index.sql +2 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/migrations/004-journaling.sql +44 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/migrations/005-auth.sql +7 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/migrations/006-journal-locks.sql +11 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/migrations/007-calendar.sql +49 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/profile-tool.d.ts +9 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/profile-tool.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/profile-tool.js +25 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/profile-tool.js.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/re2-compat.d.ts +4 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/re2-compat.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/re2-compat.js +14 -0
- package/bundle/standalone/node_modules/kontexta-mcp/dist/re2-compat.js.map +1 -0
- package/bundle/standalone/node_modules/kontexta-mcp/package.json +66 -0
- package/bundle/standalone/node_modules/kxta-core/dist/agent-rules/index.d.ts +73 -0
- package/bundle/standalone/node_modules/kxta-core/dist/agent-rules/index.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/agent-rules/index.js +436 -0
- package/bundle/standalone/node_modules/kxta-core/dist/agent-rules/index.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/agent-rules/rules-block.md +185 -0
- package/bundle/standalone/node_modules/kxta-core/dist/bundle/index.d.ts +26 -0
- package/bundle/standalone/node_modules/kxta-core/dist/bundle/index.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/bundle/index.js +115 -0
- package/bundle/standalone/node_modules/kxta-core/dist/bundle/index.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/calendar/conflicts.d.ts +32 -0
- package/bundle/standalone/node_modules/kxta-core/dist/calendar/conflicts.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/calendar/conflicts.js +129 -0
- package/bundle/standalone/node_modules/kxta-core/dist/calendar/conflicts.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/calendar/ics.d.ts +16 -0
- package/bundle/standalone/node_modules/kxta-core/dist/calendar/ics.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/calendar/ics.js +73 -0
- package/bundle/standalone/node_modules/kxta-core/dist/calendar/ics.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/calendar/index.d.ts +9 -0
- package/bundle/standalone/node_modules/kxta-core/dist/calendar/index.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/calendar/index.js +7 -0
- package/bundle/standalone/node_modules/kxta-core/dist/calendar/index.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/calendar/repository.d.ts +65 -0
- package/bundle/standalone/node_modules/kxta-core/dist/calendar/repository.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/calendar/repository.js +219 -0
- package/bundle/standalone/node_modules/kxta-core/dist/calendar/repository.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/calendar/types.d.ts +52 -0
- package/bundle/standalone/node_modules/kxta-core/dist/calendar/types.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/calendar/types.js +2 -0
- package/bundle/standalone/node_modules/kxta-core/dist/calendar/types.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/calendar/validate.d.ts +11 -0
- package/bundle/standalone/node_modules/kxta-core/dist/calendar/validate.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/calendar/validate.js +39 -0
- package/bundle/standalone/node_modules/kxta-core/dist/calendar/validate.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/clip/extract.d.ts +26 -0
- package/bundle/standalone/node_modules/kxta-core/dist/clip/extract.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/clip/extract.js +315 -0
- package/bundle/standalone/node_modules/kxta-core/dist/clip/extract.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/clip/frontmatter.d.ts +10 -0
- package/bundle/standalone/node_modules/kxta-core/dist/clip/frontmatter.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/clip/frontmatter.js +53 -0
- package/bundle/standalone/node_modules/kxta-core/dist/clip/frontmatter.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/clip/index.d.ts +12 -0
- package/bundle/standalone/node_modules/kxta-core/dist/clip/index.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/clip/index.js +38 -0
- package/bundle/standalone/node_modules/kxta-core/dist/clip/index.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/compat/env-shim.d.ts +2 -0
- package/bundle/standalone/node_modules/kxta-core/dist/compat/env-shim.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/compat/env-shim.js +26 -0
- package/bundle/standalone/node_modules/kxta-core/dist/compat/env-shim.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/compat/file-migration.d.ts +3 -0
- package/bundle/standalone/node_modules/kxta-core/dist/compat/file-migration.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/compat/file-migration.js +30 -0
- package/bundle/standalone/node_modules/kxta-core/dist/compat/file-migration.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/db/index.d.ts +37 -0
- package/bundle/standalone/node_modules/kxta-core/dist/db/index.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/db/index.js +182 -0
- package/bundle/standalone/node_modules/kxta-core/dist/db/index.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/db/migrations/001-initial.sql +72 -0
- package/bundle/standalone/node_modules/kxta-core/dist/db/migrations/002-remote-git.sql +2 -0
- package/bundle/standalone/node_modules/kxta-core/dist/db/migrations/003-source-path-index.sql +2 -0
- package/bundle/standalone/node_modules/kxta-core/dist/db/migrations/004-journaling.sql +44 -0
- package/bundle/standalone/node_modules/kxta-core/dist/db/migrations/005-auth.sql +7 -0
- package/bundle/standalone/node_modules/kxta-core/dist/db/migrations/006-journal-locks.sql +11 -0
- package/bundle/standalone/node_modules/kxta-core/dist/db/migrations/007-calendar.sql +49 -0
- package/bundle/standalone/node_modules/kxta-core/dist/files/index.d.ts +84 -0
- package/bundle/standalone/node_modules/kxta-core/dist/files/index.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/files/index.js +631 -0
- package/bundle/standalone/node_modules/kxta-core/dist/files/index.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/files/sections.d.ts +48 -0
- package/bundle/standalone/node_modules/kxta-core/dist/files/sections.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/files/sections.js +112 -0
- package/bundle/standalone/node_modules/kxta-core/dist/files/sections.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/git/index.d.ts +92 -0
- package/bundle/standalone/node_modules/kxta-core/dist/git/index.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/git/index.js +801 -0
- package/bundle/standalone/node_modules/kxta-core/dist/git/index.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/index.d.ts +24 -0
- package/bundle/standalone/node_modules/kxta-core/dist/index.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/index.js +22 -0
- package/bundle/standalone/node_modules/kxta-core/dist/index.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/cooldown.d.ts +28 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/cooldown.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/cooldown.js +61 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/cooldown.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/distill.d.ts +16 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/distill.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/distill.js +311 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/distill.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/engine.d.ts +45 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/engine.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/engine.js +198 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/engine.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/git-watcher.d.ts +11 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/git-watcher.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/git-watcher.js +41 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/git-watcher.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/high-water.d.ts +16 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/high-water.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/high-water.js +30 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/high-water.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/housekeep.d.ts +22 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/housekeep.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/housekeep.js +104 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/housekeep.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/index.d.ts +27 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/index.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/index.js +18 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/index.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/build-failure-recovery.d.ts +3 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/build-failure-recovery.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/build-failure-recovery.js +31 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/build-failure-recovery.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/error-recovery.d.ts +3 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/error-recovery.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/error-recovery.js +31 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/error-recovery.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/exploration.d.ts +3 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/exploration.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/exploration.js +28 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/exploration.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/extra-loader.d.ts +13 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/extra-loader.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/extra-loader.js +45 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/extra-loader.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/feature-development.d.ts +3 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/feature-development.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/feature-development.js +21 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/feature-development.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/incident-response.d.ts +3 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/incident-response.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/incident-response.js +21 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/incident-response.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/index.d.ts +16 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/index.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/index.js +40 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/index.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/pivot.d.ts +3 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/pivot.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/pivot.js +15 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/pivot.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/read-only-investigation.d.ts +3 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/read-only-investigation.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/read-only-investigation.js +24 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/read-only-investigation.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/refactor.d.ts +3 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/refactor.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/refactor.js +42 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/refactor.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/tagging-pass.d.ts +3 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/tagging-pass.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/tagging-pass.js +22 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/tagging-pass.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/test-cycle.d.ts +3 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/test-cycle.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/test-cycle.js +23 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/test-cycle.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/presence.d.ts +2 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/presence.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/presence.js +17 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/presence.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/redact.d.ts +8 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/redact.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/redact.js +40 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/redact.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/renderer.d.ts +10 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/renderer.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/renderer.js +40 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/renderer.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/repository.d.ts +30 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/repository.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/repository.js +66 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/repository.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/strict-mode.d.ts +9 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/strict-mode.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/strict-mode.js +32 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/strict-mode.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/topic-detector.d.ts +4 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/topic-detector.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/topic-detector.js +71 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/topic-detector.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/types.d.ts +59 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/types.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/types.js +3 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/types.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/writer.d.ts +16 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/writer.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/writer.js +44 -0
- package/bundle/standalone/node_modules/kxta-core/dist/journal/writer.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/metadata/index.d.ts +97 -0
- package/bundle/standalone/node_modules/kxta-core/dist/metadata/index.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/metadata/index.js +517 -0
- package/bundle/standalone/node_modules/kxta-core/dist/metadata/index.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/metadata/settings.d.ts +13 -0
- package/bundle/standalone/node_modules/kxta-core/dist/metadata/settings.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/metadata/settings.js +33 -0
- package/bundle/standalone/node_modules/kxta-core/dist/metadata/settings.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/profile/index.d.ts +23 -0
- package/bundle/standalone/node_modules/kxta-core/dist/profile/index.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/profile/index.js +161 -0
- package/bundle/standalone/node_modules/kxta-core/dist/profile/index.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/project-map/index.d.ts +34 -0
- package/bundle/standalone/node_modules/kxta-core/dist/project-map/index.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/project-map/index.js +157 -0
- package/bundle/standalone/node_modules/kxta-core/dist/project-map/index.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/types.d.ts +69 -0
- package/bundle/standalone/node_modules/kxta-core/dist/types.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/types.js +5 -0
- package/bundle/standalone/node_modules/kxta-core/dist/types.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/util/extensions.d.ts +15 -0
- package/bundle/standalone/node_modules/kxta-core/dist/util/extensions.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/util/extensions.js +26 -0
- package/bundle/standalone/node_modules/kxta-core/dist/util/extensions.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/util/paths.d.ts +31 -0
- package/bundle/standalone/node_modules/kxta-core/dist/util/paths.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/util/paths.js +179 -0
- package/bundle/standalone/node_modules/kxta-core/dist/util/paths.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/util/safety.d.ts +37 -0
- package/bundle/standalone/node_modules/kxta-core/dist/util/safety.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/util/safety.js +156 -0
- package/bundle/standalone/node_modules/kxta-core/dist/util/safety.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/util/tokens.d.ts +3 -0
- package/bundle/standalone/node_modules/kxta-core/dist/util/tokens.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/util/tokens.js +13 -0
- package/bundle/standalone/node_modules/kxta-core/dist/util/tokens.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/watcher/index.d.ts +9 -0
- package/bundle/standalone/node_modules/kxta-core/dist/watcher/index.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/watcher/index.js +214 -0
- package/bundle/standalone/node_modules/kxta-core/dist/watcher/index.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/whats-new/index.d.ts +36 -0
- package/bundle/standalone/node_modules/kxta-core/dist/whats-new/index.d.ts.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/dist/whats-new/index.js +94 -0
- package/bundle/standalone/node_modules/kxta-core/dist/whats-new/index.js.map +1 -0
- package/bundle/standalone/node_modules/kxta-core/package.json +20 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/cli.d.ts +9 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/cli.js +139 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/config.d.ts +25 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/config.js +62 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/index.d.ts +2 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/index.js +45 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/pipeline.d.ts +14 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/pipeline.js +42 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/render/blocks/endpoints.d.ts +6 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/render/blocks/endpoints.js +112 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/render/blocks/glossary.d.ts +2 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/render/blocks/glossary.js +42 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/render/blocks/mermaid.d.ts +2 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/render/blocks/mermaid.js +17 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/render/llms.d.ts +3 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/render/llms.js +52 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/render/markdown.d.ts +24 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/render/markdown.js +87 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/render/nav.d.ts +21 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/render/nav.js +107 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/render/pdf.d.ts +10 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/render/pdf.js +70 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/seeds/01-overview.md +74 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/seeds/02-api.md +169 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/seeds/03-improvements.md +90 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/seeds/04-glossary.md +55 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/seeds/seeds.d.ts +3 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/seeds/seeds.js +53 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/source/enumerate.d.ts +3 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/source/enumerate.js +50 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/source/reader.d.ts +20 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/source/reader.js +20 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/template/api-ref.css +593 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/template/app.js +297 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/template/brutalist.css +57 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/template/flat.css +182 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/template/minimal.css +578 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/template/ocean.css +179 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/template/paper.css +33 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/template/shell.d.ts +8 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/template/shell.js +181 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/template/solarized.css +162 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/template/terminal.css +37 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/template/theme.css +701 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/types.d.ts +97 -0
- package/bundle/standalone/node_modules/kxta-publish/dist/types.js +1 -0
- package/bundle/standalone/node_modules/kxta-publish/package.json +25 -0
- package/bundle/standalone/package.json +26 -0
- package/dist/chunk-KQTCKRN2.js +31 -0
- package/dist/doctor-W733U3FD.js +46 -0
- package/dist/index.js +45 -0
- package/dist/mcp-DGMGR3MZ.js +34 -0
- package/dist/start-RCW7AKUK.js +121 -0
- package/package.json +89 -0
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import { Readability } from "@mozilla/readability";
|
|
2
|
+
import TurndownService from "turndown";
|
|
3
|
+
import { lookup } from "node:dns/promises";
|
|
4
|
+
import { isIP } from "node:net";
|
|
5
|
+
import { Agent } from "undici";
|
|
6
|
+
export class ClipError extends Error {
|
|
7
|
+
code;
|
|
8
|
+
details;
|
|
9
|
+
constructor(code, message, details = {}) {
|
|
10
|
+
super(message);
|
|
11
|
+
this.code = code;
|
|
12
|
+
this.name = "ClipError";
|
|
13
|
+
this.details = details;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
const MIN_BODY_CHARS = 200;
|
|
17
|
+
const FETCH_TIMEOUT_MS = 10_000;
|
|
18
|
+
const MAX_RESPONSE_BYTES = 10 * 1024 * 1024; // 10 MiB
|
|
19
|
+
const MAX_REDIRECTS = 5;
|
|
20
|
+
function isPrivateIPv4(ip) {
|
|
21
|
+
const parts = ip.split(".").map(Number);
|
|
22
|
+
if (parts.length !== 4 || parts.some((p) => Number.isNaN(p) || p < 0 || p > 255))
|
|
23
|
+
return false;
|
|
24
|
+
const [a, b] = parts;
|
|
25
|
+
return (a === 0 || // "this" network
|
|
26
|
+
a === 10 || // RFC1918
|
|
27
|
+
a === 127 || // loopback
|
|
28
|
+
(a === 169 && b === 254) || // link-local (incl. cloud metadata)
|
|
29
|
+
(a === 172 && b >= 16 && b <= 31) || // RFC1918
|
|
30
|
+
(a === 192 && b === 168) || // RFC1918
|
|
31
|
+
(a === 100 && b >= 64 && b <= 127) || // CGNAT
|
|
32
|
+
a >= 224 // multicast / reserved
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
function isPrivateIPv6(ip) {
|
|
36
|
+
const lower = ip.toLowerCase().split("%")[0]; // strip zone id
|
|
37
|
+
if (lower === "::1" || lower === "::")
|
|
38
|
+
return true;
|
|
39
|
+
if (lower.startsWith("fe80:") || lower.startsWith("fc") || lower.startsWith("fd"))
|
|
40
|
+
return true;
|
|
41
|
+
// IPv4-mapped IPv6: ::ffff:a.b.c.d
|
|
42
|
+
const m = lower.match(/^::ffff:([0-9.]+)$/);
|
|
43
|
+
if (m)
|
|
44
|
+
return isPrivateIPv4(m[1]);
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
function normalizeHost(rawHost) {
|
|
48
|
+
// strip IPv6 brackets, lowercase, strip trailing dot (FQDN form that
|
|
49
|
+
// bypasses naive endsWith checks: "localhost." resolves to loopback but
|
|
50
|
+
// doesn't === "localhost").
|
|
51
|
+
let h = rawHost.replace(/^\[|\]$/g, "").toLowerCase();
|
|
52
|
+
while (h.endsWith("."))
|
|
53
|
+
h = h.slice(0, -1);
|
|
54
|
+
return h;
|
|
55
|
+
}
|
|
56
|
+
async function assertPublicHost(parsed) {
|
|
57
|
+
const host = normalizeHost(parsed.hostname);
|
|
58
|
+
if (!host) {
|
|
59
|
+
throw new ClipError("INVALID_URL", `Empty hostname`);
|
|
60
|
+
}
|
|
61
|
+
// Block obvious local/special TLDs and bare names
|
|
62
|
+
if (host === "localhost" ||
|
|
63
|
+
host.endsWith(".localhost") ||
|
|
64
|
+
host.endsWith(".local") ||
|
|
65
|
+
host.endsWith(".internal") ||
|
|
66
|
+
host.endsWith(".lan")) {
|
|
67
|
+
throw new ClipError("INVALID_URL", `Refusing to clip non-public host: ${host}`);
|
|
68
|
+
}
|
|
69
|
+
const kind = isIP(host);
|
|
70
|
+
if (kind === 4 && isPrivateIPv4(host)) {
|
|
71
|
+
throw new ClipError("INVALID_URL", `Refusing to clip private/loopback IPv4: ${host}`);
|
|
72
|
+
}
|
|
73
|
+
if (kind === 6 && isPrivateIPv6(host)) {
|
|
74
|
+
throw new ClipError("INVALID_URL", `Refusing to clip private/loopback IPv6: ${host}`);
|
|
75
|
+
}
|
|
76
|
+
if (kind !== 0) {
|
|
77
|
+
// Literal IP — no DNS step; pinning not needed (URL host is the IP).
|
|
78
|
+
return { address: null, family: kind };
|
|
79
|
+
}
|
|
80
|
+
// Block obfuscated IPv4 (decimal/hex/octal) before DNS — resolver may map to loopback.
|
|
81
|
+
if (/^\d+$/.test(host) || /^0x[0-9a-f]+$/i.test(host) || /^0\d+(\.[0-9a-fx]+){0,3}$/i.test(host)) {
|
|
82
|
+
throw new ClipError("INVALID_URL", `Refusing to clip obfuscated numeric host: ${host}`);
|
|
83
|
+
}
|
|
84
|
+
let resolved;
|
|
85
|
+
try {
|
|
86
|
+
resolved = await lookup(host, { all: true });
|
|
87
|
+
}
|
|
88
|
+
catch (e) {
|
|
89
|
+
throw new ClipError("FETCH_FAILED", `DNS lookup failed for ${host}: ${e.message}`);
|
|
90
|
+
}
|
|
91
|
+
if (resolved.length === 0) {
|
|
92
|
+
throw new ClipError("FETCH_FAILED", `Host ${host} resolved to no addresses`);
|
|
93
|
+
}
|
|
94
|
+
for (const r of resolved) {
|
|
95
|
+
if (r.family === 4 && isPrivateIPv4(r.address)) {
|
|
96
|
+
throw new ClipError("INVALID_URL", `Host ${host} resolves to private IPv4 ${r.address}`);
|
|
97
|
+
}
|
|
98
|
+
if (r.family === 6 && isPrivateIPv6(r.address)) {
|
|
99
|
+
throw new ClipError("INVALID_URL", `Host ${host} resolves to private IPv6 ${r.address}`);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
// Pin the first resolved address — fetch will connect to THIS IP, defeating
|
|
103
|
+
// a DNS rebinding attack where the resolver returns a different IP on the
|
|
104
|
+
// second lookup that fetch would otherwise perform internally.
|
|
105
|
+
return { address: resolved[0].address, family: resolved[0].family };
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Build an undici Dispatcher that forces connections to the pre-validated IP
|
|
109
|
+
* for `pinnedHost`, while preserving the hostname for TLS SNI / cert
|
|
110
|
+
* verification. For any OTHER host (shouldn't happen since we control the
|
|
111
|
+
* URL), undefined is returned to fall through to the system resolver.
|
|
112
|
+
*/
|
|
113
|
+
function pinnedDispatcher(pinnedHost, pinned) {
|
|
114
|
+
if (pinned.address == null)
|
|
115
|
+
return undefined;
|
|
116
|
+
const pinnedNorm = pinnedHost;
|
|
117
|
+
const addr = pinned.address;
|
|
118
|
+
const fam = pinned.family;
|
|
119
|
+
return new Agent({
|
|
120
|
+
connect: {
|
|
121
|
+
lookup(hostname, _opts, cb) {
|
|
122
|
+
if (hostname === pinnedNorm) {
|
|
123
|
+
cb(null, addr, fam);
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
// Refuse to resolve anything else through this dispatcher; the
|
|
127
|
+
// caller built this for a single host only.
|
|
128
|
+
cb(new Error(`Pinned dispatcher refused unknown host: ${hostname}`), "", 0);
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
async function readBodyWithCap(res) {
|
|
135
|
+
const cl = res.headers.get("content-length");
|
|
136
|
+
if (cl && Number.isFinite(Number(cl)) && Number(cl) > MAX_RESPONSE_BYTES) {
|
|
137
|
+
throw new ClipError("FETCH_FAILED", `Response too large: ${cl} bytes (max ${MAX_RESPONSE_BYTES})`);
|
|
138
|
+
}
|
|
139
|
+
const reader = res.body?.getReader();
|
|
140
|
+
if (!reader)
|
|
141
|
+
return await res.text();
|
|
142
|
+
const chunks = [];
|
|
143
|
+
let total = 0;
|
|
144
|
+
while (true) {
|
|
145
|
+
const { done, value } = await reader.read();
|
|
146
|
+
if (done)
|
|
147
|
+
break;
|
|
148
|
+
if (!value)
|
|
149
|
+
continue;
|
|
150
|
+
total += value.byteLength;
|
|
151
|
+
if (total > MAX_RESPONSE_BYTES) {
|
|
152
|
+
try {
|
|
153
|
+
await reader.cancel();
|
|
154
|
+
}
|
|
155
|
+
catch { }
|
|
156
|
+
throw new ClipError("FETCH_FAILED", `Response exceeded ${MAX_RESPONSE_BYTES} byte cap`);
|
|
157
|
+
}
|
|
158
|
+
chunks.push(value);
|
|
159
|
+
}
|
|
160
|
+
return Buffer.concat(chunks).toString("utf-8");
|
|
161
|
+
}
|
|
162
|
+
const turndown = new TurndownService({
|
|
163
|
+
headingStyle: "atx",
|
|
164
|
+
codeBlockStyle: "fenced",
|
|
165
|
+
});
|
|
166
|
+
const LOGIN_URL_PATTERNS = [
|
|
167
|
+
/\/login(\b|\/|\?|$)/i,
|
|
168
|
+
/\/signin(\b|\/|\?|$)/i,
|
|
169
|
+
/\/sign-in(\b|\/|\?|$)/i,
|
|
170
|
+
/\/sso\//i,
|
|
171
|
+
/\/oauth\//i,
|
|
172
|
+
/\/auth\//i,
|
|
173
|
+
/\/saml\//i,
|
|
174
|
+
/\/account\/login/i,
|
|
175
|
+
/[?&](redirect_to|return_to|next|destination|os_destination)=/i,
|
|
176
|
+
];
|
|
177
|
+
function looksLikeLoginUrl(url) {
|
|
178
|
+
return LOGIN_URL_PATTERNS.some((re) => re.test(url));
|
|
179
|
+
}
|
|
180
|
+
function looksLikeLoginPage(html) {
|
|
181
|
+
// Cheap pre-check before parsing — most real articles don't have these tokens at all.
|
|
182
|
+
const cheap = /<input[^>]+type=["']?password["']?/i.test(html)
|
|
183
|
+
|| /name=["']os_username["']/i.test(html) // Atlassian / Confluence
|
|
184
|
+
|| /name=["']j_username["']/i.test(html) // Spring Security
|
|
185
|
+
|| /<form[^>]+action=["'][^"']*\/(login|signin|j_security_check)/i.test(html)
|
|
186
|
+
|| /window\.location[^;]+\/login/i.test(html);
|
|
187
|
+
return cheap;
|
|
188
|
+
}
|
|
189
|
+
export async function extractFromHtml(html, url) {
|
|
190
|
+
const { JSDOM } = await import("jsdom");
|
|
191
|
+
const dom = new JSDOM(html, { url });
|
|
192
|
+
const reader = new Readability(dom.window.document);
|
|
193
|
+
const article = reader.parse();
|
|
194
|
+
const bodyLen = (article?.textContent ?? "").trim().length;
|
|
195
|
+
if (!article || !article.content || bodyLen < MIN_BODY_CHARS) {
|
|
196
|
+
if (looksLikeLoginPage(html)) {
|
|
197
|
+
throw new ClipError("AUTH_REQUIRED", `Page at ${url} appears to require authentication (login form detected)`, { loginUrl: url, signal: "login_page_body" });
|
|
198
|
+
}
|
|
199
|
+
throw new ClipError("EXTRACTION_FAILED", `Could not extract enough article content from ${url}`);
|
|
200
|
+
}
|
|
201
|
+
const markdown = turndown.turndown(article.content);
|
|
202
|
+
const title = (article.title || dom.window.document.title || "").trim() || "Untitled";
|
|
203
|
+
return { title, markdown };
|
|
204
|
+
}
|
|
205
|
+
// Headers that grant authority/identity and MUST be stripped when a redirect
|
|
206
|
+
// crosses origins. Browsers do this for Authorization automatically; Node
|
|
207
|
+
// fetch does not, so unconditionally reusing caller-supplied Cookie/Auth
|
|
208
|
+
// across hops would leak credentials to redirect targets (including attacker
|
|
209
|
+
// servers reachable by a 302 from a public domain).
|
|
210
|
+
const SENSITIVE_HEADER_NAMES = new Set([
|
|
211
|
+
"cookie",
|
|
212
|
+
"authorization",
|
|
213
|
+
"proxy-authorization",
|
|
214
|
+
]);
|
|
215
|
+
function sameOrigin(a, b) {
|
|
216
|
+
return a.protocol === b.protocol && a.host === b.host;
|
|
217
|
+
}
|
|
218
|
+
function stripSensitiveHeaders(h) {
|
|
219
|
+
const out = {};
|
|
220
|
+
for (const [k, v] of Object.entries(h)) {
|
|
221
|
+
if (!SENSITIVE_HEADER_NAMES.has(k.toLowerCase()))
|
|
222
|
+
out[k] = v;
|
|
223
|
+
}
|
|
224
|
+
return out;
|
|
225
|
+
}
|
|
226
|
+
export async function fetchHtml(url, opts = {}) {
|
|
227
|
+
const initialHeaders = {
|
|
228
|
+
"User-Agent": "kontexta-clipper/1.0 (+https://kontexta.dev)",
|
|
229
|
+
...(opts.headers ?? {}),
|
|
230
|
+
};
|
|
231
|
+
let headers = initialHeaders;
|
|
232
|
+
// Manual redirect handling so we can re-validate the host on every hop —
|
|
233
|
+
// a public URL that 302s to http://169.254.169.254/ must NOT be followed —
|
|
234
|
+
// and so we can strip credentials on cross-origin redirects.
|
|
235
|
+
let currentUrl = url;
|
|
236
|
+
let prevParsed = null;
|
|
237
|
+
let res = null;
|
|
238
|
+
const signal = AbortSignal.timeout(FETCH_TIMEOUT_MS);
|
|
239
|
+
for (let hop = 0; hop <= MAX_REDIRECTS; hop++) {
|
|
240
|
+
let parsed;
|
|
241
|
+
try {
|
|
242
|
+
parsed = new URL(currentUrl);
|
|
243
|
+
}
|
|
244
|
+
catch {
|
|
245
|
+
throw new ClipError("INVALID_URL", `Not a valid URL: ${currentUrl}`);
|
|
246
|
+
}
|
|
247
|
+
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
|
|
248
|
+
throw new ClipError("INVALID_URL", `Unsupported protocol: ${parsed.protocol}`);
|
|
249
|
+
}
|
|
250
|
+
const pinned = await assertPublicHost(parsed);
|
|
251
|
+
// Strip sensitive headers if THIS hop is a cross-origin redirect from
|
|
252
|
+
// the previous hop. The first hop always keeps caller headers (that's
|
|
253
|
+
// the whole point of opts.headers).
|
|
254
|
+
if (prevParsed && !sameOrigin(prevParsed, parsed)) {
|
|
255
|
+
headers = stripSensitiveHeaders(headers);
|
|
256
|
+
}
|
|
257
|
+
const dispatcher = pinnedDispatcher(normalizeHost(parsed.hostname), pinned);
|
|
258
|
+
const init = {
|
|
259
|
+
redirect: "manual",
|
|
260
|
+
signal,
|
|
261
|
+
headers,
|
|
262
|
+
...(dispatcher ? { dispatcher } : {}),
|
|
263
|
+
};
|
|
264
|
+
try {
|
|
265
|
+
res = await fetch(currentUrl, init);
|
|
266
|
+
}
|
|
267
|
+
catch (e) {
|
|
268
|
+
throw new ClipError("FETCH_FAILED", `Network error fetching ${currentUrl}: ${e.message}`);
|
|
269
|
+
}
|
|
270
|
+
if (res.status >= 300 && res.status < 400 && res.status !== 304) {
|
|
271
|
+
const loc = res.headers.get("location");
|
|
272
|
+
if (!loc)
|
|
273
|
+
break;
|
|
274
|
+
try {
|
|
275
|
+
await res.body?.cancel();
|
|
276
|
+
}
|
|
277
|
+
catch { }
|
|
278
|
+
prevParsed = parsed;
|
|
279
|
+
currentUrl = new URL(loc, currentUrl).toString();
|
|
280
|
+
continue;
|
|
281
|
+
}
|
|
282
|
+
break;
|
|
283
|
+
}
|
|
284
|
+
if (!res) {
|
|
285
|
+
throw new ClipError("FETCH_FAILED", `No response for ${url}`);
|
|
286
|
+
}
|
|
287
|
+
if (res.status >= 300 && res.status < 400) {
|
|
288
|
+
throw new ClipError("FETCH_FAILED", `Too many redirects (>${MAX_REDIRECTS}) starting from ${url}`);
|
|
289
|
+
}
|
|
290
|
+
const finalUrl = res.url || currentUrl;
|
|
291
|
+
if (res.status === 401) {
|
|
292
|
+
throw new ClipError("AUTH_REQUIRED", `HTTP 401 Unauthorized fetching ${url}`, {
|
|
293
|
+
loginUrl: finalUrl,
|
|
294
|
+
wwwAuthenticate: res.headers.get("www-authenticate") ?? undefined,
|
|
295
|
+
signal: "http_401",
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
if (res.status === 403) {
|
|
299
|
+
throw new ClipError("AUTH_REQUIRED", `HTTP 403 Forbidden fetching ${url} (likely auth required)`, { loginUrl: finalUrl, signal: "http_403" });
|
|
300
|
+
}
|
|
301
|
+
if (!res.ok) {
|
|
302
|
+
throw new ClipError("FETCH_FAILED", `HTTP ${res.status} fetching ${url}`);
|
|
303
|
+
}
|
|
304
|
+
// Redirect-to-login: original wasn't login-shaped, but we landed on a login page.
|
|
305
|
+
if (finalUrl !== url && looksLikeLoginUrl(finalUrl) && !looksLikeLoginUrl(url)) {
|
|
306
|
+
throw new ClipError("AUTH_REQUIRED", `Request for ${url} was redirected to login page ${finalUrl}`, { loginUrl: finalUrl, signal: "redirect_to_login" });
|
|
307
|
+
}
|
|
308
|
+
const contentType = (res.headers.get("content-type") ?? "").toLowerCase();
|
|
309
|
+
if (!contentType.startsWith("text/html") && !contentType.startsWith("application/xhtml+xml")) {
|
|
310
|
+
throw new ClipError("UNSUPPORTED_CONTENT_TYPE", `Expected text/html, got ${contentType || "(none)"} from ${url}`);
|
|
311
|
+
}
|
|
312
|
+
const html = await readBodyWithCap(res);
|
|
313
|
+
return { html, finalUrl };
|
|
314
|
+
}
|
|
315
|
+
//# sourceMappingURL=extract.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extract.js","sourceRoot":"","sources":["../../src/clip/extract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,eAAe,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AA2B/B,MAAM,OAAO,SAAU,SAAQ,KAAK;IAGzB;IAFO,OAAO,CAAmB;IAC1C,YACS,IAAmB,EAC1B,OAAe,EACf,UAA4B,EAAE;QAE9B,KAAK,CAAC,OAAO,CAAC,CAAC;QAJR,SAAI,GAAJ,IAAI,CAAe;QAK1B,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;QACxB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF;AAED,MAAM,cAAc,GAAG,GAAG,CAAC;AAC3B,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAChC,MAAM,kBAAkB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,SAAS;AACtD,MAAM,aAAa,GAAG,CAAC,CAAC;AAExB,SAAS,aAAa,CAAC,EAAU;IAC/B,MAAM,KAAK,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACxC,IAA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uBAAuB,CAAC,EAAE,CAAC;QAC7F,MAAM,IAAI,SAAS,CAAC,0BAA0B,EAAE,2BAA2B,WAAW,IAAI,QAAQ,SAAS,GAAG,EAAE,CAAC,CAAC;IACpH,CAAC;IAED,MAAM,IAAI,GAAG,MAAM,eAAe,CAAC,GAAG,CAAC,CAAC;IACxC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface FrontmatterFields {
|
|
2
|
+
source: string;
|
|
3
|
+
title: string;
|
|
4
|
+
clippedAt: string;
|
|
5
|
+
body: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function buildFrontmatter(f: FrontmatterFields): string;
|
|
8
|
+
export declare function splitFrontmatter(file: string): string;
|
|
9
|
+
export declare function hashBody(file: string): string;
|
|
10
|
+
//# sourceMappingURL=frontmatter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontmatter.d.ts","sourceRoot":"","sources":["../../src/clip/frontmatter.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd;AAmCD,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,iBAAiB,GAAG,MAAM,CAU7D;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKrD;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE7C"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { computeHash } from "../files/index.js";
|
|
2
|
+
// YAML 1.2 indicators that, when they appear as the first non-space char of
|
|
3
|
+
// a plain scalar, change its meaning (flow sequences, mappings, anchors,
|
|
4
|
+
// aliases, tags, block scalars, comments, directives, reserved). See:
|
|
5
|
+
// https://yaml.org/spec/1.2.2/#flow-scalar-styles
|
|
6
|
+
const YAML_LEADING_INDICATORS = new Set([
|
|
7
|
+
"-", "?", ":", ",", "[", "]", "{", "}", "&", "*", "!", "|", ">", "%", "@", "`",
|
|
8
|
+
]);
|
|
9
|
+
function yamlScalar(value) {
|
|
10
|
+
// Quote when the value can be misparsed as YAML structure:
|
|
11
|
+
// - empty (would parse as null)
|
|
12
|
+
// - leading whitespace or leading YAML indicator chars
|
|
13
|
+
// - embedded "key: " or trailing colon (flow-style mapping confusion)
|
|
14
|
+
// - anything with newline, quote, hash (comment), or non-trim whitespace
|
|
15
|
+
// - tokens that look like booleans, null, or numbers (would be re-typed
|
|
16
|
+
// on parse — `title: yes` becomes `title: true`)
|
|
17
|
+
const needsQuote = value.length === 0 ||
|
|
18
|
+
YAML_LEADING_INDICATORS.has(value.charAt(0)) ||
|
|
19
|
+
/^\s/.test(value) ||
|
|
20
|
+
/: /.test(value) ||
|
|
21
|
+
/:\n/.test(value) ||
|
|
22
|
+
/[#\n"']/.test(value) ||
|
|
23
|
+
value.trim() !== value ||
|
|
24
|
+
/^(true|false|yes|no|on|off|null|~)$/i.test(value) ||
|
|
25
|
+
/^[+-]?(\d+\.?\d*|\.\d+)([eE][+-]?\d+)?$/.test(value);
|
|
26
|
+
if (needsQuote) {
|
|
27
|
+
return `"${value.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`;
|
|
28
|
+
}
|
|
29
|
+
return value;
|
|
30
|
+
}
|
|
31
|
+
export function buildFrontmatter(f) {
|
|
32
|
+
return [
|
|
33
|
+
"---",
|
|
34
|
+
`source: ${yamlScalar(f.source)}`,
|
|
35
|
+
`title: ${yamlScalar(f.title)}`,
|
|
36
|
+
`clipped_at: ${yamlScalar(f.clippedAt)}`,
|
|
37
|
+
"---",
|
|
38
|
+
"",
|
|
39
|
+
f.body,
|
|
40
|
+
].join("\n");
|
|
41
|
+
}
|
|
42
|
+
export function splitFrontmatter(file) {
|
|
43
|
+
if (!file.startsWith("---\n"))
|
|
44
|
+
return file;
|
|
45
|
+
const end = file.indexOf("\n---\n", 4);
|
|
46
|
+
if (end === -1)
|
|
47
|
+
return file;
|
|
48
|
+
return file.slice(end + 5).replace(/^\n+/, "");
|
|
49
|
+
}
|
|
50
|
+
export function hashBody(file) {
|
|
51
|
+
return computeHash(splitFrontmatter(file));
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=frontmatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontmatter.js","sourceRoot":"","sources":["../../src/clip/frontmatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAShD,4EAA4E;AAC5E,yEAAyE;AACzE,sEAAsE;AACtE,kDAAkD;AAClD,MAAM,uBAAuB,GAAG,IAAI,GAAG,CAAC;IACtC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;CAC/E,CAAC,CAAC;AAEH,SAAS,UAAU,CAAC,KAAa;IAC/B,2DAA2D;IAC3D,iCAAiC;IACjC,wDAAwD;IACxD,uEAAuE;IACvE,0EAA0E;IAC1E,yEAAyE;IACzE,oDAAoD;IACpD,MAAM,UAAU,GACd,KAAK,CAAC,MAAM,KAAK,CAAC;QAClB,uBAAuB,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAC5C,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;QACjB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;QAChB,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;QACjB,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC;QACrB,KAAK,CAAC,IAAI,EAAE,KAAK,KAAK;QACtB,sCAAsC,CAAC,IAAI,CAAC,KAAK,CAAC;QAClD,yCAAyC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAExD,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAClE,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,CAAoB;IACnD,OAAO;QACL,KAAK;QACL,WAAW,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE;QACjC,UAAU,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE;QAC/B,eAAe,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;QACxC,KAAK;QACL,EAAE;QACF,CAAC,CAAC,IAAI;KACP,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;QAAE,OAAO,IAAI,CAAC;IAC3C,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;IACvC,IAAI,GAAG,KAAK,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IAC5B,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,IAAY;IACnC,OAAO,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type FileRecordWithContent } from "../files/index.js";
|
|
2
|
+
export { ClipError } from "./extract.js";
|
|
3
|
+
export type { ClipErrorCode, ClipErrorDetails, AuthSignal } from "./extract.js";
|
|
4
|
+
export interface ClipUrlOptions {
|
|
5
|
+
url: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
dataDir: string;
|
|
8
|
+
/** Optional headers (cookies, auth) forwarded to the fetch. */
|
|
9
|
+
headers?: Record<string, string>;
|
|
10
|
+
}
|
|
11
|
+
export declare function clipUrl(opts: ClipUrlOptions): Promise<FileRecordWithContent>;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/clip/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAoC,KAAK,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAIjG,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEhF,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAID,wBAAsB,OAAO,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAmClF"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { getDatabase } from "../db/index.js";
|
|
2
|
+
import { createFile, updateFile, readFile } from "../files/index.js";
|
|
3
|
+
import { fetchHtml, extractFromHtml } from "./extract.js";
|
|
4
|
+
import { buildFrontmatter, hashBody } from "./frontmatter.js";
|
|
5
|
+
export { ClipError } from "./extract.js";
|
|
6
|
+
const URLCLIPS_FOLDER = "urlclips";
|
|
7
|
+
export async function clipUrl(opts) {
|
|
8
|
+
const { url, title: titleOverride, dataDir, headers } = opts;
|
|
9
|
+
const { html, finalUrl } = await fetchHtml(url, { headers });
|
|
10
|
+
const { title: extractedTitle, markdown } = await extractFromHtml(html, finalUrl);
|
|
11
|
+
const title = (titleOverride ?? extractedTitle).trim() || "Untitled";
|
|
12
|
+
const content = buildFrontmatter({
|
|
13
|
+
source: finalUrl,
|
|
14
|
+
title,
|
|
15
|
+
clippedAt: new Date().toISOString(),
|
|
16
|
+
body: markdown,
|
|
17
|
+
});
|
|
18
|
+
const db = getDatabase();
|
|
19
|
+
const existing = db
|
|
20
|
+
.prepare("SELECT id FROM files WHERE source_path = ? LIMIT 1")
|
|
21
|
+
.get(finalUrl);
|
|
22
|
+
if (existing) {
|
|
23
|
+
const current = readFile(existing.id);
|
|
24
|
+
if (hashBody(current.content) === hashBody(content)) {
|
|
25
|
+
return current;
|
|
26
|
+
}
|
|
27
|
+
return updateFile(existing.id, content, dataDir);
|
|
28
|
+
}
|
|
29
|
+
return createFile({
|
|
30
|
+
title,
|
|
31
|
+
content,
|
|
32
|
+
destination: "knowledge",
|
|
33
|
+
folder: URLCLIPS_FOLDER,
|
|
34
|
+
sourcePath: finalUrl,
|
|
35
|
+
dataDir,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/clip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAA8B,MAAM,mBAAmB,CAAC;AACjG,OAAO,EAAE,SAAS,EAAE,eAAe,EAAa,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE9D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAWzC,MAAM,eAAe,GAAG,UAAU,CAAC;AAEnC,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,IAAoB;I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
1
|
+
{"version":3,"file":"env-shim.d.ts","sourceRoot":"","sources":["../../src/compat/env-shim.ts"],"names":[],"mappings":"AAYA,wBAAgB,cAAc,IAAI,MAAM,EAAE,CAezC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const RENAMED_VARS = [
|
|
2
|
+
["MNEXIS_DATA_DIR", "KONTEXTA_DATA_DIR"],
|
|
3
|
+
["MNEXIS_DB_PATH", "KONTEXTA_DB_PATH"],
|
|
4
|
+
["MNEXIS_WS_HOST", "KONTEXTA_WS_HOST"],
|
|
5
|
+
["MNEXIS_WS_ORIGINS", "KONTEXTA_WS_ORIGINS"],
|
|
6
|
+
["MNEXIS_WS_TOKEN", "KONTEXTA_WS_TOKEN"],
|
|
7
|
+
["MNEXIS_EXPORT_MAX_BYTES", "KONTEXTA_EXPORT_MAX_BYTES"],
|
|
8
|
+
["MNEXIS_INSTALL_HINT", "KONTEXTA_INSTALL_HINT"],
|
|
9
|
+
["MNEXIS_PROJECT_TOKEN_WARN", "KONTEXTA_PROJECT_TOKEN_WARN"],
|
|
10
|
+
["MNEXIS_SHUTDOWN_DRAIN_MS", "KONTEXTA_SHUTDOWN_DRAIN_MS"],
|
|
11
|
+
];
|
|
12
|
+
export function migrateEnvVars() {
|
|
13
|
+
const migrated = [];
|
|
14
|
+
for (const [oldKey, newKey] of RENAMED_VARS) {
|
|
15
|
+
if (process.env[oldKey] && !process.env[newKey]) {
|
|
16
|
+
process.env[newKey] = process.env[oldKey];
|
|
17
|
+
migrated.push(oldKey);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
if (migrated.length > 0) {
|
|
21
|
+
console.warn(`[Kontexta] Deprecated env vars migrated: ${migrated.join(", ")}. ` +
|
|
22
|
+
"Rename to KONTEXTA_* prefix. Support removed in v2.0.");
|
|
23
|
+
}
|
|
24
|
+
return migrated;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=env-shim.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env-shim.js","sourceRoot":"","sources":["../../src/compat/env-shim.ts"],"names":[],"mappings":"AAAA,MAAM,YAAY,GAAuB;IACvC,CAAC,iBAAiB,EAAE,mBAAmB,CAAC;IACxC,CAAC,gBAAgB,EAAE,kBAAkB,CAAC;IACtC,CAAC,gBAAgB,EAAE,kBAAkB,CAAC;IACtC,CAAC,mBAAmB,EAAE,qBAAqB,CAAC;IAC5C,CAAC,iBAAiB,EAAE,mBAAmB,CAAC;IACxC,CAAC,yBAAyB,EAAE,2BAA2B,CAAC;IACxD,CAAC,qBAAqB,EAAE,uBAAuB,CAAC;IAChD,CAAC,2BAA2B,EAAE,6BAA6B,CAAC;IAC5D,CAAC,0BAA0B,EAAE,4BAA4B,CAAC;CAC3D,CAAC;AAEF,MAAM,UAAU,cAAc;IAC5B,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,YAAY,EAAE,CAAC;QAC5C,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;YAChD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YAC1C,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACxB,CAAC;IACH,CAAC;IACD,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxB,OAAO,CAAC,IAAI,CACV,4CAA4C,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;YACjE,uDAAuD,CAC1D,CAAC;IACJ,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-migration.d.ts","sourceRoot":"","sources":["../../src/compat/file-migration.ts"],"names":[],"mappings":"AASA,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAatD;AAED,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAW9D"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { existsSync, renameSync, copyFileSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
const DB_RENAMES = [
|
|
4
|
+
["mnexis.db", "kontexta.db"],
|
|
5
|
+
["mnexis.db-wal", "kontexta.db-wal"],
|
|
6
|
+
["mnexis.db-shm", "kontexta.db-shm"],
|
|
7
|
+
];
|
|
8
|
+
export function migrateDataFiles(dataDir) {
|
|
9
|
+
for (const [oldName, newName] of DB_RENAMES) {
|
|
10
|
+
const oldPath = join(dataDir, oldName);
|
|
11
|
+
const newPath = join(dataDir, newName);
|
|
12
|
+
if (existsSync(oldPath) && !existsSync(newPath)) {
|
|
13
|
+
copyFileSync(oldPath, oldPath + ".bak");
|
|
14
|
+
renameSync(oldPath, newPath);
|
|
15
|
+
console.warn(`[Kontexta] Migrated ${oldName} → ${newName} (backup: ${oldName}.bak). ` +
|
|
16
|
+
"Automatic migration removed in v2.0.");
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export function migrateProjectConfig(projectRoot) {
|
|
21
|
+
const oldConfig = join(projectRoot, "mnexis.json");
|
|
22
|
+
const newConfig = join(projectRoot, "kontexta.json");
|
|
23
|
+
if (existsSync(oldConfig) && !existsSync(newConfig)) {
|
|
24
|
+
copyFileSync(oldConfig, oldConfig + ".bak");
|
|
25
|
+
renameSync(oldConfig, newConfig);
|
|
26
|
+
console.warn(`[Kontexta] Migrated mnexis.json → kontexta.json in ${projectRoot} (backup: mnexis.json.bak). ` +
|
|
27
|
+
"Automatic migration removed in v2.0.");
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=file-migration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-migration.js","source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,EAAE,SAAS,CAAC,CAAC;QACjC,OAAO,CAAC,IAAI,CACV,sDAAsD,WAAW,8BAA8B;YAC7F,sCAAsC,CACzC,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Database module for Kontexta
|
|
3
|
+
* Manages SQLite database connection, migrations, and singleton pattern
|
|
4
|
+
*/
|
|
5
|
+
import Database from "better-sqlite3";
|
|
6
|
+
declare global {
|
|
7
|
+
var __kontextaDb: Database.Database | null | undefined;
|
|
8
|
+
var __kontextaDbCloseRegistered: boolean | undefined;
|
|
9
|
+
var __kontextaTmpSessionSecret: string | undefined;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Create and initialize the database
|
|
13
|
+
* @param dbPath - Path to the SQLite database file
|
|
14
|
+
* @returns Database instance
|
|
15
|
+
*/
|
|
16
|
+
export declare function createDatabase(dbPath: string): Database.Database;
|
|
17
|
+
/**
|
|
18
|
+
* Get the existing database instance
|
|
19
|
+
* @returns Database instance
|
|
20
|
+
* @throws Error if database is not initialized
|
|
21
|
+
*/
|
|
22
|
+
export declare function getDatabase(): Database.Database;
|
|
23
|
+
/**
|
|
24
|
+
* Close the database connection
|
|
25
|
+
*/
|
|
26
|
+
export declare function closeDatabase(): void;
|
|
27
|
+
/**
|
|
28
|
+
* Graceful shutdown: stop accepting new work, drain in-flight ops with a
|
|
29
|
+
* hard ceiling, then close the database. Returns the count of operations
|
|
30
|
+
* that were still in-flight when the timeout elapsed (0 = clean drain).
|
|
31
|
+
*/
|
|
32
|
+
export declare function gracefulShutdown(timeoutMs?: number): Promise<number>;
|
|
33
|
+
/**
|
|
34
|
+
* Run all pending migrations
|
|
35
|
+
*/
|
|
36
|
+
export declare function runMigrations(): void;
|
|
37
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/db/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAoCtC,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,YAAY,EAAE,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,SAAS,CAAC;IAEvD,IAAI,2BAA2B,EAAE,OAAO,GAAG,SAAS,CAAC;IAErD,IAAI,0BAA0B,EAAE,MAAM,GAAG,SAAS,CAAC;CACpD;AAID;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,CAAC,QAAQ,CA+ChE;AAED;;;;GAIG;AACH,wBAAgB,WAAW,IAAI,QAAQ,CAAC,QAAQ,CAM/C;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,IAAI,CAapC;AAED;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,SAAS,GAAE,MAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAalF;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,IAAI,CAkDpC"}
|