memento-mcp-server 2.0.5 → 2.1.0

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.
Files changed (190) hide show
  1. package/dist/cli/claude-code-connect.d.ts.map +1 -1
  2. package/dist/cli/claude-code-connect.js +0 -1
  3. package/dist/cli/claude-code-connect.js.map +1 -1
  4. package/dist/cli/codex-connect.d.ts.map +1 -1
  5. package/dist/cli/codex-connect.js +0 -1
  6. package/dist/cli/codex-connect.js.map +1 -1
  7. package/dist/cli/project-connect.d.ts.map +1 -1
  8. package/dist/cli/project-connect.js +0 -5
  9. package/dist/cli/project-connect.js.map +1 -1
  10. package/dist/node_modules/@memento/agent-integration/dist/claude-code/settings.d.ts.map +1 -1
  11. package/dist/node_modules/@memento/agent-integration/dist/claude-code/settings.js +1 -3
  12. package/dist/node_modules/@memento/agent-integration/dist/claude-code/settings.js.map +1 -1
  13. package/dist/node_modules/@memento/agent-integration/dist/codex/settings.d.ts.map +1 -1
  14. package/dist/node_modules/@memento/agent-integration/dist/codex/settings.js +0 -1
  15. package/dist/node_modules/@memento/agent-integration/dist/codex/settings.js.map +1 -1
  16. package/dist/node_modules/@memento/core/dist/bootstrap.js +1 -1
  17. package/dist/node_modules/@memento/core/dist/bootstrap.js.map +1 -1
  18. package/dist/node_modules/@memento/core/dist/domains/agent-integration/services/agent-capture-transaction.js +2 -2
  19. package/dist/node_modules/@memento/core/dist/domains/agent-integration/services/agent-capture-transaction.js.map +1 -1
  20. package/dist/node_modules/@memento/core/dist/domains/anchor/services/anchor/n-hop-search-service.js +1 -1
  21. package/dist/node_modules/@memento/core/dist/domains/anchor/services/anchor/n-hop-search-service.js.map +1 -1
  22. package/dist/node_modules/@memento/core/dist/domains/anchor/tools/clear-anchor-tool.js +1 -1
  23. package/dist/node_modules/@memento/core/dist/domains/anchor/tools/clear-anchor-tool.js.map +1 -1
  24. package/dist/node_modules/@memento/core/dist/domains/anchor/tools/get-anchor-tool.js +1 -1
  25. package/dist/node_modules/@memento/core/dist/domains/anchor/tools/get-anchor-tool.js.map +1 -1
  26. package/dist/node_modules/@memento/core/dist/domains/anchor/tools/restore-anchors-tool.js +1 -1
  27. package/dist/node_modules/@memento/core/dist/domains/anchor/tools/restore-anchors-tool.js.map +1 -1
  28. package/dist/node_modules/@memento/core/dist/domains/anchor/tools/search-local-tool.js +3 -3
  29. package/dist/node_modules/@memento/core/dist/domains/anchor/tools/search-local-tool.js.map +1 -1
  30. package/dist/node_modules/@memento/core/dist/domains/anchor/tools/set-anchor-tool.js +2 -2
  31. package/dist/node_modules/@memento/core/dist/domains/anchor/tools/set-anchor-tool.js.map +1 -1
  32. package/dist/node_modules/@memento/core/dist/domains/consolidation/services/sleep-consolidation-service.js +1 -1
  33. package/dist/node_modules/@memento/core/dist/domains/consolidation/services/sleep-consolidation-service.js.map +1 -1
  34. package/dist/node_modules/@memento/core/dist/domains/embedding/services/gemini-embedding-service.d.ts.map +1 -1
  35. package/dist/node_modules/@memento/core/dist/domains/embedding/services/gemini-embedding-service.js +1 -0
  36. package/dist/node_modules/@memento/core/dist/domains/embedding/services/gemini-embedding-service.js.map +1 -1
  37. package/dist/node_modules/@memento/core/dist/domains/embedding/services/lightweight-embedding-service.d.ts.map +1 -1
  38. package/dist/node_modules/@memento/core/dist/domains/embedding/services/lightweight-embedding-service.js +1 -0
  39. package/dist/node_modules/@memento/core/dist/domains/embedding/services/lightweight-embedding-service.js.map +1 -1
  40. package/dist/node_modules/@memento/core/dist/domains/embedding/services/minilm-embedding-service.d.ts.map +1 -1
  41. package/dist/node_modules/@memento/core/dist/domains/embedding/services/minilm-embedding-service.js +2 -1
  42. package/dist/node_modules/@memento/core/dist/domains/embedding/services/minilm-embedding-service.js.map +1 -1
  43. package/dist/node_modules/@memento/core/dist/domains/embedding/services/unified-embedding-service.d.ts.map +1 -1
  44. package/dist/node_modules/@memento/core/dist/domains/embedding/services/unified-embedding-service.js +1 -0
  45. package/dist/node_modules/@memento/core/dist/domains/embedding/services/unified-embedding-service.js.map +1 -1
  46. package/dist/node_modules/@memento/core/dist/domains/forgetting/tools/forgetting-stats-tool.js +1 -1
  47. package/dist/node_modules/@memento/core/dist/domains/forgetting/tools/forgetting-stats-tool.js.map +1 -1
  48. package/dist/node_modules/@memento/core/dist/domains/memory/introspection/introspection-heal-tool.js +1 -1
  49. package/dist/node_modules/@memento/core/dist/domains/memory/procedural/procedural-memory-field-extractors.d.ts +3 -1
  50. package/dist/node_modules/@memento/core/dist/domains/memory/procedural/procedural-memory-field-extractors.d.ts.map +1 -1
  51. package/dist/node_modules/@memento/core/dist/domains/memory/procedural/procedural-memory-field-extractors.js +51 -67
  52. package/dist/node_modules/@memento/core/dist/domains/memory/procedural/procedural-memory-field-extractors.js.map +1 -1
  53. package/dist/node_modules/@memento/core/dist/domains/memory/recall/recall-tool-schema.d.ts +43 -180
  54. package/dist/node_modules/@memento/core/dist/domains/memory/recall/recall-tool-schema.d.ts.map +1 -1
  55. package/dist/node_modules/@memento/core/dist/domains/memory/recall/recall-tool-search-execution.js +1 -1
  56. package/dist/node_modules/@memento/core/dist/domains/memory/recall/recall-tool-search-execution.js.map +1 -1
  57. package/dist/node_modules/@memento/core/dist/domains/memory/remember/remember-tool-reflection.d.ts.map +1 -1
  58. package/dist/node_modules/@memento/core/dist/domains/memory/remember/remember-tool-reflection.js +1 -1
  59. package/dist/node_modules/@memento/core/dist/domains/memory/remember/remember-tool-reflection.js.map +1 -1
  60. package/dist/node_modules/@memento/core/dist/domains/memory/remember/remember-tool-schema.d.ts +21 -174
  61. package/dist/node_modules/@memento/core/dist/domains/memory/remember/remember-tool-schema.d.ts.map +1 -1
  62. package/dist/node_modules/@memento/core/dist/domains/memory/services/knowledge-context-bundle-builder.js +2 -2
  63. package/dist/node_modules/@memento/core/dist/domains/memory/services/knowledge-context-bundle-builder.js.map +1 -1
  64. package/dist/node_modules/@memento/core/dist/domains/memory/services/memory-neighbor-service.d.ts.map +1 -1
  65. package/dist/node_modules/@memento/core/dist/domains/memory/services/memory-neighbor-service.js +6 -5
  66. package/dist/node_modules/@memento/core/dist/domains/memory/services/memory-neighbor-service.js.map +1 -1
  67. package/dist/node_modules/@memento/core/dist/domains/memory/tools/cleanup-memory-tool.js +1 -1
  68. package/dist/node_modules/@memento/core/dist/domains/memory/tools/cleanup-memory-tool.js.map +1 -1
  69. package/dist/node_modules/@memento/core/dist/domains/memory/tools/forget-tool.js +3 -3
  70. package/dist/node_modules/@memento/core/dist/domains/memory/tools/forget-tool.js.map +1 -1
  71. package/dist/node_modules/@memento/core/dist/domains/memory/tools/get-memory-neighbors-tool.d.ts +1 -9
  72. package/dist/node_modules/@memento/core/dist/domains/memory/tools/get-memory-neighbors-tool.d.ts.map +1 -1
  73. package/dist/node_modules/@memento/core/dist/domains/memory/tools/get-memory-neighbors-tool.js +8 -8
  74. package/dist/node_modules/@memento/core/dist/domains/memory/tools/get-memory-neighbors-tool.js.map +1 -1
  75. package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/search-metrics-collector.js +1 -1
  76. package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/search-metrics-collector.js.map +1 -1
  77. package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/search-quality-benchmark-fixtures.js +1 -1
  78. package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/search-quality-benchmark-fixtures.js.map +1 -1
  79. package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/vector-search-quality-metrics/report-baseline.d.ts.map +1 -1
  80. package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/vector-search-quality-metrics/report-baseline.js +1 -1
  81. package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/vector-search-quality-metrics/report-baseline.js.map +1 -1
  82. package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/vector-search-quality-metrics/report-ground-truth.d.ts.map +1 -1
  83. package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/vector-search-quality-metrics/report-ground-truth.js +1 -1
  84. package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/vector-search-quality-metrics/report-ground-truth.js.map +1 -1
  85. package/dist/node_modules/@memento/core/dist/domains/monitoring/tools/get-meta-memory-stats-tool.js +3 -3
  86. package/dist/node_modules/@memento/core/dist/domains/monitoring/tools/get-meta-memory-stats-tool.js.map +1 -1
  87. package/dist/node_modules/@memento/core/dist/domains/monitoring/tools/performance-stats-tool.js +1 -1
  88. package/dist/node_modules/@memento/core/dist/domains/monitoring/tools/performance-stats-tool.js.map +1 -1
  89. package/dist/node_modules/@memento/core/dist/domains/personal-agent/extractors/knowledge-candidate-extractor.d.ts.map +1 -1
  90. package/dist/node_modules/@memento/core/dist/domains/personal-agent/extractors/knowledge-candidate-extractor.js +99 -136
  91. package/dist/node_modules/@memento/core/dist/domains/personal-agent/extractors/knowledge-candidate-extractor.js.map +1 -1
  92. package/dist/node_modules/@memento/core/dist/domains/relation/services/llm-based-relation-extractor.js +1 -1
  93. package/dist/node_modules/@memento/core/dist/domains/relation/services/llm-based-relation-extractor.js.map +1 -1
  94. package/dist/node_modules/@memento/core/dist/domains/relation/services/llm-relation-extractor/ollama-chat-support.d.ts.map +1 -1
  95. package/dist/node_modules/@memento/core/dist/domains/relation/services/llm-relation-extractor/ollama-chat-support.js +1 -1
  96. package/dist/node_modules/@memento/core/dist/domains/relation/services/llm-relation-extractor/ollama-chat-support.js.map +1 -1
  97. package/dist/node_modules/@memento/core/dist/domains/relation/services/relation-graph-query.js +2 -2
  98. package/dist/node_modules/@memento/core/dist/domains/relation/services/relation-graph-query.js.map +1 -1
  99. package/dist/node_modules/@memento/core/dist/domains/relation/tools/add-relation-tool.d.ts +10 -12
  100. package/dist/node_modules/@memento/core/dist/domains/relation/tools/add-relation-tool.d.ts.map +1 -1
  101. package/dist/node_modules/@memento/core/dist/domains/relation/tools/extract-relations-tool.d.ts +1 -7
  102. package/dist/node_modules/@memento/core/dist/domains/relation/tools/extract-relations-tool.d.ts.map +1 -1
  103. package/dist/node_modules/@memento/core/dist/domains/relation/tools/get-relations-tool.d.ts +21 -14
  104. package/dist/node_modules/@memento/core/dist/domains/relation/tools/get-relations-tool.d.ts.map +1 -1
  105. package/dist/node_modules/@memento/core/dist/domains/relation/tools/remove-relation-tool.d.ts +10 -23
  106. package/dist/node_modules/@memento/core/dist/domains/relation/tools/remove-relation-tool.d.ts.map +1 -1
  107. package/dist/node_modules/@memento/core/dist/domains/relation/tools/visualize-relations-tool.d.ts +16 -21
  108. package/dist/node_modules/@memento/core/dist/domains/relation/tools/visualize-relations-tool.d.ts.map +1 -1
  109. package/dist/node_modules/@memento/core/dist/domains/search/repositories/vector-performance.repository.js +1 -1
  110. package/dist/node_modules/@memento/core/dist/domains/search/repositories/vector-performance.repository.js.map +1 -1
  111. package/dist/node_modules/@memento/core/dist/domains/search/services/vector-search/vector-performance-tester.js +1 -1
  112. package/dist/node_modules/@memento/core/dist/domains/search/services/vector-search/vector-performance-tester.js.map +1 -1
  113. package/dist/node_modules/@memento/core/dist/domains/search/services/vector-search/vector-search.service.js +2 -2
  114. package/dist/node_modules/@memento/core/dist/domains/search/services/vector-search/vector-search.service.js.map +1 -1
  115. package/dist/node_modules/@memento/core/dist/domains/telemetry/repositories/telemetry-search-quality-query.js +3 -3
  116. package/dist/node_modules/@memento/core/dist/domains/telemetry/repositories/telemetry-search-quality-query.js.map +1 -1
  117. package/dist/node_modules/@memento/core/dist/infrastructure/database/database-optimize-tool.js +1 -1
  118. package/dist/node_modules/@memento/core/dist/infrastructure/database/database-optimize-tool.js.map +1 -1
  119. package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/db-integrity-preflight.d.ts.map +1 -1
  120. package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/db-integrity-preflight.js +4 -3
  121. package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/db-integrity-preflight.js.map +1 -1
  122. package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/init-bootstrap-new-db.js +1 -1
  123. package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/init-bootstrap-new-db.js.map +1 -1
  124. package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/init.js +1 -1
  125. package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/init.js.map +1 -1
  126. package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migrations/006-fts5-reflection-notes.d.ts.map +1 -1
  127. package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migrations/006-fts5-reflection-notes.js +2 -2
  128. package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migrations/006-fts5-reflection-notes.js.map +1 -1
  129. package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migrations/011-meta-memory-stats-schema.d.ts.map +1 -1
  130. package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migrations/011-meta-memory-stats-schema.js +3 -3
  131. package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migrations/011-meta-memory-stats-schema.js.map +1 -1
  132. package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migrations/012-fix-tfidf-dimension-trigger.d.ts.map +1 -1
  133. package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migrations/012-fix-tfidf-dimension-trigger.js +1 -1
  134. package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migrations/012-fix-tfidf-dimension-trigger.js.map +1 -1
  135. package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-interval.d.ts.map +1 -1
  136. package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-interval.js +0 -1
  137. package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-interval.js.map +1 -1
  138. package/dist/node_modules/@memento/core/dist/shared/config/config-loader-utils.js +2 -2
  139. package/dist/node_modules/@memento/core/dist/shared/config/config-loader-utils.js.map +1 -1
  140. package/dist/node_modules/@memento/core/dist/shared/config/ranking-weights-loader.d.ts.map +1 -1
  141. package/dist/node_modules/@memento/core/dist/shared/config/ranking-weights-loader.js +62 -66
  142. package/dist/node_modules/@memento/core/dist/shared/config/ranking-weights-loader.js.map +1 -1
  143. package/dist/node_modules/@memento/core/dist/shared/config/retry-options-loader.js +1 -1
  144. package/dist/node_modules/@memento/core/dist/shared/config/retry-options-loader.js.map +1 -1
  145. package/dist/node_modules/@memento/core/dist/shared/utils/embedding-serialization.d.ts.map +1 -1
  146. package/dist/node_modules/@memento/core/dist/shared/utils/embedding-serialization.js +1 -1
  147. package/dist/node_modules/@memento/core/dist/shared/utils/embedding-serialization.js.map +1 -1
  148. package/dist/node_modules/@memento/core/dist/shared/utils/fts5-migration-status.d.ts.map +1 -1
  149. package/dist/node_modules/@memento/core/dist/shared/utils/fts5-migration-status.js +2 -2
  150. package/dist/node_modules/@memento/core/dist/shared/utils/fts5-migration-status.js.map +1 -1
  151. package/dist/node_modules/@memento/core/dist/shared/utils/jsonl-rotation.js +1 -1
  152. package/dist/node_modules/@memento/core/dist/shared/utils/jsonl-rotation.js.map +1 -1
  153. package/dist/node_modules/@memento/core/dist/shared/utils/memory-filter-sql.d.ts +3 -2
  154. package/dist/node_modules/@memento/core/dist/shared/utils/memory-filter-sql.d.ts.map +1 -1
  155. package/dist/node_modules/@memento/core/dist/shared/utils/memory-filter-sql.js +59 -63
  156. package/dist/node_modules/@memento/core/dist/shared/utils/memory-filter-sql.js.map +1 -1
  157. package/dist/node_modules/@memento/core/dist/shared/utils/reflection-notes-merge.d.ts.map +1 -1
  158. package/dist/node_modules/@memento/core/dist/shared/utils/reflection-notes-merge.js +1 -1
  159. package/dist/node_modules/@memento/core/dist/shared/utils/reflection-notes-merge.js.map +1 -1
  160. package/dist/node_modules/@memento/core/dist/shared/utils/reflection-notes-schema.d.ts +11 -23
  161. package/dist/node_modules/@memento/core/dist/shared/utils/reflection-notes-schema.d.ts.map +1 -1
  162. package/dist/node_modules/@memento/core/dist/shared/utils/reflection-notes-schema.js +15 -18
  163. package/dist/node_modules/@memento/core/dist/shared/utils/reflection-notes-schema.js.map +1 -1
  164. package/dist/node_modules/@memento/core/dist/shared/utils/relation-visualizer.d.ts.map +1 -1
  165. package/dist/node_modules/@memento/core/dist/shared/utils/relation-visualizer.js +47 -65
  166. package/dist/node_modules/@memento/core/dist/shared/utils/relation-visualizer.js.map +1 -1
  167. package/dist/node_modules/@memento/core/dist/shared/utils/type-param-validator.js +1 -1
  168. package/dist/node_modules/@memento/core/dist/shared/utils/type-param-validator.js.map +1 -1
  169. package/dist/node_modules/@memento/core/dist/tools/migrate-embeddings-tool.js +1 -1
  170. package/dist/node_modules/@memento/core/dist/tools/types.d.ts +19 -4
  171. package/dist/node_modules/@memento/core/dist/tools/types.d.ts.map +1 -1
  172. package/dist/node_modules/@memento/core/package.json +4 -1
  173. package/dist/scripts/reindex-embeddings.js +1 -1
  174. package/dist/scripts/reindex-embeddings.js.map +1 -1
  175. package/dist/server/routes/admin/admin-status-service.d.ts.map +1 -1
  176. package/dist/server/routes/admin/admin-status-service.js +1 -8
  177. package/dist/server/routes/admin/admin-status-service.js.map +1 -1
  178. package/dist/server/routes/admin/evolution-demo/spec.d.ts +14 -174
  179. package/dist/server/routes/admin/evolution-demo/spec.d.ts.map +1 -1
  180. package/package.json +12 -7
  181. package/static/css/dashboard.css +8 -0
  182. package/static/dashboard.html +1 -0
  183. package/static/graph.html +43 -2
  184. package/static/js/anchor-map-render.js +21 -1
  185. package/static/js/graph-detail.js +7 -0
  186. package/static/js/graph-fetch.js +19 -3
  187. package/static/js/graph-render.js +64 -3
  188. package/static/js/graph-shared.js +91 -0
  189. package/static/js/graph.js +27 -2
  190. package/static/js/neighbor-focus.js +41 -0
