@hasna/mementos 0.14.84 → 0.14.86
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 +63 -4
- package/dist/cli/index.js +769 -261
- package/dist/diagnostics/historical-project-registration-receipt.js +1675 -0
- package/dist/index.js +343 -85
- package/dist/mcp/index.js +419 -99
- package/dist/pg-sync-worker.js +7 -5
- package/dist/project-registration.js +309 -68
- package/dist/sdk/index.js +123 -30
- package/dist/server/index.js +677 -317
- package/dist/storage.js +63 -26
- package/hasna.contract.json +5 -4
- package/package.json +6 -4
- package/dist/cli/__fixtures__/clean-fallback-stub-server.d.ts +0 -2
- package/dist/cli/__fixtures__/clean-fallback-stub-server.d.ts.map +0 -1
- package/dist/cli/brains.d.ts +0 -3
- package/dist/cli/brains.d.ts.map +0 -1
- package/dist/cli/commands/agent.d.ts +0 -3
- package/dist/cli/commands/agent.d.ts.map +0 -1
- package/dist/cli/commands/consolidation.d.ts +0 -3
- package/dist/cli/commands/consolidation.d.ts.map +0 -1
- package/dist/cli/commands/entity.d.ts +0 -3
- package/dist/cli/commands/entity.d.ts.map +0 -1
- package/dist/cli/commands/graph.d.ts +0 -3
- package/dist/cli/commands/graph.d.ts.map +0 -1
- package/dist/cli/commands/info-context.d.ts +0 -3
- package/dist/cli/commands/info-context.d.ts.map +0 -1
- package/dist/cli/commands/info-history.d.ts +0 -3
- package/dist/cli/commands/info-history.d.ts.map +0 -1
- package/dist/cli/commands/info-report.d.ts +0 -3
- package/dist/cli/commands/info-report.d.ts.map +0 -1
- package/dist/cli/commands/info-stale.d.ts +0 -3
- package/dist/cli/commands/info-stale.d.ts.map +0 -1
- package/dist/cli/commands/info-stats.d.ts +0 -3
- package/dist/cli/commands/info-stats.d.ts.map +0 -1
- package/dist/cli/commands/info.d.ts +0 -12
- package/dist/cli/commands/info.d.ts.map +0 -1
- package/dist/cli/commands/init.d.ts +0 -3
- package/dist/cli/commands/init.d.ts.map +0 -1
- package/dist/cli/commands/io-backup.d.ts +0 -3
- package/dist/cli/commands/io-backup.d.ts.map +0 -1
- package/dist/cli/commands/io-clean.d.ts +0 -3
- package/dist/cli/commands/io-clean.d.ts.map +0 -1
- package/dist/cli/commands/io-export.d.ts +0 -3
- package/dist/cli/commands/io-export.d.ts.map +0 -1
- package/dist/cli/commands/io-import.d.ts +0 -3
- package/dist/cli/commands/io-import.d.ts.map +0 -1
- package/dist/cli/commands/io-restore.d.ts +0 -3
- package/dist/cli/commands/io-restore.d.ts.map +0 -1
- package/dist/cli/commands/io.d.ts +0 -12
- package/dist/cli/commands/io.d.ts.map +0 -1
- package/dist/cli/commands/memory-cmd-bulk.d.ts +0 -3
- package/dist/cli/commands/memory-cmd-bulk.d.ts.map +0 -1
- package/dist/cli/commands/memory-cmd-chain.d.ts +0 -3
- package/dist/cli/commands/memory-cmd-chain.d.ts.map +0 -1
- package/dist/cli/commands/memory-cmd-crud.d.ts +0 -3
- package/dist/cli/commands/memory-cmd-crud.d.ts.map +0 -1
- package/dist/cli/commands/memory-cmd-diff.d.ts +0 -3
- package/dist/cli/commands/memory-cmd-diff.d.ts.map +0 -1
- package/dist/cli/commands/memory-cmd-list.d.ts +0 -3
- package/dist/cli/commands/memory-cmd-list.d.ts.map +0 -1
- package/dist/cli/commands/memory-cmd-recall-exit.d.ts +0 -3
- package/dist/cli/commands/memory-cmd-recall-exit.d.ts.map +0 -1
- package/dist/cli/commands/memory-cmd-recall.d.ts +0 -3
- package/dist/cli/commands/memory-cmd-recall.d.ts.map +0 -1
- package/dist/cli/commands/memory-cmd-remove.d.ts +0 -3
- package/dist/cli/commands/memory-cmd-remove.d.ts.map +0 -1
- package/dist/cli/commands/memory-cmd-search.d.ts +0 -3
- package/dist/cli/commands/memory-cmd-search.d.ts.map +0 -1
- package/dist/cli/commands/memory-cmd-tail.d.ts +0 -3
- package/dist/cli/commands/memory-cmd-tail.d.ts.map +0 -1
- package/dist/cli/commands/memory-cmd-util.d.ts +0 -3
- package/dist/cli/commands/memory-cmd-util.d.ts.map +0 -1
- package/dist/cli/commands/memory-cmd-view.d.ts +0 -3
- package/dist/cli/commands/memory-cmd-view.d.ts.map +0 -1
- package/dist/cli/commands/memory-cmd-watch.d.ts +0 -3
- package/dist/cli/commands/memory-cmd-watch.d.ts.map +0 -1
- package/dist/cli/commands/memory-cmd-when-to-use.d.ts +0 -3
- package/dist/cli/commands/memory-cmd-when-to-use.d.ts.map +0 -1
- package/dist/cli/commands/memory.d.ts +0 -3
- package/dist/cli/commands/memory.d.ts.map +0 -1
- package/dist/cli/commands/project-panel.d.ts +0 -3
- package/dist/cli/commands/project-panel.d.ts.map +0 -1
- package/dist/cli/commands/project.d.ts +0 -3
- package/dist/cli/commands/project.d.ts.map +0 -1
- package/dist/cli/commands/relation.d.ts +0 -3
- package/dist/cli/commands/relation.d.ts.map +0 -1
- package/dist/cli/commands/storage.d.ts +0 -3
- package/dist/cli/commands/storage.d.ts.map +0 -1
- package/dist/cli/commands/system-auto-memory.d.ts +0 -3
- package/dist/cli/commands/system-auto-memory.d.ts.map +0 -1
- package/dist/cli/commands/system-completions.d.ts +0 -13
- package/dist/cli/commands/system-completions.d.ts.map +0 -1
- package/dist/cli/commands/system-config.d.ts +0 -3
- package/dist/cli/commands/system-config.d.ts.map +0 -1
- package/dist/cli/commands/system-doctor.d.ts +0 -3
- package/dist/cli/commands/system-doctor.d.ts.map +0 -1
- package/dist/cli/commands/system-hooks.d.ts +0 -3
- package/dist/cli/commands/system-hooks.d.ts.map +0 -1
- package/dist/cli/commands/system-mcp.d.ts +0 -3
- package/dist/cli/commands/system-mcp.d.ts.map +0 -1
- package/dist/cli/commands/system-misc.d.ts +0 -3
- package/dist/cli/commands/system-misc.d.ts.map +0 -1
- package/dist/cli/commands/system-profile.d.ts +0 -3
- package/dist/cli/commands/system-profile.d.ts.map +0 -1
- package/dist/cli/commands/system-session.d.ts +0 -3
- package/dist/cli/commands/system-session.d.ts.map +0 -1
- package/dist/cli/commands/system-sessions.d.ts +0 -3
- package/dist/cli/commands/system-sessions.d.ts.map +0 -1
- package/dist/cli/commands/system-synthesis.d.ts +0 -3
- package/dist/cli/commands/system-synthesis.d.ts.map +0 -1
- package/dist/cli/commands/system-synthesized-profile.d.ts +0 -3
- package/dist/cli/commands/system-synthesized-profile.d.ts.map +0 -1
- package/dist/cli/commands/system-tools.d.ts +0 -3
- package/dist/cli/commands/system-tools.d.ts.map +0 -1
- package/dist/cli/commands/system-watch.d.ts +0 -3
- package/dist/cli/commands/system-watch.d.ts.map +0 -1
- package/dist/cli/commands/system.d.ts +0 -3
- package/dist/cli/commands/system.d.ts.map +0 -1
- package/dist/cli/exit-codes.d.ts +0 -13
- package/dist/cli/exit-codes.d.ts.map +0 -1
- package/dist/cli/global-options.d.ts +0 -27
- package/dist/cli/global-options.d.ts.map +0 -1
- package/dist/cli/helpers.d.ts +0 -119
- package/dist/cli/helpers.d.ts.map +0 -1
- package/dist/cli/index.d.ts +0 -3
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/register-all.d.ts +0 -17
- package/dist/cli/register-all.d.ts.map +0 -1
- package/dist/cli/startup-side-effects.d.ts +0 -9
- package/dist/cli/startup-side-effects.d.ts.map +0 -1
- package/dist/db/__fixtures__/fail-closed-stub-server.d.ts +0 -2
- package/dist/db/__fixtures__/fail-closed-stub-server.d.ts.map +0 -1
- package/dist/db/acl.d.ts +0 -34
- package/dist/db/acl.d.ts.map +0 -1
- package/dist/db/agents.d.ts +0 -21
- package/dist/db/agents.d.ts.map +0 -1
- package/dist/db/analytics.d.ts +0 -107
- package/dist/db/analytics.d.ts.map +0 -1
- package/dist/db/api-mode.d.ts +0 -127
- package/dist/db/api-mode.d.ts.map +0 -1
- package/dist/db/audit.d.ts +0 -53
- package/dist/db/audit.d.ts.map +0 -1
- package/dist/db/database.d.ts +0 -26
- package/dist/db/database.d.ts.map +0 -1
- package/dist/db/entities.d.ts +0 -62
- package/dist/db/entities.d.ts.map +0 -1
- package/dist/db/entity-memories.d.ts +0 -34
- package/dist/db/entity-memories.d.ts.map +0 -1
- package/dist/db/feedback.d.ts +0 -9
- package/dist/db/feedback.d.ts.map +0 -1
- package/dist/db/locks.d.ts +0 -63
- package/dist/db/locks.d.ts.map +0 -1
- package/dist/db/machines.d.ts +0 -23
- package/dist/db/machines.d.ts.map +0 -1
- package/dist/db/memories.d.ts +0 -137
- package/dist/db/memories.d.ts.map +0 -1
- package/dist/db/memory-links.d.ts +0 -21
- package/dist/db/memory-links.d.ts.map +0 -1
- package/dist/db/memory-project-link.d.ts +0 -13
- package/dist/db/memory-project-link.d.ts.map +0 -1
- package/dist/db/migrations.d.ts +0 -3
- package/dist/db/migrations.d.ts.map +0 -1
- package/dist/db/pg-migrate.d.ts +0 -27
- package/dist/db/pg-migrate.d.ts.map +0 -1
- package/dist/db/pg-migrations.d.ts +0 -2
- package/dist/db/pg-migrations.d.ts.map +0 -1
- package/dist/db/projects.d.ts +0 -27
- package/dist/db/projects.d.ts.map +0 -1
- package/dist/db/ratings.d.ts +0 -23
- package/dist/db/ratings.d.ts.map +0 -1
- package/dist/db/relations.d.ts +0 -49
- package/dist/db/relations.d.ts.map +0 -1
- package/dist/db/session-jobs.d.ts +0 -49
- package/dist/db/session-jobs.d.ts.map +0 -1
- package/dist/db/store-backend.d.ts +0 -42
- package/dist/db/store-backend.d.ts.map +0 -1
- package/dist/db/subscriptions.d.ts +0 -24
- package/dist/db/subscriptions.d.ts.map +0 -1
- package/dist/db/synthesis.d.ts +0 -101
- package/dist/db/synthesis.d.ts.map +0 -1
- package/dist/db/tasks.d.ts +0 -89
- package/dist/db/tasks.d.ts.map +0 -1
- package/dist/db/tool-events.d.ts +0 -27
- package/dist/db/tool-events.d.ts.map +0 -1
- package/dist/db/webhook_hooks.d.ts +0 -25
- package/dist/db/webhook_hooks.d.ts.map +0 -1
- package/dist/generated/storage-kit/backend.d.ts +0 -20
- package/dist/generated/storage-kit/backend.d.ts.map +0 -1
- package/dist/generated/storage-kit/health.d.ts +0 -20
- package/dist/generated/storage-kit/health.d.ts.map +0 -1
- package/dist/generated/storage-kit/index.d.ts +0 -8
- package/dist/generated/storage-kit/index.d.ts.map +0 -1
- package/dist/generated/storage-kit/migrations.d.ts +0 -48
- package/dist/generated/storage-kit/migrations.d.ts.map +0 -1
- package/dist/generated/storage-kit/own.d.ts +0 -11
- package/dist/generated/storage-kit/own.d.ts.map +0 -1
- package/dist/generated/storage-kit/pool.d.ts +0 -35
- package/dist/generated/storage-kit/pool.d.ts.map +0 -1
- package/dist/generated/storage-kit/query.d.ts +0 -36
- package/dist/generated/storage-kit/query.d.ts.map +0 -1
- package/dist/generated/storage-kit/tls.d.ts +0 -53
- package/dist/generated/storage-kit/tls.d.ts.map +0 -1
- package/dist/index.d.ts +0 -45
- package/dist/index.d.ts.map +0 -1
- package/dist/lib/activation-matcher.d.ts +0 -17
- package/dist/lib/activation-matcher.d.ts.map +0 -1
- package/dist/lib/asmr/categorizer.d.ts +0 -31
- package/dist/lib/asmr/categorizer.d.ts.map +0 -1
- package/dist/lib/asmr/context-agent.d.ts +0 -4
- package/dist/lib/asmr/context-agent.d.ts.map +0 -1
- package/dist/lib/asmr/ensemble.d.ts +0 -23
- package/dist/lib/asmr/ensemble.d.ts.map +0 -1
- package/dist/lib/asmr/fact-agent.d.ts +0 -4
- package/dist/lib/asmr/fact-agent.d.ts.map +0 -1
- package/dist/lib/asmr/index.d.ts +0 -7
- package/dist/lib/asmr/index.d.ts.map +0 -1
- package/dist/lib/asmr/orchestrator.d.ts +0 -4
- package/dist/lib/asmr/orchestrator.d.ts.map +0 -1
- package/dist/lib/asmr/recall.d.ts +0 -3
- package/dist/lib/asmr/recall.d.ts.map +0 -1
- package/dist/lib/asmr/temporal-agent.d.ts +0 -4
- package/dist/lib/asmr/temporal-agent.d.ts.map +0 -1
- package/dist/lib/asmr/types.d.ts +0 -27
- package/dist/lib/asmr/types.d.ts.map +0 -1
- package/dist/lib/auto-inject-orchestrator.d.ts +0 -57
- package/dist/lib/auto-inject-orchestrator.d.ts.map +0 -1
- package/dist/lib/auto-memory-queue.d.ts +0 -48
- package/dist/lib/auto-memory-queue.d.ts.map +0 -1
- package/dist/lib/auto-memory.d.ts +0 -19
- package/dist/lib/auto-memory.d.ts.map +0 -1
- package/dist/lib/bench.d.ts +0 -20
- package/dist/lib/bench.d.ts.map +0 -1
- package/dist/lib/built-in-hooks.d.ts +0 -12
- package/dist/lib/built-in-hooks.d.ts.map +0 -1
- package/dist/lib/channel-pusher.d.ts +0 -39
- package/dist/lib/channel-pusher.d.ts.map +0 -1
- package/dist/lib/config.d.ts +0 -9
- package/dist/lib/config.d.ts.map +0 -1
- package/dist/lib/connectors/files.d.ts +0 -8
- package/dist/lib/connectors/files.d.ts.map +0 -1
- package/dist/lib/connectors/github.d.ts +0 -7
- package/dist/lib/connectors/github.d.ts.map +0 -1
- package/dist/lib/connectors/index.d.ts +0 -12
- package/dist/lib/connectors/index.d.ts.map +0 -1
- package/dist/lib/connectors/notion.d.ts +0 -7
- package/dist/lib/connectors/notion.d.ts.map +0 -1
- package/dist/lib/connectors/types.d.ts +0 -27
- package/dist/lib/connectors/types.d.ts.map +0 -1
- package/dist/lib/consolidation.d.ts +0 -52
- package/dist/lib/consolidation.d.ts.map +0 -1
- package/dist/lib/context-extractor.d.ts +0 -14
- package/dist/lib/context-extractor.d.ts.map +0 -1
- package/dist/lib/context.d.ts +0 -36
- package/dist/lib/context.d.ts.map +0 -1
- package/dist/lib/contradiction.d.ts +0 -50
- package/dist/lib/contradiction.d.ts.map +0 -1
- package/dist/lib/decay.d.ts +0 -35
- package/dist/lib/decay.d.ts.map +0 -1
- package/dist/lib/dedup.d.ts +0 -33
- package/dist/lib/dedup.d.ts.map +0 -1
- package/dist/lib/duration.d.ts +0 -28
- package/dist/lib/duration.d.ts.map +0 -1
- package/dist/lib/embeddings.d.ts +0 -20
- package/dist/lib/embeddings.d.ts.map +0 -1
- package/dist/lib/enum-validation.d.ts +0 -20
- package/dist/lib/enum-validation.d.ts.map +0 -1
- package/dist/lib/export-v1.d.ts +0 -30
- package/dist/lib/export-v1.d.ts.map +0 -1
- package/dist/lib/extractor.d.ts +0 -9
- package/dist/lib/extractor.d.ts.map +0 -1
- package/dist/lib/extractors/audio.d.ts +0 -8
- package/dist/lib/extractors/audio.d.ts.map +0 -1
- package/dist/lib/extractors/index.d.ts +0 -12
- package/dist/lib/extractors/index.d.ts.map +0 -1
- package/dist/lib/extractors/ocr.d.ts +0 -7
- package/dist/lib/extractors/ocr.d.ts.map +0 -1
- package/dist/lib/extractors/pdf.d.ts +0 -7
- package/dist/lib/extractors/pdf.d.ts.map +0 -1
- package/dist/lib/extractors/types.d.ts +0 -12
- package/dist/lib/extractors/types.d.ts.map +0 -1
- package/dist/lib/file-deps.d.ts +0 -27
- package/dist/lib/file-deps.d.ts.map +0 -1
- package/dist/lib/focus.d.ts +0 -58
- package/dist/lib/focus.d.ts.map +0 -1
- package/dist/lib/gatherer.d.ts +0 -16
- package/dist/lib/gatherer.d.ts.map +0 -1
- package/dist/lib/gdpr.d.ts +0 -39
- package/dist/lib/gdpr.d.ts.map +0 -1
- package/dist/lib/hooks.d.ts +0 -50
- package/dist/lib/hooks.d.ts.map +0 -1
- package/dist/lib/importers/index.d.ts +0 -38
- package/dist/lib/importers/index.d.ts.map +0 -1
- package/dist/lib/injector.d.ts +0 -89
- package/dist/lib/injector.d.ts.map +0 -1
- package/dist/lib/machine-visibility.d.ts +0 -6
- package/dist/lib/machine-visibility.d.ts.map +0 -1
- package/dist/lib/matryoshka.d.ts +0 -50
- package/dist/lib/matryoshka.d.ts.map +0 -1
- package/dist/lib/memory-lock.d.ts +0 -58
- package/dist/lib/memory-lock.d.ts.map +0 -1
- package/dist/lib/model-config.d.ts +0 -14
- package/dist/lib/model-config.d.ts.map +0 -1
- package/dist/lib/open-sessions-connector.d.ts +0 -60
- package/dist/lib/open-sessions-connector.d.ts.map +0 -1
- package/dist/lib/package-version.d.ts +0 -3
- package/dist/lib/package-version.d.ts.map +0 -1
- package/dist/lib/poisoning.d.ts +0 -19
- package/dist/lib/poisoning.d.ts.map +0 -1
- package/dist/lib/poll.d.ts +0 -17
- package/dist/lib/poll.d.ts.map +0 -1
- package/dist/lib/procedural-extractor.d.ts +0 -21
- package/dist/lib/procedural-extractor.d.ts.map +0 -1
- package/dist/lib/profile-sync.d.ts +0 -20
- package/dist/lib/profile-sync.d.ts.map +0 -1
- package/dist/lib/profile-synthesizer.d.ts +0 -20
- package/dist/lib/profile-synthesizer.d.ts.map +0 -1
- package/dist/lib/project-detect.d.ts +0 -18
- package/dist/lib/project-detect.d.ts.map +0 -1
- package/dist/lib/project-panel.d.ts +0 -7
- package/dist/lib/project-panel.d.ts.map +0 -1
- package/dist/lib/providers/anthropic.d.ts +0 -21
- package/dist/lib/providers/anthropic.d.ts.map +0 -1
- package/dist/lib/providers/base.d.ts +0 -96
- package/dist/lib/providers/base.d.ts.map +0 -1
- package/dist/lib/providers/cerebras.d.ts +0 -20
- package/dist/lib/providers/cerebras.d.ts.map +0 -1
- package/dist/lib/providers/grok.d.ts +0 -19
- package/dist/lib/providers/grok.d.ts.map +0 -1
- package/dist/lib/providers/index.d.ts +0 -7
- package/dist/lib/providers/index.d.ts.map +0 -1
- package/dist/lib/providers/openai-compat.d.ts +0 -18
- package/dist/lib/providers/openai-compat.d.ts.map +0 -1
- package/dist/lib/providers/openai.d.ts +0 -20
- package/dist/lib/providers/openai.d.ts.map +0 -1
- package/dist/lib/providers/registry.d.ts +0 -38
- package/dist/lib/providers/registry.d.ts.map +0 -1
- package/dist/lib/quality.d.ts +0 -16
- package/dist/lib/quality.d.ts.map +0 -1
- package/dist/lib/redact.d.ts +0 -10
- package/dist/lib/redact.d.ts.map +0 -1
- package/dist/lib/reflection.d.ts +0 -83
- package/dist/lib/reflection.d.ts.map +0 -1
- package/dist/lib/retention.d.ts +0 -17
- package/dist/lib/retention.d.ts.map +0 -1
- package/dist/lib/retired-storage-mode.d.ts +0 -11
- package/dist/lib/retired-storage-mode.d.ts.map +0 -1
- package/dist/lib/search.d.ts +0 -52
- package/dist/lib/search.d.ts.map +0 -1
- package/dist/lib/session-auto-resolve.d.ts +0 -28
- package/dist/lib/session-auto-resolve.d.ts.map +0 -1
- package/dist/lib/session-processor.d.ts +0 -38
- package/dist/lib/session-processor.d.ts.map +0 -1
- package/dist/lib/session-queue.d.ts +0 -28
- package/dist/lib/session-queue.d.ts.map +0 -1
- package/dist/lib/session-registry.d.ts +0 -47
- package/dist/lib/session-registry.d.ts.map +0 -1
- package/dist/lib/session-start-briefing.d.ts +0 -10
- package/dist/lib/session-start-briefing.d.ts.map +0 -1
- package/dist/lib/session-watcher.d.ts +0 -30
- package/dist/lib/session-watcher.d.ts.map +0 -1
- package/dist/lib/storage-sync.d.ts +0 -45
- package/dist/lib/storage-sync.d.ts.map +0 -1
- package/dist/lib/sync.d.ts +0 -10
- package/dist/lib/sync.d.ts.map +0 -1
- package/dist/lib/synthesis/corpus-builder.d.ts +0 -30
- package/dist/lib/synthesis/corpus-builder.d.ts.map +0 -1
- package/dist/lib/synthesis/executor.d.ts +0 -14
- package/dist/lib/synthesis/executor.d.ts.map +0 -1
- package/dist/lib/synthesis/index.d.ts +0 -37
- package/dist/lib/synthesis/index.d.ts.map +0 -1
- package/dist/lib/synthesis/llm-analyzer.d.ts +0 -18
- package/dist/lib/synthesis/llm-analyzer.d.ts.map +0 -1
- package/dist/lib/synthesis/metrics.d.ts +0 -13
- package/dist/lib/synthesis/metrics.d.ts.map +0 -1
- package/dist/lib/synthesis/scheduler.d.ts +0 -18
- package/dist/lib/synthesis/scheduler.d.ts.map +0 -1
- package/dist/lib/synthesis/validator.d.ts +0 -19
- package/dist/lib/synthesis/validator.d.ts.map +0 -1
- package/dist/lib/task-runner.d.ts +0 -37
- package/dist/lib/task-runner.d.ts.map +0 -1
- package/dist/lib/tool-lesson-extractor.d.ts +0 -24
- package/dist/lib/tool-lesson-extractor.d.ts.map +0 -1
- package/dist/lib/tool-memory-synthesizer.d.ts +0 -28
- package/dist/lib/tool-memory-synthesizer.d.ts.map +0 -1
- package/dist/lib/topic-clusterer.d.ts +0 -21
- package/dist/lib/topic-clusterer.d.ts.map +0 -1
- package/dist/lib/when-to-use-generator.d.ts +0 -22
- package/dist/lib/when-to-use-generator.d.ts.map +0 -1
- package/dist/mcp/http.d.ts +0 -17
- package/dist/mcp/http.d.ts.map +0 -1
- package/dist/mcp/index.d.ts +0 -6
- package/dist/mcp/index.d.ts.map +0 -1
- package/dist/mcp/memory-broadcast.d.ts +0 -12
- package/dist/mcp/memory-broadcast.d.ts.map +0 -1
- package/dist/mcp/tools/agent-tools.d.ts +0 -3
- package/dist/mcp/tools/agent-tools.d.ts.map +0 -1
- package/dist/mcp/tools/auto-memory-tools.d.ts +0 -5
- package/dist/mcp/tools/auto-memory-tools.d.ts.map +0 -1
- package/dist/mcp/tools/bulk-tools.d.ts +0 -3
- package/dist/mcp/tools/bulk-tools.d.ts.map +0 -1
- package/dist/mcp/tools/consolidation-tools.d.ts +0 -3
- package/dist/mcp/tools/consolidation-tools.d.ts.map +0 -1
- package/dist/mcp/tools/focus-tools.d.ts +0 -3
- package/dist/mcp/tools/focus-tools.d.ts.map +0 -1
- package/dist/mcp/tools/graph-entity-tools.d.ts +0 -3
- package/dist/mcp/tools/graph-entity-tools.d.ts.map +0 -1
- package/dist/mcp/tools/graph-query-tools.d.ts +0 -3
- package/dist/mcp/tools/graph-query-tools.d.ts.map +0 -1
- package/dist/mcp/tools/graph-relation-tools.d.ts +0 -3
- package/dist/mcp/tools/graph-relation-tools.d.ts.map +0 -1
- package/dist/mcp/tools/graph-tools.d.ts +0 -3
- package/dist/mcp/tools/graph-tools.d.ts.map +0 -1
- package/dist/mcp/tools/graph-utils.d.ts +0 -5
- package/dist/mcp/tools/graph-utils.d.ts.map +0 -1
- package/dist/mcp/tools/hook-tools.d.ts +0 -3
- package/dist/mcp/tools/hook-tools.d.ts.map +0 -1
- package/dist/mcp/tools/lock-tools.d.ts +0 -3
- package/dist/mcp/tools/lock-tools.d.ts.map +0 -1
- package/dist/mcp/tools/memory-audit.d.ts +0 -3
- package/dist/mcp/tools/memory-audit.d.ts.map +0 -1
- package/dist/mcp/tools/memory-crud.d.ts +0 -3
- package/dist/mcp/tools/memory-crud.d.ts.map +0 -1
- package/dist/mcp/tools/memory-health.d.ts +0 -3
- package/dist/mcp/tools/memory-health.d.ts.map +0 -1
- package/dist/mcp/tools/memory-history.d.ts +0 -3
- package/dist/mcp/tools/memory-history.d.ts.map +0 -1
- package/dist/mcp/tools/memory-inject.d.ts +0 -3
- package/dist/mcp/tools/memory-inject.d.ts.map +0 -1
- package/dist/mcp/tools/memory-io.d.ts +0 -3
- package/dist/mcp/tools/memory-io.d.ts.map +0 -1
- package/dist/mcp/tools/memory-lifecycle.d.ts +0 -3
- package/dist/mcp/tools/memory-lifecycle.d.ts.map +0 -1
- package/dist/mcp/tools/memory-search.d.ts +0 -3
- package/dist/mcp/tools/memory-search.d.ts.map +0 -1
- package/dist/mcp/tools/memory-stats.d.ts +0 -3
- package/dist/mcp/tools/memory-stats.d.ts.map +0 -1
- package/dist/mcp/tools/memory-tools.d.ts +0 -17
- package/dist/mcp/tools/memory-tools.d.ts.map +0 -1
- package/dist/mcp/tools/memory-utils.d.ts +0 -27
- package/dist/mcp/tools/memory-utils.d.ts.map +0 -1
- package/dist/mcp/tools/memory-validation.d.ts +0 -3
- package/dist/mcp/tools/memory-validation.d.ts.map +0 -1
- package/dist/mcp/tools/project-tools.d.ts +0 -3
- package/dist/mcp/tools/project-tools.d.ts.map +0 -1
- package/dist/mcp/tools/session-tools.d.ts +0 -3
- package/dist/mcp/tools/session-tools.d.ts.map +0 -1
- package/dist/mcp/tools/storage-tools.d.ts +0 -3
- package/dist/mcp/tools/storage-tools.d.ts.map +0 -1
- package/dist/mcp/tools/synthesis-tools.d.ts +0 -3
- package/dist/mcp/tools/synthesis-tools.d.ts.map +0 -1
- package/dist/mcp/tools/system-tools-events.d.ts +0 -3
- package/dist/mcp/tools/system-tools-events.d.ts.map +0 -1
- package/dist/mcp/tools/system-tools-memory-admin.d.ts +0 -3
- package/dist/mcp/tools/system-tools-memory-admin.d.ts.map +0 -1
- package/dist/mcp/tools/system-tools-shared.d.ts +0 -23
- package/dist/mcp/tools/system-tools-shared.d.ts.map +0 -1
- package/dist/mcp/tools/system-tools.d.ts +0 -3
- package/dist/mcp/tools/system-tools.d.ts.map +0 -1
- package/dist/mcp/tools/tool-registry.d.ts +0 -30
- package/dist/mcp/tools/tool-registry.d.ts.map +0 -1
- package/dist/mcp/tools/utility-tools.d.ts +0 -3
- package/dist/mcp/tools/utility-tools.d.ts.map +0 -1
- package/dist/memory-project-link/index.d.ts +0 -2
- package/dist/memory-project-link/index.d.ts.map +0 -1
- package/dist/memory-project-link/schema.d.ts +0 -5
- package/dist/memory-project-link/schema.d.ts.map +0 -1
- package/dist/pg-sync-worker.d.ts +0 -2
- package/dist/pg-sync-worker.d.ts.map +0 -1
- package/dist/project-registration/authority.d.ts +0 -43
- package/dist/project-registration/authority.d.ts.map +0 -1
- package/dist/project-registration/http.d.ts +0 -32
- package/dist/project-registration/http.d.ts.map +0 -1
- package/dist/project-registration/identity.d.ts +0 -20
- package/dist/project-registration/identity.d.ts.map +0 -1
- package/dist/project-registration/index.d.ts +0 -11
- package/dist/project-registration/index.d.ts.map +0 -1
- package/dist/project-registration/project-references.d.ts +0 -71
- package/dist/project-registration/project-references.d.ts.map +0 -1
- package/dist/project-registration/project-resources.d.ts +0 -22
- package/dist/project-registration/project-resources.d.ts.map +0 -1
- package/dist/project-registration/schema.d.ts +0 -5
- package/dist/project-registration/schema.d.ts.map +0 -1
- package/dist/project-registration/types.d.ts +0 -293
- package/dist/project-registration/types.d.ts.map +0 -1
- package/dist/project-registration.d.ts +0 -2
- package/dist/project-registration.d.ts.map +0 -1
- package/dist/sdk/index.d.ts +0 -971
- package/dist/sdk/index.d.ts.map +0 -1
- package/dist/server/auth.d.ts +0 -11
- package/dist/server/auth.d.ts.map +0 -1
- package/dist/server/helpers.d.ts +0 -22
- package/dist/server/helpers.d.ts.map +0 -1
- package/dist/server/index.d.ts +0 -14
- package/dist/server/index.d.ts.map +0 -1
- package/dist/server/openapi.d.ts +0 -2
- package/dist/server/openapi.d.ts.map +0 -1
- package/dist/server/router.d.ts +0 -17
- package/dist/server/router.d.ts.map +0 -1
- package/dist/server/routes/agents.d.ts +0 -2
- package/dist/server/routes/agents.d.ts.map +0 -1
- package/dist/server/routes/entities.d.ts +0 -2
- package/dist/server/routes/entities.d.ts.map +0 -1
- package/dist/server/routes/memories-bulk.d.ts +0 -2
- package/dist/server/routes/memories-bulk.d.ts.map +0 -1
- package/dist/server/routes/memories-crud.d.ts +0 -2
- package/dist/server/routes/memories-crud.d.ts.map +0 -1
- package/dist/server/routes/memories-io.d.ts +0 -2
- package/dist/server/routes/memories-io.d.ts.map +0 -1
- package/dist/server/routes/memories-misc.d.ts +0 -2
- package/dist/server/routes/memories-misc.d.ts.map +0 -1
- package/dist/server/routes/memories-search.d.ts +0 -2
- package/dist/server/routes/memories-search.d.ts.map +0 -1
- package/dist/server/routes/memories-stats.d.ts +0 -2
- package/dist/server/routes/memories-stats.d.ts.map +0 -1
- package/dist/server/routes/memories.d.ts +0 -19
- package/dist/server/routes/memories.d.ts.map +0 -1
- package/dist/server/routes/memory-project-link.d.ts +0 -2
- package/dist/server/routes/memory-project-link.d.ts.map +0 -1
- package/dist/server/routes/project-registration.d.ts +0 -2
- package/dist/server/routes/project-registration.d.ts.map +0 -1
- package/dist/server/routes/projects.d.ts +0 -2
- package/dist/server/routes/projects.d.ts.map +0 -1
- package/dist/server/routes/system-auto-memory.d.ts +0 -2
- package/dist/server/routes/system-auto-memory.d.ts.map +0 -1
- package/dist/server/routes/system-chain.d.ts +0 -2
- package/dist/server/routes/system-chain.d.ts.map +0 -1
- package/dist/server/routes/system-consolidation.d.ts +0 -2
- package/dist/server/routes/system-consolidation.d.ts.map +0 -1
- package/dist/server/routes/system-hooks.d.ts +0 -2
- package/dist/server/routes/system-hooks.d.ts.map +0 -1
- package/dist/server/routes/system-sessions.d.ts +0 -2
- package/dist/server/routes/system-sessions.d.ts.map +0 -1
- package/dist/server/routes/system-subscriptions.d.ts +0 -2
- package/dist/server/routes/system-subscriptions.d.ts.map +0 -1
- package/dist/server/routes/system-synthesis.d.ts +0 -2
- package/dist/server/routes/system-synthesis.d.ts.map +0 -1
- package/dist/server/routes/system-tools.d.ts +0 -2
- package/dist/server/routes/system-tools.d.ts.map +0 -1
- package/dist/server/routes/system.d.ts +0 -2
- package/dist/server/routes/system.d.ts.map +0 -1
- package/dist/server/routes/tasks.d.ts +0 -2
- package/dist/server/routes/tasks.d.ts.map +0 -1
- package/dist/storage.d.ts +0 -266
- package/dist/storage.d.ts.map +0 -1
- package/dist/test-support/preload-local-store.d.ts +0 -2
- package/dist/test-support/preload-local-store.d.ts.map +0 -1
- package/dist/test-support/project-authority-identity.d.ts +0 -8
- package/dist/test-support/project-authority-identity.d.ts.map +0 -1
- package/dist/test-support/store-isolation.d.ts +0 -108
- package/dist/test-support/store-isolation.d.ts.map +0 -1
- package/dist/test-support/strip-ansi.d.ts +0 -3
- package/dist/test-support/strip-ansi.d.ts.map +0 -1
- package/dist/types/hooks.d.ts +0 -136
- package/dist/types/hooks.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -472
- package/dist/types/index.d.ts.map +0 -1
package/dist/sdk/index.d.ts
DELETED
|
@@ -1,971 +0,0 @@
|
|
|
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
|
-
expired_count: number;
|
|
348
|
-
}
|
|
349
|
-
export interface CreateMemoryInput {
|
|
350
|
-
key: string;
|
|
351
|
-
value: string;
|
|
352
|
-
category?: MemoryCategory;
|
|
353
|
-
scope?: MemoryScope;
|
|
354
|
-
summary?: string;
|
|
355
|
-
tags?: string[];
|
|
356
|
-
importance?: number;
|
|
357
|
-
source?: MemorySource;
|
|
358
|
-
agent_id?: string;
|
|
359
|
-
project_id?: string;
|
|
360
|
-
session_id?: string;
|
|
361
|
-
metadata?: Record<string, unknown>;
|
|
362
|
-
expires_at?: string;
|
|
363
|
-
ttl?: string;
|
|
364
|
-
}
|
|
365
|
-
export interface UpdateMemoryInput {
|
|
366
|
-
value?: string;
|
|
367
|
-
category?: MemoryCategory;
|
|
368
|
-
scope?: MemoryScope;
|
|
369
|
-
summary?: string | null;
|
|
370
|
-
tags?: string[];
|
|
371
|
-
importance?: number;
|
|
372
|
-
pinned?: boolean;
|
|
373
|
-
status?: MemoryStatus;
|
|
374
|
-
metadata?: Record<string, unknown>;
|
|
375
|
-
expires_at?: string | null;
|
|
376
|
-
version?: number;
|
|
377
|
-
}
|
|
378
|
-
export interface ListMemoriesFilter {
|
|
379
|
-
scope?: MemoryScope;
|
|
380
|
-
category?: MemoryCategory;
|
|
381
|
-
tags?: string[];
|
|
382
|
-
min_importance?: number;
|
|
383
|
-
pinned?: boolean;
|
|
384
|
-
agent_id?: string;
|
|
385
|
-
project_id?: string;
|
|
386
|
-
session_id?: string;
|
|
387
|
-
namespace?: string;
|
|
388
|
-
status?: MemoryStatus;
|
|
389
|
-
limit?: number;
|
|
390
|
-
offset?: number;
|
|
391
|
-
fields?: string[];
|
|
392
|
-
}
|
|
393
|
-
export interface SearchMemoriesInput {
|
|
394
|
-
query: string;
|
|
395
|
-
scope?: MemoryScope;
|
|
396
|
-
category?: MemoryCategory;
|
|
397
|
-
tags?: string[];
|
|
398
|
-
session_id?: string;
|
|
399
|
-
namespace?: string;
|
|
400
|
-
limit?: number;
|
|
401
|
-
}
|
|
402
|
-
export interface ExportMemoriesInput {
|
|
403
|
-
scope?: MemoryScope;
|
|
404
|
-
category?: MemoryCategory;
|
|
405
|
-
agent_id?: string;
|
|
406
|
-
project_id?: string;
|
|
407
|
-
tags?: string[];
|
|
408
|
-
limit?: number;
|
|
409
|
-
}
|
|
410
|
-
export interface ImportMemoriesInput {
|
|
411
|
-
memories: Partial<Memory>[];
|
|
412
|
-
overwrite?: boolean;
|
|
413
|
-
}
|
|
414
|
-
export interface CreateEntityInput {
|
|
415
|
-
name: string;
|
|
416
|
-
type: EntityType;
|
|
417
|
-
description?: string;
|
|
418
|
-
metadata?: Record<string, unknown>;
|
|
419
|
-
project_id?: string;
|
|
420
|
-
}
|
|
421
|
-
export interface UpdateEntityInput {
|
|
422
|
-
name?: string;
|
|
423
|
-
type?: EntityType;
|
|
424
|
-
description?: string | null;
|
|
425
|
-
metadata?: Record<string, unknown>;
|
|
426
|
-
}
|
|
427
|
-
export interface CreateRelationInput {
|
|
428
|
-
source_entity_id: string;
|
|
429
|
-
target_entity_id: string;
|
|
430
|
-
relation_type: RelationType;
|
|
431
|
-
weight?: number;
|
|
432
|
-
metadata?: Record<string, unknown>;
|
|
433
|
-
}
|
|
434
|
-
export interface ListTasksFilter {
|
|
435
|
-
status?: TaskStatus;
|
|
436
|
-
priority?: TaskPriority;
|
|
437
|
-
assigned_agent_id?: string;
|
|
438
|
-
project_id?: string;
|
|
439
|
-
session_id?: string;
|
|
440
|
-
parent_task_id?: string | null;
|
|
441
|
-
tags?: string[];
|
|
442
|
-
limit?: number;
|
|
443
|
-
offset?: number;
|
|
444
|
-
}
|
|
445
|
-
export interface MementosClientConfig {
|
|
446
|
-
baseUrl?: string;
|
|
447
|
-
fetch?: typeof globalThis.fetch;
|
|
448
|
-
/**
|
|
449
|
-
* API key issued by `contracts issue-key --app mementos`. Sent as both
|
|
450
|
-
* `Authorization: Bearer <key>` and `x-api-key`. Required against a
|
|
451
|
-
* self_hosted deployment with API-key auth enabled.
|
|
452
|
-
*/
|
|
453
|
-
apiKey?: string;
|
|
454
|
-
/**
|
|
455
|
-
* Versioned route prefix. Defaults to the canonical `/v1`. The deployed
|
|
456
|
-
* service also serves the legacy `/api` prefix; set `prefix: "/api"` to target
|
|
457
|
-
* it explicitly.
|
|
458
|
-
*/
|
|
459
|
-
prefix?: string;
|
|
460
|
-
}
|
|
461
|
-
export declare class MementosError extends Error {
|
|
462
|
-
readonly status: number;
|
|
463
|
-
readonly details?: unknown | undefined;
|
|
464
|
-
constructor(message: string, status: number, details?: unknown | undefined);
|
|
465
|
-
}
|
|
466
|
-
export interface AutoMemoryQueueStats {
|
|
467
|
-
pending: number;
|
|
468
|
-
processing: number;
|
|
469
|
-
processed: number;
|
|
470
|
-
failed: number;
|
|
471
|
-
dropped: number;
|
|
472
|
-
}
|
|
473
|
-
export interface AutoMemoryConfig {
|
|
474
|
-
provider: "anthropic" | "openai" | "cerebras" | "grok";
|
|
475
|
-
model?: string;
|
|
476
|
-
enabled: boolean;
|
|
477
|
-
minImportance: number;
|
|
478
|
-
autoEntityLink: boolean;
|
|
479
|
-
fallback?: Array<"anthropic" | "openai" | "cerebras" | "grok">;
|
|
480
|
-
}
|
|
481
|
-
export interface SdkExtractedMemory {
|
|
482
|
-
content: string;
|
|
483
|
-
category: "preference" | "fact" | "knowledge" | "history";
|
|
484
|
-
importance: number;
|
|
485
|
-
tags: string[];
|
|
486
|
-
suggestedScope: "private" | "shared" | "global";
|
|
487
|
-
reasoning?: string;
|
|
488
|
-
}
|
|
489
|
-
export interface SdkHook {
|
|
490
|
-
id: string;
|
|
491
|
-
type: string;
|
|
492
|
-
blocking: boolean;
|
|
493
|
-
priority: number;
|
|
494
|
-
builtin: boolean;
|
|
495
|
-
agentId?: string;
|
|
496
|
-
projectId?: string;
|
|
497
|
-
description?: string;
|
|
498
|
-
}
|
|
499
|
-
export interface SdkWebhook {
|
|
500
|
-
id: string;
|
|
501
|
-
type: string;
|
|
502
|
-
handlerUrl: string;
|
|
503
|
-
priority: number;
|
|
504
|
-
blocking: boolean;
|
|
505
|
-
agentId?: string;
|
|
506
|
-
projectId?: string;
|
|
507
|
-
description?: string;
|
|
508
|
-
enabled: boolean;
|
|
509
|
-
createdAt: string;
|
|
510
|
-
invocationCount: number;
|
|
511
|
-
failureCount: number;
|
|
512
|
-
}
|
|
513
|
-
export interface SynthesisRun {
|
|
514
|
-
id: string;
|
|
515
|
-
triggered_by: string;
|
|
516
|
-
project_id: string | null;
|
|
517
|
-
agent_id: string | null;
|
|
518
|
-
corpus_size: number;
|
|
519
|
-
proposals_generated: number;
|
|
520
|
-
proposals_accepted: number;
|
|
521
|
-
proposals_rejected: number;
|
|
522
|
-
status: "pending" | "running" | "completed" | "failed" | "rolled_back";
|
|
523
|
-
error: string | null;
|
|
524
|
-
started_at: string;
|
|
525
|
-
completed_at: string | null;
|
|
526
|
-
}
|
|
527
|
-
export interface SynthesisResult {
|
|
528
|
-
run: SynthesisRun;
|
|
529
|
-
proposals: unknown[];
|
|
530
|
-
executed: number;
|
|
531
|
-
metrics: {
|
|
532
|
-
corpusReduction: number;
|
|
533
|
-
deduplicationRate: number;
|
|
534
|
-
} | null;
|
|
535
|
-
dryRun: boolean;
|
|
536
|
-
}
|
|
537
|
-
export interface SessionMemoryJob {
|
|
538
|
-
id: string;
|
|
539
|
-
session_id: string;
|
|
540
|
-
agent_id: string | null;
|
|
541
|
-
project_id: string | null;
|
|
542
|
-
source: string;
|
|
543
|
-
status: "pending" | "processing" | "completed" | "failed";
|
|
544
|
-
transcript: string;
|
|
545
|
-
chunk_count: number;
|
|
546
|
-
memories_extracted: number;
|
|
547
|
-
error: string | null;
|
|
548
|
-
metadata: Record<string, unknown>;
|
|
549
|
-
created_at: string;
|
|
550
|
-
started_at: string | null;
|
|
551
|
-
completed_at: string | null;
|
|
552
|
-
}
|
|
553
|
-
export declare class MementosClient {
|
|
554
|
-
private baseUrl;
|
|
555
|
-
private _fetch;
|
|
556
|
-
private apiKey?;
|
|
557
|
-
private prefix;
|
|
558
|
-
constructor(config?: MementosClientConfig);
|
|
559
|
-
static fromEnv(overrides?: Partial<MementosClientConfig>): MementosClient;
|
|
560
|
-
private request;
|
|
561
|
-
private get;
|
|
562
|
-
private post;
|
|
563
|
-
private patch;
|
|
564
|
-
private delete;
|
|
565
|
-
listMemories(filter?: ListMemoriesFilter): Promise<{
|
|
566
|
-
memories: Memory[];
|
|
567
|
-
count: number;
|
|
568
|
-
}>;
|
|
569
|
-
getStats(): Promise<MemoryStats>;
|
|
570
|
-
getHealth(): Promise<{
|
|
571
|
-
status: "ok" | "warn";
|
|
572
|
-
version: string;
|
|
573
|
-
mode: "local" | "cloud";
|
|
574
|
-
profile: string;
|
|
575
|
-
db_path: string;
|
|
576
|
-
hostname: string;
|
|
577
|
-
memories: {
|
|
578
|
-
total: number;
|
|
579
|
-
expired: number;
|
|
580
|
-
pinned: number;
|
|
581
|
-
};
|
|
582
|
-
agents: number;
|
|
583
|
-
projects: number;
|
|
584
|
-
}>;
|
|
585
|
-
/** Liveness/readiness probe — verifies backing-store connectivity. */
|
|
586
|
-
getReady(): Promise<{
|
|
587
|
-
status: "ready" | "not_ready";
|
|
588
|
-
version: string;
|
|
589
|
-
mode: "local" | "cloud";
|
|
590
|
-
}>;
|
|
591
|
-
/** Service version + storage mode. */
|
|
592
|
-
getVersion(): Promise<{
|
|
593
|
-
status: "ok";
|
|
594
|
-
version: string;
|
|
595
|
-
mode: "local" | "cloud";
|
|
596
|
-
}>;
|
|
597
|
-
getReport(options?: {
|
|
598
|
-
days?: number;
|
|
599
|
-
project_id?: string;
|
|
600
|
-
agent_id?: string;
|
|
601
|
-
}): Promise<{
|
|
602
|
-
total: number;
|
|
603
|
-
pinned: number;
|
|
604
|
-
days: number;
|
|
605
|
-
recent: {
|
|
606
|
-
total: number;
|
|
607
|
-
activity: {
|
|
608
|
-
date: string;
|
|
609
|
-
memories_created: number;
|
|
610
|
-
}[];
|
|
611
|
-
};
|
|
612
|
-
by_scope: Record<string, number>;
|
|
613
|
-
by_category: Record<string, number>;
|
|
614
|
-
top_memories: {
|
|
615
|
-
id: string;
|
|
616
|
-
key: string;
|
|
617
|
-
value: string;
|
|
618
|
-
importance: number;
|
|
619
|
-
scope: string;
|
|
620
|
-
category: string;
|
|
621
|
-
}[];
|
|
622
|
-
top_agents: {
|
|
623
|
-
agent_id: string;
|
|
624
|
-
c: number;
|
|
625
|
-
}[];
|
|
626
|
-
}>;
|
|
627
|
-
getStaleMemories(options?: {
|
|
628
|
-
days?: number;
|
|
629
|
-
project_id?: string;
|
|
630
|
-
agent_id?: string;
|
|
631
|
-
limit?: number;
|
|
632
|
-
}): Promise<{
|
|
633
|
-
memories: Memory[];
|
|
634
|
-
count: number;
|
|
635
|
-
days: number;
|
|
636
|
-
}>;
|
|
637
|
-
getActivity(options?: {
|
|
638
|
-
days?: number;
|
|
639
|
-
scope?: MemoryScope;
|
|
640
|
-
agent_id?: string;
|
|
641
|
-
project_id?: string;
|
|
642
|
-
}): Promise<{
|
|
643
|
-
activity: {
|
|
644
|
-
date: string;
|
|
645
|
-
memories_created: number;
|
|
646
|
-
global_count: number;
|
|
647
|
-
shared_count: number;
|
|
648
|
-
private_count: number;
|
|
649
|
-
avg_importance: number;
|
|
650
|
-
}[];
|
|
651
|
-
days: number;
|
|
652
|
-
total: number;
|
|
653
|
-
}>;
|
|
654
|
-
searchMemories(input: SearchMemoriesInput | string): Promise<{
|
|
655
|
-
results: Memory[];
|
|
656
|
-
count: number;
|
|
657
|
-
}>;
|
|
658
|
-
exportMemories(input?: ExportMemoriesInput): Promise<{
|
|
659
|
-
memories: Memory[];
|
|
660
|
-
count: number;
|
|
661
|
-
}>;
|
|
662
|
-
importMemories(input: ImportMemoriesInput): Promise<{
|
|
663
|
-
imported: number;
|
|
664
|
-
errors: string[];
|
|
665
|
-
total: number;
|
|
666
|
-
}>;
|
|
667
|
-
cleanExpired(): Promise<{
|
|
668
|
-
cleaned: number;
|
|
669
|
-
}>;
|
|
670
|
-
extractFromSession(input: {
|
|
671
|
-
session_id: string;
|
|
672
|
-
title?: string;
|
|
673
|
-
project?: string;
|
|
674
|
-
model?: string;
|
|
675
|
-
messages?: number;
|
|
676
|
-
key_topics?: string[];
|
|
677
|
-
summary?: string;
|
|
678
|
-
agent_id?: string;
|
|
679
|
-
project_id?: string;
|
|
680
|
-
memories?: Partial<CreateMemoryInput>[];
|
|
681
|
-
}): Promise<{
|
|
682
|
-
created: number;
|
|
683
|
-
memory_ids: string[];
|
|
684
|
-
errors: string[];
|
|
685
|
-
session_id: string;
|
|
686
|
-
}>;
|
|
687
|
-
saveMemory(input: CreateMemoryInput): Promise<Memory>;
|
|
688
|
-
getMemory(id: string): Promise<Memory>;
|
|
689
|
-
getMemoryVersions(id: string): Promise<{
|
|
690
|
-
versions: MemoryVersion[];
|
|
691
|
-
count: number;
|
|
692
|
-
current_version: number;
|
|
693
|
-
}>;
|
|
694
|
-
updateMemory(id: string, input: UpdateMemoryInput): Promise<Memory>;
|
|
695
|
-
deleteMemory(id: string): Promise<{
|
|
696
|
-
deleted: boolean;
|
|
697
|
-
}>;
|
|
698
|
-
listAgents(): Promise<{
|
|
699
|
-
agents: Agent[];
|
|
700
|
-
}>;
|
|
701
|
-
registerAgent(input: {
|
|
702
|
-
name: string;
|
|
703
|
-
role?: string;
|
|
704
|
-
description?: string;
|
|
705
|
-
}): Promise<Agent>;
|
|
706
|
-
getAgent(idOrName: string): Promise<Agent>;
|
|
707
|
-
updateAgent(idOrName: string, updates: {
|
|
708
|
-
name?: string;
|
|
709
|
-
role?: string;
|
|
710
|
-
description?: string;
|
|
711
|
-
metadata?: Record<string, unknown>;
|
|
712
|
-
active_project_id?: string | null;
|
|
713
|
-
}): Promise<Agent>;
|
|
714
|
-
listAgentsByProject(projectId: string): Promise<{
|
|
715
|
-
agents: Agent[];
|
|
716
|
-
count: number;
|
|
717
|
-
}>;
|
|
718
|
-
listProjects(): Promise<{
|
|
719
|
-
projects: Project[];
|
|
720
|
-
}>;
|
|
721
|
-
registerProject(input: {
|
|
722
|
-
name: string;
|
|
723
|
-
path?: string;
|
|
724
|
-
description?: string;
|
|
725
|
-
memory_prefix?: string;
|
|
726
|
-
}): Promise<Project>;
|
|
727
|
-
getProject(idOrName: string): Promise<Project>;
|
|
728
|
-
listProjectResources(projectId: string, options?: ListMementosProjectResourcesOptions): Promise<MementosProjectResourcePage>;
|
|
729
|
-
listAllProjectResources(projectId: string, options?: ListAllMementosProjectResourcesOptions): Promise<MementosProjectResourcePage>;
|
|
730
|
-
getProjectResource(projectId: string, resourceKind: MementosProjectResourceKind, stableId: string): Promise<MementosProjectResourceExactResult>;
|
|
731
|
-
updateProject(id: string, request: ProjectGuardedUpdateRequest): Promise<ProjectGuardedUpdateResult>;
|
|
732
|
-
previewProjectUpdate(id: string, request: ProjectGuardedUpdateRequest): Promise<ProjectGuardedUpdateResult>;
|
|
733
|
-
rollbackProjectUpdate(id: string, request: ProjectGuardedRollbackRequest): Promise<ProjectGuardedUpdateResult>;
|
|
734
|
-
getProjectUpdateReceipt(id: string, receiptId: string, identity: ProjectAuthorityIdentity): Promise<ProjectUpdateReceipt>;
|
|
735
|
-
linkMemoryProject(memoryId: string, request: MemoryProjectLinkRequest): Promise<MemoryProjectLinkResult>;
|
|
736
|
-
previewMemoryProjectLink(memoryId: string, request: MemoryProjectLinkRequest): Promise<MemoryProjectLinkResult>;
|
|
737
|
-
rollbackMemoryProjectLink(memoryId: string, request: MemoryProjectLinkRollbackRequest): Promise<MemoryProjectLinkResult>;
|
|
738
|
-
getMemoryProjectLinkReceipt(memoryId: string, receiptId: string, identity: ProjectAuthorityIdentity): Promise<MemoryProjectLinkReceipt>;
|
|
739
|
-
getProjectAgents(idOrName: string): Promise<{
|
|
740
|
-
agents: Agent[];
|
|
741
|
-
count: number;
|
|
742
|
-
}>;
|
|
743
|
-
listEntities(filter?: {
|
|
744
|
-
type?: EntityType;
|
|
745
|
-
limit?: number;
|
|
746
|
-
offset?: number;
|
|
747
|
-
}): Promise<{
|
|
748
|
-
entities: Entity[];
|
|
749
|
-
count: number;
|
|
750
|
-
}>;
|
|
751
|
-
createEntity(input: CreateEntityInput): Promise<Entity>;
|
|
752
|
-
mergeEntities(input: {
|
|
753
|
-
source_id: string;
|
|
754
|
-
target_id: string;
|
|
755
|
-
}): Promise<Entity>;
|
|
756
|
-
getEntity(id: string): Promise<Entity>;
|
|
757
|
-
updateEntity(id: string, input: UpdateEntityInput): Promise<Entity>;
|
|
758
|
-
deleteEntity(id: string): Promise<{
|
|
759
|
-
deleted: boolean;
|
|
760
|
-
}>;
|
|
761
|
-
getEntityMemories(entityId: string): Promise<{
|
|
762
|
-
memories: Memory[];
|
|
763
|
-
count: number;
|
|
764
|
-
}>;
|
|
765
|
-
linkEntityMemory(entityId: string, input: {
|
|
766
|
-
memory_id: string;
|
|
767
|
-
role?: EntityRole;
|
|
768
|
-
}): Promise<{
|
|
769
|
-
linked: boolean;
|
|
770
|
-
}>;
|
|
771
|
-
unlinkEntityMemory(entityId: string, memoryId: string): Promise<{
|
|
772
|
-
unlinked: boolean;
|
|
773
|
-
}>;
|
|
774
|
-
getEntityRelations(entityId: string, filter?: {
|
|
775
|
-
relation_type?: RelationType;
|
|
776
|
-
direction?: "from" | "to" | "both";
|
|
777
|
-
}): Promise<{
|
|
778
|
-
relations: Relation[];
|
|
779
|
-
}>;
|
|
780
|
-
createRelation(input: CreateRelationInput): Promise<Relation>;
|
|
781
|
-
getRelation(id: string): Promise<Relation>;
|
|
782
|
-
deleteRelation(id: string): Promise<{
|
|
783
|
-
deleted: boolean;
|
|
784
|
-
}>;
|
|
785
|
-
getGraph(entityId: string, options?: {
|
|
786
|
-
depth?: number;
|
|
787
|
-
relation_types?: RelationType[];
|
|
788
|
-
}): Promise<{
|
|
789
|
-
nodes: Entity[];
|
|
790
|
-
edges: Relation[];
|
|
791
|
-
}>;
|
|
792
|
-
findPath(fromId: string, toId: string): Promise<{
|
|
793
|
-
path: Entity[];
|
|
794
|
-
found: boolean;
|
|
795
|
-
}>;
|
|
796
|
-
getGraphStats(): Promise<{
|
|
797
|
-
entity_count: number;
|
|
798
|
-
relation_count: number;
|
|
799
|
-
by_type: Record<string, number>;
|
|
800
|
-
}>;
|
|
801
|
-
acquireLock(input: AcquireLockInput): Promise<ResourceLock | null>;
|
|
802
|
-
checkLock(resourceType: ResourceType, resourceId: string, lockType?: LockType): Promise<ResourceLock[]>;
|
|
803
|
-
releaseLock(lockId: string, agentId: string): Promise<{
|
|
804
|
-
released: boolean;
|
|
805
|
-
}>;
|
|
806
|
-
listAgentLocks(agentId: string): Promise<ResourceLock[]>;
|
|
807
|
-
releaseAllAgentLocks(agentId: string): Promise<{
|
|
808
|
-
released: number;
|
|
809
|
-
}>;
|
|
810
|
-
cleanExpiredLocks(): Promise<{
|
|
811
|
-
cleaned: number;
|
|
812
|
-
}>;
|
|
813
|
-
/** Create a task. */
|
|
814
|
-
createTask(input: CreateTaskInput): Promise<Task>;
|
|
815
|
-
/** List tasks with optional filters. */
|
|
816
|
-
listTasks(filter?: ListTasksFilter): Promise<{
|
|
817
|
-
tasks: Task[];
|
|
818
|
-
count: number;
|
|
819
|
-
}>;
|
|
820
|
-
/** Get task stats (by status, priority, overdue). */
|
|
821
|
-
getTaskStats(options?: {
|
|
822
|
-
project_id?: string;
|
|
823
|
-
agent_id?: string;
|
|
824
|
-
}): Promise<TaskStats>;
|
|
825
|
-
/** Get a task by ID. */
|
|
826
|
-
getTask(id: string): Promise<Task>;
|
|
827
|
-
/** Update a task. */
|
|
828
|
-
updateTask(id: string, input: UpdateTaskInput): Promise<Task>;
|
|
829
|
-
/** Delete a task. */
|
|
830
|
-
deleteTask(id: string): Promise<{
|
|
831
|
-
deleted: boolean;
|
|
832
|
-
}>;
|
|
833
|
-
/** List comments on a task. */
|
|
834
|
-
listTaskComments(taskId: string): Promise<{
|
|
835
|
-
comments: TaskComment[];
|
|
836
|
-
count: number;
|
|
837
|
-
}>;
|
|
838
|
-
/** Add a comment to a task. */
|
|
839
|
-
addTaskComment(taskId: string, body: string, agentId?: string): Promise<TaskComment>;
|
|
840
|
-
/** Delete a task comment. */
|
|
841
|
-
deleteTaskComment(taskId: string, commentId: string): Promise<{
|
|
842
|
-
deleted: boolean;
|
|
843
|
-
}>;
|
|
844
|
-
getContext(options?: {
|
|
845
|
-
agent_id?: string;
|
|
846
|
-
project_id?: string;
|
|
847
|
-
max_tokens?: number;
|
|
848
|
-
format?: "xml" | "markdown" | "compact" | "json";
|
|
849
|
-
}): Promise<{
|
|
850
|
-
context: string;
|
|
851
|
-
memories_count: number;
|
|
852
|
-
}>;
|
|
853
|
-
processConversationTurn(turn: string, context?: {
|
|
854
|
-
agent_id?: string;
|
|
855
|
-
project_id?: string;
|
|
856
|
-
session_id?: string;
|
|
857
|
-
}): Promise<{
|
|
858
|
-
queued: boolean;
|
|
859
|
-
queue: AutoMemoryQueueStats;
|
|
860
|
-
}>;
|
|
861
|
-
getAutoMemoryStatus(): Promise<{
|
|
862
|
-
queue: AutoMemoryQueueStats;
|
|
863
|
-
config: AutoMemoryConfig;
|
|
864
|
-
providers: Record<string, {
|
|
865
|
-
available: boolean;
|
|
866
|
-
model: string;
|
|
867
|
-
}>;
|
|
868
|
-
}>;
|
|
869
|
-
configureAutoMemory(config: Partial<AutoMemoryConfig> & {
|
|
870
|
-
min_importance?: number;
|
|
871
|
-
auto_entity_link?: boolean;
|
|
872
|
-
}): Promise<{
|
|
873
|
-
updated: boolean;
|
|
874
|
-
config: AutoMemoryConfig;
|
|
875
|
-
}>;
|
|
876
|
-
testExtraction(turn: string, options?: {
|
|
877
|
-
provider?: "anthropic" | "openai" | "cerebras" | "grok";
|
|
878
|
-
agent_id?: string;
|
|
879
|
-
project_id?: string;
|
|
880
|
-
}): Promise<{
|
|
881
|
-
provider: string;
|
|
882
|
-
model: string;
|
|
883
|
-
extracted: SdkExtractedMemory[];
|
|
884
|
-
count: number;
|
|
885
|
-
note: string;
|
|
886
|
-
}>;
|
|
887
|
-
listHooks(type?: string): Promise<SdkHook[]>;
|
|
888
|
-
getHookStats(): Promise<{
|
|
889
|
-
total: number;
|
|
890
|
-
byType: Record<string, number>;
|
|
891
|
-
blocking: number;
|
|
892
|
-
nonBlocking: number;
|
|
893
|
-
}>;
|
|
894
|
-
listWebhooks(filter?: {
|
|
895
|
-
type?: string;
|
|
896
|
-
enabled?: boolean;
|
|
897
|
-
}): Promise<SdkWebhook[]>;
|
|
898
|
-
createWebhook(input: {
|
|
899
|
-
type: string;
|
|
900
|
-
handler_url: string;
|
|
901
|
-
priority?: number;
|
|
902
|
-
blocking?: boolean;
|
|
903
|
-
agent_id?: string;
|
|
904
|
-
project_id?: string;
|
|
905
|
-
description?: string;
|
|
906
|
-
}): Promise<SdkWebhook>;
|
|
907
|
-
getWebhook(id: string): Promise<SdkWebhook>;
|
|
908
|
-
updateWebhook(id: string, updates: {
|
|
909
|
-
enabled?: boolean;
|
|
910
|
-
priority?: number;
|
|
911
|
-
description?: string;
|
|
912
|
-
}): Promise<SdkWebhook>;
|
|
913
|
-
deleteWebhook(id: string): Promise<void>;
|
|
914
|
-
enableWebhook(id: string): Promise<SdkWebhook>;
|
|
915
|
-
disableWebhook(id: string): Promise<SdkWebhook>;
|
|
916
|
-
runSynthesis(options?: {
|
|
917
|
-
project_id?: string;
|
|
918
|
-
agent_id?: string;
|
|
919
|
-
dry_run?: boolean;
|
|
920
|
-
max_proposals?: number;
|
|
921
|
-
provider?: string;
|
|
922
|
-
}): Promise<SynthesisResult>;
|
|
923
|
-
listSynthesisRuns(filter?: {
|
|
924
|
-
project_id?: string;
|
|
925
|
-
limit?: number;
|
|
926
|
-
}): Promise<{
|
|
927
|
-
runs: SynthesisRun[];
|
|
928
|
-
count: number;
|
|
929
|
-
}>;
|
|
930
|
-
getSynthesisStatus(options?: {
|
|
931
|
-
project_id?: string;
|
|
932
|
-
run_id?: string;
|
|
933
|
-
}): Promise<{
|
|
934
|
-
lastRun: SynthesisRun | null;
|
|
935
|
-
recentRuns: SynthesisRun[];
|
|
936
|
-
}>;
|
|
937
|
-
rollbackSynthesis(runId: string): Promise<{
|
|
938
|
-
rolled_back: number;
|
|
939
|
-
errors: string[];
|
|
940
|
-
}>;
|
|
941
|
-
ingestSession(input: {
|
|
942
|
-
transcript: string;
|
|
943
|
-
session_id: string;
|
|
944
|
-
agent_id?: string;
|
|
945
|
-
project_id?: string;
|
|
946
|
-
source?: "claude-code" | "codex" | "manual" | "open-sessions";
|
|
947
|
-
metadata?: Record<string, unknown>;
|
|
948
|
-
}): Promise<{
|
|
949
|
-
job_id: string;
|
|
950
|
-
status: string;
|
|
951
|
-
message: string;
|
|
952
|
-
}>;
|
|
953
|
-
getSessionJob(jobId: string): Promise<SessionMemoryJob>;
|
|
954
|
-
listSessionJobs(filter?: {
|
|
955
|
-
agent_id?: string;
|
|
956
|
-
project_id?: string;
|
|
957
|
-
status?: string;
|
|
958
|
-
limit?: number;
|
|
959
|
-
}): Promise<{
|
|
960
|
-
jobs: SessionMemoryJob[];
|
|
961
|
-
count: number;
|
|
962
|
-
}>;
|
|
963
|
-
getSessionQueueStats(): Promise<{
|
|
964
|
-
pending: number;
|
|
965
|
-
processing: number;
|
|
966
|
-
completed: number;
|
|
967
|
-
failed: number;
|
|
968
|
-
}>;
|
|
969
|
-
}
|
|
970
|
-
export default MementosClient;
|
|
971
|
-
//# sourceMappingURL=index.d.ts.map
|