@programinglive/dev-workflow-mcp-server 1.5.0 → 1.5.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.
Files changed (99) hide show
  1. package/.agent/workflows/dev-workflow-bugfix.md +250 -250
  2. package/.agent/workflows/dev-workflow-feature.md +201 -201
  3. package/.agent/workflows/dev-workflow-full-cycle.md +400 -400
  4. package/.agent/workflows/dev-workflow-refactor.md +238 -238
  5. package/.github/ISSUE_TEMPLATE/bug_report.md +34 -34
  6. package/.github/ISSUE_TEMPLATE/feature_request.md +25 -25
  7. package/.github/pull_request_template.md +22 -22
  8. package/.github/workflows/npm-publish.yml +50 -47
  9. package/.husky/commit-msg +0 -0
  10. package/CHANGELOG.md +750 -491
  11. package/CODE_OF_CONDUCT.md +79 -79
  12. package/CONTRIBUTING.md +60 -60
  13. package/LICENSE +21 -21
  14. package/README.md +632 -609
  15. package/SECURITY.md +20 -20
  16. package/db/index.js +204 -204
  17. package/docs/NETLIFY_DEPLOYMENT.md +125 -0
  18. package/docs/PLESK_DEPLOYMENT.md +170 -0
  19. package/docs/WORKFLOW-BEST-PRACTICES.md +58 -0
  20. package/docs/antigravity/EXAMPLES.md +535 -535
  21. package/docs/antigravity/GETTING-STARTED.md +292 -292
  22. package/docs/antigravity/TROUBLESHOOTING.md +742 -742
  23. package/docs/antigravity/WALKTHROUGH.md +25 -25
  24. package/docs/antigravity/WORKFLOW-TEMPLATES.md +670 -670
  25. package/docs/product/PRD.md +67 -64
  26. package/docs/release-notes/RELEASE_NOTES.md +226 -132
  27. package/docs/web-dashboard.md +175 -163
  28. package/exec.js +49 -49
  29. package/index.js +279 -279
  30. package/install.js +73 -73
  31. package/package.json +11 -9
  32. package/release-wrapper.js +192 -157
  33. package/scripts/build-docs.js +63 -63
  34. package/scripts/hello-world.js +1 -1
  35. package/scripts/release.cjs +252 -252
  36. package/scripts/update-release-notes.cjs +178 -182
  37. package/server.json +23 -0
  38. package/tailwind.config.js +8 -10
  39. package/tests/build.test.js +83 -48
  40. package/tests/exec.test.js +35 -35
  41. package/tests/handlers.test.js +1058 -980
  42. package/tests/hello-world.test.js +13 -13
  43. package/tests/mcpRegistry.test.js +65 -0
  44. package/tests/release-wrapper.test.js +107 -105
  45. package/tests/workflowState.test.js +505 -502
  46. package/tools/definitions.js +332 -332
  47. package/tools/handlers.js +1019 -1019
  48. package/vite.config.js +43 -43
  49. package/vite.web.config.js +23 -0
  50. package/web/README.md +36 -0
  51. package/web/app/docs/page.tsx +202 -0
  52. package/web/app/favicon.ico +0 -0
  53. package/web/app/globals.css +91 -0
  54. package/web/app/layout.tsx +36 -0
  55. package/web/app/page.tsx +15 -0
  56. package/web/components/ApiReference.tsx +20 -0
  57. package/web/components/Features.tsx +61 -0
  58. package/web/components/Footer.tsx +9 -0
  59. package/web/components/Hero.tsx +96 -0
  60. package/web/components/History.tsx +143 -0
  61. package/web/components/Navbar.tsx +64 -0
  62. package/web/components/Terminal.tsx +114 -0
  63. package/web/eslint.config.mjs +18 -0
  64. package/web/lib/db.js +131 -0
  65. package/web/lib/docs.js +73 -0
  66. package/web/netlify.toml +3 -0
  67. package/web/next.config.ts +12 -0
  68. package/web/package-lock.json +6560 -0
  69. package/web/package.json +28 -0
  70. package/web/postcss.config.mjs +9 -0
  71. package/web/public/assets/android-chrome-192x192.png +0 -0
  72. package/web/public/assets/android-chrome-512x512.png +0 -0
  73. package/web/public/assets/apple-touch-icon.png +0 -0
  74. package/web/public/assets/favicon-16x16.png +0 -0
  75. package/web/public/assets/favicon-32x32.png +0 -0
  76. package/web/public/assets/favicon.ico +0 -0
  77. package/web/public/assets/favicon.png +0 -0
  78. package/web/public/assets/logo.png +0 -0
  79. package/web/public/assets/og-preview.png +0 -0
  80. package/web/public/assets/site.webmanifest +1 -0
  81. package/web/public/file.svg +1 -0
  82. package/web/public/globe.svg +1 -0
  83. package/web/public/next.svg +1 -0
  84. package/web/public/vercel.svg +1 -0
  85. package/web/public/window.svg +1 -0
  86. package/web/server.js +31 -159
  87. package/web/tailwind.config.ts +19 -0
  88. package/web/tsconfig.json +42 -0
  89. package/workflow-state.js +612 -626
  90. package/dist/docs/EXAMPLES.html +0 -411
  91. package/dist/docs/GETTING-STARTED.html +0 -233
  92. package/dist/docs/README.html +0 -535
  93. package/dist/docs/RELEASE_NOTES.html +0 -167
  94. package/dist/docs/TROUBLESHOOTING.html +0 -542
  95. package/dist/docs/WORKFLOW-TEMPLATES.html +0 -591
  96. package/dist/docs/web-dashboard.html +0 -158
  97. package/web/public/index.html +0 -1046
  98. package/web/public/input.css +0 -3
  99. package/web/public/output.css +0 -1