@@ -14,159 +14,37 @@ export declare const EvolutionDemoSnapshotSchema: z.ZodObject<{
14
14
  forgotten_count: z.ZodNumber;
15
15
  preserved_count: z.ZodNumber;
16
16
  summary_text: z.ZodString;
17
- }, "strip", z.ZodTypeAny, {
18
- episodic_count: number;
19
- semantic_count: number;
20
- forgotten_count: number;
21
- preserved_count: number;
22
- summary_text: string;
23
- }, {
24
- episodic_count: number;
25
- semantic_count: number;
26
- forgotten_count: number;
27
- preserved_count: number;
28
- summary_text: string;
29
- }>;
17
+ }, z.core.$strip>;
30
18
  explanation: z.ZodString;
31
19
  timestamp: z.ZodString;
32
20
  memory_groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
33
21
  label: z.ZodString;
34
22
  importance: z.ZodNumber;
35
23
  status: z.ZodString;
36
- outcome: z.ZodEnum<["forget", "preserve", "pin"]>;
24
+ outcome: z.ZodEnum<{
25
+ forget: "forget";
26
+ preserve: "preserve";
27
+ pin: "pin";
28
+ }>;
37
29
  pinned: z.ZodBoolean;
38
- }, "strip", z.ZodTypeAny, {
39
- pinned: boolean;
40
- importance: number;
41
- status: string;
42
- label: string;
43
- outcome: "forget" | "preserve" | "pin";
44
- }, {
45
- pinned: boolean;
46
- importance: number;
47
- status: string;
48
- label: string;
49
- outcome: "forget" | "preserve" | "pin";
50
- }>, "many">>;
30
+ }, z.core.$strip>>>;
51
31
  episodic_sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
