@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.
- package/package.json +1 -1
- package/src/server.js +17 -10
package/package.json
CHANGED
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.
|
|
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:
|
|
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:
|
|
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
|
-
|
|
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
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
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
|