@zeliper/zscode-mcp-server 1.0.0
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/errors/index.d.ts +112 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +231 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +50 -0
- package/dist/index.js.map +1 -0
- package/dist/state/manager.d.ts +54 -0
- package/dist/state/manager.d.ts.map +1 -0
- package/dist/state/manager.js +500 -0
- package/dist/state/manager.js.map +1 -0
- package/dist/state/schema.d.ts +942 -0
- package/dist/state/schema.d.ts.map +1 -0
- package/dist/state/schema.js +179 -0
- package/dist/state/schema.js.map +1 -0
- package/dist/state/types.d.ts +117 -0
- package/dist/state/types.d.ts.map +1 -0
- package/dist/state/types.js +2 -0
- package/dist/state/types.js.map +1 -0
- package/dist/tools/archive.d.ts +6 -0
- package/dist/tools/archive.d.ts.map +1 -0
- package/dist/tools/archive.js +67 -0
- package/dist/tools/archive.js.map +1 -0
- package/dist/tools/cancel.d.ts +6 -0
- package/dist/tools/cancel.d.ts.map +1 -0
- package/dist/tools/cancel.js +65 -0
- package/dist/tools/cancel.js.map +1 -0
- package/dist/tools/context.d.ts +6 -0
- package/dist/tools/context.d.ts.map +1 -0
- package/dist/tools/context.js +124 -0
- package/dist/tools/context.js.map +1 -0
- package/dist/tools/index.d.ts +6 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +24 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/plan.d.ts +6 -0
- package/dist/tools/plan.d.ts.map +1 -0
- package/dist/tools/plan.js +186 -0
- package/dist/tools/plan.js.map +1 -0
- package/dist/tools/staging.d.ts +6 -0
- package/dist/tools/staging.d.ts.map +1 -0
- package/dist/tools/staging.js +224 -0
- package/dist/tools/staging.js.map +1 -0
- package/dist/tools/status.d.ts +6 -0
- package/dist/tools/status.d.ts.map +1 -0
- package/dist/tools/status.js +144 -0
- package/dist/tools/status.js.map +1 -0
- package/dist/utils/artifacts.d.ts +57 -0
- package/dist/utils/artifacts.d.ts.map +1 -0
- package/dist/utils/artifacts.js +180 -0
- package/dist/utils/artifacts.js.map +1 -0
- package/dist/utils/paths.d.ts +68 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +122 -0
- package/dist/utils/paths.js.map +1 -0
- package/package.json +53 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAQpE;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,CAkB7E"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { registerContextTools } from "./context.js";
|
|
2
|
+
import { registerPlanTools } from "./plan.js";
|
|
3
|
+
import { registerStagingTools } from "./staging.js";
|
|
4
|
+
import { registerStatusTool } from "./status.js";
|
|
5
|
+
import { registerArchiveTool } from "./archive.js";
|
|
6
|
+
import { registerCancelTool } from "./cancel.js";
|
|
7
|
+
/**
|
|
8
|
+
* Register all ZSCode MCP tools
|
|
9
|
+
*/
|
|
10
|
+
export function registerAllTools(server, projectRoot) {
|
|
11
|
+
// Context tools: get_full_context, init_project
|
|
12
|
+
registerContextTools(server, projectRoot);
|
|
13
|
+
// Plan tools: create_plan, sync_plan, update_task
|
|
14
|
+
registerPlanTools(server);
|
|
15
|
+
// Staging tools: zscode:start, complete_staging, save_task_output, get_staging_artifacts
|
|
16
|
+
registerStagingTools(server, projectRoot);
|
|
17
|
+
// Status tool: zscode:status
|
|
18
|
+
registerStatusTool(server);
|
|
19
|
+
// Archive tool: zscode:archive
|
|
20
|
+
registerArchiveTool(server);
|
|
21
|
+
// Cancel tool: zscode:cancel
|
|
22
|
+
registerCancelTool(server);
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAiB,EAAE,WAAmB;IACrE,gDAAgD;IAChD,oBAAoB,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAE1C,kDAAkD;IAClD,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAE1B,yFAAyF;IACzF,oBAAoB,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAE1C,6BAA6B;IAC7B,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAE3B,+BAA+B;IAC/B,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAE5B,6BAA6B;IAC7B,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../src/tools/plan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAMpE;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAwNzD"}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { StateManager } from "../state/manager.js";
|
|
3
|
+
import { withErrorHandling, ProjectNotInitializedError, TaskNotFoundError } from "../errors/index.js";
|
|
4
|
+
/**
|
|
5
|
+
* Register plan-related tools
|
|
6
|
+
*/
|
|
7
|
+
export function registerPlanTools(server) {
|
|
8
|
+
// ============ create_plan ============
|
|
9
|
+
server.tool("create_plan", "Create a new plan with stagings and tasks. Plans organize work into sequential staging phases, each containing parallel or sequential tasks.", {
|
|
10
|
+
title: z.string().describe("Plan title"),
|
|
11
|
+
description: z.string().optional().describe("Plan description"),
|
|
12
|
+
stagings: z.array(z.object({
|
|
13
|
+
name: z.string().describe("Staging name (e.g., 'Phase 1: Setup')"),
|
|
14
|
+
description: z.string().optional().describe("Staging description"),
|
|
15
|
+
execution_type: z.enum(["parallel", "sequential"]).default("parallel")
|
|
16
|
+
.describe("How tasks in this staging are executed"),
|
|
17
|
+
tasks: z.array(z.object({
|
|
18
|
+
title: z.string().describe("Task title"),
|
|
19
|
+
description: z.string().optional().describe("Task description"),
|
|
20
|
+
priority: z.enum(["high", "medium", "low"]).default("medium").describe("Task priority"),
|
|
21
|
+
execution_mode: z.enum(["parallel", "sequential"]).default("parallel")
|
|
22
|
+
.describe("Execution mode within staging"),
|
|
23
|
+
depends_on_index: z.array(z.number().int().min(0)).default([])
|
|
24
|
+
.describe("Indices of tasks this task depends on (within same staging)"),
|
|
25
|
+
})).describe("Tasks in this staging"),
|
|
26
|
+
})).describe("Staging phases in execution order"),
|
|
27
|
+
}, async (args) => {
|
|
28
|
+
const result = await withErrorHandling(async () => {
|
|
29
|
+
const manager = StateManager.getInstance();
|
|
30
|
+
if (!manager.isInitialized()) {
|
|
31
|
+
throw new ProjectNotInitializedError();
|
|
32
|
+
}
|
|
33
|
+
const stagingConfigs = args.stagings.map(s => ({
|
|
34
|
+
name: s.name,
|
|
35
|
+
description: s.description,
|
|
36
|
+
execution_type: s.execution_type,
|
|
37
|
+
tasks: s.tasks.map(t => ({
|
|
38
|
+
title: t.title,
|
|
39
|
+
description: t.description,
|
|
40
|
+
priority: t.priority,
|
|
41
|
+
execution_mode: t.execution_mode,
|
|
42
|
+
depends_on_index: t.depends_on_index,
|
|
43
|
+
})),
|
|
44
|
+
}));
|
|
45
|
+
const plan = await manager.createPlan(args.title, args.description, stagingConfigs);
|
|
46
|
+
// Get created stagings and tasks for response
|
|
47
|
+
const stagings = manager.getStagingsByPlan(plan.id);
|
|
48
|
+
const taskCount = stagings.reduce((sum, s) => sum + s.tasks.length, 0);
|
|
49
|
+
return {
|
|
50
|
+
success: true,
|
|
51
|
+
message: `Plan "${args.title}" created with ${stagings.length} stagings and ${taskCount} tasks`,
|
|
52
|
+
plan: {
|
|
53
|
+
id: plan.id,
|
|
54
|
+
title: plan.title,
|
|
55
|
+
status: plan.status,
|
|
56
|
+
stagings: stagings.map(s => ({
|
|
57
|
+
id: s.id,
|
|
58
|
+
name: s.name,
|
|
59
|
+
order: s.order,
|
|
60
|
+
execution_type: s.execution_type,
|
|
61
|
+
taskCount: s.tasks.length,
|
|
62
|
+
})),
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
}, "create_plan");
|
|
66
|
+
if (result.success) {
|
|
67
|
+
return {
|
|
68
|
+
content: [{ type: "text", text: JSON.stringify(result.data, null, 2) }],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
return {
|
|
73
|
+
content: [{ type: "text", text: JSON.stringify(result.error, null, 2) }],
|
|
74
|
+
isError: true,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
// ============ update_task ============
|
|
79
|
+
server.tool("update_task", "Update a task's status. Use this to mark tasks as in_progress, done, or blocked.", {
|
|
80
|
+
taskId: z.string().describe("Task ID to update"),
|
|
81
|
+
status: z.enum(["pending", "in_progress", "done", "blocked", "cancelled"])
|
|
82
|
+
.describe("New task status"),
|
|
83
|
+
notes: z.string().optional().describe("Notes about the status change"),
|
|
84
|
+
}, async (args) => {
|
|
85
|
+
const result = await withErrorHandling(async () => {
|
|
86
|
+
const manager = StateManager.getInstance();
|
|
87
|
+
if (!manager.isInitialized()) {
|
|
88
|
+
throw new ProjectNotInitializedError();
|
|
89
|
+
}
|
|
90
|
+
const task = manager.getTask(args.taskId);
|
|
91
|
+
if (!task) {
|
|
92
|
+
throw new TaskNotFoundError(args.taskId);
|
|
93
|
+
}
|
|
94
|
+
const previousStatus = task.status;
|
|
95
|
+
await manager.updateTaskStatus(args.taskId, args.status, args.notes);
|
|
96
|
+
return {
|
|
97
|
+
success: true,
|
|
98
|
+
message: `Task status updated: ${previousStatus} -> ${args.status}`,
|
|
99
|
+
task: {
|
|
100
|
+
id: task.id,
|
|
101
|
+
title: task.title,
|
|
102
|
+
previousStatus,
|
|
103
|
+
newStatus: args.status,
|
|
104
|
+
notes: args.notes,
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
}, "update_task");
|
|
108
|
+
if (result.success) {
|
|
109
|
+
return {
|
|
110
|
+
content: [{ type: "text", text: JSON.stringify(result.data, null, 2) }],
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
return {
|
|
115
|
+
content: [{ type: "text", text: JSON.stringify(result.error, null, 2) }],
|
|
116
|
+
isError: true,
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
// ============ sync_plan ============
|
|
121
|
+
server.tool("sync_plan", "Synchronize plan status based on current task states. Automatically completes stagings and plans when all tasks are done.", {
|
|
122
|
+
planId: z.string().describe("Plan ID to synchronize"),
|
|
123
|
+
}, async (args) => {
|
|
124
|
+
const result = await withErrorHandling(async () => {
|
|
125
|
+
const manager = StateManager.getInstance();
|
|
126
|
+
if (!manager.isInitialized()) {
|
|
127
|
+
throw new ProjectNotInitializedError();
|
|
128
|
+
}
|
|
129
|
+
const plan = manager.getPlan(args.planId);
|
|
130
|
+
if (!plan) {
|
|
131
|
+
throw new Error(`Plan not found: ${args.planId}`);
|
|
132
|
+
}
|
|
133
|
+
// Get all stagings and their status
|
|
134
|
+
const stagings = manager.getStagingsByPlan(args.planId);
|
|
135
|
+
const stagingStatus = stagings.map(staging => {
|
|
136
|
+
const tasks = manager.getTasksByStaging(staging.id);
|
|
137
|
+
const completedTasks = tasks.filter(t => t.status === "done").length;
|
|
138
|
+
const totalTasks = tasks.length;
|
|
139
|
+
const allDone = totalTasks > 0 && completedTasks === totalTasks;
|
|
140
|
+
return {
|
|
141
|
+
id: staging.id,
|
|
142
|
+
name: staging.name,
|
|
143
|
+
status: staging.status,
|
|
144
|
+
completedTasks,
|
|
145
|
+
totalTasks,
|
|
146
|
+
allTasksDone: allDone,
|
|
147
|
+
};
|
|
148
|
+
});
|
|
149
|
+
// Auto-complete stagings where all tasks are done
|
|
150
|
+
for (const s of stagingStatus) {
|
|
151
|
+
if (s.allTasksDone && s.status === "in_progress") {
|
|
152
|
+
await manager.completestaging(s.id);
|
|
153
|
+
s.status = "completed";
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
// Check if plan is complete
|
|
157
|
+
const allStagingsComplete = stagingStatus.every(s => s.status === "completed");
|
|
158
|
+
if (allStagingsComplete && plan.status === "active") {
|
|
159
|
+
await manager.updatePlanStatus(args.planId, "completed");
|
|
160
|
+
}
|
|
161
|
+
const updatedPlan = manager.getPlan(args.planId);
|
|
162
|
+
return {
|
|
163
|
+
success: true,
|
|
164
|
+
message: "Plan synchronized",
|
|
165
|
+
plan: {
|
|
166
|
+
id: updatedPlan.id,
|
|
167
|
+
title: updatedPlan.title,
|
|
168
|
+
status: updatedPlan.status,
|
|
169
|
+
},
|
|
170
|
+
stagings: stagingStatus,
|
|
171
|
+
};
|
|
172
|
+
}, "sync_plan");
|
|
173
|
+
if (result.success) {
|
|
174
|
+
return {
|
|
175
|
+
content: [{ type: "text", text: JSON.stringify(result.data, null, 2) }],
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
return {
|
|
180
|
+
content: [{ type: "text", text: JSON.stringify(result.error, null, 2) }],
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AI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"staging.d.ts","sourceRoot":"","sources":["../../src/tools/staging.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAapE;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,CA8QjF"}
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { StateManager } from "../state/manager.js";
|
|
3
|
+
import { ArtifactsManager } from "../utils/artifacts.js";
|
|
4
|
+
import { withErrorHandling, ProjectNotInitializedError, PlanNotFoundError, StagingNotFoundError, StagingPlanMismatchError, } from "../errors/index.js";
|
|
5
|
+
/**
|
|
6
|
+
* Register staging-related tools
|
|
7
|
+
*/
|
|
8
|
+
export function registerStagingTools(server, projectRoot) {
|
|
9
|
+
const artifactsManager = new ArtifactsManager(projectRoot);
|
|
10
|
+
// ============ zscode:start ============
|
|
11
|
+
server.tool("zscode:start", "Start a specific staging phase of a plan. Sets the staging status to 'in_progress' and prepares the artifacts directory. Use this when you're ready to begin work on a staging.", {
|
|
12
|
+
planId: z.string().describe("Plan ID (e.g., plan-abc12345)"),
|
|
13
|
+
stagingId: z.string().describe("Staging ID to start (e.g., staging-0001)"),
|
|
14
|
+
}, async (args) => {
|
|
15
|
+
const result = await withErrorHandling(async () => {
|
|
16
|
+
const manager = StateManager.getInstance();
|
|
17
|
+
if (!manager.isInitialized()) {
|
|
18
|
+
throw new ProjectNotInitializedError();
|
|
19
|
+
}
|
|
20
|
+
const plan = manager.getPlan(args.planId);
|
|
21
|
+
if (!plan) {
|
|
22
|
+
throw new PlanNotFoundError(args.planId);
|
|
23
|
+
}
|
|
24
|
+
const staging = manager.getStaging(args.stagingId);
|
|
25
|
+
if (!staging) {
|
|
26
|
+
throw new StagingNotFoundError(args.stagingId);
|
|
27
|
+
}
|
|
28
|
+
if (staging.planId !== args.planId) {
|
|
29
|
+
throw new StagingPlanMismatchError(args.stagingId, args.planId, staging.planId);
|
|
30
|
+
}
|
|
31
|
+
// Start the staging
|
|
32
|
+
const startedStaging = await manager.startStaging(args.planId, args.stagingId);
|
|
33
|
+
// Create artifacts directory
|
|
34
|
+
await artifactsManager.createStagingArtifactsDir(args.planId, args.stagingId);
|
|
35
|
+
// Get executable tasks
|
|
36
|
+
const executableTasks = manager.getExecutableTasks(args.stagingId);
|
|
37
|
+
const allTasks = manager.getTasksByStaging(args.stagingId);
|
|
38
|
+
return {
|
|
39
|
+
success: true,
|
|
40
|
+
message: `Staging "${startedStaging.name}" started`,
|
|
41
|
+
staging: {
|
|
42
|
+
id: startedStaging.id,
|
|
43
|
+
name: startedStaging.name,
|
|
44
|
+
status: startedStaging.status,
|
|
45
|
+
execution_type: startedStaging.execution_type,
|
|
46
|
+
},
|
|
47
|
+
artifactsPath: startedStaging.artifacts_path,
|
|
48
|
+
tasks: {
|
|
49
|
+
total: allTasks.length,
|
|
50
|
+
executable: executableTasks.map(t => ({
|
|
51
|
+
id: t.id,
|
|
52
|
+
title: t.title,
|
|
53
|
+
priority: t.priority,
|
|
54
|
+
execution_mode: t.execution_mode,
|
|
55
|
+
depends_on: t.depends_on,
|
|
56
|
+
})),
|
|
57
|
+
pending: allTasks.filter(t => t.status === "pending").length,
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
}, "zscode:start");
|
|
61
|
+
if (result.success) {
|
|
62
|
+
return {
|
|
63
|
+
content: [{ type: "text", text: JSON.stringify(result.data, null, 2) }],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
return {
|
|
68
|
+
content: [{ type: "text", text: JSON.stringify(result.error, null, 2) }],
|
|
69
|
+
isError: true,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
// ============ complete_staging ============
|
|
74
|
+
server.tool("complete_staging", "Manually complete a staging. Usually stagings are auto-completed when all tasks are done, but this can be used to force completion.", {
|
|
75
|
+
stagingId: z.string().describe("Staging ID to complete"),
|
|
76
|
+
}, async (args) => {
|
|
77
|
+
const result = await withErrorHandling(async () => {
|
|
78
|
+
const manager = StateManager.getInstance();
|
|
79
|
+
if (!manager.isInitialized()) {
|
|
80
|
+
throw new ProjectNotInitializedError();
|
|
81
|
+
}
|
|
82
|
+
const staging = manager.getStaging(args.stagingId);
|
|
83
|
+
if (!staging) {
|
|
84
|
+
throw new StagingNotFoundError(args.stagingId);
|
|
85
|
+
}
|
|
86
|
+
await manager.completestaging(args.stagingId);
|
|
87
|
+
return {
|
|
88
|
+
success: true,
|
|
89
|
+
message: `Staging "${staging.name}" completed`,
|
|
90
|
+
staging: {
|
|
91
|
+
id: staging.id,
|
|
92
|
+
name: staging.name,
|
|
93
|
+
status: "completed",
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
}, "complete_staging");
|
|
97
|
+
if (result.success) {
|
|
98
|
+
return {
|
|
99
|
+
content: [{ type: "text", text: JSON.stringify(result.data, null, 2) }],
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
return {
|
|
104
|
+
content: [{ type: "text", text: JSON.stringify(result.error, null, 2) }],
|
|
105
|
+
isError: true,
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
// ============ save_task_output ============
|
|
110
|
+
server.tool("save_task_output", "Save the output/result of a completed task. This stores artifacts that can be used by subsequent tasks.", {
|
|
111
|
+
planId: z.string().describe("Plan ID"),
|
|
112
|
+
stagingId: z.string().describe("Staging ID"),
|
|
113
|
+
taskId: z.string().describe("Task ID"),
|
|
114
|
+
output: z.object({
|
|
115
|
+
status: z.enum(["success", "failure", "partial"]).describe("Output status"),
|
|
116
|
+
summary: z.string().describe("Summary of what was accomplished"),
|
|
117
|
+
artifacts: z.array(z.string()).default([]).describe("Paths to created files"),
|
|
118
|
+
data: z.record(z.unknown()).optional().describe("Arbitrary data to pass to next tasks"),
|
|
119
|
+
error: z.string().optional().describe("Error message if failed"),
|
|
120
|
+
}).describe("Task output data"),
|
|
121
|
+
}, async (args) => {
|
|
122
|
+
const result = await withErrorHandling(async () => {
|
|
123
|
+
const manager = StateManager.getInstance();
|
|
124
|
+
if (!manager.isInitialized()) {
|
|
125
|
+
throw new ProjectNotInitializedError();
|
|
126
|
+
}
|
|
127
|
+
const task = manager.getTask(args.taskId);
|
|
128
|
+
if (!task) {
|
|
129
|
+
throw new Error(`Task not found: ${args.taskId}`);
|
|
130
|
+
}
|
|
131
|
+
const output = {
|
|
132
|
+
status: args.output.status,
|
|
133
|
+
summary: args.output.summary,
|
|
134
|
+
artifacts: args.output.artifacts,
|
|
135
|
+
data: args.output.data,
|
|
136
|
+
error: args.output.error,
|
|
137
|
+
completedAt: new Date().toISOString(),
|
|
138
|
+
};
|
|
139
|
+
// Save to state
|
|
140
|
+
await manager.saveTaskOutput(args.taskId, output);
|
|
141
|
+
// Save to artifacts file
|
|
142
|
+
const outputPath = await artifactsManager.saveTaskOutput(args.planId, args.stagingId, args.taskId, output);
|
|
143
|
+
return {
|
|
144
|
+
success: true,
|
|
145
|
+
message: "Task output saved",
|
|
146
|
+
task: {
|
|
147
|
+
id: task.id,
|
|
148
|
+
title: task.title,
|
|
149
|
+
},
|
|
150
|
+
outputPath,
|
|
151
|
+
output,
|
|
152
|
+
};
|
|
153
|
+
}, "save_task_output");
|
|
154
|
+
if (result.success) {
|
|
155
|
+
return {
|
|
156
|
+
content: [{ type: "text", text: JSON.stringify(result.data, null, 2) }],
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
return {
|
|
161
|
+
content: [{ type: "text", text: JSON.stringify(result.error, null, 2) }],
|
|
162
|
+
isError: true,
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
// ============ get_staging_artifacts ============
|
|
167
|
+
server.tool("get_staging_artifacts", "Get all artifacts (task outputs) from a completed staging. Use this to access results from previous stagings.", {
|
|
168
|
+
planId: z.string().describe("Plan ID"),
|
|
169
|
+
stagingId: z.string().describe("Staging ID to get artifacts from"),
|
|
170
|
+
taskId: z.string().optional().describe("Specific task ID (optional, if omitted returns all)"),
|
|
171
|
+
}, async (args) => {
|
|
172
|
+
const result = await withErrorHandling(async () => {
|
|
173
|
+
const manager = StateManager.getInstance();
|
|
174
|
+
if (!manager.isInitialized()) {
|
|
175
|
+
throw new ProjectNotInitializedError();
|
|
176
|
+
}
|
|
177
|
+
const staging = manager.getStaging(args.stagingId);
|
|
178
|
+
if (!staging) {
|
|
179
|
+
throw new StagingNotFoundError(args.stagingId);
|
|
180
|
+
}
|
|
181
|
+
if (args.taskId) {
|
|
182
|
+
// Get specific task output
|
|
183
|
+
const output = await artifactsManager.getTaskOutput(args.planId, args.stagingId, args.taskId);
|
|
184
|
+
return {
|
|
185
|
+
success: true,
|
|
186
|
+
staging: {
|
|
187
|
+
id: staging.id,
|
|
188
|
+
name: staging.name,
|
|
189
|
+
status: staging.status,
|
|
190
|
+
},
|
|
191
|
+
taskOutput: output,
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
// Get all task outputs for staging
|
|
196
|
+
const outputs = await artifactsManager.getStagingOutputs(args.planId, args.stagingId);
|
|
197
|
+
const files = await artifactsManager.listStagingArtifacts(args.planId, args.stagingId);
|
|
198
|
+
return {
|
|
199
|
+
success: true,
|
|
200
|
+
staging: {
|
|
201
|
+
id: staging.id,
|
|
202
|
+
name: staging.name,
|
|
203
|
+
status: staging.status,
|
|
204
|
+
artifacts_path: staging.artifacts_path,
|
|
205
|
+
},
|
|
206
|
+
taskOutputs: outputs,
|
|
207
|
+
files,
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
}, "get_staging_artifacts");
|
|
211
|
+
if (result.success) {
|
|
212
|
+
return {
|
|
213
|
+
content: [{ type: "text", text: JSON.stringify(result.data, null, 2) }],
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
return {
|
|
218
|
+
content: [{ type: "text", text: JSON.stringify(result.error, null, 2) }],
|
|
219
|
+
isError: true,
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
//# sourceMappingURL=staging.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"staging.js","sourceRoot":"","sources":["../../src/tools/staging.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EACL,iBAAiB,EACjB,0BAA0B,EAC1B,iBAAiB,EACjB,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,oBAAoB,CAAC;AAG5B;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAiB,EAAE,WAAmB;IACzE,MAAM,gBAAgB,GAAG,IAAI,gBAAgB,CAAC,WAAW,CAAC,CAAC;IAE3D,yCAAyC;IACzC,MAAM,CAAC,IAAI,CACT,cAAc,EACd,iLAAiL,EACjL;QACE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;QAC5D,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;KAC3E,EACD,KAAK,EAAE,IAAI,EAAE,EAAE;QACb,MAAM,MAAM,GAAG,MAAM,iBAAiB,CAAC,KAAK,IAAI,EAAE;YAChD,MAAM,OAAO,GAAG,YAAY,CAAC,WAAW,EAAE,CAAC;YAE3C,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC;gBAC7B,MAAM,IAAI,0BAA0B,EAAE,CAAC;YACzC,CAA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|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/tools/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAUpE;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAqC1D"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { StateManager } from "../state/manager.js";
|
|
3
|
+
import { withErrorHandling, ProjectNotInitializedError, PlanNotFoundError, } from "../errors/index.js";
|
|
4
|
+
/**
|
|
5
|
+
* Register status tool
|
|
6
|
+
*/
|
|
7
|
+
export function registerStatusTool(server) {
|
|
8
|
+
// ============ zscode:status ============
|
|
9
|
+
server.tool("zscode:status", "Get the status of all plans or a specific plan. Shows progress, current staging, and task completion. Use without planId for overview, with planId for detailed view.", {
|
|
10
|
+
planId: z.string().optional().describe("Plan ID for detailed status (omit for overview of all plans)"),
|
|
11
|
+
}, async (args) => {
|
|
12
|
+
const result = await withErrorHandling(async () => {
|
|
13
|
+
const manager = StateManager.getInstance();
|
|
14
|
+
if (!manager.isInitialized()) {
|
|
15
|
+
throw new ProjectNotInitializedError();
|
|
16
|
+
}
|
|
17
|
+
if (args.planId) {
|
|
18
|
+
// Detailed status for specific plan
|
|
19
|
+
return getDetailedPlanStatus(manager, args.planId);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
// Overview of all plans
|
|
23
|
+
return getAllPlansStatus(manager);
|
|
24
|
+
}
|
|
25
|
+
}, "zscode:status");
|
|
26
|
+
if (result.success) {
|
|
27
|
+
return {
|
|
28
|
+
content: [{ type: "text", text: JSON.stringify(result.data, null, 2) }],
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
return {
|
|
33
|
+
content: [{ type: "text", text: JSON.stringify(result.error, null, 2) }],
|
|
34
|
+
isError: true,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Get overview status of all plans
|
|
41
|
+
*/
|
|
42
|
+
function getAllPlansStatus(manager) {
|
|
43
|
+
const allPlans = manager.getAllPlans();
|
|
44
|
+
const overview = {
|
|
45
|
+
totalPlans: allPlans.length,
|
|
46
|
+
activePlans: allPlans.filter(p => p.status === "active").length,
|
|
47
|
+
completedPlans: allPlans.filter(p => p.status === "completed").length,
|
|
48
|
+
archivedPlans: allPlans.filter(p => p.status === "archived").length,
|
|
49
|
+
cancelledPlans: allPlans.filter(p => p.status === "cancelled").length,
|
|
50
|
+
};
|
|
51
|
+
const planSummaries = allPlans.map(plan => {
|
|
52
|
+
const stagings = manager.getStagingsByPlan(plan.id);
|
|
53
|
+
const completedStagings = stagings.filter(s => s.status === "completed").length;
|
|
54
|
+
let totalTasks = 0;
|
|
55
|
+
let completedTasks = 0;
|
|
56
|
+
for (const staging of stagings) {
|
|
57
|
+
const tasks = manager.getTasksByStaging(staging.id);
|
|
58
|
+
totalTasks += tasks.length;
|
|
59
|
+
completedTasks += tasks.filter(t => t.status === "done").length;
|
|
60
|
+
}
|
|
61
|
+
const percentage = totalTasks > 0 ? Math.round((completedTasks / totalTasks) * 100) : 0;
|
|
62
|
+
const currentStaging = plan.currentStagingId
|
|
63
|
+
? manager.getStaging(plan.currentStagingId)
|
|
64
|
+
: undefined;
|
|
65
|
+
return {
|
|
66
|
+
id: plan.id,
|
|
67
|
+
title: plan.title,
|
|
68
|
+
status: plan.status,
|
|
69
|
+
progress: {
|
|
70
|
+
totalStagings: stagings.length,
|
|
71
|
+
completedStagings,
|
|
72
|
+
totalTasks,
|
|
73
|
+
completedTasks,
|
|
74
|
+
percentage,
|
|
75
|
+
},
|
|
76
|
+
currentStaging: currentStaging
|
|
77
|
+
? {
|
|
78
|
+
id: currentStaging.id,
|
|
79
|
+
name: currentStaging.name,
|
|
80
|
+
status: currentStaging.status,
|
|
81
|
+
}
|
|
82
|
+
: undefined,
|
|
83
|
+
};
|
|
84
|
+
});
|
|
85
|
+
const state = manager.getState();
|
|
86
|
+
return {
|
|
87
|
+
success: true,
|
|
88
|
+
overview,
|
|
89
|
+
plans: planSummaries,
|
|
90
|
+
currentContext: {
|
|
91
|
+
planId: state?.context.currentPlanId,
|
|
92
|
+
stagingId: state?.context.currentStagingId,
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Get detailed status for a specific plan
|
|
98
|
+
*/
|
|
99
|
+
function getDetailedPlanStatus(manager, planId) {
|
|
100
|
+
const plan = manager.getPlan(planId);
|
|
101
|
+
if (!plan) {
|
|
102
|
+
throw new PlanNotFoundError(planId);
|
|
103
|
+
}
|
|
104
|
+
const stagings = manager.getStagingsByPlan(planId);
|
|
105
|
+
const state = manager.getState();
|
|
106
|
+
const decisions = state?.context.decisions.filter(d => d.relatedPlanId === planId) ?? [];
|
|
107
|
+
const stagingDetails = stagings.map(staging => {
|
|
108
|
+
const tasks = manager.getTasksByStaging(staging.id);
|
|
109
|
+
const completedTasks = tasks.filter(t => t.status === "done").length;
|
|
110
|
+
return {
|
|
111
|
+
id: staging.id,
|
|
112
|
+
name: staging.name,
|
|
113
|
+
order: staging.order,
|
|
114
|
+
status: staging.status,
|
|
115
|
+
execution_type: staging.execution_type,
|
|
116
|
+
taskCount: tasks.length,
|
|
117
|
+
completedTaskCount: completedTasks,
|
|
118
|
+
tasks: tasks.map(task => ({
|
|
119
|
+
id: task.id,
|
|
120
|
+
title: task.title,
|
|
121
|
+
status: task.status,
|
|
122
|
+
priority: task.priority,
|
|
123
|
+
execution_mode: task.execution_mode,
|
|
124
|
+
depends_on: task.depends_on,
|
|
125
|
+
hasOutput: !!task.output,
|
|
126
|
+
})),
|
|
127
|
+
};
|
|
128
|
+
});
|
|
129
|
+
const planDetail = {
|
|
130
|
+
id: plan.id,
|
|
131
|
+
title: plan.title,
|
|
132
|
+
description: plan.description,
|
|
133
|
+
status: plan.status,
|
|
134
|
+
stagings: stagingDetails,
|
|
135
|
+
decisions,
|
|
136
|
+
createdAt: plan.createdAt,
|
|
137
|
+
updatedAt: plan.updatedAt,
|
|
138
|
+
};
|
|
139
|
+
return {
|
|
140
|
+
success: true,
|
|
141
|
+
plan: planDetail,
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=status.js.map
|