@programinglive/dev-workflow-mcp-server 1.1.0 → 1.1.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/CHANGELOG.md +9 -0
- package/package.json +1 -1
- package/tests/handlers.test.js +29 -0
- package/tools/definitions.js +18 -0
- package/tools/handlers.js +28 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.1.2](https://github.com/programinglive/dev-workflow-mcp-server/compare/v1.1.1...v1.1.2) (2025-10-25)
|
|
6
|
+
|
|
7
|
+
### [1.1.1](https://github.com/programinglive/dev-workflow-mcp-server/compare/v1.1.0...v1.1.1) (2025-10-25)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### ✨ Features
|
|
11
|
+
|
|
12
|
+
* add force_complete_task tool ([f731a7d](https://github.com/programinglive/dev-workflow-mcp-server/commit/f731a7d2e48295963b8573d4a2abd3ebd42ba5ab))
|
|
13
|
+
|
|
5
14
|
## [1.1.0](https://github.com/programinglive/dev-workflow-mcp-server/compare/v1.0.11...v1.1.0) (2025-10-25)
|
|
6
15
|
|
|
7
16
|
|
package/package.json
CHANGED
package/tests/handlers.test.js
CHANGED
|
@@ -96,6 +96,35 @@ test("commit_and_push commits changes and pushes", async () => {
|
|
|
96
96
|
});
|
|
97
97
|
});
|
|
98
98
|
|
|
99
|
+
test("force_complete_task records entry and resets state", async () => {
|
|
100
|
+
await withWorkflowState(async (workflowState) => {
|
|
101
|
+
workflowState.state.taskDescription = "Improve caching";
|
|
102
|
+
workflowState.state.taskType = "feature";
|
|
103
|
+
workflowState.state.lastCommitMessage = "chore: wip";
|
|
104
|
+
workflowState.state.currentPhase = "release";
|
|
105
|
+
await workflowState.save();
|
|
106
|
+
|
|
107
|
+
const response = await handleToolCall({
|
|
108
|
+
request: createRequest("force_complete_task", {
|
|
109
|
+
commitMessage: "chore: force finish",
|
|
110
|
+
reason: "Deadline hit",
|
|
111
|
+
}),
|
|
112
|
+
normalizeRequestArgs,
|
|
113
|
+
workflowState,
|
|
114
|
+
exec: async () => ({ stdout: "" }),
|
|
115
|
+
git: {},
|
|
116
|
+
utils,
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
assert.ok(response.content[0].text.includes("Task force-completed."));
|
|
120
|
+
assert.equal(workflowState.state.currentPhase, "idle");
|
|
121
|
+
assert.equal(workflowState.state.history.length, 1);
|
|
122
|
+
assert.equal(workflowState.state.history[0].commitMessage, "chore: force finish");
|
|
123
|
+
assert.equal(workflowState.state.history[0].forced, true);
|
|
124
|
+
assert.equal(workflowState.state.history[0].forceReason, "Deadline hit");
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
|
|
99
128
|
test("perform_release blocks when new changes detected", async () => {
|
|
100
129
|
await withWorkflowState(async (workflowState) => {
|
|
101
130
|
workflowState.state.currentPhase = "release";
|
package/tools/definitions.js
CHANGED
|
@@ -163,6 +163,24 @@ export function getToolList() {
|
|
|
163
163
|
required: ["commitMessage"],
|
|
164
164
|
},
|
|
165
165
|
},
|
|
166
|
+
{
|
|
167
|
+
name: "force_complete_task",
|
|
168
|
+
description:
|
|
169
|
+
"Force completion of the current task even if workflow steps are incomplete. Records history entry and resets the workflow.",
|
|
170
|
+
inputSchema: {
|
|
171
|
+
type: "object",
|
|
172
|
+
properties: {
|
|
173
|
+
commitMessage: {
|
|
174
|
+
type: "string",
|
|
175
|
+
description: "Commit message or summary to record (optional)",
|
|
176
|
+
},
|
|
177
|
+
reason: {
|
|
178
|
+
type: "string",
|
|
179
|
+
description: "Why the task was force completed",
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
},
|
|
166
184
|
{
|
|
167
185
|
name: "drop_task",
|
|
168
186
|
description:
|
package/tools/handlers.js
CHANGED
|
@@ -638,6 +638,32 @@ async function handleCompleteTask(args, workflowState) {
|
|
|
638
638
|
);
|
|
639
639
|
}
|
|
640
640
|
|
|
641
|
+
async function handleForceCompleteTask(args, workflowState) {
|
|
642
|
+
const commitMessageArg =
|
|
643
|
+
typeof args.commitMessage === "string" ? args.commitMessage.trim() : "";
|
|
644
|
+
const reason = typeof args.reason === "string" ? args.reason.trim() : "";
|
|
645
|
+
|
|
646
|
+
const commitMessage =
|
|
647
|
+
commitMessageArg || workflowState.state.lastCommitMessage || "(no commit recorded)";
|
|
648
|
+
|
|
649
|
+
workflowState.addToHistory({
|
|
650
|
+
taskDescription: workflowState.state.taskDescription,
|
|
651
|
+
taskType: workflowState.state.taskType,
|
|
652
|
+
commitMessage,
|
|
653
|
+
forced: true,
|
|
654
|
+
forceReason: reason,
|
|
655
|
+
});
|
|
656
|
+
|
|
657
|
+
workflowState.reset();
|
|
658
|
+
await workflowState.save();
|
|
659
|
+
|
|
660
|
+
const reasonText = reason ? reason : "(none provided)";
|
|
661
|
+
|
|
662
|
+
return textResponse(
|
|
663
|
+
`⚠️ Task force-completed.\n\nRecorded commit message: ${commitMessage}\nReason: ${reasonText}\nWorkflow state reset. Start a new task when ready.`
|
|
664
|
+
);
|
|
665
|
+
}
|
|
666
|
+
|
|
641
667
|
async function handleDropTask(args, workflowState) {
|
|
642
668
|
workflowState.addToHistory({
|
|
643
669
|
taskDescription: workflowState.state.taskDescription,
|
|
@@ -719,6 +745,8 @@ export async function handleToolCall({
|
|
|
719
745
|
return handlePerformRelease(args, { workflowState, exec, git, utils });
|
|
720
746
|
case "complete_task":
|
|
721
747
|
return handleCompleteTask(args, workflowState);
|
|
748
|
+
case "force_complete_task":
|
|
749
|
+
return handleForceCompleteTask(args, workflowState);
|
|
722
750
|
case "drop_task":
|
|
723
751
|
return handleDropTask(args, workflowState);
|
|
724
752
|
case "get_workflow_status":
|