@agent-plan/mcp 0.2.19-next.24 → 0.2.19-next.26
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 +17 -20
- 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":";AA4vCA,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAItD"}
|
package/dist/index.js
CHANGED
|
@@ -4,9 +4,9 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
|
|
|
4
4
|
import * as z from "zod/v4";
|
|
5
5
|
import { join } from "node:path";
|
|
6
6
|
import { pathToFileURL } from "node:url";
|
|
7
|
-
import { PlanStore, ExportService, withFeatureLock, needsMotivation, findPhaseByRef, findTaskByRef, buildRecap,
|
|
7
|
+
import { PlanStore, ExportService, withFeatureLock, needsMotivation, findPhaseByRef, findTaskByRef, buildRecap, addChecklistItem, removeChecklistItem, toggleChecklistItem, buildPhaseContextBlock, checkExplicitTaskStart, recommendNextTask } from "@agent-plan/core";
|
|
8
8
|
import { serve } from "@agent-plan/server";
|
|
9
|
-
import { createChecklistItemId, createFeatureId, createPhaseId,
|
|
9
|
+
import { createChecklistItemId, createFeatureId, createPhaseId, createTaskId, clampSlug, normalizeSlug, formatPhaseRef, formatFeatureRef, validateResolvedTarget } from "@agent-plan/core/naming";
|
|
10
10
|
const STATUS_VALUES = ["planned", "in-progress", "done", "blocked", "canceled", "rejected", "deferred", "waiting"];
|
|
11
11
|
const PHASE_STATUS_VALUES = ["draft", "discovery", ...STATUS_VALUES];
|
|
12
12
|
function text(textValue, structuredContent) {
|
|
@@ -27,15 +27,10 @@ async function requireStore() {
|
|
|
27
27
|
const st = store();
|
|
28
28
|
if (!(await st.exists()))
|
|
29
29
|
throw new Error(`No .planner/ found at ${st.root}. Use planner-init first.`);
|
|
30
|
-
//
|
|
31
|
-
|
|
32
|
-
planBackfillDone = true;
|
|
33
|
-
await st.ensureShortIdsAndPriority().catch(() => { });
|
|
34
|
-
await migrateToGlobalSequence(st).catch(() => { });
|
|
35
|
-
}
|
|
30
|
+
// Opening a plan is read-only. Global migrations/backfills are explicit
|
|
31
|
+
// maintenance commands; running them here rewrites unrelated feature files.
|
|
36
32
|
return st;
|
|
37
33
|
}
|
|
38
|
-
let planBackfillDone = false;
|
|
39
34
|
// In-process web server handle, managed by the planner-web tool and planner-load.
|
|
40
35
|
// Lives as long as this MCP stdio process (i.e. the host session). Null when not running.
|
|
41
36
|
let webHandle = null;
|
|
@@ -398,12 +393,13 @@ server.registerTool("planner-feature-add", {
|
|
|
398
393
|
const timestamp = nowISO();
|
|
399
394
|
const effectiveStatus = status ?? "planned";
|
|
400
395
|
const existingFeatures = (await st.loadFeatures()).features;
|
|
401
|
-
const
|
|
396
|
+
const id = createFeatureId();
|
|
397
|
+
const identity = await st.allocateEntityIdentity("feature", id);
|
|
402
398
|
const priority = await st.nextPriority("feature");
|
|
403
399
|
const feature = {
|
|
404
|
-
id
|
|
405
|
-
number:
|
|
406
|
-
shortId,
|
|
400
|
+
id,
|
|
401
|
+
number: identity.number,
|
|
402
|
+
shortId: identity.shortId,
|
|
407
403
|
priority,
|
|
408
404
|
name: name.trim(),
|
|
409
405
|
description: description?.trim() ?? "",
|
|
@@ -583,12 +579,13 @@ server.registerTool("planner-phase-add", {
|
|
|
583
579
|
const phases = await st.loadAllPhases();
|
|
584
580
|
const featurePhases = feature ? phases.filter((phase) => phase.featureId === feature.id) : phases;
|
|
585
581
|
const timestamp = nowISO();
|
|
586
|
-
const
|
|
582
|
+
const id = createPhaseId();
|
|
583
|
+
const identity = await st.allocateEntityIdentity("phase", id);
|
|
587
584
|
const priority = await st.nextPriority("phase", feature?.id);
|
|
588
585
|
phase = {
|
|
589
|
-
id
|
|
590
|
-
number:
|
|
591
|
-
shortId,
|
|
586
|
+
id,
|
|
587
|
+
number: identity.number,
|
|
588
|
+
shortId: identity.shortId,
|
|
592
589
|
priority,
|
|
593
590
|
slug: normalizeSlug(title),
|
|
594
591
|
title: title.trim(),
|
|
@@ -789,13 +786,13 @@ server.registerTool("planner-task-add", {
|
|
|
789
786
|
return text(`Resolved phase ${found.id} no longer exists. Refusing to create task.`);
|
|
790
787
|
const timestamp = nowISO();
|
|
791
788
|
const taskId = createTaskId();
|
|
792
|
-
const
|
|
789
|
+
const identity = await st.allocateEntityIdentity("task", taskId);
|
|
793
790
|
const priority = await st.nextPriority("task", found.id);
|
|
794
791
|
const task = {
|
|
795
792
|
id: taskId,
|
|
796
793
|
phaseId: found.id,
|
|
797
|
-
number:
|
|
798
|
-
shortId,
|
|
794
|
+
number: identity.number,
|
|
795
|
+
shortId: identity.shortId,
|
|
799
796
|
priority,
|
|
800
797
|
shortName: clampSlug(title, 30, `task-${Date.now().toString(36)}`),
|
|
801
798
|
title: title.trim(),
|
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.26",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "MCP server for Agent Plan, exposing planner-* tools over stdio.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@modelcontextprotocol/sdk": "^1.17.0",
|
|
45
45
|
"zod": "^3.24.0",
|
|
46
|
-
"@agent-plan/core": "0.2.19-next.
|
|
47
|
-
"@agent-plan/server": "0.2.19-next.
|
|
46
|
+
"@agent-plan/core": "0.2.19-next.26",
|
|
47
|
+
"@agent-plan/server": "0.2.19-next.26"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "tsc -p tsconfig.json",
|