@programinglive/dev-workflow-mcp-server 1.8.1 → 1.10.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/.env.example +21 -1
- package/AGENTS.md +25 -0
- package/README.md +372 -649
- package/factory-client.js +554 -0
- package/git-facade.js +35 -0
- package/index.js +9 -34
- package/package.json +21 -20
- package/scripts/bootstrap-unix.sh +55 -0
- package/scripts/bootstrap-windows.ps1 +75 -0
- package/scripts/install-husky.js +43 -0
- package/scripts/setup-stack.js +436 -0
- package/scripts/setup-test-dbs.sh +61 -0
- package/scripts/test-db-adapters.sh +71 -0
- package/scripts/verify-bundle.mjs +92 -0
- package/tools/definitions.js +143 -0
- package/tools/handler-modules/commit-handlers.js +2 -1
- package/tools/handler-modules/factory-handlers.js +276 -0
- package/tools/handler-modules/index.js +24 -7
- package/tools/handler-modules/shared.js +7 -41
- package/tools/handler-modules/status-handlers.js +25 -3
- package/tools/handler-modules/workflow-handlers.js +57 -10
- package/vite.config.js +6 -0
- package/workflow-state.js +176 -2
- package/.agent/workflows/dev-workflow-bugfix.md +0 -250
- package/.agent/workflows/dev-workflow-feature.md +0 -201
- package/.agent/workflows/dev-workflow-full-cycle.md +0 -400
- package/.agent/workflows/dev-workflow-refactor.md +0 -238
- package/.env.production +0 -16
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -34
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -25
- package/.github/pull_request_template.md +0 -22
- package/.github/workflows/github-release.yml +0 -131
- package/.husky/commit-msg +0 -3
- package/.husky/pre-commit +0 -2
- package/CHANGELOG.md +0 -1145
- package/docs/GCP_DEPLOYMENT.md +0 -298
- package/docs/NETLIFY_DEPLOYMENT.md +0 -125
- package/docs/PLESK_DEPLOYMENT.md +0 -170
- package/docs/PRD.md +0 -86
- package/docs/WORKFLOW-BEST-PRACTICES.md +0 -58
- package/docs/antigravity/EXAMPLES.md +0 -535
- package/docs/antigravity/GETTING-STARTED.md +0 -292
- package/docs/antigravity/TROUBLESHOOTING.md +0 -742
- package/docs/antigravity/WALKTHROUGH.md +0 -25
- package/docs/antigravity/WORKFLOW-TEMPLATES.md +0 -670
- package/docs/release-notes/RELEASE_NOTES.md +0 -524
- package/docs/web-dashboard.md +0 -175
- package/scripts/test-auth-flow.js +0 -75
- package/tailwind.config.js +0 -8
- package/tests/build.test.js +0 -74
- package/tests/db-adapters.test.js +0 -108
- package/tests/env-support.test.js +0 -46
- package/tests/exec.test.js +0 -35
- package/tests/handlers-commit.test.js +0 -174
- package/tests/handlers-release.test.js +0 -212
- package/tests/handlers-workflow.test.js +0 -68
- package/tests/handlers.test.js +0 -1142
- package/tests/hello-world.test.js +0 -13
- package/tests/mcpRegistry.test.js +0 -65
- package/tests/patch-release.test.js +0 -7
- package/tests/release-wrapper.test.js +0 -107
- package/tests/startup-resilience.test.js +0 -73
- package/tests/test-helpers.js +0 -50
- package/tests/workflowState.test.js +0 -520
- package/web/Dockerfile.api +0 -25
- package/web/README.md +0 -133
- package/web/__tests__/api/workflow-history.test.js +0 -63
- package/web/api-server.js +0 -211
- package/web/app/docs/page.tsx +0 -202
- package/web/app/favicon.ico +0 -0
- package/web/app/globals.css +0 -91
- package/web/app/history/page.tsx +0 -220
- package/web/app/layout.tsx +0 -39
- package/web/app/login/page.tsx +0 -142
- package/web/app/page.tsx +0 -13
- package/web/components/ApiReference.tsx +0 -20
- package/web/components/Features.tsx +0 -61
- package/web/components/Footer.tsx +0 -9
- package/web/components/Hero.tsx +0 -96
- package/web/components/History.tsx +0 -175
- package/web/components/Navbar.tsx +0 -208
- package/web/components/Terminal.tsx +0 -114
- package/web/components/ThemeProvider.tsx +0 -58
- package/web/eslint.config.mjs +0 -18
- package/web/lib/api-client.ts +0 -123
- package/web/lib/auth.js +0 -75
- package/web/lib/db.js +0 -131
- package/web/lib/docs.js +0 -73
- package/web/middleware/auth.js +0 -26
- package/web/netlify.toml +0 -8
- package/web/next.config.ts +0 -19
- package/web/package-lock.json +0 -10911
- package/web/package.json +0 -42
- package/web/postcss.config.mjs +0 -9
- package/web/public/assets/android-chrome-192x192.png +0 -0
- package/web/public/assets/android-chrome-512x512.png +0 -0
- package/web/public/assets/apple-touch-icon.png +0 -0
- package/web/public/assets/favicon-16x16.png +0 -0
- package/web/public/assets/favicon-32x32.png +0 -0
- package/web/public/assets/favicon.ico +0 -0
- package/web/public/assets/favicon.png +0 -0
- package/web/public/assets/logo.png +0 -0
- package/web/public/assets/og-preview.png +0 -0
- package/web/public/assets/site.webmanifest +0 -1
- package/web/public/file.svg +0 -1
- package/web/public/globe.svg +0 -1
- package/web/public/next.svg +0 -1
- package/web/public/vercel.svg +0 -1
- package/web/public/window.svg +0 -1
- package/web/scripts/db-query-history.js +0 -120
- package/web/scripts/smoke-test.js +0 -30
- package/web/server.js +0 -184
- package/web/tailwind.config.ts +0 -20
- package/web/tsconfig.json +0 -42
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
import test from "node:test";
|
|
2
|
-
import assert from "node:assert/strict";
|
|
3
|
-
import { handleToolCall } from "../tools/handlers.js";
|
|
4
|
-
import { withWorkflowState, testUtils, createRequest, createGitMock } from "./test-helpers.js";
|
|
5
|
-
|
|
6
|
-
test("perform_release runs release command before pushing with tags", async () => {
|
|
7
|
-
await withWorkflowState(async (workflowState) => {
|
|
8
|
-
workflowState.state.currentPhase = "release";
|
|
9
|
-
workflowState.state.commitAndPushCompleted = true;
|
|
10
|
-
workflowState.state.readyCheckCompleted = true;
|
|
11
|
-
workflowState.state.lastPushBranch = "feature/split";
|
|
12
|
-
workflowState.state.lastCommitMessage = "fix: address issue";
|
|
13
|
-
await workflowState.save();
|
|
14
|
-
|
|
15
|
-
const commands = [];
|
|
16
|
-
const execStub = async (command) => {
|
|
17
|
-
commands.push(command);
|
|
18
|
-
if (command === "git status --porcelain") {
|
|
19
|
-
return { stdout: "" };
|
|
20
|
-
}
|
|
21
|
-
return { stdout: "" };
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
const response = await handleToolCall({
|
|
25
|
-
request: createRequest("perform_release", { command: "npm run release" }),
|
|
26
|
-
normalizeRequestArgs: (args) => ({ args, error: null }),
|
|
27
|
-
workflowState,
|
|
28
|
-
exec: execStub,
|
|
29
|
-
git: createGitMock(),
|
|
30
|
-
utils: testUtils,
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
const releaseCommand = commands.find((command) => command.startsWith("npm run release"));
|
|
34
|
-
assert.ok(releaseCommand, "release command should run");
|
|
35
|
-
assert.ok(
|
|
36
|
-
commands.some((command) => command.startsWith("git push --follow-tags")),
|
|
37
|
-
"release should push tags"
|
|
38
|
-
);
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
test("perform_release accepts shorthand patch command", async () => {
|
|
43
|
-
await withWorkflowState(async (workflowState) => {
|
|
44
|
-
workflowState.state.currentPhase = "release";
|
|
45
|
-
workflowState.state.commitAndPushCompleted = true;
|
|
46
|
-
workflowState.state.readyCheckCompleted = true;
|
|
47
|
-
workflowState.state.lastCommitMessage = "fix: adjust labels";
|
|
48
|
-
await workflowState.save();
|
|
49
|
-
|
|
50
|
-
const commands = [];
|
|
51
|
-
const execStub = async (command) => {
|
|
52
|
-
commands.push(command);
|
|
53
|
-
if (command === "git status --porcelain") {
|
|
54
|
-
return { stdout: "" };
|
|
55
|
-
}
|
|
56
|
-
return { stdout: "" };
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
await handleToolCall({
|
|
60
|
-
request: createRequest("perform_release", { command: "patch" }),
|
|
61
|
-
normalizeRequestArgs: (args) => ({ args, error: null }),
|
|
62
|
-
workflowState,
|
|
63
|
-
exec: execStub,
|
|
64
|
-
git: createGitMock(),
|
|
65
|
-
utils: testUtils,
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
const releaseCommand = commands.find((command) => command.startsWith("npm run release"));
|
|
69
|
-
assert.ok(releaseCommand, "release command should run with patch");
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
test("perform_release respects explicit releaseType option", async () => {
|
|
74
|
-
await withWorkflowState(async (workflowState) => {
|
|
75
|
-
workflowState.state.currentPhase = "release";
|
|
76
|
-
workflowState.state.commitAndPushCompleted = true;
|
|
77
|
-
workflowState.state.readyCheckCompleted = true;
|
|
78
|
-
await workflowState.save();
|
|
79
|
-
|
|
80
|
-
const commands = [];
|
|
81
|
-
const execStub = async (command) => {
|
|
82
|
-
commands.push(command);
|
|
83
|
-
if (command === "git status --porcelain") {
|
|
84
|
-
return { stdout: "" };
|
|
85
|
-
}
|
|
86
|
-
return { stdout: "" };
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
await handleToolCall({
|
|
90
|
-
request: createRequest("perform_release", {
|
|
91
|
-
command: "npm run release",
|
|
92
|
-
releaseType: "minor",
|
|
93
|
-
}),
|
|
94
|
-
normalizeRequestArgs: (args) => ({ args, error: null }),
|
|
95
|
-
workflowState,
|
|
96
|
-
exec: execStub,
|
|
97
|
-
git: createGitMock(),
|
|
98
|
-
utils: testUtils,
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
const releaseCommand = commands.find((command) => command.startsWith("npm run release"));
|
|
102
|
-
assert.ok(releaseCommand, "release command should run");
|
|
103
|
-
assert.ok(
|
|
104
|
-
releaseCommand.includes("-- --release-as minor"),
|
|
105
|
-
"release command should append provided releaseType"
|
|
106
|
-
);
|
|
107
|
-
});
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
test("perform_release blocks when new changes detected", async () => {
|
|
111
|
-
await withWorkflowState(async (workflowState) => {
|
|
112
|
-
workflowState.state.currentPhase = "release";
|
|
113
|
-
workflowState.state.commitAndPushCompleted = true;
|
|
114
|
-
workflowState.state.readyCheckCompleted = true;
|
|
115
|
-
await workflowState.save();
|
|
116
|
-
|
|
117
|
-
const commands = [];
|
|
118
|
-
const execStub = async (command) => {
|
|
119
|
-
commands.push(command);
|
|
120
|
-
if (command === "git status --porcelain") {
|
|
121
|
-
return { stdout: "?? new-file.js" };
|
|
122
|
-
}
|
|
123
|
-
return { stdout: "" };
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
const response = await handleToolCall({
|
|
127
|
-
request: createRequest("perform_release", { command: "patch" }),
|
|
128
|
-
normalizeRequestArgs: (args) => ({ args, error: null }),
|
|
129
|
-
workflowState,
|
|
130
|
-
exec: execStub,
|
|
131
|
-
git: createGitMock({
|
|
132
|
-
hasWorkingChanges: async () => true,
|
|
133
|
-
getStatusOutput: async () => "?? new-file.js",
|
|
134
|
-
containsTestFilesInStatus: (statusOutput) => statusOutput.includes("tests/"),
|
|
135
|
-
workingTreeSummary: () => ({ hasChanges: true, lines: ["?? new-file.js"] }),
|
|
136
|
-
}),
|
|
137
|
-
utils: testUtils,
|
|
138
|
-
});
|
|
139
|
-
|
|
140
|
-
assert.ok(
|
|
141
|
-
response.content[0].text.includes("run 'commit_and_push' again"),
|
|
142
|
-
"response should instruct to recommit"
|
|
143
|
-
);
|
|
144
|
-
assert.equal(workflowState.state.currentPhase, "commit");
|
|
145
|
-
assert.equal(workflowState.state.commitAndPushCompleted, false);
|
|
146
|
-
});
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
test("perform_release requires commit_and_push completion when tree is clean", async () => {
|
|
150
|
-
await withWorkflowState(async (workflowState) => {
|
|
151
|
-
workflowState.state.currentPhase = "release";
|
|
152
|
-
workflowState.state.commitAndPushCompleted = false;
|
|
153
|
-
workflowState.state.readyCheckCompleted = true;
|
|
154
|
-
workflowState.state.lastPushBranch = "";
|
|
155
|
-
workflowState.state.lastCommitMessage = "";
|
|
156
|
-
await workflowState.save();
|
|
157
|
-
|
|
158
|
-
const commands = [];
|
|
159
|
-
const execStub = async (command) => {
|
|
160
|
-
commands.push(command);
|
|
161
|
-
return { stdout: "" };
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
const response = await handleToolCall({
|
|
165
|
-
request: createRequest("perform_release", { command: "npm run release" }),
|
|
166
|
-
normalizeRequestArgs: (args) => ({ args, error: null }),
|
|
167
|
-
workflowState,
|
|
168
|
-
exec: execStub,
|
|
169
|
-
git: createGitMock({
|
|
170
|
-
getLastCommitMessage: async () => "chore: already pushed",
|
|
171
|
-
getStatusOutput: async () => "",
|
|
172
|
-
containsTestFilesInStatus: (statusOutput) => statusOutput.includes("tests/"),
|
|
173
|
-
}),
|
|
174
|
-
utils: testUtils,
|
|
175
|
-
});
|
|
176
|
-
|
|
177
|
-
assert.ok(
|
|
178
|
-
response.content[0].text.includes("commit_and_push"),
|
|
179
|
-
"response should mention commit_and_push requirement"
|
|
180
|
-
);
|
|
181
|
-
});
|
|
182
|
-
});
|
|
183
|
-
|
|
184
|
-
test("skip_release records justification and advances to completion phase", async () => {
|
|
185
|
-
await withWorkflowState(async (workflowState) => {
|
|
186
|
-
workflowState.state.currentPhase = "release";
|
|
187
|
-
workflowState.state.commitAndPushCompleted = true;
|
|
188
|
-
workflowState.state.readyCheckCompleted = true;
|
|
189
|
-
workflowState.state.lastCommitMessage = "chore: docs";
|
|
190
|
-
workflowState.state.releaseSkipped = false;
|
|
191
|
-
workflowState.state.released = false;
|
|
192
|
-
workflowState.state.releaseCommand = "";
|
|
193
|
-
await workflowState.save();
|
|
194
|
-
|
|
195
|
-
const response = await handleToolCall({
|
|
196
|
-
request: createRequest("skip_release", { reason: "Python project – no npm release" }),
|
|
197
|
-
normalizeRequestArgs: (args) => ({ args, error: null }),
|
|
198
|
-
workflowState,
|
|
199
|
-
exec: async () => ({ stdout: "" }),
|
|
200
|
-
git: createGitMock(),
|
|
201
|
-
utils: testUtils,
|
|
202
|
-
});
|
|
203
|
-
|
|
204
|
-
const text = response.content[0].text;
|
|
205
|
-
assert.ok(text.includes("Release step skipped"), "response should mention release was skipped");
|
|
206
|
-
assert.equal(workflowState.state.releaseSkipped, true);
|
|
207
|
-
assert.equal(workflowState.state.releaseSkippedReason, "Python project – no npm release");
|
|
208
|
-
assert.equal(workflowState.state.releaseCommand, "(skipped)");
|
|
209
|
-
assert.equal(workflowState.state.currentPhase, "ready_to_complete");
|
|
210
|
-
assert.equal(workflowState.state.released, false);
|
|
211
|
-
});
|
|
212
|
-
});
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import test from "node:test";
|
|
2
|
-
import assert from "node:assert/strict";
|
|
3
|
-
import { handleToolCall } from "../tools/handlers.js";
|
|
4
|
-
import { withWorkflowState, testUtils, createRequest, createGitMock } from "./test-helpers.js";
|
|
5
|
-
|
|
6
|
-
test("run_tests guidance mentions core documentation types", async () => {
|
|
7
|
-
await withWorkflowState(async (workflowState) => {
|
|
8
|
-
workflowState.state.bugFixed = true;
|
|
9
|
-
workflowState.state.testsCreated = true;
|
|
10
|
-
await workflowState.save();
|
|
11
|
-
|
|
12
|
-
const response = await handleToolCall({
|
|
13
|
-
request: createRequest("run_tests", {
|
|
14
|
-
passed: true,
|
|
15
|
-
testCommand: "npm test",
|
|
16
|
-
}),
|
|
17
|
-
normalizeRequestArgs: (args) => ({ args, error: null }),
|
|
18
|
-
workflowState,
|
|
19
|
-
exec: async () => ({ stdout: "" }),
|
|
20
|
-
git: createGitMock(),
|
|
21
|
-
utils: testUtils,
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
const text = response.content[0].text;
|
|
25
|
-
assert.ok(
|
|
26
|
-
text.includes("create or update documentation using 'create_documentation'"),
|
|
27
|
-
"run_tests guidance should mention create or update documentation",
|
|
28
|
-
);
|
|
29
|
-
assert.ok(
|
|
30
|
-
text.includes('"PRD", "README", "RELEASE_NOTES"'),
|
|
31
|
-
"run_tests guidance should list core documentation types",
|
|
32
|
-
);
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
test("create_documentation verifies PRD file exists", async () => {
|
|
37
|
-
await withWorkflowState(async (workflowState) => {
|
|
38
|
-
workflowState.state.testsPassed = true;
|
|
39
|
-
await workflowState.save();
|
|
40
|
-
|
|
41
|
-
const response = await handleToolCall({
|
|
42
|
-
request: createRequest("create_documentation", {
|
|
43
|
-
documentationType: "PRD",
|
|
44
|
-
summary: "Updated PRD for documentation workflow expectations",
|
|
45
|
-
}),
|
|
46
|
-
normalizeRequestArgs: (args) => ({ args, error: null }),
|
|
47
|
-
workflowState,
|
|
48
|
-
exec: async () => ({ stdout: "" }),
|
|
49
|
-
git: createGitMock(),
|
|
50
|
-
utils: testUtils,
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
assert.equal(workflowState.state.documentationCreated, true);
|
|
54
|
-
assert.equal(workflowState.state.documentationType, "PRD");
|
|
55
|
-
assert.equal(
|
|
56
|
-
workflowState.state.documentationSummary,
|
|
57
|
-
"Updated PRD for documentation workflow expectations",
|
|
58
|
-
);
|
|
59
|
-
assert.ok(
|
|
60
|
-
response.content[0].text.includes("Documentation created/updated!"),
|
|
61
|
-
"create_documentation response should mention created/updated",
|
|
62
|
-
);
|
|
63
|
-
assert.ok(
|
|
64
|
-
response.content[0].text.includes("PRD verified"),
|
|
65
|
-
"create_documentation response should verify PRD file",
|
|
66
|
-
);
|
|
67
|
-
});
|
|
68
|
-
});
|