workflow-agent-cli 2.2.2 → 2.3.1

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.
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "workflow-agent-cli",
3
- "version": "2.2.2",
3
+ "version": "2.3.1",
4
4
  "description": "A self-evolving workflow management system for AI agent development",
5
5
  "keywords": [
6
6
  "workflow",
@@ -41,16 +41,6 @@
41
41
  "templates",
42
42
  "README.md"
43
43
  ],
44
- "scripts": {
45
- "build": "tsup",
46
- "dev": "tsup --watch",
47
- "test": "echo \"No tests yet\"",
48
- "test:coverage": "echo \"No tests yet\"",
49
- "lint": "echo \"ESLint not configured - skipping\"",
50
- "typecheck": "tsc --noEmit",
51
- "clean": "rm -rf dist",
52
- "postinstall": "node dist/scripts/postinstall.js || true"
53
- },
54
44
  "dependencies": {
55
45
  "@clack/prompts": "^0.7.0",
56
46
  "@hawkinside_out/workflow-improvement-tracker": "^1.0.0",
@@ -77,5 +67,15 @@
77
67
  },
78
68
  "publishConfig": {
79
69
  "access": "public"
70
+ },
71
+ "scripts": {
72
+ "build": "tsup",
73
+ "dev": "tsup --watch",
74
+ "test": "echo \"No tests yet\"",
75
+ "test:coverage": "echo \"No tests yet\"",
76
+ "lint": "echo \"ESLint not configured - skipping\"",
77
+ "typecheck": "tsc --noEmit",
78
+ "clean": "rm -rf dist",
79
+ "postinstall": "node dist/scripts/postinstall.js || true"
80
80
  }
