@harness-engineering/cli 3.0.1 → 3.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/dist/agents/skills/claude-code/harness-execution/SKILL.md +35 -0
- package/dist/agents/skills/claude-code/harness-roadmap-pilot/SKILL.md +33 -44
- package/dist/agents/skills/codex/harness-execution/SKILL.md +35 -0
- package/dist/agents/skills/codex/harness-roadmap-pilot/SKILL.md +33 -44
- package/dist/agents/skills/cursor/harness-execution/SKILL.md +35 -0
- package/dist/agents/skills/cursor/harness-roadmap-pilot/SKILL.md +33 -44
- package/dist/agents/skills/gemini-cli/harness-execution/SKILL.md +35 -0
- package/dist/agents/skills/gemini-cli/harness-roadmap-pilot/SKILL.md +33 -44
- package/dist/{agents-md-XOJE5ETA.js → agents-md-YYCLGMBF.js} +2 -2
- package/dist/{architecture-JEZPJ725.js → architecture-5KPP4ID4.js} +3 -3
- package/dist/{assess-project-RHXOQNMM.js → assess-project-B6ENHUAU.js} +1 -1
- package/dist/bin/harness-mcp.js +13 -13
- package/dist/bin/harness.js +22 -22
- package/dist/{check-phase-gate-GNDOMS35.js → check-phase-gate-REG3HWYC.js} +3 -3
- package/dist/{chunk-N24HCQA4.js → chunk-A65QO5KN.js} +132 -46
- package/dist/{chunk-UX3PQKVZ.js → chunk-BXKNWSG4.js} +1 -1
- package/dist/{chunk-XX4OLNWQ.js → chunk-C2ZGWMTN.js} +2 -2
- package/dist/{chunk-HEIMJJI4.js → chunk-DNX35Q5K.js} +2 -2
- package/dist/{chunk-BYVT5LVO.js → chunk-ERZCC5VH.js} +3 -3
- package/dist/{chunk-XFU6SB2Q.js → chunk-FL5SLUKZ.js} +62 -27
- package/dist/{chunk-NWLGL3IR.js → chunk-FUH4J43G.js} +1 -1
- package/dist/{chunk-MGUPSE6D.js → chunk-HIPBU2Q4.js} +5 -5
- package/dist/{chunk-3ISHDWO7.js → chunk-IF3JK3G5.js} +1 -1
- package/dist/{chunk-KAJOS3BA.js → chunk-LMZ2JTNP.js} +2 -2
- package/dist/{chunk-527G27VI.js → chunk-OQFEFVIN.js} +2 -2
- package/dist/{chunk-Z4AWEIBY.js → chunk-PZX2Y3RV.js} +3 -3
- package/dist/{chunk-ONCPJGHY.js → chunk-RGQXHCCH.js} +6 -6
- package/dist/{chunk-QBC7DI4Q.js → chunk-TCVQVHEF.js} +1 -1
- package/dist/{chunk-PC2R5RUJ.js → chunk-TE5YHHHZ.js} +1 -1
- package/dist/{chunk-HWTUUQOW.js → chunk-UBTMPO5H.js} +3 -3
- package/dist/{chunk-GSP2XIVS.js → chunk-XEOSSKIB.js} +1 -1
- package/dist/{chunk-DE5U6KOL.js → chunk-XZ2Q4UTW.js} +1 -1
- package/dist/{chunk-YQSYCBAH.js → chunk-YF3AY6KS.js} +6 -6
- package/dist/{chunk-GGKRA7A7.js → chunk-YQAFKOOL.js} +1 -1
- package/dist/{chunk-WWEVS7RO.js → chunk-ZOUJP3EY.js} +106 -80
- package/dist/{chunk-6WQCLCBO.js → chunk-ZRKFDE6M.js} +1 -1
- package/dist/{ci-workflow-ORZ4F45F.js → ci-workflow-JEYYCBOC.js} +2 -2
- package/dist/{dist-LHINSVK4.js → dist-3HW4LCHE.js} +15 -1
- package/dist/{docs-AU3DXFFO.js → docs-YRMW7UED.js} +3 -3
- package/dist/{engine-6GPWOYQH.js → engine-E7H5U3AC.js} +2 -2
- package/dist/{entropy-VLKDRMRT.js → entropy-3JBKCGJJ.js} +2 -2
- package/dist/{feedback-YXYY44ZC.js → feedback-U6VJ6AUJ.js} +1 -1
- package/dist/{generate-agent-definitions-XIHQPKG3.js → generate-agent-definitions-S2FRZF4Y.js} +3 -3
- package/dist/hooks/format-check.js +202 -0
- package/dist/hooks/quality-warner.js +32 -0
- package/dist/hooks/strict-quality-gate.js +48 -0
- package/dist/index.js +22 -22
- package/dist/{loader-YAN56MT3.js → loader-RGQJYERV.js} +2 -2
- package/dist/{mcp-RK3SFVYB.js → mcp-NDTFZXWF.js} +13 -13
- package/dist/{performance-64DPTLLQ.js → performance-FPWKC4CN.js} +3 -3
- package/dist/{review-pipeline-NENG6LW7.js → review-pipeline-WUHG7PHO.js} +2 -2
- package/dist/{runtime-FFIIRT2T.js → runtime-Q3ORD7LW.js} +2 -2
- package/dist/{security-3PIBN35B.js → security-JDHTRBGC.js} +1 -1
- package/dist/{validate-7IAF2ES3.js → validate-G3LKBOYA.js} +3 -3
- package/dist/{validate-cross-check-QPSAOZKD.js → validate-cross-check-4ITA72DF.js} +2 -2
- package/package.json +4 -4
- package/dist/hooks/quality-gate.js +0 -131
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
handleValidateProject,
|
|
3
3
|
validateToolDefinition
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-UBTMPO5H.js";
|
|
5
|
+
import "./chunk-XZ2Q4UTW.js";
|
|
6
6
|
import "./chunk-W6Y7ZW3Y.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-A65QO5KN.js";
|
|
8
8
|
import "./chunk-N55WOGN3.js";
|
|
9
9
|
import "./chunk-BDGTZRZ6.js";
|
|
10
10
|
import "./chunk-PP6ZRL5T.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@harness-engineering/cli",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "CLI for Harness Engineering toolkit",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
"web-tree-sitter": "^0.24.7",
|
|
40
40
|
"yaml": "^2.8.3",
|
|
41
41
|
"zod": "^3.25.76",
|
|
42
|
-
"@harness-engineering/core": "0.
|
|
43
|
-
"@harness-engineering/dashboard": "0.10.
|
|
42
|
+
"@harness-engineering/core": "0.31.0",
|
|
43
|
+
"@harness-engineering/dashboard": "0.10.1",
|
|
44
44
|
"@harness-engineering/graph": "0.11.1",
|
|
45
45
|
"@harness-engineering/linter-gen": "0.1.7",
|
|
46
|
-
"@harness-engineering/orchestrator": "0.8.
|
|
46
|
+
"@harness-engineering/orchestrator": "0.8.4",
|
|
47
47
|
"@harness-engineering/types": "0.16.1"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// quality-gate.js — PostToolUse:Edit/Write hook
|
|
3
|
-
// Runs project formatter/linter after edits and warns on violations.
|
|
4
|
-
// Never blocks (always exits 0). Warnings go to stderr.
|
|
5
|
-
// Exit codes: 0 = allow (always)
|
|
6
|
-
|
|
7
|
-
import { readFileSync, accessSync } from 'node:fs';
|
|
8
|
-
import { join } from 'node:path';
|
|
9
|
-
import { execFileSync } from 'node:child_process';
|
|
10
|
-
import process from 'node:process';
|
|
11
|
-
|
|
12
|
-
// Detection order: first match wins
|
|
13
|
-
const DETECTORS = [
|
|
14
|
-
{
|
|
15
|
-
configs: ['biome.json', 'biome.jsonc'],
|
|
16
|
-
cmd: 'npx',
|
|
17
|
-
args: ['biome', 'check'],
|
|
18
|
-
name: 'Biome',
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
configs: [
|
|
22
|
-
'.prettierrc',
|
|
23
|
-
'.prettierrc.json',
|
|
24
|
-
'.prettierrc.yml',
|
|
25
|
-
'.prettierrc.yaml',
|
|
26
|
-
'.prettierrc.js',
|
|
27
|
-
'.prettierrc.cjs',
|
|
28
|
-
'.prettierrc.mjs',
|
|
29
|
-
'prettier.config.js',
|
|
30
|
-
'prettier.config.cjs',
|
|
31
|
-
'prettier.config.mjs',
|
|
32
|
-
],
|
|
33
|
-
cmd: 'npx',
|
|
34
|
-
args: ['prettier', '--check'],
|
|
35
|
-
name: 'Prettier',
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
configs: ['.ruff.toml', 'ruff.toml'],
|
|
39
|
-
cmd: 'ruff',
|
|
40
|
-
args: ['check'],
|
|
41
|
-
name: 'Ruff',
|
|
42
|
-
},
|
|
43
|
-
];
|
|
44
|
-
|
|
45
|
-
function detectFormatter(cwd) {
|
|
46
|
-
for (const detector of DETECTORS) {
|
|
47
|
-
for (const config of detector.configs) {
|
|
48
|
-
try {
|
|
49
|
-
accessSync(join(cwd, config));
|
|
50
|
-
return detector;
|
|
51
|
-
} catch {
|
|
52
|
-
// Config not found, try next
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
return null;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function main() {
|
|
60
|
-
let raw = '';
|
|
61
|
-
try {
|
|
62
|
-
raw = readFileSync(0, 'utf-8');
|
|
63
|
-
} catch {
|
|
64
|
-
process.exit(0);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
if (!raw.trim()) {
|
|
68
|
-
process.exit(0);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
let input;
|
|
72
|
-
try {
|
|
73
|
-
input = JSON.parse(raw);
|
|
74
|
-
} catch {
|
|
75
|
-
process.exit(0);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
try {
|
|
79
|
-
const filePath = input?.tool_input?.file_path ?? '';
|
|
80
|
-
const cwd = process.cwd();
|
|
81
|
-
|
|
82
|
-
// Special case: .go files use gofmt
|
|
83
|
-
if (typeof filePath === 'string' && filePath.endsWith('.go')) {
|
|
84
|
-
try {
|
|
85
|
-
const result = execFileSync('gofmt', ['-l', filePath], {
|
|
86
|
-
encoding: 'utf-8',
|
|
87
|
-
cwd,
|
|
88
|
-
timeout: 10000,
|
|
89
|
-
});
|
|
90
|
-
if (result.trim()) {
|
|
91
|
-
process.stderr.write(
|
|
92
|
-
`[quality-gate] gofmt found formatting issues in: ${result.trim()}\n`
|
|
93
|
-
);
|
|
94
|
-
}
|
|
95
|
-
} catch {
|
|
96
|
-
// gofmt not available or failed — warn and continue
|
|
97
|
-
process.stderr.write('[quality-gate] gofmt check failed (tool may not be installed)\n');
|
|
98
|
-
}
|
|
99
|
-
process.exit(0);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
const detector = detectFormatter(cwd);
|
|
103
|
-
if (!detector) {
|
|
104
|
-
// No formatter detected — nothing to check
|
|
105
|
-
process.exit(0);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
try {
|
|
109
|
-
execFileSync(detector.cmd, detector.args, {
|
|
110
|
-
encoding: 'utf-8',
|
|
111
|
-
cwd,
|
|
112
|
-
timeout: 30000,
|
|
113
|
-
stdio: ['pipe', 'pipe', 'pipe'],
|
|
114
|
-
});
|
|
115
|
-
process.stderr.write(`[quality-gate] ${detector.name} check passed\n`);
|
|
116
|
-
} catch (err) {
|
|
117
|
-
// Formatter found violations or failed to run — warn only
|
|
118
|
-
const output = err.stdout || err.stderr || '';
|
|
119
|
-
process.stderr.write(
|
|
120
|
-
`[quality-gate] ${detector.name} check reported issues:\n${output.slice(0, 500)}\n`
|
|
121
|
-
);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
process.exit(0);
|
|
125
|
-
} catch {
|
|
126
|
-
// Unexpected error — fail open
|
|
127
|
-
process.exit(0);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
main();
|