@agent-plan/mcp 0.2.19-next.12 → 0.2.19-next.13
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.d.ts.map +1 -1
- package/dist/index.js +62 -3
- package/package.json +3 -3
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AA6+BA,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAItD"}
|
package/dist/index.js
CHANGED
|
@@ -331,6 +331,7 @@ server.registerTool("planner-feature-add", {
|
|
|
331
331
|
acceptedDecisions: [],
|
|
332
332
|
phaseIds: [],
|
|
333
333
|
dependsOn: [],
|
|
334
|
+
statusLog: [],
|
|
334
335
|
createdAt: timestamp,
|
|
335
336
|
updatedAt: timestamp,
|
|
336
337
|
};
|
|
@@ -481,6 +482,7 @@ server.registerTool("planner-phase-add", {
|
|
|
481
482
|
handoffUpdatedAt: "",
|
|
482
483
|
handoffReadAt: "",
|
|
483
484
|
handoffHistory: [],
|
|
485
|
+
statusLog: [],
|
|
484
486
|
};
|
|
485
487
|
await st.savePhase(phase);
|
|
486
488
|
if (feature) {
|
|
@@ -631,7 +633,7 @@ server.registerTool("planner-task-add", {
|
|
|
631
633
|
statusLog: [],
|
|
632
634
|
decisions: [],
|
|
633
635
|
acceptedDecisions: [],
|
|
634
|
-
checklist: (checklist ?? []).map((item, index) => ({ id: createChecklistItemId(taskId, index + 1, item), title: item, checked: false })),
|
|
636
|
+
checklist: (checklist ?? []).map((item, index) => ({ id: createChecklistItemId(taskId, index + 1, item), number: index + 1, title: item, checked: false })),
|
|
635
637
|
subtasks: [],
|
|
636
638
|
dependsOn: [],
|
|
637
639
|
startedAt: "",
|
|
@@ -683,7 +685,9 @@ server.registerTool("planner-task-discuss", {
|
|
|
683
685
|
if (description !== undefined)
|
|
684
686
|
task.description = description.trim();
|
|
685
687
|
if (checklist !== undefined)
|
|
686
|
-
task.checklist = checklist.map((item, index) => ({ id: createChecklistItemId(task.id, index + 1, item), title: item, checked: false }));
|
|
688
|
+
task.checklist = checklist.map((item, index) => ({ id: createChecklistItemId(task.id, index + 1, item), number: index + 1, title: item, checked: false }));
|
|
689
|
+
if (checklist !== undefined)
|
|
690
|
+
task.checklist = checklist.map((item, index) => ({ id: createChecklistItemId(task.id, index + 1, item), number: index + 1, title: item, checked: false }));
|
|
687
691
|
task.updatedAt = nowISO();
|
|
688
692
|
phase.updatedAt = task.updatedAt;
|
|
689
693
|
updatedTask = task;
|
|
@@ -702,8 +706,9 @@ server.registerTool("planner-task-update", {
|
|
|
702
706
|
description: z.string().optional(),
|
|
703
707
|
motivation: z.string().optional(),
|
|
704
708
|
priority: z.number().int().nonnegative().optional().describe("Display order within the phase (lower = higher)."),
|
|
709
|
+
checklist: z.array(z.string()).optional().describe("Replace the task checklist (implementation steps, plain strings). Agents should tick steps via planner-task-checklist-toggle, not write DONE in titles."),
|
|
705
710
|
},
|
|
706
|
-
}, async ({ task: ref, title, status, description, motivation, priority }) => {
|
|
711
|
+
}, async ({ task: ref, title, status, description, motivation, priority, checklist }) => {
|
|
707
712
|
const st = await requireStore();
|
|
708
713
|
const found = findTaskByRef(await st.loadAllPhases(), (await st.loadFeatures()).features, ref);
|
|
709
714
|
if (!found)
|
|
@@ -750,6 +755,60 @@ server.registerTool("planner-task-update", {
|
|
|
750
755
|
const t = updatedTask ?? found.task;
|
|
751
756
|
return writeAndSummarize(st, `✅ Task updated: ${taskCompositeRef(t, found.phase, features)} — ${t.title} (${t.status})${t.shortId ? ` · ${t.shortId}` : ""}`);
|
|
752
757
|
});
|
|
758
|
+
server.registerTool("planner-task-checklist-toggle", {
|
|
759
|
+
description: "Tick/untick a task checklist item (a 'step') without rewriting the whole list. Accepts the item as C{n} (e.g. C2), the item id, or the title (case-insensitive, first match). Pass checked=true/false to set explicitly, or omit to toggle. Use this instead of writing DONE in step titles. Items are numbered C1/C2… per task.",
|
|
760
|
+
inputSchema: {
|
|
761
|
+
task: z.string().min(1),
|
|
762
|
+
item: z.string().min(1),
|
|
763
|
+
checked: z.boolean().optional(),
|
|
764
|
+
},
|
|
765
|
+
}, async ({ task: ref, item, checked }) => {
|
|
766
|
+
const st = await requireStore();
|
|
767
|
+
const found = findTaskByRef(await st.loadAllPhases(), (await st.loadFeatures()).features, ref);
|
|
768
|
+
if (!found)
|
|
769
|
+
return text(`Task not found: ${ref}`);
|
|
770
|
+
let result = "";
|
|
771
|
+
await st.updatePhase(found.phase.id, (phase) => {
|
|
772
|
+
const task = phase.tasks.find((entry) => entry.id === found.task.id);
|
|
773
|
+
if (!task) {
|
|
774
|
+
result = `Task not found: ${ref}`;
|
|
775
|
+
return phase;
|
|
776
|
+
}
|
|
777
|
+
const ck = task.checklist ?? [];
|
|
778
|
+
if (ck.length === 0) {
|
|
779
|
+
result = `Task "${found.task.title}" has no checklist.`;
|
|
780
|
+
return phase;
|
|
781
|
+
}
|
|
782
|
+
let target;
|
|
783
|
+
const cMatch = item.match(/^C(\d+)$/i);
|
|
784
|
+
if (cMatch) {
|
|
785
|
+
const idx = parseInt(cMatch[1], 10) - 1;
|
|
786
|
+
if (idx < 0 || idx >= ck.length) {
|
|
787
|
+
result = `C${idx + 1} not found (1..${ck.length}).`;
|
|
788
|
+
return phase;
|
|
789
|
+
}
|
|
790
|
+
target = ck[idx];
|
|
791
|
+
}
|
|
792
|
+
else {
|
|
793
|
+
const needle = item.trim().toLowerCase();
|
|
794
|
+
target = ck.find((i) => i.id === item)
|
|
795
|
+
?? ck.find((i) => i.title.trim().toLowerCase() === needle)
|
|
796
|
+
?? ck.find((i) => i.title.trim().toLowerCase().includes(needle));
|
|
797
|
+
}
|
|
798
|
+
if (!target) {
|
|
799
|
+
result = `No checklist item matching "${item}".`;
|
|
800
|
+
return phase;
|
|
801
|
+
}
|
|
802
|
+
const newValue = checked ?? !target.checked;
|
|
803
|
+
target.checked = newValue;
|
|
804
|
+
task.updatedAt = nowISO();
|
|
805
|
+
phase.updatedAt = nowISO();
|
|
806
|
+
const doneCount = ck.filter((i) => i.checked).length;
|
|
807
|
+
result = `C${target.number} "${target.title}" → ${newValue ? "done" : "open"} (${doneCount}/${ck.length} checked)`;
|
|
808
|
+
return phase;
|
|
809
|
+
});
|
|
810
|
+
return writeAndSummarize(st, `✅ ${result}`);
|
|
811
|
+
});
|
|
753
812
|
server.registerTool("planner-task-delete", {
|
|
754
813
|
description: "Delete a task.",
|
|
755
814
|
inputSchema: { task: z.string().min(1) },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-plan/mcp",
|
|
3
|
-
"version": "0.2.19-next.
|
|
3
|
+
"version": "0.2.19-next.13",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "MCP server for Agent Plan, exposing planner-* tools over stdio.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@modelcontextprotocol/sdk": "^1.17.0",
|
|
43
43
|
"zod": "^3.24.0",
|
|
44
|
-
"@agent-plan/core": "0.2.19-next.
|
|
45
|
-
"@agent-plan/server": "0.2.19-next.
|
|
44
|
+
"@agent-plan/core": "0.2.19-next.13",
|
|
45
|
+
"@agent-plan/server": "0.2.19-next.13"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"build": "tsc -p tsconfig.json",
|