@jungjaehoon/mama-server 1.10.0 → 1.10.1

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.md CHANGED
@@ -231,7 +231,7 @@ Interactive visualization of your reasoning graph.
231
231
  ## Technical Details
232
232
 
233
233
  - **Database:** SQLite + pure-TS cosine similarity
234
- - **Embeddings:** Transformers.js (Xenova/multilingual-e5-small, 384-dim)
234
+ - **Embeddings:** Transformers.js (Xenova/multilingual-e5-large, 1024-dim)
235
235
  - **Transport:** stdio-based MCP protocol (default) + optional HTTP embedding server (port 3849)
236
236
  - **Storage:** ~/.claude/mama-memory.db (configurable via MAMA_DB_PATH)
237
237
  - **Port File:** ~/.mama-embedding-port (for client discovery)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jungjaehoon/mama-server",
3
- "version": "1.10.0",
3
+ "version": "1.10.1",
4
4
  "description": "MAMA MCP Server - Memory-Augmented MCP Assistant for Claude Code & Desktop",
5
5
  "main": "src/server.js",
6
6
  "bin": {
@@ -119,7 +119,7 @@ CREATE INDEX IF NOT EXISTS idx_sessions_last_active ON sessions(last_active_at);
119
119
  -- because sqlite-vss requires extension loading first
120
120
  --
121
121
  -- CREATE VIRTUAL TABLE vss_memories USING vss0(
122
- -- embedding(384) -- multilingual-e5-small embeddings
122
+ -- embedding(1024) -- multilingual-e5-large embeddings
123
123
  -- );
124
124
 
125
125
  -- ══════════════════════════════════════════════════════════════
@@ -33,7 +33,7 @@ CREATE TABLE IF NOT EXISTS error_patterns (
33
33
  first_seen INTEGER NOT NULL, -- First occurrence timestamp
34
34
 
35
35
  -- Vector Embedding (for semantic matching)
36
- embedding BLOB, -- 384-dim embedding (multilingual-e5-small)
36
+ embedding BLOB, -- 1024-dim embedding (multilingual-e5-large)
37
37
 
38
38
  -- Metadata
39
39
  created_at INTEGER DEFAULT (unixepoch()),
@@ -56,7 +56,7 @@ const FIX_INSTRUCTIONS = {
56
56
  steps: [
57
57
  '1. Install Transformers.js: npm install @xenova/transformers',
58
58
  '2. Configure model in ~/.mama/config.json:',
59
- ' { "embeddingModel": "Xenova/multilingual-e5-small" }',
59
+ ' { "embeddingModel": "Xenova/multilingual-e5-large" }',
60
60
  '3. Restart Claude Code to reload configuration',
61
61
  ],
62
62
  impact: 'Without embeddings, MAMA falls back to keyword search (30% less accurate)',
package/src/server.js CHANGED
@@ -248,6 +248,28 @@ type='checkpoint': session state for resumption (ALSO requires search first!)`,
248
248
  minimum: 0,
249
249
  maximum: 1,
250
250
  },
251
+ // Scope & temporal fields
252
+ scopes: {
253
+ type: 'array',
254
+ items: {
255
+ type: 'object',
256
+ properties: {
257
+ kind: {
258
+ type: 'string',
259
+ enum: ['global', 'user', 'channel', 'project'],
260
+ },
261
+ id: { type: 'string' },
262
+ },
263
+ required: ['kind', 'id'],
264
+ },
265
+ description:
266
+ '[Decision] Memory scopes for isolation. Example: [{"kind": "project", "id": "/path/to/project"}]',
267
+ },
268
+ event_date: {
269
+ type: 'string',
270
+ description:
271
+ '[Decision] ISO 8601 date when the event occurred (e.g., "2024-01-15"). Defaults to now.',
272
+ },
251
273
  // Checkpoint fields
252
274
  summary: {
253
275
  type: 'string',
@@ -311,6 +333,21 @@ When presenting search results to the user or agent, include a brief **Reasoning
311
333
  type: 'number',
312
334
  description: 'Maximum results. Default: 10',
313
335
  },
336
+ scopes: {
337
+ type: 'array',
338
+ items: {
339
+ type: 'object',
340
+ properties: {
341
+ kind: {
342
+ type: 'string',
343
+ enum: ['global', 'user', 'channel', 'project'],
344
+ },
345
+ id: { type: 'string' },
346
+ },
347
+ required: ['kind', 'id'],
348
+ },
349
+ description: 'Filter search results by scope.',
350
+ },
314
351
  },
315
352
  },
316
353
  },
@@ -490,11 +527,19 @@ Returns: summary (4-section), next_steps (DoD + commands), open_files
490
527
  const { type } = args;
491
528
 
492
529
  if (type === 'decision') {
493
- const { topic, decision, reasoning, confidence = 0.5 } = args;
530
+ const { topic, decision, reasoning, confidence = 0.5, scopes, event_date } = args;
494
531
  if (!topic || !decision || !reasoning) {
495
532
  return { success: false, message: '❌ Decision requires: topic, decision, reasoning' };
496
533
  }
497
- const id = await mama.save({ type: 'user_decision', topic, decision, reasoning, confidence });
534
+ const id = await mama.save({
535
+ type: 'user_decision',
536
+ topic,
537
+ decision,
538
+ reasoning,
539
+ confidence,
540
+ ...(scopes && { scopes }),
541
+ ...(event_date && { event_date }),
542
+ });
498
543
  return {
499
544
  success: true,
500
545
  id,
@@ -524,7 +569,7 @@ Returns: summary (4-section), next_steps (DoD + commands), open_files
524
569
  * Handle unified search (decisions + checkpoints)
525
570
  */
526
571
  async handleSearch(args) {
527
- const { query, type = 'all', limit = 10 } = args;
572
+ const { query, type = 'all', limit = 10, scopes } = args;
528
573
 
529
574
  const results = [];
530
575
 
@@ -532,12 +577,13 @@ Returns: summary (4-section), next_steps (DoD + commands), open_files
532
577
  if (type === 'all' || type === 'decision') {
533
578
  let decisions;
534
579
  if (query) {
535
- // suggest() returns { results: [...] } object or null
536
- // Note: suggest() takes options object as second parameter
537
- const suggestResult = await mama.suggest(query, { limit });
580
+ const suggestResult = await mama.suggest(query, {
581
+ limit,
582
+ ...(scopes && { scopes }),
583
+ });
538
584
  decisions = suggestResult?.results || [];
539
585
  } else {
540
- decisions = await mama.list(limit);
586
+ decisions = await mama.list({ limit, ...(scopes && { scopes }) });
541
587
  }
542
588
  // Ensure decisions is an array
543
589
  if (Array.isArray(decisions)) {