@hasna/mementos 0.14.86 → 0.14.88
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/bun.lock +3 -0
- package/dist/cli/__fixtures__/clean-fallback-stub-server.d.ts +2 -0
- package/dist/cli/__fixtures__/clean-fallback-stub-server.d.ts.map +1 -0
- package/dist/cli/__fixtures__/io-restore-stub-server.d.ts +2 -0
- package/dist/cli/__fixtures__/io-restore-stub-server.d.ts.map +1 -0
- package/dist/cli/brains.d.ts +3 -0
- package/dist/cli/brains.d.ts.map +1 -0
- package/dist/cli/commands/agent.d.ts +3 -0
- package/dist/cli/commands/agent.d.ts.map +1 -0
- package/dist/cli/commands/consolidation.d.ts +3 -0
- package/dist/cli/commands/consolidation.d.ts.map +1 -0
- package/dist/cli/commands/entity.d.ts +3 -0
- package/dist/cli/commands/entity.d.ts.map +1 -0
- package/dist/cli/commands/graph.d.ts +3 -0
- package/dist/cli/commands/graph.d.ts.map +1 -0
- package/dist/cli/commands/info-context.d.ts +3 -0
- package/dist/cli/commands/info-context.d.ts.map +1 -0
- package/dist/cli/commands/info-history.d.ts +3 -0
- package/dist/cli/commands/info-history.d.ts.map +1 -0
- package/dist/cli/commands/info-report.d.ts +3 -0
- package/dist/cli/commands/info-report.d.ts.map +1 -0
- package/dist/cli/commands/info-stale.d.ts +3 -0
- package/dist/cli/commands/info-stale.d.ts.map +1 -0
- package/dist/cli/commands/info-stats.d.ts +3 -0
- package/dist/cli/commands/info-stats.d.ts.map +1 -0
- package/dist/cli/commands/info.d.ts +12 -0
- package/dist/cli/commands/info.d.ts.map +1 -0
- package/dist/cli/commands/init.d.ts +3 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/io-backup.d.ts +3 -0
- package/dist/cli/commands/io-backup.d.ts.map +1 -0
- package/dist/cli/commands/io-clean.d.ts +3 -0
- package/dist/cli/commands/io-clean.d.ts.map +1 -0
- package/dist/cli/commands/io-export.d.ts +3 -0
- package/dist/cli/commands/io-export.d.ts.map +1 -0
- package/dist/cli/commands/io-import.d.ts +3 -0
- package/dist/cli/commands/io-import.d.ts.map +1 -0
- package/dist/cli/commands/io-restore.d.ts +3 -0
- package/dist/cli/commands/io-restore.d.ts.map +1 -0
- package/dist/cli/commands/io.d.ts +12 -0
- package/dist/cli/commands/io.d.ts.map +1 -0
- package/dist/cli/commands/memory-cmd-bulk.d.ts +3 -0
- package/dist/cli/commands/memory-cmd-bulk.d.ts.map +1 -0
- package/dist/cli/commands/memory-cmd-chain.d.ts +3 -0
- package/dist/cli/commands/memory-cmd-chain.d.ts.map +1 -0
- package/dist/cli/commands/memory-cmd-crud.d.ts +3 -0
- package/dist/cli/commands/memory-cmd-crud.d.ts.map +1 -0
- package/dist/cli/commands/memory-cmd-diff.d.ts +3 -0
- package/dist/cli/commands/memory-cmd-diff.d.ts.map +1 -0
- package/dist/cli/commands/memory-cmd-list.d.ts +3 -0
- package/dist/cli/commands/memory-cmd-list.d.ts.map +1 -0
- package/dist/cli/commands/memory-cmd-recall-exit.d.ts +3 -0
- package/dist/cli/commands/memory-cmd-recall-exit.d.ts.map +1 -0
- package/dist/cli/commands/memory-cmd-recall.d.ts +3 -0
- package/dist/cli/commands/memory-cmd-recall.d.ts.map +1 -0
- package/dist/cli/commands/memory-cmd-remove.d.ts +3 -0
- package/dist/cli/commands/memory-cmd-remove.d.ts.map +1 -0
- package/dist/cli/commands/memory-cmd-search.d.ts +3 -0
- package/dist/cli/commands/memory-cmd-search.d.ts.map +1 -0
- package/dist/cli/commands/memory-cmd-tail.d.ts +3 -0
- package/dist/cli/commands/memory-cmd-tail.d.ts.map +1 -0
- package/dist/cli/commands/memory-cmd-util.d.ts +3 -0
- package/dist/cli/commands/memory-cmd-util.d.ts.map +1 -0
- package/dist/cli/commands/memory-cmd-view.d.ts +3 -0
- package/dist/cli/commands/memory-cmd-view.d.ts.map +1 -0
- package/dist/cli/commands/memory-cmd-watch.d.ts +3 -0
- package/dist/cli/commands/memory-cmd-watch.d.ts.map +1 -0
- package/dist/cli/commands/memory-cmd-when-to-use.d.ts +3 -0
- package/dist/cli/commands/memory-cmd-when-to-use.d.ts.map +1 -0
- package/dist/cli/commands/memory.d.ts +3 -0
- package/dist/cli/commands/memory.d.ts.map +1 -0
- package/dist/cli/commands/project-panel.d.ts +3 -0
- package/dist/cli/commands/project-panel.d.ts.map +1 -0
- package/dist/cli/commands/project.d.ts +3 -0
- package/dist/cli/commands/project.d.ts.map +1 -0
- package/dist/cli/commands/relation.d.ts +3 -0
- package/dist/cli/commands/relation.d.ts.map +1 -0
- package/dist/cli/commands/storage.d.ts +3 -0
- package/dist/cli/commands/storage.d.ts.map +1 -0
- package/dist/cli/commands/system-auto-memory.d.ts +3 -0
- package/dist/cli/commands/system-auto-memory.d.ts.map +1 -0
- package/dist/cli/commands/system-completions.d.ts +13 -0
- package/dist/cli/commands/system-completions.d.ts.map +1 -0
- package/dist/cli/commands/system-config.d.ts +3 -0
- package/dist/cli/commands/system-config.d.ts.map +1 -0
- package/dist/cli/commands/system-doctor.d.ts +3 -0
- package/dist/cli/commands/system-doctor.d.ts.map +1 -0
- package/dist/cli/commands/system-hooks.d.ts +3 -0
- package/dist/cli/commands/system-hooks.d.ts.map +1 -0
- package/dist/cli/commands/system-mcp.d.ts +3 -0
- package/dist/cli/commands/system-mcp.d.ts.map +1 -0
- package/dist/cli/commands/system-misc.d.ts +3 -0
- package/dist/cli/commands/system-misc.d.ts.map +1 -0
- package/dist/cli/commands/system-profile.d.ts +3 -0
- package/dist/cli/commands/system-profile.d.ts.map +1 -0
- package/dist/cli/commands/system-session.d.ts +3 -0
- package/dist/cli/commands/system-session.d.ts.map +1 -0
- package/dist/cli/commands/system-sessions.d.ts +3 -0
- package/dist/cli/commands/system-sessions.d.ts.map +1 -0
- package/dist/cli/commands/system-synthesis.d.ts +3 -0
- package/dist/cli/commands/system-synthesis.d.ts.map +1 -0
- package/dist/cli/commands/system-synthesized-profile.d.ts +3 -0
- package/dist/cli/commands/system-synthesized-profile.d.ts.map +1 -0
- package/dist/cli/commands/system-tools.d.ts +3 -0
- package/dist/cli/commands/system-tools.d.ts.map +1 -0
- package/dist/cli/commands/system-watch.d.ts +3 -0
- package/dist/cli/commands/system-watch.d.ts.map +1 -0
- package/dist/cli/commands/system.d.ts +3 -0
- package/dist/cli/commands/system.d.ts.map +1 -0
- package/dist/cli/exit-codes.d.ts +13 -0
- package/dist/cli/exit-codes.d.ts.map +1 -0
- package/dist/cli/global-options.d.ts +27 -0
- package/dist/cli/global-options.d.ts.map +1 -0
- package/dist/cli/helpers.d.ts +150 -0
- package/dist/cli/helpers.d.ts.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +1150 -695
- package/dist/cli/register-all.d.ts +17 -0
- package/dist/cli/register-all.d.ts.map +1 -0
- package/dist/cli/startup-side-effects.d.ts +9 -0
- package/dist/cli/startup-side-effects.d.ts.map +1 -0
- package/dist/db/__fixtures__/fail-closed-stub-server.d.ts +2 -0
- package/dist/db/__fixtures__/fail-closed-stub-server.d.ts.map +1 -0
- package/dist/db/__fixtures__/list-filter-capture-server.d.ts +2 -0
- package/dist/db/__fixtures__/list-filter-capture-server.d.ts.map +1 -0
- package/dist/db/__fixtures__/list-filter-client-runner.d.ts +2 -0
- package/dist/db/__fixtures__/list-filter-client-runner.d.ts.map +1 -0
- package/dist/db/acl.d.ts +34 -0
- package/dist/db/acl.d.ts.map +1 -0
- package/dist/db/agents.d.ts +35 -0
- package/dist/db/agents.d.ts.map +1 -0
- package/dist/db/analytics.d.ts +124 -0
- package/dist/db/analytics.d.ts.map +1 -0
- package/dist/db/api-mode.d.ts +127 -0
- package/dist/db/api-mode.d.ts.map +1 -0
- package/dist/db/audit.d.ts +53 -0
- package/dist/db/audit.d.ts.map +1 -0
- package/dist/db/database.d.ts +26 -0
- package/dist/db/database.d.ts.map +1 -0
- package/dist/db/entities.d.ts +62 -0
- package/dist/db/entities.d.ts.map +1 -0
- package/dist/db/entity-memories.d.ts +34 -0
- package/dist/db/entity-memories.d.ts.map +1 -0
- package/dist/db/feedback.d.ts +9 -0
- package/dist/db/feedback.d.ts.map +1 -0
- package/dist/db/locks.d.ts +63 -0
- package/dist/db/locks.d.ts.map +1 -0
- package/dist/db/machines.d.ts +23 -0
- package/dist/db/machines.d.ts.map +1 -0
- package/dist/db/memories.d.ts +199 -0
- package/dist/db/memories.d.ts.map +1 -0
- package/dist/db/memory-links.d.ts +21 -0
- package/dist/db/memory-links.d.ts.map +1 -0
- package/dist/db/memory-project-link.d.ts +13 -0
- package/dist/db/memory-project-link.d.ts.map +1 -0
- package/dist/db/migrations.d.ts +3 -0
- package/dist/db/migrations.d.ts.map +1 -0
- package/dist/db/pg-migrate.d.ts +27 -0
- package/dist/db/pg-migrate.d.ts.map +1 -0
- package/dist/db/pg-migrations.d.ts +2 -0
- package/dist/db/pg-migrations.d.ts.map +1 -0
- package/dist/db/projects.d.ts +27 -0
- package/dist/db/projects.d.ts.map +1 -0
- package/dist/db/ratings.d.ts +23 -0
- package/dist/db/ratings.d.ts.map +1 -0
- package/dist/db/relations.d.ts +49 -0
- package/dist/db/relations.d.ts.map +1 -0
- package/dist/db/session-jobs.d.ts +67 -0
- package/dist/db/session-jobs.d.ts.map +1 -0
- package/dist/db/store-backend.d.ts +42 -0
- package/dist/db/store-backend.d.ts.map +1 -0
- package/dist/db/subscriptions.d.ts +24 -0
- package/dist/db/subscriptions.d.ts.map +1 -0
- package/dist/db/synthesis.d.ts +101 -0
- package/dist/db/synthesis.d.ts.map +1 -0
- package/dist/db/tasks.d.ts +89 -0
- package/dist/db/tasks.d.ts.map +1 -0
- package/dist/db/tool-events.d.ts +27 -0
- package/dist/db/tool-events.d.ts.map +1 -0
- package/dist/db/webhook_hooks.d.ts +48 -0
- package/dist/db/webhook_hooks.d.ts.map +1 -0
- package/dist/diagnostics/historical-project-registration-receipt.d.ts +39 -0
- package/dist/diagnostics/historical-project-registration-receipt.d.ts.map +1 -0
- package/dist/diagnostics/historical-project-registration-receipt.js +116 -10
- package/dist/generated/storage-kit/backend.d.ts +20 -0
- package/dist/generated/storage-kit/backend.d.ts.map +1 -0
- package/dist/generated/storage-kit/health.d.ts +20 -0
- package/dist/generated/storage-kit/health.d.ts.map +1 -0
- package/dist/generated/storage-kit/index.d.ts +8 -0
- package/dist/generated/storage-kit/index.d.ts.map +1 -0
- package/dist/generated/storage-kit/migrations.d.ts +48 -0
- package/dist/generated/storage-kit/migrations.d.ts.map +1 -0
- package/dist/generated/storage-kit/own.d.ts +11 -0
- package/dist/generated/storage-kit/own.d.ts.map +1 -0
- package/dist/generated/storage-kit/pool.d.ts +35 -0
- package/dist/generated/storage-kit/pool.d.ts.map +1 -0
- package/dist/generated/storage-kit/query.d.ts +36 -0
- package/dist/generated/storage-kit/query.d.ts.map +1 -0
- package/dist/generated/storage-kit/tls.d.ts +53 -0
- package/dist/generated/storage-kit/tls.d.ts.map +1 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +806 -541
- package/dist/lib/activation-matcher.d.ts +17 -0
- package/dist/lib/activation-matcher.d.ts.map +1 -0
- package/dist/lib/asmr/categorizer.d.ts +31 -0
- package/dist/lib/asmr/categorizer.d.ts.map +1 -0
- package/dist/lib/asmr/context-agent.d.ts +4 -0
- package/dist/lib/asmr/context-agent.d.ts.map +1 -0
- package/dist/lib/asmr/ensemble.d.ts +23 -0
- package/dist/lib/asmr/ensemble.d.ts.map +1 -0
- package/dist/lib/asmr/fact-agent.d.ts +4 -0
- package/dist/lib/asmr/fact-agent.d.ts.map +1 -0
- package/dist/lib/asmr/index.d.ts +7 -0
- package/dist/lib/asmr/index.d.ts.map +1 -0
- package/dist/lib/asmr/orchestrator.d.ts +4 -0
- package/dist/lib/asmr/orchestrator.d.ts.map +1 -0
- package/dist/lib/asmr/recall.d.ts +3 -0
- package/dist/lib/asmr/recall.d.ts.map +1 -0
- package/dist/lib/asmr/temporal-agent.d.ts +4 -0
- package/dist/lib/asmr/temporal-agent.d.ts.map +1 -0
- package/dist/lib/asmr/types.d.ts +27 -0
- package/dist/lib/asmr/types.d.ts.map +1 -0
- package/dist/lib/auto-inject-orchestrator.d.ts +57 -0
- package/dist/lib/auto-inject-orchestrator.d.ts.map +1 -0
- package/dist/lib/auto-memory-queue.d.ts +48 -0
- package/dist/lib/auto-memory-queue.d.ts.map +1 -0
- package/dist/lib/auto-memory.d.ts +19 -0
- package/dist/lib/auto-memory.d.ts.map +1 -0
- package/dist/lib/bench.d.ts +20 -0
- package/dist/lib/bench.d.ts.map +1 -0
- package/dist/lib/built-in-hooks.d.ts +32 -0
- package/dist/lib/built-in-hooks.d.ts.map +1 -0
- package/dist/lib/channel-pusher.d.ts +39 -0
- package/dist/lib/channel-pusher.d.ts.map +1 -0
- package/dist/lib/config.d.ts +9 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/connectors/files.d.ts +8 -0
- package/dist/lib/connectors/files.d.ts.map +1 -0
- package/dist/lib/connectors/github.d.ts +7 -0
- package/dist/lib/connectors/github.d.ts.map +1 -0
- package/dist/lib/connectors/index.d.ts +12 -0
- package/dist/lib/connectors/index.d.ts.map +1 -0
- package/dist/lib/connectors/notion.d.ts +7 -0
- package/dist/lib/connectors/notion.d.ts.map +1 -0
- package/dist/lib/connectors/types.d.ts +27 -0
- package/dist/lib/connectors/types.d.ts.map +1 -0
- package/dist/lib/consolidation.d.ts +52 -0
- package/dist/lib/consolidation.d.ts.map +1 -0
- package/dist/lib/context-extractor.d.ts +14 -0
- package/dist/lib/context-extractor.d.ts.map +1 -0
- package/dist/lib/context.d.ts +36 -0
- package/dist/lib/context.d.ts.map +1 -0
- package/dist/lib/contradiction.d.ts +50 -0
- package/dist/lib/contradiction.d.ts.map +1 -0
- package/dist/lib/decay.d.ts +35 -0
- package/dist/lib/decay.d.ts.map +1 -0
- package/dist/lib/dedup.d.ts +33 -0
- package/dist/lib/dedup.d.ts.map +1 -0
- package/dist/lib/duration.d.ts +28 -0
- package/dist/lib/duration.d.ts.map +1 -0
- package/dist/lib/embeddings.d.ts +20 -0
- package/dist/lib/embeddings.d.ts.map +1 -0
- package/dist/lib/enum-validation.d.ts +20 -0
- package/dist/lib/enum-validation.d.ts.map +1 -0
- package/dist/lib/export-v1.d.ts +30 -0
- package/dist/lib/export-v1.d.ts.map +1 -0
- package/dist/lib/extractor.d.ts +9 -0
- package/dist/lib/extractor.d.ts.map +1 -0
- package/dist/lib/extractors/audio.d.ts +8 -0
- package/dist/lib/extractors/audio.d.ts.map +1 -0
- package/dist/lib/extractors/index.d.ts +12 -0
- package/dist/lib/extractors/index.d.ts.map +1 -0
- package/dist/lib/extractors/ocr.d.ts +7 -0
- package/dist/lib/extractors/ocr.d.ts.map +1 -0
- package/dist/lib/extractors/pdf.d.ts +7 -0
- package/dist/lib/extractors/pdf.d.ts.map +1 -0
- package/dist/lib/extractors/types.d.ts +12 -0
- package/dist/lib/extractors/types.d.ts.map +1 -0
- package/dist/lib/file-deps.d.ts +27 -0
- package/dist/lib/file-deps.d.ts.map +1 -0
- package/dist/lib/focus.d.ts +58 -0
- package/dist/lib/focus.d.ts.map +1 -0
- package/dist/lib/gatherer.d.ts +16 -0
- package/dist/lib/gatherer.d.ts.map +1 -0
- package/dist/lib/gdpr.d.ts +39 -0
- package/dist/lib/gdpr.d.ts.map +1 -0
- package/dist/lib/hooks.d.ts +50 -0
- package/dist/lib/hooks.d.ts.map +1 -0
- package/dist/lib/importers/index.d.ts +38 -0
- package/dist/lib/importers/index.d.ts.map +1 -0
- package/dist/lib/injector.d.ts +89 -0
- package/dist/lib/injector.d.ts.map +1 -0
- package/dist/lib/machine-visibility.d.ts +6 -0
- package/dist/lib/machine-visibility.d.ts.map +1 -0
- package/dist/lib/matryoshka.d.ts +50 -0
- package/dist/lib/matryoshka.d.ts.map +1 -0
- package/dist/lib/memory-lock.d.ts +58 -0
- package/dist/lib/memory-lock.d.ts.map +1 -0
- package/dist/lib/model-config.d.ts +14 -0
- package/dist/lib/model-config.d.ts.map +1 -0
- package/dist/lib/open-sessions-connector.d.ts +60 -0
- package/dist/lib/open-sessions-connector.d.ts.map +1 -0
- package/dist/lib/package-version.d.ts +3 -0
- package/dist/lib/package-version.d.ts.map +1 -0
- package/dist/lib/paths.d.ts +51 -0
- package/dist/lib/paths.d.ts.map +1 -0
- package/dist/lib/poisoning.d.ts +19 -0
- package/dist/lib/poisoning.d.ts.map +1 -0
- package/dist/lib/poll.d.ts +17 -0
- package/dist/lib/poll.d.ts.map +1 -0
- package/dist/lib/procedural-extractor.d.ts +21 -0
- package/dist/lib/procedural-extractor.d.ts.map +1 -0
- package/dist/lib/profile-sync.d.ts +20 -0
- package/dist/lib/profile-sync.d.ts.map +1 -0
- package/dist/lib/profile-synthesizer.d.ts +20 -0
- package/dist/lib/profile-synthesizer.d.ts.map +1 -0
- package/dist/lib/project-detect.d.ts +18 -0
- package/dist/lib/project-detect.d.ts.map +1 -0
- package/dist/lib/project-panel.d.ts +7 -0
- package/dist/lib/project-panel.d.ts.map +1 -0
- package/dist/lib/providers/anthropic.d.ts +21 -0
- package/dist/lib/providers/anthropic.d.ts.map +1 -0
- package/dist/lib/providers/base.d.ts +96 -0
- package/dist/lib/providers/base.d.ts.map +1 -0
- package/dist/lib/providers/cerebras.d.ts +20 -0
- package/dist/lib/providers/cerebras.d.ts.map +1 -0
- package/dist/lib/providers/grok.d.ts +19 -0
- package/dist/lib/providers/grok.d.ts.map +1 -0
- package/dist/lib/providers/index.d.ts +7 -0
- package/dist/lib/providers/index.d.ts.map +1 -0
- package/dist/lib/providers/openai-compat.d.ts +18 -0
- package/dist/lib/providers/openai-compat.d.ts.map +1 -0
- package/dist/lib/providers/openai.d.ts +20 -0
- package/dist/lib/providers/openai.d.ts.map +1 -0
- package/dist/lib/providers/registry.d.ts +38 -0
- package/dist/lib/providers/registry.d.ts.map +1 -0
- package/dist/lib/quality.d.ts +16 -0
- package/dist/lib/quality.d.ts.map +1 -0
- package/dist/lib/redact.d.ts +26 -0
- package/dist/lib/redact.d.ts.map +1 -0
- package/dist/lib/reflection.d.ts +83 -0
- package/dist/lib/reflection.d.ts.map +1 -0
- package/dist/lib/retention.d.ts +17 -0
- package/dist/lib/retention.d.ts.map +1 -0
- package/dist/lib/retired-storage-mode.d.ts +11 -0
- package/dist/lib/retired-storage-mode.d.ts.map +1 -0
- package/dist/lib/search.d.ts +52 -0
- package/dist/lib/search.d.ts.map +1 -0
- package/dist/lib/session-auto-resolve.d.ts +28 -0
- package/dist/lib/session-auto-resolve.d.ts.map +1 -0
- package/dist/lib/session-processor.d.ts +38 -0
- package/dist/lib/session-processor.d.ts.map +1 -0
- package/dist/lib/session-queue.d.ts +28 -0
- package/dist/lib/session-queue.d.ts.map +1 -0
- package/dist/lib/session-registry.d.ts +47 -0
- package/dist/lib/session-registry.d.ts.map +1 -0
- package/dist/lib/session-start-briefing.d.ts +10 -0
- package/dist/lib/session-start-briefing.d.ts.map +1 -0
- package/dist/lib/session-watcher.d.ts +30 -0
- package/dist/lib/session-watcher.d.ts.map +1 -0
- package/dist/lib/storage-sync.d.ts +45 -0
- package/dist/lib/storage-sync.d.ts.map +1 -0
- package/dist/lib/sync.d.ts +10 -0
- package/dist/lib/sync.d.ts.map +1 -0
- package/dist/lib/synthesis/corpus-builder.d.ts +30 -0
- package/dist/lib/synthesis/corpus-builder.d.ts.map +1 -0
- package/dist/lib/synthesis/executor.d.ts +14 -0
- package/dist/lib/synthesis/executor.d.ts.map +1 -0
- package/dist/lib/synthesis/index.d.ts +37 -0
- package/dist/lib/synthesis/index.d.ts.map +1 -0
- package/dist/lib/synthesis/llm-analyzer.d.ts +18 -0
- package/dist/lib/synthesis/llm-analyzer.d.ts.map +1 -0
- package/dist/lib/synthesis/metrics.d.ts +13 -0
- package/dist/lib/synthesis/metrics.d.ts.map +1 -0
- package/dist/lib/synthesis/scheduler.d.ts +18 -0
- package/dist/lib/synthesis/scheduler.d.ts.map +1 -0
- package/dist/lib/synthesis/validator.d.ts +19 -0
- package/dist/lib/synthesis/validator.d.ts.map +1 -0
- package/dist/lib/task-runner.d.ts +37 -0
- package/dist/lib/task-runner.d.ts.map +1 -0
- package/dist/lib/tool-lesson-extractor.d.ts +24 -0
- package/dist/lib/tool-lesson-extractor.d.ts.map +1 -0
- package/dist/lib/tool-memory-synthesizer.d.ts +28 -0
- package/dist/lib/tool-memory-synthesizer.d.ts.map +1 -0
- package/dist/lib/topic-clusterer.d.ts +21 -0
- package/dist/lib/topic-clusterer.d.ts.map +1 -0
- package/dist/lib/when-to-use-generator.d.ts +22 -0
- package/dist/lib/when-to-use-generator.d.ts.map +1 -0
- package/dist/mcp/http.d.ts +17 -0
- package/dist/mcp/http.d.ts.map +1 -0
- package/dist/mcp/index.d.ts +6 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +978 -554
- package/dist/mcp/memory-broadcast.d.ts +12 -0
- package/dist/mcp/memory-broadcast.d.ts.map +1 -0
- package/dist/mcp/tools/agent-tools.d.ts +3 -0
- package/dist/mcp/tools/agent-tools.d.ts.map +1 -0
- package/dist/mcp/tools/auto-memory-tools.d.ts +5 -0
- package/dist/mcp/tools/auto-memory-tools.d.ts.map +1 -0
- package/dist/mcp/tools/bulk-tools.d.ts +3 -0
- package/dist/mcp/tools/bulk-tools.d.ts.map +1 -0
- package/dist/mcp/tools/consolidation-tools.d.ts +3 -0
- package/dist/mcp/tools/consolidation-tools.d.ts.map +1 -0
- package/dist/mcp/tools/focus-tools.d.ts +3 -0
- package/dist/mcp/tools/focus-tools.d.ts.map +1 -0
- package/dist/mcp/tools/graph-entity-tools.d.ts +3 -0
- package/dist/mcp/tools/graph-entity-tools.d.ts.map +1 -0
- package/dist/mcp/tools/graph-query-tools.d.ts +3 -0
- package/dist/mcp/tools/graph-query-tools.d.ts.map +1 -0
- package/dist/mcp/tools/graph-relation-tools.d.ts +3 -0
- package/dist/mcp/tools/graph-relation-tools.d.ts.map +1 -0
- package/dist/mcp/tools/graph-tools.d.ts +3 -0
- package/dist/mcp/tools/graph-tools.d.ts.map +1 -0
- package/dist/mcp/tools/graph-utils.d.ts +5 -0
- package/dist/mcp/tools/graph-utils.d.ts.map +1 -0
- package/dist/mcp/tools/hook-tools.d.ts +3 -0
- package/dist/mcp/tools/hook-tools.d.ts.map +1 -0
- package/dist/mcp/tools/lock-tools.d.ts +3 -0
- package/dist/mcp/tools/lock-tools.d.ts.map +1 -0
- package/dist/mcp/tools/memory-audit.d.ts +3 -0
- package/dist/mcp/tools/memory-audit.d.ts.map +1 -0
- package/dist/mcp/tools/memory-crud.d.ts +3 -0
- package/dist/mcp/tools/memory-crud.d.ts.map +1 -0
- package/dist/mcp/tools/memory-health.d.ts +3 -0
- package/dist/mcp/tools/memory-health.d.ts.map +1 -0
- package/dist/mcp/tools/memory-history.d.ts +3 -0
- package/dist/mcp/tools/memory-history.d.ts.map +1 -0
- package/dist/mcp/tools/memory-inject.d.ts +3 -0
- package/dist/mcp/tools/memory-inject.d.ts.map +1 -0
- package/dist/mcp/tools/memory-io.d.ts +3 -0
- package/dist/mcp/tools/memory-io.d.ts.map +1 -0
- package/dist/mcp/tools/memory-lifecycle.d.ts +3 -0
- package/dist/mcp/tools/memory-lifecycle.d.ts.map +1 -0
- package/dist/mcp/tools/memory-search.d.ts +3 -0
- package/dist/mcp/tools/memory-search.d.ts.map +1 -0
- package/dist/mcp/tools/memory-stats.d.ts +3 -0
- package/dist/mcp/tools/memory-stats.d.ts.map +1 -0
- package/dist/mcp/tools/memory-tools.d.ts +17 -0
- package/dist/mcp/tools/memory-tools.d.ts.map +1 -0
- package/dist/mcp/tools/memory-utils.d.ts +27 -0
- package/dist/mcp/tools/memory-utils.d.ts.map +1 -0
- package/dist/mcp/tools/memory-validation.d.ts +3 -0
- package/dist/mcp/tools/memory-validation.d.ts.map +1 -0
- package/dist/mcp/tools/project-tools.d.ts +3 -0
- package/dist/mcp/tools/project-tools.d.ts.map +1 -0
- package/dist/mcp/tools/session-tools.d.ts +3 -0
- package/dist/mcp/tools/session-tools.d.ts.map +1 -0
- package/dist/mcp/tools/storage-tools.d.ts +3 -0
- package/dist/mcp/tools/storage-tools.d.ts.map +1 -0
- package/dist/mcp/tools/synthesis-tools.d.ts +3 -0
- package/dist/mcp/tools/synthesis-tools.d.ts.map +1 -0
- package/dist/mcp/tools/system-tools-events.d.ts +3 -0
- package/dist/mcp/tools/system-tools-events.d.ts.map +1 -0
- package/dist/mcp/tools/system-tools-memory-admin.d.ts +3 -0
- package/dist/mcp/tools/system-tools-memory-admin.d.ts.map +1 -0
- package/dist/mcp/tools/system-tools-shared.d.ts +23 -0
- package/dist/mcp/tools/system-tools-shared.d.ts.map +1 -0
- package/dist/mcp/tools/system-tools.d.ts +3 -0
- package/dist/mcp/tools/system-tools.d.ts.map +1 -0
- package/dist/mcp/tools/tool-registry.d.ts +30 -0
- package/dist/mcp/tools/tool-registry.d.ts.map +1 -0
- package/dist/mcp/tools/utility-tools.d.ts +3 -0
- package/dist/mcp/tools/utility-tools.d.ts.map +1 -0
- package/dist/memory-project-link/index.d.ts +2 -0
- package/dist/memory-project-link/index.d.ts.map +1 -0
- package/dist/memory-project-link/schema.d.ts +5 -0
- package/dist/memory-project-link/schema.d.ts.map +1 -0
- package/dist/pg-sync-worker.d.ts +2 -0
- package/dist/pg-sync-worker.d.ts.map +1 -0
- package/dist/project-registration/authority.d.ts +43 -0
- package/dist/project-registration/authority.d.ts.map +1 -0
- package/dist/project-registration/historical-receipt.d.ts +38 -0
- package/dist/project-registration/historical-receipt.d.ts.map +1 -0
- package/dist/project-registration/http.d.ts +32 -0
- package/dist/project-registration/http.d.ts.map +1 -0
- package/dist/project-registration/identity.d.ts +20 -0
- package/dist/project-registration/identity.d.ts.map +1 -0
- package/dist/project-registration/index.d.ts +11 -0
- package/dist/project-registration/index.d.ts.map +1 -0
- package/dist/project-registration/project-references.d.ts +71 -0
- package/dist/project-registration/project-references.d.ts.map +1 -0
- package/dist/project-registration/project-resources.d.ts +22 -0
- package/dist/project-registration/project-resources.d.ts.map +1 -0
- package/dist/project-registration/schema.d.ts +5 -0
- package/dist/project-registration/schema.d.ts.map +1 -0
- package/dist/project-registration/types.d.ts +319 -0
- package/dist/project-registration/types.d.ts.map +1 -0
- package/dist/project-registration.d.ts +2 -0
- package/dist/project-registration.d.ts.map +1 -0
- package/dist/project-registration.js +179 -42
- package/dist/sdk/index.d.ts +987 -0
- package/dist/sdk/index.d.ts.map +1 -0
- package/dist/server/auth.d.ts +11 -0
- package/dist/server/auth.d.ts.map +1 -0
- package/dist/server/helpers.d.ts +53 -0
- package/dist/server/helpers.d.ts.map +1 -0
- package/dist/server/index.d.ts +14 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +1047 -569
- package/dist/server/openapi.d.ts +2 -0
- package/dist/server/openapi.d.ts.map +1 -0
- package/dist/server/router.d.ts +17 -0
- package/dist/server/router.d.ts.map +1 -0
- package/dist/server/routes/agents.d.ts +2 -0
- package/dist/server/routes/agents.d.ts.map +1 -0
- package/dist/server/routes/entities.d.ts +2 -0
- package/dist/server/routes/entities.d.ts.map +1 -0
- package/dist/server/routes/memories-bulk.d.ts +2 -0
- package/dist/server/routes/memories-bulk.d.ts.map +1 -0
- package/dist/server/routes/memories-crud.d.ts +2 -0
- package/dist/server/routes/memories-crud.d.ts.map +1 -0
- package/dist/server/routes/memories-io.d.ts +2 -0
- package/dist/server/routes/memories-io.d.ts.map +1 -0
- package/dist/server/routes/memories-misc.d.ts +2 -0
- package/dist/server/routes/memories-misc.d.ts.map +1 -0
- package/dist/server/routes/memories-search.d.ts +2 -0
- package/dist/server/routes/memories-search.d.ts.map +1 -0
- package/dist/server/routes/memories-stats.d.ts +2 -0
- package/dist/server/routes/memories-stats.d.ts.map +1 -0
- package/dist/server/routes/memories.d.ts +19 -0
- package/dist/server/routes/memories.d.ts.map +1 -0
- package/dist/server/routes/memory-project-link.d.ts +2 -0
- package/dist/server/routes/memory-project-link.d.ts.map +1 -0
- package/dist/server/routes/project-registration.d.ts +2 -0
- package/dist/server/routes/project-registration.d.ts.map +1 -0
- package/dist/server/routes/projects.d.ts +2 -0
- package/dist/server/routes/projects.d.ts.map +1 -0
- package/dist/server/routes/system-auto-memory.d.ts +2 -0
- package/dist/server/routes/system-auto-memory.d.ts.map +1 -0
- package/dist/server/routes/system-chain.d.ts +2 -0
- package/dist/server/routes/system-chain.d.ts.map +1 -0
- package/dist/server/routes/system-consolidation.d.ts +2 -0
- package/dist/server/routes/system-consolidation.d.ts.map +1 -0
- package/dist/server/routes/system-hooks.d.ts +2 -0
- package/dist/server/routes/system-hooks.d.ts.map +1 -0
- package/dist/server/routes/system-sessions.d.ts +2 -0
- package/dist/server/routes/system-sessions.d.ts.map +1 -0
- package/dist/server/routes/system-subscriptions.d.ts +2 -0
- package/dist/server/routes/system-subscriptions.d.ts.map +1 -0
- package/dist/server/routes/system-synthesis.d.ts +2 -0
- package/dist/server/routes/system-synthesis.d.ts.map +1 -0
- package/dist/server/routes/system-tools.d.ts +2 -0
- package/dist/server/routes/system-tools.d.ts.map +1 -0
- package/dist/server/routes/system.d.ts +2 -0
- package/dist/server/routes/system.d.ts.map +1 -0
- package/dist/server/routes/tasks.d.ts +2 -0
- package/dist/server/routes/tasks.d.ts.map +1 -0
- package/dist/storage.d.ts +298 -0
- package/dist/storage.d.ts.map +1 -0
- package/dist/storage.js +134 -17
- package/dist/test-support/memories-page-stub-server.d.ts +2 -0
- package/dist/test-support/memories-page-stub-server.d.ts.map +1 -0
- package/dist/test-support/memories-page-stub.d.ts +28 -0
- package/dist/test-support/memories-page-stub.d.ts.map +1 -0
- package/dist/test-support/pg-sync-stub-worker.d.ts +2 -0
- package/dist/test-support/pg-sync-stub-worker.d.ts.map +1 -0
- package/dist/test-support/preload-local-store.d.ts +2 -0
- package/dist/test-support/preload-local-store.d.ts.map +1 -0
- package/dist/test-support/project-authority-identity.d.ts +8 -0
- package/dist/test-support/project-authority-identity.d.ts.map +1 -0
- package/dist/test-support/store-isolation.d.ts +108 -0
- package/dist/test-support/store-isolation.d.ts.map +1 -0
- package/dist/test-support/strip-ansi.d.ts +3 -0
- package/dist/test-support/strip-ansi.d.ts.map +1 -0
- package/dist/types/hooks.d.ts +136 -0
- package/dist/types/hooks.d.ts.map +1 -0
- package/dist/types/index.d.ts +482 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +6 -4
- package/postinstall.mjs +34 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
/**
|
|
3
|
+
* Attach EVERY command group to `program`, in the order the CLI presents them.
|
|
4
|
+
*
|
|
5
|
+
* This is the single registration list. `index.tsx` calls it to build the real
|
|
6
|
+
* CLI, and `global-options.test.ts` calls it to walk the real option tables — so
|
|
7
|
+
* the structural short-flag guard cannot silently check a smaller tree than the
|
|
8
|
+
* one that ships.
|
|
9
|
+
*
|
|
10
|
+
* That drift was real: the guard originally re-listed 11 groups by hand while
|
|
11
|
+
* the CLI wired 15 sources, leaving `init`, `project-panel`, `brains` and the
|
|
12
|
+
* `@hasna/events` groups (`events`, `webhooks`) unwalked. Seven live `-j`
|
|
13
|
+
* collisions sat in that blind spot while the guard reported clean. Adding a
|
|
14
|
+
* command group here is now the only step required for it to be covered.
|
|
15
|
+
*/
|
|
16
|
+
export declare function registerAllCommands(program: Command): Command;
|
|
17
|
+
//# sourceMappingURL=register-all.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register-all.d.ts","sourceRoot":"","sources":["../../src/cli/register-all.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkBzC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAiB7D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
/**
|
|
3
|
+
* Mark a command as having no startup database access, and return it so it can
|
|
4
|
+
* be used inline at the end of a builder chain.
|
|
5
|
+
*/
|
|
6
|
+
export declare function withoutStartupDbAccess<T extends Command>(command: T): T;
|
|
7
|
+
/** Whether the command about to run has opted out of the startup DB access. */
|
|
8
|
+
export declare function skipsStartupDbAccess(command: Command | undefined): boolean;
|
|
9
|
+
//# sourceMappingURL=startup-side-effects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"startup-side-effects.d.ts","sourceRoot":"","sources":["../../src/cli/startup-side-effects.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,OAAO,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAGvE;AAED,+EAA+E;AAC/E,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAE1E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fail-closed-stub-server.d.ts","sourceRoot":"","sources":["../../../src/db/__fixtures__/fail-closed-stub-server.ts"],"names":[],"mappings":"AAqBA,QAAA,MAAM,MAAM,uBAyCV,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-filter-capture-server.d.ts","sourceRoot":"","sources":["../../../src/db/__fixtures__/list-filter-capture-server.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-filter-client-runner.d.ts","sourceRoot":"","sources":["../../../src/db/__fixtures__/list-filter-client-runner.ts"],"names":[],"mappings":""}
|
package/dist/db/acl.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Memory Access Control Lists (ACLs).
|
|
3
|
+
*
|
|
4
|
+
* Fine-grained permissions beyond scopes: read-only, read-write, admin
|
|
5
|
+
* per agent per key pattern. Default: no ACLs = full access (backward compat).
|
|
6
|
+
*/
|
|
7
|
+
import { SqliteAdapter as Database } from "../storage.js";
|
|
8
|
+
export type AclPermission = "read" | "readwrite" | "admin";
|
|
9
|
+
export interface MemoryAcl {
|
|
10
|
+
id: string;
|
|
11
|
+
agent_id: string;
|
|
12
|
+
key_pattern: string;
|
|
13
|
+
permission: AclPermission;
|
|
14
|
+
project_id: string | null;
|
|
15
|
+
created_at: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Set an ACL rule. Upserts by agent_id + key_pattern.
|
|
19
|
+
*/
|
|
20
|
+
export declare function setAcl(agentId: string, keyPattern: string, permission: AclPermission, projectId?: string, db?: Database): MemoryAcl;
|
|
21
|
+
/**
|
|
22
|
+
* List ACLs for an agent.
|
|
23
|
+
*/
|
|
24
|
+
export declare function listAcls(agentId: string, db?: Database): MemoryAcl[];
|
|
25
|
+
/**
|
|
26
|
+
* Remove an ACL rule.
|
|
27
|
+
*/
|
|
28
|
+
export declare function removeAcl(id: string, db?: Database): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Check if an agent has the required permission for a memory key.
|
|
31
|
+
* Returns true if allowed (no ACLs = full access).
|
|
32
|
+
*/
|
|
33
|
+
export declare function checkPermission(agentId: string, memoryKey: string, requiredPermission: "read" | "write", db?: Database): boolean;
|
|
34
|
+
//# sourceMappingURL=acl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acl.d.ts","sourceRoot":"","sources":["../../src/db/acl.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,aAAa,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG1D,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,WAAW,GAAG,OAAO,CAAC;AAE3D,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,aAAa,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,MAAM,CACpB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,aAAa,EACzB,SAAS,CAAC,EAAE,MAAM,EAClB,EAAE,CAAC,EAAE,QAAQ,GACZ,SAAS,CAeX;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,QAAQ,GAAG,SAAS,EAAE,CAGpE;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,QAAQ,GAAG,OAAO,CAI5D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,kBAAkB,EAAE,MAAM,GAAG,OAAO,EACpC,EAAE,CAAC,EAAE,QAAQ,GACZ,OAAO,CAqBT"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { SqliteAdapter as Database } from "../storage.js";
|
|
2
|
+
import type { Agent } from "../types/index.js";
|
|
3
|
+
export interface AgentListFilter {
|
|
4
|
+
limit?: number;
|
|
5
|
+
offset?: number;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Resolve the NAME of the agent currently doing the writing, without any CLI
|
|
9
|
+
* flag. Sources, in order:
|
|
10
|
+
*
|
|
11
|
+
* 1. `MEMENTOS_AGENT` — this package's existing identity convention (already
|
|
12
|
+
* consumed by `init` and the sessions connector).
|
|
13
|
+
* 2. `~/.hasna/conversations/agent-id` — the fleet's machine-level identity
|
|
14
|
+
* surface, written by `conversations agents register`.
|
|
15
|
+
*
|
|
16
|
+
* Returns null when neither source yields a non-empty name. An unreadable or
|
|
17
|
+
* missing identity file is treated as absent — a write must never fail merely
|
|
18
|
+
* because the identity file was mid-write.
|
|
19
|
+
*/
|
|
20
|
+
export declare function resolveWritingAgentName(): string | null;
|
|
21
|
+
export declare function registerAgent(name: string, sessionId?: string, description?: string, role?: string, projectId?: string, db?: Database): Agent;
|
|
22
|
+
export declare function getAgent(idOrName: string, db?: Database): Agent | null;
|
|
23
|
+
export declare function listAgents(db?: Database): Agent[];
|
|
24
|
+
export declare function listAgents(filter: AgentListFilter, db?: Database): Agent[];
|
|
25
|
+
export declare function touchAgent(idOrName: string, db?: Database): void;
|
|
26
|
+
export declare function listAgentsByProject(projectId: string, db?: Database): Agent[];
|
|
27
|
+
export declare function listAgentsByProject(projectId: string, filter: AgentListFilter, db?: Database): Agent[];
|
|
28
|
+
export declare function updateAgent(id: string, updates: {
|
|
29
|
+
name?: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
role?: string;
|
|
32
|
+
metadata?: Record<string, unknown>;
|
|
33
|
+
active_project_id?: string | null;
|
|
34
|
+
}, db?: Database): Agent | null;
|
|
35
|
+
//# sourceMappingURL=agents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/db/agents.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAQ/C,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,GAAG,IAAI,CAcvD;AAgBD,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,EACZ,SAAS,CAAC,EAAE,MAAM,EAClB,WAAW,CAAC,EAAE,MAAM,EACpB,IAAI,CAAC,EAAE,MAAM,EACb,SAAS,CAAC,EAAE,MAAM,EAClB,EAAE,CAAC,EAAE,QAAQ,GACZ,KAAK,CA0EP;AAED,wBAAgB,QAAQ,CACtB,QAAQ,EAAE,MAAM,EAChB,EAAE,CAAC,EAAE,QAAQ,GACZ,KAAK,GAAG,IAAI,CA6Bd;AA+CD,wBAAgB,UAAU,CAAC,EAAE,CAAC,EAAE,QAAQ,GAAG,KAAK,EAAE,CAAC;AACnD,wBAAgB,UAAU,CAAC,MAAM,EAAE,eAAe,EAAE,EAAE,CAAC,EAAE,QAAQ,GAAG,KAAK,EAAE,CAAC;AAsB5E,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,QAAQ,GAAG,IAAI,CAahE;AAED,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,QAAQ,GAAG,KAAK,EAAE,CAAC;AAC/E,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,eAAe,EACvB,EAAE,CAAC,EAAE,QAAQ,GACZ,KAAK,EAAE,CAAC;AA0BX,wBAAgB,WAAW,CACzB,EAAE,EAAE,MAAM,EACV,OAAO,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,EACtI,EAAE,CAAC,EAAE,QAAQ,GACZ,KAAK,GAAG,IAAI,CAsDd"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { SqliteAdapter as Database } from "../storage.js";
|
|
2
|
+
import type { MemoryScope, MemoryStats } from "../types/index.js";
|
|
3
|
+
export declare function getMemoryStats(db?: Database): MemoryStats;
|
|
4
|
+
export interface ActivityFilter {
|
|
5
|
+
days?: number;
|
|
6
|
+
scope?: MemoryScope;
|
|
7
|
+
agent_id?: string;
|
|
8
|
+
project_id?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ActivityRow {
|
|
11
|
+
date: string;
|
|
12
|
+
memories_created: number;
|
|
13
|
+
global_count?: number;
|
|
14
|
+
shared_count?: number;
|
|
15
|
+
private_count?: number;
|
|
16
|
+
avg_importance?: number;
|
|
17
|
+
}
|
|
18
|
+
export interface ActivityResult {
|
|
19
|
+
activity: ActivityRow[];
|
|
20
|
+
days: number;
|
|
21
|
+
total: number;
|
|
22
|
+
}
|
|
23
|
+
export declare function getMemoryActivity(filter?: ActivityFilter, db?: Database): ActivityResult;
|
|
24
|
+
export interface ReportFilter {
|
|
25
|
+
days?: number;
|
|
26
|
+
project_id?: string;
|
|
27
|
+
agent_id?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface MemoryReport {
|
|
30
|
+
total: number;
|
|
31
|
+
pinned: number;
|
|
32
|
+
days: number;
|
|
33
|
+
recent: {
|
|
34
|
+
total: number;
|
|
35
|
+
activity: {
|
|
36
|
+
date: string;
|
|
37
|
+
memories_created: number;
|
|
38
|
+
}[];
|
|
39
|
+
};
|
|
40
|
+
by_scope: Record<string, number>;
|
|
41
|
+
by_category: Record<string, number>;
|
|
42
|
+
top_memories: {
|
|
43
|
+
id: string;
|
|
44
|
+
key: string;
|
|
45
|
+
value: string;
|
|
46
|
+
importance: number;
|
|
47
|
+
scope: string;
|
|
48
|
+
category: string;
|
|
49
|
+
}[];
|
|
50
|
+
top_agents: {
|
|
51
|
+
agent_id: string;
|
|
52
|
+
c: number;
|
|
53
|
+
}[];
|
|
54
|
+
}
|
|
55
|
+
export declare function getMemoryReport(filter?: ReportFilter, db?: Database): MemoryReport;
|
|
56
|
+
export interface StaleFilter {
|
|
57
|
+
days?: number;
|
|
58
|
+
project_id?: string;
|
|
59
|
+
agent_id?: string;
|
|
60
|
+
/** Scope the check to pinned rows (true) or unpinned rows (false). When
|
|
61
|
+
* undefined, pinned rows stay excluded — the pre-existing contract — so a
|
|
62
|
+
* caller must opt in to review the pinned subset. */
|
|
63
|
+
pinned?: boolean;
|
|
64
|
+
limit?: number;
|
|
65
|
+
offset?: number;
|
|
66
|
+
}
|
|
67
|
+
export interface StaleMemory {
|
|
68
|
+
id: string;
|
|
69
|
+
key: string;
|
|
70
|
+
value: string;
|
|
71
|
+
importance: number;
|
|
72
|
+
scope: string;
|
|
73
|
+
category: string;
|
|
74
|
+
accessed_at: string | null;
|
|
75
|
+
access_count: number;
|
|
76
|
+
created_at?: string;
|
|
77
|
+
}
|
|
78
|
+
export interface StalePage {
|
|
79
|
+
rows: StaleMemory[];
|
|
80
|
+
/** True total of stale memories matching the filter — never the page length. */
|
|
81
|
+
total: number;
|
|
82
|
+
has_more: boolean | undefined;
|
|
83
|
+
next_cursor: number | null;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* One bounded page of the stale surface, with the TRUE total and an explicit
|
|
87
|
+
* pagination signal. The server caps single responses and answers with
|
|
88
|
+
* `total` / `has_more` / `next_cursor`, so a page never silently truncates.
|
|
89
|
+
*/
|
|
90
|
+
export declare function getStaleMemoriesPage(filter?: StaleFilter, db?: Database): StalePage;
|
|
91
|
+
export declare function getStaleMemories(filter?: StaleFilter, db?: Database): StaleMemory[];
|
|
92
|
+
export interface HealthFilter {
|
|
93
|
+
stale_days?: number;
|
|
94
|
+
forgotten_days?: number;
|
|
95
|
+
project_id?: string;
|
|
96
|
+
agent_id?: string;
|
|
97
|
+
limit?: number;
|
|
98
|
+
}
|
|
99
|
+
export interface MemoryHealth {
|
|
100
|
+
stale: {
|
|
101
|
+
id: string;
|
|
102
|
+
key: string;
|
|
103
|
+
value: string;
|
|
104
|
+
importance: number;
|
|
105
|
+
scope: string;
|
|
106
|
+
created_at: string;
|
|
107
|
+
}[];
|
|
108
|
+
forgotten: {
|
|
109
|
+
id: string;
|
|
110
|
+
key: string;
|
|
111
|
+
value: string;
|
|
112
|
+
importance: number;
|
|
113
|
+
scope: string;
|
|
114
|
+
accessed_at: string | null;
|
|
115
|
+
}[];
|
|
116
|
+
dupes: {
|
|
117
|
+
key: string;
|
|
118
|
+
cnt: number;
|
|
119
|
+
latest: string;
|
|
120
|
+
oldest: string;
|
|
121
|
+
}[];
|
|
122
|
+
}
|
|
123
|
+
export declare function getMemoryHealth(filter?: HealthFilter, db?: Database): MemoryHealth;
|
|
124
|
+
//# sourceMappingURL=analytics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../src/db/analytics.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
export interface ApiConfig {
|
|
2
|
+
baseUrl: string;
|
|
3
|
+
apiKey: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const API_URL_ENV_KEYS: readonly ["HASNA_MEMENTOS_API_URL", "MEMENTOS_API_URL"];
|
|
6
|
+
export declare const API_KEY_ENV_KEYS: readonly ["HASNA_MEMENTOS_API_KEY", "MEMENTOS_API_KEY"];
|
|
7
|
+
export declare const DATABASE_URL_ENV_KEYS: readonly ["HASNA_MEMENTOS_DATABASE_URL", "MEMENTOS_DATABASE_URL"];
|
|
8
|
+
/**
|
|
9
|
+
* Which env keys currently select API mode, by name only — never the values.
|
|
10
|
+
* Used by the operator-facing mode report so a human can see *why* the client
|
|
11
|
+
* is pointed at the cloud without reading source or echoing a credential.
|
|
12
|
+
*/
|
|
13
|
+
export declare function getApiModeEnvSources(): {
|
|
14
|
+
urlKey: string | null;
|
|
15
|
+
keyKey: string | null;
|
|
16
|
+
databaseUrlKey: string | null;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* What the environment CONFIGURES, regardless of which store finally wins.
|
|
20
|
+
*
|
|
21
|
+
* Distinct from {@link getApiConfig}, which answers "may I build a cloud
|
|
22
|
+
* request?" and returns null once an explicit DB_PATH outranks the credentials
|
|
23
|
+
* (precedence 1). An operator report needs both halves separately: conflating
|
|
24
|
+
* them prints "no API key configured" at someone whose key is configured and
|
|
25
|
+
* merely outranked, which points them at a credential problem they do not have.
|
|
26
|
+
*
|
|
27
|
+
* Never returns a credential value — the endpoint is not secret, the key is
|
|
28
|
+
* reported only as a boolean.
|
|
29
|
+
*/
|
|
30
|
+
export declare function getConfiguredApiEnv(): {
|
|
31
|
+
baseUrl: string | null;
|
|
32
|
+
apiKeyPresent: boolean;
|
|
33
|
+
dbPathKey: string | null;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Escape hatch for a test that genuinely must reach a non-loopback endpoint.
|
|
37
|
+
* Opt-in by design: the default has to be safe, because the failure it prevents
|
|
38
|
+
* is silent and lands in a shared store.
|
|
39
|
+
*/
|
|
40
|
+
export declare const ALLOW_REMOTE_API_IN_TESTS_ENV = "MEMENTOS_ALLOW_REMOTE_API_IN_TESTS";
|
|
41
|
+
/** Resolve the API client config from env, or `null` when not configured. */
|
|
42
|
+
/** The env keys that explicitly select the local SQLite store. */
|
|
43
|
+
export declare const DB_PATH_ENV_KEYS: readonly ["HASNA_MEMENTOS_DB_PATH", "MEMENTOS_DB_PATH"];
|
|
44
|
+
/** Raised when the environment does not unambiguously select one store. */
|
|
45
|
+
export declare class MementosStoreConfigError extends Error {
|
|
46
|
+
readonly code = "MEMENTOS_STORE_CONFIG";
|
|
47
|
+
constructor(message: string);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Throw unless the environment unambiguously selects one store.
|
|
51
|
+
*
|
|
52
|
+
* AMBIGUOUS CONFIGURATION IS AN ERROR, NOT A DEFAULT. Half an API configuration
|
|
53
|
+
* used to resolve to `null`, which every caller read as "local SQLite" — so an
|
|
54
|
+
* operator whose API key failed to load silently got a different, usually stale,
|
|
55
|
+
* dataset with no error and no flag. From the caller's side that is
|
|
56
|
+
* indistinguishable from a store that is working.
|
|
57
|
+
*
|
|
58
|
+
* THIS FUNCTION ONLY ASSERTS. It returns `void`, so it cannot select anything —
|
|
59
|
+
* the precedence table below describes the RESOLVER, which is `getApiConfig()`
|
|
60
|
+
* immediately after it, and each early `return` here only suppresses the
|
|
61
|
+
* ambiguity error for a case that is already unambiguous. Steps 1 and 2 are
|
|
62
|
+
* therefore implemented in `getApiConfig()` and `isApiMode()` respectively, and
|
|
63
|
+
* the table is documented here because this is where the error text lives.
|
|
64
|
+
*
|
|
65
|
+
* Keeping the table honest about that is not cosmetic. Until 2026-08-03 step 1
|
|
66
|
+
* was implemented NOWHERE: the `return` below reads as a selection, and an
|
|
67
|
+
* operator who read it concluded that a scratch DB_PATH made them safe while a
|
|
68
|
+
* fully-configured environment still routed every read and write to the shared
|
|
69
|
+
* production store.
|
|
70
|
+
*
|
|
71
|
+
* Precedence, highest first:
|
|
72
|
+
* 0. A retired storage-mode variable (HASNA_MEMENTOS_STORAGE_MODE or any of
|
|
73
|
+
* its aliases) throws via `assertNoLegacyStorageMode`, even when blank.
|
|
74
|
+
* Deployment modes no longer exist; a stale variable is an error, never a
|
|
75
|
+
* selector. ENFORCED HERE, before anything else.
|
|
76
|
+
* 1. An explicit SQLite path (`HASNA_MEMENTOS_DB_PATH` / `MEMENTOS_DB_PATH`) is
|
|
77
|
+
* the narrowest, most specific signal and selects LOCAL, so local dev,
|
|
78
|
+
* tooling and import/export keep working when a stray credential is exported
|
|
79
|
+
* globally. ENFORCED in `getApiConfig()`, which returns null for it.
|
|
80
|
+
* 2. A client DSN present disables API mode. ENFORCED in `isApiMode()`. A DSN
|
|
81
|
+
* on a client is forbidden and is tracked separately in database.ts.
|
|
82
|
+
* 3. Both API URL and API key present -> API mode.
|
|
83
|
+
* 4. Exactly ONE of them present -> ERROR naming the missing variable.
|
|
84
|
+
* 5. Neither present -> LOCAL. The documented single-operator default.
|
|
85
|
+
*
|
|
86
|
+
* Never reads, logs, or embeds a credential value — only variable NAMES.
|
|
87
|
+
*/
|
|
88
|
+
export declare function assertUnambiguousStoreEnv(env?: NodeJS.ProcessEnv): void;
|
|
89
|
+
export declare function getApiConfig(): ApiConfig | null;
|
|
90
|
+
/**
|
|
91
|
+
* True when the client should route memory operations to the cloud API.
|
|
92
|
+
* Fail-closed against a client-side DSN: if DATABASE_URL is present, API mode
|
|
93
|
+
* refuses to engage so the two transports never mix.
|
|
94
|
+
*/
|
|
95
|
+
export declare function isApiMode(): boolean;
|
|
96
|
+
export declare class ApiRequestError extends Error {
|
|
97
|
+
readonly status: number;
|
|
98
|
+
readonly body: string;
|
|
99
|
+
constructor(message: string, status: number, body: string);
|
|
100
|
+
}
|
|
101
|
+
export interface ApiJsonOptions {
|
|
102
|
+
/**
|
|
103
|
+
* Treat `404` as a normal outcome and return `{status: 404, data: undefined}`
|
|
104
|
+
* instead of throwing. ONLY for callers where "absent" is a real answer —
|
|
105
|
+
* a GET of one record by id, a DELETE that tolerates an already-gone row, or
|
|
106
|
+
* a call that has an explicit fallback for a route an older server image does
|
|
107
|
+
* not serve yet (see `runCleanupViaApi`).
|
|
108
|
+
*
|
|
109
|
+
* It must never be set on a create/upsert path. A 404 there means the route
|
|
110
|
+
* did not exist on the server (client/server version skew, wrong base URL),
|
|
111
|
+
* so nothing was written; returning success-shaped data made the CLI print
|
|
112
|
+
* "Saved:" and exit 0 having persisted nothing. Default is fail-closed.
|
|
113
|
+
*/
|
|
114
|
+
allow404?: boolean;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Authed JSON request. Throws {@link ApiRequestError} on every non-2xx,
|
|
118
|
+
* including 404, unless the caller opts into 404 pass-through via
|
|
119
|
+
* {@link ApiJsonOptions.allow404}.
|
|
120
|
+
*/
|
|
121
|
+
export declare function apiJson<T = unknown>(method: string, path: string, body?: unknown, options?: ApiJsonOptions): {
|
|
122
|
+
status: number;
|
|
123
|
+
data: T;
|
|
124
|
+
};
|
|
125
|
+
/** Build a query string from a filter object (skips undefined/null/empty). */
|
|
126
|
+
export declare function toQuery(params: Record<string, unknown>): string;
|
|
127
|
+
//# sourceMappingURL=api-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-mode.d.ts","sourceRoot":"","sources":["../../src/db/api-mode.ts"],"names":[],"mappings":"AA2CA,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AASD,eAAO,MAAM,gBAAgB,yDAA0D,CAAC;AACxF,eAAO,MAAM,gBAAgB,yDAA0D,CAAC;AACxF,eAAO,MAAM,qBAAqB,mEAAoE,CAAC;AAsBvG;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI;IAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAMtH;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,IAAI;IACrC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAOA;AAED;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,uCAAuC,CAAC;AAyDlF,6EAA6E;AAC7E,kEAAkE;AAClE,eAAO,MAAM,gBAAgB,yDAA0D,CAAC;AAExF,2EAA2E;AAC3E,qBAAa,wBAAyB,SAAQ,KAAK;IACjD,QAAQ,CAAC,IAAI,2BAA2B;gBAC5B,OAAO,EAAE,MAAM;CAI5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,IAAI,CA8BpF;AAED,wBAAgB,YAAY,IAAI,SAAS,GAAG,IAAI,CAyB/C;AAED;;;;GAIG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAGnC;AAED,qBAAa,eAAgB,SAAQ,KAAK;aAGtB,MAAM,EAAE,MAAM;aACd,IAAI,EAAE,MAAM;gBAF5B,OAAO,EAAE,MAAM,EACC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM;CAK/B;AA0GD,MAAM,WAAW,cAAc;IAC7B;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,CAAC,GAAG,OAAO,EACjC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,OAAO,EACd,OAAO,CAAC,EAAE,cAAc,GACvB;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,CAAC,CAAA;CAAE,CAkC7B;AAED,8EAA8E;AAC9E,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAe/D"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Immutable audit log queries.
|
|
3
|
+
* The audit_log table is append-only — never UPDATE or DELETE from it.
|
|
4
|
+
*/
|
|
5
|
+
import { SqliteAdapter as Database } from "../storage.js";
|
|
6
|
+
export interface AuditEntry {
|
|
7
|
+
id: string;
|
|
8
|
+
memory_id: string;
|
|
9
|
+
memory_key: string | null;
|
|
10
|
+
operation: "create" | "update" | "delete" | "archive" | "restore" | "read";
|
|
11
|
+
agent_id: string | null;
|
|
12
|
+
/**
|
|
13
|
+
* md5 hex digest of the value the row held BEFORE the operation, or `null`.
|
|
14
|
+
*
|
|
15
|
+
* `null` means the digest is UNAVAILABLE, never that the value was empty. It is
|
|
16
|
+
* the honest answer on SQLite, which has no `md5()` and whose driver
|
|
17
|
+
* (`bun:sqlite`) exposes no user-defined-function API, so a trigger cannot
|
|
18
|
+
* compute one. Postgres computes `md5(COALESCE(...))` natively and populates it.
|
|
19
|
+
*
|
|
20
|
+
* So: compare `md5(candidate)` against a NON-NULL value to prove what a row
|
|
21
|
+
* held. A `null` is a statement about the BACKEND and must never be read as
|
|
22
|
+
* evidence about the content — treating it as a failed match is the confident
|
|
23
|
+
* wrong answer migration 37 exists to prevent.
|
|
24
|
+
*/
|
|
25
|
+
old_value_hash: string | null;
|
|
26
|
+
/** md5 hex digest of the value AFTER the operation, or `null`. See `old_value_hash`. */
|
|
27
|
+
new_value_hash: string | null;
|
|
28
|
+
changes: Record<string, unknown>;
|
|
29
|
+
created_at: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Get audit trail for a specific memory.
|
|
33
|
+
*/
|
|
34
|
+
export declare function getMemoryAuditTrail(memoryId: string, limit?: number, db?: Database): AuditEntry[];
|
|
35
|
+
/**
|
|
36
|
+
* Export full audit log for compliance reporting.
|
|
37
|
+
*/
|
|
38
|
+
export declare function exportAuditLog(options?: {
|
|
39
|
+
since?: string;
|
|
40
|
+
until?: string;
|
|
41
|
+
operation?: string;
|
|
42
|
+
agent_id?: string;
|
|
43
|
+
limit?: number;
|
|
44
|
+
}, db?: Database): AuditEntry[];
|
|
45
|
+
/**
|
|
46
|
+
* Get audit stats — operation counts, most active agents, etc.
|
|
47
|
+
*/
|
|
48
|
+
export declare function getAuditStats(db?: Database): {
|
|
49
|
+
total_entries: number;
|
|
50
|
+
by_operation: Record<string, number>;
|
|
51
|
+
recent_24h: number;
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=audit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/db/audit.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG1D,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;IAC3E,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;;;;;;;;;;;OAYG;IACH,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,wFAAwF;IACxF,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,UAAU,EAAE,MAAM,CAAC;CACpB;AAgBD;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,EAChB,KAAK,GAAE,MAAW,EAClB,EAAE,CAAC,EAAE,QAAQ,GACZ,UAAU,EAAE,CAMd;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,OAAO,GAAE;IACP,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CACX,EACN,EAAE,CAAC,EAAE,QAAQ,GACZ,UAAU,EAAE,CA6Bd;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAAE,CAAC,EAAE,QAAQ,GAAG;IAC5C,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,UAAU,EAAE,MAAM,CAAC;CACpB,CAkBA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { SqliteAdapter as Database } from "../storage.js";
|
|
2
|
+
export declare function getDbPath(): string;
|
|
3
|
+
export declare function getDatabase(dbPath?: string): Database;
|
|
4
|
+
export declare function closeDatabase(): void;
|
|
5
|
+
export declare function resetDatabase(): void;
|
|
6
|
+
export declare function now(): string;
|
|
7
|
+
export declare function uuid(): string;
|
|
8
|
+
export declare function shortUuid(): string;
|
|
9
|
+
/**
|
|
10
|
+
* Escape the SQL `LIKE` metacharacters so a caller-supplied id prefix is matched
|
|
11
|
+
* LITERALLY rather than as a pattern.
|
|
12
|
+
*
|
|
13
|
+
* `\` is replaced FIRST, or the backslashes this function itself introduces
|
|
14
|
+
* would be escaped a second time and the pattern would match nothing.
|
|
15
|
+
*
|
|
16
|
+
* Escaping is the right remedy here rather than rejecting any prefix outside the
|
|
17
|
+
* UUID charset `[0-9a-f-]`, because the id space is not UUID-only in practice:
|
|
18
|
+
* `bulkUpsertMemories` writes a caller-supplied `id` verbatim and validates no
|
|
19
|
+
* charset, so an imported row can legitimately carry `_` or `%` in its id. A
|
|
20
|
+
* charset rejection would make exactly those rows unaddressable by prefix, which
|
|
21
|
+
* trades a wrong-row deletion for a silent inability to reach a real row.
|
|
22
|
+
* Escaping fixes the injection at the root while keeping every id addressable.
|
|
23
|
+
*/
|
|
24
|
+
export declare function escapeLikePrefix(s: string): string;
|
|
25
|
+
export declare function resolvePartialId(db: Database, table: string, partialId: string): string | null;
|
|
26
|
+
//# sourceMappingURL=database.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../src/db/database.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,IAAI,QAAQ,EAK1B,MAAM,eAAe,CAAC;AAuDvB,wBAAgB,SAAS,IAAI,MAAM,CA6BlC;AAqDD,wBAAgB,WAAW,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,CAoGrD;AAgDD,wBAAgB,aAAa,IAAI,IAAI,CASpC;AAED,wBAAgB,aAAa,IAAI,IAAI,CAGpC;AAED,wBAAgB,GAAG,IAAI,MAAM,CAE5B;AAED,wBAAgB,IAAI,IAAI,MAAM,CAE7B;AAED,wBAAgB,SAAS,IAAI,MAAM,CAElC;AASD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,QAAQ,EACZ,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,GAChB,MAAM,GAAG,IAAI,CAuBf"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { SqliteAdapter as Database } from "../storage.js";
|
|
2
|
+
import type { Entity, CreateEntityInput, UpdateEntityInput, EntityType } from "../types/index.js";
|
|
3
|
+
export declare function parseEntityRow(row: Record<string, unknown>): Entity;
|
|
4
|
+
export declare function createEntity(input: CreateEntityInput, db?: Database): Entity;
|
|
5
|
+
export declare function getEntity(id: string, db?: Database): Entity;
|
|
6
|
+
export declare function getEntityByName(name: string, type?: EntityType, projectId?: string, db?: Database): Entity | null;
|
|
7
|
+
export declare function listEntities(filter?: {
|
|
8
|
+
type?: EntityType;
|
|
9
|
+
project_id?: string;
|
|
10
|
+
search?: string;
|
|
11
|
+
limit?: number;
|
|
12
|
+
offset?: number;
|
|
13
|
+
}, db?: Database): Entity[];
|
|
14
|
+
export declare function updateEntity(id: string, input: UpdateEntityInput, db?: Database): Entity;
|
|
15
|
+
export declare function deleteEntity(id: string, db?: Database): void;
|
|
16
|
+
export declare function mergeEntities(sourceId: string, targetId: string, db?: Database): Entity;
|
|
17
|
+
export interface DuplicateEntityPair {
|
|
18
|
+
entity_a: Entity;
|
|
19
|
+
entity_b: Entity;
|
|
20
|
+
similarity: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Find potential duplicate entities by name similarity within same type+project.
|
|
24
|
+
* Returns pairs above the threshold (default 0.8) sorted by similarity descending.
|
|
25
|
+
*/
|
|
26
|
+
export declare function findDuplicateEntities(threshold?: number, db?: Database): DuplicateEntityPair[];
|
|
27
|
+
export interface GraphTraversalPath {
|
|
28
|
+
entities: Array<{
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
type: string;
|
|
32
|
+
}>;
|
|
33
|
+
relations: Array<{
|
|
34
|
+
id: string;
|
|
35
|
+
relation_type: string;
|
|
36
|
+
weight: number;
|
|
37
|
+
}>;
|
|
38
|
+
depth: number;
|
|
39
|
+
}
|
|
40
|
+
export interface GraphTraversalResult {
|
|
41
|
+
paths: GraphTraversalPath[];
|
|
42
|
+
visited_entities: Array<{
|
|
43
|
+
id: string;
|
|
44
|
+
name: string;
|
|
45
|
+
type: string;
|
|
46
|
+
}>;
|
|
47
|
+
total_paths: number;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Multi-hop graph traversal using a recursive CTE.
|
|
51
|
+
*
|
|
52
|
+
* Starts from `startEntityId` and follows relations up to `max_depth` hops,
|
|
53
|
+
* returning all discovered paths. Handles cycles by tracking visited entities
|
|
54
|
+
* in each path. Supports direction filtering and relation-type filtering.
|
|
55
|
+
*/
|
|
56
|
+
export declare function graphTraverse(startEntityId: string, options?: {
|
|
57
|
+
max_depth?: number;
|
|
58
|
+
relation_types?: string[];
|
|
59
|
+
direction?: "outgoing" | "incoming" | "both";
|
|
60
|
+
limit?: number;
|
|
61
|
+
}, db?: Database): GraphTraversalResult;
|
|
62
|
+
//# sourceMappingURL=entities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../src/db/entities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AAI1D,OAAO,KAAK,EACV,MAAM,EACN,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EACX,MAAM,mBAAmB,CAAC;AAQ3B,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAWnE;AAMD,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,EAAE,EAAE,CAAC,EAAE,QAAQ,GAAG,MAAM,CAmE5E;AAMD,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,QAAQ,GAAG,MAAM,CAkB3D;AAED,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,UAAU,EACjB,SAAS,CAAC,EAAE,MAAM,EAClB,EAAE,CAAC,EAAE,QAAQ,GACZ,MAAM,GAAG,IAAI,CAgCf;AAMD,wBAAgB,YAAY,CAC1B,MAAM,GAAE;IACN,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACZ,EACN,EAAE,CAAC,EAAE,QAAQ,GACZ,MAAM,EAAE,CA+CV;AAMD,wBAAgB,YAAY,CAC1B,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,iBAAiB,EACxB,EAAE,CAAC,EAAE,QAAQ,GACZ,MAAM,CAsCR;AAMD,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,QAAQ,GAAG,IAAI,CAS5D;AAMD,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,EAAE,CAAC,EAAE,QAAQ,GACZ,MAAM,CAyER;AAgCD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,GAAE,MAAY,EACvB,EAAE,CAAC,EAAE,QAAQ,GACZ,mBAAmB,EAAE,CA2CvB;AAMD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5D,SAAS,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACxE,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,kBAAkB,EAAE,CAAC;IAC5B,gBAAgB,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACpE,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE;IACP,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,SAAS,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;CACX,EACN,EAAE,CAAC,EAAE,QAAQ,GACZ,oBAAoB,CA4JtB"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { SqliteAdapter as Database } from "../storage.js";
|
|
2
|
+
import type { Entity, Memory, EntityMemory, EntityRole } from "../types/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* Link an entity to a memory. Uses INSERT OR IGNORE so duplicate links
|
|
5
|
+
* are silently ignored rather than throwing an error.
|
|
6
|
+
*/
|
|
7
|
+
export declare function linkEntityToMemory(entityId: string, memoryId: string, role?: EntityRole, db?: Database): EntityMemory;
|
|
8
|
+
/**
|
|
9
|
+
* Remove the link between an entity and a memory.
|
|
10
|
+
*/
|
|
11
|
+
export declare function unlinkEntityFromMemory(entityId: string, memoryId: string, db?: Database): void;
|
|
12
|
+
/**
|
|
13
|
+
* Get all memories linked to a given entity.
|
|
14
|
+
* Performs a JOIN with the memories table to return full Memory objects.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getMemoriesForEntity(entityId: string, db?: Database): Memory[];
|
|
17
|
+
/**
|
|
18
|
+
* Get all entities linked to a given memory.
|
|
19
|
+
* Performs a JOIN with the entities table to return full Entity objects.
|
|
20
|
+
*/
|
|
21
|
+
export declare function getEntitiesForMemory(memoryId: string, db?: Database): Entity[];
|
|
22
|
+
/**
|
|
23
|
+
* Link multiple entities to a single memory inside a transaction.
|
|
24
|
+
*/
|
|
25
|
+
export declare function bulkLinkEntities(entityIds: string[], memoryId: string, role?: EntityRole, db?: Database): void;
|
|
26
|
+
/**
|
|
27
|
+
* Query entity-memory links with optional filters.
|
|
28
|
+
* - Pass entityId only to get all links for that entity.
|
|
29
|
+
* - Pass memoryId only to get all links for that memory.
|
|
30
|
+
* - Pass both to get the specific link (if it exists).
|
|
31
|
+
* - Pass neither to get all links.
|
|
32
|
+
*/
|
|
33
|
+
export declare function getEntityMemoryLinks(entityId?: string, memoryId?: string, db?: Database): EntityMemory[];
|
|
34
|
+
//# sourceMappingURL=entity-memories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-memories.d.ts","sourceRoot":"","sources":["../../src/db/entity-memories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAiClF;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,IAAI,GAAE,UAAsB,EAC5B,EAAE,CAAC,EAAE,QAAQ,GACZ,YAAY,CAyBd;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,EAAE,CAAC,EAAE,QAAQ,GACZ,IAAI,CAaN;AAMD;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,EAAE,CAAC,EAAE,QAAQ,GACZ,MAAM,EAAE,CAmBV;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,EAAE,CAAC,EAAE,QAAQ,GACZ,MAAM,EAAE,CAYV;AAMD;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,EAAE,EACnB,QAAQ,EAAE,MAAM,EAChB,IAAI,GAAE,UAAsB,EAC5B,EAAE,CAAC,EAAE,QAAQ,GACZ,IAAI,CAaN;AAMD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,CAAC,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,MAAM,EACjB,EAAE,CAAC,EAAE,QAAQ,GACZ,YAAY,EAAE,CAsBhB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SqliteAdapter as Database } from "../storage.js";
|
|
2
|
+
export interface FeedbackInput {
|
|
3
|
+
message: string;
|
|
4
|
+
email?: string | null;
|
|
5
|
+
category?: string | null;
|
|
6
|
+
version?: string | null;
|
|
7
|
+
}
|
|
8
|
+
export declare function saveFeedback(input: FeedbackInput, db?: Database): void;
|
|
9
|
+
//# sourceMappingURL=feedback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feedback.d.ts","sourceRoot":"","sources":["../../src/db/feedback.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AAI1D,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,aAAa,EAAE,EAAE,CAAC,EAAE,QAAQ,GAAG,IAAI,CAiBtE"}
|