@jungjaehoon/mama-server 1.2.1 → 1.2.2

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/server.js +17 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jungjaehoon/mama-server",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "MAMA MCP Server - Memory-Augmented MCP Assistant for Claude Code & Desktop",
5
5
  "main": "src/server.js",
6
6
  "bin": {
package/src/server.js CHANGED
@@ -173,7 +173,7 @@ class MAMAServer {
173
173
  reasoning: {
174
174
  type: 'string',
175
175
  description:
176
- '[Decision] Why this decision was made. Explain context and rationale.',
176
+ '[Decision] Why this decision was made. Include 5-layer narrative: (1) Context - what problem/situation; (2) Evidence - what proves this works (tests, benchmarks, prior experience); (3) Alternatives - what other options were considered and why rejected; (4) Risks - known limitations or failure modes; (5) Rationale - final reasoning for this choice.',
177
177
  },
178
178
  confidence: {
179
179
  type: 'number',
@@ -184,11 +184,13 @@ class MAMAServer {
184
184
  // Checkpoint fields
185
185
  summary: {
186
186
  type: 'string',
187
- description: '[Checkpoint] Session state summary: what was done, what is pending.',
187
+ description:
188
+ '[Checkpoint] Session state summary. Use 4-section format: (1) 🎯 Goal & Progress - what was the goal, where did you stop; (2) ✅ Evidence - mark each item as Verified/Not run/Assumed with proof; (3) ⏳ Unfinished & Risks - incomplete work, blockers, unknowns; (4) 🚦 Next Agent Briefing - Definition of Done, quick health checks to run first.',
188
189
  },
189
190
  next_steps: {
190
191
  type: 'string',
191
- description: '[Checkpoint] Instructions for next session.',
192
+ description:
193
+ '[Checkpoint] Instructions for next session: DoD (Definition of Done), quick verification commands (npm test, curl health), constraints/cautions.',
192
194
  },
193
195
  open_files: {
194
196
  type: 'array',
@@ -358,16 +360,21 @@ class MAMAServer {
358
360
  if (type === 'all' || type === 'decision') {
359
361
  let decisions;
360
362
  if (query) {
361
- decisions = await mama.suggest(query, limit);
363
+ // suggest() returns { results: [...] } object or null
364
+ const suggestResult = await mama.suggest(query, limit);
365
+ decisions = suggestResult?.results || [];
362
366
  } else {
363
367
  decisions = await mama.list(limit);
364
368
  }
365
- results.push(
366
- ...decisions.map((d) => ({
367
- ...d,
368
- _type: 'decision',
369
- }))
370
- );
369
+ // Ensure decisions is an array
370
+ if (Array.isArray(decisions)) {
371
+ results.push(
372
+ ...decisions.map((d) => ({
373
+ ...d,
374
+ _type: 'decision',
375
+ }))
376
+ );
377
+ }
371
378
  }
372
379
 
373
380
  // Search checkpoints