52
32
  id: z.ZodString;
53
33
  summary: z.ZodString;
54
34
  created_at: z.ZodOptional<z.ZodString>;
55
35
  importance: z.ZodOptional<z.ZodNumber>;
56
- }, "strip", z.ZodTypeAny, {
57
- id: string;
58
- summary: string;
59
- importance?: number | undefined;
60
- created_at?: string | undefined;
61
- }, {
62
- id: string;
63
- summary: string;
64
- importance?: number | undefined;
65
- created_at?: string | undefined;
66
- }>, "many">>;
36
+ }, z.core.$strip>>>;
67
37
  semantic_result: z.ZodOptional<z.ZodObject<{
68
38
  id: z.ZodString;
69
39
  summary: z.ZodString;
70
40
  source_count: z.ZodNumber;
71
41
  explanation: z.ZodString;
72
- }, "strip", z.ZodTypeAny, {
73
- id: string;
74
- summary: string;
75
- source_count: number;
76
- explanation: string;
77
- }, {
78
- id: string;
79
- summary: string;
80
- source_count: number;
81
- explanation: string;
82
- }>>;
42
+ }, z.core.$strip>>;
83
43
  search_comparison: z.ZodOptional<z.ZodObject<{
84
44
  before_summary: z.ZodString;
85
45
  after_summary: z.ZodString;
86
- }, "strip", z.ZodTypeAny, {
87
- before_summary: string;
88
- after_summary: string;
89
- }, {
90
- before_summary: string;
91
- after_summary: string;
92
- }>>;
93
- }, "strip", z.ZodTypeAny, {
94
- timestamp: string;
95
- explanation: string;
96
- scenario_id: string;
97
- point_id: string;
98
- point_label: string;
99
- question: string;
100
- answer: string;
101
- memory_summary: {
102
- episodic_count: number;
103
- semantic_count: number;
104
- forgotten_count: number;
105
- preserved_count: number;
106
- summary_text: string;
107
- };
108
- memory_groups?: {
109
- pinned: boolean;
110
- importance: number;
111
- status: string;
112
- label: string;
113
- outcome: "forget" | "preserve" | "pin";
114
- }[] | undefined;
115
- episodic_sources?: {
116
- id: string;
117
- summary: string;
118
- importance?: number | undefined;
119
- created_at?: string | undefined;
120
- }[] | undefined;
121
- semantic_result?: {
122
- id: string;
123
- summary: string;
124
- source_count: number;
125
- explanation: string;
126
- } | undefined;
127
- search_comparison?: {
128
- before_summary: string;
129
- after_summary: string;
130
- } | undefined;
131
- }, {
132
- timestamp: string;
133
- explanation: string;
134
- scenario_id: string;
135
- point_id: string;
136
- point_label: string;
137
- question: string;
138
- answer: string;
139
- memory_summary: {
140
- episodic_count: number;
141
- semantic_count: number;
142
- forgotten_count: number;
143
- preserved_count: number;
144
- summary_text: string;
145
- };
146
- memory_groups?: {
147
- pinned: boolean;
148
- importance: number;
149
- status: string;
150
- label: string;
151
- outcome: "forget" | "preserve" | "pin";
152
- }[] | undefined;
153
- episodic_sources?: {
154
- id: string;
155
- summary: string;
156
- importance?: number | undefined;
157
- created_at?: string | undefined;
158
- }[] | undefined;
159
- semantic_result?: {
160
- id: string;
161
- summary: string;
162
- source_count: number;
163
- explanation: string;
164
- } | undefined;
165
- search_comparison?: {
166
- before_summary: string;
167
- after_summary: string;
168
- } | undefined;
169
- }>;
46
+ }, z.core.$strip>>;
47
+ }, z.core.$strip>;
170
48
  export declare const EvolutionDemoScenarioCatalogSchema: z.ZodObject<{
171
49
  scenarios: z.ZodArray<z.ZodObject<{
172
50
  scenario_id: z.ZodString;
@@ -174,45 +52,7 @@ export declare const EvolutionDemoScenarioCatalogSchema: z.ZodObject<{
174
52
  points: z.ZodArray<z.ZodObject<{
175
53
  point_id: z.ZodString;
176
54
  label: z.ZodString;
177
- }, "strip", z.ZodTypeAny, {
178
- label: string;
179
- point_id: string;
180
- }, {
181
- label: string;
182
- point_id: string;
183
- }>, "many">;
184
- }, "strip", z.ZodTypeAny, {
185
- points: {
186
- label: string;
187
- point_id: string;
188
- }[];
189
- scenario_id: string;
190
- title: string;
191
- }, {
192
- points: {
193
- label: string;
194
- point_id: string;
195
- }[];
196
- scenario_id: string;
197
- title: string;
198
- }>, "many">;
199
- }, "strip", z.ZodTypeAny, {
200
- scenarios: {
201
- points: {
202
- label: string;
203
- point_id: string;
204
- }[];
205
- scenario_id: string;
206
- title: string;
207
- }[];
208
- }, {
209
- scenarios: {
210
- points: {
211
- label: string;
212
- point_id: string;
213
- }[];
214
- scenario_id: string;
215
- title: string;
216
- }[];
217
- }>;
55
+ }, z.core.$strip>>;
56
+ }, z.core.$strip>>;
57
+ }, z.core.$strip>;
218
58
  //# sourceMappingURL=spec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../../../../../src/server/routes/admin/evolution-demo/spec.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAqCxB,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAatC,CAAC;AAaH,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE7C,CAAC"}