81
- }
81
+ }
@@ -1,308 +0,0 @@
1
- // src/utils/check-runner.ts
2
- import { execa } from "execa";
3
- import chalk from "chalk";
4
- var QUALITY_CHECKS = [
5
- {
6
- name: "typecheck",
7
- displayName: "Type Check",
8
- command: "pnpm",
9
- args: ["typecheck"],
10
- canAutoFix: false
11
- // TypeScript errors need manual/LLM fix
12
- },
13
- {
14
- name: "lint",
15
- displayName: "Lint",
16
- command: "pnpm",
17
- args: ["lint"],
18
- fixCommand: "pnpm",
19
- fixArgs: ["lint", "--fix"],
20
- canAutoFix: true
21
- },
22
- {
23
- name: "format",
24
- displayName: "Format",
25
- command: "pnpm",
26
- args: ["format", "--check"],
27
- fixCommand: "pnpm",
28
- fixArgs: ["format"],
29
- canAutoFix: true
30
- },
31
- {
32
- name: "test",
33
- displayName: "Tests",
34
- command: "pnpm",
35
- args: ["test"],
36
- canAutoFix: false
37
- // Tests need manual/LLM fix
38
- },
39
- {
40
- name: "build",
41
- displayName: "Build",
42
- command: "pnpm",
43
- args: ["build"],
44
- canAutoFix: false
45
- // Build errors need manual/LLM fix
46
- }
47
- ];
48
- async function runCheck(check, cwd) {
49
- const startTime = Date.now();
50
- try {
51
- const result = await execa(check.command, check.args, {
52
- cwd,
53
- reject: false,
54
- all: true
55
- });
56
- const duration = Date.now() - startTime;
57
- if (result.exitCode === 0) {
58
- return {
59
- check,
60
- success: true,
61
- output: result.all || "",
62
- duration
63
- };
64
- } else {
65
- return {
66
- check,
67
- success: false,
68
- output: result.all || "",
69
- error: result.stderr || result.all || "Check failed",
70
- duration
71
- };
72
- }
73
- } catch (error) {
74
- const duration = Date.now() - startTime;
75
- const execaError = error;
76
- return {
77
- check,
78
- success: false,
79
- output: execaError.all?.toString() || execaError.message || "",
80
- error: execaError.message,
81
- duration
82
- };
83
- }
84
- }
85
- async function applyFix(check, cwd) {
86
- if (!check.canAutoFix || !check.fixCommand) {
87
- return { success: false, output: "Check does not support auto-fix" };
88
- }
89
- try {
90
- const result = await execa(check.fixCommand, check.fixArgs || [], {
91
- cwd,
92
- reject: false,
93
- all: true
94
- });
95
- return {
96
- success: result.exitCode === 0,
97
- output: result.all || ""
98
- };
99
- } catch (error) {
100
- const execaError = error;
101
- return {
102
- success: false,
103
- output: execaError.message
104
- };
105
- }
106
- }
107
- function formatFixCommand(check) {
108
- if (!check.fixCommand) return "";
109
- return `${check.fixCommand} ${(check.fixArgs || []).join(" ")}`;
110
- }
111
- async function runAllChecks(cwd, options = {}) {
112
- const {
113
- maxRetries = 10,
114
- autoFix = true,
115
- dryRun = false,
116
- onProgress
117
- } = options;
118
- const log = (message, type = "info") => {
119
- if (onProgress) {
120
- onProgress(message, type);
121
- } else {
122
- switch (type) {
123
- case "success":
124
- console.log(chalk.green(message));
125
- break;
126
- case "error":
127
- console.log(chalk.red(message));
128
- break;
129
- case "warning":
130
- console.log(chalk.yellow(message));
131
- break;
132
- default:
133
- console.log(message);
134
- }
135
- }
136
- };
137
- let attempt = 0;
138
- let fixesApplied = 0;
139
- const pendingFixes = [];
140
- while (attempt < maxRetries) {
141
- attempt++;
142
- log(`
143
- ${"\u2501".repeat(50)}`, "info");
144
- log(`\u{1F504} Validation Cycle ${attempt}/${maxRetries}`, "info");
145
- log(`${"\u2501".repeat(50)}
146
- `, "info");
147
- const results = [];
148
- let allPassed = true;
149
- let fixAppliedThisCycle = false;
150
- for (let i = 0; i < QUALITY_CHECKS.length; i++) {
151
- const check = QUALITY_CHECKS[i];
152
- const stepNum = i + 1;
153
- const totalSteps = QUALITY_CHECKS.length;
154
- log(`\u{1F4CB} Step ${stepNum}/${totalSteps}: ${check.displayName}...`, "info");
155
- const result = await runCheck(check, cwd);
156
- results.push(result);
157
- if (result.success) {
158
- log(`\u2705 ${check.displayName} passed (${result.duration}ms)`, "success");
159
- } else {
160
- allPassed = false;
161
- log(`\u274C ${check.displayName} failed`, "error");
162
- if (autoFix && check.canAutoFix && check.fixCommand) {
163
- if (dryRun) {
164
- log(
165
- `\u{1F527} [DRY-RUN] Would run: ${formatFixCommand(check)}`,
166
- "warning"
167
- );
168
- pendingFixes.push({ check, command: formatFixCommand(check) });
169
- continue;
170
- }
171
- log(`\u{1F527} Attempting auto-fix for ${check.displayName}...`, "warning");
172
- const fixResult = await applyFix(check, cwd);
173
- if (fixResult.success) {
174
- log(`\u2728 Auto-fix applied for ${check.displayName}`, "success");
175
- fixesApplied++;
176
- fixAppliedThisCycle = true;
177
- log(
178
- `
179
- \u{1F504} Fix applied - restarting all checks to verify...`,
180
- "warning"
181
- );
182
- break;
183
- } else {
184
- log(`\u26A0\uFE0F Auto-fix failed for ${check.displayName}`, "error");
185
- log(` Manual intervention required`, "error");
186
- if (result.error) {
187
- const errorPreview = result.error.slice(0, 500);
188
- log(`
189
- ${chalk.dim(errorPreview)}`, "error");
190
- if (result.error.length > 500) {
191
- log(
192
- chalk.dim(
193
- `... (${result.error.length - 500} more characters)`
194
- ),
195
- "error"
196
- );
197
- }
198
- }
199
- return {
200
- success: false,
201
- results,
202
- totalAttempts: attempt,
203
- fixesApplied
204
- };
205
- }
206
- } else {
207
- if (check.canAutoFix) {
208
- log(
209
- `\u26A0\uFE0F ${check.displayName} can be fixed with: ${formatFixCommand(check)}`,
210
- "warning"
211
- );
212
- } else {
213
- log(`\u26A0\uFE0F ${check.displayName} requires manual fix`, "error");
214
- }
215
- if (result.error) {
216
- const errorPreview = result.error.slice(0, 500);
217
- log(`
218
- ${chalk.dim(errorPreview)}`, "error");
219
- if (result.error.length > 500) {
220
- log(
221
- chalk.dim(`... (${result.error.length - 500} more characters)`),
222
- "error"
223
- );
224
- }
225
- }
226
- if (!dryRun) {
227
- return {
228
- success: false,
229
- results,
230
- totalAttempts: attempt,
231
- fixesApplied
232
- };
233
- }
234
- }
235
- }
236
- }
237
- if (dryRun && pendingFixes.length > 0) {
238
- log(`
239
- ${"\u2501".repeat(50)}`, "info");
240
- log(`\u{1F4CB} DRY-RUN SUMMARY`, "info");
241
- log(`${"\u2501".repeat(50)}`, "info");
242
- log(`
243
- The following fixes would be applied:`, "warning");
244
- for (const fix of pendingFixes) {
245
- log(` \u2022 ${fix.check.displayName}: ${fix.command}`, "info");
246
- }
247
- log(`
248
- Run without --dry-run to apply fixes.`, "info");
249
- return {
250
- success: false,
251
- results,
252
- totalAttempts: attempt,
253
- fixesApplied: 0,
254
- pendingFixes
255
- };
256
- }
257
- if (allPassed) {
258
- return {
259
- success: true,
260
- results,
261
- totalAttempts: attempt,
262
- fixesApplied
263
- };
264
- }
265
- if (!fixAppliedThisCycle) {
266
- return {
267
- success: false,
268
- results,
269
- totalAttempts: attempt,
270
- fixesApplied
271
- };
272
- }
273
- }
274
- log(`
275
- \u274C Maximum retries (${maxRetries}) exceeded`, "error");
276
- return {
277
- success: false,
278
- results: [],
279
- totalAttempts: attempt,
280
- fixesApplied
281
- };
282
- }
283
- async function hasUncommittedChanges(cwd) {
284
- try {
285
- const result = await execa("git", ["status", "--porcelain"], { cwd });
286
- return result.stdout.trim().length > 0;
287
- } catch {
288
- return false;
289
- }
290
- }
291
- async function stageAllChanges(cwd) {
292
- try {
293
- await execa("git", ["add", "-A"], { cwd });
294
- return true;
295
- } catch {
296
- return false;
297
- }
298
- }
299
-
300
- export {
301
- QUALITY_CHECKS,
302
- runCheck,
303
- applyFix,
304
- runAllChecks,
305
- hasUncommittedChanges,
306
- stageAllChanges
307
- };
308
- //# sourceMappingURL=chunk-AN6UOHBB.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/utils/check-runner.ts"],"sourcesContent":["/**\n * Check Runner - Orchestrates quality checks with fix-and-revalidate pattern\n *\n * Pattern: Run check → If fails, fix → Re-run ALL checks from start\n * This ensures fixes don't introduce new issues in earlier checks.\n */\n\nimport { execa, type ExecaError } from \"execa\";\nimport chalk from \"chalk\";\n\nexport interface CheckDefinition {\n name: string;\n displayName: string;\n command: string;\n args: string[];\n fixCommand?: string;\n fixArgs?: string[];\n canAutoFix: boolean;\n}\n\nexport interface CheckResult {\n check: CheckDefinition;\n success: boolean;\n output: string;\n error?: string;\n duration: number;\n}\n\nexport interface RunAllChecksResult {\n success: boolean;\n results: CheckResult[];\n totalAttempts: number;\n fixesApplied: number;\n pendingFixes?: Array<{ check: CheckDefinition; command: string }>;\n}\n\nexport type ProgressType = \"info\" | \"success\" | \"error\" | \"warning\";\n\nexport interface CheckRunnerOptions {\n maxRetries?: number;\n autoFix?: boolean;\n dryRun?: boolean;\n onProgress?: (message: string, type: ProgressType) => void;\n}\n\n/**\n * Standard quality checks in recommended order\n * Order: typecheck → lint → format → test → build\n * Type errors cascade, so we fix them first\n */\nexport const QUALITY_CHECKS: CheckDefinition[] = [\n {\n name: \"typecheck\",\n displayName: \"Type Check\",\n command: \"pnpm\",\n args: [\"typecheck\"],\n canAutoFix: false, // TypeScript errors need manual/LLM fix\n },\n {\n name: \"lint\",\n displayName: \"Lint\",\n command: \"pnpm\",\n args: [\"lint\"],\n fixCommand: \"pnpm\",\n fixArgs: [\"lint\", \"--fix\"],\n canAutoFix: true,\n },\n {\n name: \"format\",\n displayName: \"Format\",\n command: \"pnpm\",\n args: [\"format\", \"--check\"],\n fixCommand: \"pnpm\",\n fixArgs: [\"format\"],\n canAutoFix: true,\n },\n {\n name: \"test\",\n displayName: \"Tests\",\n command: \"pnpm\",\n args: [\"test\"],\n canAutoFix: false, // Tests need manual/LLM fix\n },\n {\n name: \"build\",\n displayName: \"Build\",\n command: \"pnpm\",\n args: [\"build\"],\n canAutoFix: false, // Build errors need manual/LLM fix\n },\n];\n\n/**\n * Run a single check\n */\nexport async function runCheck(\n check: CheckDefinition,\n cwd: string,\n): Promise<CheckResult> {\n const startTime = Date.now();\n\n try {\n const result = await execa(check.command, check.args, {\n cwd,\n reject: false,\n all: true,\n });\n\n const duration = Date.now() - startTime;\n\n if (result.exitCode === 0) {\n return {\n check,\n success: true,\n output: result.all || \"\",\n duration,\n };\n } else {\n return {\n check,\n success: false,\n output: result.all || \"\",\n error: result.stderr || result.all || \"Check failed\",\n duration,\n };\n }\n } catch (error) {\n const duration = Date.now() - startTime;\n const execaError = error as ExecaError;\n\n return {\n check,\n success: false,\n output: execaError.all?.toString() || execaError.message || \"\",\n error: execaError.message,\n duration,\n };\n }\n}\n\n/**\n * Apply fix for a check that supports auto-fix\n */\nexport async function applyFix(\n check: CheckDefinition,\n cwd: string,\n): Promise<{ success: boolean; output: string }> {\n if (!check.canAutoFix || !check.fixCommand) {\n return { success: false, output: \"Check does not support auto-fix\" };\n }\n\n try {\n const result = await execa(check.fixCommand, check.fixArgs || [], {\n cwd,\n reject: false,\n all: true,\n });\n\n return {\n success: result.exitCode === 0,\n output: result.all || \"\",\n };\n } catch (error) {\n const execaError = error as ExecaError;\n return {\n success: false,\n output: execaError.message,\n };\n }\n}\n\n/**\n * Format a fix command for display\n */\nfunction formatFixCommand(check: CheckDefinition): string {\n if (!check.fixCommand) return \"\";\n return `${check.fixCommand} ${(check.fixArgs || []).join(\" \")}`;\n}\n\n/**\n * Run all quality checks with fix-and-revalidate pattern\n *\n * When a check fails and can be auto-fixed:\n * 1. Apply the fix\n * 2. Re-run ALL checks from the beginning\n * 3. Repeat until all pass or max retries reached\n *\n * @param cwd - Working directory\n * @param options - Configuration options\n */\nexport async function runAllChecks(\n cwd: string,\n options: CheckRunnerOptions = {},\n): Promise<RunAllChecksResult> {\n const {\n maxRetries = 10,\n autoFix = true,\n dryRun = false,\n onProgress,\n } = options;\n\n const log = (message: string, type: ProgressType = \"info\") => {\n if (onProgress) {\n onProgress(message, type);\n } else {\n // Default console output with colors\n switch (type) {\n case \"success\":\n console.log(chalk.green(message));\n break;\n case \"error\":\n console.log(chalk.red(message));\n break;\n case \"warning\":\n console.log(chalk.yellow(message));\n break;\n default:\n console.log(message);\n }\n }\n };\n\n let attempt = 0;\n let fixesApplied = 0;\n const pendingFixes: Array<{ check: CheckDefinition; command: string }> = [];\n\n while (attempt < maxRetries) {\n attempt++;\n\n log(`\\n${\"━\".repeat(50)}`, \"info\");\n log(`🔄 Validation Cycle ${attempt}/${maxRetries}`, \"info\");\n log(`${\"━\".repeat(50)}\\n`, \"info\");\n\n const results: CheckResult[] = [];\n let allPassed = true;\n let fixAppliedThisCycle = false;\n\n // Run each check in order\n for (let i = 0; i < QUALITY_CHECKS.length; i++) {\n const check = QUALITY_CHECKS[i];\n const stepNum = i + 1;\n const totalSteps = QUALITY_CHECKS.length;\n\n log(`📋 Step ${stepNum}/${totalSteps}: ${check.displayName}...`, \"info\");\n\n const result = await runCheck(check, cwd);\n results.push(result);\n\n if (result.success) {\n log(`✅ ${check.displayName} passed (${result.duration}ms)`, \"success\");\n } else {\n allPassed = false;\n log(`❌ ${check.displayName} failed`, \"error\");\n\n // Try to auto-fix if possible\n if (autoFix && check.canAutoFix && check.fixCommand) {\n if (dryRun) {\n // In dry-run mode, just record what would be fixed\n log(\n `🔧 [DRY-RUN] Would run: ${formatFixCommand(check)}`,\n \"warning\",\n );\n pendingFixes.push({ check, command: formatFixCommand(check) });\n\n // Continue to next check to show all issues\n continue;\n }\n\n log(`🔧 Attempting auto-fix for ${check.displayName}...`, \"warning\");\n\n const fixResult = await applyFix(check, cwd);\n\n if (fixResult.success) {\n log(`✨ Auto-fix applied for ${check.displayName}`, \"success\");\n fixesApplied++;\n fixAppliedThisCycle = true;\n\n // IMPORTANT: Re-run ALL checks from the beginning\n log(\n `\\n🔄 Fix applied - restarting all checks to verify...`,\n \"warning\",\n );\n break; // Exit the for loop to restart from the beginning\n } else {\n log(`⚠️ Auto-fix failed for ${check.displayName}`, \"error\");\n log(` Manual intervention required`, \"error\");\n\n // Show error details\n if (result.error) {\n const errorPreview = result.error.slice(0, 500);\n log(`\\n${chalk.dim(errorPreview)}`, \"error\");\n if (result.error.length > 500) {\n log(\n chalk.dim(\n `... (${result.error.length - 500} more characters)`,\n ),\n \"error\",\n );\n }\n }\n\n return {\n success: false,\n results,\n totalAttempts: attempt,\n fixesApplied,\n };\n }\n } else {\n // Cannot auto-fix this check\n if (check.canAutoFix) {\n log(\n `⚠️ ${check.displayName} can be fixed with: ${formatFixCommand(check)}`,\n \"warning\",\n );\n } else {\n log(`⚠️ ${check.displayName} requires manual fix`, \"error\");\n }\n\n // Show error details\n if (result.error) {\n const errorPreview = result.error.slice(0, 500);\n log(`\\n${chalk.dim(errorPreview)}`, \"error\");\n if (result.error.length > 500) {\n log(\n chalk.dim(`... (${result.error.length - 500} more characters)`),\n \"error\",\n );\n }\n }\n\n if (!dryRun) {\n return {\n success: false,\n results,\n totalAttempts: attempt,\n fixesApplied,\n };\n }\n }\n }\n }\n\n // Handle dry-run completion\n if (dryRun && pendingFixes.length > 0) {\n log(`\\n${\"━\".repeat(50)}`, \"info\");\n log(`📋 DRY-RUN SUMMARY`, \"info\");\n log(`${\"━\".repeat(50)}`, \"info\");\n log(`\\nThe following fixes would be applied:`, \"warning\");\n for (const fix of pendingFixes) {\n log(` • ${fix.check.displayName}: ${fix.command}`, \"info\");\n }\n log(`\\nRun without --dry-run to apply fixes.`, \"info\");\n\n return {\n success: false,\n results,\n totalAttempts: attempt,\n fixesApplied: 0,\n pendingFixes,\n };\n }\n\n // If all checks passed, we're done!\n if (allPassed) {\n return {\n success: true,\n results,\n totalAttempts: attempt,\n fixesApplied,\n };\n }\n\n // If no fix was applied this cycle but we still failed, we're stuck\n if (!fixAppliedThisCycle) {\n return {\n success: false,\n results,\n totalAttempts: attempt,\n fixesApplied,\n };\n }\n\n // Otherwise, continue to next cycle (fix was applied, need to re-verify)\n }\n\n // Max retries exceeded\n log(`\\n❌ Maximum retries (${maxRetries}) exceeded`, \"error\");\n\n return {\n success: false,\n results: [],\n totalAttempts: attempt,\n fixesApplied,\n };\n}\n\n/**\n * Check if there are uncommitted changes in git\n */\nexport async function hasUncommittedChanges(cwd: string): Promise<boolean> {\n try {\n const result = await execa(\"git\", [\"status\", \"--porcelain\"], { cwd });\n return result.stdout.trim().length > 0;\n } catch {\n return false;\n }\n}\n\n/**\n * Stage all changes in git\n */\nexport async function stageAllChanges(cwd: string): Promise<boolean> {\n try {\n await execa(\"git\", [\"add\", \"-A\"], { cwd });\n return true;\n } catch {\n return false;\n }\n}\n"],"mappings":";AAOA,SAAS,aAA8B;AACvC,OAAO,WAAW;AA0CX,IAAM,iBAAoC;AAAA,EAC/C;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,IACb,SAAS;AAAA,IACT,MAAM,CAAC,WAAW;AAAA,IAClB,YAAY;AAAA;AAAA,EACd;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,IACb,SAAS;AAAA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