@@ -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
+ });
@@ -0,0 +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,105 +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
-
22
- const childEnv = {
23
- ...process.env,
24
- INIT_CWD: dir,
25
- DEV_WORKFLOW_SKIP_RELEASE: "1",
26
- DEV_WORKFLOW_FORCE_RELEASE: undefined,
27
- ...env,
28
- };
29
-
30
- const nodeBinary = process.platform === "win32" ? "node" : process.execPath || "node";
31
- const spawnShell = process.platform === "win32";
32
-
33
- return await new Promise((resolve) => {
34
- const child = spawn(
35
- nodeBinary,
36
- [RELEASE_WRAPPER, ...args],
37
- {
38
- cwd: PROJECT_ROOT,
39
- env: childEnv,
40
- stdio: ["ignore", "pipe", "pipe"],
41
- shell: spawnShell,
42
- }
43
- );
44
-
45
- let stdout = "";
46
- let stderr = "";
47
-
48
- child.stdout.on("data", (chunk) => {
49
- stdout += chunk;
50
- });
51
- child.stderr.on("data", (chunk) => {
52
- stderr += chunk;
53
- });
54
-
55
- child.on("close", async (code) => {
56
- let updatedState = null;
57
- try {
58
- const rawState = await readFile(statePath, "utf8");
59
- updatedState = JSON.parse(rawState);
60
- } catch {
61
- // ignore
62
- }
63
-
64
- await rm(dir, { recursive: true, force: true });
65
- resolve({ code, stdout, stderr, updatedState });
66
- });
67
- });
68
- }
69
-
70
- test("release-wrapper blocks when workflow phase is not release", async () => {
71
- const result = await runWrapper({
72
- state: {
73
- currentPhase: "commit",
74
- readyCheckCompleted: true,
75
- commitAndPushCompleted: true,
76
- released: false,
77
- },
78
- });
79
-
80
- assert.equal(result.code, 1);
81
- assert.ok(result.stderr.includes("Release guard blocked the release"));
82
- assert.ok(result.stderr.includes("Current workflow phase"));
83
- assert.equal(result.updatedState.released, false);
84
- });
85
-
86
- test("release-wrapper marks release after validation passes", async () => {
87
- const result = await runWrapper({
88
- state: {
89
- currentPhase: "release",
90
- readyCheckCompleted: true,
91
- commitAndPushCompleted: true,
92
- released: false,
93
- releaseCommand: "",
94
- },
95
- });
96
-
97
- assert.equal(result.code, 0);
98
- assert.ok(result.stdout.includes("Release recorded"));
99
- assert.equal(result.updatedState.released, true);
100
- assert.equal(result.updatedState.currentPhase, "ready_to_complete");
101
- assert.equal(
102
- result.updatedState.releaseCommand,
103
- "node node_modules/@programinglive/commiter/scripts/release.js patch"
104
- );
105
- });
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
+ });