@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,987 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @hasna/mementos/sdk — Zero-dependency TypeScript client for @hasna/mementos REST API.
|
|
3
|
+
*
|
|
4
|
+
* Import: `import { MementosClient } from "@hasna/mementos/sdk"`
|
|
5
|
+
*
|
|
6
|
+
* Works in Node.js, Bun, Deno, and browsers. No external dependencies beyond fetch.
|
|
7
|
+
*/
|
|
8
|
+
export type MemoryScope = "global" | "shared" | "private" | "working";
|
|
9
|
+
export type MemoryCategory = "preference" | "fact" | "knowledge" | "history" | "procedural" | "resource";
|
|
10
|
+
export type MemorySource = "user" | "agent" | "system" | "auto" | "imported";
|
|
11
|
+
export type MemoryStatus = "active" | "archived" | "expired";
|
|
12
|
+
export type EntityType = "person" | "place" | "thing" | "concept" | "project" | "agent" | "file" | "url";
|
|
13
|
+
export type RelationType = "uses" | "knows" | "depends_on" | "created_by" | "related_to" | "contradicts" | "part_of" | "implements" | "happened_before" | "happened_after" | "caused_by" | "resulted_in" | "supersedes" | "version_of";
|
|
14
|
+
export type EntityRole = "subject" | "object" | "context" | "author" | "target";
|
|
15
|
+
export type TaskStatus = "pending" | "in_progress" | "completed" | "failed" | "cancelled";
|
|
16
|
+
export type TaskPriority = "critical" | "high" | "medium" | "low";
|
|
17
|
+
export interface Task {
|
|
18
|
+
id: string;
|
|
19
|
+
subject: string;
|
|
20
|
+
description: string;
|
|
21
|
+
status: TaskStatus;
|
|
22
|
+
priority: TaskPriority;
|
|
23
|
+
tags: string[];
|
|
24
|
+
assigned_agent_id: string | null;
|
|
25
|
+
project_id: string | null;
|
|
26
|
+
session_id: string | null;
|
|
27
|
+
parent_task_id: string | null;
|
|
28
|
+
metadata: Record<string, unknown>;
|
|
29
|
+
progress: number;
|
|
30
|
+
due_at: string | null;
|
|
31
|
+
started_at: string | null;
|
|
32
|
+
completed_at: string | null;
|
|
33
|
+
failed_at: string | null;
|
|
34
|
+
error: string | null;
|
|
35
|
+
created_at: string;
|
|
36
|
+
updated_at: string;
|
|
37
|
+
}
|
|
38
|
+
export interface TaskComment {
|
|
39
|
+
id: string;
|
|
40
|
+
task_id: string;
|
|
41
|
+
agent_id: string | null;
|
|
42
|
+
body: string;
|
|
43
|
+
created_at: string;
|
|
44
|
+
}
|
|
45
|
+
export interface CreateTaskInput {
|
|
46
|
+
subject: string;
|
|
47
|
+
description?: string;
|
|
48
|
+
priority?: TaskPriority;
|
|
49
|
+
tags?: string[];
|
|
50
|
+
assigned_agent_id?: string;
|
|
51
|
+
project_id?: string;
|
|
52
|
+
session_id?: string;
|
|
53
|
+
parent_task_id?: string;
|
|
54
|
+
metadata?: Record<string, unknown>;
|
|
55
|
+
due_at?: string;
|
|
56
|
+
}
|
|
57
|
+
export interface UpdateTaskInput {
|
|
58
|
+
subject?: string;
|
|
59
|
+
description?: string;
|
|
60
|
+
status?: TaskStatus;
|
|
61
|
+
priority?: TaskPriority;
|
|
62
|
+
tags?: string[];
|
|
63
|
+
assigned_agent_id?: string | null;
|
|
64
|
+
metadata?: Record<string, unknown>;
|
|
65
|
+
progress?: number;
|
|
66
|
+
due_at?: string | null;
|
|
67
|
+
error?: string | null;
|
|
68
|
+
}
|
|
69
|
+
export interface TaskStats {
|
|
70
|
+
total: number;
|
|
71
|
+
by_status: Record<TaskStatus, number>;
|
|
72
|
+
by_priority: Record<TaskPriority, number>;
|
|
73
|
+
overdue: number;
|
|
74
|
+
}
|
|
75
|
+
export interface Memory {
|
|
76
|
+
id: string;
|
|
77
|
+
key: string;
|
|
78
|
+
value: string;
|
|
79
|
+
category: MemoryCategory;
|
|
80
|
+
scope: MemoryScope;
|
|
81
|
+
summary: string | null;
|
|
82
|
+
tags: string[];
|
|
83
|
+
importance: number;
|
|
84
|
+
source: MemorySource;
|
|
85
|
+
status: MemoryStatus;
|
|
86
|
+
pinned: boolean;
|
|
87
|
+
agent_id: string | null;
|
|
88
|
+
project_id: string | null;
|
|
89
|
+
session_id: string | null;
|
|
90
|
+
metadata: Record<string, unknown>;
|
|
91
|
+
access_count: number;
|
|
92
|
+
version: number;
|
|
93
|
+
expires_at: string | null;
|
|
94
|
+
created_at: string;
|
|
95
|
+
updated_at: string;
|
|
96
|
+
accessed_at: string | null;
|
|
97
|
+
}
|
|
98
|
+
export interface MemoryVersion {
|
|
99
|
+
id: string;
|
|
100
|
+
memory_id: string;
|
|
101
|
+
version: number;
|
|
102
|
+
value: string;
|
|
103
|
+
importance: number;
|
|
104
|
+
scope: MemoryScope;
|
|
105
|
+
category: MemoryCategory;
|
|
106
|
+
tags: string[];
|
|
107
|
+
summary: string | null;
|
|
108
|
+
pinned: boolean;
|
|
109
|
+
status: MemoryStatus;
|
|
110
|
+
created_at: string;
|
|
111
|
+
}
|
|
112
|
+
export interface Agent {
|
|
113
|
+
id: string;
|
|
114
|
+
name: string;
|
|
115
|
+
role: string | null;
|
|
116
|
+
description: string | null;
|
|
117
|
+
active_project_id?: string | null;
|
|
118
|
+
created_at: string;
|
|
119
|
+
last_seen_at: string | null;
|
|
120
|
+
}
|
|
121
|
+
export interface Project {
|
|
122
|
+
id: string;
|
|
123
|
+
name: string;
|
|
124
|
+
path: string | null;
|
|
125
|
+
description: string | null;
|
|
126
|
+
memory_prefix: string | null;
|
|
127
|
+
created_at: string;
|
|
128
|
+
updated_at: string;
|
|
129
|
+
}
|
|
130
|
+
export type MementosProjectResourceKind = "project" | "knowledge" | "memory" | "session";
|
|
131
|
+
export interface MementosProjectResourceAuthority {
|
|
132
|
+
authority: "mementos";
|
|
133
|
+
authority_id: string;
|
|
134
|
+
tenant_id: string;
|
|
135
|
+
corpus_id: string;
|
|
136
|
+
package_version: string;
|
|
137
|
+
}
|
|
138
|
+
export interface MementosProjectResource {
|
|
139
|
+
authority: "mementos";
|
|
140
|
+
source_package: "@hasna/mementos";
|
|
141
|
+
project_id: string;
|
|
142
|
+
resource_kind: MementosProjectResourceKind;
|
|
143
|
+
stable_id: string;
|
|
144
|
+
revision: string;
|
|
145
|
+
digest: string;
|
|
146
|
+
membership: "project_aggregate" | "explicit_project_id_or_focus";
|
|
147
|
+
}
|
|
148
|
+
export interface MementosProjectResourcePage {
|
|
149
|
+
schema: "mementos.project-resources.v1";
|
|
150
|
+
authority: MementosProjectResourceAuthority;
|
|
151
|
+
project_id: string;
|
|
152
|
+
project_revision: string;
|
|
153
|
+
collection_revision: string;
|
|
154
|
+
resource_kinds: MementosProjectResourceKind[];
|
|
155
|
+
resources: MementosProjectResource[];
|
|
156
|
+
count: number;
|
|
157
|
+
total: number;
|
|
158
|
+
limit: number;
|
|
159
|
+
cursor: string | null;
|
|
160
|
+
next_cursor: string | null;
|
|
161
|
+
has_more: boolean;
|
|
162
|
+
complete: true;
|
|
163
|
+
truncated: false;
|
|
164
|
+
}
|
|
165
|
+
export interface MementosProjectResourceExactResult {
|
|
166
|
+
schema: "mementos.project-resource.v1";
|
|
167
|
+
authority: MementosProjectResourceAuthority;
|
|
168
|
+
project_id: string;
|
|
169
|
+
project_revision: string;
|
|
170
|
+
collection_revision: string;
|
|
171
|
+
resource: MementosProjectResource;
|
|
172
|
+
complete: true;
|
|
173
|
+
truncated: false;
|
|
174
|
+
}
|
|
175
|
+
export interface ListMementosProjectResourcesOptions {
|
|
176
|
+
limit?: number;
|
|
177
|
+
cursor?: string;
|
|
178
|
+
resource_kinds?: MementosProjectResourceKind[];
|
|
179
|
+
}
|
|
180
|
+
export interface ListAllMementosProjectResourcesOptions {
|
|
181
|
+
page_size?: number;
|
|
182
|
+
resource_kinds?: MementosProjectResourceKind[];
|
|
183
|
+
}
|
|
184
|
+
export interface UpdateProjectInput {
|
|
185
|
+
name?: string;
|
|
186
|
+
path?: string;
|
|
187
|
+
description?: string | null;
|
|
188
|
+
memory_prefix?: string | null;
|
|
189
|
+
}
|
|
190
|
+
export interface ProjectAuthorityIdentity {
|
|
191
|
+
authority_id: string;
|
|
192
|
+
tenant_id: string;
|
|
193
|
+
corpus_id: string;
|
|
194
|
+
}
|
|
195
|
+
export interface ProjectGuardedUpdateRequest extends ProjectAuthorityIdentity {
|
|
196
|
+
operation_id: string;
|
|
197
|
+
step_id: string;
|
|
198
|
+
idempotency_key: string;
|
|
199
|
+
expected_revision: string;
|
|
200
|
+
updates: UpdateProjectInput;
|
|
201
|
+
}
|
|
202
|
+
export interface ProjectGuardedRollbackRequest extends ProjectAuthorityIdentity {
|
|
203
|
+
operation_id: string;
|
|
204
|
+
step_id: string;
|
|
205
|
+
idempotency_key: string;
|
|
206
|
+
expected_revision: string;
|
|
207
|
+
accepted_receipt_id: string;
|
|
208
|
+
}
|
|
209
|
+
export interface ProjectUpdateReceipt {
|
|
210
|
+
receipt_id: string;
|
|
211
|
+
authority: "mementos";
|
|
212
|
+
route: "mementos.project-guarded-update.v1";
|
|
213
|
+
package_version: string;
|
|
214
|
+
authority_id: string;
|
|
215
|
+
tenant_id: string;
|
|
216
|
+
corpus_id: string;
|
|
217
|
+
operation_id: string;
|
|
218
|
+
step_id: string;
|
|
219
|
+
direction: "forward" | "rollback";
|
|
220
|
+
idempotency_key: string;
|
|
221
|
+
request_digest: string;
|
|
222
|
+
outcome: "accepted";
|
|
223
|
+
target_id: string;
|
|
224
|
+
expected_revision: string;
|
|
225
|
+
result_revision: string;
|
|
226
|
+
result_digest: string;
|
|
227
|
+
accepted_receipt_id: string | null;
|
|
228
|
+
before_project: Project;
|
|
229
|
+
after_project: Project;
|
|
230
|
+
created_at: string;
|
|
231
|
+
}
|
|
232
|
+
export interface ProjectGuardedUpdateResult {
|
|
233
|
+
dry_run: boolean;
|
|
234
|
+
applied: boolean;
|
|
235
|
+
project: Project;
|
|
236
|
+
receipt: ProjectUpdateReceipt | null;
|
|
237
|
+
}
|
|
238
|
+
export interface MemoryProjectLinkSnapshot {
|
|
239
|
+
memory_id: string;
|
|
240
|
+
project_id: string | null;
|
|
241
|
+
memory_version: number;
|
|
242
|
+
memory_revision: string;
|
|
243
|
+
memory_digest: string;
|
|
244
|
+
}
|
|
245
|
+
export interface MemoryProjectLinkRequest extends ProjectAuthorityIdentity {
|
|
246
|
+
operation_id: string;
|
|
247
|
+
step_id: string;
|
|
248
|
+
idempotency_key: string;
|
|
249
|
+
expected_memory_version: number;
|
|
250
|
+
expected_memory_revision: string;
|
|
251
|
+
target_project_id: string;
|
|
252
|
+
expected_project_revision: string;
|
|
253
|
+
}
|
|
254
|
+
export interface MemoryProjectLinkRollbackRequest extends ProjectAuthorityIdentity {
|
|
255
|
+
operation_id: string;
|
|
256
|
+
step_id: string;
|
|
257
|
+
idempotency_key: string;
|
|
258
|
+
expected_memory_version: number;
|
|
259
|
+
expected_memory_revision: string;
|
|
260
|
+
accepted_receipt_id: string;
|
|
261
|
+
}
|
|
262
|
+
export interface MemoryProjectLinkReceipt {
|
|
263
|
+
receipt_id: string;
|
|
264
|
+
authority: "mementos";
|
|
265
|
+
route: "mementos.memory-project-link.v1";
|
|
266
|
+
package_version: string;
|
|
267
|
+
authority_id: string;
|
|
268
|
+
tenant_id: string;
|
|
269
|
+
corpus_id: string;
|
|
270
|
+
operation_id: string;
|
|
271
|
+
step_id: string;
|
|
272
|
+
direction: "forward" | "rollback";
|
|
273
|
+
idempotency_key: string;
|
|
274
|
+
request_digest: string;
|
|
275
|
+
outcome: "accepted" | "no_change";
|
|
276
|
+
target_memory_id: string;
|
|
277
|
+
requested_project_id: string;
|
|
278
|
+
expected_memory_version: number;
|
|
279
|
+
expected_memory_revision: string;
|
|
280
|
+
expected_project_revision: string | null;
|
|
281
|
+
result_memory_version: number;
|
|
282
|
+
result_memory_revision: string;
|
|
283
|
+
result_memory_digest: string;
|
|
284
|
+
result_project_revision: string | null;
|
|
285
|
+
result_project_digest: string | null;
|
|
286
|
+
accepted_receipt_id: string | null;
|
|
287
|
+
before_link: MemoryProjectLinkSnapshot;
|
|
288
|
+
after_link: MemoryProjectLinkSnapshot;
|
|
289
|
+
before_project_revision: string | null;
|
|
290
|
+
before_project_digest: string | null;
|
|
291
|
+
after_project_revision: string | null;
|
|
292
|
+
after_project_digest: string | null;
|
|
293
|
+
created_at: string;
|
|
294
|
+
}
|
|
295
|
+
export interface MemoryProjectLinkResult {
|
|
296
|
+
dry_run: boolean;
|
|
297
|
+
applied: boolean;
|
|
298
|
+
no_change: boolean;
|
|
299
|
+
memory: Memory;
|
|
300
|
+
project: Project | null;
|
|
301
|
+
receipt: MemoryProjectLinkReceipt | null;
|
|
302
|
+
}
|
|
303
|
+
export interface Entity {
|
|
304
|
+
id: string;
|
|
305
|
+
name: string;
|
|
306
|
+
type: EntityType;
|
|
307
|
+
description: string | null;
|
|
308
|
+
metadata: Record<string, unknown>;
|
|
309
|
+
project_id: string | null;
|
|
310
|
+
created_at: string;
|
|
311
|
+
updated_at: string;
|
|
312
|
+
}
|
|
313
|
+
export interface Relation {
|
|
314
|
+
id: string;
|
|
315
|
+
source_entity_id: string;
|
|
316
|
+
target_entity_id: string;
|
|
317
|
+
relation_type: RelationType;
|
|
318
|
+
weight: number;
|
|
319
|
+
metadata: Record<string, unknown>;
|
|
320
|
+
created_at: string;
|
|
321
|
+
}
|
|
322
|
+
export type ResourceType = "project" | "memory" | "entity" | "agent" | "connector" | "file";
|
|
323
|
+
export type LockType = "advisory" | "exclusive";
|
|
324
|
+
export interface ResourceLock {
|
|
325
|
+
id: string;
|
|
326
|
+
resource_type: ResourceType;
|
|
327
|
+
resource_id: string;
|
|
328
|
+
agent_id: string;
|
|
329
|
+
lock_type: LockType;
|
|
330
|
+
locked_at: string;
|
|
331
|
+
expires_at: string;
|
|
332
|
+
}
|
|
333
|
+
export interface AcquireLockInput {
|
|
334
|
+
agent_id: string;
|
|
335
|
+
resource_type: ResourceType;
|
|
336
|
+
resource_id: string;
|
|
337
|
+
lock_type?: LockType;
|
|
338
|
+
ttl_seconds?: number;
|
|
339
|
+
}
|
|
340
|
+
export interface MemoryStats {
|
|
341
|
+
total: number;
|
|
342
|
+
by_scope: Record<MemoryScope, number>;
|
|
343
|
+
by_category: Record<MemoryCategory, number>;
|
|
344
|
+
by_status: Record<MemoryStatus, number>;
|
|
345
|
+
by_agent: Record<string, number>;
|
|
346
|
+
pinned_count: number;
|
|
347
|
+
/** Rows with status = 'expired' — exactly what `--status expired` returns. */
|
|
348
|
+
expired_count: number;
|
|
349
|
+
/** Rows carrying any expires_at date (future or past). */
|
|
350
|
+
expires_at_count: number;
|
|
351
|
+
/** Retention backlog: status = 'expired' OR expires_at in the past. */
|
|
352
|
+
expired_due_count: number;
|
|
353
|
+
}
|
|
354
|
+
export interface CreateMemoryInput {
|
|
355
|
+
key: string;
|
|
356
|
+
value: string;
|
|
357
|
+
category?: MemoryCategory;
|
|
358
|
+
scope?: MemoryScope;
|
|
359
|
+
summary?: string;
|
|
360
|
+
tags?: string[];
|
|
361
|
+
importance?: number;
|
|
362
|
+
source?: MemorySource;
|
|
363
|
+
agent_id?: string;
|
|
364
|
+
project_id?: string;
|
|
365
|
+
session_id?: string;
|
|
366
|
+
metadata?: Record<string, unknown>;
|
|
367
|
+
expires_at?: string;
|
|
368
|
+
ttl?: string;
|
|
369
|
+
}
|
|
370
|
+
export interface UpdateMemoryInput {
|
|
371
|
+
value?: string;
|
|
372
|
+
category?: MemoryCategory;
|
|
373
|
+
scope?: MemoryScope;
|
|
374
|
+
summary?: string | null;
|
|
375
|
+
tags?: string[];
|
|
376
|
+
importance?: number;
|
|
377
|
+
pinned?: boolean;
|
|
378
|
+
status?: MemoryStatus;
|
|
379
|
+
metadata?: Record<string, unknown>;
|
|
380
|
+
expires_at?: string | null;
|
|
381
|
+
version?: number;
|
|
382
|
+
}
|
|
383
|
+
export interface ListMemoriesFilter {
|
|
384
|
+
scope?: MemoryScope;
|
|
385
|
+
category?: MemoryCategory;
|
|
386
|
+
tags?: string[];
|
|
387
|
+
min_importance?: number;
|
|
388
|
+
pinned?: boolean;
|
|
389
|
+
agent_id?: string;
|
|
390
|
+
project_id?: string;
|
|
391
|
+
session_id?: string;
|
|
392
|
+
namespace?: string;
|
|
393
|
+
status?: MemoryStatus;
|
|
394
|
+
limit?: number;
|
|
395
|
+
offset?: number;
|
|
396
|
+
fields?: string[];
|
|
397
|
+
}
|
|
398
|
+
export interface SearchMemoriesInput {
|
|
399
|
+
query: string;
|
|
400
|
+
scope?: MemoryScope;
|
|
401
|
+
category?: MemoryCategory;
|
|
402
|
+
tags?: string[];
|
|
403
|
+
session_id?: string;
|
|
404
|
+
namespace?: string;
|
|
405
|
+
limit?: number;
|
|
406
|
+
}
|
|
407
|
+
export interface ExportMemoriesInput {
|
|
408
|
+
scope?: MemoryScope;
|
|
409
|
+
category?: MemoryCategory;
|
|
410
|
+
agent_id?: string;
|
|
411
|
+
project_id?: string;
|
|
412
|
+
tags?: string[];
|
|
413
|
+
limit?: number;
|
|
414
|
+
}
|
|
415
|
+
export interface ImportMemoriesInput {
|
|
416
|
+
memories: Partial<Memory>[];
|
|
417
|
+
overwrite?: boolean;
|
|
418
|
+
}
|
|
419
|
+
export interface CreateEntityInput {
|
|
420
|
+
name: string;
|
|
421
|
+
type: EntityType;
|
|
422
|
+
description?: string;
|
|
423
|
+
metadata?: Record<string, unknown>;
|
|
424
|
+
project_id?: string;
|
|
425
|
+
}
|
|
426
|
+
export interface UpdateEntityInput {
|
|
427
|
+
name?: string;
|
|
428
|
+
type?: EntityType;
|
|
429
|
+
description?: string | null;
|
|
430
|
+
metadata?: Record<string, unknown>;
|
|
431
|
+
}
|
|
432
|
+
export interface CreateRelationInput {
|
|
433
|
+
source_entity_id: string;
|
|
434
|
+
target_entity_id: string;
|
|
435
|
+
relation_type: RelationType;
|
|
436
|
+
weight?: number;
|
|
437
|
+
metadata?: Record<string, unknown>;
|
|
438
|
+
}
|
|
439
|
+
export interface ListTasksFilter {
|
|
440
|
+
status?: TaskStatus;
|
|
441
|
+
priority?: TaskPriority;
|
|
442
|
+
assigned_agent_id?: string;
|
|
443
|
+
project_id?: string;
|
|
444
|
+
session_id?: string;
|
|
445
|
+
parent_task_id?: string | null;
|
|
446
|
+
tags?: string[];
|
|
447
|
+
limit?: number;
|
|
448
|
+
offset?: number;
|
|
449
|
+
}
|
|
450
|
+
export interface MementosClientConfig {
|
|
451
|
+
baseUrl?: string;
|
|
452
|
+
fetch?: typeof globalThis.fetch;
|
|
453
|
+
/**
|
|
454
|
+
* API key issued by `contracts issue-key --app mementos`. Sent as both
|
|
455
|
+
* `Authorization: Bearer <key>` and `x-api-key`. Required against a
|
|
456
|
+
* self_hosted deployment with API-key auth enabled.
|
|
457
|
+
*/
|
|
458
|
+
apiKey?: string;
|
|
459
|
+
/**
|
|
460
|
+
* Versioned route prefix. Defaults to the canonical `/v1`. The deployed
|
|
461
|
+
* service also serves the legacy `/api` prefix; set `prefix: "/api"` to target
|
|
462
|
+
* it explicitly.
|
|
463
|
+
*/
|
|
464
|
+
prefix?: string;
|
|
465
|
+
}
|
|
466
|
+
export declare class MementosError extends Error {
|
|
467
|
+
readonly status: number;
|
|
468
|
+
readonly details?: unknown | undefined;
|
|
469
|
+
constructor(message: string, status: number, details?: unknown | undefined);
|
|
470
|
+
}
|
|
471
|
+
export interface AutoMemoryQueueStats {
|
|
472
|
+
pending: number;
|
|
473
|
+
processing: number;
|
|
474
|
+
processed: number;
|
|
475
|
+
failed: number;
|
|
476
|
+
dropped: number;
|
|
477
|
+
}
|
|
478
|
+
export interface AutoMemoryConfig {
|
|
479
|
+
provider: "anthropic" | "openai" | "cerebras" | "grok";
|
|
480
|
+
model?: string;
|
|
481
|
+
enabled: boolean;
|
|
482
|
+
minImportance: number;
|
|
483
|
+
autoEntityLink: boolean;
|
|
484
|
+
fallback?: Array<"anthropic" | "openai" | "cerebras" | "grok">;
|
|
485
|
+
}
|
|
486
|
+
export interface SdkExtractedMemory {
|
|
487
|
+
content: string;
|
|
488
|
+
category: "preference" | "fact" | "knowledge" | "history";
|
|
489
|
+
importance: number;
|
|
490
|
+
tags: string[];
|
|
491
|
+
suggestedScope: "private" | "shared" | "global";
|
|
492
|
+
reasoning?: string;
|
|
493
|
+
}
|
|
494
|
+
export interface SdkHook {
|
|
495
|
+
id: string;
|
|
496
|
+
type: string;
|
|
497
|
+
blocking: boolean;
|
|
498
|
+
priority: number;
|
|
499
|
+
builtin: boolean;
|
|
500
|
+
agentId?: string;
|
|
501
|
+
projectId?: string;
|
|
502
|
+
description?: string;
|
|
503
|
+
}
|
|
504
|
+
export interface SdkWebhook {
|
|
505
|
+
id: string;
|
|
506
|
+
type: string;
|
|
507
|
+
handlerUrl: string;
|
|
508
|
+
priority: number;
|
|
509
|
+
blocking: boolean;
|
|
510
|
+
agentId?: string;
|
|
511
|
+
projectId?: string;
|
|
512
|
+
description?: string;
|
|
513
|
+
enabled: boolean;
|
|
514
|
+
createdAt: string;
|
|
515
|
+
invocationCount: number;
|
|
516
|
+
failureCount: number;
|
|
517
|
+
}
|
|
518
|
+
export interface SynthesisRun {
|
|
519
|
+
id: string;
|
|
520
|
+
triggered_by: string;
|
|
521
|
+
project_id: string | null;
|
|
522
|
+
agent_id: string | null;
|
|
523
|
+
corpus_size: number;
|
|
524
|
+
proposals_generated: number;
|
|
525
|
+
proposals_accepted: number;
|
|
526
|
+
proposals_rejected: number;
|
|
527
|
+
status: "pending" | "running" | "completed" | "failed" | "rolled_back";
|
|
528
|
+
error: string | null;
|
|
529
|
+
started_at: string;
|
|
530
|
+
completed_at: string | null;
|
|
531
|
+
}
|
|
532
|
+
export interface SynthesisResult {
|
|
533
|
+
run: SynthesisRun;
|
|
534
|
+
proposals: unknown[];
|
|
535
|
+
executed: number;
|
|
536
|
+
metrics: {
|
|
537
|
+
corpusReduction: number;
|
|
538
|
+
deduplicationRate: number;
|
|
539
|
+
} | null;
|
|
540
|
+
dryRun: boolean;
|
|
541
|
+
}
|
|
542
|
+
export interface SessionMemoryJob {
|
|
543
|
+
id: string;
|
|
544
|
+
session_id: string;
|
|
545
|
+
agent_id: string | null;
|
|
546
|
+
project_id: string | null;
|
|
547
|
+
source: string;
|
|
548
|
+
status: "pending" | "processing" | "completed" | "failed";
|
|
549
|
+
transcript: string;
|
|
550
|
+
chunk_count: number;
|
|
551
|
+
memories_extracted: number;
|
|
552
|
+
error: string | null;
|
|
553
|
+
metadata: Record<string, unknown>;
|
|
554
|
+
created_at: string;
|
|
555
|
+
started_at: string | null;
|
|
556
|
+
completed_at: string | null;
|
|
557
|
+
}
|
|
558
|
+
export declare class MementosClient {
|
|
559
|
+
private baseUrl;
|
|
560
|
+
private _fetch;
|
|
561
|
+
private apiKey?;
|
|
562
|
+
private prefix;
|
|
563
|
+
constructor(config?: MementosClientConfig);
|
|
564
|
+
static fromEnv(overrides?: Partial<MementosClientConfig>): MementosClient;
|
|
565
|
+
private request;
|
|
566
|
+
private get;
|
|
567
|
+
private post;
|
|
568
|
+
private patch;
|
|
569
|
+
private delete;
|
|
570
|
+
listMemories(filter?: ListMemoriesFilter): Promise<{
|
|
571
|
+
memories: Memory[];
|
|
572
|
+
count: number;
|
|
573
|
+
total?: number;
|
|
574
|
+
has_more?: boolean;
|
|
575
|
+
next_cursor?: number | null;
|
|
576
|
+
}>;
|
|
577
|
+
getStats(): Promise<MemoryStats>;
|
|
578
|
+
getHealth(): Promise<{
|
|
579
|
+
status: "ok" | "warn";
|
|
580
|
+
version: string;
|
|
581
|
+
mode: "local" | "cloud";
|
|
582
|
+
profile: string;
|
|
583
|
+
db_path: string;
|
|
584
|
+
hostname: string;
|
|
585
|
+
memories: {
|
|
586
|
+
total: number;
|
|
587
|
+
/** Rows with status = 'expired' — exactly what `--status expired` returns. */
|
|
588
|
+
expired: number;
|
|
589
|
+
/** Retention backlog: status = 'expired' OR expires_at in the past (drives the warn gate). */
|
|
590
|
+
expired_due: number;
|
|
591
|
+
pinned: number;
|
|
592
|
+
};
|
|
593
|
+
agents: number;
|
|
594
|
+
projects: number;
|
|
595
|
+
}>;
|
|
596
|
+
/** Liveness/readiness probe — verifies backing-store connectivity. */
|
|
597
|
+
getReady(): Promise<{
|
|
598
|
+
status: "ready" | "not_ready";
|
|
599
|
+
version: string;
|
|
600
|
+
mode: "local" | "cloud";
|
|
601
|
+
}>;
|
|
602
|
+
/** Service version + storage mode. */
|
|
603
|
+
getVersion(): Promise<{
|
|
604
|
+
status: "ok";
|
|
605
|
+
version: string;
|
|
606
|
+
mode: "local" | "cloud";
|
|
607
|
+
}>;
|
|
608
|
+
getReport(options?: {
|
|
609
|
+
days?: number;
|
|
610
|
+
project_id?: string;
|
|
611
|
+
agent_id?: string;
|
|
612
|
+
}): Promise<{
|
|
613
|
+
total: number;
|
|
614
|
+
pinned: number;
|
|
615
|
+
days: number;
|
|
616
|
+
recent: {
|
|
617
|
+
total: number;
|
|
618
|
+
activity: {
|
|
619
|
+
date: string;
|
|
620
|
+
memories_created: number;
|
|
621
|
+
}[];
|
|
622
|
+
};
|
|
623
|
+
by_scope: Record<string, number>;
|
|
624
|
+
by_category: Record<string, number>;
|
|
625
|
+
top_memories: {
|
|
626
|
+
id: string;
|
|
627
|
+
key: string;
|
|
628
|
+
value: string;
|
|
629
|
+
importance: number;
|
|
630
|
+
scope: string;
|
|
631
|
+
category: string;
|
|
632
|
+
}[];
|
|
633
|
+
top_agents: {
|
|
634
|
+
agent_id: string;
|
|
635
|
+
c: number;
|
|
636
|
+
}[];
|
|
637
|
+
}>;
|
|
638
|
+
getStaleMemories(options?: {
|
|
639
|
+
days?: number;
|
|
640
|
+
pinned?: boolean;
|
|
641
|
+
project_id?: string;
|
|
642
|
+
agent_id?: string;
|
|
643
|
+
limit?: number;
|
|
644
|
+
offset?: number;
|
|
645
|
+
}): Promise<{
|
|
646
|
+
memories: Memory[];
|
|
647
|
+
count: number;
|
|
648
|
+
days: number;
|
|
649
|
+
total?: number;
|
|
650
|
+
has_more?: boolean;
|
|
651
|
+
next_cursor?: number | null;
|
|
652
|
+
}>;
|
|
653
|
+
getActivity(options?: {
|
|
654
|
+
days?: number;
|
|
655
|
+
scope?: MemoryScope;
|
|
656
|
+
agent_id?: string;
|
|
657
|
+
project_id?: string;
|
|
658
|
+
}): Promise<{
|
|
659
|
+
activity: {
|
|
660
|
+
date: string;
|
|
661
|
+
memories_created: number;
|
|
662
|
+
global_count: number;
|
|
663
|
+
shared_count: number;
|
|
664
|
+
private_count: number;
|
|
665
|
+
avg_importance: number;
|
|
666
|
+
}[];
|
|
667
|
+
days: number;
|
|
668
|
+
total: number;
|
|
669
|
+
}>;
|
|
670
|
+
searchMemories(input: SearchMemoriesInput | string): Promise<{
|
|
671
|
+
results: Memory[];
|
|
672
|
+
count: number;
|
|
673
|
+
}>;
|
|
674
|
+
exportMemories(input?: ExportMemoriesInput): Promise<{
|
|
675
|
+
memories: Memory[];
|
|
676
|
+
count: number;
|
|
677
|
+
}>;
|
|
678
|
+
importMemories(input: ImportMemoriesInput): Promise<{
|
|
679
|
+
imported: number;
|
|
680
|
+
errors: string[];
|
|
681
|
+
total: number;
|
|
682
|
+
}>;
|
|
683
|
+
cleanExpired(): Promise<{
|
|
684
|
+
cleaned: number;
|
|
685
|
+
}>;
|
|
686
|
+
extractFromSession(input: {
|
|
687
|
+
session_id: string;
|
|
688
|
+
title?: string;
|
|
689
|
+
project?: string;
|
|
690
|
+
model?: string;
|
|
691
|
+
messages?: number;
|
|
692
|
+
key_topics?: string[];
|
|
693
|
+
summary?: string;
|
|
694
|
+
agent_id?: string;
|
|
695
|
+
project_id?: string;
|
|
696
|
+
memories?: Partial<CreateMemoryInput>[];
|
|
697
|
+
}): Promise<{
|
|
698
|
+
created: number;
|
|
699
|
+
memory_ids: string[];
|
|
700
|
+
errors: string[];
|
|
701
|
+
session_id: string;
|
|
702
|
+
}>;
|
|
703
|
+
saveMemory(input: CreateMemoryInput): Promise<Memory>;
|
|
704
|
+
getMemory(id: string): Promise<Memory>;
|
|
705
|
+
getMemoryVersions(id: string): Promise<{
|
|
706
|
+
versions: MemoryVersion[];
|
|
707
|
+
count: number;
|
|
708
|
+
current_version: number;
|
|
709
|
+
}>;
|
|
710
|
+
updateMemory(id: string, input: UpdateMemoryInput): Promise<Memory>;
|
|
711
|
+
deleteMemory(id: string): Promise<{
|
|
712
|
+
deleted: boolean;
|
|
713
|
+
}>;
|
|
714
|
+
listAgents(): Promise<{
|
|
715
|
+
agents: Agent[];
|
|
716
|
+
}>;
|
|
717
|
+
registerAgent(input: {
|
|
718
|
+
name: string;
|
|
719
|
+
role?: string;
|
|
720
|
+
description?: string;
|
|
721
|
+
}): Promise<Agent>;
|
|
722
|
+
getAgent(idOrName: string): Promise<Agent>;
|
|
723
|
+
updateAgent(idOrName: string, updates: {
|
|
724
|
+
name?: string;
|
|
725
|
+
role?: string;
|
|
726
|
+
description?: string;
|
|
727
|
+
metadata?: Record<string, unknown>;
|
|
728
|
+
active_project_id?: string | null;
|
|
729
|
+
}): Promise<Agent>;
|
|
730
|
+
listAgentsByProject(projectId: string): Promise<{
|
|
731
|
+
agents: Agent[];
|
|
732
|
+
count: number;
|
|
733
|
+
}>;
|
|
734
|
+
listProjects(): Promise<{
|
|
735
|
+
projects: Project[];
|
|
736
|
+
}>;
|
|
737
|
+
registerProject(input: {
|
|
738
|
+
name: string;
|
|
739
|
+
path?: string;
|
|
740
|
+
description?: string;
|
|
741
|
+
memory_prefix?: string;
|
|
742
|
+
}): Promise<Project>;
|
|
743
|
+
getProject(idOrName: string): Promise<Project>;
|
|
744
|
+
listProjectResources(projectId: string, options?: ListMementosProjectResourcesOptions): Promise<MementosProjectResourcePage>;
|
|
745
|
+
listAllProjectResources(projectId: string, options?: ListAllMementosProjectResourcesOptions): Promise<MementosProjectResourcePage>;
|
|
746
|
+
getProjectResource(projectId: string, resourceKind: MementosProjectResourceKind, stableId: string): Promise<MementosProjectResourceExactResult>;
|
|
747
|
+
updateProject(id: string, request: ProjectGuardedUpdateRequest): Promise<ProjectGuardedUpdateResult>;
|
|
748
|
+
previewProjectUpdate(id: string, request: ProjectGuardedUpdateRequest): Promise<ProjectGuardedUpdateResult>;
|
|
749
|
+
rollbackProjectUpdate(id: string, request: ProjectGuardedRollbackRequest): Promise<ProjectGuardedUpdateResult>;
|
|
750
|
+
getProjectUpdateReceipt(id: string, receiptId: string, identity: ProjectAuthorityIdentity): Promise<ProjectUpdateReceipt>;
|
|
751
|
+
linkMemoryProject(memoryId: string, request: MemoryProjectLinkRequest): Promise<MemoryProjectLinkResult>;
|
|
752
|
+
previewMemoryProjectLink(memoryId: string, request: MemoryProjectLinkRequest): Promise<MemoryProjectLinkResult>;
|
|
753
|
+
rollbackMemoryProjectLink(memoryId: string, request: MemoryProjectLinkRollbackRequest): Promise<MemoryProjectLinkResult>;
|
|
754
|
+
getMemoryProjectLinkReceipt(memoryId: string, receiptId: string, identity: ProjectAuthorityIdentity): Promise<MemoryProjectLinkReceipt>;
|
|
755
|
+
getProjectAgents(idOrName: string): Promise<{
|
|
756
|
+
agents: Agent[];
|
|
757
|
+
count: number;
|
|
758
|
+
}>;
|
|
759
|
+
listEntities(filter?: {
|
|
760
|
+
type?: EntityType;
|
|
761
|
+
limit?: number;
|
|
762
|
+
offset?: number;
|
|
763
|
+
}): Promise<{
|
|
764
|
+
entities: Entity[];
|
|
765
|
+
count: number;
|
|
766
|
+
}>;
|
|
767
|
+
createEntity(input: CreateEntityInput): Promise<Entity>;
|
|
768
|
+
mergeEntities(input: {
|
|
769
|
+
source_id: string;
|
|
770
|
+
target_id: string;
|
|
771
|
+
}): Promise<Entity>;
|
|
772
|
+
getEntity(id: string): Promise<Entity>;
|
|
773
|
+
updateEntity(id: string, input: UpdateEntityInput): Promise<Entity>;
|
|
774
|
+
deleteEntity(id: string): Promise<{
|
|
775
|
+
deleted: boolean;
|
|
776
|
+
}>;
|
|
777
|
+
getEntityMemories(entityId: string): Promise<{
|
|
778
|
+
memories: Memory[];
|
|
779
|
+
count: number;
|
|
780
|
+
}>;
|
|
781
|
+
linkEntityMemory(entityId: string, input: {
|
|
782
|
+
memory_id: string;
|
|
783
|
+
role?: EntityRole;
|
|
784
|
+
}): Promise<{
|
|
785
|
+
linked: boolean;
|
|
786
|
+
}>;
|
|
787
|
+
unlinkEntityMemory(entityId: string, memoryId: string): Promise<{
|
|
788
|
+
unlinked: boolean;
|
|
789
|
+
}>;
|
|
790
|
+
getEntityRelations(entityId: string, filter?: {
|
|
791
|
+
relation_type?: RelationType;
|
|
792
|
+
direction?: "from" | "to" | "both";
|
|
793
|
+
}): Promise<{
|
|
794
|
+
relations: Relation[];
|
|
795
|
+
}>;
|
|
796
|
+
createRelation(input: CreateRelationInput): Promise<Relation>;
|
|
797
|
+
getRelation(id: string): Promise<Relation>;
|
|
798
|
+
deleteRelation(id: string): Promise<{
|
|
799
|
+
deleted: boolean;
|
|
800
|
+
}>;
|
|
801
|
+
getGraph(entityId: string, options?: {
|
|
802
|
+
depth?: number;
|
|
803
|
+
relation_types?: RelationType[];
|
|
804
|
+
}): Promise<{
|
|
805
|
+
nodes: Entity[];
|
|
806
|
+
edges: Relation[];
|
|
807
|
+
}>;
|
|
808
|
+
findPath(fromId: string, toId: string): Promise<{
|
|
809
|
+
path: Entity[];
|
|
810
|
+
found: boolean;
|
|
811
|
+
}>;
|
|
812
|
+
getGraphStats(): Promise<{
|
|
813
|
+
entity_count: number;
|
|
814
|
+
relation_count: number;
|
|
815
|
+
by_type: Record<string, number>;
|
|
816
|
+
}>;
|
|
817
|
+
acquireLock(input: AcquireLockInput): Promise<ResourceLock | null>;
|
|
818
|
+
checkLock(resourceType: ResourceType, resourceId: string, lockType?: LockType): Promise<ResourceLock[]>;
|
|
819
|
+
releaseLock(lockId: string, agentId: string): Promise<{
|
|
820
|
+
released: boolean;
|
|
821
|
+
}>;
|
|
822
|
+
listAgentLocks(agentId: string): Promise<ResourceLock[]>;
|
|
823
|
+
releaseAllAgentLocks(agentId: string): Promise<{
|
|
824
|
+
released: number;
|
|
825
|
+
}>;
|
|
826
|
+
cleanExpiredLocks(): Promise<{
|
|
827
|
+
cleaned: number;
|
|
828
|
+
}>;
|
|
829
|
+
/** Create a task. */
|
|
830
|
+
createTask(input: CreateTaskInput): Promise<Task>;
|
|
831
|
+
/** List tasks with optional filters. */
|
|
832
|
+
listTasks(filter?: ListTasksFilter): Promise<{
|
|
833
|
+
tasks: Task[];
|
|
834
|
+
count: number;
|
|
835
|
+
}>;
|
|
836
|
+
/** Get task stats (by status, priority, overdue). */
|
|
837
|
+
getTaskStats(options?: {
|
|
838
|
+
project_id?: string;
|
|
839
|
+
agent_id?: string;
|
|
840
|
+
}): Promise<TaskStats>;
|
|
841
|
+
/** Get a task by ID. */
|
|
842
|
+
getTask(id: string): Promise<Task>;
|
|
843
|
+
/** Update a task. */
|
|
844
|
+
updateTask(id: string, input: UpdateTaskInput): Promise<Task>;
|
|
845
|
+
/** Delete a task. */
|
|
846
|
+
deleteTask(id: string): Promise<{
|
|
847
|
+
deleted: boolean;
|
|
848
|
+
}>;
|
|
849
|
+
/** List comments on a task. */
|
|
850
|
+
listTaskComments(taskId: string): Promise<{
|
|
851
|
+
comments: TaskComment[];
|
|
852
|
+
count: number;
|
|
853
|
+
}>;
|
|
854
|
+
/** Add a comment to a task. */
|
|
855
|
+
addTaskComment(taskId: string, body: string, agentId?: string): Promise<TaskComment>;
|
|
856
|
+
/** Delete a task comment. */
|
|
857
|
+
deleteTaskComment(taskId: string, commentId: string): Promise<{
|
|
858
|
+
deleted: boolean;
|
|
859
|
+
}>;
|
|
860
|
+
getContext(options?: {
|
|
861
|
+
agent_id?: string;
|
|
862
|
+
project_id?: string;
|
|
863
|
+
max_tokens?: number;
|
|
864
|
+
format?: "xml" | "markdown" | "compact" | "json";
|
|
865
|
+
}): Promise<{
|
|
866
|
+
context: string;
|
|
867
|
+
memories_count: number;
|
|
868
|
+
}>;
|
|
869
|
+
processConversationTurn(turn: string, context?: {
|
|
870
|
+
agent_id?: string;
|
|
871
|
+
project_id?: string;
|
|
872
|
+
session_id?: string;
|
|
873
|
+
}): Promise<{
|
|
874
|
+
queued: boolean;
|
|
875
|
+
queue: AutoMemoryQueueStats;
|
|
876
|
+
}>;
|
|
877
|
+
getAutoMemoryStatus(): Promise<{
|
|
878
|
+
queue: AutoMemoryQueueStats;
|
|
879
|
+
config: AutoMemoryConfig;
|
|
880
|
+
providers: Record<string, {
|
|
881
|
+
available: boolean;
|
|
882
|
+
model: string;
|
|
883
|
+
}>;
|
|
884
|
+
}>;
|
|
885
|
+
configureAutoMemory(config: Partial<AutoMemoryConfig> & {
|
|
886
|
+
min_importance?: number;
|
|
887
|
+
auto_entity_link?: boolean;
|
|
888
|
+
}): Promise<{
|
|
889
|
+
updated: boolean;
|
|
890
|
+
config: AutoMemoryConfig;
|
|
891
|
+
}>;
|
|
892
|
+
testExtraction(turn: string, options?: {
|
|
893
|
+
provider?: "anthropic" | "openai" | "cerebras" | "grok";
|
|
894
|
+
agent_id?: string;
|
|
895
|
+
project_id?: string;
|
|
896
|
+
}): Promise<{
|
|
897
|
+
provider: string;
|
|
898
|
+
model: string;
|
|
899
|
+
extracted: SdkExtractedMemory[];
|
|
900
|
+
count: number;
|
|
901
|
+
note: string;
|
|
902
|
+
}>;
|
|
903
|
+
listHooks(type?: string): Promise<SdkHook[]>;
|
|
904
|
+
getHookStats(): Promise<{
|
|
905
|
+
total: number;
|
|
906
|
+
byType: Record<string, number>;
|
|
907
|
+
blocking: number;
|
|
908
|
+
nonBlocking: number;
|
|
909
|
+
}>;
|
|
910
|
+
listWebhooks(filter?: {
|
|
911
|
+
type?: string;
|
|
912
|
+
enabled?: boolean;
|
|
913
|
+
}): Promise<SdkWebhook[]>;
|
|
914
|
+
createWebhook(input: {
|
|
915
|
+
type: string;
|
|
916
|
+
handler_url: string;
|
|
917
|
+
priority?: number;
|
|
918
|
+
blocking?: boolean;
|
|
919
|
+
agent_id?: string;
|
|
920
|
+
project_id?: string;
|
|
921
|
+
description?: string;
|
|
922
|
+
}): Promise<SdkWebhook>;
|
|
923
|
+
getWebhook(id: string): Promise<SdkWebhook>;
|
|
924
|
+
updateWebhook(id: string, updates: {
|
|
925
|
+
enabled?: boolean;
|
|
926
|
+
priority?: number;
|
|
927
|
+
description?: string;
|
|
928
|
+
}): Promise<SdkWebhook>;
|
|
929
|
+
deleteWebhook(id: string): Promise<void>;
|
|
930
|
+
enableWebhook(id: string): Promise<SdkWebhook>;
|
|
931
|
+
disableWebhook(id: string): Promise<SdkWebhook>;
|
|
932
|
+
runSynthesis(options?: {
|
|
933
|
+
project_id?: string;
|
|
934
|
+
agent_id?: string;
|
|
935
|
+
dry_run?: boolean;
|
|
936
|
+
max_proposals?: number;
|
|
937
|
+
provider?: string;
|
|
938
|
+
}): Promise<SynthesisResult>;
|
|
939
|
+
listSynthesisRuns(filter?: {
|
|
940
|
+
project_id?: string;
|
|
941
|
+
limit?: number;
|
|
942
|
+
}): Promise<{
|
|
943
|
+
runs: SynthesisRun[];
|
|
944
|
+
count: number;
|
|
945
|
+
}>;
|
|
946
|
+
getSynthesisStatus(options?: {
|
|
947
|
+
project_id?: string;
|
|
948
|
+
run_id?: string;
|
|
949
|
+
}): Promise<{
|
|
950
|
+
lastRun: SynthesisRun | null;
|
|
951
|
+
recentRuns: SynthesisRun[];
|
|
952
|
+
}>;
|
|
953
|
+
rollbackSynthesis(runId: string): Promise<{
|
|
954
|
+
rolled_back: number;
|
|
955
|
+
errors: string[];
|
|
956
|
+
}>;
|
|
957
|
+
ingestSession(input: {
|
|
958
|
+
transcript: string;
|
|
959
|
+
session_id: string;
|
|
960
|
+
agent_id?: string;
|
|
961
|
+
project_id?: string;
|
|
962
|
+
source?: "claude-code" | "codex" | "manual" | "open-sessions";
|
|
963
|
+
metadata?: Record<string, unknown>;
|
|
964
|
+
}): Promise<{
|
|
965
|
+
job_id: string;
|
|
966
|
+
status: string;
|
|
967
|
+
message: string;
|
|
968
|
+
}>;
|
|
969
|
+
getSessionJob(jobId: string): Promise<SessionMemoryJob>;
|
|
970
|
+
listSessionJobs(filter?: {
|
|
971
|
+
agent_id?: string;
|
|
972
|
+
project_id?: string;
|
|
973
|
+
status?: string;
|
|
974
|
+
limit?: number;
|
|
975
|
+
}): Promise<{
|
|
976
|
+
jobs: SessionMemoryJob[];
|
|
977
|
+
count: number;
|
|
978
|
+
}>;
|
|
979
|
+
getSessionQueueStats(): Promise<{
|
|
980
|
+
pending: number;
|
|
981
|
+
processing: number;
|
|
982
|
+
completed: number;
|
|
983
|
+
failed: number;
|
|
984
|
+
}>;
|
|
985
|
+
}
|
|
986
|
+
export default MementosClient;
|
|
987
|
+
//# sourceMappingURL=index.d.ts.map
|