@programinglive/dev-workflow-mcp-server 1.7.0 → 1.7.9
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/.gitattributes +10 -0
- package/.github/workflows/github-release.yml +17 -0
- package/CHANGELOG.md +146 -1
- package/README.md +74 -2
- package/db/adapters/base.js +46 -0
- package/db/adapters/mysql.js +292 -0
- package/db/adapters/postgres.js +291 -0
- package/db/adapters/sqlite.js +343 -0
- package/db/index.js +52 -183
- package/docs/product/PRD.md +15 -5
- package/docs/release-notes/RELEASE_NOTES.md +129 -0
- package/package.json +6 -3
- package/scripts/release.cjs +11 -4
- package/tests/handlers.test.js +6 -1
- package/tools/handlers.js +22 -11
- package/vite.config.js +8 -0
- package/web/app/docs/page.tsx +81 -81
- package/workflow-state.js +32 -5
- package/.github/workflows/npm-publish.yml +0 -50
- package/web/tests/build.test.js +0 -69
package/web/app/docs/page.tsx
CHANGED
|
@@ -3,132 +3,132 @@ import { ArrowLeft, CheckCircle, GitBranch, FileText, TestTube, Rocket } from "l
|
|
|
3
3
|
|
|
4
4
|
export default function DocsPage() {
|
|
5
5
|
return (
|
|
6
|
-
<div className="min-h-screen bg-[#0a0a0f] text-white pt-20 px-4 pb-12">
|
|
6
|
+
<div className="min-h-screen bg-white dark:bg-[#0a0a0f] text-gray-900 dark:text-white pt-20 px-4 pb-12 transition-colors duration-300">
|
|
7
7
|
<div className="max-w-4xl mx-auto">
|
|
8
8
|
<div className="mb-8">
|
|
9
|
-
<Link href="/" className="inline-flex items-center gap-2 text-indigo-400 hover:text-indigo-300 transition">
|
|
9
|
+
<Link href="/" className="inline-flex items-center gap-2 text-indigo-600 dark:text-indigo-400 hover:text-indigo-700 dark:hover:text-indigo-300 transition">
|
|
10
10
|
<ArrowLeft className="w-4 h-4" />
|
|
11
11
|
Back to Dashboard
|
|
12
12
|
</Link>
|
|
13
13
|
</div>
|
|
14
14
|
|
|
15
|
-
<div className="prose prose-invert max-w-none">
|
|
16
|
-
<h1 className="text-5xl font-bold mb-4 bg-gradient-to-r from-indigo-400 via-purple-400 to-pink-400 bg-clip-text text-transparent">
|
|
15
|
+
<div className="prose dark:prose-invert max-w-none">
|
|
16
|
+
<h1 className="text-5xl font-bold mb-4 bg-gradient-to-r from-indigo-600 dark:from-indigo-400 via-purple-600 dark:via-purple-400 to-pink-600 dark:to-pink-400 bg-clip-text text-transparent">
|
|
17
17
|
Dev Workflow MCP Server
|
|
18
18
|
</h1>
|
|
19
|
-
<p className="text-xl text-gray-400 mb-8">
|
|
19
|
+
<p className="text-xl text-gray-600 dark:text-gray-400 mb-8">
|
|
20
20
|
An MCP server that acts as your coding conscience. Enforce test-driven development, ensure documentation,
|
|
21
21
|
and never skip a step in your release process.
|
|
22
22
|
</p>
|
|
23
23
|
|
|
24
|
-
<div className="bg-emerald-500/10 border border-emerald-500/20 rounded-lg p-4 mb-8">
|
|
25
|
-
<p className="text-emerald-400 font-semibold">Version: 1.
|
|
24
|
+
<div className="bg-emerald-50 dark:bg-emerald-500/10 border border-emerald-200 dark:border-emerald-500/20 rounded-lg p-4 mb-8">
|
|
25
|
+
<p className="text-emerald-700 dark:text-emerald-400 font-semibold">Version: 1.6.2</p>
|
|
26
26
|
</div>
|
|
27
27
|
|
|
28
|
-
<h2 className="text-3xl font-bold mt-12 mb-6">Features</h2>
|
|
28
|
+
<h2 className="text-3xl font-bold mt-12 mb-6 text-gray-900 dark:text-white">Features</h2>
|
|
29
29
|
<div className="grid md:grid-cols-2 gap-4 mb-8">
|
|
30
|
-
<div className="p-4 rounded-lg bg-white/5 border border-white/10">
|
|
30
|
+
<div className="p-4 rounded-lg bg-gray-50 dark:bg-white/5 border border-gray-200 dark:border-white/10">
|
|
31
31
|
<div className="flex items-center gap-3 mb-2">
|
|
32
|
-
<CheckCircle className="w-5 h-5 text-indigo-400" />
|
|
33
|
-
<h3 className="text-lg font-semibold">Enforced Discipline</h3>
|
|
32
|
+
<CheckCircle className="w-5 h-5 text-indigo-600 dark:text-indigo-400" />
|
|
33
|
+
<h3 className="text-lg font-semibold text-gray-900 dark:text-white">Enforced Discipline</h3>
|
|
34
34
|
</div>
|
|
35
|
-
<p className="text-gray-400 text-sm">Won't let you skip important steps. Follows a strict, proven development workflow.</p>
|
|
35
|
+
<p className="text-gray-600 dark:text-gray-400 text-sm">Won't let you skip important steps. Follows a strict, proven development workflow.</p>
|
|
36
36
|
</div>
|
|
37
|
-
<div className="p-4 rounded-lg bg-white/5 border border-white/10">
|
|
37
|
+
<div className="p-4 rounded-lg bg-gray-50 dark:bg-white/5 border border-gray-200 dark:border-white/10">
|
|
38
38
|
<div className="flex items-center gap-3 mb-2">
|
|
39
|
-
<TestTube className="w-5 h-5 text-purple-400" />
|
|
40
|
-
<h3 className="text-lg font-semibold">Test-Driven</h3>
|
|
39
|
+
<TestTube className="w-5 h-5 text-purple-600 dark:text-purple-400" />
|
|
40
|
+
<h3 className="text-lg font-semibold text-gray-900 dark:text-white">Test-Driven</h3>
|
|
41
41
|
</div>
|
|
42
|
-
<p className="text-gray-400 text-sm">Blocks commits if tests fail. Encourages writing tests before marking tasks complete.</p>
|
|
42
|
+
<p className="text-gray-600 dark:text-gray-400 text-sm">Blocks commits if tests fail. Encourages writing tests before marking tasks complete.</p>
|
|
43
43
|
</div>
|
|
44
|
-
<div className="p-4 rounded-lg bg-white/5 border border-white/10">
|
|
44
|
+
<div className="p-4 rounded-lg bg-gray-50 dark:bg-white/5 border border-gray-200 dark:border-white/10">
|
|
45
45
|
<div className="flex items-center gap-3 mb-2">
|
|
46
|
-
<FileText className="w-5 h-5 text-emerald-400" />
|
|
47
|
-
<h3 className="text-lg font-semibold">Documentation</h3>
|
|
46
|
+
<FileText className="w-5 h-5 text-emerald-600 dark:text-emerald-400" />
|
|
47
|
+
<h3 className="text-lg font-semibold text-gray-900 dark:text-white">Documentation</h3>
|
|
48
48
|
</div>
|
|
49
|
-
<p className="text-gray-400 text-sm">Reminds you to update documentation (README, docs, changelog) for every change.</p>
|
|
49
|
+
<p className="text-gray-600 dark:text-gray-400 text-sm">Reminds you to update documentation (README, docs, changelog) for every change.</p>
|
|
50
50
|
</div>
|
|
51
|
-
<div className="p-4 rounded-lg bg-white/5 border border-white/10">
|
|
51
|
+
<div className="p-4 rounded-lg bg-gray-50 dark:bg-white/5 border border-gray-200 dark:border-white/10">
|
|
52
52
|
<div className="flex items-center gap-3 mb-2">
|
|
53
|
-
<GitBranch className="w-5 h-5 text-orange-400" />
|
|
54
|
-
<h3 className="text-lg font-semibold">State Tracking</h3>
|
|
53
|
+
<GitBranch className="w-5 h-5 text-orange-600 dark:text-orange-400" />
|
|
54
|
+
<h3 className="text-lg font-semibold text-gray-900 dark:text-white">State Tracking</h3>
|
|
55
55
|
</div>
|
|
56
|
-
<p className="text-gray-400 text-sm">Remembers exactly where you are in the workflow, even across sessions.</p>
|
|
56
|
+
<p className="text-gray-600 dark:text-gray-400 text-sm">Remembers exactly where you are in the workflow, even across sessions.</p>
|
|
57
57
|
</div>
|
|
58
58
|
</div>
|
|
59
59
|
|
|
60
|
-
<h2 className="text-3xl font-bold mt-12 mb-6">Installation</h2>
|
|
61
|
-
<div className="bg-[#1a1a24] rounded-lg p-6 border border-white/10 mb-8">
|
|
60
|
+
<h2 className="text-3xl font-bold mt-12 mb-6 text-gray-900 dark:text-white">Installation</h2>
|
|
61
|
+
<div className="bg-gray-100 dark:bg-[#1a1a24] rounded-lg p-6 border border-gray-300 dark:border-white/10 mb-8">
|
|
62
62
|
<pre className="text-sm overflow-x-auto">
|
|
63
|
-
<code className="text-gray-300">npm install -g @programinglive/dev-workflow-mcp-server</code>
|
|
63
|
+
<code className="text-gray-700 dark:text-gray-300">npm install -g @programinglive/dev-workflow-mcp-server</code>
|
|
64
64
|
</pre>
|
|
65
65
|
</div>
|
|
66
66
|
|
|
67
|
-
<h2 className="text-3xl font-bold mt-12 mb-6">Quick Start</h2>
|
|
67
|
+
<h2 className="text-3xl font-bold mt-12 mb-6 text-gray-900 dark:text-white">Quick Start</h2>
|
|
68
68
|
<ol className="space-y-4 mb-8">
|
|
69
69
|
<li className="flex gap-4">
|
|
70
|
-
<span className="flex-shrink-0 w-8 h-8 rounded-full bg-indigo-500/20 flex items-center justify-center text-indigo-400 font-bold">1</span>
|
|
70
|
+
<span className="flex-shrink-0 w-8 h-8 rounded-full bg-indigo-100 dark:bg-indigo-500/20 flex items-center justify-center text-indigo-600 dark:text-indigo-400 font-bold">1</span>
|
|
71
71
|
<div>
|
|
72
|
-
<h3 className="font-semibold mb-1">Start a Task</h3>
|
|
73
|
-
<p className="text-gray-400">Begin your coding session by defining what you're working on.</p>
|
|
74
|
-
<div className="bg-[#1a1a24] rounded-lg p-3 mt-2 border border-white/10">
|
|
75
|
-
<code className="text-sm text-gray-300">start_task</code>
|
|
72
|
+
<h3 className="font-semibold mb-1 text-gray-900 dark:text-white">Start a Task</h3>
|
|
73
|
+
<p className="text-gray-600 dark:text-gray-400">Begin your coding session by defining what you're working on.</p>
|
|
74
|
+
<div className="bg-gray-100 dark:bg-[#1a1a24] rounded-lg p-3 mt-2 border border-gray-300 dark:border-white/10">
|
|
75
|
+
<code className="text-sm text-gray-700 dark:text-gray-300">start_task</code>
|
|
76
76
|
</div>
|
|
77
77
|
</div>
|
|
78
78
|
</li>
|
|
79
79
|
<li className="flex gap-4">
|
|
80
|
-
<span className="flex-shrink-0 w-8 h-8 rounded-full bg-purple-500/20 flex items-center justify-center text-purple-400 font-bold">2</span>
|
|
80
|
+
<span className="flex-shrink-0 w-8 h-8 rounded-full bg-purple-100 dark:bg-purple-500/20 flex items-center justify-center text-purple-600 dark:text-purple-400 font-bold">2</span>
|
|
81
81
|
<div>
|
|
82
|
-
<h3 className="font-semibold mb-1">Mark Bug Fixed</h3>
|
|
83
|
-
<p className="text-gray-400">Once you've implemented your feature or fix, mark it as complete.</p>
|
|
84
|
-
<div className="bg-[#1a1a24] rounded-lg p-3 mt-2 border border-white/10">
|
|
85
|
-
<code className="text-sm text-gray-300">mark_bug_fixed</code>
|
|
82
|
+
<h3 className="font-semibold mb-1 text-gray-900 dark:text-white">Mark Bug Fixed</h3>
|
|
83
|
+
<p className="text-gray-600 dark:text-gray-400">Once you've implemented your feature or fix, mark it as complete.</p>
|
|
84
|
+
<div className="bg-gray-100 dark:bg-[#1a1a24] rounded-lg p-3 mt-2 border border-gray-300 dark:border-white/10">
|
|
85
|
+
<code className="text-sm text-gray-700 dark:text-gray-300">mark_bug_fixed</code>
|
|
86
86
|
</div>
|
|
87
87
|
</div>
|
|
88
88
|
</li>
|
|
89
89
|
<li className="flex gap-4">
|
|
90
|
-
<span className="flex-shrink-0 w-8 h-8 rounded-full bg-emerald-500/20 flex items-center justify-center text-emerald-400 font-bold">3</span>
|
|
90
|
+
<span className="flex-shrink-0 w-8 h-8 rounded-full bg-emerald-100 dark:bg-emerald-500/20 flex items-center justify-center text-emerald-600 dark:text-emerald-400 font-bold">3</span>
|
|
91
91
|
<div>
|
|
92
|
-
<h3 className="font-semibold mb-1">Create Tests</h3>
|
|
93
|
-
<p className="text-gray-400">Write tests to verify your changes work correctly.</p>
|
|
94
|
-
<div className="bg-[#1a1a24] rounded-lg p-3 mt-2 border border-white/10">
|
|
95
|
-
<code className="text-sm text-gray-300">create_tests</code>
|
|
92
|
+
<h3 className="font-semibold mb-1 text-gray-900 dark:text-white">Create Tests</h3>
|
|
93
|
+
<p className="text-gray-600 dark:text-gray-400">Write tests to verify your changes work correctly.</p>
|
|
94
|
+
<div className="bg-gray-100 dark:bg-[#1a1a24] rounded-lg p-3 mt-2 border border-gray-300 dark:border-white/10">
|
|
95
|
+
<code className="text-sm text-gray-700 dark:text-gray-300">create_tests</code>
|
|
96
96
|
</div>
|
|
97
97
|
</div>
|
|
98
98
|
</li>
|
|
99
99
|
<li className="flex gap-4">
|
|
100
|
-
<span className="flex-shrink-0 w-8 h-8 rounded-full bg-orange-500/20 flex items-center justify-center text-orange-400 font-bold">4</span>
|
|
100
|
+
<span className="flex-shrink-0 w-8 h-8 rounded-full bg-orange-100 dark:bg-orange-500/20 flex items-center justify-center text-orange-600 dark:text-orange-400 font-bold">4</span>
|
|
101
101
|
<div>
|
|
102
|
-
<h3 className="font-semibold mb-1">Run Tests</h3>
|
|
103
|
-
<p className="text-gray-400">Execute your test suite and ensure everything passes.</p>
|
|
104
|
-
<div className="bg-[#1a1a24] rounded-lg p-3 mt-2 border border-white/10">
|
|
105
|
-
<code className="text-sm text-gray-300">run_tests</code>
|
|
102
|
+
<h3 className="font-semibold mb-1 text-gray-900 dark:text-white">Run Tests</h3>
|
|
103
|
+
<p className="text-gray-600 dark:text-gray-400">Execute your test suite and ensure everything passes.</p>
|
|
104
|
+
<div className="bg-gray-100 dark:bg-[#1a1a24] rounded-lg p-3 mt-2 border border-gray-300 dark:border-white/10">
|
|
105
|
+
<code className="text-sm text-gray-700 dark:text-gray-300">run_tests</code>
|
|
106
106
|
</div>
|
|
107
107
|
</div>
|
|
108
108
|
</li>
|
|
109
109
|
<li className="flex gap-4">
|
|
110
|
-
<span className="flex-shrink-0 w-8 h-8 rounded-full bg-pink-500/20 flex items-center justify-center text-pink-400 font-bold">5</span>
|
|
110
|
+
<span className="flex-shrink-0 w-8 h-8 rounded-full bg-pink-100 dark:bg-pink-500/20 flex items-center justify-center text-pink-600 dark:text-pink-400 font-bold">5</span>
|
|
111
111
|
<div>
|
|
112
|
-
<h3 className="font-semibold mb-1">Create Documentation</h3>
|
|
113
|
-
<p className="text-gray-400">Update relevant documentation for your changes.</p>
|
|
114
|
-
<div className="bg-[#1a1a24] rounded-lg p-3 mt-2 border border-white/10">
|
|
115
|
-
<code className="text-sm text-gray-300">create_documentation</code>
|
|
112
|
+
<h3 className="font-semibold mb-1 text-gray-900 dark:text-white">Create Documentation</h3>
|
|
113
|
+
<p className="text-gray-600 dark:text-gray-400">Update relevant documentation for your changes.</p>
|
|
114
|
+
<div className="bg-gray-100 dark:bg-[#1a1a24] rounded-lg p-3 mt-2 border border-gray-300 dark:border-white/10">
|
|
115
|
+
<code className="text-sm text-gray-700 dark:text-gray-300">create_documentation</code>
|
|
116
116
|
</div>
|
|
117
117
|
</div>
|
|
118
118
|
</li>
|
|
119
119
|
<li className="flex gap-4">
|
|
120
|
-
<span className="flex-shrink-0 w-8 h-8 rounded-full bg-blue-500/20 flex items-center justify-center text-blue-400 font-bold">6</span>
|
|
120
|
+
<span className="flex-shrink-0 w-8 h-8 rounded-full bg-blue-100 dark:bg-blue-500/20 flex items-center justify-center text-blue-600 dark:text-blue-400 font-bold">6</span>
|
|
121
121
|
<div>
|
|
122
|
-
<h3 className="font-semibold mb-1">Commit and Push</h3>
|
|
123
|
-
<p className="text-gray-400">Commit your changes and push to the repository.</p>
|
|
124
|
-
<div className="bg-[#1a1a24] rounded-lg p-3 mt-2 border border-white/10">
|
|
125
|
-
<code className="text-sm text-gray-300">commit_and_push</code>
|
|
122
|
+
<h3 className="font-semibold mb-1 text-gray-900 dark:text-white">Commit and Push</h3>
|
|
123
|
+
<p className="text-gray-600 dark:text-gray-400">Commit your changes and push to the repository.</p>
|
|
124
|
+
<div className="bg-gray-100 dark:bg-[#1a1a24] rounded-lg p-3 mt-2 border border-gray-300 dark:border-white/10">
|
|
125
|
+
<code className="text-sm text-gray-700 dark:text-gray-300">commit_and_push</code>
|
|
126
126
|
</div>
|
|
127
127
|
</div>
|
|
128
128
|
</li>
|
|
129
129
|
</ol>
|
|
130
130
|
|
|
131
|
-
<h2 className="text-3xl font-bold mt-12 mb-6">Available Commands</h2>
|
|
131
|
+
<h2 className="text-3xl font-bold mt-12 mb-6 text-gray-900 dark:text-white">Available Commands</h2>
|
|
132
132
|
<div className="space-y-3 mb-8">
|
|
133
133
|
{[
|
|
134
134
|
{ cmd: "start_task", desc: "Begin a new coding task" },
|
|
@@ -143,54 +143,54 @@ export default function DocsPage() {
|
|
|
143
143
|
{ cmd: "get_workflow_status", desc: "Check current workflow state" },
|
|
144
144
|
{ cmd: "view_history", desc: "View completed tasks" },
|
|
145
145
|
].map((item) => (
|
|
146
|
-
<div key={item.cmd} className="p-4 rounded-lg bg-white/5 border border-white/10 hover:bg-white/10 transition">
|
|
147
|
-
<code className="text-indigo-400 font-mono">{item.cmd}</code>
|
|
148
|
-
<p className="text-gray-400 text-sm mt-1">{item.desc}</p>
|
|
146
|
+
<div key={item.cmd} className="p-4 rounded-lg bg-gray-50 dark:bg-white/5 border border-gray-200 dark:border-white/10 hover:bg-gray-100 dark:hover:bg-white/10 transition">
|
|
147
|
+
<code className="text-indigo-600 dark:text-indigo-400 font-mono">{item.cmd}</code>
|
|
148
|
+
<p className="text-gray-600 dark:text-gray-400 text-sm mt-1">{item.desc}</p>
|
|
149
149
|
</div>
|
|
150
150
|
))}
|
|
151
151
|
</div>
|
|
152
152
|
|
|
153
|
-
<h2 className="text-3xl font-bold mt-12 mb-6">Configuration</h2>
|
|
154
|
-
<p className="text-gray-400 mb-4">
|
|
155
|
-
The server stores workflow state in a SQLite database located at <code className="text-indigo-400 bg-white/5 px-2 py-1 rounded">.state/dev-workflow.db</code>
|
|
153
|
+
<h2 className="text-3xl font-bold mt-12 mb-6 text-gray-900 dark:text-white">Configuration</h2>
|
|
154
|
+
<p className="text-gray-600 dark:text-gray-400 mb-4">
|
|
155
|
+
The server stores workflow state in a SQLite database located at <code className="text-indigo-600 dark:text-indigo-400 bg-gray-100 dark:bg-white/5 px-2 py-1 rounded">.state/dev-workflow.db</code>
|
|
156
156
|
</p>
|
|
157
|
-
<p className="text-gray-400 mb-8">
|
|
158
|
-
Set the <code className="text-indigo-400 bg-white/5 px-2 py-1 rounded">DEV_WORKFLOW_USER_ID</code> environment variable to isolate workflow state per user.
|
|
157
|
+
<p className="text-gray-600 dark:text-gray-400 mb-8">
|
|
158
|
+
Set the <code className="text-indigo-600 dark:text-indigo-400 bg-gray-100 dark:bg-white/5 px-2 py-1 rounded">DEV_WORKFLOW_USER_ID</code> environment variable to isolate workflow state per user.
|
|
159
159
|
</p>
|
|
160
160
|
|
|
161
|
-
<h2 className="text-3xl font-bold mt-12 mb-6">Requirements</h2>
|
|
161
|
+
<h2 className="text-3xl font-bold mt-12 mb-6 text-gray-900 dark:text-white">Requirements</h2>
|
|
162
162
|
<ul className="space-y-2 mb-8">
|
|
163
|
-
<li className="flex items-center gap-2 text-gray-400">
|
|
164
|
-
<CheckCircle className="w-4 h-4 text-emerald-400" />
|
|
163
|
+
<li className="flex items-center gap-2 text-gray-600 dark:text-gray-400">
|
|
164
|
+
<CheckCircle className="w-4 h-4 text-emerald-600 dark:text-emerald-400" />
|
|
165
165
|
Node.js 18 or higher
|
|
166
166
|
</li>
|
|
167
|
-
<li className="flex items-center gap-2 text-gray-400">
|
|
168
|
-
<CheckCircle className="w-4 h-4 text-emerald-400" />
|
|
167
|
+
<li className="flex items-center gap-2 text-gray-600 dark:text-gray-400">
|
|
168
|
+
<CheckCircle className="w-4 h-4 text-emerald-600 dark:text-emerald-400" />
|
|
169
169
|
Git installed and configured
|
|
170
170
|
</li>
|
|
171
|
-
<li className="flex items-center gap-2 text-gray-400">
|
|
172
|
-
<CheckCircle className="w-4 h-4 text-emerald-400" />
|
|
171
|
+
<li className="flex items-center gap-2 text-gray-600 dark:text-gray-400">
|
|
172
|
+
<CheckCircle className="w-4 h-4 text-emerald-600 dark:text-emerald-400" />
|
|
173
173
|
MCP-compatible AI assistant (e.g., Claude Desktop)
|
|
174
174
|
</li>
|
|
175
175
|
</ul>
|
|
176
176
|
|
|
177
|
-
<h2 className="text-3xl font-bold mt-12 mb-6">License</h2>
|
|
178
|
-
<p className="text-gray-400 mb-8">
|
|
177
|
+
<h2 className="text-3xl font-bold mt-12 mb-6 text-gray-900 dark:text-white">License</h2>
|
|
178
|
+
<p className="text-gray-600 dark:text-gray-400 mb-8">
|
|
179
179
|
MIT License - Free to use for personal and commercial projects.
|
|
180
180
|
</p>
|
|
181
181
|
|
|
182
|
-
<div className="bg-gradient-to-r from-indigo-500/10 via-purple-500/10 to-pink-500/10 border border-white/10 rounded-lg p-6 mt-12">
|
|
182
|
+
<div className="bg-gradient-to-r from-indigo-50 dark:from-indigo-500/10 via-purple-50 dark:via-purple-500/10 to-pink-50 dark:to-pink-500/10 border border-gray-300 dark:border-white/10 rounded-lg p-6 mt-12">
|
|
183
183
|
<div className="flex items-center gap-3 mb-3">
|
|
184
|
-
<Rocket className="w-6 h-6 text-pink-400" />
|
|
185
|
-
<h3 className="text-xl font-bold">Ready to get started?</h3>
|
|
184
|
+
<Rocket className="w-6 h-6 text-pink-600 dark:text-pink-400" />
|
|
185
|
+
<h3 className="text-xl font-bold text-gray-900 dark:text-white">Ready to get started?</h3>
|
|
186
186
|
</div>
|
|
187
|
-
<p className="text-gray-400 mb-4">
|
|
187
|
+
<p className="text-gray-600 dark:text-gray-400 mb-4">
|
|
188
188
|
Install the MCP server and start enforcing best practices in your development workflow today!
|
|
189
189
|
</p>
|
|
190
190
|
<Link
|
|
191
191
|
href="https://github.com/programinglive/dev-workflow-mcp-server"
|
|
192
192
|
target="_blank"
|
|
193
|
-
className="inline-flex items-center gap-2 px-6 py-3 bg-gradient-to-r from-indigo-600 to-purple-600 rounded-lg font-semibold hover:shadow-lg hover:shadow-indigo-500/50 transition"
|
|
193
|
+
className="inline-flex items-center gap-2 px-6 py-3 bg-gradient-to-r from-indigo-600 to-purple-600 dark:from-indigo-600 dark:to-purple-600 rounded-lg font-semibold text-white hover:shadow-lg hover:shadow-indigo-500/50 transition"
|
|
194
194
|
>
|
|
195
195
|
View on GitHub
|
|
196
196
|
</Link>
|
package/workflow-state.js
CHANGED
|
@@ -533,14 +533,41 @@ export class WorkflowState {
|
|
|
533
533
|
|
|
534
534
|
async syncToDatabase() {
|
|
535
535
|
try {
|
|
536
|
-
const { insertHistoryEntry, updateSummaryForUser } = await import("./db/index.js");
|
|
536
|
+
const { insertHistoryEntry, updateSummaryForUser, saveState } = await import("./db/index.js");
|
|
537
537
|
const userId = getCurrentUserId();
|
|
538
|
+
// Use the project directory (parent of .state) as the project identifier
|
|
539
|
+
// this.stateFile is .../.state/users/<user>/workflow-state.json
|
|
540
|
+
// so we want resolution logic. For now, let's use the absolute path to the project root.
|
|
541
|
+
// We can derive it from stateFile path logic in resolveStateFile or just use the directory we are in.
|
|
542
|
+
// A safe bet that is unique per project on this machine is the project root found by resolveStateFile.
|
|
543
|
+
// Let's perform a simple resolution:
|
|
544
|
+
|
|
545
|
+
const stateDir = path.dirname(path.dirname(path.dirname(this.stateFile)));
|
|
546
|
+
// stateFile = <root>/.state/users/<user>/workflow-state.json
|
|
547
|
+
// dirname = <root>/.state/users/<user>
|
|
548
|
+
// dirname = <root>/.state/users
|
|
549
|
+
// dirname = <root>/.state
|
|
550
|
+
// dirname = <root>
|
|
551
|
+
|
|
552
|
+
// Wait, let's look at the path structure from resolveStateFile:
|
|
553
|
+
// path.join(userDir, STATE_FILENAME); where userDir is path.join(stateDir, "users", userId);
|
|
554
|
+
// and stateDir is path.join(projectRoot, STATE_DIR);
|
|
555
|
+
// So: projectRoot/.state/users/userId/workflow-state.json
|
|
556
|
+
// 1. dirname -> .../userId
|
|
557
|
+
// 2. dirname -> .../users
|
|
558
|
+
// 3. dirname -> .../.state
|
|
559
|
+
// 4. dirname -> .../projectRoot
|
|
560
|
+
|
|
561
|
+
const projectRoot = path.dirname(path.dirname(path.dirname(path.dirname(this.stateFile))));
|
|
562
|
+
|
|
538
563
|
for (const entry of this.state.history || []) {
|
|
539
|
-
insertHistoryEntry(userId, entry);
|
|
564
|
+
await insertHistoryEntry(userId, projectRoot, entry);
|
|
540
565
|
}
|
|
541
|
-
updateSummaryForUser(userId);
|
|
542
|
-
|
|
543
|
-
|
|
566
|
+
await updateSummaryForUser(userId, projectRoot);
|
|
567
|
+
await saveState(userId, projectRoot, this.state);
|
|
568
|
+
} catch (error) {
|
|
569
|
+
// Database sync failed; log it but don't crash
|
|
570
|
+
console.error("Database sync failed:", error.message);
|
|
544
571
|
}
|
|
545
572
|
}
|
|
546
573
|
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
name: Publish to npm
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
tags:
|
|
6
|
-
- "v*"
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
publish:
|
|
10
|
-
name: Publish package
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
permissions:
|
|
13
|
-
contents: read
|
|
14
|
-
id-token: write
|
|
15
|
-
|
|
16
|
-
env:
|
|
17
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
18
|
-
|
|
19
|
-
steps:
|
|
20
|
-
- name: Checkout repository
|
|
21
|
-
uses: actions/checkout@v4
|
|
22
|
-
|
|
23
|
-
- name: Setup Node.js
|
|
24
|
-
uses: actions/setup-node@v4
|
|
25
|
-
with:
|
|
26
|
-
node-version: "20"
|
|
27
|
-
cache: "npm"
|
|
28
|
-
registry-url: https://registry.npmjs.org
|
|
29
|
-
scope: "@programinglive"
|
|
30
|
-
|
|
31
|
-
- name: Install dependencies
|
|
32
|
-
run: npm ci
|
|
33
|
-
|
|
34
|
-
- name: Install web dependencies
|
|
35
|
-
run: npm ci --prefix web
|
|
36
|
-
|
|
37
|
-
- name: Build package
|
|
38
|
-
run: npm run build
|
|
39
|
-
|
|
40
|
-
- name: Verify tag matches package version
|
|
41
|
-
run: |
|
|
42
|
-
EXPECTED_TAG="${GITHUB_REF#refs/tags/}"
|
|
43
|
-
PACKAGE_VERSION=$(node -p "require('./package.json').version")
|
|
44
|
-
if [ "v${PACKAGE_VERSION}" != "${EXPECTED_TAG}" ]; then
|
|
45
|
-
echo "Package version ${PACKAGE_VERSION} does not match tag ${EXPECTED_TAG}"
|
|
46
|
-
exit 1
|
|
47
|
-
fi
|
|
48
|
-
|
|
49
|
-
- name: Publish to npm
|
|
50
|
-
run: npm publish --provenance
|
package/web/tests/build.test.js
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Build Verification Tests
|
|
3
|
-
* Tests that the website builds successfully and key features are present
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { execSync } from 'child_process';
|
|
7
|
-
import fs from 'fs';
|
|
8
|
-
import path from 'path';
|
|
9
|
-
import { fileURLToPath } from 'url';
|
|
10
|
-
|
|
11
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
12
|
-
const webDir = path.join(__dirname, '..');
|
|
13
|
-
const outDir = path.join(webDir, 'out');
|
|
14
|
-
|
|
15
|
-
describe('Build Tests', () => {
|
|
16
|
-
test('should build successfully', () => {
|
|
17
|
-
execSync('npm run build', { cwd: webDir, stdio: 'pipe' });
|
|
18
|
-
expect(fs.existsSync(outDir)).toBe(true);
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
test('should generate homepage', () => {
|
|
22
|
-
const indexPath = path.join(outDir, 'index.html');
|
|
23
|
-
expect(fs.existsSync(indexPath)).toBe(true);
|
|
24
|
-
const content = fs.readFileSync(indexPath, 'utf-8');
|
|
25
|
-
expect(content).toContain('Dev Workflow');
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
test('should include dark mode support', () => {
|
|
29
|
-
const indexPath = path.join(outDir, 'index.html');
|
|
30
|
-
const content = fs.readFileSync(indexPath, 'utf-8');
|
|
31
|
-
expect(content).toContain('dark:');
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
test('should include responsive design', () => {
|
|
35
|
-
const indexPath = path.join(outDir, 'index.html');
|
|
36
|
-
const content = fs.readFileSync(indexPath, 'utf-8');
|
|
37
|
-
expect(content).toContain('sm:');
|
|
38
|
-
expect(content).toContain('md:');
|
|
39
|
-
expect(content).toContain('lg:');
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
describe('Theme Toggle Tests', () => {
|
|
44
|
-
test('should have theme persistence', () => {
|
|
45
|
-
const navbarPath = path.join(webDir, 'components', 'Navbar.tsx');
|
|
46
|
-
const content = fs.readFileSync(navbarPath, 'utf-8');
|
|
47
|
-
expect(content).toContain('localStorage');
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
test('should detect system preference', () => {
|
|
51
|
-
const navbarPath = path.join(webDir, 'components', 'Navbar.tsx');
|
|
52
|
-
const content = fs.readFileSync(navbarPath, 'utf-8');
|
|
53
|
-
expect(content).toContain('prefers-color-scheme');
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
describe('Responsive Design Tests', () => {
|
|
58
|
-
test('should optimize for vertical monitors', () => {
|
|
59
|
-
const heroPath = path.join(webDir, 'components', 'Hero.tsx');
|
|
60
|
-
const content = fs.readFileSync(heroPath, 'utf-8');
|
|
61
|
-
expect(content).toContain('xl:grid-cols-2');
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
test('should have responsive navbar', () => {
|
|
65
|
-
const navbarPath = path.join(webDir, 'components', 'Navbar.tsx');
|
|
66
|
-
const content = fs.readFileSync(navbarPath, 'utf-8');
|
|
67
|
-
expect(content).toContain('md:hidden');
|
|
68
|
-
});
|
|
69
|
-
});
|