@programinglive/dev-workflow-mcp-server 1.5.2 → 1.5.3
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/.agent/workflows/dev-workflow-bugfix.md +250 -250
- package/.agent/workflows/dev-workflow-feature.md +201 -201
- package/.agent/workflows/dev-workflow-full-cycle.md +400 -400
- package/.agent/workflows/dev-workflow-refactor.md +238 -238
- package/.github/ISSUE_TEMPLATE/bug_report.md +34 -34
- package/.github/ISSUE_TEMPLATE/feature_request.md +25 -25
- package/.github/pull_request_template.md +22 -22
- package/.github/workflows/npm-publish.yml +50 -50
- package/.husky/commit-msg +0 -0
- package/CHANGELOG.md +748 -741
- package/CODE_OF_CONDUCT.md +79 -79
- package/CONTRIBUTING.md +60 -60
- package/LICENSE +21 -21
- package/README.md +632 -632
- package/SECURITY.md +20 -20
- package/db/index.js +204 -204
- package/docs/NETLIFY_DEPLOYMENT.md +125 -125
- package/docs/PLESK_DEPLOYMENT.md +170 -170
- package/docs/WORKFLOW-BEST-PRACTICES.md +58 -58
- package/docs/antigravity/EXAMPLES.md +535 -535
- package/docs/antigravity/GETTING-STARTED.md +292 -292
- package/docs/antigravity/TROUBLESHOOTING.md +742 -742
- package/docs/antigravity/WALKTHROUGH.md +25 -25
- package/docs/antigravity/WORKFLOW-TEMPLATES.md +670 -670
- package/docs/product/PRD.md +67 -67
- package/docs/release-notes/RELEASE_NOTES.md +226 -226
- package/docs/web-dashboard.md +175 -175
- package/exec.js +49 -49
- package/index.js +279 -279
- package/install.js +73 -73
- package/package.json +8 -8
- package/release-wrapper.js +192 -192
- package/scripts/build-docs.js +63 -63
- package/scripts/hello-world.js +1 -1
- package/scripts/release.cjs +252 -252
- package/scripts/release.js +252 -0
- package/scripts/update-release-notes.cjs +178 -178
- package/scripts/update-release-notes.js +182 -0
- package/server.json +23 -23
- package/tailwind.config.js +8 -8
- package/tests/build.test.js +83 -83
- package/tests/exec.test.js +35 -35
- package/tests/handlers.test.js +1058 -1058
- package/tests/hello-world.test.js +13 -13
- package/tests/mcpRegistry.test.js +65 -65
- package/tests/patch-release.test.js +7 -0
- package/tests/release-wrapper.test.js +107 -107
- package/tests/workflowState.test.js +505 -505
- package/tools/definitions.js +332 -332
- package/tools/handlers.js +1019 -1019
- package/vite.config.js +43 -43
- package/vite.web.config.js +23 -23
- package/web/README.md +36 -36
- package/web/app/docs/page.tsx +202 -202
- package/web/app/globals.css +90 -90
- package/web/app/layout.tsx +36 -36
- package/web/app/page.tsx +15 -15
- package/web/components/ApiReference.tsx +20 -20
- package/web/components/Features.tsx +61 -61
- package/web/components/Footer.tsx +9 -9
- package/web/components/Hero.tsx +96 -96
- package/web/components/History.tsx +143 -143
- package/web/components/Navbar.tsx +64 -64
- package/web/components/Terminal.tsx +114 -114
- package/web/eslint.config.mjs +18 -18
- package/web/lib/db.js +131 -131
- package/web/lib/docs.js +73 -73
- package/web/netlify.toml +3 -3
- package/web/next.config.ts +12 -12
- package/web/package-lock.json +6560 -6560
- package/web/package.json +28 -28
- package/web/postcss.config.mjs +9 -9
- package/web/server.js +31 -31
- package/web/tailwind.config.ts +19 -19
- package/web/tsconfig.json +42 -42
- package/workflow-state.js +612 -612
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { test } from 'node:test';
|
|
2
|
-
import assert from 'node:assert';
|
|
3
|
-
import { execSync } from 'node:child_process';
|
|
4
|
-
import path from 'node:path';
|
|
5
|
-
import { fileURLToPath } from 'node:url';
|
|
6
|
-
|
|
7
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
8
|
-
|
|
9
|
-
test('hello world script runs successfully', (t) => {
|
|
10
|
-
const scriptPath = path.join(__dirname, '../scripts/hello-world.js');
|
|
11
|
-
const output = execSync(`node ${scriptPath}`).toString();
|
|
12
|
-
assert.match(output, /Hello from Antigravity!/);
|
|
13
|
-
});
|
|
1
|
+
import { test } from 'node:test';
|
|
2
|
+
import assert from 'node:assert';
|
|
3
|
+
import { execSync } from 'node:child_process';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
6
|
+
|
|
7
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
8
|
+
|
|
9
|
+
test('hello world script runs successfully', (t) => {
|
|
10
|
+
const scriptPath = path.join(__dirname, '../scripts/hello-world.js');
|
|
11
|
+
const output = execSync(`node ${scriptPath}`).toString();
|
|
12
|
+
assert.match(output, /Hello from Antigravity!/);
|
|
13
|
+
});
|
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
import { test } from "node:test";
|
|
2
|
-
import assert from "node:assert";
|
|
3
|
-
import { readFile } from "node:fs/promises";
|
|
4
|
-
import path from "node:path";
|
|
5
|
-
|
|
6
|
-
const projectRoot = process.cwd();
|
|
7
|
-
|
|
8
|
-
async function readJson(relativePath) {
|
|
9
|
-
const fullPath = path.join(projectRoot, relativePath);
|
|
10
|
-
const content = await readFile(fullPath, "utf-8");
|
|
11
|
-
return JSON.parse(content);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
test("package.json includes mcpName for MCP registry", async () => {
|
|
15
|
-
const pkg = await readJson("package.json");
|
|
16
|
-
|
|
17
|
-
assert.strictEqual(
|
|
18
|
-
pkg.mcpName,
|
|
19
|
-
"io.github.programinglive/dev-workflow-mcp-server",
|
|
20
|
-
"package.json should declare mcpName matching the MCP server namespace",
|
|
21
|
-
);
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
test("server.json is configured for npm package deployment", async () => {
|
|
25
|
-
const server = await readJson("server.json");
|
|
26
|
-
|
|
27
|
-
assert.strictEqual(
|
|
28
|
-
server.name,
|
|
29
|
-
"io.github.programinglive/dev-workflow-mcp-server",
|
|
30
|
-
"server.json name should match the MCP server namespace",
|
|
31
|
-
);
|
|
32
|
-
assert.ok(Array.isArray(server.packages) && server.packages.length > 0,
|
|
33
|
-
"server.json should declare at least one package entry",
|
|
34
|
-
);
|
|
35
|
-
|
|
36
|
-
const npmPkg = server.packages[0];
|
|
37
|
-
|
|
38
|
-
assert.strictEqual(
|
|
39
|
-
npmPkg.registryType,
|
|
40
|
-
"npm",
|
|
41
|
-
"First server.json package entry should use npm registryType",
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
assert.strictEqual(
|
|
45
|
-
npmPkg.registryBaseUrl,
|
|
46
|
-
"https://registry.npmjs.org",
|
|
47
|
-
"server.json npm registryBaseUrl should point at the public npm registry",
|
|
48
|
-
);
|
|
49
|
-
|
|
50
|
-
assert.strictEqual(
|
|
51
|
-
npmPkg.identifier,
|
|
52
|
-
"@programinglive/dev-workflow-mcp-server",
|
|
53
|
-
"server.json npm identifier should match the published npm package name",
|
|
54
|
-
);
|
|
55
|
-
|
|
56
|
-
assert.ok(
|
|
57
|
-
typeof npmPkg.version === "string" && npmPkg.version.length > 0,
|
|
58
|
-
"server.json npm package version should be a non-empty string",
|
|
59
|
-
);
|
|
60
|
-
|
|
61
|
-
assert.ok(
|
|
62
|
-
npmPkg.transport && npmPkg.transport.type === "stdio",
|
|
63
|
-
"server.json npm package transport should be stdio",
|
|
64
|
-
);
|
|
65
|
-
});
|
|
1
|
+
import { test } from "node:test";
|
|
2
|
+
import assert from "node:assert";
|
|
3
|
+
import { readFile } from "node:fs/promises";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
|
|
6
|
+
const projectRoot = process.cwd();
|
|
7
|
+
|
|
8
|
+
async function readJson(relativePath) {
|
|
9
|
+
const fullPath = path.join(projectRoot, relativePath);
|
|
10
|
+
const content = await readFile(fullPath, "utf-8");
|
|
11
|
+
return JSON.parse(content);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
test("package.json includes mcpName for MCP registry", async () => {
|
|
15
|
+
const pkg = await readJson("package.json");
|
|
16
|
+
|
|
17
|
+
assert.strictEqual(
|
|
18
|
+
pkg.mcpName,
|
|
19
|
+
"io.github.programinglive/dev-workflow-mcp-server",
|
|
20
|
+
"package.json should declare mcpName matching the MCP server namespace",
|
|
21
|
+
);
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
test("server.json is configured for npm package deployment", async () => {
|
|
25
|
+
const server = await readJson("server.json");
|
|
26
|
+
|
|
27
|
+
assert.strictEqual(
|
|
28
|
+
server.name,
|
|
29
|
+
"io.github.programinglive/dev-workflow-mcp-server",
|
|
30
|
+
"server.json name should match the MCP server namespace",
|
|
31
|
+
);
|
|
32
|
+
assert.ok(Array.isArray(server.packages) && server.packages.length > 0,
|
|
33
|
+
"server.json should declare at least one package entry",
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
const npmPkg = server.packages[0];
|
|
37
|
+
|
|
38
|
+
assert.strictEqual(
|
|
39
|
+
npmPkg.registryType,
|
|
40
|
+
"npm",
|
|
41
|
+
"First server.json package entry should use npm registryType",
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
assert.strictEqual(
|
|
45
|
+
npmPkg.registryBaseUrl,
|
|
46
|
+
"https://registry.npmjs.org",
|
|
47
|
+
"server.json npm registryBaseUrl should point at the public npm registry",
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
assert.strictEqual(
|
|
51
|
+
npmPkg.identifier,
|
|
52
|
+
"@programinglive/dev-workflow-mcp-server",
|
|
53
|
+
"server.json npm identifier should match the published npm package name",
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
assert.ok(
|
|
57
|
+
typeof npmPkg.version === "string" && npmPkg.version.length > 0,
|
|
58
|
+
"server.json npm package version should be a non-empty string",
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
assert.ok(
|
|
62
|
+
npmPkg.transport && npmPkg.transport.type === "stdio",
|
|
63
|
+
"server.json npm package transport should be stdio",
|
|
64
|
+
);
|
|
65
|
+
});
|
|
@@ -1,107 +1,107 @@
|
|
|
1
|
-
import test from "node:test";
|
|
2
|
-
import assert from "node:assert/strict";
|
|
3
|
-
import { mkdtemp, rm, writeFile, readFile, mkdir } from "node:fs/promises";
|
|
4
|
-
import { tmpdir } from "node:os";
|
|
5
|
-
import path from "node:path";
|
|
6
|
-
import { fileURLToPath } from "node:url";
|
|
7
|
-
import { spawn } from "node:child_process";
|
|
8
|
-
|
|
9
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
10
|
-
const __dirname = path.dirname(__filename);
|
|
11
|
-
const releaseWrapperUrl = new URL("../release-wrapper.js", import.meta.url);
|
|
12
|
-
const RELEASE_WRAPPER = fileURLToPath(releaseWrapperUrl);
|
|
13
|
-
const PROJECT_ROOT = path.dirname(RELEASE_WRAPPER);
|
|
14
|
-
|
|
15
|
-
async function runWrapper({ state, args = ["patch"], env = {} }) {
|
|
16
|
-
const dir = await mkdtemp(path.join(tmpdir(), "release-wrapper-test-"));
|
|
17
|
-
const stateDir = path.join(dir, ".state");
|
|
18
|
-
const statePath = path.join(stateDir, "workflow-state.json");
|
|
19
|
-
await mkdir(stateDir, { recursive: true });
|
|
20
|
-
await writeFile(statePath, JSON.stringify(state, null, 2));
|
|
21
|
-
// Create package.json so resolveStateFile recognizes this as a project root
|
|
22
|
-
await writeFile(path.join(dir, "package.json"), JSON.stringify({ name: "test-project" }));
|
|
23
|
-
|
|
24
|
-
const childEnv = {
|
|
25
|
-
...process.env,
|
|
26
|
-
INIT_CWD: dir,
|
|
27
|
-
DEV_WORKFLOW_SKIP_RELEASE: "1",
|
|
28
|
-
DEV_WORKFLOW_FORCE_RELEASE: undefined,
|
|
29
|
-
...env,
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const nodeBinary = process.platform === "win32" ? "node" : process.execPath || "node";
|
|
33
|
-
const spawnShell = process.platform === "win32";
|
|
34
|
-
|
|
35
|
-
return await new Promise((resolve) => {
|
|
36
|
-
const child = spawn(
|
|
37
|
-
nodeBinary,
|
|
38
|
-
[RELEASE_WRAPPER, ...args],
|
|
39
|
-
{
|
|
40
|
-
cwd: PROJECT_ROOT,
|
|
41
|
-
env: childEnv,
|
|
42
|
-
stdio: ["ignore", "pipe", "pipe"],
|
|
43
|
-
shell: spawnShell,
|
|
44
|
-
}
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
let stdout = "";
|
|
48
|
-
let stderr = "";
|
|
49
|
-
|
|
50
|
-
child.stdout.on("data", (chunk) => {
|
|
51
|
-
stdout += chunk;
|
|
52
|
-
});
|
|
53
|
-
child.stderr.on("data", (chunk) => {
|
|
54
|
-
stderr += chunk;
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
child.on("close", async (code) => {
|
|
58
|
-
let updatedState = null;
|
|
59
|
-
try {
|
|
60
|
-
const rawState = await readFile(statePath, "utf8");
|
|
61
|
-
updatedState = JSON.parse(rawState);
|
|
62
|
-
} catch {
|
|
63
|
-
// ignore
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
await rm(dir, { recursive: true, force: true });
|
|
67
|
-
resolve({ code, stdout, stderr, updatedState });
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
test("release-wrapper blocks when workflow phase is not release", async () => {
|
|
73
|
-
const result = await runWrapper({
|
|
74
|
-
state: {
|
|
75
|
-
currentPhase: "commit",
|
|
76
|
-
readyCheckCompleted: true,
|
|
77
|
-
commitAndPushCompleted: true,
|
|
78
|
-
released: false,
|
|
79
|
-
},
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
assert.equal(result.code, 1);
|
|
83
|
-
assert.ok(result.stderr.includes("Release guard blocked the release"));
|
|
84
|
-
assert.ok(result.stderr.includes("Current workflow phase"));
|
|
85
|
-
assert.equal(result.updatedState.released, false);
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
test("release-wrapper marks release after validation passes", async () => {
|
|
89
|
-
const result = await runWrapper({
|
|
90
|
-
state: {
|
|
91
|
-
currentPhase: "release",
|
|
92
|
-
readyCheckCompleted: true,
|
|
93
|
-
commitAndPushCompleted: true,
|
|
94
|
-
released: false,
|
|
95
|
-
releaseCommand: "",
|
|
96
|
-
},
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
assert.equal(result.code, 0);
|
|
100
|
-
assert.ok(result.stdout.includes("Release recorded"));
|
|
101
|
-
assert.equal(result.updatedState.released, true);
|
|
102
|
-
assert.equal(result.updatedState.currentPhase, "ready_to_complete");
|
|
103
|
-
assert.equal(
|
|
104
|
-
result.updatedState.releaseCommand,
|
|
105
|
-
"node node_modules/@programinglive/commiter/scripts/release.js patch"
|
|
106
|
-
);
|
|
107
|
-
});
|
|
1
|
+
import test from "node:test";
|
|
2
|
+
import assert from "node:assert/strict";
|
|
3
|
+
import { mkdtemp, rm, writeFile, readFile, mkdir } from "node:fs/promises";
|
|
4
|
+
import { tmpdir } from "node:os";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
import { fileURLToPath } from "node:url";
|
|
7
|
+
import { spawn } from "node:child_process";
|
|
8
|
+
|
|
9
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
10
|
+
const __dirname = path.dirname(__filename);
|
|
11
|
+
const releaseWrapperUrl = new URL("../release-wrapper.js", import.meta.url);
|
|
12
|
+
const RELEASE_WRAPPER = fileURLToPath(releaseWrapperUrl);
|
|
13
|
+
const PROJECT_ROOT = path.dirname(RELEASE_WRAPPER);
|
|
14
|
+
|
|
15
|
+
async function runWrapper({ state, args = ["patch"], env = {} }) {
|
|
16
|
+
const dir = await mkdtemp(path.join(tmpdir(), "release-wrapper-test-"));
|
|
17
|
+
const stateDir = path.join(dir, ".state");
|
|
18
|
+
const statePath = path.join(stateDir, "workflow-state.json");
|
|
19
|
+
await mkdir(stateDir, { recursive: true });
|
|
20
|
+
await writeFile(statePath, JSON.stringify(state, null, 2));
|
|
21
|
+
// Create package.json so resolveStateFile recognizes this as a project root
|
|
22
|
+
await writeFile(path.join(dir, "package.json"), JSON.stringify({ name: "test-project" }));
|
|
23
|
+
|
|
24
|
+
const childEnv = {
|
|
25
|
+
...process.env,
|
|
26
|
+
INIT_CWD: dir,
|
|
27
|
+
DEV_WORKFLOW_SKIP_RELEASE: "1",
|
|
28
|
+
DEV_WORKFLOW_FORCE_RELEASE: undefined,
|
|
29
|
+
...env,
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const nodeBinary = process.platform === "win32" ? "node" : process.execPath || "node";
|
|
33
|
+
const spawnShell = process.platform === "win32";
|
|
34
|
+
|
|
35
|
+
return await new Promise((resolve) => {
|
|
36
|
+
const child = spawn(
|
|
37
|
+
nodeBinary,
|
|
38
|
+
[RELEASE_WRAPPER, ...args],
|
|
39
|
+
{
|
|
40
|
+
cwd: PROJECT_ROOT,
|
|
41
|
+
env: childEnv,
|
|
42
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
43
|
+
shell: spawnShell,
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
let stdout = "";
|
|
48
|
+
let stderr = "";
|
|
49
|
+
|
|
50
|
+
child.stdout.on("data", (chunk) => {
|
|
51
|
+
stdout += chunk;
|
|
52
|
+
});
|
|
53
|
+
child.stderr.on("data", (chunk) => {
|
|
54
|
+
stderr += chunk;
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
child.on("close", async (code) => {
|
|
58
|
+
let updatedState = null;
|
|
59
|
+
try {
|
|
60
|
+
const rawState = await readFile(statePath, "utf8");
|
|
61
|
+
updatedState = JSON.parse(rawState);
|
|
62
|
+
} catch {
|
|
63
|
+
// ignore
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
await rm(dir, { recursive: true, force: true });
|
|
67
|
+
resolve({ code, stdout, stderr, updatedState });
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
test("release-wrapper blocks when workflow phase is not release", async () => {
|
|
73
|
+
const result = await runWrapper({
|
|
74
|
+
state: {
|
|
75
|
+
currentPhase: "commit",
|
|
76
|
+
readyCheckCompleted: true,
|
|
77
|
+
commitAndPushCompleted: true,
|
|
78
|
+
released: false,
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
assert.equal(result.code, 1);
|
|
83
|
+
assert.ok(result.stderr.includes("Release guard blocked the release"));
|
|
84
|
+
assert.ok(result.stderr.includes("Current workflow phase"));
|
|
85
|
+
assert.equal(result.updatedState.released, false);
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
test("release-wrapper marks release after validation passes", async () => {
|
|
89
|
+
const result = await runWrapper({
|
|
90
|
+
state: {
|
|
91
|
+
currentPhase: "release",
|
|
92
|
+
readyCheckCompleted: true,
|
|
93
|
+
commitAndPushCompleted: true,
|
|
94
|
+
released: false,
|
|
95
|
+
releaseCommand: "",
|
|
96
|
+
},
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
assert.equal(result.code, 0);
|
|
100
|
+
assert.ok(result.stdout.includes("Release recorded"));
|
|
101
|
+
assert.equal(result.updatedState.released, true);
|
|
102
|
+
assert.equal(result.updatedState.currentPhase, "ready_to_complete");
|
|
103
|
+
assert.equal(
|
|
104
|
+
result.updatedState.releaseCommand,
|
|
105
|
+
"node node_modules/@programinglive/commiter/scripts/release.js patch"
|
|
106
|
+
);
|
|
107
|
+
});
|