memento-mcp-server 1.27.0 โ 1.28.0-c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +270 -195
- package/README.md +187 -274
- package/dist/cli/agent-ask.d.ts.map +1 -1
- package/dist/cli/agent-ask.js +18 -14
- package/dist/cli/agent-ask.js.map +1 -1
- package/dist/cli/agent-ops.d.ts +23 -0
- package/dist/cli/agent-ops.d.ts.map +1 -0
- package/dist/cli/agent-ops.js +568 -0
- package/dist/cli/agent-ops.js.map +1 -0
- package/dist/cli/claude-code-connect.d.ts +12 -0
- package/dist/cli/claude-code-connect.d.ts.map +1 -0
- package/dist/cli/claude-code-connect.js +91 -0
- package/dist/cli/claude-code-connect.js.map +1 -0
- package/dist/cli/claude-code-hook.d.ts +12 -0
- package/dist/cli/claude-code-hook.d.ts.map +1 -0
- package/dist/cli/claude-code-hook.js +104 -0
- package/dist/cli/claude-code-hook.js.map +1 -0
- package/dist/cli/codex-connect.d.ts +12 -0
- package/dist/cli/codex-connect.d.ts.map +1 -0
- package/dist/cli/codex-connect.js +86 -0
- package/dist/cli/codex-connect.js.map +1 -0
- package/dist/cli/codex-hook.d.ts +12 -0
- package/dist/cli/codex-hook.d.ts.map +1 -0
- package/dist/cli/codex-hook.js +100 -0
- package/dist/cli/codex-hook.js.map +1 -0
- package/dist/cli/review-queue-cleanup.d.ts +26 -0
- package/dist/cli/review-queue-cleanup.d.ts.map +1 -0
- package/dist/cli/review-queue-cleanup.js +183 -0
- package/dist/cli/review-queue-cleanup.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +37 -2
- package/dist/cli.js.map +1 -1
- package/dist/server/http-server.d.ts.map +1 -1
- package/dist/server/http-server.js +33 -4
- package/dist/server/http-server.js.map +1 -1
- package/dist/server/middleware/programmatic-auth.middleware.d.ts +1 -0
- package/dist/server/middleware/programmatic-auth.middleware.d.ts.map +1 -1
- package/dist/server/middleware/programmatic-auth.middleware.js +22 -4
- package/dist/server/middleware/programmatic-auth.middleware.js.map +1 -1
- package/dist/server/review-candidates-changed-fanout.d.ts +1 -1
- package/dist/server/review-candidates-changed-fanout.d.ts.map +1 -1
- package/dist/server/review-candidates-changed-fanout.js.map +1 -1
- package/dist/server/routes/admin/admin-evolution-demo.routes.d.ts +6 -0
- package/dist/server/routes/admin/admin-evolution-demo.routes.d.ts.map +1 -0
- package/dist/server/routes/admin/admin-evolution-demo.routes.js +44 -0
- package/dist/server/routes/admin/admin-evolution-demo.routes.js.map +1 -0
- package/dist/server/routes/admin/admin-memory-review.routes.d.ts.map +1 -1
- package/dist/server/routes/admin/admin-memory-review.routes.js +86 -1
- package/dist/server/routes/admin/admin-memory-review.routes.js.map +1 -1
- package/dist/server/routes/admin.routes.d.ts.map +1 -1
- package/dist/server/routes/admin.routes.js +2 -0
- package/dist/server/routes/admin.routes.js.map +1 -1
- package/dist/server/routes/agent-transcript-import.d.ts +51 -0
- package/dist/server/routes/agent-transcript-import.d.ts.map +1 -0
- package/dist/server/routes/agent-transcript-import.js +206 -0
- package/dist/server/routes/agent-transcript-import.js.map +1 -0
- package/dist/server/routes/agent.routes.d.ts +9 -0
- package/dist/server/routes/agent.routes.d.ts.map +1 -0
- package/dist/server/routes/agent.routes.dto.d.ts +87 -0
- package/dist/server/routes/agent.routes.dto.d.ts.map +1 -0
- package/dist/server/routes/agent.routes.dto.js +134 -0
- package/dist/server/routes/agent.routes.dto.js.map +1 -0
- package/dist/server/routes/agent.routes.events.d.ts +3 -0
- package/dist/server/routes/agent.routes.events.d.ts.map +1 -0
- package/dist/server/routes/agent.routes.events.js +89 -0
- package/dist/server/routes/agent.routes.events.js.map +1 -0
- package/dist/server/routes/agent.routes.injection.d.ts +14 -0
- package/dist/server/routes/agent.routes.injection.d.ts.map +1 -0
- package/dist/server/routes/agent.routes.injection.js +110 -0
- package/dist/server/routes/agent.routes.injection.js.map +1 -0
- package/dist/server/routes/agent.routes.js +892 -0
- package/dist/server/routes/agent.routes.js.map +1 -0
- package/dist/server/routes/agent.routes.utils.d.ts +15 -0
- package/dist/server/routes/agent.routes.utils.d.ts.map +1 -0
- package/dist/server/routes/agent.routes.utils.js +89 -0
- package/dist/server/routes/agent.routes.utils.js.map +1 -0
- package/dist/server/routes/mcp.routes.d.ts.map +1 -1
- package/dist/server/routes/mcp.routes.js +17 -6
- package/dist/server/routes/mcp.routes.js.map +1 -1
- package/dist/server/utils/mcp-tool-call-error.d.ts +11 -0
- package/dist/server/utils/mcp-tool-call-error.d.ts.map +1 -0
- package/dist/server/utils/mcp-tool-call-error.js +23 -0
- package/dist/server/utils/mcp-tool-call-error.js.map +1 -0
- package/node_modules/@memento/core/dist/bootstrap/monitoring-schedulers.d.ts.map +1 -1
- package/node_modules/@memento/core/dist/bootstrap/monitoring-schedulers.js +1 -1
- package/node_modules/@memento/core/dist/bootstrap/monitoring-schedulers.js.map +1 -1
- package/node_modules/@memento/core/dist/database/schema.sql +107 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/repositories/agent-integration-repository.d.ts +96 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/repositories/agent-integration-repository.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/repositories/agent-integration-repository.js +2 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/repositories/agent-integration-repository.js.map +1 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-capture-transaction.d.ts +8 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-capture-transaction.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-capture-transaction.js +89 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-capture-transaction.js.map +1 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-context-injection-service.d.ts +90 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-context-injection-service.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-context-injection-service.js +163 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-context-injection-service.js.map +1 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-context-recall-service.d.ts +95 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-context-recall-service.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-context-recall-service.js +267 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-context-recall-service.js.map +1 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-integration-error.d.ts +8 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-integration-error.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-integration-error.js +13 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-integration-error.js.map +1 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-lifecycle-service.d.ts +53 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-lifecycle-service.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-lifecycle-service.js +112 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-lifecycle-service.js.map +1 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-memory-promotion-service.d.ts +44 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-memory-promotion-service.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-memory-promotion-service.js +197 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-memory-promotion-service.js.map +1 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-provenance-graph.d.ts +9 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-provenance-graph.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-provenance-graph.js +102 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-provenance-graph.js.map +1 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-session-summary-service.d.ts +36 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-session-summary-service.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-session-summary-service.js +130 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/agent-session-summary-service.js.map +1 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/sqlite-hybrid-agent-context-source.d.ts +20 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/sqlite-hybrid-agent-context-source.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/sqlite-hybrid-agent-context-source.js +128 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/services/sqlite-hybrid-agent-context-source.js.map +1 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/types.d.ts +152 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/types.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/types.js +2 -0
- package/node_modules/@memento/core/dist/domains/agent-integration/types.js.map +1 -0
- package/node_modules/@memento/core/dist/domains/consolidation/services/summarization-service.d.ts.map +1 -1
- package/node_modules/@memento/core/dist/domains/consolidation/services/summarization-service.js +3 -2
- package/node_modules/@memento/core/dist/domains/consolidation/services/summarization-service.js.map +1 -1
- package/node_modules/@memento/core/dist/domains/evolution-demo/fixtures/answer-over-time.snapshots.d.ts +46 -0
- package/node_modules/@memento/core/dist/domains/evolution-demo/fixtures/answer-over-time.snapshots.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/domains/evolution-demo/fixtures/answer-over-time.snapshots.js +46 -0
- package/node_modules/@memento/core/dist/domains/evolution-demo/fixtures/answer-over-time.snapshots.js.map +1 -0
- package/node_modules/@memento/core/dist/domains/evolution-demo/fixtures/forgetting-policy.snapshots.d.ts +47 -0
- package/node_modules/@memento/core/dist/domains/evolution-demo/fixtures/forgetting-policy.snapshots.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/domains/evolution-demo/fixtures/forgetting-policy.snapshots.js +79 -0
- package/node_modules/@memento/core/dist/domains/evolution-demo/fixtures/forgetting-policy.snapshots.js.map +1 -0
- package/node_modules/@memento/core/dist/domains/evolution-demo/getters.d.ts +12 -0
- package/node_modules/@memento/core/dist/domains/evolution-demo/getters.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/domains/evolution-demo/getters.js +69 -0
- package/node_modules/@memento/core/dist/domains/evolution-demo/getters.js.map +1 -0
- package/node_modules/@memento/core/dist/domains/evolution-demo/index.d.ts +4 -0
- package/node_modules/@memento/core/dist/domains/evolution-demo/index.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/domains/evolution-demo/index.js +3 -0
- package/node_modules/@memento/core/dist/domains/evolution-demo/index.js.map +1 -0
- package/node_modules/@memento/core/dist/domains/evolution-demo/spec.d.ts +337 -0
- package/node_modules/@memento/core/dist/domains/evolution-demo/spec.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/domains/evolution-demo/spec.js +66 -0
- package/node_modules/@memento/core/dist/domains/evolution-demo/spec.js.map +1 -0
- package/node_modules/@memento/core/dist/domains/evolution-demo/store.d.ts +8 -0
- package/node_modules/@memento/core/dist/domains/evolution-demo/store.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/domains/evolution-demo/store.js +124 -0
- package/node_modules/@memento/core/dist/domains/evolution-demo/store.js.map +1 -0
- package/node_modules/@memento/core/dist/domains/evolution-demo/types.d.ts +66 -0
- package/node_modules/@memento/core/dist/domains/evolution-demo/types.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/domains/evolution-demo/types.js +6 -0
- package/node_modules/@memento/core/dist/domains/evolution-demo/types.js.map +1 -0
- package/node_modules/@memento/core/dist/domains/memory/services/memory-review-candidate-persistence-service.d.ts +4 -1
- package/node_modules/@memento/core/dist/domains/memory/services/memory-review-candidate-persistence-service.d.ts.map +1 -1
- package/node_modules/@memento/core/dist/domains/memory/services/memory-review-candidate-persistence-service.js +50 -0
- package/node_modules/@memento/core/dist/domains/memory/services/memory-review-candidate-persistence-service.js.map +1 -1
- package/node_modules/@memento/core/dist/domains/memory/services/memory-review-candidate-persistence.types.d.ts +12 -0
- package/node_modules/@memento/core/dist/domains/memory/services/memory-review-candidate-persistence.types.d.ts.map +1 -1
- package/node_modules/@memento/core/dist/domains/memory/services/memory-review-candidate-selection-env.d.ts +2 -1
- package/node_modules/@memento/core/dist/domains/memory/services/memory-review-candidate-selection-env.d.ts.map +1 -1
- package/node_modules/@memento/core/dist/domains/memory/services/memory-review-candidate-selection-env.js +18 -0
- package/node_modules/@memento/core/dist/domains/memory/services/memory-review-candidate-selection-env.js.map +1 -1
- package/node_modules/@memento/core/dist/domains/memory/services/memory-review-candidate-selection.types.d.ts +4 -0
- package/node_modules/@memento/core/dist/domains/memory/services/memory-review-candidate-selection.types.d.ts.map +1 -1
- package/node_modules/@memento/core/dist/domains/memory/services/procedural-llm-extractor.d.ts.map +1 -1
- package/node_modules/@memento/core/dist/domains/memory/services/procedural-llm-extractor.js +3 -2
- package/node_modules/@memento/core/dist/domains/memory/services/procedural-llm-extractor.js.map +1 -1
- package/node_modules/@memento/core/dist/domains/memory/tools/feedback-tool.d.ts.map +1 -1
- package/node_modules/@memento/core/dist/domains/memory/tools/feedback-tool.js +29 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/feedback-tool.js.map +1 -1
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-anchor-rotation.d.ts +17 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-anchor-rotation.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-anchor-rotation.js +117 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-anchor-rotation.js.map +1 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-definition.d.ts +212 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-definition.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-definition.js +201 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-definition.js.map +1 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-direct.d.ts +9 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-direct.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-direct.js +88 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-direct.js.map +1 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-envelope.d.ts +36 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-envelope.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-envelope.js +160 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-envelope.js.map +1 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-host.d.ts +13 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-host.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-host.js +5 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-host.js.map +1 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-neighbors-fetch.d.ts +12 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-neighbors-fetch.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-neighbors-fetch.js +101 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-neighbors-fetch.js.map +1 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-post-search.d.ts +50 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-post-search.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-post-search.js +242 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-post-search.js.map +1 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-schema.d.ts +28 -28
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-search-execution.d.ts +27 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-search-execution.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-search-execution.js +79 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool-search-execution.js.map +1 -0
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool.d.ts +3 -69
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool.d.ts.map +1 -1
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool.js +22 -1078
- package/node_modules/@memento/core/dist/domains/memory/tools/recall-tool.js.map +1 -1
- package/node_modules/@memento/core/dist/domains/monitoring/services/runtime-diagnostics-logger.d.ts +3 -1
- package/node_modules/@memento/core/dist/domains/monitoring/services/runtime-diagnostics-logger.d.ts.map +1 -1
- package/node_modules/@memento/core/dist/domains/monitoring/services/runtime-diagnostics-logger.js +9 -2
- package/node_modules/@memento/core/dist/domains/monitoring/services/runtime-diagnostics-logger.js.map +1 -1
- package/node_modules/@memento/core/dist/domains/relation/services/llm-relation-extractor/extract-relations-gemini.js +2 -2
- package/node_modules/@memento/core/dist/domains/relation/services/llm-relation-extractor/extract-relations-gemini.js.map +1 -1
- package/node_modules/@memento/core/dist/domains/relation/services/llm-relation-extractor/extract-relations-ollama.d.ts.map +1 -1
- package/node_modules/@memento/core/dist/domains/relation/services/llm-relation-extractor/extract-relations-ollama.js +2 -1
- package/node_modules/@memento/core/dist/domains/relation/services/llm-relation-extractor/extract-relations-ollama.js.map +1 -1
- package/node_modules/@memento/core/dist/domains/relation/services/llm-relation-extractor/extract-relations-openai.js +2 -2
- package/node_modules/@memento/core/dist/domains/relation/services/llm-relation-extractor/extract-relations-openai.js.map +1 -1
- package/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extraction-llm-providers.d.ts.map +1 -1
- package/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extraction-llm-providers.js +4 -3
- package/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extraction-llm-providers.js.map +1 -1
- package/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extractor.d.ts.map +1 -1
- package/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extractor.js +4 -3
- package/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extractor.js.map +1 -1
- package/node_modules/@memento/core/dist/domains/search/repositories/vector-search.repository.d.ts +5 -0
- package/node_modules/@memento/core/dist/domains/search/repositories/vector-search.repository.d.ts.map +1 -1
- package/node_modules/@memento/core/dist/domains/search/repositories/vector-search.repository.js +26 -2
- package/node_modules/@memento/core/dist/domains/search/repositories/vector-search.repository.js.map +1 -1
- package/node_modules/@memento/core/dist/domains/telemetry/types/telemetry.types.d.ts +1 -1
- package/node_modules/@memento/core/dist/domains/telemetry/types/telemetry.types.d.ts.map +1 -1
- package/node_modules/@memento/core/dist/index.d.ts +24 -4
- package/node_modules/@memento/core/dist/index.d.ts.map +1 -1
- package/node_modules/@memento/core/dist/index.js +15 -2
- package/node_modules/@memento/core/dist/index.js.map +1 -1
- package/node_modules/@memento/core/dist/infrastructure/database/database/migration/migrations/035-agent-integration-schema.d.ts +13 -0
- package/node_modules/@memento/core/dist/infrastructure/database/database/migration/migrations/035-agent-integration-schema.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/infrastructure/database/database/migration/migrations/035-agent-integration-schema.js +131 -0
- package/node_modules/@memento/core/dist/infrastructure/database/database/migration/migrations/035-agent-integration-schema.js.map +1 -0
- package/node_modules/@memento/core/dist/infrastructure/database/database/migration/migrations/036-agent-memory-promotion-schema.d.ts +13 -0
- package/node_modules/@memento/core/dist/infrastructure/database/database/migration/migrations/036-agent-memory-promotion-schema.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/infrastructure/database/database/migration/migrations/036-agent-memory-promotion-schema.js +74 -0
- package/node_modules/@memento/core/dist/infrastructure/database/database/migration/migrations/036-agent-memory-promotion-schema.js.map +1 -0
- package/node_modules/@memento/core/dist/infrastructure/database/repositories/sqlite-agent-integration-repository.d.ts +81 -0
- package/node_modules/@memento/core/dist/infrastructure/database/repositories/sqlite-agent-integration-repository.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/infrastructure/database/repositories/sqlite-agent-integration-repository.js +627 -0
- package/node_modules/@memento/core/dist/infrastructure/database/repositories/sqlite-agent-integration-repository.js.map +1 -0
- package/node_modules/@memento/core/dist/infrastructure/scheduler/batch-job-execution-coordinator.d.ts.map +1 -1
- package/node_modules/@memento/core/dist/infrastructure/scheduler/batch-job-execution-coordinator.js +11 -3
- package/node_modules/@memento/core/dist/infrastructure/scheduler/batch-job-execution-coordinator.js.map +1 -1
- package/node_modules/@memento/core/dist/infrastructure/scheduler/batch-job-timeout-resolver.d.ts +10 -0
- package/node_modules/@memento/core/dist/infrastructure/scheduler/batch-job-timeout-resolver.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/infrastructure/scheduler/batch-job-timeout-resolver.js +19 -0
- package/node_modules/@memento/core/dist/infrastructure/scheduler/batch-job-timeout-resolver.js.map +1 -0
- package/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler-default-config.d.ts.map +1 -1
- package/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler-default-config.js +2 -1
- package/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler-default-config.js.map +1 -1
- package/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler-types.d.ts +2 -0
- package/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler-types.d.ts.map +1 -1
- package/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler-validate-config.d.ts.map +1 -1
- package/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler-validate-config.js +10 -0
- package/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler-validate-config.js.map +1 -1
- package/node_modules/@memento/core/dist/infrastructure/scheduler/handlers/batch-scheduler-consolidation-relation-handlers.d.ts.map +1 -1
- package/node_modules/@memento/core/dist/infrastructure/scheduler/handlers/batch-scheduler-consolidation-relation-handlers.js +6 -2
- package/node_modules/@memento/core/dist/infrastructure/scheduler/handlers/batch-scheduler-consolidation-relation-handlers.js.map +1 -1
- package/node_modules/@memento/core/dist/infrastructure/scheduler/handlers/batch-scheduler-review-meta-handlers.d.ts +1 -2
- package/node_modules/@memento/core/dist/infrastructure/scheduler/handlers/batch-scheduler-review-meta-handlers.d.ts.map +1 -1
- package/node_modules/@memento/core/dist/infrastructure/scheduler/handlers/batch-scheduler-review-meta-handlers.js +46 -8
- package/node_modules/@memento/core/dist/infrastructure/scheduler/handlers/batch-scheduler-review-meta-handlers.js.map +1 -1
- package/node_modules/@memento/core/dist/infrastructure/scheduler/memory-review-candidates-run-diagnostics.d.ts.map +1 -1
- package/node_modules/@memento/core/dist/infrastructure/scheduler/memory-review-candidates-run-diagnostics.js +22 -4
- package/node_modules/@memento/core/dist/infrastructure/scheduler/memory-review-candidates-run-diagnostics.js.map +1 -1
- package/node_modules/@memento/core/dist/infrastructure/scheduler/relation-validator-executor.d.ts +3 -0
- package/node_modules/@memento/core/dist/infrastructure/scheduler/relation-validator-executor.d.ts.map +1 -1
- package/node_modules/@memento/core/dist/infrastructure/scheduler/relation-validator-executor.js +45 -6
- package/node_modules/@memento/core/dist/infrastructure/scheduler/relation-validator-executor.js.map +1 -1
- package/node_modules/@memento/core/dist/shared/config/environment.d.ts.map +1 -1
- package/node_modules/@memento/core/dist/shared/config/environment.js +1 -0
- package/node_modules/@memento/core/dist/shared/config/environment.js.map +1 -1
- package/node_modules/@memento/core/dist/shared/config/index.d.ts.map +1 -1
- package/node_modules/@memento/core/dist/shared/config/index.js +9 -0
- package/node_modules/@memento/core/dist/shared/config/index.js.map +1 -1
- package/node_modules/@memento/core/dist/shared/config/llm-model-resolver.d.ts +15 -0
- package/node_modules/@memento/core/dist/shared/config/llm-model-resolver.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/shared/config/llm-model-resolver.js +39 -0
- package/node_modules/@memento/core/dist/shared/config/llm-model-resolver.js.map +1 -0
- package/node_modules/@memento/core/dist/shared/services/llm-client-initializer.d.ts.map +1 -1
- package/node_modules/@memento/core/dist/shared/services/llm-client-initializer.js +5 -4
- package/node_modules/@memento/core/dist/shared/services/llm-client-initializer.js.map +1 -1
- package/node_modules/@memento/core/dist/shared/types/index.d.ts +11 -0
- package/node_modules/@memento/core/dist/shared/types/index.d.ts.map +1 -1
- package/node_modules/@memento/core/dist/shared/utils/configuration-validator.d.ts +2 -2
- package/node_modules/@memento/core/dist/shared/utils/configuration-validator.d.ts.map +1 -1
- package/node_modules/@memento/core/dist/shared/utils/jsonl-rotation.d.ts +2 -0
- package/node_modules/@memento/core/dist/shared/utils/jsonl-rotation.d.ts.map +1 -0
- package/node_modules/@memento/core/dist/shared/utils/jsonl-rotation.js +43 -0
- package/node_modules/@memento/core/dist/shared/utils/jsonl-rotation.js.map +1 -0
- package/node_modules/@memento/core/dist/shared/utils/pii-masker.js +4 -4
- package/node_modules/@memento/core/dist/shared/utils/pii-masker.js.map +1 -1
- package/node_modules/@memento/core/dist/test/helpers/vector-search-quality-metrics.d.ts +1 -1
- package/node_modules/@memento/core/dist/test/helpers/vector-search-quality-metrics.d.ts.map +1 -1
- package/package.json +21 -5
- package/scripts/acquire-longmemeval.spec.ts +14 -0
- package/scripts/acquire-longmemeval.ts +75 -0
- package/scripts/agent-integration-release-gate.spec.ts +156 -0
- package/scripts/agent-integration-release-gate.ts +280 -0
- package/scripts/agent-memory-benchmark-adapter.spec.ts +155 -0
- package/scripts/agent-memory-benchmark-adapter.ts +523 -0
- package/scripts/agent-memory-benchmark.spec.ts +148 -0
- package/scripts/agent-memory-benchmark.ts +819 -0
- package/scripts/agent-smoke-matrix.spec.ts +178 -0
- package/scripts/agent-smoke-matrix.ts +776 -0
- package/scripts/collect-docker-diagnostics.sh +29 -0
- package/scripts/compare-weight-profiles.spec.ts +44 -0
- package/scripts/compare-weight-profiles.ts +70 -29
- package/scripts/generate-relation-report.ts +9 -6
- package/scripts/log-issue-monitor/__tests__/config.spec.ts +1 -0
- package/scripts/log-issue-monitor/__tests__/detectors.spec.ts +13 -0
- package/scripts/log-issue-monitor/__tests__/monitor.spec.ts +3 -2
- package/scripts/log-issue-monitor/__tests__/sanitizer.spec.ts +8 -0
- package/scripts/log-issue-monitor/__tests__/sources.spec.ts +47 -2
- package/scripts/log-issue-monitor/config.ts +1 -0
- package/scripts/log-issue-monitor/detectors.ts +28 -3
- package/scripts/log-issue-monitor/index.ts +3 -2
- package/scripts/log-issue-monitor/monitor.ts +31 -5
- package/scripts/log-issue-monitor/sources.ts +148 -7
- package/scripts/log-issue-monitor/types.ts +15 -1
- package/scripts/longmemeval-validation.spec.ts +111 -0
- package/scripts/longmemeval-validation.ts +299 -0
- package/scripts/slop-gate-scan.sh +14 -0
- package/scripts/tune-report.ts +142 -0
- package/scripts/tune-weights.ts +249 -0
- package/scripts/verify-doc-npm-scripts.mjs +3 -0
- package/scripts/verify-search-quality-benchmark-review.ts +1 -1
- package/scripts/weekly-relation-validation.ts +9 -6
package/README.en.md
CHANGED
|
@@ -1,77 +1,56 @@
|
|
|
1
|
-
# Memento
|
|
1
|
+
# ๐ง Memento
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
4
|
<img src="static/logo.png" alt="Memento Logo" width="200" height="200">
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
[๐ฐ๐ท ํ๊ตญ์ด](README.md) | [๐บ๐ธ English](README.en.md)
|
|
7
7
|
</div>
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
---
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
LLMs forget everything when a conversation ends. Names, decisions, the debugging context you built together last week. This isn't a technical limitation โ it's the absence of **memory infrastructure**.
|
|
12
12
|
|
|
13
|
-
Memento
|
|
13
|
+
Memento is that infrastructure. Not a database that stores memories, but a **MCP-based memory operating system** where memories are created, classified, reinforced, and forgotten.
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## Memory Is Not Simple
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
- **Memory Storage**: Store 4 types of memories (working, episodic, semantic, procedural)
|
|
19
|
-
- **Memory Search**: Hybrid search (text + vector)
|
|
20
|
-
- **Memory Neighbors**: Vector similarity-based automatic recommendation of similar memories
|
|
21
|
-
- **Memory Pinning**: Pin/unpin important memories
|
|
22
|
-
- **Memory Deletion**: Soft/hard deletion
|
|
23
|
-
- **Anchor System**: Set important memories as anchors for context management
|
|
24
|
-
> **Note**: Anchor recovery, embedding migration, Episodic โ Semantic conversion, and meta memory statistics are exposed through the HTTP Management API, not MCP tools.
|
|
17
|
+
Decades of psychology and neuroscience have established one thing clearly: human memory is not a single thing.
|
|
25
18
|
|
|
26
|
-
|
|
27
|
-
- **FTS5 Text Search**: SQLite's Full-Text Search
|
|
28
|
-
- **Vector Search**: OpenAI embedding-based semantic search (falls back to lightweight embeddings when unavailable)
|
|
29
|
-
- **Hybrid Search**: Combination of text and vector search
|
|
30
|
-
- **Multi-provider Support**: TF-IDF, MiniLM, OpenAI, Gemini with automatic selection
|
|
31
|
-
- **Lightweight Embedding**: TF-IDF + keyword matching fallback solution
|
|
32
|
-
- **Tag-based Filtering**: Metadata-based search
|
|
19
|
+
**Working memory** holds what's being processed right now. It vanishes in seconds, but in those seconds it's the foundation of every decision. **Episodic memory** is the trace of experience โ "that afternoon I first learned React Hooks" โ memory with time and context attached. **Semantic memory** is knowledge distilled from experience: the understanding that "TypeScript generics work like this," accumulated through hundreds of debugging sessions. And **procedural memory** is the ingrained routine โ Docker deployment steps, PR checklists, team coding conventions.
|
|
33
20
|
|
|
34
|
-
|
|
35
|
-
- **Forgetting Algorithm**: Forgetting score calculation based on recency, usage, duplication ratio
|
|
36
|
-
- **Spaced Repetition**: Review scheduling based on importance and usage
|
|
37
|
-
- **TTL Management**: Type-specific lifespan management
|
|
38
|
-
- **Auto Cleanup**: Automated soft/hard deletion
|
|
21
|
+
Most LLMs lose all four with every conversation. Memento persists all four โ specify `type: working`, `episodic`, `semantic`, or `procedural` in the `remember` call and the right memory structure handles the rest.
|
|
39
22
|
|
|
40
|
-
|
|
41
|
-
- **Security**: HTTP server splits browser-session and header-based trust. `/auth/session` starts the cookie-backed browser flow; `/admin` and `/api` require a browser session; `/api/v1/quality`, `/tools`, and `/mcp` require `Authorization: Bearer` or `X-API-Key`. See [docs/reference/en/security.md](docs/reference/en/security.md).
|
|
42
|
-
- **Real-time Metrics**: Database, search, memory performance monitoring
|
|
43
|
-
- **Real-time Alerts**: Automatic performance checks every 30 seconds with threshold-based alerts
|
|
44
|
-
- **Error Logging**: Structured error logging and statistics collection
|
|
45
|
-
- **Database Optimization**: Automatic index recommendation and creation
|
|
46
|
-
- **Cache System**: LRU + TTL based caching
|
|
47
|
-
- **Async Processing**: Worker pool based parallel processing
|
|
23
|
+
## Living Memory
|
|
48
24
|
|
|
49
|
-
|
|
25
|
+
This is not a simple storage layer. Memory in Memento is alive.
|
|
50
26
|
|
|
51
|
-
|
|
27
|
+
Memories that matter get reinforced. Memories that grow stale get cleaned up by the forgetting algorithm. Similar memories connect to each other through vector similarity, forming a graph. Repeated procedures are version-controlled โ `procedural_diff` and `procedural_rollback` let you track how a workflow evolves. Critical context gets pinned as an anchor, so the next conversation starts with that context already loaded.
|
|
52
28
|
|
|
53
|
-
|
|
54
|
-
http://localhost:9001/dashboard
|
|
55
|
-
http://localhost:9001/graph
|
|
56
|
-
```
|
|
29
|
+
The goal is not to make AI "pretend to remember." It's to make AI an **agent that creates, classifies, reinforces, and forgets** โ just like memory actually works.
|
|
57
30
|
|
|
58
|
-
|
|
31
|
+
### ๐ฆ Monorepo Structure
|
|
59
32
|
|
|
60
|
-
|
|
33
|
+
This repository is an **npm workspaces** monorepo.
|
|
61
34
|
|
|
62
|
-
|
|
35
|
+
| Path | Description |
|
|
36
|
+
|------|-------------|
|
|
37
|
+
| **packages/memento-core** (`@memento/core`) | Domain, infrastructure, and shared library. Entry points: `createMementoCore`, `createToolContext`, `getToolRegistry`, `closeDatabase`. DB init and migration run from the root via `npm run db:init` / `npm run db:migrate`. |
|
|
38
|
+
| **packages/memento-server** | MCP/HTTP server built on core. Run via root `npm run dev`, `npm start`, `npm run dev:http`, etc. |
|
|
39
|
+
| **packages/memento-client** (`@memento/client`) | Client library for connecting to the server. |
|
|
40
|
+
| **apps/** | Experimental apps (e.g., `experimental-example` uses `@memento/core` in-process). |
|
|
63
41
|
|
|
64
|
-
|
|
42
|
+
For detailed structure, build, and test commands, see [AGENTS.md](AGENTS.md).
|
|
65
43
|
|
|
66
44
|
## ๐ Quick Start
|
|
67
45
|
|
|
68
|
-
|
|
46
|
+
> **๐ฆ Package manager**: This project uses **npm**. `pnpm` and `yarn` are not supported.
|
|
47
|
+
|
|
48
|
+
### One-click Installation (Recommended)
|
|
69
49
|
```bash
|
|
70
|
-
# Run automatic installation script
|
|
71
50
|
curl -sSL https://raw.githubusercontent.com/jee1/memento/main/install.sh | bash
|
|
72
51
|
```
|
|
73
52
|
|
|
74
|
-
###
|
|
53
|
+
### npx Method (For Developers)
|
|
75
54
|
```bash
|
|
76
55
|
# Run immediately (without installation)
|
|
77
56
|
npx memento-mcp-server@latest dev
|
|
@@ -81,31 +60,101 @@ npx memento-mcp-server@latest setup
|
|
|
81
60
|
npx memento-mcp-server@latest start
|
|
82
61
|
```
|
|
83
62
|
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
# Development environment
|
|
87
|
-
docker-compose -f docker-compose.dev.yml up -d
|
|
63
|
+
**Repeated use**: Running via npx each time triggers a download. For frequent use, prefer **global install** (`npm i -g memento-mcp-server`) or local install with `./node_modules/.bin/memento`. Mode breakdown: MCP server (`memento-mcp-server` / stdio), HTTP server (`memento-dev`), CLI (`memento` โ recall, remember, forget, memory_injection). CLI guide: [docs/guides/ko/memento-cli-for-ai.md](docs/guides/ko/memento-cli-for-ai.md).
|
|
88
64
|
|
|
89
|
-
|
|
90
|
-
|
|
65
|
+
### Docker Method (For Production)
|
|
66
|
+
```bash
|
|
67
|
+
docker-compose -f docker-compose.dev.yml up -d # Development
|
|
68
|
+
docker-compose -f docker-compose.prod.yml up -d # Production
|
|
91
69
|
```
|
|
92
70
|
|
|
93
|
-
###
|
|
71
|
+
### Source Code Method (For Developers)
|
|
94
72
|
```bash
|
|
95
|
-
# Clone repository
|
|
96
73
|
git clone https://github.com/jee1/memento.git
|
|
97
74
|
cd memento
|
|
98
|
-
|
|
99
|
-
# One-click installation and run
|
|
100
75
|
npm run quick-start
|
|
101
76
|
```
|
|
102
77
|
|
|
103
|
-
### ๐ **Detailed Installation Guide**
|
|
104
78
|
For detailed installation methods, see [INSTALL.en.md](INSTALL.en.md).
|
|
105
79
|
|
|
80
|
+
### HTTP MCP Server for Multi-Agent Deployments
|
|
81
|
+
|
|
82
|
+
SQLite only allows one writer at a time, even in WAL mode. Multiple AI agents calling `remember`/`forget` in separate processes will hit `SQLITE_BUSY`. The solution: **run a single MCP server process** that owns the database exclusively.
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
npm run dev:http # Development (hot reload)
|
|
86
|
+
npm run build && npm run start:http # Production
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
With this setup, all agents connect to one HTTP/WebSocket interface, and the SQLite writer stays in a single process.
|
|
90
|
+
|
|
91
|
+
## ๐ Use with External AI Assistants
|
|
92
|
+
|
|
93
|
+
Personal AI assistants like OpenClaw, NanoClaw, and ZeroClaw can use Memento as a shared long-term memory backend. Guide: [docs/integrations/](./docs/integrations/README.md)
|
|
94
|
+
|
|
95
|
+
Use the `@memento/assistant` SDK for automatic recall/remember in two lines of code โ [SDK quickstart](./docs/integrations/_shared/sdk-quickstart.md)
|
|
96
|
+
|
|
106
97
|
## ๐ ๏ธ Usage
|
|
107
98
|
|
|
108
|
-
|
|
99
|
+
Three ways to connect to Memento:
|
|
100
|
+
|
|
101
|
+
- **mcp.json config**: Register Memento in MCP host apps like Claude Desktop, Cursor, or Claude Code โ no code required
|
|
102
|
+
- **MCP protocol** (`@modelcontextprotocol/sdk`): Connect directly from custom agent code
|
|
103
|
+
- **HTTP API client** (`@memento/client`): Call Memento's REST API from TypeScript/JavaScript applications
|
|
104
|
+
|
|
105
|
+
### mcp.json Config (Claude Desktop ยท Cursor ยท Claude Code)
|
|
106
|
+
|
|
107
|
+
#### stdio mode (single agent)
|
|
108
|
+
|
|
109
|
+
After `npm run build`:
|
|
110
|
+
|
|
111
|
+
```json
|
|
112
|
+
{
|
|
113
|
+
"mcpServers": {
|
|
114
|
+
"memento": {
|
|
115
|
+
"command": "node",
|
|
116
|
+
"args": ["/path/to/memento/packages/memento-server/dist/server/index.js"],
|
|
117
|
+
"env": {
|
|
118
|
+
"DB_PATH": "/absolute/path/to/data/memory.db"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
#### HTTP MCP mode (shared multi-agent server)
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
npm run build && npm run start:http # default port: 8080
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
```json
|
|
132
|
+
{
|
|
133
|
+
"mcpServers": {
|
|
134
|
+
"memento": {
|
|
135
|
+
"type": "http",
|
|
136
|
+
"url": "http://127.0.0.1:8080/mcp"
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
> **Using npx** (without building from source):
|
|
143
|
+
> ```json
|
|
144
|
+
> {
|
|
145
|
+
> "mcpServers": {
|
|
146
|
+
> "memento": {
|
|
147
|
+
> "command": "npx",
|
|
148
|
+
> "args": ["memento-mcp-server@latest"],
|
|
149
|
+
> "env": {
|
|
150
|
+
> "DB_PATH": "/absolute/path/to/data/memory.db"
|
|
151
|
+
> }
|
|
152
|
+
> }
|
|
153
|
+
> }
|
|
154
|
+
> }
|
|
155
|
+
> ```
|
|
156
|
+
|
|
157
|
+
### MCP Protocol (`@modelcontextprotocol/sdk`)
|
|
109
158
|
|
|
110
159
|
```typescript
|
|
111
160
|
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
@@ -114,61 +163,136 @@ const client = new Client({
|
|
|
114
163
|
name: "memento-client",
|
|
115
164
|
version: "0.1.0"
|
|
116
165
|
}, {
|
|
117
|
-
capabilities: {
|
|
118
|
-
tools: {},
|
|
119
|
-
resources: {},
|
|
120
|
-
prompts: {}
|
|
121
|
-
}
|
|
166
|
+
capabilities: { tools: {}, resources: {}, prompts: {} }
|
|
122
167
|
});
|
|
123
168
|
|
|
124
169
|
// stdio connection
|
|
125
170
|
await client.connect({
|
|
126
171
|
command: "node",
|
|
127
|
-
args: ["dist/server/index.js"]
|
|
172
|
+
args: ["packages/memento-server/dist/server/index.js"]
|
|
128
173
|
});
|
|
129
174
|
|
|
130
|
-
//
|
|
175
|
+
// HTTP MCP connection (shared multi-agent server)
|
|
131
176
|
await client.connect({
|
|
132
177
|
transport: {
|
|
133
|
-
type: "
|
|
134
|
-
url: "
|
|
178
|
+
type: "http",
|
|
179
|
+
url: "http://127.0.0.1:7777"
|
|
135
180
|
}
|
|
136
181
|
});
|
|
137
182
|
```
|
|
138
183
|
|
|
139
|
-
### Memory Storage
|
|
140
|
-
|
|
141
184
|
```typescript
|
|
142
185
|
// Store memory
|
|
143
|
-
|
|
186
|
+
await client.callTool({
|
|
144
187
|
name: "remember",
|
|
145
188
|
arguments: {
|
|
146
|
-
content: "I learned about React Hooks. useState manages state
|
|
189
|
+
content: "I learned about React Hooks. useState manages state, useEffect handles side effects.",
|
|
147
190
|
type: "episodic",
|
|
148
191
|
tags: ["react", "hooks", "javascript"],
|
|
149
192
|
importance: 0.8
|
|
150
193
|
}
|
|
151
194
|
});
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
### Memory Search
|
|
155
195
|
|
|
156
|
-
```typescript
|
|
157
196
|
// Search memory
|
|
158
197
|
const results = await client.callTool({
|
|
159
198
|
name: "recall",
|
|
160
199
|
arguments: {
|
|
161
|
-
query: "React
|
|
162
|
-
filters: {
|
|
163
|
-
type: ["episodic", "semantic"],
|
|
164
|
-
tags: ["react"]
|
|
165
|
-
},
|
|
200
|
+
query: "What do I need to know about React Hooks?",
|
|
201
|
+
filters: { type: ["episodic", "semantic"], tags: ["react"] },
|
|
166
202
|
limit: 10
|
|
167
203
|
}
|
|
168
204
|
});
|
|
169
205
|
```
|
|
170
206
|
|
|
171
|
-
|
|
207
|
+
### HTTP API Client (`@memento/client`)
|
|
208
|
+
|
|
209
|
+
`@memento/client` is an **HTTP REST API wrapper**, not an MCP client. Use it to call Memento's `/tools/*` endpoints directly from TypeScript/JavaScript applications.
|
|
210
|
+
|
|
211
|
+
```typescript
|
|
212
|
+
import { MementoClient } from "@memento/client";
|
|
213
|
+
|
|
214
|
+
const client = new MementoClient({
|
|
215
|
+
serverUrl: "http://localhost:8080",
|
|
216
|
+
apiKey: "your-api-key"
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
await client.connect(); // health check
|
|
220
|
+
|
|
221
|
+
const result = await client.remember({
|
|
222
|
+
content: "I learned about React Hooks.",
|
|
223
|
+
type: "episodic",
|
|
224
|
+
tags: ["react", "hooks"],
|
|
225
|
+
importance: 0.8
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
const results = await client.recall(
|
|
229
|
+
"What should I know when first learning React Hooks?",
|
|
230
|
+
{ type: ["episodic", "semantic"], tags: ["react"] },
|
|
231
|
+
10
|
|
232
|
+
);
|
|
233
|
+
|
|
234
|
+
await client.pin(result.memory_id);
|
|
235
|
+
await client.forget(result.memory_id);
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
## ๐ง Features
|
|
239
|
+
|
|
240
|
+
### Core Memory Management (MCP Client)
|
|
241
|
+
|
|
242
|
+
14 tools are exposed via MCP. Operational functions (anchor restore, embedding migration, episodicโsemantic conversion, meta stats) are HTTP API only.
|
|
243
|
+
|
|
244
|
+
- **Memory storage**: `working`, `episodic`, `semantic`, `procedural` types
|
|
245
|
+
- **Memory search**: Hybrid search (FTS5 text + vector)
|
|
246
|
+
- **Memory neighbors**: Vector similarity-based automatic recommendation
|
|
247
|
+
- **Memory pinning**: Pin/unpin important memories
|
|
248
|
+
- **Memory deletion**: Soft/hard deletion
|
|
249
|
+
- **Anchor system**: Pin critical memories as anchors for instant context restoration in new conversations
|
|
250
|
+
|
|
251
|
+
> **Note**: Anchor recovery, embedding migration, Episodic โ Semantic conversion, and meta memory statistics are exposed through the HTTP Management API, not MCP tools.
|
|
252
|
+
|
|
253
|
+
### ๐ Hybrid Search
|
|
254
|
+
|
|
255
|
+
Text and semantic (vector) search combined. Even when you don't remember the exact keyword, similar concepts surface.
|
|
256
|
+
|
|
257
|
+
- **FTS5 text search**: SQLite Full-Text Search
|
|
258
|
+
- **Vector search**: sqlite-vec semantic similarity search
|
|
259
|
+
- **Hybrid search**: Combined scoring (Consolidation Score weighting)
|
|
260
|
+
- **Multi-provider support**: TF-IDF, MiniLM, OpenAI, Gemini with automatic selection
|
|
261
|
+
- **Auto fallback**: If a provider fails, automatically switches to the next
|
|
262
|
+
- **Tag-based filtering**: Metadata-based search
|
|
263
|
+
|
|
264
|
+
### ๐งน Forgetting Policy
|
|
265
|
+
|
|
266
|
+
A memory system is only useful if it also forgets. Memories that only accumulate become noise.
|
|
267
|
+
|
|
268
|
+
- **Forgetting algorithm**: Score based on recency, usage frequency, and duplication ratio
|
|
269
|
+
- **Spaced repetition**: Review scheduling based on importance and usage
|
|
270
|
+
- **TTL management**: Type-specific lifespans (working 2d, episodic 30d, semantic 180d, procedural 90d)
|
|
271
|
+
- **Auto cleanup**: Automated soft/hard deletion
|
|
272
|
+
|
|
273
|
+
### ๐ Performance Monitoring (HTTP Management API)
|
|
274
|
+
|
|
275
|
+
- **Security**: HTTP server splits browser-session and header-based trust. `/auth/session` starts the cookie-backed browser flow; `/admin` and `/api` require a browser session; `/api/v1/quality`, `/tools`, and `/mcp` require `Authorization: Bearer` or `X-API-Key`. See [docs/reference/en/security.md](docs/reference/en/security.md).
|
|
276
|
+
|
|
277
|
+
- **Real-time metrics**: Database, search, memory performance monitoring
|
|
278
|
+
- **Real-time alerts**: Automatic performance checks every 30 seconds with threshold-based alerts
|
|
279
|
+
- **Error logging**: Structured error logging and statistics collection
|
|
280
|
+
- **Database optimization**: Automatic index recommendation and creation
|
|
281
|
+
- **Cache system**: LRU + TTL based caching
|
|
282
|
+
- **Async processing**: Worker pool based parallel processing
|
|
283
|
+
|
|
284
|
+
### ๐ Memory Graph View (Browser)
|
|
285
|
+
|
|
286
|
+
After starting the HTTP server, visualize semantic relationships between memories as an interactive graph. `/dashboard` is the preferred entry point for the full admin flow; opening `/graph` directly now offers the same `/auth/session` re-auth path for session recovery.
|
|
287
|
+
|
|
288
|
+
```
|
|
289
|
+
http://localhost:9001/dashboard
|
|
290
|
+
http://localhost:9001/graph
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+

|
|
294
|
+
|
|
295
|
+
## ๐ API Reference
|
|
172
296
|
|
|
173
297
|
### MCP Tools (Core 14)
|
|
174
298
|
|
|
@@ -200,15 +324,17 @@ const results = await client.callTool({
|
|
|
200
324
|
| `procedural_diff` | Compare procedural memory versions | left_id, right_id |
|
|
201
325
|
| `procedural_rollback` | Roll back procedural memory to a previous version | current_id, target_version_id |
|
|
202
326
|
|
|
203
|
-
**HTTP-only (not MCP)**: `restore_anchors`, `migrate_embeddings`, `convert_episodic_to_semantic`, `get_meta_memory_stats`
|
|
327
|
+
**HTTP-only (not MCP)**: `restore_anchors`, `migrate_embeddings`, `convert_episodic_to_semantic`, `get_meta_memory_stats` โ see HTTP Management API below.
|
|
204
328
|
|
|
205
329
|
### HTTP Management API
|
|
206
330
|
|
|
331
|
+
> **Important**: The following functions are not exposed via MCP and are only available through the HTTP API.
|
|
332
|
+
|
|
207
333
|
| Endpoint | Description | Method |
|
|
208
334
|
|----------|-------------|--------|
|
|
209
335
|
| `/admin/memory/cleanup` | Memory cleanup | POST |
|
|
210
336
|
| `/admin/memory/review-candidates` | Memory review candidate queue | GET |
|
|
211
|
-
| `/admin/memory/items/:memory_id` | Single memory JSON preview
|
|
337
|
+
| `/admin/memory/items/:memory_id` | Single memory JSON preview | GET |
|
|
212
338
|
| `/admin/memory/review-candidates/:id/review` | Mark review candidate as reviewed | POST |
|
|
213
339
|
| `/admin/memory/review-candidates/:id/dismiss` | Dismiss review candidate | POST |
|
|
214
340
|
| `/admin/stats/forgetting` | Forgetting statistics | GET |
|
|
@@ -217,8 +343,10 @@ const results = await client.callTool({
|
|
|
217
343
|
| `/admin/errors/resolve` | Resolve errors | POST |
|
|
218
344
|
| `/admin/alerts/performance` | Performance alerts | GET |
|
|
219
345
|
| `/admin/database/optimize` | Database optimization | POST |
|
|
346
|
+
| `/admin/anchors/restore` | Restore anchors | POST |
|
|
347
|
+
| `/admin/embeddings/migrate` | Embedding migration | POST |
|
|
220
348
|
|
|
221
|
-
**Other HTTP admin**: Batch status/run (`/admin/batch/*`, including `
|
|
349
|
+
**Other HTTP admin**: Batch status/run (`/admin/batch/*`, including `memory_review_candidates`), performance metrics/alerts (`/admin/performance/*`), relation extract/get/visualize (`/admin/relations/*`). See [docs/api/en/api-reference.md](docs/api/en/api-reference.md).
|
|
222
350
|
|
|
223
351
|
### Resources
|
|
224
352
|
|
|
@@ -241,10 +369,10 @@ const results = await client.callTool({
|
|
|
241
369
|
| `GEMINI_API_KEY` | - | Gemini API key (optional) |
|
|
242
370
|
| `EMBEDDING_PROVIDER` | minilm | Embedding provider (tfidf, lightweight, minilm, openai, gemini) |
|
|
243
371
|
| `CORS_ALLOWED_ORIGINS` | (empty) | CORS allowed origins (comma-separated; empty = no cross-origin) |
|
|
244
|
-
| `ENABLE_PII_MASKING` | true | PII masking (
|
|
245
|
-
| `MEMORY_REVIEW_IMPORTANCE_THRESHOLD` | `0.7` | Memory review: minimum importance (0-1)
|
|
372
|
+
| `ENABLE_PII_MASKING` | true | PII masking (see [docs/reference/en/security.md](docs/reference/en/security.md)) |
|
|
373
|
+
| `MEMORY_REVIEW_IMPORTANCE_THRESHOLD` | `0.7` | Memory review: minimum importance (0-1) |
|
|
246
374
|
| `MEMORY_REVIEW_STALE_DAYS` | `14` | Memory review: minimum stale age in days (integer โฅ 1) |
|
|
247
|
-
| `MEMORY_REVIEW_MAX_CANDIDATES` | `50` | Memory review: max candidates
|
|
375
|
+
| `MEMORY_REVIEW_MAX_CANDIDATES` | `50` | Memory review: max candidates (integer โฅ 1) |
|
|
248
376
|
| `MEMORY_REVIEW_CANDIDATES_INTERVAL_MS` | `86400000` | `memory_review_candidates` batch interval in ms (minimum `60000`) |
|
|
249
377
|
| `MEMORY_REVIEW_CANDIDATE_DUE_DAYS` | `14` | Days added when the batch computes `due_at` (1โ366) |
|
|
250
378
|
|
|
@@ -253,12 +381,10 @@ const results = await client.callTool({
|
|
|
253
381
|
### Forgetting Policy Configuration
|
|
254
382
|
|
|
255
383
|
```bash
|
|
256
|
-
# Forgetting thresholds
|
|
257
384
|
FORGET_THRESHOLD=0.6
|
|
258
385
|
SOFT_DELETE_THRESHOLD=0.6
|
|
259
386
|
HARD_DELETE_THRESHOLD=0.8
|
|
260
387
|
|
|
261
|
-
# TTL settings (in days)
|
|
262
388
|
TTL_SOFT_WORKING=2
|
|
263
389
|
TTL_SOFT_EPISODIC=30
|
|
264
390
|
TTL_SOFT_SEMANTIC=180
|
|
@@ -268,108 +394,64 @@ TTL_SOFT_PROCEDURAL=90
|
|
|
268
394
|
## ๐งช Testing
|
|
269
395
|
|
|
270
396
|
```bash
|
|
271
|
-
# Run all tests (Vitest)
|
|
272
397
|
npm run test
|
|
273
398
|
|
|
274
|
-
|
|
275
|
-
npm run test:
|
|
276
|
-
npm run test:
|
|
277
|
-
npm run test:embedding
|
|
278
|
-
npm run test:
|
|
279
|
-
npm run test:
|
|
280
|
-
npm run test:
|
|
281
|
-
npm run test:
|
|
282
|
-
npm run test:
|
|
283
|
-
npm run test:
|
|
284
|
-
npm run test:
|
|
285
|
-
npm run test:
|
|
286
|
-
npm run test:
|
|
287
|
-
npm run test:
|
|
288
|
-
npm run test:embedding-benchmark # Embedding performance benchmark
|
|
289
|
-
npm run test:all-embedding # All embedding-related Vitest files
|
|
290
|
-
|
|
291
|
-
# Test watch mode
|
|
292
|
-
npm run test -- --watch
|
|
399
|
+
npm run test:client
|
|
400
|
+
npm run test:search
|
|
401
|
+
npm run test:embedding
|
|
402
|
+
npm run test:lightweight-embedding
|
|
403
|
+
npm run test:gemini-embedding
|
|
404
|
+
npm run test:forgetting
|
|
405
|
+
npm run test:performance
|
|
406
|
+
npm run test:monitoring
|
|
407
|
+
npm run test:error-logging
|
|
408
|
+
npm run test:performance-alerts
|
|
409
|
+
npm run test:vector-search
|
|
410
|
+
npm run test:memory-injection
|
|
411
|
+
npm run test:batch-scheduler
|
|
412
|
+
npm run test:embedding-benchmark
|
|
293
413
|
|
|
294
|
-
|
|
414
|
+
npm run test -- --watch
|
|
295
415
|
npm run test -- --coverage
|
|
296
416
|
```
|
|
297
417
|
|
|
298
418
|
## ๐ Developer Guidelines
|
|
299
419
|
|
|
300
|
-
|
|
301
|
-
- **
|
|
302
|
-
- **
|
|
303
|
-
- **
|
|
304
|
-
- **
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
- **
|
|
312
|
-
- **
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
### Advanced Performance Optimization
|
|
317
|
-
- **Cache Hit Rate**: 80%+ (search result caching)
|
|
318
|
-
- **Embedding Caching**: 24-hour TTL for cost savings
|
|
319
|
-
- **Async Processing**: Worker pool based parallel processing
|
|
320
|
-
- **Database Optimization**: Automatic index recommendation and creation
|
|
321
|
-
- **Real-time Monitoring**: Automatic performance checks every 30 seconds
|
|
322
|
-
- **Error Logging**: Structured error tracking and statistics
|
|
323
|
-
- **Performance Alerts**: Threshold-based automatic alert system
|
|
324
|
-
|
|
325
|
-
### Embedding Provider Performance
|
|
420
|
+
- **Project structure**: npm workspaces โ `packages/memento-core`, `packages/memento-server`, `packages/memento-client`, `apps/*`. See [AGENTS.md](AGENTS.md).
|
|
421
|
+
- **Build/test**: `npm run dev`, `npm run build`, `npm run test`, etc.
|
|
422
|
+
- **Coding style**: Node.js โฅ 24, TypeScript ES modules, 2-space indentation
|
|
423
|
+
- **Testing**: Vitest; colocate `*.spec.ts` under each package `src/`, workspace-level specs under root `tests/`
|
|
424
|
+
- **Commit/PR**: Conventional Commits, Korean context included
|
|
425
|
+
|
|
426
|
+
## ๐ Performance
|
|
427
|
+
|
|
428
|
+
### Benchmarks
|
|
429
|
+
- **Database**: average query time 0.16โ0.22ms
|
|
430
|
+
- **Search**: 0.78โ4.24ms (improved with cache effects)
|
|
431
|
+
- **Memory usage**: 11โ15MB heap
|
|
432
|
+
- **Concurrent connections**: up to 1000
|
|
433
|
+
|
|
434
|
+
### Embedding Provider Comparison
|
|
326
435
|
|
|
327
436
|
#### Free Providers (Local Processing)
|
|
328
|
-
- **TF-IDF**: 512 dimensions, extremely fast (0.82ms), low memory
|
|
329
|
-
- **MiniLM**: 384 dimensions, balanced performance, multilingual
|
|
437
|
+
- **TF-IDF**: 512 dimensions, extremely fast (0.82ms), low memory (4.48MB)
|
|
438
|
+
- **MiniLM**: 384 dimensions, balanced performance, multilingual
|
|
330
439
|
|
|
331
440
|
#### Paid Providers (Cloud API)
|
|
332
|
-
- **OpenAI**: 1536 dimensions, highest
|
|
333
|
-
- **Gemini**: 768 dimensions, high performance, multilingual
|
|
334
|
-
|
|
335
|
-
**Auto
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
## ๐๏ธ Architecture
|
|
347
|
-
|
|
348
|
-
### M1: Personal Use (Current Implementation)
|
|
349
|
-
- **Storage**: better-sqlite3 embedded
|
|
350
|
-
- **Index**: FTS5 + sqlite-vec
|
|
351
|
-
- **Authentication**: Split browser-session and header-based trust model (`/auth/session` starts the cookie-backed browser flow; `/admin` and `/api` require a browser session; `/api/v1/quality`, `/tools`, and `/mcp` require `Authorization: Bearer` or `X-API-Key`)
|
|
352
|
-
- **Operation**: Local execution
|
|
353
|
-
- **MCP Client**: Exposes 14 core tools
|
|
354
|
-
- **Management Functions**: Separated into HTTP API
|
|
355
|
-
- **Additional Features**:
|
|
356
|
-
- Multiple embedding providers (TF-IDF, MiniLM, OpenAI, Gemini)
|
|
357
|
-
- Performance monitoring and alert system
|
|
358
|
-
- Cache system
|
|
359
|
-
- Anchor system (context management)
|
|
360
|
-
- Relation graph (semantic relation extraction)
|
|
361
|
-
- Meta memory statistics
|
|
362
|
-
- Consolidation score system
|
|
363
|
-
|
|
364
|
-
### M2: Team Collaboration (Planned)
|
|
365
|
-
- **Storage**: SQLite server mode
|
|
366
|
-
- **Authentication**: API Key
|
|
367
|
-
- **Operation**: Docker single container
|
|
368
|
-
|
|
369
|
-
### M3: Organization Entry (Planned)
|
|
370
|
-
- **Storage**: PostgreSQL + pgvector
|
|
371
|
-
- **Authentication**: JWT
|
|
372
|
-
- **Operation**: Docker Compose
|
|
441
|
+
- **OpenAI**: 1536 dimensions, highest accuracy
|
|
442
|
+
- **Gemini**: 768 dimensions, high performance, multilingual
|
|
443
|
+
|
|
444
|
+
**Auto selection order**: explicit request โ `.env` `EMBEDDING_PROVIDER` โ OpenAI(1) โ Gemini(2) โ MiniLM(3) โ TF-IDF(4). Automatic fallback on provider failure.
|
|
445
|
+
|
|
446
|
+
## ๐๏ธ Architecture Journey
|
|
447
|
+
|
|
448
|
+
Memento is designed to grow: from a personal local server, through team collaboration, to an organization-scale memory platform.
|
|
449
|
+
|
|
450
|
+
**M1: Personal (current)** โ the form you can use today. SQLite embedded, FTS5 + sqlite-vec indexes, local execution. **Authentication**: Split browser-session and header-based trust model (`/auth/session` cookie flow, `/admin`ยท`/api` require browser session, `/tools`ยท`/mcp` require Bearer/API-Key). 14 MCP tools, management functions separated into HTTP API.
|
|
451
|
+
|
|
452
|
+
**M2: Team (planned)** โ SQLite server mode, API Key auth, Docker single container. Multiple teammates share one memory backend.
|
|
453
|
+
|
|
454
|
+
**M3: Organization (planned)** โ PostgreSQL + pgvector, JWT auth, Docker Compose. Hundreds of agents share organizational memory.
|
|
373
455
|
|
|
374
456
|
## ๐ค Contributing
|
|
375
457
|
|
|
@@ -379,25 +461,18 @@ npm run test -- --coverage
|
|
|
379
461
|
4. Push to the Branch (`git push origin feature/AmazingFeature`)
|
|
380
462
|
5. Open a Pull Request
|
|
381
463
|
|
|
382
|
-
### Development
|
|
464
|
+
### Development Setup
|
|
383
465
|
```bash
|
|
384
|
-
# Fork and clone repository
|
|
385
466
|
git clone https://github.com/your-username/memento.git
|
|
386
467
|
cd memento
|
|
387
|
-
|
|
388
|
-
# Install dependencies
|
|
389
468
|
npm install
|
|
390
|
-
|
|
391
|
-
# Start development server
|
|
392
469
|
npm run dev
|
|
393
|
-
|
|
394
|
-
# Run tests
|
|
395
470
|
npm run test
|
|
396
471
|
```
|
|
397
472
|
|
|
398
473
|
## ๐ License
|
|
399
474
|
|
|
400
|
-
|
|
475
|
+
MIT License. See the `LICENSE` file for details.
|
|
401
476
|
|
|
402
477
|
## ๐ Support
|
|
403
478
|
|
|
@@ -408,9 +483,9 @@ This project is distributed under the MIT License. See the `LICENSE` file for de
|
|
|
408
483
|
|
|
409
484
|
## ๐ Acknowledgments
|
|
410
485
|
|
|
411
|
-
- [Model Context Protocol](https://modelcontextprotocol.io/)
|
|
412
|
-
- [OpenAI](https://openai.com/)
|
|
413
|
-
- [better-sqlite3](https://github.com/WiseLibs/better-sqlite3)
|
|
414
|
-
- [Express](https://expressjs.com/)
|
|
415
|
-
- [Vitest](https://vitest.dev/)
|
|
416
|
-
- [TypeScript](https://www.typescriptlang.org/)
|
|
486
|
+
- [Model Context Protocol](https://modelcontextprotocol.io/)
|
|
487
|
+
- [OpenAI](https://openai.com/)
|
|
488
|
+
- [better-sqlite3](https://github.com/WiseLibs/better-sqlite3)
|
|
489
|
+
- [Express](https://expressjs.com/)
|
|
490
|
+
- [Vitest](https://vitest.dev/)
|
|
491
|
+
- [TypeScript](https://www.typescriptlang.org/)
|