@elixium.ai/mcp-server 0.1.2 → 0.1.3
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/dist/index.js +11 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -332,6 +332,10 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
332
332
|
type: "string",
|
|
333
333
|
description: "Learning outcome summary",
|
|
334
334
|
},
|
|
335
|
+
acceptanceCriteria: {
|
|
336
|
+
type: "string",
|
|
337
|
+
description: "Acceptance criteria in Given/When/Then format",
|
|
338
|
+
},
|
|
335
339
|
},
|
|
336
340
|
required: ["storyId"],
|
|
337
341
|
},
|
|
@@ -437,13 +441,19 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
437
441
|
}
|
|
438
442
|
case "update_story": {
|
|
439
443
|
const args = request.params.arguments;
|
|
440
|
-
const { storyId, lane, ...rest } = args;
|
|
444
|
+
const { storyId, lane, state, ...rest } = args;
|
|
441
445
|
if (!storyId) {
|
|
442
446
|
throw new Error("storyId is required");
|
|
443
447
|
}
|
|
448
|
+
// Guardrail: Block AI from setting accepted/rejected states (human-in-the-loop)
|
|
449
|
+
const blockedStates = ["accepted", "rejected"];
|
|
450
|
+
if (state && blockedStates.includes(state.toLowerCase())) {
|
|
451
|
+
throw new Error(`Cannot set state to "${state}". Acceptance decisions require human review.`);
|
|
452
|
+
}
|
|
444
453
|
const normalizedLane = await normalizeLane(lane);
|
|
445
454
|
const payload = Object.fromEntries(Object.entries({
|
|
446
455
|
...rest,
|
|
456
|
+
...(state ? { state } : {}),
|
|
447
457
|
...(normalizedLane ? { lane: normalizedLane } : {}),
|
|
448
458
|
}).filter(([, value]) => value !== undefined));
|
|
449
459
|
const response = await client.patch(`/stories/${storyId}`, payload);
|