@prowi/deskcheck 0.1.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/LICENSE +21 -0
- package/README.md +266 -0
- package/build/agents/executor-prompt.d.ts +10 -0
- package/build/agents/executor-prompt.d.ts.map +1 -0
- package/build/agents/executor-prompt.js +65 -0
- package/build/agents/executor-prompt.js.map +1 -0
- package/build/agents/orchestrator.d.ts +52 -0
- package/build/agents/orchestrator.d.ts.map +1 -0
- package/build/agents/orchestrator.js +343 -0
- package/build/agents/orchestrator.js.map +1 -0
- package/build/agents/planner.d.ts +28 -0
- package/build/agents/planner.d.ts.map +1 -0
- package/build/agents/planner.js +138 -0
- package/build/agents/planner.js.map +1 -0
- package/build/cli.d.ts +3 -0
- package/build/cli.d.ts.map +1 -0
- package/build/cli.js +467 -0
- package/build/cli.js.map +1 -0
- package/build/core/config.d.ts +16 -0
- package/build/core/config.d.ts.map +1 -0
- package/build/core/config.js +81 -0
- package/build/core/config.js.map +1 -0
- package/build/core/context-extractor.d.ts +17 -0
- package/build/core/context-extractor.d.ts.map +1 -0
- package/build/core/context-extractor.js +69 -0
- package/build/core/context-extractor.js.map +1 -0
- package/build/core/glob-matcher.d.ts +32 -0
- package/build/core/glob-matcher.d.ts.map +1 -0
- package/build/core/glob-matcher.js +51 -0
- package/build/core/glob-matcher.js.map +1 -0
- package/build/core/module-parser.d.ts +26 -0
- package/build/core/module-parser.d.ts.map +1 -0
- package/build/core/module-parser.js +98 -0
- package/build/core/module-parser.js.map +1 -0
- package/build/core/plan-builder.d.ts +12 -0
- package/build/core/plan-builder.d.ts.map +1 -0
- package/build/core/plan-builder.js +66 -0
- package/build/core/plan-builder.js.map +1 -0
- package/build/core/storage.d.ts +118 -0
- package/build/core/storage.d.ts.map +1 -0
- package/build/core/storage.js +590 -0
- package/build/core/storage.js.map +1 -0
- package/build/core/types.d.ts +268 -0
- package/build/core/types.d.ts.map +1 -0
- package/build/core/types.js +5 -0
- package/build/core/types.js.map +1 -0
- package/build/mcp/tools.d.ts +10 -0
- package/build/mcp/tools.d.ts.map +1 -0
- package/build/mcp/tools.js +354 -0
- package/build/mcp/tools.js.map +1 -0
- package/build/mcp-server.d.ts +3 -0
- package/build/mcp-server.d.ts.map +1 -0
- package/build/mcp-server.js +15 -0
- package/build/mcp-server.js.map +1 -0
- package/build/renderers/json.d.ts +4 -0
- package/build/renderers/json.d.ts.map +1 -0
- package/build/renderers/json.js +5 -0
- package/build/renderers/json.js.map +1 -0
- package/build/renderers/markdown.d.ts +4 -0
- package/build/renderers/markdown.d.ts.map +1 -0
- package/build/renderers/markdown.js +36 -0
- package/build/renderers/markdown.js.map +1 -0
- package/build/renderers/shared.d.ts +23 -0
- package/build/renderers/shared.d.ts.map +1 -0
- package/build/renderers/shared.js +30 -0
- package/build/renderers/shared.js.map +1 -0
- package/build/renderers/terminal.d.ts +4 -0
- package/build/renderers/terminal.d.ts.map +1 -0
- package/build/renderers/terminal.js +88 -0
- package/build/renderers/terminal.js.map +1 -0
- package/build/renderers/watch.d.ts +4 -0
- package/build/renderers/watch.d.ts.map +1 -0
- package/build/renderers/watch.js +119 -0
- package/build/renderers/watch.js.map +1 -0
- package/build/serve.d.ts +9 -0
- package/build/serve.d.ts.map +1 -0
- package/build/serve.js +249 -0
- package/build/serve.js.map +1 -0
- package/package.json +41 -0
- package/ui/dist/index.html +92 -0
package/build/serve.js
ADDED
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import http from "node:http";
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { URL } from "node:url";
|
|
5
|
+
import { ReviewStorage } from "./core/storage.js";
|
|
6
|
+
// =============================================================================
|
|
7
|
+
// Response helpers
|
|
8
|
+
// =============================================================================
|
|
9
|
+
function sendJson(res, data, status = 200) {
|
|
10
|
+
const body = JSON.stringify(data);
|
|
11
|
+
res.writeHead(status, {
|
|
12
|
+
"Content-Type": "application/json",
|
|
13
|
+
"Access-Control-Allow-Origin": "*",
|
|
14
|
+
"Cache-Control": "no-cache",
|
|
15
|
+
});
|
|
16
|
+
res.end(body);
|
|
17
|
+
}
|
|
18
|
+
function sendHtml(res, html) {
|
|
19
|
+
res.writeHead(200, {
|
|
20
|
+
"Content-Type": "text/html; charset=utf-8",
|
|
21
|
+
"Access-Control-Allow-Origin": "*",
|
|
22
|
+
});
|
|
23
|
+
res.end(html);
|
|
24
|
+
}
|
|
25
|
+
function sendError(res, status, message) {
|
|
26
|
+
sendJson(res, { error: message }, status);
|
|
27
|
+
}
|
|
28
|
+
// =============================================================================
|
|
29
|
+
// Route handlers
|
|
30
|
+
// =============================================================================
|
|
31
|
+
function handleGetRuns(storage, res) {
|
|
32
|
+
const plans = storage.listPlans();
|
|
33
|
+
const runs = plans.map((planSummary) => {
|
|
34
|
+
let summary = null;
|
|
35
|
+
let completion = null;
|
|
36
|
+
// Enrich with results data if available
|
|
37
|
+
try {
|
|
38
|
+
const results = storage.getResults(planSummary.planId);
|
|
39
|
+
summary = results.summary;
|
|
40
|
+
completion = results.completion;
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
// No results file yet
|
|
44
|
+
}
|
|
45
|
+
// Enrich with plan data (tasks, modules, coverage)
|
|
46
|
+
let taskCount = 0;
|
|
47
|
+
let moduleCount = 0;
|
|
48
|
+
let moduleNames = [];
|
|
49
|
+
let matchedFiles = 0;
|
|
50
|
+
let unmatchedFiles = 0;
|
|
51
|
+
let sourceType = null;
|
|
52
|
+
let sourceTarget = null;
|
|
53
|
+
try {
|
|
54
|
+
const plan = storage.getPlan(planSummary.planId);
|
|
55
|
+
taskCount = Object.keys(plan.tasks).length;
|
|
56
|
+
moduleCount = Object.keys(plan.modules).length;
|
|
57
|
+
moduleNames = Object.keys(plan.modules).map((id) => id.split("/").pop() ?? id);
|
|
58
|
+
matchedFiles = plan.matched_files?.length ?? 0;
|
|
59
|
+
unmatchedFiles = plan.unmatched_files?.length ?? 0;
|
|
60
|
+
sourceType = plan.source?.type ?? null;
|
|
61
|
+
sourceTarget = plan.source?.target ?? null;
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
// Plan read error
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
planId: planSummary.planId,
|
|
68
|
+
name: planSummary.name,
|
|
69
|
+
status: planSummary.status,
|
|
70
|
+
createdAt: planSummary.createdAt,
|
|
71
|
+
sourceType,
|
|
72
|
+
sourceTarget,
|
|
73
|
+
taskCount,
|
|
74
|
+
moduleCount,
|
|
75
|
+
moduleNames,
|
|
76
|
+
matchedFiles,
|
|
77
|
+
unmatchedFiles,
|
|
78
|
+
summary,
|
|
79
|
+
completion,
|
|
80
|
+
};
|
|
81
|
+
});
|
|
82
|
+
sendJson(res, runs);
|
|
83
|
+
}
|
|
84
|
+
function handleGetPlan(storage, res, planId) {
|
|
85
|
+
try {
|
|
86
|
+
const plan = storage.getPlan(planId);
|
|
87
|
+
sendJson(res, plan);
|
|
88
|
+
}
|
|
89
|
+
catch {
|
|
90
|
+
sendError(res, 404, `Plan not found: ${planId}`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function handleGetResults(storage, res, planId) {
|
|
94
|
+
try {
|
|
95
|
+
const results = storage.getResults(planId);
|
|
96
|
+
sendJson(res, results);
|
|
97
|
+
}
|
|
98
|
+
catch {
|
|
99
|
+
sendError(res, 404, `Results not found for plan: ${planId}`);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
function handleSSE(res, storageDir, planId) {
|
|
103
|
+
const planDir = path.join(storageDir, planId);
|
|
104
|
+
if (!fs.existsSync(planDir)) {
|
|
105
|
+
sendError(res, 404, `Plan not found: ${planId}`);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
res.writeHead(200, {
|
|
109
|
+
"Content-Type": "text/event-stream",
|
|
110
|
+
"Access-Control-Allow-Origin": "*",
|
|
111
|
+
"Cache-Control": "no-cache",
|
|
112
|
+
"Connection": "keep-alive",
|
|
113
|
+
});
|
|
114
|
+
// Send initial keepalive
|
|
115
|
+
res.write(": connected\n\n");
|
|
116
|
+
// Watch the plan directory for changes to plan.json or results.json
|
|
117
|
+
let debounceTimer = null;
|
|
118
|
+
let watcher = null;
|
|
119
|
+
try {
|
|
120
|
+
watcher = fs.watch(planDir, (_eventType, filename) => {
|
|
121
|
+
if (filename !== "plan.json" && filename !== "results.json")
|
|
122
|
+
return;
|
|
123
|
+
// Debounce: plan.json and results.json often update in quick succession
|
|
124
|
+
if (debounceTimer)
|
|
125
|
+
clearTimeout(debounceTimer);
|
|
126
|
+
debounceTimer = setTimeout(() => {
|
|
127
|
+
try {
|
|
128
|
+
res.write('data: {"type":"update"}\n\n');
|
|
129
|
+
}
|
|
130
|
+
catch {
|
|
131
|
+
// Client disconnected
|
|
132
|
+
cleanup();
|
|
133
|
+
}
|
|
134
|
+
}, 100);
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
catch {
|
|
138
|
+
// If fs.watch fails, fall back to polling
|
|
139
|
+
const pollInterval = setInterval(() => {
|
|
140
|
+
try {
|
|
141
|
+
res.write('data: {"type":"update"}\n\n');
|
|
142
|
+
}
|
|
143
|
+
catch {
|
|
144
|
+
clearInterval(pollInterval);
|
|
145
|
+
}
|
|
146
|
+
}, 2000);
|
|
147
|
+
res.on("close", () => {
|
|
148
|
+
clearInterval(pollInterval);
|
|
149
|
+
});
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
function cleanup() {
|
|
153
|
+
if (debounceTimer)
|
|
154
|
+
clearTimeout(debounceTimer);
|
|
155
|
+
if (watcher) {
|
|
156
|
+
watcher.close();
|
|
157
|
+
watcher = null;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
// Keep-alive every 30s to prevent proxy timeouts
|
|
161
|
+
const keepalive = setInterval(() => {
|
|
162
|
+
try {
|
|
163
|
+
res.write(": keepalive\n\n");
|
|
164
|
+
}
|
|
165
|
+
catch {
|
|
166
|
+
cleanup();
|
|
167
|
+
clearInterval(keepalive);
|
|
168
|
+
}
|
|
169
|
+
}, 30_000);
|
|
170
|
+
res.on("close", () => {
|
|
171
|
+
cleanup();
|
|
172
|
+
clearInterval(keepalive);
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
// =============================================================================
|
|
176
|
+
// URL parsing
|
|
177
|
+
// =============================================================================
|
|
178
|
+
/** Parse a URL path into segments, e.g. "/api/runs/abc/plan" -> ["api", "runs", "abc", "plan"]. */
|
|
179
|
+
function parseSegments(pathname) {
|
|
180
|
+
return pathname.split("/").filter((s) => s.length > 0);
|
|
181
|
+
}
|
|
182
|
+
// =============================================================================
|
|
183
|
+
// Server
|
|
184
|
+
// =============================================================================
|
|
185
|
+
/**
|
|
186
|
+
* Start the deskcheck web UI server.
|
|
187
|
+
*
|
|
188
|
+
* Serves a self-contained HTML dashboard at the root, a JSON API for run data,
|
|
189
|
+
* and SSE streams for live updates during execution.
|
|
190
|
+
*/
|
|
191
|
+
export function startServer(config, projectRoot, port) {
|
|
192
|
+
const storageDir = path.join(projectRoot, config.storage_dir);
|
|
193
|
+
const storage = new ReviewStorage(storageDir);
|
|
194
|
+
const uiHtmlPath = path.resolve(path.dirname(new URL(import.meta.url).pathname), "../ui/dist/index.html");
|
|
195
|
+
const server = http.createServer((req, res) => {
|
|
196
|
+
// Handle CORS preflight
|
|
197
|
+
if (req.method === "OPTIONS") {
|
|
198
|
+
res.writeHead(204, {
|
|
199
|
+
"Access-Control-Allow-Origin": "*",
|
|
200
|
+
"Access-Control-Allow-Methods": "GET, OPTIONS",
|
|
201
|
+
"Access-Control-Allow-Headers": "Content-Type",
|
|
202
|
+
});
|
|
203
|
+
res.end();
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
if (req.method !== "GET") {
|
|
207
|
+
sendError(res, 405, "Method not allowed");
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
const parsedUrl = new URL(req.url ?? "/", `http://localhost:${port}`);
|
|
211
|
+
const segments = parseSegments(parsedUrl.pathname);
|
|
212
|
+
// GET / -> dashboard HTML (re-read on each request so UI rebuilds are picked up without restart)
|
|
213
|
+
if (segments.length === 0) {
|
|
214
|
+
const dashboardHtml = fs.readFileSync(uiHtmlPath, "utf-8");
|
|
215
|
+
sendHtml(res, dashboardHtml);
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
// API routes all start with "api"
|
|
219
|
+
if (segments[0] !== "api") {
|
|
220
|
+
sendError(res, 404, "Not found");
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
// GET /api/runs
|
|
224
|
+
if (segments.length === 2 && segments[1] === "runs") {
|
|
225
|
+
handleGetRuns(storage, res);
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
// GET /api/runs/:id/plan
|
|
229
|
+
if (segments.length === 4 && segments[1] === "runs" && segments[3] === "plan") {
|
|
230
|
+
handleGetPlan(storage, res, decodeURIComponent(segments[2]));
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
// GET /api/runs/:id/results
|
|
234
|
+
if (segments.length === 4 && segments[1] === "runs" && segments[3] === "results") {
|
|
235
|
+
handleGetResults(storage, res, decodeURIComponent(segments[2]));
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
// GET /api/events/:id -> SSE stream
|
|
239
|
+
if (segments.length === 3 && segments[1] === "events") {
|
|
240
|
+
handleSSE(res, storageDir, decodeURIComponent(segments[2]));
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
sendError(res, 404, "Not found");
|
|
244
|
+
});
|
|
245
|
+
server.listen(port, () => {
|
|
246
|
+
console.log(`Deskcheck UI: http://localhost:${port}`);
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
//# sourceMappingURL=serve.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serve.js","sourceRoot":"","sources":["../src/serve.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC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
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@prowi/deskcheck",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Modular code review tool powered by Claude Agent SDK — define review criteria as markdown, run them against your codebase, get structured findings with a web dashboard.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/Prowi-ApS/deskcheck.git"
|
|
9
|
+
},
|
|
10
|
+
"type": "module",
|
|
11
|
+
"bin": {
|
|
12
|
+
"deskcheck": "./build/cli.js",
|
|
13
|
+
"deskcheck-mcp": "./build/mcp-server.js"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"build/",
|
|
17
|
+
"ui/dist/",
|
|
18
|
+
"README.md",
|
|
19
|
+
"LICENSE"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "tsc",
|
|
23
|
+
"dev": "tsc --watch",
|
|
24
|
+
"test": "vitest run",
|
|
25
|
+
"test:watch": "vitest",
|
|
26
|
+
"prepublishOnly": "npm run build && cd ui && npm ci && npx vite build"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@anthropic-ai/claude-agent-sdk": "^0.2.79",
|
|
30
|
+
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
31
|
+
"commander": "^13.0.0",
|
|
32
|
+
"gray-matter": "^4.0.3",
|
|
33
|
+
"minimatch": "^10.0.0",
|
|
34
|
+
"zod": "^4.0.0"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@types/node": "^22.0.0",
|
|
38
|
+
"typescript": "^5.8.0",
|
|
39
|
+
"vitest": "^3.0.0"
|
|
40
|
+
}
|
|
41
|
+
}
|