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/archive.d.ts
CHANGED
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
* search/ask → searches archive if active results insufficient,
|
|
10
10
|
* then dearchives used memories back to active
|
|
11
11
|
*/
|
|
12
|
-
import { GnosysStore, Memory } from "./store.js";
|
|
13
|
-
import { GnosysDB } from "./db.js";
|
|
14
|
-
import { GnosysConfig } from "./config.js";
|
|
12
|
+
import type { GnosysStore, Memory } from "./store.js";
|
|
13
|
+
import type { GnosysDB } from "./db.js";
|
|
14
|
+
import type { GnosysConfig } from "./config.js";
|
|
15
15
|
export interface ArchivedMemory {
|
|
16
16
|
id: string;
|
|
17
17
|
title: string;
|
|
@@ -93,4 +93,3 @@ export declare class GnosysArchive {
|
|
|
93
93
|
* Criteria: days since last reinforced > maxActiveDays AND decayed confidence < minConfidence
|
|
94
94
|
*/
|
|
95
95
|
export declare function getArchiveEligible(memories: Memory[], config: GnosysConfig): Memory[];
|
|
96
|
-
//# sourceMappingURL=archive.d.ts.map
|
package/dist/lib/archive.js
CHANGED
package/dist/lib/ask.d.ts
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* Supports streaming and "deep query" mode (auto follow-up on insufficient context).
|
|
6
6
|
* Uses the LLM abstraction layer — works with Anthropic, Ollama, or any future provider.
|
|
7
7
|
*/
|
|
8
|
-
import { GnosysHybridSearch } from "./hybridSearch.js";
|
|
9
|
-
import { GnosysConfig } from "./config.js";
|
|
10
|
-
import { GnosysResolver } from "./resolver.js";
|
|
8
|
+
import type { GnosysHybridSearch } from "./hybridSearch.js";
|
|
9
|
+
import { type GnosysConfig } from "./config.js";
|
|
10
|
+
import type { GnosysResolver } from "./resolver.js";
|
|
11
11
|
export interface AskResult {
|
|
12
12
|
answer: string;
|
|
13
13
|
sources: {
|
|
@@ -74,4 +74,3 @@ export declare class GnosysAsk {
|
|
|
74
74
|
*/
|
|
75
75
|
private extractCitedSources;
|
|
76
76
|
}
|
|
77
|
-
//# sourceMappingURL=ask.d.ts.map
|
package/dist/lib/ask.js
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Atomic file writes — temp file in the same directory, then rename into place.
|
|
3
|
+
*/
|
|
4
|
+
/** Atomically write `data` to `dest` (async). */
|
|
5
|
+
export declare function atomicWriteFile(dest: string, data: string): Promise<void>;
|
|
6
|
+
/** Atomically write `data` to `dest` (sync). */
|
|
7
|
+
export declare function atomicWriteFileSync(dest: string, data: string): void;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Atomic file writes — temp file in the same directory, then rename into place.
|
|
3
|
+
*/
|
|
4
|
+
import { promises as fsp } from "fs";
|
|
5
|
+
import * as fs from "fs";
|
|
6
|
+
import path from "path";
|
|
7
|
+
import { randomBytes } from "crypto";
|
|
8
|
+
function tmpPathFor(dest) {
|
|
9
|
+
const dir = path.dirname(dest);
|
|
10
|
+
const base = path.basename(dest);
|
|
11
|
+
return path.join(dir, `.${base}.${process.pid}.${randomBytes(4).toString("hex")}.tmp`);
|
|
12
|
+
}
|
|
13
|
+
/** Atomically write `data` to `dest` (async). */
|
|
14
|
+
export async function atomicWriteFile(dest, data) {
|
|
15
|
+
const tmp = tmpPathFor(dest);
|
|
16
|
+
try {
|
|
17
|
+
await fsp.writeFile(tmp, data, "utf-8");
|
|
18
|
+
await fsp.rename(tmp, dest);
|
|
19
|
+
}
|
|
20
|
+
catch (err) {
|
|
21
|
+
try {
|
|
22
|
+
await fsp.unlink(tmp);
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
// temp may not exist
|
|
26
|
+
}
|
|
27
|
+
throw err;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/** Atomically write `data` to `dest` (sync). */
|
|
31
|
+
export function atomicWriteFileSync(dest, data) {
|
|
32
|
+
const tmp = tmpPathFor(dest);
|
|
33
|
+
try {
|
|
34
|
+
fs.writeFileSync(tmp, data, "utf-8");
|
|
35
|
+
fs.renameSync(tmp, dest);
|
|
36
|
+
}
|
|
37
|
+
catch (err) {
|
|
38
|
+
try {
|
|
39
|
+
fs.unlinkSync(tmp);
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
// temp may not exist
|
|
43
|
+
}
|
|
44
|
+
throw err;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -40,4 +40,3 @@ export declare function getAttachmentPath(storePath: string, uuid: string, ext:
|
|
|
40
40
|
* tracks which memories reference it.
|
|
41
41
|
*/
|
|
42
42
|
export declare function linkMemoryToAttachment(storePath: string, uuid: string, memoryId: string): Promise<void>;
|
|
43
|
-
//# sourceMappingURL=attachments.d.ts.map
|
package/dist/lib/attachments.js
CHANGED
package/dist/lib/audioExtract.js
CHANGED
package/dist/lib/audit.d.ts
CHANGED
package/dist/lib/audit.js
CHANGED
package/dist/lib/bootstrap.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Scans a directory for markdown/text files and creates memories from them.
|
|
5
5
|
* Supports both raw import (no LLM) and enriched import (LLM structures content).
|
|
6
6
|
*/
|
|
7
|
-
import { GnosysStore, MemoryFrontmatter } from "./store.js";
|
|
7
|
+
import type { GnosysStore, MemoryFrontmatter } from "./store.js";
|
|
8
8
|
export interface BootstrapOptions {
|
|
9
9
|
/** Source directory to scan */
|
|
10
10
|
sourceDir: string;
|
|
@@ -53,4 +53,3 @@ export declare function parseFileForImport(content: string, relativePath: string
|
|
|
53
53
|
* Bootstrap: batch-import files from a directory into a Gnosys store.
|
|
54
54
|
*/
|
|
55
55
|
export declare function bootstrap(store: GnosysStore, options: BootstrapOptions): Promise<BootstrapResult>;
|
|
56
|
-
//# sourceMappingURL=bootstrap.d.ts.map
|
package/dist/lib/bootstrap.js
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Seed a central server's brain from a local one (v5.12 Phase E).
|
|
3
|
+
*
|
|
4
|
+
* When you move from local-stdio to the central-server topology, the new host
|
|
5
|
+
* (a Docker volume, another machine) starts empty. `centralizeDb` makes a
|
|
6
|
+
* CONSISTENT copy of this machine's `~/.gnosys/gnosys.db` into a target dir,
|
|
7
|
+
* using SQLite's online backup API so it's safe even while the source is in use
|
|
8
|
+
* (WAL is handled — no torn copy).
|
|
9
|
+
*/
|
|
10
|
+
export interface CentralizeResult {
|
|
11
|
+
source: string;
|
|
12
|
+
target: string;
|
|
13
|
+
bytes: number;
|
|
14
|
+
}
|
|
15
|
+
export declare function centralizeDb(opts: {
|
|
16
|
+
to: string;
|
|
17
|
+
force?: boolean;
|
|
18
|
+
/** Override the source DB file (defaults to this machine's central DB). */
|
|
19
|
+
sourceDb?: string;
|
|
20
|
+
}): Promise<CentralizeResult>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Seed a central server's brain from a local one (v5.12 Phase E).
|
|
3
|
+
*
|
|
4
|
+
* When you move from local-stdio to the central-server topology, the new host
|
|
5
|
+
* (a Docker volume, another machine) starts empty. `centralizeDb` makes a
|
|
6
|
+
* CONSISTENT copy of this machine's `~/.gnosys/gnosys.db` into a target dir,
|
|
7
|
+
* using SQLite's online backup API so it's safe even while the source is in use
|
|
8
|
+
* (WAL is handled — no torn copy).
|
|
9
|
+
*/
|
|
10
|
+
import fs from "fs";
|
|
11
|
+
import path from "path";
|
|
12
|
+
import Database from "better-sqlite3";
|
|
13
|
+
import { getCentralDbPath } from "./paths.js";
|
|
14
|
+
export async function centralizeDb(opts) {
|
|
15
|
+
const source = opts.sourceDb ?? getCentralDbPath();
|
|
16
|
+
if (!fs.existsSync(source)) {
|
|
17
|
+
throw new Error(`No local brain found at ${source}`);
|
|
18
|
+
}
|
|
19
|
+
const target = path.join(opts.to, "gnosys.db");
|
|
20
|
+
if (fs.existsSync(target) && !opts.force) {
|
|
21
|
+
throw new Error(`Target already exists: ${target} (use --force to overwrite)`);
|
|
22
|
+
}
|
|
23
|
+
fs.mkdirSync(opts.to, { recursive: true });
|
|
24
|
+
// Online backup → a single consistent gnosys.db at the target (handles WAL).
|
|
25
|
+
const db = new Database(source);
|
|
26
|
+
db.pragma("busy_timeout = 5000");
|
|
27
|
+
try {
|
|
28
|
+
await db.backup(target);
|
|
29
|
+
}
|
|
30
|
+
finally {
|
|
31
|
+
db.close();
|
|
32
|
+
}
|
|
33
|
+
return { source, target, bytes: fs.statSync(target).size };
|
|
34
|
+
}
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* back into its own input. Keeping it dumb makes it trivial to test
|
|
14
14
|
* and reuse.
|
|
15
15
|
*/
|
|
16
|
-
import React from "react";
|
|
17
|
-
import { CommandSpec } from "./commands.js";
|
|
16
|
+
import type React from "react";
|
|
17
|
+
import type { CommandSpec } from "./commands.js";
|
|
18
18
|
export interface SlashPaletteProps {
|
|
19
19
|
/** Full text currently in the input buffer (used to filter). */
|
|
20
20
|
filter: string;
|
|
@@ -31,4 +31,3 @@ export interface SlashPaletteProps {
|
|
|
31
31
|
*/
|
|
32
32
|
export declare function filterCommands(commands: CommandSpec[], filter: string): CommandSpec[];
|
|
33
33
|
export declare const SlashPalette: React.FC<SlashPaletteProps>;
|
|
34
|
-
//# sourceMappingURL=SlashPalette.d.ts.map
|
|
@@ -46,4 +46,3 @@ export const SlashPalette = ({ filter, commands, selectedIndex, maxItems = 8, })
|
|
|
46
46
|
return (_jsxs(Box, { flexDirection: "row", children: [_jsxs(Text, { color: isSelected ? "black" : undefined, backgroundColor: isSelected ? "cyan" : undefined, children: [isSelected ? "▶ " : " ", cmd.name.padEnd(18)] }), _jsxs(Text, { dimColor: true, children: [" ", cmd.summary] })] }, cmd.name));
|
|
47
47
|
}), moreBelow && _jsxs(Text, { dimColor: true, children: ["\u2193 ", matches.length - end, " more below"] }), _jsx(Text, { dimColor: true, children: SHORTCUT_HINT })] }));
|
|
48
48
|
};
|
|
49
|
-
//# sourceMappingURL=SlashPalette.js.map
|
|
@@ -8,10 +8,9 @@
|
|
|
8
8
|
*
|
|
9
9
|
* 4 visible rows × 29 cols — fits any terminal ≥80 cols comfortably.
|
|
10
10
|
*/
|
|
11
|
-
import React from "react";
|
|
11
|
+
import type React from "react";
|
|
12
12
|
export interface BootSplashProps {
|
|
13
13
|
/** Subtitle line under the wordmark — usually the version + tagline. */
|
|
14
14
|
subtitle?: string;
|
|
15
15
|
}
|
|
16
16
|
export declare const BootSplash: React.FC<BootSplashProps>;
|
|
17
|
-
//# sourceMappingURL=boot-splash.d.ts.map
|
|
@@ -8,4 +8,3 @@ const SPLASH_ROWS = [
|
|
|
8
8
|
{ before: "/___/ ", o: " ", after: " /___/ " },
|
|
9
9
|
];
|
|
10
10
|
export const BootSplash = ({ subtitle }) => (_jsxs(Box, { flexDirection: "column", marginTop: 1, marginBottom: 1, children: [SPLASH_ROWS.map((row, i) => (_jsxs(Box, { children: [_jsx(Text, { color: THEME.text, children: row.before }), _jsx(Text, { color: THEME.accent, bold: true, children: row.o }), _jsx(Text, { color: THEME.text, children: row.after })] }, i))), subtitle && (_jsx(Box, { marginTop: 1, children: _jsxs(Text, { color: THEME.muted, children: [" ", subtitle] }) }))] }));
|
|
11
|
-
//# sourceMappingURL=boot-splash.js.map
|
|
@@ -72,4 +72,3 @@ export declare function extractChooseFence(text: string): ExtractResult;
|
|
|
72
72
|
export declare function parseChooseYaml(yaml: string): ChooseBlock;
|
|
73
73
|
/** Format a user's selection as a synthetic user turn. */
|
|
74
74
|
export declare function formatSelection(option: ChooseOption): string;
|
|
75
|
-
//# sourceMappingURL=choose.d.ts.map
|
package/dist/lib/chat/choose.js
CHANGED
|
@@ -130,7 +130,6 @@ export function parseChooseYaml(yaml) {
|
|
|
130
130
|
const detailMatch = line.match(/^\s*detail:\s*(.+?)\s*$/);
|
|
131
131
|
if (detailMatch) {
|
|
132
132
|
current.detail = detailMatch[1];
|
|
133
|
-
continue;
|
|
134
133
|
}
|
|
135
134
|
}
|
|
136
135
|
// Flush the last option
|
|
@@ -143,4 +142,3 @@ export function formatSelection(option) {
|
|
|
143
142
|
const detail = option.detail ? ` (${option.detail})` : "";
|
|
144
143
|
return `[picked: ${option.id} — ${option.label}${detail}]`;
|
|
145
144
|
}
|
|
146
|
-
//# sourceMappingURL=choose.js.map
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* /reinforce, /remember, /save-turn, /attach, /focus, /branch, /resume-focus,
|
|
12
12
|
* /dream-here, /search-chats, /export.
|
|
13
13
|
*/
|
|
14
|
-
import { Turn } from "./types.js";
|
|
14
|
+
import type { Turn } from "./types.js";
|
|
15
15
|
export interface CommandContext {
|
|
16
16
|
/** Current session ID. */
|
|
17
17
|
sessionId: string;
|
|
@@ -93,4 +93,3 @@ export declare function listCommands(): CommandSpec[];
|
|
|
93
93
|
export declare function findCommand(name: string): CommandSpec | undefined;
|
|
94
94
|
/** Parse a raw input line and dispatch if it's a slash command. Returns null if it's not a command. */
|
|
95
95
|
export declare function dispatchCommand(raw: string, ctx: CommandContext): Promise<CommandResult | null>;
|
|
96
|
-
//# sourceMappingURL=commands.d.ts.map
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* Stripped ellipses are preserved in the visible text but the URI carries
|
|
17
17
|
* the full id when available.
|
|
18
18
|
*/
|
|
19
|
-
import React from "react";
|
|
19
|
+
import type React from "react";
|
|
20
20
|
export interface CitationTextProps {
|
|
21
21
|
text: string;
|
|
22
22
|
}
|
|
@@ -39,4 +39,3 @@ type Segment = PlainSegment | CitationSegment;
|
|
|
39
39
|
/** Split `text` into plain / citation segments in left-to-right order. */
|
|
40
40
|
export declare function splitCitations(text: string): Segment[];
|
|
41
41
|
export {};
|
|
42
|
-
//# sourceMappingURL=CitationText.d.ts.map
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* Visual: rounded border in brand red on dark background, slight inset
|
|
10
10
|
* from the turn body. Errors render with the error red.
|
|
11
11
|
*/
|
|
12
|
-
import React from "react";
|
|
12
|
+
import type React from "react";
|
|
13
13
|
import type { ToolCallRecord } from "../types.js";
|
|
14
14
|
export interface ToolCallCardProps {
|
|
15
15
|
call: ToolCallRecord;
|
|
@@ -17,4 +17,3 @@ export interface ToolCallCardProps {
|
|
|
17
17
|
expanded: boolean;
|
|
18
18
|
}
|
|
19
19
|
export declare const ToolCallCard: React.FC<ToolCallCardProps>;
|
|
20
|
-
//# sourceMappingURL=ToolCallCard.d.ts.map
|
package/dist/lib/chat/focus.d.ts
CHANGED
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* window — distills the buffer into a memory, replaces it with a single
|
|
14
14
|
* system reference. Transparent to the user.
|
|
15
15
|
*/
|
|
16
|
-
import { Turn } from "./types.js";
|
|
17
|
-
|
|
16
|
+
import type { Turn } from "./types.js";
|
|
17
|
+
interface FocusSnapshot {
|
|
18
18
|
/** Focus name. */
|
|
19
19
|
topic: string;
|
|
20
20
|
/** When this snapshot was created. */
|
|
@@ -67,4 +67,4 @@ export declare function shouldAutoSummarize(buffer: Turn[], contextWindowTokens:
|
|
|
67
67
|
* Used in Phase 7's auto-summarize and exposed for /save-turn-style flows.
|
|
68
68
|
*/
|
|
69
69
|
export declare function buildSummaryPrompt(buffer: Turn[], focus: string | null): string;
|
|
70
|
-
|
|
70
|
+
export {};
|
package/dist/lib/chat/focus.js
CHANGED
package/dist/lib/chat/index.d.ts
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
* - Mount the ink ChatApp
|
|
9
9
|
* - On exit, flush a session_end event
|
|
10
10
|
*/
|
|
11
|
-
import { GnosysConfig } from "../config.js";
|
|
12
|
-
import { SessionEvent } from "./session.js";
|
|
13
|
-
import { Turn } from "./types.js";
|
|
11
|
+
import type { GnosysConfig } from "../config.js";
|
|
12
|
+
import { type SessionEvent } from "./session.js";
|
|
13
|
+
import type { Turn } from "./types.js";
|
|
14
14
|
export interface StartChatOptions {
|
|
15
15
|
config: GnosysConfig;
|
|
16
16
|
resume?: string;
|
|
@@ -29,4 +29,3 @@ export declare function startChat(opts: StartChatOptions): Promise<void>;
|
|
|
29
29
|
export declare function printSessionList(limit?: number): void;
|
|
30
30
|
/** Print search results across all session logs (for `gnosys chat --search`). */
|
|
31
31
|
export declare function printSearchResults(query: string, limit?: number): void;
|
|
32
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/lib/chat/index.js
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
import { GnosysDB } from "../db.js";
|
|
12
12
|
import { startSession, appendEvent, readSession, listSessions, searchSessions, } from "./session.js";
|
|
13
13
|
import { resolveTaskModel } from "../config.js";
|
|
14
|
+
import { logError } from "../log.js";
|
|
14
15
|
/** Reconstruct the conversation buffer from session log events. */
|
|
15
16
|
export function bufferFromEvents(events) {
|
|
16
17
|
const turns = [];
|
|
@@ -76,7 +77,7 @@ export async function startChat(opts) {
|
|
|
76
77
|
if (opts.resume) {
|
|
77
78
|
const events = readSession(opts.resume);
|
|
78
79
|
if (events.length === 0) {
|
|
79
|
-
|
|
80
|
+
logError(new Error(`Session not found: ${opts.resume}`), { module: "chat", op: "resume" });
|
|
80
81
|
process.exit(1);
|
|
81
82
|
}
|
|
82
83
|
sessionId = opts.resume;
|
|
@@ -155,4 +156,3 @@ export function printSearchResults(query, limit = 30) {
|
|
|
155
156
|
console.log(` ${m.sessionId.slice(0, 12)}… [${m.event.type}] ${preview}`);
|
|
156
157
|
}
|
|
157
158
|
}
|
|
158
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* Phase 5 wires patterns whose target commands already exist (Phases 2–4).
|
|
14
14
|
* /focus and /branch (Phase 7) are added in their own phase.
|
|
15
15
|
*/
|
|
16
|
-
import { GnosysConfig } from "../config.js";
|
|
16
|
+
import type { GnosysConfig } from "../config.js";
|
|
17
17
|
export type InferredIntent = {
|
|
18
18
|
command: "/pin";
|
|
19
19
|
args: string[];
|
|
@@ -55,25 +55,10 @@ export type InferredIntent = {
|
|
|
55
55
|
confidence: "high" | "medium";
|
|
56
56
|
matchedPattern?: string;
|
|
57
57
|
};
|
|
58
|
-
export interface PatternRule {
|
|
59
|
-
/** Regex to match. Capture group 1 is the args text (joined as `args[0]` if present). */
|
|
60
|
-
pattern: RegExp;
|
|
61
|
-
command: InferredIntent["command"];
|
|
62
|
-
/** Whether this is a destructive action that needs confirm-before-fire. */
|
|
63
|
-
destructive: boolean;
|
|
64
|
-
/** Human-readable description shown in the confirm prompt. */
|
|
65
|
-
description: string;
|
|
66
|
-
}
|
|
67
|
-
export declare const PATTERNS: PatternRule[];
|
|
68
58
|
/** Try to match a user input against the pattern rules. Returns null if no pattern fires. */
|
|
69
59
|
export declare function matchPattern(userInput: string): InferredIntent | null;
|
|
70
60
|
/** True when the input has imperative-y signals — a hint that LLM classification might pay off. */
|
|
71
61
|
export declare function hasImperativeSignal(userInput: string): boolean;
|
|
72
|
-
/**
|
|
73
|
-
* Optional: ask a cheap LLM to classify the intent.
|
|
74
|
-
* Returns null when the LLM is unavailable or the response can't be parsed.
|
|
75
|
-
*/
|
|
76
|
-
export declare function classifyWithLLM(config: GnosysConfig, userInput: string): Promise<InferredIntent | null>;
|
|
77
62
|
/** Whether the inferred command is destructive enough to warrant a confirm prompt. */
|
|
78
63
|
export declare function isDestructive(command: InferredIntent["command"]): boolean;
|
|
79
64
|
/** Render a [Y/n/edit] prompt label for the inferred intent. */
|
|
@@ -97,4 +82,3 @@ export declare function newAcceptanceLog(): IntentAcceptanceLog;
|
|
|
97
82
|
export declare function shouldAutoAccept(log: IntentAcceptanceLog, matchedPattern: string | undefined): boolean;
|
|
98
83
|
/** Record a confirmed acceptance of a pattern. */
|
|
99
84
|
export declare function recordAcceptance(log: IntentAcceptanceLog, matchedPattern: string | undefined): void;
|
|
100
|
-
//# sourceMappingURL=intent.d.ts.map
|
package/dist/lib/chat/intent.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { getLLMProvider } from "../llm.js";
|
|
17
17
|
// Patterns are ordered most specific → most general. First match wins.
|
|
18
|
-
|
|
18
|
+
const PATTERNS = [
|
|
19
19
|
// Quit/exit
|
|
20
20
|
{
|
|
21
21
|
pattern: /^\s*(?:thanks[,.\s]*)?(?:that(?:'s| is) all|i'?m done|goodbye|bye|quit|exit)\s*[.!]?\s*$/i,
|
|
@@ -105,7 +105,7 @@ export function hasImperativeSignal(userInput) {
|
|
|
105
105
|
* Optional: ask a cheap LLM to classify the intent.
|
|
106
106
|
* Returns null when the LLM is unavailable or the response can't be parsed.
|
|
107
107
|
*/
|
|
108
|
-
|
|
108
|
+
async function classifyWithLLM(config, userInput) {
|
|
109
109
|
try {
|
|
110
110
|
const provider = getLLMProvider(config, "structuring");
|
|
111
111
|
const prompt = `You are a router. Map this user message to ONE of these chat commands, or "none" if it's just a normal chat turn.
|
|
@@ -189,4 +189,3 @@ export function recordAcceptance(log, matchedPattern) {
|
|
|
189
189
|
return;
|
|
190
190
|
log.acceptCounts.set(matchedPattern, (log.acceptCounts.get(matchedPattern) ?? 0) + 1);
|
|
191
191
|
}
|
|
192
|
-
//# sourceMappingURL=intent.js.map
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* Phase 3 adds recall integration; Phase 5 adds intent classification;
|
|
6
6
|
* Phase 6 adds gnosys-choose protocol; Phase 7 adds focus-aware system prompt.
|
|
7
7
|
*/
|
|
8
|
-
import { GnosysConfig } from "../config.js";
|
|
9
|
-
import { LLMProvider } from "../llm.js";
|
|
10
|
-
import { LLMProviderName } from "../config.js";
|
|
11
|
-
import { Turn } from "./types.js";
|
|
12
|
-
import { RecalledMemory } from "./recall.js";
|
|
8
|
+
import { type GnosysConfig } from "../config.js";
|
|
9
|
+
import { type LLMProvider } from "../llm.js";
|
|
10
|
+
import type { LLMProviderName } from "../config.js";
|
|
11
|
+
import type { Turn } from "./types.js";
|
|
12
|
+
import { type RecalledMemory } from "./recall.js";
|
|
13
13
|
export interface LLMTurnOptions {
|
|
14
14
|
/** Conversation buffer to send (will be formatted into a single prompt). */
|
|
15
15
|
buffer: Turn[];
|
|
@@ -52,4 +52,3 @@ export interface LLMTurnResult {
|
|
|
52
52
|
export declare function runTurn(config: GnosysConfig, opts: LLMTurnOptions): Promise<LLMTurnResult>;
|
|
53
53
|
/** Build a provider for /provider switching mid-session. */
|
|
54
54
|
export declare function buildProvider(config: GnosysConfig, providerName: LLMProviderName, model?: string): LLMProvider;
|
|
55
|
-
//# sourceMappingURL=llmTurn.d.ts.map
|
package/dist/lib/chat/llmTurn.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* for injection into the LLM system prompt. Always includes pinned memories
|
|
6
6
|
* regardless of search relevance.
|
|
7
7
|
*/
|
|
8
|
-
import { GnosysDB } from "../db.js";
|
|
9
|
-
import { Turn } from "./types.js";
|
|
8
|
+
import type { GnosysDB } from "../db.js";
|
|
9
|
+
import type { Turn } from "./types.js";
|
|
10
10
|
export type RecallScope = "project" | "user" | "global" | "federated";
|
|
11
11
|
export interface RecallOptions {
|
|
12
12
|
/** Search query — usually the latest user input plus a tail of conversation. */
|
|
@@ -55,4 +55,3 @@ export declare function runRecall(db: GnosysDB, opts: RecallOptions): RecallResu
|
|
|
55
55
|
export declare function formatRecallForPrompt(memories: RecalledMemory[]): string;
|
|
56
56
|
/** Reinforce a memory: bump modified date so it's surfaced as recent. */
|
|
57
57
|
export declare function reinforceMemory(db: GnosysDB, memoryId: string): boolean;
|
|
58
|
-
//# sourceMappingURL=recall.d.ts.map
|
package/dist/lib/chat/recall.js
CHANGED
|
@@ -49,7 +49,7 @@ export function runRecall(db, opts) {
|
|
|
49
49
|
projectId: opts.projectId,
|
|
50
50
|
scopeFilter: scopeFilter,
|
|
51
51
|
});
|
|
52
|
-
|
|
52
|
+
const considered = results.length + opts.pinnedIds.length;
|
|
53
53
|
for (const r of results) {
|
|
54
54
|
if (memories.length - opts.pinnedIds.length >= limit)
|
|
55
55
|
break;
|
|
@@ -106,4 +106,3 @@ export function reinforceMemory(db, memoryId) {
|
|
|
106
106
|
});
|
|
107
107
|
return true;
|
|
108
108
|
}
|
|
109
|
-
//# sourceMappingURL=recall.js.map
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
* └────────────────────────────────────────┘
|
|
16
16
|
*/
|
|
17
17
|
import React from "react";
|
|
18
|
-
import { ChatHeaderInfo, Turn } from "./types.js";
|
|
19
|
-
import { GnosysConfig } from "../config.js";
|
|
18
|
+
import type { ChatHeaderInfo, Turn } from "./types.js";
|
|
19
|
+
import type { GnosysConfig } from "../config.js";
|
|
20
20
|
export interface ChatAppProps {
|
|
21
21
|
initialHeader: ChatHeaderInfo;
|
|
22
22
|
initialBuffer: Turn[];
|
|
@@ -27,4 +27,3 @@ export interface ChatAppProps {
|
|
|
27
27
|
onExit?: () => void;
|
|
28
28
|
}
|
|
29
29
|
export declare const ChatApp: React.FC<ChatAppProps>;
|
|
30
|
-
//# sourceMappingURL=render.d.ts.map
|
package/dist/lib/chat/render.js
CHANGED
package/dist/lib/chat/session.js
CHANGED
package/dist/lib/chat/theme.d.ts
CHANGED
package/dist/lib/chat/theme.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* read in one go). Each parse returns the tool name + key/value args + the
|
|
13
13
|
* surrounding text so the renderer can show the conversation cleanly.
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
interface ParsedToolCall {
|
|
16
16
|
tool: string;
|
|
17
17
|
args: Record<string, string>;
|
|
18
18
|
/** Source text of the full fence (for fail-soft display when needed). */
|
|
@@ -51,4 +51,4 @@ export declare function parseToolBody(body: string): {
|
|
|
51
51
|
tool: string;
|
|
52
52
|
args: Record<string, string>;
|
|
53
53
|
};
|
|
54
|
-
|
|
54
|
+
export {};
|
package/dist/lib/chat/tools.d.ts
CHANGED
|
@@ -45,4 +45,3 @@ export declare function findTool(name: string): ToolDefinition | undefined;
|
|
|
45
45
|
export declare function listTools(): ToolDefinition[];
|
|
46
46
|
/** System prompt addendum that teaches the LLM the tool-fence syntax. */
|
|
47
47
|
export declare function buildToolsSystemPrompt(): string;
|
|
48
|
-
//# sourceMappingURL=tools.d.ts.map
|
package/dist/lib/chat/tools.js
CHANGED
package/dist/lib/chat/types.d.ts
CHANGED