gnosys 5.9.5 → 5.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +91 -771
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +403 -141
- package/dist/index.d.ts +3 -1
- package/dist/index.js +427 -348
- package/dist/lib/archive.d.ts +3 -4
- package/dist/lib/archive.js +0 -1
- package/dist/lib/ask.d.ts +3 -4
- package/dist/lib/ask.js +0 -1
- package/dist/lib/atomicWrite.d.ts +7 -0
- package/dist/lib/atomicWrite.js +46 -0
- package/dist/lib/attachments.d.ts +0 -1
- package/dist/lib/attachments.js +0 -1
- package/dist/lib/audioExtract.d.ts +0 -1
- package/dist/lib/audioExtract.js +0 -1
- package/dist/lib/audit.d.ts +0 -1
- package/dist/lib/audit.js +0 -1
- package/dist/lib/bootstrap.d.ts +1 -2
- package/dist/lib/bootstrap.js +0 -1
- package/dist/lib/centralize.d.ts +20 -0
- package/dist/lib/centralize.js +34 -0
- package/dist/lib/chat/SlashPalette.d.ts +2 -3
- package/dist/lib/chat/SlashPalette.js +0 -1
- package/dist/lib/chat/boot-splash.d.ts +1 -2
- package/dist/lib/chat/boot-splash.js +0 -1
- package/dist/lib/chat/choose.d.ts +0 -1
- package/dist/lib/chat/choose.js +0 -2
- package/dist/lib/chat/commands.d.ts +1 -2
- package/dist/lib/chat/commands.js +0 -1
- package/dist/lib/chat/components/CitationText.d.ts +1 -2
- package/dist/lib/chat/components/CitationText.js +0 -1
- package/dist/lib/chat/components/MarkdownRenderer.d.ts +0 -1
- package/dist/lib/chat/components/MarkdownRenderer.js +0 -1
- package/dist/lib/chat/components/ToolCallCard.d.ts +1 -2
- package/dist/lib/chat/components/ToolCallCard.js +0 -1
- package/dist/lib/chat/focus.d.ts +3 -3
- package/dist/lib/chat/focus.js +0 -1
- package/dist/lib/chat/index.d.ts +3 -4
- package/dist/lib/chat/index.js +2 -2
- package/dist/lib/chat/intent.d.ts +1 -17
- package/dist/lib/chat/intent.js +2 -3
- package/dist/lib/chat/llmTurn.d.ts +5 -6
- package/dist/lib/chat/llmTurn.js +0 -1
- package/dist/lib/chat/recall.d.ts +2 -3
- package/dist/lib/chat/recall.js +1 -2
- package/dist/lib/chat/render.d.ts +2 -3
- package/dist/lib/chat/render.js +0 -1
- package/dist/lib/chat/session.d.ts +0 -1
- package/dist/lib/chat/session.js +0 -1
- package/dist/lib/chat/theme.d.ts +0 -1
- package/dist/lib/chat/theme.js +0 -1
- package/dist/lib/chat/toolFence.d.ts +2 -2
- package/dist/lib/chat/toolFence.js +0 -1
- package/dist/lib/chat/tools.d.ts +0 -1
- package/dist/lib/chat/tools.js +0 -1
- package/dist/lib/chat/types.d.ts +0 -1
- package/dist/lib/chat/types.js +0 -1
- package/dist/lib/chat/write.d.ts +5 -5
- package/dist/lib/chat/write.js +0 -1
- package/dist/lib/chunkSplitter.d.ts +0 -1
- package/dist/lib/chunkSplitter.js +0 -1
- package/dist/lib/cleanup.d.ts +0 -1
- package/dist/lib/cleanup.js +0 -1
- package/dist/lib/config.d.ts +0 -1
- package/dist/lib/config.js +3 -3
- package/dist/lib/dashboard.d.ts +3 -4
- package/dist/lib/dashboard.js +5 -2
- package/dist/lib/db.d.ts +24 -1
- package/dist/lib/db.js +162 -16
- package/dist/lib/dbSearch.d.ts +3 -4
- package/dist/lib/dbSearch.js +0 -1
- package/dist/lib/dbWrite.d.ts +2 -3
- package/dist/lib/dbWrite.js +0 -1
- package/dist/lib/desktopNotify.d.ts +0 -1
- package/dist/lib/desktopNotify.js +0 -1
- package/dist/lib/docxExtract.d.ts +0 -1
- package/dist/lib/docxExtract.js +22 -1
- package/dist/lib/dream.d.ts +2 -3
- package/dist/lib/dream.js +2 -2
- package/dist/lib/embeddings.d.ts +0 -3
- package/dist/lib/embeddings.js +7 -3
- package/dist/lib/export.d.ts +6 -2
- package/dist/lib/export.js +24 -2
- package/dist/lib/exportProject.d.ts +4 -3
- package/dist/lib/exportProject.js +3 -1
- package/dist/lib/federated.d.ts +3 -3
- package/dist/lib/federated.js +6 -4
- package/dist/lib/fileDetect.d.ts +0 -1
- package/dist/lib/fileDetect.js +0 -1
- package/dist/lib/graph.d.ts +4 -4
- package/dist/lib/graph.js +0 -1
- package/dist/lib/heartbeat.d.ts +0 -13
- package/dist/lib/heartbeat.js +1 -2
- package/dist/lib/hybridSearch.d.ts +5 -21
- package/dist/lib/hybridSearch.js +0 -1
- package/dist/lib/idFormat.d.ts +0 -2
- package/dist/lib/idFormat.js +1 -2
- package/dist/lib/imageExtract.d.ts +0 -1
- package/dist/lib/imageExtract.js +0 -1
- package/dist/lib/import.d.ts +6 -5
- package/dist/lib/import.js +3 -33
- package/dist/lib/importProject.d.ts +4 -4
- package/dist/lib/importProject.js +1 -2
- package/dist/lib/ingest.d.ts +3 -4
- package/dist/lib/ingest.js +0 -1
- package/dist/lib/lensing.d.ts +1 -2
- package/dist/lib/lensing.js +0 -1
- package/dist/lib/llm.d.ts +6 -45
- package/dist/lib/llm.js +27 -9
- package/dist/lib/lock.d.ts +0 -1
- package/dist/lib/lock.js +0 -1
- package/dist/lib/log.d.ts +4 -0
- package/dist/lib/log.js +85 -0
- package/dist/lib/machineConfig.d.ts +86 -0
- package/dist/lib/machineConfig.js +157 -0
- package/dist/lib/machineMigrate.d.ts +38 -0
- package/dist/lib/machineMigrate.js +102 -0
- package/dist/lib/maintenance.d.ts +4 -5
- package/dist/lib/maintenance.js +0 -1
- package/dist/lib/mcpClientConfig.d.ts +20 -0
- package/dist/lib/mcpClientConfig.js +62 -0
- package/dist/lib/mcpHttp.d.ts +52 -0
- package/dist/lib/mcpHttp.js +227 -0
- package/dist/lib/migrate.d.ts +1 -2
- package/dist/lib/migrate.js +1 -1
- package/dist/lib/modelValidation.d.ts +0 -1
- package/dist/lib/modelValidation.js +0 -1
- package/dist/lib/multimodalIngest.d.ts +1 -2
- package/dist/lib/multimodalIngest.js +0 -1
- package/dist/lib/packageManager.d.ts +5 -0
- package/dist/lib/packageManager.js +30 -0
- package/dist/lib/paths.d.ts +11 -7
- package/dist/lib/paths.js +14 -2
- package/dist/lib/pdfExtract.d.ts +0 -1
- package/dist/lib/pdfExtract.js +0 -1
- package/dist/lib/portfolio.d.ts +1 -2
- package/dist/lib/portfolio.js +10 -3
- package/dist/lib/portfolioHtml.d.ts +1 -2
- package/dist/lib/portfolioHtml.js +0 -1
- package/dist/lib/preferences.d.ts +6 -2
- package/dist/lib/preferences.js +19 -1
- package/dist/lib/progress.d.ts +2 -2
- package/dist/lib/progress.js +0 -1
- package/dist/lib/projectIdentity.d.ts +1 -2
- package/dist/lib/projectIdentity.js +5 -5
- package/dist/lib/projectPaths.d.ts +60 -0
- package/dist/lib/projectPaths.js +99 -0
- package/dist/lib/projectScan.d.ts +40 -0
- package/dist/lib/projectScan.js +96 -0
- package/dist/lib/recall.d.ts +6 -6
- package/dist/lib/recall.js +0 -1
- package/dist/lib/remote.d.ts +3 -20
- package/dist/lib/remote.js +44 -2
- package/dist/lib/remoteWizard.d.ts +2 -3
- package/dist/lib/remoteWizard.js +0 -1
- package/dist/lib/resolver.d.ts +1 -2
- package/dist/lib/resolver.js +2 -3
- package/dist/lib/retry.d.ts +0 -1
- package/dist/lib/retry.js +1 -2
- package/dist/lib/rulesGen.d.ts +2 -8
- package/dist/lib/rulesGen.js +1 -2
- package/dist/lib/search.d.ts +1 -2
- package/dist/lib/search.js +1 -1
- package/dist/lib/searchTypes.d.ts +18 -0
- package/dist/lib/searchTypes.js +2 -0
- package/dist/lib/setup/coldStart.d.ts +0 -1
- package/dist/lib/setup/coldStart.js +0 -1
- package/dist/lib/setup/configSetRender.d.ts +0 -1
- package/dist/lib/setup/configSetRender.js +0 -1
- package/dist/lib/setup/dreamRender.d.ts +0 -1
- package/dist/lib/setup/dreamRender.js +0 -1
- package/dist/lib/setup/dreamState.d.ts +2 -2
- package/dist/lib/setup/dreamState.js +0 -1
- package/dist/lib/setup/modelsRender.d.ts +0 -1
- package/dist/lib/setup/modelsRender.js +0 -1
- package/dist/lib/setup/remoteRender.d.ts +0 -1
- package/dist/lib/setup/remoteRender.js +0 -1
- package/dist/lib/setup/routingRender.d.ts +0 -1
- package/dist/lib/setup/routingRender.js +0 -1
- package/dist/lib/setup/sections/ides.d.ts +1 -2
- package/dist/lib/setup/sections/ides.js +3 -2
- package/dist/lib/setup/sections/preferences.d.ts +1 -2
- package/dist/lib/setup/sections/preferences.js +3 -2
- package/dist/lib/setup/sections/routing.d.ts +1 -2
- package/dist/lib/setup/sections/routing.js +0 -1
- package/dist/lib/setup/storePath.d.ts +0 -1
- package/dist/lib/setup/storePath.js +0 -1
- package/dist/lib/setup/summary.d.ts +1 -2
- package/dist/lib/setup/summary.js +0 -1
- package/dist/lib/setup/syncProjectsRender.d.ts +0 -1
- package/dist/lib/setup/syncProjectsRender.js +0 -1
- package/dist/lib/setup/ui/diff.d.ts +0 -1
- package/dist/lib/setup/ui/diff.js +0 -1
- package/dist/lib/setup/ui/footer.d.ts +0 -1
- package/dist/lib/setup/ui/footer.js +0 -1
- package/dist/lib/setup/ui/header.d.ts +0 -1
- package/dist/lib/setup/ui/header.js +0 -1
- package/dist/lib/setup/ui/index.d.ts +0 -1
- package/dist/lib/setup/ui/index.js +0 -1
- package/dist/lib/setup/ui/menu.d.ts +0 -1
- package/dist/lib/setup/ui/menu.js +0 -1
- package/dist/lib/setup/ui/panel.d.ts +0 -1
- package/dist/lib/setup/ui/panel.js +0 -1
- package/dist/lib/setup/ui/prompt.d.ts +0 -1
- package/dist/lib/setup/ui/prompt.js +0 -1
- package/dist/lib/setup/ui/safePrompt.d.ts +0 -1
- package/dist/lib/setup/ui/safePrompt.js +0 -1
- package/dist/lib/setup/ui/spinner.d.ts +0 -1
- package/dist/lib/setup/ui/spinner.js +0 -1
- package/dist/lib/setup/ui/status.d.ts +0 -1
- package/dist/lib/setup/ui/status.js +0 -1
- package/dist/lib/setup/ui/table.d.ts +0 -1
- package/dist/lib/setup/ui/table.js +0 -1
- package/dist/lib/setup/ui/title.d.ts +0 -1
- package/dist/lib/setup/ui/title.js +0 -1
- package/dist/lib/setup/ui/tokens.d.ts +0 -1
- package/dist/lib/setup/ui/tokens.js +0 -1
- package/dist/lib/setup.d.ts +2 -31
- package/dist/lib/setup.js +13 -9
- package/dist/lib/staticSearch.d.ts +0 -1
- package/dist/lib/staticSearch.js +0 -1
- package/dist/lib/store.d.ts +0 -1
- package/dist/lib/store.js +0 -1
- package/dist/lib/structuredIngest.d.ts +0 -1
- package/dist/lib/structuredIngest.js +0 -1
- package/dist/lib/tags.d.ts +0 -1
- package/dist/lib/tags.js +0 -1
- package/dist/lib/timeline.d.ts +2 -3
- package/dist/lib/timeline.js +3 -4
- package/dist/lib/trace.d.ts +1 -16
- package/dist/lib/trace.js +0 -1
- package/dist/lib/upgrade.d.ts +0 -1
- package/dist/lib/upgrade.js +0 -1
- package/dist/lib/videoExtract.d.ts +0 -1
- package/dist/lib/videoExtract.js +0 -1
- package/dist/lib/webIndex.d.ts +1 -3
- package/dist/lib/webIndex.js +0 -1
- package/dist/lib/webIngest.d.ts +13 -1
- package/dist/lib/webIngest.js +98 -24
- package/dist/lib/wikilinks.d.ts +3 -3
- package/dist/lib/wikilinks.js +0 -1
- package/dist/postinstall.d.ts +0 -1
- package/dist/postinstall.js +0 -1
- package/dist/sandbox/client.d.ts +0 -1
- package/dist/sandbox/client.js +0 -1
- package/dist/sandbox/helper-template.d.ts +0 -1
- package/dist/sandbox/helper-template.js +0 -1
- package/dist/sandbox/manager.d.ts +0 -9
- package/dist/sandbox/manager.js +2 -3
- package/dist/sandbox/server.d.ts +2 -3
- package/dist/sandbox/server.js +7 -7
- package/docs/logo.svg +25 -0
- package/package.json +18 -6
- package/prompts/synthesize.md +2 -0
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/archive.d.ts.map +0 -1
- package/dist/lib/archive.js.map +0 -1
- package/dist/lib/ask.d.ts.map +0 -1
- package/dist/lib/ask.js.map +0 -1
- package/dist/lib/attachments.d.ts.map +0 -1
- package/dist/lib/attachments.js.map +0 -1
- package/dist/lib/audioExtract.d.ts.map +0 -1
- package/dist/lib/audioExtract.js.map +0 -1
- package/dist/lib/audit.d.ts.map +0 -1
- package/dist/lib/audit.js.map +0 -1
- package/dist/lib/bootstrap.d.ts.map +0 -1
- package/dist/lib/bootstrap.js.map +0 -1
- package/dist/lib/chat/SlashPalette.d.ts.map +0 -1
- package/dist/lib/chat/SlashPalette.js.map +0 -1
- package/dist/lib/chat/boot-splash.d.ts.map +0 -1
- package/dist/lib/chat/boot-splash.js.map +0 -1
- package/dist/lib/chat/choose.d.ts.map +0 -1
- package/dist/lib/chat/choose.js.map +0 -1
- package/dist/lib/chat/commands.d.ts.map +0 -1
- package/dist/lib/chat/commands.js.map +0 -1
- package/dist/lib/chat/components/CitationText.d.ts.map +0 -1
- package/dist/lib/chat/components/CitationText.js.map +0 -1
- package/dist/lib/chat/components/MarkdownRenderer.d.ts.map +0 -1
- package/dist/lib/chat/components/MarkdownRenderer.js.map +0 -1
- package/dist/lib/chat/components/ToolCallCard.d.ts.map +0 -1
- package/dist/lib/chat/components/ToolCallCard.js.map +0 -1
- package/dist/lib/chat/focus.d.ts.map +0 -1
- package/dist/lib/chat/focus.js.map +0 -1
- package/dist/lib/chat/index.d.ts.map +0 -1
- package/dist/lib/chat/index.js.map +0 -1
- package/dist/lib/chat/intent.d.ts.map +0 -1
- package/dist/lib/chat/intent.js.map +0 -1
- package/dist/lib/chat/llmTurn.d.ts.map +0 -1
- package/dist/lib/chat/llmTurn.js.map +0 -1
- package/dist/lib/chat/recall.d.ts.map +0 -1
- package/dist/lib/chat/recall.js.map +0 -1
- package/dist/lib/chat/render.d.ts.map +0 -1
- package/dist/lib/chat/render.js.map +0 -1
- package/dist/lib/chat/session.d.ts.map +0 -1
- package/dist/lib/chat/session.js.map +0 -1
- package/dist/lib/chat/theme.d.ts.map +0 -1
- package/dist/lib/chat/theme.js.map +0 -1
- package/dist/lib/chat/toolFence.d.ts.map +0 -1
- package/dist/lib/chat/toolFence.js.map +0 -1
- package/dist/lib/chat/tools.d.ts.map +0 -1
- package/dist/lib/chat/tools.js.map +0 -1
- package/dist/lib/chat/types.d.ts.map +0 -1
- package/dist/lib/chat/types.js.map +0 -1
- package/dist/lib/chat/write.d.ts.map +0 -1
- package/dist/lib/chat/write.js.map +0 -1
- package/dist/lib/chunkSplitter.d.ts.map +0 -1
- package/dist/lib/chunkSplitter.js.map +0 -1
- package/dist/lib/cleanup.d.ts.map +0 -1
- package/dist/lib/cleanup.js.map +0 -1
- package/dist/lib/config.d.ts.map +0 -1
- package/dist/lib/config.js.map +0 -1
- package/dist/lib/dashboard.d.ts.map +0 -1
- package/dist/lib/dashboard.js.map +0 -1
- package/dist/lib/db.d.ts.map +0 -1
- package/dist/lib/db.js.map +0 -1
- package/dist/lib/dbSearch.d.ts.map +0 -1
- package/dist/lib/dbSearch.js.map +0 -1
- package/dist/lib/dbWrite.d.ts.map +0 -1
- package/dist/lib/dbWrite.js.map +0 -1
- package/dist/lib/desktopNotify.d.ts.map +0 -1
- package/dist/lib/desktopNotify.js.map +0 -1
- package/dist/lib/docxExtract.d.ts.map +0 -1
- package/dist/lib/docxExtract.js.map +0 -1
- package/dist/lib/dream.d.ts.map +0 -1
- package/dist/lib/dream.js.map +0 -1
- package/dist/lib/embeddings.d.ts.map +0 -1
- package/dist/lib/embeddings.js.map +0 -1
- package/dist/lib/export.d.ts.map +0 -1
- package/dist/lib/export.js.map +0 -1
- package/dist/lib/exportProject.d.ts.map +0 -1
- package/dist/lib/exportProject.js.map +0 -1
- package/dist/lib/federated.d.ts.map +0 -1
- package/dist/lib/federated.js.map +0 -1
- package/dist/lib/fileDetect.d.ts.map +0 -1
- package/dist/lib/fileDetect.js.map +0 -1
- package/dist/lib/graph.d.ts.map +0 -1
- package/dist/lib/graph.js.map +0 -1
- package/dist/lib/heartbeat.d.ts.map +0 -1
- package/dist/lib/heartbeat.js.map +0 -1
- package/dist/lib/history.d.ts +0 -39
- package/dist/lib/history.d.ts.map +0 -1
- package/dist/lib/history.js +0 -112
- package/dist/lib/history.js.map +0 -1
- package/dist/lib/hybridSearch.d.ts.map +0 -1
- package/dist/lib/hybridSearch.js.map +0 -1
- package/dist/lib/idFormat.d.ts.map +0 -1
- package/dist/lib/idFormat.js.map +0 -1
- package/dist/lib/imageExtract.d.ts.map +0 -1
- package/dist/lib/imageExtract.js.map +0 -1
- package/dist/lib/import.d.ts.map +0 -1
- package/dist/lib/import.js.map +0 -1
- package/dist/lib/importProject.d.ts.map +0 -1
- package/dist/lib/importProject.js.map +0 -1
- package/dist/lib/ingest.d.ts.map +0 -1
- package/dist/lib/ingest.js.map +0 -1
- package/dist/lib/lensing.d.ts.map +0 -1
- package/dist/lib/lensing.js.map +0 -1
- package/dist/lib/llm.d.ts.map +0 -1
- package/dist/lib/llm.js.map +0 -1
- package/dist/lib/lock.d.ts.map +0 -1
- package/dist/lib/lock.js.map +0 -1
- package/dist/lib/maintenance.d.ts.map +0 -1
- package/dist/lib/maintenance.js.map +0 -1
- package/dist/lib/migrate.d.ts.map +0 -1
- package/dist/lib/migrate.js.map +0 -1
- package/dist/lib/modelValidation.d.ts.map +0 -1
- package/dist/lib/modelValidation.js.map +0 -1
- package/dist/lib/multimodalIngest.d.ts.map +0 -1
- package/dist/lib/multimodalIngest.js.map +0 -1
- package/dist/lib/paths.d.ts.map +0 -1
- package/dist/lib/paths.js.map +0 -1
- package/dist/lib/pdfExtract.d.ts.map +0 -1
- package/dist/lib/pdfExtract.js.map +0 -1
- package/dist/lib/portfolio.d.ts.map +0 -1
- package/dist/lib/portfolio.js.map +0 -1
- package/dist/lib/portfolioHtml.d.ts.map +0 -1
- package/dist/lib/portfolioHtml.js.map +0 -1
- package/dist/lib/preferences.d.ts.map +0 -1
- package/dist/lib/preferences.js.map +0 -1
- package/dist/lib/progress.d.ts.map +0 -1
- package/dist/lib/progress.js.map +0 -1
- package/dist/lib/projectIdentity.d.ts.map +0 -1
- package/dist/lib/projectIdentity.js.map +0 -1
- package/dist/lib/recall.d.ts.map +0 -1
- package/dist/lib/recall.js.map +0 -1
- package/dist/lib/remote.d.ts.map +0 -1
- package/dist/lib/remote.js.map +0 -1
- package/dist/lib/remoteWizard.d.ts.map +0 -1
- package/dist/lib/remoteWizard.js.map +0 -1
- package/dist/lib/resolver.d.ts.map +0 -1
- package/dist/lib/resolver.js.map +0 -1
- package/dist/lib/retry.d.ts.map +0 -1
- package/dist/lib/retry.js.map +0 -1
- package/dist/lib/rulesGen.d.ts.map +0 -1
- package/dist/lib/rulesGen.js.map +0 -1
- package/dist/lib/search.d.ts.map +0 -1
- package/dist/lib/search.js.map +0 -1
- package/dist/lib/setup/coldStart.d.ts.map +0 -1
- package/dist/lib/setup/coldStart.js.map +0 -1
- package/dist/lib/setup/configSetRender.d.ts.map +0 -1
- package/dist/lib/setup/configSetRender.js.map +0 -1
- package/dist/lib/setup/dreamRender.d.ts.map +0 -1
- package/dist/lib/setup/dreamRender.js.map +0 -1
- package/dist/lib/setup/dreamState.d.ts.map +0 -1
- package/dist/lib/setup/dreamState.js.map +0 -1
- package/dist/lib/setup/modelsRender.d.ts.map +0 -1
- package/dist/lib/setup/modelsRender.js.map +0 -1
- package/dist/lib/setup/remoteRender.d.ts.map +0 -1
- package/dist/lib/setup/remoteRender.js.map +0 -1
- package/dist/lib/setup/routingRender.d.ts.map +0 -1
- package/dist/lib/setup/routingRender.js.map +0 -1
- package/dist/lib/setup/sections/ides.d.ts.map +0 -1
- package/dist/lib/setup/sections/ides.js.map +0 -1
- package/dist/lib/setup/sections/preferences.d.ts.map +0 -1
- package/dist/lib/setup/sections/preferences.js.map +0 -1
- package/dist/lib/setup/sections/routing.d.ts.map +0 -1
- package/dist/lib/setup/sections/routing.js.map +0 -1
- package/dist/lib/setup/storePath.d.ts.map +0 -1
- package/dist/lib/setup/storePath.js.map +0 -1
- package/dist/lib/setup/summary.d.ts.map +0 -1
- package/dist/lib/setup/summary.js.map +0 -1
- package/dist/lib/setup/syncProjectsRender.d.ts.map +0 -1
- package/dist/lib/setup/syncProjectsRender.js.map +0 -1
- package/dist/lib/setup/ui/diff.d.ts.map +0 -1
- package/dist/lib/setup/ui/diff.js.map +0 -1
- package/dist/lib/setup/ui/footer.d.ts.map +0 -1
- package/dist/lib/setup/ui/footer.js.map +0 -1
- package/dist/lib/setup/ui/header.d.ts.map +0 -1
- package/dist/lib/setup/ui/header.js.map +0 -1
- package/dist/lib/setup/ui/index.d.ts.map +0 -1
- package/dist/lib/setup/ui/index.js.map +0 -1
- package/dist/lib/setup/ui/menu.d.ts.map +0 -1
- package/dist/lib/setup/ui/menu.js.map +0 -1
- package/dist/lib/setup/ui/panel.d.ts.map +0 -1
- package/dist/lib/setup/ui/panel.js.map +0 -1
- package/dist/lib/setup/ui/prompt.d.ts.map +0 -1
- package/dist/lib/setup/ui/prompt.js.map +0 -1
- package/dist/lib/setup/ui/safePrompt.d.ts.map +0 -1
- package/dist/lib/setup/ui/safePrompt.js.map +0 -1
- package/dist/lib/setup/ui/spinner.d.ts.map +0 -1
- package/dist/lib/setup/ui/spinner.js.map +0 -1
- package/dist/lib/setup/ui/status.d.ts.map +0 -1
- package/dist/lib/setup/ui/status.js.map +0 -1
- package/dist/lib/setup/ui/table.d.ts.map +0 -1
- package/dist/lib/setup/ui/table.js.map +0 -1
- package/dist/lib/setup/ui/title.d.ts.map +0 -1
- package/dist/lib/setup/ui/title.js.map +0 -1
- package/dist/lib/setup/ui/tokens.d.ts.map +0 -1
- package/dist/lib/setup/ui/tokens.js.map +0 -1
- package/dist/lib/setup.d.ts.map +0 -1
- package/dist/lib/setup.js.map +0 -1
- package/dist/lib/staticSearch.d.ts.map +0 -1
- package/dist/lib/staticSearch.js.map +0 -1
- package/dist/lib/store.d.ts.map +0 -1
- package/dist/lib/store.js.map +0 -1
- package/dist/lib/structuredIngest.d.ts.map +0 -1
- package/dist/lib/structuredIngest.js.map +0 -1
- package/dist/lib/tags.d.ts.map +0 -1
- package/dist/lib/tags.js.map +0 -1
- package/dist/lib/timeline.d.ts.map +0 -1
- package/dist/lib/timeline.js.map +0 -1
- package/dist/lib/trace.d.ts.map +0 -1
- package/dist/lib/trace.js.map +0 -1
- package/dist/lib/upgrade.d.ts.map +0 -1
- package/dist/lib/upgrade.js.map +0 -1
- package/dist/lib/videoExtract.d.ts.map +0 -1
- package/dist/lib/videoExtract.js.map +0 -1
- package/dist/lib/webIndex.d.ts.map +0 -1
- package/dist/lib/webIndex.js.map +0 -1
- package/dist/lib/webIngest.d.ts.map +0 -1
- package/dist/lib/webIngest.js.map +0 -1
- package/dist/lib/wikilinks.d.ts.map +0 -1
- package/dist/lib/wikilinks.js.map +0 -1
- package/dist/postinstall.d.ts.map +0 -1
- package/dist/postinstall.js.map +0 -1
- package/dist/sandbox/client.d.ts.map +0 -1
- package/dist/sandbox/client.js.map +0 -1
- package/dist/sandbox/helper-template.d.ts.map +0 -1
- package/dist/sandbox/helper-template.js.map +0 -1
- package/dist/sandbox/index.d.ts +0 -10
- package/dist/sandbox/index.d.ts.map +0 -1
- package/dist/sandbox/index.js +0 -10
- package/dist/sandbox/index.js.map +0 -1
- package/dist/sandbox/manager.d.ts.map +0 -1
- package/dist/sandbox/manager.js.map +0 -1
- package/dist/sandbox/server.d.ts.map +0 -1
- package/dist/sandbox/server.js.map +0 -1
package/dist/lib/embeddings.js
CHANGED
|
@@ -45,7 +45,13 @@ export class GnosysEmbeddings {
|
|
|
45
45
|
// Dynamic import — keeps @huggingface/transformers out of the main bundle.
|
|
46
46
|
// dtype 'q8' replaces the v2-era `quantized: true` option (8-bit quantized,
|
|
47
47
|
// ~80 MB vs ~280 MB for fp32). Smaller is fine for sentence embeddings.
|
|
48
|
-
|
|
48
|
+
let pipeline;
|
|
49
|
+
try {
|
|
50
|
+
({ pipeline } = await import("@huggingface/transformers"));
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
throw new Error("Local embeddings require @huggingface/transformers. Install it with: npm install @huggingface/transformers");
|
|
54
|
+
}
|
|
49
55
|
this.pipeline = (await pipeline("feature-extraction", MODEL_NAME, {
|
|
50
56
|
dtype: "q8",
|
|
51
57
|
}));
|
|
@@ -227,5 +233,3 @@ export class GnosysEmbeddings {
|
|
|
227
233
|
this.db = null;
|
|
228
234
|
}
|
|
229
235
|
}
|
|
230
|
-
export { EMBEDDING_DIM };
|
|
231
|
-
//# sourceMappingURL=embeddings.js.map
|
package/dist/lib/export.d.ts
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* _graph/
|
|
19
19
|
* relationships.md (relationship index)
|
|
20
20
|
*/
|
|
21
|
-
import { GnosysDB } from "./db.js";
|
|
21
|
+
import type { GnosysDB } from "./db.js";
|
|
22
22
|
export interface ExportOptions {
|
|
23
23
|
/** Target directory for export (will be created if needed) */
|
|
24
24
|
targetDir: string;
|
|
@@ -38,6 +38,7 @@ export interface ExportOptions {
|
|
|
38
38
|
export interface ExportReport {
|
|
39
39
|
memoriesExported: number;
|
|
40
40
|
memoriesSkipped: number;
|
|
41
|
+
archivedExcluded: number;
|
|
41
42
|
summariesExported: number;
|
|
42
43
|
reviewsExported: boolean;
|
|
43
44
|
graphExported: boolean;
|
|
@@ -84,9 +85,12 @@ export declare class GnosysExporter {
|
|
|
84
85
|
* Slugify a title for use as a filename.
|
|
85
86
|
*/
|
|
86
87
|
private slugify;
|
|
88
|
+
/**
|
|
89
|
+
* Ensure a resolved file path stays within the export target directory.
|
|
90
|
+
*/
|
|
91
|
+
private assertWithin;
|
|
87
92
|
}
|
|
88
93
|
/**
|
|
89
94
|
* Format an export report as human-readable text.
|
|
90
95
|
*/
|
|
91
96
|
export declare function formatExportReport(report: ExportReport): string;
|
|
92
|
-
//# sourceMappingURL=export.d.ts.map
|
package/dist/lib/export.js
CHANGED
|
@@ -34,6 +34,7 @@ export class GnosysExporter {
|
|
|
34
34
|
const report = {
|
|
35
35
|
memoriesExported: 0,
|
|
36
36
|
memoriesSkipped: 0,
|
|
37
|
+
archivedExcluded: 0,
|
|
37
38
|
summariesExported: 0,
|
|
38
39
|
reviewsExported: false,
|
|
39
40
|
graphExported: false,
|
|
@@ -46,6 +47,10 @@ export class GnosysExporter {
|
|
|
46
47
|
const memories = activeOnly
|
|
47
48
|
? this.db.getActiveMemories()
|
|
48
49
|
: this.db.getAllMemories();
|
|
50
|
+
if (activeOnly) {
|
|
51
|
+
report.archivedExcluded =
|
|
52
|
+
this.db.getAllMemories().length - this.db.getActiveMemories().length;
|
|
53
|
+
}
|
|
49
54
|
const total = memories.length;
|
|
50
55
|
// Export each memory as a Markdown file
|
|
51
56
|
for (let i = 0; i < memories.length; i++) {
|
|
@@ -99,7 +104,8 @@ export class GnosysExporter {
|
|
|
99
104
|
* Returns true if exported, false if skipped (already exists).
|
|
100
105
|
*/
|
|
101
106
|
async exportMemory(mem, targetDir, overwrite) {
|
|
102
|
-
const
|
|
107
|
+
const safeCategory = this.slugify(mem.category) || "uncategorized";
|
|
108
|
+
const categoryDir = path.join(targetDir, safeCategory);
|
|
103
109
|
await fs.mkdir(categoryDir, { recursive: true });
|
|
104
110
|
const filename = this.slugify(mem.title) + ".md";
|
|
105
111
|
const filePath = path.join(categoryDir, filename);
|
|
@@ -142,6 +148,7 @@ export class GnosysExporter {
|
|
|
142
148
|
if (wikilinks.length > 0) {
|
|
143
149
|
content += `\n\n---\n\n## Related\n\n${wikilinks.join("\n")}`;
|
|
144
150
|
}
|
|
151
|
+
this.assertWithin(targetDir, filePath);
|
|
145
152
|
await fs.writeFile(filePath, content, "utf-8");
|
|
146
153
|
return true;
|
|
147
154
|
}
|
|
@@ -180,6 +187,7 @@ export class GnosysExporter {
|
|
|
180
187
|
"",
|
|
181
188
|
summary.content,
|
|
182
189
|
].join("\n");
|
|
190
|
+
this.assertWithin(targetDir, filePath);
|
|
183
191
|
await fs.writeFile(filePath, content, "utf-8");
|
|
184
192
|
exported++;
|
|
185
193
|
}
|
|
@@ -230,6 +238,7 @@ export class GnosysExporter {
|
|
|
230
238
|
// Skip malformed reviews
|
|
231
239
|
}
|
|
232
240
|
}
|
|
241
|
+
this.assertWithin(targetDir, filePath);
|
|
233
242
|
await fs.writeFile(filePath, lines.join("\n"), "utf-8");
|
|
234
243
|
return true;
|
|
235
244
|
}
|
|
@@ -278,6 +287,7 @@ export class GnosysExporter {
|
|
|
278
287
|
if (bySource.size === 0) {
|
|
279
288
|
lines.push("No relationships discovered yet. Run `gnosys dream` to discover relationships.");
|
|
280
289
|
}
|
|
290
|
+
this.assertWithin(targetDir, filePath);
|
|
281
291
|
await fs.writeFile(filePath, lines.join("\n"), "utf-8");
|
|
282
292
|
return true;
|
|
283
293
|
}
|
|
@@ -334,6 +344,16 @@ export class GnosysExporter {
|
|
|
334
344
|
.replace(/^-|-$/g, "")
|
|
335
345
|
.substring(0, 80);
|
|
336
346
|
}
|
|
347
|
+
/**
|
|
348
|
+
* Ensure a resolved file path stays within the export target directory.
|
|
349
|
+
*/
|
|
350
|
+
assertWithin(targetDir, filePath) {
|
|
351
|
+
const root = path.resolve(targetDir);
|
|
352
|
+
const resolved = path.resolve(filePath);
|
|
353
|
+
if (resolved !== root && !resolved.startsWith(root + path.sep)) {
|
|
354
|
+
throw new Error(`Refusing to write outside export dir: ${resolved}`);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
337
357
|
}
|
|
338
358
|
// ─── Format Helper ───────────────────────────────────────────────────────
|
|
339
359
|
/**
|
|
@@ -347,6 +367,9 @@ export function formatExportReport(report) {
|
|
|
347
367
|
lines.push(`Target: ${report.targetDir}`);
|
|
348
368
|
lines.push(`Memories exported: ${report.memoriesExported}`);
|
|
349
369
|
lines.push(`Memories skipped (already exist): ${report.memoriesSkipped}`);
|
|
370
|
+
if (report.archivedExcluded > 0) {
|
|
371
|
+
lines.push(`Archived excluded: ${report.archivedExcluded} — re-run with --all for a full export`);
|
|
372
|
+
}
|
|
350
373
|
lines.push(`Summaries exported: ${report.summariesExported}`);
|
|
351
374
|
lines.push(`Reviews exported: ${report.reviewsExported ? "yes" : "no"}`);
|
|
352
375
|
lines.push(`Graph exported: ${report.graphExported ? "yes" : "no"}`);
|
|
@@ -359,4 +382,3 @@ export function formatExportReport(report) {
|
|
|
359
382
|
}
|
|
360
383
|
return lines.join("\n");
|
|
361
384
|
}
|
|
362
|
-
//# sourceMappingURL=export.js.map
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* audit log, and metadata into a portable .json.gz file. Lossless round-trip
|
|
4
4
|
* with importProject.ts. Format version 1.
|
|
5
5
|
*/
|
|
6
|
-
import { GnosysDB, DbMemory, DbProject, DbRelationship, DbAuditEntry } from "./db.js";
|
|
6
|
+
import type { GnosysDB, DbMemory, DbProject, DbRelationship, DbAuditEntry } from "./db.js";
|
|
7
7
|
export declare const BUNDLE_FORMAT = "gnosys-project-bundle";
|
|
8
8
|
export declare const BUNDLE_VERSION = 1;
|
|
9
|
-
|
|
9
|
+
interface BundleManifest {
|
|
10
10
|
format: typeof BUNDLE_FORMAT;
|
|
11
11
|
version: number;
|
|
12
12
|
created: string;
|
|
@@ -38,6 +38,7 @@ export interface ExportProjectOptions {
|
|
|
38
38
|
export interface ExportProjectResult {
|
|
39
39
|
outputPath: string;
|
|
40
40
|
memoryCount: number;
|
|
41
|
+
archivedExcluded: number;
|
|
41
42
|
relationshipCount: number;
|
|
42
43
|
auditEntryCount: number;
|
|
43
44
|
uncompressedBytes: number;
|
|
@@ -48,4 +49,4 @@ export interface ExportProjectResult {
|
|
|
48
49
|
* Bundle is fully self-contained — embeddings are base64-encoded inline.
|
|
49
50
|
*/
|
|
50
51
|
export declare function exportProject(db: GnosysDB, opts: ExportProjectOptions): ExportProjectResult;
|
|
51
|
-
|
|
52
|
+
export {};
|
|
@@ -31,6 +31,8 @@ export function exportProject(db, opts) {
|
|
|
31
31
|
throw new Error(`Project not found: ${opts.projectId}`);
|
|
32
32
|
}
|
|
33
33
|
const rawMemories = db.getMemoriesByProject(opts.projectId, !!opts.includeArchived);
|
|
34
|
+
const totalIncludingArchived = db.getMemoriesByProject(opts.projectId, true).length;
|
|
35
|
+
const archivedExcluded = opts.includeArchived ? 0 : totalIncludingArchived - rawMemories.length;
|
|
34
36
|
const memories = rawMemories.map((m) => {
|
|
35
37
|
const { embedding: _embedding, ...rest } = m;
|
|
36
38
|
return {
|
|
@@ -63,10 +65,10 @@ export function exportProject(db, opts) {
|
|
|
63
65
|
return {
|
|
64
66
|
outputPath: opts.outputPath,
|
|
65
67
|
memoryCount: memories.length,
|
|
68
|
+
archivedExcluded,
|
|
66
69
|
relationshipCount: relationships.length,
|
|
67
70
|
auditEntryCount: audit_log.length,
|
|
68
71
|
uncompressedBytes: Buffer.byteLength(json, "utf-8"),
|
|
69
72
|
compressedBytes: compressed.length,
|
|
70
73
|
};
|
|
71
74
|
}
|
|
72
|
-
//# sourceMappingURL=exportProject.js.map
|
package/dist/lib/federated.d.ts
CHANGED
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
* Tier boosting order: project (1.5x) > user (1.0x) > global (0.7x)
|
|
9
9
|
* Recency boost: memories accessed/modified in the last 24h get a 1.3x boost
|
|
10
10
|
*/
|
|
11
|
-
import { GnosysDB, DbMemory, MemoryScope } from "./db.js";
|
|
11
|
+
import type { GnosysDB, DbMemory, MemoryScope } from "./db.js";
|
|
12
|
+
import { type MachineConfig } from "./machineConfig.js";
|
|
12
13
|
export interface FederatedResult {
|
|
13
14
|
id: string;
|
|
14
15
|
title: string;
|
|
@@ -92,7 +93,7 @@ export declare function detectCurrentProject(db: GnosysDB, workingDir?: string):
|
|
|
92
93
|
* memory state. Designed for "dream mode" pre-computation or on-demand
|
|
93
94
|
* project status checks.
|
|
94
95
|
*/
|
|
95
|
-
export declare function generateBriefing(db: GnosysDB, projectId: string): ProjectBriefing | null;
|
|
96
|
+
export declare function generateBriefing(db: GnosysDB, projectId: string, machine?: MachineConfig | null): ProjectBriefing | null;
|
|
96
97
|
/**
|
|
97
98
|
* Generate briefings for ALL registered projects.
|
|
98
99
|
* Used by dream mode to pre-compute briefings.
|
|
@@ -110,4 +111,3 @@ export declare function getWorkingSet(db: GnosysDB, projectId: string, opts?: {
|
|
|
110
111
|
* Format the working set as a concise context block for agent consumption.
|
|
111
112
|
*/
|
|
112
113
|
export declare function formatWorkingSet(memories: DbMemory[]): string;
|
|
113
|
-
//# sourceMappingURL=federated.d.ts.map
|
package/dist/lib/federated.js
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
* Recency boost: memories accessed/modified in the last 24h get a 1.3x boost
|
|
10
10
|
*/
|
|
11
11
|
import { findProjectIdentity } from "./projectIdentity.js";
|
|
12
|
+
import { readMachineConfig } from "./machineConfig.js";
|
|
13
|
+
import { effectiveProjectPath } from "./projectPaths.js";
|
|
12
14
|
// ─── Boost Constants ────────────────────────────────────────────────────
|
|
13
15
|
const SCOPE_BOOST = {
|
|
14
16
|
project: 1.5,
|
|
@@ -182,7 +184,7 @@ export async function detectCurrentProject(db, workingDir) {
|
|
|
182
184
|
* memory state. Designed for "dream mode" pre-computation or on-demand
|
|
183
185
|
* project status checks.
|
|
184
186
|
*/
|
|
185
|
-
export function generateBriefing(db, projectId) {
|
|
187
|
+
export function generateBriefing(db, projectId, machine = readMachineConfig()) {
|
|
186
188
|
const project = db.getProject(projectId);
|
|
187
189
|
if (!project)
|
|
188
190
|
return null;
|
|
@@ -239,7 +241,7 @@ export function generateBriefing(db, projectId) {
|
|
|
239
241
|
return {
|
|
240
242
|
projectId,
|
|
241
243
|
projectName: project.name,
|
|
242
|
-
workingDirectory: project
|
|
244
|
+
workingDirectory: effectiveProjectPath(db, project, machine) ?? "(not on this machine)",
|
|
243
245
|
totalMemories: allProjectMems.length,
|
|
244
246
|
activeMemories: allProjectMems.filter((m) => m.status === "active").length,
|
|
245
247
|
categories,
|
|
@@ -255,8 +257,9 @@ export function generateBriefing(db, projectId) {
|
|
|
255
257
|
export function generateAllBriefings(db) {
|
|
256
258
|
const projects = db.getAllProjects();
|
|
257
259
|
const briefings = [];
|
|
260
|
+
const machine = readMachineConfig();
|
|
258
261
|
for (const project of projects) {
|
|
259
|
-
const briefing = generateBriefing(db, project.id);
|
|
262
|
+
const briefing = generateBriefing(db, project.id, machine);
|
|
260
263
|
if (briefing) {
|
|
261
264
|
briefings.push(briefing);
|
|
262
265
|
}
|
|
@@ -301,4 +304,3 @@ function getRelativeTime(isoDate) {
|
|
|
301
304
|
const days = Math.floor(hours / 24);
|
|
302
305
|
return `${days}d ago`;
|
|
303
306
|
}
|
|
304
|
-
//# sourceMappingURL=federated.js.map
|
package/dist/lib/fileDetect.d.ts
CHANGED
package/dist/lib/fileDetect.js
CHANGED
package/dist/lib/graph.d.ts
CHANGED
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
* Fully regeneratable sidecar file. Parses all [[wikilinks]] from memories
|
|
4
4
|
* and builds a JSON graph with nodes, edges, and stats.
|
|
5
5
|
*/
|
|
6
|
-
import { GnosysResolver } from "./resolver.js";
|
|
7
|
-
|
|
6
|
+
import type { GnosysResolver } from "./resolver.js";
|
|
7
|
+
interface GraphNode {
|
|
8
8
|
id: string;
|
|
9
9
|
title: string;
|
|
10
10
|
edges: number;
|
|
11
11
|
outgoing: number;
|
|
12
12
|
incoming: number;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
interface GraphEdge {
|
|
15
15
|
source: string;
|
|
16
16
|
target: string;
|
|
17
17
|
label: string;
|
|
@@ -47,4 +47,4 @@ export declare function loadGraph(storePath: string): Promise<GraphJSON | null>;
|
|
|
47
47
|
* Format graph stats for display.
|
|
48
48
|
*/
|
|
49
49
|
export declare function formatGraphStats(stats: GraphStats): string;
|
|
50
|
-
|
|
50
|
+
export {};
|
package/dist/lib/graph.js
CHANGED
package/dist/lib/heartbeat.d.ts
CHANGED
|
@@ -11,21 +11,8 @@
|
|
|
11
11
|
* Wire into commands that can block on I/O:
|
|
12
12
|
* status / sync / reindex / bootstrap / import / migrate-db / dream / doctor.
|
|
13
13
|
*/
|
|
14
|
-
export interface Heartbeat {
|
|
15
|
-
/** Update the message shown next to the spinner. Safe to call repeatedly. */
|
|
16
|
-
setMessage(msg: string): void;
|
|
17
|
-
/** Stop the spinner and clear the line. */
|
|
18
|
-
stop(): void;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Start a heartbeat. Returns a handle with `setMessage` and `stop`.
|
|
22
|
-
*
|
|
23
|
-
* In non-TTY contexts (pipes, CI), returns a no-op handle.
|
|
24
|
-
*/
|
|
25
|
-
export declare function startHeartbeat(message: string): Heartbeat;
|
|
26
14
|
/**
|
|
27
15
|
* Run an async function with a heartbeat wrapped around it. The heartbeat
|
|
28
16
|
* is always stopped, even on error.
|
|
29
17
|
*/
|
|
30
18
|
export declare function withHeartbeat<T>(message: string, fn: () => Promise<T>): Promise<T>;
|
|
31
|
-
//# sourceMappingURL=heartbeat.d.ts.map
|
package/dist/lib/heartbeat.js
CHANGED
|
@@ -33,7 +33,7 @@ function paint(state) {
|
|
|
33
33
|
*
|
|
34
34
|
* In non-TTY contexts (pipes, CI), returns a no-op handle.
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
function startHeartbeat(message) {
|
|
37
37
|
if (!isTty()) {
|
|
38
38
|
return {
|
|
39
39
|
setMessage: () => { },
|
|
@@ -88,4 +88,3 @@ export async function withHeartbeat(message, fn) {
|
|
|
88
88
|
hb.stop();
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
//# sourceMappingURL=heartbeat.js.map
|
|
@@ -7,27 +7,12 @@
|
|
|
7
7
|
* semantic — embeddings cosine similarity only
|
|
8
8
|
* hybrid — RRF fusion of both (default when embeddings exist)
|
|
9
9
|
*/
|
|
10
|
-
import { GnosysSearch } from "./search.js";
|
|
10
|
+
import type { GnosysSearch } from "./search.js";
|
|
11
11
|
import { GnosysEmbeddings } from "./embeddings.js";
|
|
12
|
-
import { GnosysResolver } from "./resolver.js";
|
|
13
|
-
import { GnosysDB } from "./db.js";
|
|
14
|
-
|
|
15
|
-
export
|
|
16
|
-
relativePath: string;
|
|
17
|
-
title: string;
|
|
18
|
-
snippet: string;
|
|
19
|
-
score: number;
|
|
20
|
-
/** Which method(s) found this result */
|
|
21
|
-
sources: ("keyword" | "semantic" | "archive")[];
|
|
22
|
-
/** Full memory content (loaded on demand for ask engine) */
|
|
23
|
-
content?: string;
|
|
24
|
-
/** The memory frontmatter content field */
|
|
25
|
-
fullContent?: string;
|
|
26
|
-
/** Memory ID (used for dearchiving) */
|
|
27
|
-
memoryId?: string;
|
|
28
|
-
/** Whether this result came from the archive */
|
|
29
|
-
fromArchive?: boolean;
|
|
30
|
-
}
|
|
12
|
+
import type { GnosysResolver } from "./resolver.js";
|
|
13
|
+
import type { GnosysDB } from "./db.js";
|
|
14
|
+
import type { HybridSearchResult, SearchMode } from "./searchTypes.js";
|
|
15
|
+
export type { HybridSearchResult, SearchMode } from "./searchTypes.js";
|
|
31
16
|
export declare class GnosysHybridSearch {
|
|
32
17
|
private search;
|
|
33
18
|
private embeddings;
|
|
@@ -77,4 +62,3 @@ export declare class GnosysHybridSearch {
|
|
|
77
62
|
*/
|
|
78
63
|
embeddingCount(): number;
|
|
79
64
|
}
|
|
80
|
-
//# sourceMappingURL=hybridSearch.d.ts.map
|
package/dist/lib/hybridSearch.js
CHANGED
package/dist/lib/idFormat.d.ts
CHANGED
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import type { GnosysDB } from "./db.js";
|
|
21
21
|
export type IdFormat = "short" | "long" | "raw";
|
|
22
|
-
export declare function isTtyStdout(): boolean;
|
|
23
22
|
/** Build the gnosys:// URI for a memory id. Encodes the id defensively. */
|
|
24
23
|
export declare function memoryUri(id: string): string;
|
|
25
24
|
/** Wrap `display` in OSC8 escapes pointing at `uri`. Caller decides when to use. */
|
|
@@ -59,4 +58,3 @@ export declare function buildProjectNameLookup(db: GnosysDB): Map<string, string
|
|
|
59
58
|
* `short` for unknown inputs so CLI callers don't have to guard.
|
|
60
59
|
*/
|
|
61
60
|
export declare function parseIdFormat(value: string | undefined): IdFormat;
|
|
62
|
-
//# sourceMappingURL=idFormat.d.ts.map
|
package/dist/lib/idFormat.js
CHANGED
|
@@ -35,7 +35,7 @@ const SHORT_ULID_PREFIX = 8;
|
|
|
35
35
|
const OSC8_START = "\x1b]8;;";
|
|
36
36
|
const OSC8_BREAK = "\x1b\\";
|
|
37
37
|
const OSC8_END = "\x1b]8;;\x1b\\";
|
|
38
|
-
|
|
38
|
+
function isTtyStdout() {
|
|
39
39
|
return Boolean(process.stdout.isTTY);
|
|
40
40
|
}
|
|
41
41
|
/** Build the gnosys:// URI for a memory id. Encodes the id defensively. */
|
|
@@ -111,4 +111,3 @@ export function parseIdFormat(value) {
|
|
|
111
111
|
return value;
|
|
112
112
|
return "short";
|
|
113
113
|
}
|
|
114
|
-
//# sourceMappingURL=idFormat.js.map
|
|
@@ -23,4 +23,3 @@ export interface ImageDescription {
|
|
|
23
23
|
* returns a minimal fallback description with just filename and file size.
|
|
24
24
|
*/
|
|
25
25
|
export declare function extractImageDescription(filePath: string, provider: LLMProvider): Promise<ImageDescription>;
|
|
26
|
-
//# sourceMappingURL=imageExtract.d.ts.map
|
package/dist/lib/imageExtract.js
CHANGED
package/dist/lib/import.d.ts
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Supports CSV, JSON, JSONL formats with LLM or structured ingestion modes.
|
|
4
4
|
* Shared core used by both the MCP tool and CLI command.
|
|
5
5
|
*/
|
|
6
|
-
import { GnosysIngestion } from "./ingest.js";
|
|
7
|
-
import { GnosysStore } from "./store.js";
|
|
8
|
-
import { GnosysDB } from "./db.js";
|
|
6
|
+
import type { GnosysIngestion } from "./ingest.js";
|
|
7
|
+
import type { GnosysStore } from "./store.js";
|
|
8
|
+
import type { GnosysDB } from "./db.js";
|
|
9
9
|
export interface ImportOptions {
|
|
10
10
|
format: "csv" | "json" | "jsonl";
|
|
11
11
|
data: string;
|
|
@@ -21,7 +21,7 @@ export interface ImportOptions {
|
|
|
21
21
|
authority?: "declared" | "observed" | "imported" | "inferred";
|
|
22
22
|
onProgress?: (progress: ImportProgress) => void;
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
interface ImportProgress {
|
|
25
25
|
processed: number;
|
|
26
26
|
total: number;
|
|
27
27
|
current: string;
|
|
@@ -41,6 +41,7 @@ export interface ImportResult {
|
|
|
41
41
|
totalProcessed: number;
|
|
42
42
|
duration: number;
|
|
43
43
|
}
|
|
44
|
+
export declare function loadData(data: string, format: "csv" | "json" | "jsonl"): Promise<Record<string, unknown>[]>;
|
|
44
45
|
export declare function performImport(store: GnosysStore, ingestion: GnosysIngestion, options: ImportOptions, db?: GnosysDB | null, projectId?: string | null, scope?: string): Promise<ImportResult>;
|
|
45
46
|
/**
|
|
46
47
|
* Format a human-readable summary of import results.
|
|
@@ -50,4 +51,4 @@ export declare function formatImportSummary(result: ImportResult): string;
|
|
|
50
51
|
* Estimate import duration for smart threshold guidance.
|
|
51
52
|
*/
|
|
52
53
|
export declare function estimateDuration(recordCount: number, mode: "llm" | "structured", concurrency?: number): string;
|
|
53
|
-
|
|
54
|
+
export {};
|
package/dist/lib/import.js
CHANGED
|
@@ -6,42 +6,13 @@
|
|
|
6
6
|
import { parse as csvParse } from "csv-parse/sync";
|
|
7
7
|
import fs from "fs/promises";
|
|
8
8
|
import { syncMemoryToDb } from "./dbWrite.js";
|
|
9
|
-
|
|
10
|
-
function isSafeImportUrl(urlStr) {
|
|
11
|
-
try {
|
|
12
|
-
const url = new URL(urlStr);
|
|
13
|
-
if (url.protocol !== "http:" && url.protocol !== "https:")
|
|
14
|
-
return false;
|
|
15
|
-
const hostname = url.hostname;
|
|
16
|
-
if (hostname === "169.254.169.254" || hostname === "metadata.google.internal")
|
|
17
|
-
return false;
|
|
18
|
-
const ipv4Match = hostname.match(/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/);
|
|
19
|
-
if (ipv4Match) {
|
|
20
|
-
const [, a, b] = ipv4Match.map(Number);
|
|
21
|
-
if (a === 10)
|
|
22
|
-
return false;
|
|
23
|
-
if (a === 172 && b >= 16 && b <= 31)
|
|
24
|
-
return false;
|
|
25
|
-
if (a === 192 && b === 168)
|
|
26
|
-
return false;
|
|
27
|
-
if (a === 169 && b === 254)
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
return true;
|
|
31
|
-
}
|
|
32
|
-
catch {
|
|
33
|
-
return false;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
9
|
+
import { safeFetch } from "./webIngest.js";
|
|
36
10
|
// ─── Parsing ─────────────────────────────────────────────────────────────
|
|
37
|
-
async function loadData(data, format) {
|
|
11
|
+
export async function loadData(data, format) {
|
|
38
12
|
let raw;
|
|
39
13
|
// Determine if data is a file path, URL, or inline
|
|
40
14
|
if (data.startsWith("http://") || data.startsWith("https://")) {
|
|
41
|
-
|
|
42
|
-
throw new Error(`Refusing to fetch unsafe URL: ${data}`);
|
|
43
|
-
}
|
|
44
|
-
const response = await fetch(data);
|
|
15
|
+
const response = await safeFetch(data);
|
|
45
16
|
if (!response.ok) {
|
|
46
17
|
throw new Error(`Failed to fetch URL: ${response.status} ${response.statusText}`);
|
|
47
18
|
}
|
|
@@ -359,4 +330,3 @@ export function estimateDuration(recordCount, mode, concurrency = 5) {
|
|
|
359
330
|
return `~${Math.ceil(seconds / 60)}m`;
|
|
360
331
|
return `~${(seconds / 3600).toFixed(1)}h`;
|
|
361
332
|
}
|
|
362
|
-
//# sourceMappingURL=import.js.map
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* exportProject.ts into the central DB. Three conflict strategies for
|
|
4
4
|
* existing project IDs / memory IDs.
|
|
5
5
|
*/
|
|
6
|
-
import { GnosysDB } from "./db.js";
|
|
7
|
-
import { ProjectBundle } from "./exportProject.js";
|
|
8
|
-
|
|
6
|
+
import type { GnosysDB } from "./db.js";
|
|
7
|
+
import { type ProjectBundle } from "./exportProject.js";
|
|
8
|
+
type ImportStrategy =
|
|
9
9
|
/** Skip rows that already exist; insert new ones. Safe default. */
|
|
10
10
|
"merge"
|
|
11
11
|
/** Replace existing project + its memories. Destructive — deletes target project's memories first. */
|
|
@@ -32,4 +32,4 @@ export interface ImportProjectResult {
|
|
|
32
32
|
export declare function readBundle(bundlePath: string): ProjectBundle;
|
|
33
33
|
/** Restore a bundle into the central DB. Returns counts and the final project ID. */
|
|
34
34
|
export declare function importProject(db: GnosysDB, opts: ImportProjectOptions): ImportProjectResult;
|
|
35
|
-
|
|
35
|
+
export {};
|
|
@@ -36,7 +36,7 @@ export function importProject(db, opts) {
|
|
|
36
36
|
}
|
|
37
37
|
const existing = db.getProject(project.id);
|
|
38
38
|
let projectId = project.id;
|
|
39
|
-
|
|
39
|
+
const memoryIdRewrites = new Map();
|
|
40
40
|
let memoriesReplaced = 0;
|
|
41
41
|
if (existing) {
|
|
42
42
|
if (strategy === "replace") {
|
|
@@ -132,4 +132,3 @@ export function importProject(db, opts) {
|
|
|
132
132
|
auditEntriesInserted,
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
//# sourceMappingURL=importProject.js.map
|
package/dist/lib/ingest.d.ts
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Accepts messy human input, produces clean markdown files with YAML frontmatter.
|
|
4
4
|
* Uses the LLM abstraction layer — works with Anthropic, Ollama, or any future provider.
|
|
5
5
|
*/
|
|
6
|
-
import { GnosysTagRegistry } from "./tags.js";
|
|
7
|
-
import { GnosysStore } from "./store.js";
|
|
8
|
-
import { GnosysConfig } from "./config.js";
|
|
6
|
+
import type { GnosysTagRegistry } from "./tags.js";
|
|
7
|
+
import type { GnosysStore } from "./store.js";
|
|
8
|
+
import { type GnosysConfig } from "./config.js";
|
|
9
9
|
interface IngestResult {
|
|
10
10
|
title: string;
|
|
11
11
|
category: string;
|
|
@@ -54,4 +54,3 @@ export declare class GnosysIngestion {
|
|
|
54
54
|
private slugify;
|
|
55
55
|
}
|
|
56
56
|
export {};
|
|
57
|
-
//# sourceMappingURL=ingest.d.ts.map
|
package/dist/lib/ingest.js
CHANGED
package/dist/lib/lensing.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* A lens is a set of filter criteria applied to memories.
|
|
5
5
|
* Compound lenses combine multiple filters with AND/OR logic.
|
|
6
6
|
*/
|
|
7
|
-
import { Memory } from "./store.js";
|
|
7
|
+
import type { Memory } from "./store.js";
|
|
8
8
|
export interface LensFilter {
|
|
9
9
|
category?: string;
|
|
10
10
|
tags?: string[];
|
|
@@ -23,4 +23,3 @@ export interface LensFilter {
|
|
|
23
23
|
* Apply a single lens filter to an array of memories.
|
|
24
24
|
*/
|
|
25
25
|
export declare function applyLens(memories: Memory[], lens: LensFilter): Memory[];
|
|
26
|
-
//# sourceMappingURL=lensing.d.ts.map
|
package/dist/lib/lensing.js
CHANGED