1
+ {"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../../../../../src/server/routes/admin/evolution-demo/spec.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAqCxB,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAatC,CAAC;AAaH,eAAO,MAAM,kCAAkC;;;;;;;;;iBAE7C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memento-mcp-server",
3
- "version": "2.0.5",
3
+ "version": "2.1.0",
4
4
  "mcpName": "io.github.jee1/memento-mcp-server",
5
5
  "description": "AI Agent 기억 보조 MCP 서버 - 사람의 기억 구조를 모사한 스토리지+검색+요약+망각 메커니즘",
6
6
  "type": "module",
@@ -123,14 +123,18 @@
123
123
  "express": "^5.1.0",
124
124
  "express-rate-limit": "^8.5.2",
125
125
  "helmet": "^8.2.0",
126
- "openai": "^4.20.1",
126
+ "openai": "^7.34.0",
127
127
  "sqlite-vec": "^0.1.9",
128
128
  "umap-js": "^1.3.3",
129
129
  "uuid": "^14.0.1",
130
130
  "ws": "^8.21.0",
131
- "zod": "^3.22.4"
131
+ "zod": "^4.6.7"
132
+ },
133
+ "overrides": {
134
+ "zod": "$zod"
132
135
  },
133
136
  "devDependencies": {
137
+ "@eslint/js": "^10.0.1",
134
138
  "@playwright/test": "^1.61.1",
135
139
  "@types/better-sqlite3": "^7.6.13",
136
140
  "@types/cors": "^2.8.19",
@@ -138,12 +142,13 @@
138
142
  "@types/node": "^24.0.0",
139
143
  "@types/uuid": "^9.0.7",
140
144
  "@types/ws": "^8.18.1",
141
- "@typescript-eslint/eslint-plugin": "^8.62.1",
142
- "@typescript-eslint/parser": "^8.62.1",
145
+ "@typescript-eslint/eslint-plugin": "^8.71.2",
146
+ "@typescript-eslint/parser": "^8.71.2",
143
147
  "@vitest/coverage-v8": "^4.1.11",
144
- "eslint": "^8.54.0",
145
- "eslint-plugin-security": "^3.0.1",
148
+ "eslint": "^10.12.0",
149
+ "eslint-plugin-security": "^4.2.0",
146
150
  "eventsource": "^4.0.0",
151
+ "globals": "^17.13.0",
147
152
  "tsx": "^4.23.0",
148
153
  "typescript": "^5.9.3",
149
154
  "vitest": "^4.1.11"
@@ -492,6 +492,14 @@ body {
492
492
  stroke-opacity: 0.4;
493
493
  }
494
494
 
495
+ .node.focus-dim {
496
+ opacity: 0.18;
497
+ }
498
+
499
+ .link.focus-dim {
500
+ stroke-opacity: 0.12;
501
+ }
502
+
495
503
  /* 반응형 디자인 */
496
504
  @media (max-width: 48rem) {
497
505
  .dashboard-header {
@@ -999,6 +999,7 @@
999
999
  <!-- Anchor Map 시각화 스크립트 -->
1000
1000
  <script src="/static/js/anchor-map-shared.js"></script>
1001
1001
  <script src="/static/js/anchor-map-layout.js"></script>
1002
+ <script src="/static/js/neighbor-focus.js"></script>
1002
1003
  <script src="/static/js/anchor-map-render.js"></script>
1003
1004
  <script src="/static/js/anchor-map-search.js"></script>
1004
1005
  <script src="/static/js/anchor-map-data.js"></script>
package/static/graph.html CHANGED
@@ -167,7 +167,8 @@
167
167
  flex-wrap: wrap;
168
168
  }
169
169
 
170
- .type-check {
170
+ .type-check,
171
+ .relation-check {
171
172
  display: flex;
172
173
  align-items: center;
173
174
  gap: 3px;
@@ -175,7 +176,18 @@
175
176
  cursor: pointer;
176
177
  }
177
178
 
178
- .type-check input { cursor: pointer; }
179
+ .type-check input,
180
+ .relation-check input { cursor: pointer; }
181
+
182
+ #local-depth-select,
183
+ #local-focus-hint {
184
+ font-size: var(--font-size-xs);
185
+ color: var(--color-graph-text-muted);
186
+ }
187
+
188
+ #local-focus-hint {
189
+ white-space: nowrap;
190
+ }
179
191
 
180
192
  .importance-row {
181
193
  display: flex;
@@ -476,6 +488,14 @@
476
488
  stroke-opacity: 0.12;
477
489
  }
478
490
 
491
+ .node.focus-dim {
492
+ opacity: 0.18;
493
+ }
494
+
495
+ .link.focus-dim {
496
+ stroke-opacity: 0.12;
497
+ }
498
+
479
499
  /* Dashboard embed — iframe viewport + Embedding Map 등과 동일한 라이트 패널 스타일 */
480
500
  .graph-view--embedded {
481
501
  height: 100%;
@@ -567,6 +587,15 @@
567
587
  <label class="type-check"><input type="checkbox" value="working" checked> Working</label>
568
588
  </div>
569
589
  </div>
590
+ <div class="filter-group graph-session-only">
591
+ <label>관계</label>
592
+ <div class="type-checks">
593
+ <label class="relation-check"><input type="checkbox" value="supports" checked> supports</label>
594
+ <label class="relation-check"><input type="checkbox" value="related_to" checked> related_to</label>
595
+ <label class="relation-check"><input type="checkbox" value="extracted_from" checked> extracted_from</label>
596
+ <label class="relation-check"><input type="checkbox" value="contradicts" checked> contradicts</label>
597
+ </div>
598
+ </div>
570
599
  <div class="filter-group graph-session-only">
571
600
  <label>중요도 ≥</label>
572
601
  <div class="importance-row">
@@ -603,6 +632,17 @@
603
632
  </label>
604
633
  <span id="orphan-hidden-badge" aria-live="polite"></span>
605
634
  </div>
635
+ <div class="filter-group graph-session-only">
636
+ <label for="local-mode-toggle">주변만 보기</label>
637
+ <input type="checkbox" id="local-mode-toggle">
638
+ <label for="local-depth-select">깊이</label>
639
+ <select id="local-depth-select">
640
+ <option value="1">1</option>
641
+ <option value="2" selected>2</option>
642
+ <option value="3">3</option>
643
+ </select>
644
+ <span id="local-focus-hint"></span>
645
+ </div>
606
646
  <button id="apply-btn" class="graph-session-only graph-action-button m-button m-button--primary">필터 적용</button>
607
647
  <button id="reset-btn" class="graph-session-only graph-action-button m-button m-button--secondary">초기화</button>
608
648
  <div class="header-spacer"></div>
@@ -665,6 +705,7 @@
665
705
  <script src="/static/js/graph-shared.js"></script>
666
706
  <script src="/static/js/graph-detail.js"></script>
667
707
  <script src="/static/js/graph-search.js"></script>
708
+ <script src="/static/js/neighbor-focus.js"></script>
668
709
  <script src="/static/js/graph-render.js"></script>
669
710
  <script src="/static/js/graph-fetch.js"></script>
670
711
  <script src="/static/js/graph.js"></script>
@@ -188,6 +188,24 @@
188
188
  return d3.drag().on('start', dragstarted).on('drag', dragged).on('end', dragended);
189
189
  }
190
190
 
191
+ function applyNeighborFocus(focusId) {
192
+ const api = global.__MEMENTO_NEIGHBOR_FOCUS__;
193
+ if (!api || !state.svg) return;
194
+ const keepIds = api.collectKeepIds(focusId, state.links);
195
+ state.svg.selectAll('.node').classed('focus-dim', function (d) {
196
+ return !keepIds.has(d.id);
197
+ });
198
+ state.svg.selectAll('.link').classed('focus-dim', function (d) {
199
+ return !api.edgeTouchesKeep(d, keepIds);
200
+ });
201
+ }
202
+
203
+ function clearNeighborFocus() {
204
+ if (!state.svg) return;
205
+ state.svg.selectAll('.node').classed('focus-dim', false);
206
+ state.svg.selectAll('.link').classed('focus-dim', false);
207
+ }
208
+
191
209
  function buildLinkSelection(g, links) {
192
210
  return g.append('g')
193
211
  .selectAll('line')
@@ -220,7 +238,9 @@
220
238
  .attr('stroke-dasharray', function (d) { return d.embedding_missing ? '5,3' : null; })
221
239
  .attr('opacity', function (d) { return d.embedding_missing ? 0.6 : 1.0; })
222
240
  .call(makeDragBehavior(simulation))
223
- .on('click', function (event, d) { event.stopPropagation(); ns.selectNode(d); });
241
+ .on('click', function (event, d) { event.stopPropagation(); ns.selectNode(d); })
242
+ .on('mouseover', function (_event, d) { applyNeighborFocus(d.id); })
243
+ .on('mouseout', clearNeighborFocus);
224
244
  }
225
245
 
226
246
  function labelTextFor(d) {
@@ -43,8 +43,15 @@
43
43
  }
44
44
 
45
45
  ns.showDetail = function showDetail(d) {
46
+ if (d && d.id != null && d.id !== '') {
47
+ ns.state.localFocusId = d.id;
48
+ }
49
+ ns.updateLocalFocusHint(d);
46
50
  ns.dom.detailContent.innerHTML = buildDetailRows(d);
47
51
  ns.dom.detailPanel.style.display = 'block';
52
+ if (ns.state.localMode && ns.state.rawGraphNodes) {
53
+ ns.renderVisibleGraph();
54
+ }
48
55
  };
49
56
 
50
57
  ns.closePanel = function closePanel() {
@@ -14,10 +14,16 @@
14
14
  ns.buildUrl = function buildUrl() {
15
15
  const { impSlider, fullGraphToggle } = ns.dom;
16
16
  const checked = [...document.querySelectorAll('.type-check input:checked')].map((el) => el.value);
17
+ const relationChecked = [...document.querySelectorAll('.relation-check input:checked')].map(
18
+ (el) => el.value
19
+ );
17
20
  const params = new URLSearchParams();
18
21
  if (checked.length < 4 && checked.length > 0) {
19
22
  params.set('types', checked.join(','));
20
23
  }
24
+ if (relationChecked.length < 4 && relationChecked.length > 0) {
25
+ params.set('relation_types', relationChecked.join(','));
26
+ }
21
27
  const imp = parseFloat(impSlider.value);
22
28
  if (imp > 0) {
23
29
  params.set('min_importance', imp.toFixed(2));
@@ -69,10 +75,19 @@
69
75
  function getVisibleGraph() {
70
76
  const nodes = state.rawGraphNodes ?? [];
71
77
  const edges = state.rawGraphEdges ?? [];
72
- if (!ns.dom.orphanToggle.checked) {
73
- return { nodes, edges, hiddenCount: 0 };
78
+ const visible = ns.dom.orphanToggle.checked
79
+ ? ns.filterConnectedNodes(nodes, edges)
80
+ : { nodes, edges, hiddenCount: 0 };
81
+ if (!state.localMode || !state.localFocusId) {
82
+ return visible;
74
83
  }
75
- return ns.filterConnectedNodes(nodes, edges);
84
+ const trimmed = ns.trimToLocalDepth(
85
+ visible.nodes,
86
+ visible.edges,
87
+ state.localFocusId,
88
+ state.localDepth
89
+ );
90
+ return { nodes: trimmed.nodes, edges: trimmed.edges, hiddenCount: visible.hiddenCount };
76
91
  }
77
92
 
78
93
  function updateOrphanBadge(hiddenCount) {
@@ -83,6 +98,7 @@
83
98
  ns.renderVisibleGraph = function renderVisibleGraph() {
84
99
  const visible = getVisibleGraph();
85
100
  updateOrphanBadge(visible.hiddenCount);
101
+ ns.updateLocalFocusHint();
86
102
  state.lastGraphNodes = visible.nodes;
87
103
  state.lastGraphEdges = visible.edges;
88
104
 
@@ -24,6 +24,24 @@
24
24
  return { svg, g };
25
25
  }
26
26
 
27
+ // One marker per SVG. userSpaceOnUse keeps the head a fixed size while stroke width follows confidence.
28
+ function appendArrowMarker(svg) {
29
+ svg
30
+ .append('defs')
31
+ .append('marker')
32
+ .attr('id', 'memory-graph-arrow')
33
+ .attr('viewBox', '0 -5 10 10')
34
+ .attr('refX', 10)
35
+ .attr('refY', 0)
36
+ .attr('markerWidth', 6)
37
+ .attr('markerHeight', 6)
38
+ .attr('orient', 'auto')
39
+ .attr('markerUnits', 'userSpaceOnUse')
40
+ .append('path')
41
+ .attr('d', 'M0,-5L10,0L0,5')
42
+ .attr('fill', 'context-stroke');
43
+ }
44
+
27
45
  function attachZoomAndClick(svg, g) {
28
46
  const { svgEl } = ns.dom;
29
47
  svg.call(
@@ -68,7 +86,8 @@
68
86
  .append('line')
69
87
  .attr('class', 'link')
70
88
  .attr('stroke', (d) => palette.edgeColors[d.relation_type] ?? palette.edgeColors.default)
71
- .attr('stroke-width', (d) => Math.max(1, (d.confidence ?? 1) * 3));
89
+ .attr('stroke-width', (d) => Math.max(1, (d.confidence ?? 1) * 3))
90
+ .attr('marker-end', 'url(#memory-graph-arrow)');
72
91
  state.renderedLinkSelection = link;
73
92
  return link;
74
93
  }
@@ -96,12 +115,36 @@
96
115
  });
97
116
  }
98
117
 
118
+ function applyNeighborFocus(focusId) {
119
+ const api = global.__MEMENTO_NEIGHBOR_FOCUS__;
120
+ if (!api) {
121
+ return;
122
+ }
123
+ const keepIds = api.collectKeepIds(focusId, state.lastGraphEdges);
124
+ if (state.renderedNodeSelection) {
125
+ state.renderedNodeSelection.classed('focus-dim', (d) => !keepIds.has(d.id));
126
+ }
127
+ if (state.renderedLinkSelection) {
128
+ state.renderedLinkSelection.classed('focus-dim', (d) => !api.edgeTouchesKeep(d, keepIds));
129
+ }
130
+ }
131
+
132
+ function clearNeighborFocus() {
133
+ if (state.renderedNodeSelection) {
134
+ state.renderedNodeSelection.classed('focus-dim', false);
135
+ }
136
+ if (state.renderedLinkSelection) {
137
+ state.renderedLinkSelection.classed('focus-dim', false);
138
+ }
139
+ }
140
+
99
141
  function attachCircleHandlers(circle) {
100
142
  const { tooltip } = ns.dom;
101
143
  circle
102
144
  .on('mouseover', (_event, d) => {
103
145
  tooltip.style.display = 'block';
104
146
  tooltip.textContent = d.label;
147
+ applyNeighborFocus(d.id);
105
148
  })
106
149
  .on('mousemove', (event) => {
107
150
  tooltip.style.left = `${event.clientX + 12}px`;
@@ -109,6 +152,7 @@
109
152
  })
110
153
  .on('mouseout', () => {
111
154
  tooltip.style.display = 'none';
155
+ clearNeighborFocus();
112
156
  })
113
157
  .on('click', (event, d) => {
114
158
  event.stopPropagation();
@@ -149,13 +193,29 @@
149
193
  return { node, circle };
150
194
  }
151
195
 
196
+ // The marker tip is the line end. Stopping at the node center hides the arrow under the circle.
197
+ function arrowTargetPoint(source, target) {
198
+ const dx = target.x - source.x;
199
+ const dy = target.y - source.y;
200
+ const dist = Math.hypot(dx, dy);
201
+ const radius = target.__graphRadius ?? 8;
202
+ if (!dist || dist <= radius) {
203
+ return { x: target.x, y: target.y };
204
+ }
205
+ const scale = (dist - radius) / dist;
206
+ return {
207
+ x: source.x + dx * scale,
208
+ y: source.y + dy * scale,
209
+ };
210
+ }
211
+
152
212
  function bindSimulationTick(simulation, link, node) {
153
213
  simulation.on('tick', () => {
154
214
  link
155
215
  .attr('x1', (d) => d.source.x)
156
216
  .attr('y1', (d) => d.source.y)
157
- .attr('x2', (d) => d.target.x)
158
- .attr('y2', (d) => d.target.y);
217
+ .attr('x2', (d) => arrowTargetPoint(d.source, d.target).x)
218
+ .attr('y2', (d) => arrowTargetPoint(d.source, d.target).y);
159
219
  node.attr('transform', (d) => `translate(${d.x},${d.y})`);
160
220
  });
161
221
  }
@@ -164,6 +224,7 @@
164
224
  const { W, H } = getContainerSize();
165
225
  const palette = ns.getGraphPalette();
166
226
  const { svg, g } = createSvgRoot(W, H);
227
+ appendArrowMarker(svg);
167
228
  attachZoomAndClick(svg, g);
168
229
 
169
230
  const rScale = createRadiusScale();