@hasna/mementos 0.14.39 → 0.14.40
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/LICENSE +1 -2
- package/README.md +0 -12
- 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.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.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 +3 -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/helpers.d.ts +64 -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 +62468 -19632
- package/dist/db/acl.d.ts +34 -0
- package/dist/db/acl.d.ts.map +1 -0
- package/dist/db/agents.d.ts +15 -0
- package/dist/db/agents.d.ts.map +1 -0
- package/dist/db/audit.d.ts +39 -0
- package/dist/db/audit.d.ts.map +1 -0
- package/dist/db/database.d.ts +10 -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/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 +40 -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/migrations.d.ts +2 -0
- package/dist/db/migrations.d.ts.map +1 -0
- package/dist/db/pg-migrate.d.ts +14 -0
- package/dist/db/pg-migrate.d.ts.map +1 -0
- package/dist/db/pg-migrations.d.ts +8 -0
- package/dist/db/pg-migrations.d.ts.map +1 -0
- package/dist/db/projects.d.ts +6 -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 +29 -0
- package/dist/db/relations.d.ts.map +1 -0
- package/dist/db/session-jobs.d.ts +49 -0
- package/dist/db/session-jobs.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 +25 -0
- package/dist/db/webhook_hooks.d.ts.map +1 -0
- package/dist/index.d.ts +40 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +54118 -9817
- 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/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 +46 -0
- package/dist/lib/auto-memory-queue.d.ts.map +1 -0
- package/dist/lib/auto-memory.d.ts +18 -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 +12 -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/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 +24 -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/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/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 +10 -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/remote-sync.d.ts +49 -0
- package/dist/lib/remote-sync.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/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 +44 -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/index.d.ts +5 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +60304 -22127
- 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-sync.d.ts +3 -0
- package/dist/mcp/tools/memory-sync.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 +7 -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/sdk/index.d.ts +760 -0
- package/dist/sdk/index.d.ts.map +1 -0
- package/dist/server/helpers.d.ts +11 -0
- package/dist/server/helpers.d.ts.map +1 -0
- package/dist/server/index.d.ts +13 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +56671 -13366
- 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 +18 -0
- package/dist/server/routes/memories.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-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 +156 -0
- package/dist/storage.d.ts.map +1 -0
- package/dist/storage.js +5547 -0
- package/dist/types/hooks.d.ts +136 -0
- package/dist/types/hooks.d.ts.map +1 -0
- package/dist/types/index.d.ts +347 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +13 -3
|
@@ -0,0 +1,760 @@
|
|
|
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 interface Entity {
|
|
131
|
+
id: string;
|
|
132
|
+
name: string;
|
|
133
|
+
type: EntityType;
|
|
134
|
+
description: string | null;
|
|
135
|
+
metadata: Record<string, unknown>;
|
|
136
|
+
project_id: string | null;
|
|
137
|
+
created_at: string;
|
|
138
|
+
updated_at: string;
|
|
139
|
+
}
|
|
140
|
+
export interface Relation {
|
|
141
|
+
id: string;
|
|
142
|
+
source_entity_id: string;
|
|
143
|
+
target_entity_id: string;
|
|
144
|
+
relation_type: RelationType;
|
|
145
|
+
weight: number;
|
|
146
|
+
metadata: Record<string, unknown>;
|
|
147
|
+
created_at: string;
|
|
148
|
+
}
|
|
149
|
+
export type ResourceType = "project" | "memory" | "entity" | "agent" | "connector" | "file";
|
|
150
|
+
export type LockType = "advisory" | "exclusive";
|
|
151
|
+
export interface ResourceLock {
|
|
152
|
+
id: string;
|
|
153
|
+
resource_type: ResourceType;
|
|
154
|
+
resource_id: string;
|
|
155
|
+
agent_id: string;
|
|
156
|
+
lock_type: LockType;
|
|
157
|
+
locked_at: string;
|
|
158
|
+
expires_at: string;
|
|
159
|
+
}
|
|
160
|
+
export interface AcquireLockInput {
|
|
161
|
+
agent_id: string;
|
|
162
|
+
resource_type: ResourceType;
|
|
163
|
+
resource_id: string;
|
|
164
|
+
lock_type?: LockType;
|
|
165
|
+
ttl_seconds?: number;
|
|
166
|
+
}
|
|
167
|
+
export interface MemoryStats {
|
|
168
|
+
total: number;
|
|
169
|
+
by_scope: Record<MemoryScope, number>;
|
|
170
|
+
by_category: Record<MemoryCategory, number>;
|
|
171
|
+
by_status: Record<MemoryStatus, number>;
|
|
172
|
+
by_agent: Record<string, number>;
|
|
173
|
+
pinned_count: number;
|
|
174
|
+
expired_count: number;
|
|
175
|
+
}
|
|
176
|
+
export interface CreateMemoryInput {
|
|
177
|
+
key: string;
|
|
178
|
+
value: string;
|
|
179
|
+
category?: MemoryCategory;
|
|
180
|
+
scope?: MemoryScope;
|
|
181
|
+
summary?: string;
|
|
182
|
+
tags?: string[];
|
|
183
|
+
importance?: number;
|
|
184
|
+
source?: MemorySource;
|
|
185
|
+
agent_id?: string;
|
|
186
|
+
project_id?: string;
|
|
187
|
+
session_id?: string;
|
|
188
|
+
metadata?: Record<string, unknown>;
|
|
189
|
+
expires_at?: string;
|
|
190
|
+
ttl?: string;
|
|
191
|
+
}
|
|
192
|
+
export interface UpdateMemoryInput {
|
|
193
|
+
value?: string;
|
|
194
|
+
category?: MemoryCategory;
|
|
195
|
+
scope?: MemoryScope;
|
|
196
|
+
summary?: string | null;
|
|
197
|
+
tags?: string[];
|
|
198
|
+
importance?: number;
|
|
199
|
+
pinned?: boolean;
|
|
200
|
+
status?: MemoryStatus;
|
|
201
|
+
metadata?: Record<string, unknown>;
|
|
202
|
+
expires_at?: string | null;
|
|
203
|
+
version?: number;
|
|
204
|
+
}
|
|
205
|
+
export interface ListMemoriesFilter {
|
|
206
|
+
scope?: MemoryScope;
|
|
207
|
+
category?: MemoryCategory;
|
|
208
|
+
tags?: string[];
|
|
209
|
+
min_importance?: number;
|
|
210
|
+
pinned?: boolean;
|
|
211
|
+
agent_id?: string;
|
|
212
|
+
project_id?: string;
|
|
213
|
+
session_id?: string;
|
|
214
|
+
namespace?: string;
|
|
215
|
+
status?: MemoryStatus;
|
|
216
|
+
limit?: number;
|
|
217
|
+
offset?: number;
|
|
218
|
+
fields?: string[];
|
|
219
|
+
}
|
|
220
|
+
export interface SearchMemoriesInput {
|
|
221
|
+
query: string;
|
|
222
|
+
scope?: MemoryScope;
|
|
223
|
+
category?: MemoryCategory;
|
|
224
|
+
tags?: string[];
|
|
225
|
+
session_id?: string;
|
|
226
|
+
namespace?: string;
|
|
227
|
+
limit?: number;
|
|
228
|
+
}
|
|
229
|
+
export interface ExportMemoriesInput {
|
|
230
|
+
scope?: MemoryScope;
|
|
231
|
+
category?: MemoryCategory;
|
|
232
|
+
agent_id?: string;
|
|
233
|
+
project_id?: string;
|
|
234
|
+
tags?: string[];
|
|
235
|
+
limit?: number;
|
|
236
|
+
}
|
|
237
|
+
export interface ImportMemoriesInput {
|
|
238
|
+
memories: Partial<Memory>[];
|
|
239
|
+
overwrite?: boolean;
|
|
240
|
+
}
|
|
241
|
+
export interface CreateEntityInput {
|
|
242
|
+
name: string;
|
|
243
|
+
type: EntityType;
|
|
244
|
+
description?: string;
|
|
245
|
+
metadata?: Record<string, unknown>;
|
|
246
|
+
project_id?: string;
|
|
247
|
+
}
|
|
248
|
+
export interface UpdateEntityInput {
|
|
249
|
+
name?: string;
|
|
250
|
+
type?: EntityType;
|
|
251
|
+
description?: string | null;
|
|
252
|
+
metadata?: Record<string, unknown>;
|
|
253
|
+
}
|
|
254
|
+
export interface CreateRelationInput {
|
|
255
|
+
source_entity_id: string;
|
|
256
|
+
target_entity_id: string;
|
|
257
|
+
relation_type: RelationType;
|
|
258
|
+
weight?: number;
|
|
259
|
+
metadata?: Record<string, unknown>;
|
|
260
|
+
}
|
|
261
|
+
export interface ListTasksFilter {
|
|
262
|
+
status?: TaskStatus;
|
|
263
|
+
priority?: TaskPriority;
|
|
264
|
+
assigned_agent_id?: string;
|
|
265
|
+
project_id?: string;
|
|
266
|
+
session_id?: string;
|
|
267
|
+
parent_task_id?: string | null;
|
|
268
|
+
tags?: string[];
|
|
269
|
+
limit?: number;
|
|
270
|
+
offset?: number;
|
|
271
|
+
}
|
|
272
|
+
export interface MementosClientConfig {
|
|
273
|
+
baseUrl?: string;
|
|
274
|
+
fetch?: typeof globalThis.fetch;
|
|
275
|
+
}
|
|
276
|
+
export declare class MementosError extends Error {
|
|
277
|
+
readonly status: number;
|
|
278
|
+
readonly details?: unknown | undefined;
|
|
279
|
+
constructor(message: string, status: number, details?: unknown | undefined);
|
|
280
|
+
}
|
|
281
|
+
export interface AutoMemoryQueueStats {
|
|
282
|
+
pending: number;
|
|
283
|
+
processing: number;
|
|
284
|
+
processed: number;
|
|
285
|
+
failed: number;
|
|
286
|
+
dropped: number;
|
|
287
|
+
}
|
|
288
|
+
export interface AutoMemoryConfig {
|
|
289
|
+
provider: "anthropic" | "openai" | "cerebras" | "grok";
|
|
290
|
+
model?: string;
|
|
291
|
+
enabled: boolean;
|
|
292
|
+
minImportance: number;
|
|
293
|
+
autoEntityLink: boolean;
|
|
294
|
+
fallback?: Array<"anthropic" | "openai" | "cerebras" | "grok">;
|
|
295
|
+
}
|
|
296
|
+
export interface SdkExtractedMemory {
|
|
297
|
+
content: string;
|
|
298
|
+
category: "preference" | "fact" | "knowledge" | "history";
|
|
299
|
+
importance: number;
|
|
300
|
+
tags: string[];
|
|
301
|
+
suggestedScope: "private" | "shared" | "global";
|
|
302
|
+
reasoning?: string;
|
|
303
|
+
}
|
|
304
|
+
export interface SdkHook {
|
|
305
|
+
id: string;
|
|
306
|
+
type: string;
|
|
307
|
+
blocking: boolean;
|
|
308
|
+
priority: number;
|
|
309
|
+
builtin: boolean;
|
|
310
|
+
agentId?: string;
|
|
311
|
+
projectId?: string;
|
|
312
|
+
description?: string;
|
|
313
|
+
}
|
|
314
|
+
export interface SdkWebhook {
|
|
315
|
+
id: string;
|
|
316
|
+
type: string;
|
|
317
|
+
handlerUrl: string;
|
|
318
|
+
priority: number;
|
|
319
|
+
blocking: boolean;
|
|
320
|
+
agentId?: string;
|
|
321
|
+
projectId?: string;
|
|
322
|
+
description?: string;
|
|
323
|
+
enabled: boolean;
|
|
324
|
+
createdAt: string;
|
|
325
|
+
invocationCount: number;
|
|
326
|
+
failureCount: number;
|
|
327
|
+
}
|
|
328
|
+
export interface SynthesisRun {
|
|
329
|
+
id: string;
|
|
330
|
+
triggered_by: string;
|
|
331
|
+
project_id: string | null;
|
|
332
|
+
agent_id: string | null;
|
|
333
|
+
corpus_size: number;
|
|
334
|
+
proposals_generated: number;
|
|
335
|
+
proposals_accepted: number;
|
|
336
|
+
proposals_rejected: number;
|
|
337
|
+
status: "pending" | "running" | "completed" | "failed" | "rolled_back";
|
|
338
|
+
error: string | null;
|
|
339
|
+
started_at: string;
|
|
340
|
+
completed_at: string | null;
|
|
341
|
+
}
|
|
342
|
+
export interface SynthesisResult {
|
|
343
|
+
run: SynthesisRun;
|
|
344
|
+
proposals: unknown[];
|
|
345
|
+
executed: number;
|
|
346
|
+
metrics: {
|
|
347
|
+
corpusReduction: number;
|
|
348
|
+
deduplicationRate: number;
|
|
349
|
+
} | null;
|
|
350
|
+
dryRun: boolean;
|
|
351
|
+
}
|
|
352
|
+
export interface SessionMemoryJob {
|
|
353
|
+
id: string;
|
|
354
|
+
session_id: string;
|
|
355
|
+
agent_id: string | null;
|
|
356
|
+
project_id: string | null;
|
|
357
|
+
source: string;
|
|
358
|
+
status: "pending" | "processing" | "completed" | "failed";
|
|
359
|
+
transcript: string;
|
|
360
|
+
chunk_count: number;
|
|
361
|
+
memories_extracted: number;
|
|
362
|
+
error: string | null;
|
|
363
|
+
metadata: Record<string, unknown>;
|
|
364
|
+
created_at: string;
|
|
365
|
+
started_at: string | null;
|
|
366
|
+
completed_at: string | null;
|
|
367
|
+
}
|
|
368
|
+
export declare class MementosClient {
|
|
369
|
+
private baseUrl;
|
|
370
|
+
private _fetch;
|
|
371
|
+
constructor(config?: MementosClientConfig);
|
|
372
|
+
static fromEnv(overrides?: Partial<MementosClientConfig>): MementosClient;
|
|
373
|
+
private request;
|
|
374
|
+
private get;
|
|
375
|
+
private post;
|
|
376
|
+
private patch;
|
|
377
|
+
private delete;
|
|
378
|
+
listMemories(filter?: ListMemoriesFilter): Promise<{
|
|
379
|
+
memories: Memory[];
|
|
380
|
+
count: number;
|
|
381
|
+
}>;
|
|
382
|
+
getStats(): Promise<MemoryStats>;
|
|
383
|
+
getHealth(): Promise<{
|
|
384
|
+
status: "ok" | "warn";
|
|
385
|
+
version: string;
|
|
386
|
+
profile: string;
|
|
387
|
+
db_path: string;
|
|
388
|
+
hostname: string;
|
|
389
|
+
memories: {
|
|
390
|
+
total: number;
|
|
391
|
+
expired: number;
|
|
392
|
+
pinned: number;
|
|
393
|
+
};
|
|
394
|
+
agents: number;
|
|
395
|
+
projects: number;
|
|
396
|
+
}>;
|
|
397
|
+
getReport(options?: {
|
|
398
|
+
days?: number;
|
|
399
|
+
project_id?: string;
|
|
400
|
+
agent_id?: string;
|
|
401
|
+
}): Promise<{
|
|
402
|
+
total: number;
|
|
403
|
+
pinned: number;
|
|
404
|
+
days: number;
|
|
405
|
+
recent: {
|
|
406
|
+
total: number;
|
|
407
|
+
activity: {
|
|
408
|
+
date: string;
|
|
409
|
+
memories_created: number;
|
|
410
|
+
}[];
|
|
411
|
+
};
|
|
412
|
+
by_scope: Record<string, number>;
|
|
413
|
+
by_category: Record<string, number>;
|
|
414
|
+
top_memories: {
|
|
415
|
+
id: string;
|
|
416
|
+
key: string;
|
|
417
|
+
value: string;
|
|
418
|
+
importance: number;
|
|
419
|
+
scope: string;
|
|
420
|
+
category: string;
|
|
421
|
+
}[];
|
|
422
|
+
top_agents: {
|
|
423
|
+
agent_id: string;
|
|
424
|
+
c: number;
|
|
425
|
+
}[];
|
|
426
|
+
}>;
|
|
427
|
+
getStaleMemories(options?: {
|
|
428
|
+
days?: number;
|
|
429
|
+
project_id?: string;
|
|
430
|
+
agent_id?: string;
|
|
431
|
+
limit?: number;
|
|
432
|
+
}): Promise<{
|
|
433
|
+
memories: Memory[];
|
|
434
|
+
count: number;
|
|
435
|
+
days: number;
|
|
436
|
+
}>;
|
|
437
|
+
getActivity(options?: {
|
|
438
|
+
days?: number;
|
|
439
|
+
scope?: MemoryScope;
|
|
440
|
+
agent_id?: string;
|
|
441
|
+
project_id?: string;
|
|
442
|
+
}): Promise<{
|
|
443
|
+
activity: {
|
|
444
|
+
date: string;
|
|
445
|
+
memories_created: number;
|
|
446
|
+
global_count: number;
|
|
447
|
+
shared_count: number;
|
|
448
|
+
private_count: number;
|
|
449
|
+
avg_importance: number;
|
|
450
|
+
}[];
|
|
451
|
+
days: number;
|
|
452
|
+
total: number;
|
|
453
|
+
}>;
|
|
454
|
+
searchMemories(input: SearchMemoriesInput | string): Promise<{
|
|
455
|
+
results: Memory[];
|
|
456
|
+
count: number;
|
|
457
|
+
}>;
|
|
458
|
+
exportMemories(input?: ExportMemoriesInput): Promise<{
|
|
459
|
+
memories: Memory[];
|
|
460
|
+
count: number;
|
|
461
|
+
}>;
|
|
462
|
+
importMemories(input: ImportMemoriesInput): Promise<{
|
|
463
|
+
imported: number;
|
|
464
|
+
errors: string[];
|
|
465
|
+
total: number;
|
|
466
|
+
}>;
|
|
467
|
+
cleanExpired(): Promise<{
|
|
468
|
+
cleaned: number;
|
|
469
|
+
}>;
|
|
470
|
+
extractFromSession(input: {
|
|
471
|
+
session_id: string;
|
|
472
|
+
title?: string;
|
|
473
|
+
project?: string;
|
|
474
|
+
model?: string;
|
|
475
|
+
messages?: number;
|
|
476
|
+
key_topics?: string[];
|
|
477
|
+
summary?: string;
|
|
478
|
+
agent_id?: string;
|
|
479
|
+
project_id?: string;
|
|
480
|
+
memories?: Partial<CreateMemoryInput>[];
|
|
481
|
+
}): Promise<{
|
|
482
|
+
created: number;
|
|
483
|
+
memory_ids: string[];
|
|
484
|
+
errors: string[];
|
|
485
|
+
session_id: string;
|
|
486
|
+
}>;
|
|
487
|
+
saveMemory(input: CreateMemoryInput): Promise<Memory>;
|
|
488
|
+
getMemory(id: string): Promise<Memory>;
|
|
489
|
+
getMemoryVersions(id: string): Promise<{
|
|
490
|
+
versions: MemoryVersion[];
|
|
491
|
+
count: number;
|
|
492
|
+
current_version: number;
|
|
493
|
+
}>;
|
|
494
|
+
updateMemory(id: string, input: UpdateMemoryInput): Promise<Memory>;
|
|
495
|
+
deleteMemory(id: string): Promise<{
|
|
496
|
+
deleted: boolean;
|
|
497
|
+
}>;
|
|
498
|
+
listAgents(): Promise<{
|
|
499
|
+
agents: Agent[];
|
|
500
|
+
}>;
|
|
501
|
+
registerAgent(input: {
|
|
502
|
+
name: string;
|
|
503
|
+
role?: string;
|
|
504
|
+
description?: string;
|
|
505
|
+
}): Promise<Agent>;
|
|
506
|
+
getAgent(idOrName: string): Promise<Agent>;
|
|
507
|
+
updateAgent(idOrName: string, updates: {
|
|
508
|
+
name?: string;
|
|
509
|
+
role?: string;
|
|
510
|
+
description?: string;
|
|
511
|
+
metadata?: Record<string, unknown>;
|
|
512
|
+
active_project_id?: string | null;
|
|
513
|
+
}): Promise<Agent>;
|
|
514
|
+
listAgentsByProject(projectId: string): Promise<{
|
|
515
|
+
agents: Agent[];
|
|
516
|
+
count: number;
|
|
517
|
+
}>;
|
|
518
|
+
listProjects(): Promise<{
|
|
519
|
+
projects: Project[];
|
|
520
|
+
}>;
|
|
521
|
+
registerProject(input: {
|
|
522
|
+
name: string;
|
|
523
|
+
path?: string;
|
|
524
|
+
description?: string;
|
|
525
|
+
memory_prefix?: string;
|
|
526
|
+
}): Promise<Project>;
|
|
527
|
+
getProject(idOrName: string): Promise<Project>;
|
|
528
|
+
getProjectAgents(idOrName: string): Promise<{
|
|
529
|
+
agents: Agent[];
|
|
530
|
+
count: number;
|
|
531
|
+
}>;
|
|
532
|
+
listEntities(filter?: {
|
|
533
|
+
type?: EntityType;
|
|
534
|
+
limit?: number;
|
|
535
|
+
offset?: number;
|
|
536
|
+
}): Promise<{
|
|
537
|
+
entities: Entity[];
|
|
538
|
+
count: number;
|
|
539
|
+
}>;
|
|
540
|
+
createEntity(input: CreateEntityInput): Promise<Entity>;
|
|
541
|
+
mergeEntities(input: {
|
|
542
|
+
source_id: string;
|
|
543
|
+
target_id: string;
|
|
544
|
+
}): Promise<Entity>;
|
|
545
|
+
getEntity(id: string): Promise<Entity>;
|
|
546
|
+
updateEntity(id: string, input: UpdateEntityInput): Promise<Entity>;
|
|
547
|
+
deleteEntity(id: string): Promise<{
|
|
548
|
+
deleted: boolean;
|
|
549
|
+
}>;
|
|
550
|
+
getEntityMemories(entityId: string): Promise<{
|
|
551
|
+
memories: Memory[];
|
|
552
|
+
count: number;
|
|
553
|
+
}>;
|
|
554
|
+
linkEntityMemory(entityId: string, input: {
|
|
555
|
+
memory_id: string;
|
|
556
|
+
role?: EntityRole;
|
|
557
|
+
}): Promise<{
|
|
558
|
+
linked: boolean;
|
|
559
|
+
}>;
|
|
560
|
+
unlinkEntityMemory(entityId: string, memoryId: string): Promise<{
|
|
561
|
+
unlinked: boolean;
|
|
562
|
+
}>;
|
|
563
|
+
getEntityRelations(entityId: string, filter?: {
|
|
564
|
+
relation_type?: RelationType;
|
|
565
|
+
direction?: "from" | "to" | "both";
|
|
566
|
+
}): Promise<{
|
|
567
|
+
relations: Relation[];
|
|
568
|
+
}>;
|
|
569
|
+
createRelation(input: CreateRelationInput): Promise<Relation>;
|
|
570
|
+
getRelation(id: string): Promise<Relation>;
|
|
571
|
+
deleteRelation(id: string): Promise<{
|
|
572
|
+
deleted: boolean;
|
|
573
|
+
}>;
|
|
574
|
+
getGraph(entityId: string, options?: {
|
|
575
|
+
depth?: number;
|
|
576
|
+
relation_types?: RelationType[];
|
|
577
|
+
}): Promise<{
|
|
578
|
+
nodes: Entity[];
|
|
579
|
+
edges: Relation[];
|
|
580
|
+
}>;
|
|
581
|
+
findPath(fromId: string, toId: string): Promise<{
|
|
582
|
+
path: Entity[];
|
|
583
|
+
found: boolean;
|
|
584
|
+
}>;
|
|
585
|
+
getGraphStats(): Promise<{
|
|
586
|
+
entity_count: number;
|
|
587
|
+
relation_count: number;
|
|
588
|
+
by_type: Record<string, number>;
|
|
589
|
+
}>;
|
|
590
|
+
acquireLock(input: AcquireLockInput): Promise<ResourceLock | null>;
|
|
591
|
+
checkLock(resourceType: ResourceType, resourceId: string, lockType?: LockType): Promise<ResourceLock[]>;
|
|
592
|
+
releaseLock(lockId: string, agentId: string): Promise<{
|
|
593
|
+
released: boolean;
|
|
594
|
+
}>;
|
|
595
|
+
listAgentLocks(agentId: string): Promise<ResourceLock[]>;
|
|
596
|
+
releaseAllAgentLocks(agentId: string): Promise<{
|
|
597
|
+
released: number;
|
|
598
|
+
}>;
|
|
599
|
+
cleanExpiredLocks(): Promise<{
|
|
600
|
+
cleaned: number;
|
|
601
|
+
}>;
|
|
602
|
+
/** Create a task. */
|
|
603
|
+
createTask(input: CreateTaskInput): Promise<Task>;
|
|
604
|
+
/** List tasks with optional filters. */
|
|
605
|
+
listTasks(filter?: ListTasksFilter): Promise<{
|
|
606
|
+
tasks: Task[];
|
|
607
|
+
count: number;
|
|
608
|
+
}>;
|
|
609
|
+
/** Get task stats (by status, priority, overdue). */
|
|
610
|
+
getTaskStats(options?: {
|
|
611
|
+
project_id?: string;
|
|
612
|
+
agent_id?: string;
|
|
613
|
+
}): Promise<TaskStats>;
|
|
614
|
+
/** Get a task by ID. */
|
|
615
|
+
getTask(id: string): Promise<Task>;
|
|
616
|
+
/** Update a task. */
|
|
617
|
+
updateTask(id: string, input: UpdateTaskInput): Promise<Task>;
|
|
618
|
+
/** Delete a task. */
|
|
619
|
+
deleteTask(id: string): Promise<{
|
|
620
|
+
deleted: boolean;
|
|
621
|
+
}>;
|
|
622
|
+
/** List comments on a task. */
|
|
623
|
+
listTaskComments(taskId: string): Promise<{
|
|
624
|
+
comments: TaskComment[];
|
|
625
|
+
count: number;
|
|
626
|
+
}>;
|
|
627
|
+
/** Add a comment to a task. */
|
|
628
|
+
addTaskComment(taskId: string, body: string, agentId?: string): Promise<TaskComment>;
|
|
629
|
+
/** Delete a task comment. */
|
|
630
|
+
deleteTaskComment(taskId: string, commentId: string): Promise<{
|
|
631
|
+
deleted: boolean;
|
|
632
|
+
}>;
|
|
633
|
+
getContext(options?: {
|
|
634
|
+
agent_id?: string;
|
|
635
|
+
project_id?: string;
|
|
636
|
+
max_tokens?: number;
|
|
637
|
+
format?: "xml" | "markdown" | "compact" | "json";
|
|
638
|
+
}): Promise<{
|
|
639
|
+
context: string;
|
|
640
|
+
memories_count: number;
|
|
641
|
+
}>;
|
|
642
|
+
processConversationTurn(turn: string, context?: {
|
|
643
|
+
agent_id?: string;
|
|
644
|
+
project_id?: string;
|
|
645
|
+
session_id?: string;
|
|
646
|
+
}): Promise<{
|
|
647
|
+
queued: boolean;
|
|
648
|
+
queue: AutoMemoryQueueStats;
|
|
649
|
+
}>;
|
|
650
|
+
getAutoMemoryStatus(): Promise<{
|
|
651
|
+
queue: AutoMemoryQueueStats;
|
|
652
|
+
config: AutoMemoryConfig;
|
|
653
|
+
providers: Record<string, {
|
|
654
|
+
available: boolean;
|
|
655
|
+
model: string;
|
|
656
|
+
}>;
|
|
657
|
+
}>;
|
|
658
|
+
configureAutoMemory(config: Partial<AutoMemoryConfig> & {
|
|
659
|
+
min_importance?: number;
|
|
660
|
+
auto_entity_link?: boolean;
|
|
661
|
+
}): Promise<{
|
|
662
|
+
updated: boolean;
|
|
663
|
+
config: AutoMemoryConfig;
|
|
664
|
+
}>;
|
|
665
|
+
testExtraction(turn: string, options?: {
|
|
666
|
+
provider?: "anthropic" | "openai" | "cerebras" | "grok";
|
|
667
|
+
agent_id?: string;
|
|
668
|
+
project_id?: string;
|
|
669
|
+
}): Promise<{
|
|
670
|
+
provider: string;
|
|
671
|
+
model: string;
|
|
672
|
+
extracted: SdkExtractedMemory[];
|
|
673
|
+
count: number;
|
|
674
|
+
note: string;
|
|
675
|
+
}>;
|
|
676
|
+
listHooks(type?: string): Promise<SdkHook[]>;
|
|
677
|
+
getHookStats(): Promise<{
|
|
678
|
+
total: number;
|
|
679
|
+
byType: Record<string, number>;
|
|
680
|
+
blocking: number;
|
|
681
|
+
nonBlocking: number;
|
|
682
|
+
}>;
|
|
683
|
+
listWebhooks(filter?: {
|
|
684
|
+
type?: string;
|
|
685
|
+
enabled?: boolean;
|
|
686
|
+
}): Promise<SdkWebhook[]>;
|
|
687
|
+
createWebhook(input: {
|
|
688
|
+
type: string;
|
|
689
|
+
handler_url: string;
|
|
690
|
+
priority?: number;
|
|
691
|
+
blocking?: boolean;
|
|
692
|
+
agent_id?: string;
|
|
693
|
+
project_id?: string;
|
|
694
|
+
description?: string;
|
|
695
|
+
}): Promise<SdkWebhook>;
|
|
696
|
+
getWebhook(id: string): Promise<SdkWebhook>;
|
|
697
|
+
updateWebhook(id: string, updates: {
|
|
698
|
+
enabled?: boolean;
|
|
699
|
+
priority?: number;
|
|
700
|
+
description?: string;
|
|
701
|
+
}): Promise<SdkWebhook>;
|
|
702
|
+
deleteWebhook(id: string): Promise<void>;
|
|
703
|
+
enableWebhook(id: string): Promise<SdkWebhook>;
|
|
704
|
+
disableWebhook(id: string): Promise<SdkWebhook>;
|
|
705
|
+
runSynthesis(options?: {
|
|
706
|
+
project_id?: string;
|
|
707
|
+
agent_id?: string;
|
|
708
|
+
dry_run?: boolean;
|
|
709
|
+
max_proposals?: number;
|
|
710
|
+
provider?: string;
|
|
711
|
+
}): Promise<SynthesisResult>;
|
|
712
|
+
listSynthesisRuns(filter?: {
|
|
713
|
+
project_id?: string;
|
|
714
|
+
limit?: number;
|
|
715
|
+
}): Promise<{
|
|
716
|
+
runs: SynthesisRun[];
|
|
717
|
+
count: number;
|
|
718
|
+
}>;
|
|
719
|
+
getSynthesisStatus(options?: {
|
|
720
|
+
project_id?: string;
|
|
721
|
+
run_id?: string;
|
|
722
|
+
}): Promise<{
|
|
723
|
+
lastRun: SynthesisRun | null;
|
|
724
|
+
recentRuns: SynthesisRun[];
|
|
725
|
+
}>;
|
|
726
|
+
rollbackSynthesis(runId: string): Promise<{
|
|
727
|
+
rolled_back: number;
|
|
728
|
+
errors: string[];
|
|
729
|
+
}>;
|
|
730
|
+
ingestSession(input: {
|
|
731
|
+
transcript: string;
|
|
732
|
+
session_id: string;
|
|
733
|
+
agent_id?: string;
|
|
734
|
+
project_id?: string;
|
|
735
|
+
source?: "claude-code" | "codex" | "manual" | "open-sessions";
|
|
736
|
+
metadata?: Record<string, unknown>;
|
|
737
|
+
}): Promise<{
|
|
738
|
+
job_id: string;
|
|
739
|
+
status: string;
|
|
740
|
+
message: string;
|
|
741
|
+
}>;
|
|
742
|
+
getSessionJob(jobId: string): Promise<SessionMemoryJob>;
|
|
743
|
+
listSessionJobs(filter?: {
|
|
744
|
+
agent_id?: string;
|
|
745
|
+
project_id?: string;
|
|
746
|
+
status?: string;
|
|
747
|
+
limit?: number;
|
|
748
|
+
}): Promise<{
|
|
749
|
+
jobs: SessionMemoryJob[];
|
|
750
|
+
count: number;
|
|
751
|
+
}>;
|
|
752
|
+
getSessionQueueStats(): Promise<{
|
|
753
|
+
pending: number;
|
|
754
|
+
processing: number;
|
|
755
|
+
completed: number;
|
|
756
|
+
failed: number;
|
|
757
|
+
}>;
|
|
758
|
+
}
|
|
759
|
+
export default MementosClient;
|
|
760
|
+
//# sourceMappingURL=index.d.ts.map
|