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/portfolio.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* a formatted dashboard showing blockers, production readiness,
|
|
6
6
|
* open questions, and roadmap status.
|
|
7
7
|
*/
|
|
8
|
-
import { GnosysDB, DbProject } from "./db.js";
|
|
8
|
+
import type { GnosysDB, DbProject } from "./db.js";
|
|
9
9
|
export interface ActionItem {
|
|
10
10
|
type: "question" | "blocker" | "manual" | "decision";
|
|
11
11
|
text: string;
|
|
@@ -90,4 +90,3 @@ export declare function formatPortfolioCompact(report: PortfolioReport): string;
|
|
|
90
90
|
export declare const STATUS_UPDATE_PROMPT = "# Gnosys Status Update \u2014 Guided Checklist\n\nYou are updating the project status for the Gnosys portfolio dashboard. Follow this process exactly.\n\n## Step 1: Analyze the codebase\n\nRead the project structure, recent git history, test results, build status, and any existing status memories (use gnosys_discover and gnosys_read). Fill in as much as you can from code.\n\n## Step 2: Work through every section below\n\nFor EACH section, either fill it in from your analysis or ASK the user. Do NOT skip sections. Do NOT write the status memory until all sections are addressed.\n\n### Section A: What's Complete\nList all features, milestones, and capabilities that are done and working. Be specific (e.g., \"14 Playwright E2E tests passing\" not \"tests exist\").\n\n### Section B: What's NOT Done\nList everything remaining before the project can go live. Include partial work, missing features, and known gaps.\n\n### Section C: Waiting on Human\n**YOU MUST ASK THE USER** if you cannot determine these from code:\n- Are there accounts that need to be created or configured? (Apple Developer, cloud providers, API keys, DNS, domain registrars, app store submissions)\n- Are there approvals or sign-offs needed? (legal, compliance, stakeholder review)\n- Are there purchases needed? (certificates, licenses, subscriptions)\n- Are there manual deployment steps only the user can do?\n- Is the user waiting on anyone else? (contractors, partners, third-party services)\n\nIf the code shows signs of these (e.g., placeholder API keys, TODO comments about accounts, unsigned builds), list what you found and confirm with the user.\n\n### Section D: Blockers\nItems that are actively preventing progress. Distinguish between:\n- **Technical blockers**: bugs, dependency issues, broken builds\n- **External blockers**: waiting on third-party, account access, API approval\n- **Decision blockers**: choices that need to be made before work can continue\n\n### Section E: Open Decisions\nQuestions or choices that haven't been resolved yet. **ASK the user** about any you find:\n- Architecture or technology choices still open\n- Scope decisions (what's in v1 vs deferred)\n- Prioritization questions\n- Trade-offs that need a human call\n\n### Section F: Go-Live Readiness\nAssess each area \u2014 mark as Ready, Partial, Not Started, or N/A:\n- [ ] Core features functional\n- [ ] Error handling and edge cases\n- [ ] Security review (auth, input validation, secrets management)\n- [ ] Performance acceptable (or: performance testing not done)\n- [ ] Functional testing sufficient (state coverage level and any known gaps)\n- [ ] Documentation (user-facing: README, API docs, guides)\n- [ ] Deployment pipeline (CI/CD, hosting, domain, SSL)\n- [ ] Monitoring and logging\n- [ ] Data migration / seed data\n- [ ] Legal (privacy policy, terms, licenses, compliance)\n\n### Section G: Testing Status\n- **Functional tests**: What exists? What's the coverage? Any known failing tests?\n- **Performance tests**: Have they been run? Any issues found? Any remediation done?\n- **Integration tests**: Do external services / APIs work end-to-end?\n- **Known defects**: List any open bugs with severity (critical/major/minor)\n- **Defect remediation**: Any bugs that were found and fixed recently?\n\n### Section H: Roadmap Changes\n- Has the plan changed since the last status update?\n- Any new work discovered during development?\n- Any scope added or removed?\n- What's the recommended next priority?\n\n## Step 3: Ask the user about gaps\n\nBefore writing the memory, present your findings and explicitly ask about anything you couldn't determine:\n\n> \"I've analyzed the codebase and filled in what I can. I need your input on these items before I can write the status:\n> 1. [specific question]\n> 2. [specific question]\n> ...\"\n\nIf the user says \"skip\" or \"not applicable\" for a section, mark it as \"N/A \u2014 skipped by owner\" in the status.\n\n## Step 4: Write the status memory\n\nOnce all sections are addressed, call gnosys_add_structured with:\n\n- **title**: \"[Project Name] status as of [YYYY-MM-DD] \u2014 [one-line summary]\"\n- **category**: \"landscape\"\n- **tags**: { \"type\": [\"status\", \"milestone\"], \"concern\": [\"release\"] }\n- **relevance**: \"[project-name] status complete shipped ready go-live production blockers testing\"\n- **author**: \"human+ai\"\n- **authority**: \"observed\"\n- **confidence**: 0.95\n- **projectRoot**: \"[the project's working directory]\"\n\nThe content MUST use these exact heading formats (the dashboard parser depends on them):\n\n```markdown\n# [Project Name] Status \u2014 [YYYY-MM-DD]\n\n## What's Complete\n- [from Section A]\n\n## What's NOT Done\n- [from Section B]\n\n## Waiting on Human\n- [from Section C \u2014 manual steps, accounts, approvals]\n\n## Blockers\n- [from Section D \u2014 categorized as Technical / External / Decision]\n\n## Open Decisions\n- [from Section E]\n\n## Go-Live Readiness\n- [from Section F \u2014 checklist with status per area]\n\n## Testing Status\n- [from Section G \u2014 functional, performance, integration, defects]\n\n## Roadmap Changes\n- [from Section H \u2014 plan changes, new work, next priority]\n```\n\nIMPORTANT: Be specific enough that someone reading the dashboard can take action immediately. \"Needs testing\" is useless \u2014 \"No load tests run; API response times unknown under concurrent usage\" is actionable.";
|
|
91
91
|
/** Generate the status update prompt pre-filled for a specific project */
|
|
92
92
|
export declare function generateStatusPrompt(projectName: string, projectRoot: string): string;
|
|
93
|
-
//# sourceMappingURL=portfolio.d.ts.map
|
package/dist/lib/portfolio.js
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
* a formatted dashboard showing blockers, production readiness,
|
|
6
6
|
* open questions, and roadmap status.
|
|
7
7
|
*/
|
|
8
|
+
import { readMachineConfig } from "./machineConfig.js";
|
|
9
|
+
import { effectiveProjectPath } from "./projectPaths.js";
|
|
8
10
|
// ─── Core ───────────────────────────────────────────────────────────────
|
|
9
11
|
/** Parse tags from the DB column (JSON array string or comma-separated) */
|
|
10
12
|
function parseTags(raw) {
|
|
@@ -335,8 +337,14 @@ function buildProjectSnapshot(db, project) {
|
|
|
335
337
|
/** Generate the full portfolio report */
|
|
336
338
|
export function generatePortfolio(db) {
|
|
337
339
|
const projects = db.getAllProjects();
|
|
338
|
-
// Filter out test projects (those in /tmp/
|
|
339
|
-
|
|
340
|
+
// Filter out test projects (those in /tmp/) and projects not present on this
|
|
341
|
+
// machine. Path is resolved per-machine (machine.json) with a legacy
|
|
342
|
+
// fallback to working_directory when machine.json is absent.
|
|
343
|
+
const machine = readMachineConfig();
|
|
344
|
+
const realProjects = projects.filter((p) => {
|
|
345
|
+
const ep = effectiveProjectPath(db, p, machine);
|
|
346
|
+
return ep !== null && !ep.startsWith("/tmp/") && !ep.startsWith("/private/tmp/");
|
|
347
|
+
});
|
|
340
348
|
const snapshots = realProjects.map((p) => buildProjectSnapshot(db, p));
|
|
341
349
|
// Filter out projects with 0 memories
|
|
342
350
|
const activeSnapshots = snapshots.filter((s) => s.memoryCounts.total > 0);
|
|
@@ -592,4 +600,3 @@ export function generateStatusPrompt(projectName, projectRoot) {
|
|
|
592
600
|
.replace(/\[the project's working directory\]/g, projectRoot)
|
|
593
601
|
.replace(/\[one-line summary\]/g, "[fill in based on analysis]");
|
|
594
602
|
}
|
|
595
|
-
//# sourceMappingURL=portfolio.js.map
|
|
@@ -4,6 +4,5 @@
|
|
|
4
4
|
* Blockers-first, production-readiness-focused dashboard.
|
|
5
5
|
* Self-contained HTML with embedded data and styling.
|
|
6
6
|
*/
|
|
7
|
-
import { PortfolioReport } from "./portfolio.js";
|
|
7
|
+
import { type PortfolioReport } from "./portfolio.js";
|
|
8
8
|
export declare function generatePortfolioHtml(report: PortfolioReport, outputPath?: string): string;
|
|
9
|
-
//# sourceMappingURL=portfolioHtml.d.ts.map
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* and a `value` (stored in content). They're searchable, decayable,
|
|
10
10
|
* and versioned just like any other memory.
|
|
11
11
|
*/
|
|
12
|
-
import { GnosysDB } from "./db.js";
|
|
12
|
+
import { type GnosysDB } from "./db.js";
|
|
13
13
|
export interface Preference {
|
|
14
14
|
key: string;
|
|
15
15
|
value: string;
|
|
@@ -21,6 +21,11 @@ export interface Preference {
|
|
|
21
21
|
}
|
|
22
22
|
/** Well-known preference keys used by the rules generator */
|
|
23
23
|
export declare const KNOWN_PREFERENCE_KEYS: readonly ["commit-convention", "code-style", "llm-provider", "agent-behavior", "testing-approach", "documentation-style", "naming-convention", "error-handling", "review-process", "deploy-workflow"];
|
|
24
|
+
/**
|
|
25
|
+
* Suggest the closest known preference key for a likely typo, or null.
|
|
26
|
+
* Returns null for exact known keys and for far custom keys (distance > 3).
|
|
27
|
+
*/
|
|
28
|
+
export declare function suggestPreferenceKey(input: string): string | null;
|
|
24
29
|
/**
|
|
25
30
|
* Set a user preference. Creates or updates a memory in the central DB
|
|
26
31
|
* with scope='user' and category='preferences'.
|
|
@@ -46,4 +51,3 @@ export declare function deletePreference(db: GnosysDB, key: string): boolean;
|
|
|
46
51
|
* Search preferences by keyword.
|
|
47
52
|
*/
|
|
48
53
|
export declare function searchPreferences(db: GnosysDB, query: string): Preference[];
|
|
49
|
-
//# sourceMappingURL=preferences.d.ts.map
|
package/dist/lib/preferences.js
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* and versioned just like any other memory.
|
|
11
11
|
*/
|
|
12
12
|
import { fnv1a } from "./db.js";
|
|
13
|
+
import { levenshtein } from "./setup/configSetRender.js";
|
|
13
14
|
/** Well-known preference keys used by the rules generator */
|
|
14
15
|
export const KNOWN_PREFERENCE_KEYS = [
|
|
15
16
|
"commit-convention",
|
|
@@ -23,6 +24,24 @@ export const KNOWN_PREFERENCE_KEYS = [
|
|
|
23
24
|
"review-process",
|
|
24
25
|
"deploy-workflow",
|
|
25
26
|
];
|
|
27
|
+
/**
|
|
28
|
+
* Suggest the closest known preference key for a likely typo, or null.
|
|
29
|
+
* Returns null for exact known keys and for far custom keys (distance > 3).
|
|
30
|
+
*/
|
|
31
|
+
export function suggestPreferenceKey(input) {
|
|
32
|
+
if (KNOWN_PREFERENCE_KEYS.includes(input))
|
|
33
|
+
return null;
|
|
34
|
+
let best = null;
|
|
35
|
+
let bestDist = Infinity;
|
|
36
|
+
for (const candidate of KNOWN_PREFERENCE_KEYS) {
|
|
37
|
+
const d = levenshtein(input, candidate);
|
|
38
|
+
if (d < bestDist) {
|
|
39
|
+
bestDist = d;
|
|
40
|
+
best = candidate;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return bestDist <= 3 ? best : null;
|
|
44
|
+
}
|
|
26
45
|
// ─── Preference CRUD ────────────────────────────────────────────────────
|
|
27
46
|
/**
|
|
28
47
|
* Set a user preference. Creates or updates a memory in the central DB
|
|
@@ -146,4 +165,3 @@ function formatPreferenceTitle(key) {
|
|
|
146
165
|
.map((w) => w.charAt(0).toUpperCase() + w.slice(1))
|
|
147
166
|
.join(" ");
|
|
148
167
|
}
|
|
149
|
-
//# sourceMappingURL=preferences.js.map
|
package/dist/lib/progress.d.ts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* }
|
|
18
18
|
* onProgress?.({ kind: "done", text: "Pushed 42" });
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
type ProgressEvent = {
|
|
21
21
|
kind: "header";
|
|
22
22
|
text: string;
|
|
23
23
|
} | {
|
|
@@ -51,4 +51,4 @@ export interface Progress {
|
|
|
51
51
|
export declare function createProgress(verbose: boolean): Progress;
|
|
52
52
|
/** Callback shape passed into lib functions that accept progress. */
|
|
53
53
|
export type ProgressCallback = (event: ProgressEvent) => void;
|
|
54
|
-
|
|
54
|
+
export {};
|
package/dist/lib/progress.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* The central DB (~/.gnosys/gnosys.db) mirrors this in the `projects` table.
|
|
8
8
|
* gnosys init creates both the local identity file AND the central DB record.
|
|
9
9
|
*/
|
|
10
|
-
import { GnosysDB } from "./db.js";
|
|
10
|
+
import type { GnosysDB } from "./db.js";
|
|
11
11
|
/** Shape of .gnosys/gnosys.json (project identity) */
|
|
12
12
|
export interface ProjectIdentity {
|
|
13
13
|
projectId: string;
|
|
@@ -119,4 +119,3 @@ export interface MigrateResult {
|
|
|
119
119
|
* and registers in the file-based project registry.
|
|
120
120
|
*/
|
|
121
121
|
export declare function migrateProject(opts: MigrateOptions): Promise<MigrateResult>;
|
|
122
|
-
//# sourceMappingURL=projectIdentity.d.ts.map
|
|
@@ -12,6 +12,7 @@ import fsSync from "fs";
|
|
|
12
12
|
import path from "path";
|
|
13
13
|
import crypto from "crypto";
|
|
14
14
|
import os from "os";
|
|
15
|
+
import { logWarn } from "./log.js";
|
|
15
16
|
const IDENTITY_SCHEMA_VERSION = 1;
|
|
16
17
|
/**
|
|
17
18
|
* Detect which agent IDE is being used.
|
|
@@ -115,8 +116,7 @@ export async function createProjectIdentity(projectDir, opts) {
|
|
|
115
116
|
// operators a hint.
|
|
116
117
|
const existingRow = opts.centralDb.getProject(identity.projectId);
|
|
117
118
|
if (existingRow && existingRow.working_directory !== identity.workingDirectory) {
|
|
118
|
-
|
|
119
|
-
`${existingRow.working_directory} → ${identity.workingDirectory}`);
|
|
119
|
+
logWarn(`project ${identity.projectName} moved: ${existingRow.working_directory} → ${identity.workingDirectory}`, { module: "projectIdentity", op: "registerProject" });
|
|
120
120
|
}
|
|
121
121
|
const dbProject = {
|
|
122
122
|
id: identity.projectId,
|
|
@@ -247,6 +247,7 @@ export async function configureClaudeCode(projectDir) {
|
|
|
247
247
|
*/
|
|
248
248
|
async function registerMcpServer(ide, projectDir) {
|
|
249
249
|
try {
|
|
250
|
+
// Intentional dynamic import — lazy-load setup to avoid a static cycle with setup.ts.
|
|
250
251
|
const { setupIDE } = await import("./setup.js");
|
|
251
252
|
return await setupIDE(ide, projectDir);
|
|
252
253
|
}
|
|
@@ -432,8 +433,8 @@ export async function migrateProject(opts) {
|
|
|
432
433
|
}
|
|
433
434
|
}
|
|
434
435
|
// 4. Copy entire .gnosys/ tree from source to target
|
|
435
|
-
const {
|
|
436
|
-
|
|
436
|
+
const { execFileSync } = await import("child_process");
|
|
437
|
+
execFileSync("cp", ["-a", sourceStore, targetStore], { stdio: "pipe" });
|
|
437
438
|
// 5. Count memory markdown files (for reporting)
|
|
438
439
|
const { glob } = await import("glob");
|
|
439
440
|
const memoryFiles = await glob("**/*.md", {
|
|
@@ -489,4 +490,3 @@ export async function migrateProject(opts) {
|
|
|
489
490
|
memoryFileCount: memoryFiles.length,
|
|
490
491
|
};
|
|
491
492
|
}
|
|
492
|
-
//# sourceMappingURL=projectIdentity.js.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Machine-aware project path resolution (v5.11).
|
|
3
|
+
*
|
|
4
|
+
* A project's portable identity is its UUID. Its location is resolved PER
|
|
5
|
+
* MACHINE, in priority order:
|
|
6
|
+
* 1. A per-machine override row (project_locations) — used for projects
|
|
7
|
+
* that live outside any named root.
|
|
8
|
+
* 2. join(machine.roots[root_id], rel_path) — the common, zero-touch case
|
|
9
|
+
* (machine-independent rel_path + this machine's root).
|
|
10
|
+
* 3. null — the project is "not on this machine".
|
|
11
|
+
*
|
|
12
|
+
* Nothing here reads an absolute path that was persisted by another machine,
|
|
13
|
+
* so the same shared brain resolves correctly on the Studio, the MBP, etc.
|
|
14
|
+
*/
|
|
15
|
+
import type { GnosysDB, DbProject } from "./db.js";
|
|
16
|
+
import { type MachineConfig } from "./machineConfig.js";
|
|
17
|
+
type LocationSource = "override" | "root" | "none";
|
|
18
|
+
export interface ResolvedProject {
|
|
19
|
+
project: DbProject;
|
|
20
|
+
/** Absolute path on this machine, or null when not present here. */
|
|
21
|
+
absPath: string | null;
|
|
22
|
+
source: LocationSource;
|
|
23
|
+
}
|
|
24
|
+
/** Resolve a single project's absolute path on this machine (or null). */
|
|
25
|
+
export declare function resolveProjectPath(db: GnosysDB, machine: MachineConfig, projectId: string): string | null;
|
|
26
|
+
/** Resolve a project with provenance, or null if the project is unknown. */
|
|
27
|
+
export declare function resolveProject(db: GnosysDB, machine: MachineConfig, projectId: string): ResolvedProject | null;
|
|
28
|
+
/** Resolve every known project for this machine (for portfolio/federation). */
|
|
29
|
+
export declare function resolveAllProjects(db: GnosysDB, machine: MachineConfig): ResolvedProject[];
|
|
30
|
+
/**
|
|
31
|
+
* Consumer-facing path for display/use, with a legacy fallback so callers can
|
|
32
|
+
* adopt machine-aware resolution without breaking pre-migration setups:
|
|
33
|
+
*
|
|
34
|
+
* - machine == null (no machine.json yet) → working_directory (legacy)
|
|
35
|
+
* - resolvable via override/root → that path
|
|
36
|
+
* - legacy row not yet scanned but its → working_directory
|
|
37
|
+
* working_directory exists on this disk
|
|
38
|
+
* - otherwise → null ("not on this machine")
|
|
39
|
+
*
|
|
40
|
+
* Pass `machine` as `readMachineConfig()` (which returns null when absent —
|
|
41
|
+
* importantly it does NOT create the file as a display side effect).
|
|
42
|
+
*/
|
|
43
|
+
export declare function effectiveProjectPath(db: GnosysDB, project: DbProject, machine: MachineConfig | null): string | null;
|
|
44
|
+
/**
|
|
45
|
+
* Record where THIS machine keeps a project, choosing the portable storage
|
|
46
|
+
* automatically:
|
|
47
|
+
* - If absPath sits under a named root, store the machine-INDEPENDENT
|
|
48
|
+
* root_id + rel_path on the project row (shared across machines) and
|
|
49
|
+
* drop any now-redundant per-machine override.
|
|
50
|
+
* - Otherwise store a per-machine override row (project_locations).
|
|
51
|
+
*
|
|
52
|
+
* working_directory is updated as a machine-local display cache either way.
|
|
53
|
+
* Used by `gnosys projects scan` and `gnosys init`.
|
|
54
|
+
*/
|
|
55
|
+
export declare function recordLocation(db: GnosysDB, machine: MachineConfig, projectId: string, absPath: string): {
|
|
56
|
+
mode: "root" | "override";
|
|
57
|
+
rootId?: string;
|
|
58
|
+
relPath?: string;
|
|
59
|
+
};
|
|
60
|
+
export {};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Machine-aware project path resolution (v5.11).
|
|
3
|
+
*
|
|
4
|
+
* A project's portable identity is its UUID. Its location is resolved PER
|
|
5
|
+
* MACHINE, in priority order:
|
|
6
|
+
* 1. A per-machine override row (project_locations) — used for projects
|
|
7
|
+
* that live outside any named root.
|
|
8
|
+
* 2. join(machine.roots[root_id], rel_path) — the common, zero-touch case
|
|
9
|
+
* (machine-independent rel_path + this machine's root).
|
|
10
|
+
* 3. null — the project is "not on this machine".
|
|
11
|
+
*
|
|
12
|
+
* Nothing here reads an absolute path that was persisted by another machine,
|
|
13
|
+
* so the same shared brain resolves correctly on the Studio, the MBP, etc.
|
|
14
|
+
*/
|
|
15
|
+
import fsSync from "fs";
|
|
16
|
+
import { absPathFromRoot, relPathUnderRoot } from "./machineConfig.js";
|
|
17
|
+
/** Resolve a single project's absolute path on this machine (or null). */
|
|
18
|
+
export function resolveProjectPath(db, machine, projectId) {
|
|
19
|
+
const override = db.getProjectLocation(projectId, machine.machineId);
|
|
20
|
+
if (override)
|
|
21
|
+
return override.abs_path;
|
|
22
|
+
const project = db.getProject(projectId);
|
|
23
|
+
if (!project)
|
|
24
|
+
return null;
|
|
25
|
+
return absPathFromRoot(machine, project.root_id, project.rel_path);
|
|
26
|
+
}
|
|
27
|
+
/** Resolve a project with provenance, or null if the project is unknown. */
|
|
28
|
+
export function resolveProject(db, machine, projectId) {
|
|
29
|
+
const project = db.getProject(projectId);
|
|
30
|
+
if (!project)
|
|
31
|
+
return null;
|
|
32
|
+
return resolveFor(db, machine, project);
|
|
33
|
+
}
|
|
34
|
+
/** Resolve every known project for this machine (for portfolio/federation). */
|
|
35
|
+
export function resolveAllProjects(db, machine) {
|
|
36
|
+
return db.getAllProjects().map((project) => resolveFor(db, machine, project));
|
|
37
|
+
}
|
|
38
|
+
function resolveFor(db, machine, project) {
|
|
39
|
+
const override = db.getProjectLocation(project.id, machine.machineId);
|
|
40
|
+
if (override)
|
|
41
|
+
return { project, absPath: override.abs_path, source: "override" };
|
|
42
|
+
const fromRoot = absPathFromRoot(machine, project.root_id, project.rel_path);
|
|
43
|
+
return { project, absPath: fromRoot, source: fromRoot ? "root" : "none" };
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Consumer-facing path for display/use, with a legacy fallback so callers can
|
|
47
|
+
* adopt machine-aware resolution without breaking pre-migration setups:
|
|
48
|
+
*
|
|
49
|
+
* - machine == null (no machine.json yet) → working_directory (legacy)
|
|
50
|
+
* - resolvable via override/root → that path
|
|
51
|
+
* - legacy row not yet scanned but its → working_directory
|
|
52
|
+
* working_directory exists on this disk
|
|
53
|
+
* - otherwise → null ("not on this machine")
|
|
54
|
+
*
|
|
55
|
+
* Pass `machine` as `readMachineConfig()` (which returns null when absent —
|
|
56
|
+
* importantly it does NOT create the file as a display side effect).
|
|
57
|
+
*/
|
|
58
|
+
export function effectiveProjectPath(db, project, machine) {
|
|
59
|
+
if (!machine)
|
|
60
|
+
return project.working_directory || null;
|
|
61
|
+
const override = db.getProjectLocation(project.id, machine.machineId);
|
|
62
|
+
if (override)
|
|
63
|
+
return override.abs_path;
|
|
64
|
+
const fromRoot = absPathFromRoot(machine, project.root_id, project.rel_path);
|
|
65
|
+
if (fromRoot)
|
|
66
|
+
return fromRoot;
|
|
67
|
+
if (project.working_directory && fsSync.existsSync(project.working_directory)) {
|
|
68
|
+
return project.working_directory;
|
|
69
|
+
}
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Record where THIS machine keeps a project, choosing the portable storage
|
|
74
|
+
* automatically:
|
|
75
|
+
* - If absPath sits under a named root, store the machine-INDEPENDENT
|
|
76
|
+
* root_id + rel_path on the project row (shared across machines) and
|
|
77
|
+
* drop any now-redundant per-machine override.
|
|
78
|
+
* - Otherwise store a per-machine override row (project_locations).
|
|
79
|
+
*
|
|
80
|
+
* working_directory is updated as a machine-local display cache either way.
|
|
81
|
+
* Used by `gnosys projects scan` and `gnosys init`.
|
|
82
|
+
*/
|
|
83
|
+
export function recordLocation(db, machine, projectId, absPath) {
|
|
84
|
+
const now = new Date().toISOString();
|
|
85
|
+
const under = relPathUnderRoot(machine, absPath);
|
|
86
|
+
if (under) {
|
|
87
|
+
db.updateProject(projectId, {
|
|
88
|
+
root_id: under.rootId,
|
|
89
|
+
rel_path: under.relPath,
|
|
90
|
+
working_directory: absPath,
|
|
91
|
+
modified: now,
|
|
92
|
+
});
|
|
93
|
+
db.deleteProjectLocation(projectId, machine.machineId);
|
|
94
|
+
return { mode: "root", rootId: under.rootId, relPath: under.relPath };
|
|
95
|
+
}
|
|
96
|
+
db.setProjectLocation({ project_id: projectId, machine_id: machine.machineId, abs_path: absPath, modified: now });
|
|
97
|
+
db.updateProject(projectId, { working_directory: absPath, modified: now });
|
|
98
|
+
return { mode: "override" };
|
|
99
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Project discovery scan (v5.11).
|
|
3
|
+
*
|
|
4
|
+
* Walks each of this machine's named roots for `.gnosys/gnosys.json` files,
|
|
5
|
+
* and for every project found records its machine-portable location
|
|
6
|
+
* (root_id + rel_path) or a per-machine override. This is how a new machine
|
|
7
|
+
* onboards: set its roots in machine.json, then run `gnosys projects scan`.
|
|
8
|
+
*
|
|
9
|
+
* The scan is machine-local — it only ever writes paths derived from THIS
|
|
10
|
+
* machine's roots, so it can run independently on every machine without
|
|
11
|
+
* clobbering the others.
|
|
12
|
+
*/
|
|
13
|
+
import type { GnosysDB } from "./db.js";
|
|
14
|
+
import type { MachineConfig } from "./machineConfig.js";
|
|
15
|
+
interface ScanEntry {
|
|
16
|
+
projectId: string;
|
|
17
|
+
name: string;
|
|
18
|
+
absPath: string;
|
|
19
|
+
mode: "root" | "override";
|
|
20
|
+
/** True if this scan created the project row (first time seen anywhere). */
|
|
21
|
+
created: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface ScanResult {
|
|
24
|
+
roots: string[];
|
|
25
|
+
entries: ScanEntry[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Find every project directory (the parent of a `.gnosys/gnosys.json`) under
|
|
29
|
+
* `root`, skipping build/vendor noise and not descending into `.gnosys`.
|
|
30
|
+
* Nested projects (a monorepo with several `.gnosys` stores) are all found.
|
|
31
|
+
*/
|
|
32
|
+
export declare function findProjectDirs(root: string, maxDepth?: number): Promise<string[]>;
|
|
33
|
+
/**
|
|
34
|
+
* Scan this machine's roots and register every discovered project's location.
|
|
35
|
+
* Creates the project row from its identity file when first seen anywhere.
|
|
36
|
+
*/
|
|
37
|
+
export declare function scanProjects(db: GnosysDB, machine: MachineConfig, opts?: {
|
|
38
|
+
roots?: Record<string, string>;
|
|
39
|
+
}): Promise<ScanResult>;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Project discovery scan (v5.11).
|
|
3
|
+
*
|
|
4
|
+
* Walks each of this machine's named roots for `.gnosys/gnosys.json` files,
|
|
5
|
+
* and for every project found records its machine-portable location
|
|
6
|
+
* (root_id + rel_path) or a per-machine override. This is how a new machine
|
|
7
|
+
* onboards: set its roots in machine.json, then run `gnosys projects scan`.
|
|
8
|
+
*
|
|
9
|
+
* The scan is machine-local — it only ever writes paths derived from THIS
|
|
10
|
+
* machine's roots, so it can run independently on every machine without
|
|
11
|
+
* clobbering the others.
|
|
12
|
+
*/
|
|
13
|
+
import fs from "fs/promises";
|
|
14
|
+
import path from "path";
|
|
15
|
+
import { readProjectIdentity } from "./projectIdentity.js";
|
|
16
|
+
import { recordLocation } from "./projectPaths.js";
|
|
17
|
+
/** Directories never worth descending into when hunting for projects. */
|
|
18
|
+
const SKIP_DIRS = new Set([
|
|
19
|
+
"node_modules", ".git", "dist", "build", "target", "coverage",
|
|
20
|
+
".cache", "vendor", ".next", ".gnosys",
|
|
21
|
+
]);
|
|
22
|
+
/**
|
|
23
|
+
* Find every project directory (the parent of a `.gnosys/gnosys.json`) under
|
|
24
|
+
* `root`, skipping build/vendor noise and not descending into `.gnosys`.
|
|
25
|
+
* Nested projects (a monorepo with several `.gnosys` stores) are all found.
|
|
26
|
+
*/
|
|
27
|
+
export async function findProjectDirs(root, maxDepth = 6) {
|
|
28
|
+
const found = [];
|
|
29
|
+
async function walk(dir, depth) {
|
|
30
|
+
if (depth > maxDepth)
|
|
31
|
+
return;
|
|
32
|
+
let entries;
|
|
33
|
+
try {
|
|
34
|
+
entries = await fs.readdir(dir, { withFileTypes: true });
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
if (entries.some((e) => e.isDirectory() && e.name === ".gnosys")) {
|
|
40
|
+
try {
|
|
41
|
+
await fs.access(path.join(dir, ".gnosys", "gnosys.json"));
|
|
42
|
+
found.push(dir);
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
// .gnosys without an identity file — not a registered project
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
for (const e of entries) {
|
|
49
|
+
if (!e.isDirectory() || SKIP_DIRS.has(e.name))
|
|
50
|
+
continue;
|
|
51
|
+
await walk(path.join(dir, e.name), depth + 1);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
await walk(path.resolve(root), 0);
|
|
55
|
+
return found;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Scan this machine's roots and register every discovered project's location.
|
|
59
|
+
* Creates the project row from its identity file when first seen anywhere.
|
|
60
|
+
*/
|
|
61
|
+
export async function scanProjects(db, machine, opts = {}) {
|
|
62
|
+
const roots = opts.roots ?? machine.roots;
|
|
63
|
+
const entries = [];
|
|
64
|
+
for (const rootPath of Object.values(roots)) {
|
|
65
|
+
const dirs = await findProjectDirs(rootPath);
|
|
66
|
+
for (const dir of dirs) {
|
|
67
|
+
const identity = await readProjectIdentity(dir);
|
|
68
|
+
if (!identity)
|
|
69
|
+
continue;
|
|
70
|
+
let created = false;
|
|
71
|
+
if (!db.getProject(identity.projectId)) {
|
|
72
|
+
const now = new Date().toISOString();
|
|
73
|
+
db.insertProject({
|
|
74
|
+
id: identity.projectId,
|
|
75
|
+
name: identity.projectName,
|
|
76
|
+
working_directory: dir,
|
|
77
|
+
user: identity.user || "unknown",
|
|
78
|
+
agent_rules_target: identity.agentRulesTarget ?? null,
|
|
79
|
+
obsidian_vault: identity.obsidianVault ?? null,
|
|
80
|
+
created: identity.createdAt || now,
|
|
81
|
+
modified: now,
|
|
82
|
+
});
|
|
83
|
+
created = true;
|
|
84
|
+
}
|
|
85
|
+
const res = recordLocation(db, machine, identity.projectId, dir);
|
|
86
|
+
entries.push({
|
|
87
|
+
projectId: identity.projectId,
|
|
88
|
+
name: identity.projectName,
|
|
89
|
+
absPath: dir,
|
|
90
|
+
mode: res.mode,
|
|
91
|
+
created,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return { roots: Object.values(roots), entries };
|
|
96
|
+
}
|
package/dist/lib/recall.d.ts
CHANGED
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
*
|
|
21
21
|
* No LLM calls. No embeddings. Pure index lookup. Sub-50ms.
|
|
22
22
|
*/
|
|
23
|
-
import { GnosysSearch } from "./search.js";
|
|
24
|
-
import { GnosysResolver } from "./resolver.js";
|
|
25
|
-
import { GnosysDB } from "./db.js";
|
|
26
|
-
import { RecallConfig } from "./config.js";
|
|
23
|
+
import type { GnosysSearch } from "./search.js";
|
|
24
|
+
import type { GnosysResolver } from "./resolver.js";
|
|
25
|
+
import type { GnosysDB } from "./db.js";
|
|
26
|
+
import type { RecallConfig } from "./config.js";
|
|
27
27
|
export interface RecallResult {
|
|
28
28
|
memories: RecallMemory[];
|
|
29
29
|
totalActive: number;
|
|
@@ -31,7 +31,7 @@ export interface RecallResult {
|
|
|
31
31
|
recallTimeMs: number;
|
|
32
32
|
aggressive: boolean;
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
interface RecallMemory {
|
|
35
35
|
id: string;
|
|
36
36
|
title: string;
|
|
37
37
|
category: string;
|
|
@@ -79,4 +79,4 @@ export declare function formatRecall(result: RecallResult): string;
|
|
|
79
79
|
* Format recall results as a concise CLI-friendly output.
|
|
80
80
|
*/
|
|
81
81
|
export declare function formatRecallCLI(result: RecallResult): string;
|
|
82
|
-
|
|
82
|
+
export {};
|
package/dist/lib/recall.js
CHANGED
package/dist/lib/remote.d.ts
CHANGED
|
@@ -9,19 +9,9 @@
|
|
|
9
9
|
* - Conflict detection via per-memory `modified` timestamps
|
|
10
10
|
* - Skip-and-flag for auto sync; AI-mediated resolution for conflicts
|
|
11
11
|
*/
|
|
12
|
-
import { GnosysDB, DbMemory } from "./db.js";
|
|
12
|
+
import { GnosysDB, type DbMemory } from "./db.js";
|
|
13
13
|
import type { ProgressCallback } from "./progress.js";
|
|
14
|
-
|
|
15
|
-
/** Path to remote .gnosys directory (e.g., /Volumes/nas/gnosys) */
|
|
16
|
-
path: string;
|
|
17
|
-
/** Run sync automatically in background */
|
|
18
|
-
autoSync?: boolean;
|
|
19
|
-
/** Auto-sync interval in seconds (default 300) */
|
|
20
|
-
autoSyncIntervalSeconds?: number;
|
|
21
|
-
/** Conflict handling: skip-and-flag (safe) or newer-wins (aggressive) */
|
|
22
|
-
conflictStrategy?: "skip-and-flag" | "newer-wins";
|
|
23
|
-
}
|
|
24
|
-
export interface ConflictInfo {
|
|
14
|
+
interface ConflictInfo {
|
|
25
15
|
memoryId: string;
|
|
26
16
|
title: string;
|
|
27
17
|
localModified: string;
|
|
@@ -167,13 +157,6 @@ export declare class RemoteSync {
|
|
|
167
157
|
* upgrade past v5.9.4 stop seeing the stale identifier in panels.
|
|
168
158
|
*/
|
|
169
159
|
export declare function getMachineId(localDb: GnosysDB): string;
|
|
170
|
-
/**
|
|
171
|
-
* Resolve a usable hostname for machine-id generation. Honours common
|
|
172
|
-
* env vars first (cross-platform tests can override), then falls through
|
|
173
|
-
* to `os.hostname()` so macOS shells without `HOSTNAME` still get a real
|
|
174
|
-
* name. Returns `"unknown"` only when everything fails.
|
|
175
|
-
*/
|
|
176
|
-
export declare function resolveHostname(): string;
|
|
177
160
|
/** Format a sync status for human display */
|
|
178
161
|
export declare function formatStatus(status: RemoteStatus): string;
|
|
179
|
-
|
|
162
|
+
export {};
|