@harness-engineering/cli 2.3.0 → 2.4.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-compliance/SKILL.md +19 -0
- package/dist/agents/skills/codex/harness-compliance/SKILL.md +19 -0
- package/dist/agents/skills/cursor/harness-compliance/SKILL.md +19 -0
- package/dist/agents/skills/gemini-cli/harness-compliance/SKILL.md +19 -0
- package/dist/{agents-md-N7YBQPE3.js → agents-md-ROTDQOXM.js} +3 -3
- package/dist/{architecture-PP7WERSV.js → architecture-I2G7PNQB.js} +4 -4
- package/dist/{assess-project-WXFCJQTX.js → assess-project-LO6NCLE7.js} +1 -1
- package/dist/bin/harness-mcp.js +15 -15
- package/dist/bin/harness.js +25 -25
- package/dist/{check-phase-gate-R3KQFBAH.js → check-phase-gate-52SQFNJB.js} +4 -4
- package/dist/{chunk-5PPV4WYY.js → chunk-27EHWQPK.js} +5 -5
- package/dist/{chunk-7PGYJO3L.js → chunk-2L2A6W6I.js} +3 -3
- package/dist/{chunk-GTXUUGFG.js → chunk-4XB37LST.js} +9 -9
- package/dist/{chunk-5KTTKXQN.js → chunk-54JTO4NZ.js} +1 -1
- package/dist/{chunk-D2LZUJLP.js → chunk-5YOHXTK3.js} +2 -2
- package/dist/{chunk-YG4ZBGEH.js → chunk-7BNK4M23.js} +1 -1
- package/dist/{chunk-MKPRB4PL.js → chunk-DJRRTZGD.js} +1 -1
- package/dist/{chunk-DLBMYLYR.js → chunk-FJJYQWUP.js} +1 -1
- package/dist/{chunk-4DWOMGUM.js → chunk-GDJ2MRYH.js} +476 -85
- package/dist/{chunk-4NFV5UZO.js → chunk-GN2CSZC6.js} +3 -3
- package/dist/{chunk-L3CEN42B.js → chunk-JGPOQJ73.js} +1 -1
- package/dist/{chunk-PW3U4YJV.js → chunk-KPWUZSHL.js} +32 -4
- package/dist/{chunk-MT2MMBUA.js → chunk-MQRKPF46.js} +9 -9
- package/dist/{chunk-NP2ZI6E3.js → chunk-MSBVH6ER.js} +1 -1
- package/dist/{chunk-LM4F5KBK.js → chunk-NGCM4B4V.js} +5 -5
- package/dist/{chunk-6CHNY3NJ.js → chunk-OFMQEUYN.js} +1 -1
- package/dist/{chunk-3LPOTTPX.js → chunk-Q43LM7CO.js} +92 -92
- package/dist/{chunk-GUIX2TMZ.js → chunk-RYVL76ZF.js} +1 -1
- package/dist/{chunk-YEBUFRTT.js → chunk-RZASDABE.js} +2 -2
- package/dist/{chunk-35FI23SO.js → chunk-TCR5PKMU.js} +216 -119
- package/dist/{chunk-KTWKW6KJ.js → chunk-TIQU5VY7.js} +1 -1
- package/dist/{chunk-KUVPSUG4.js → chunk-TVJZX53C.js} +1 -1
- package/dist/{chunk-KWD6FF7M.js → chunk-U4XK4BB3.js} +8 -8
- package/dist/{chunk-EJPR5VCT.js → chunk-WY2J54IZ.js} +6 -6
- package/dist/{chunk-BMM3GXV6.js → chunk-XPRGWHBL.js} +80 -37
- package/dist/{ci-workflow-GFCXFJ4G.js → ci-workflow-MYBH64CR.js} +3 -3
- package/dist/{dist-D27LJR2T.js → dist-SQAOKWXM.js} +5 -3
- package/dist/{dist-I4LWG3IN.js → dist-ZJGFXGIB.js} +10 -2
- package/dist/{docs-UXKDKPJF.js → docs-7CW7WUFB.js} +4 -4
- package/dist/{engine-A63FRDLF.js → engine-Y75QZW6N.js} +3 -3
- package/dist/{entropy-IFIP4ZP4.js → entropy-P6QELTFA.js} +3 -3
- package/dist/{feedback-W36DSJQA.js → feedback-PJWCDRRZ.js} +1 -1
- package/dist/{generate-agent-definitions-F4YMKQLP.js → generate-agent-definitions-ONDIJHHK.js} +4 -4
- package/dist/{glob-helper-FZPPTGJN.js → glob-helper-JE3MO4UD.js} +1 -1
- package/dist/{graph-loader-5MKHAJJF.js → graph-loader-TJU4E7KL.js} +1 -1
- package/dist/index.d.ts +66 -0
- package/dist/index.js +25 -25
- package/dist/{loader-4UAOGUSS.js → loader-DQRNWKOZ.js} +3 -3
- package/dist/{mcp-YW7PLXVQ.js → mcp-UUNLS3MC.js} +15 -15
- package/dist/{performance-AZ5UYPOQ.js → performance-7X3EFAOD.js} +4 -4
- package/dist/{review-pipeline-OLQVGBWJ.js → review-pipeline-GAJ22PBC.js} +3 -3
- package/dist/{runtime-GG3U5HH5.js → runtime-6TK6U72R.js} +3 -3
- package/dist/{scan-BIJYHOE7.js → scan-SFX5U3TE.js} +1 -1
- package/dist/{security-MYTRFSR7.js → security-ZSU643D7.js} +1 -1
- package/dist/{validate-QI4V4JY6.js → validate-IDX6RI3U.js} +4 -4
- package/dist/{validate-cross-check-XRSSAXJP.js → validate-cross-check-5YEWZ3EW.js} +3 -3
- package/package.json +7 -7
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generateRuntime
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TVJZX53C.js";
|
|
4
4
|
import {
|
|
5
5
|
generateAgentsMd
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FJJYQWUP.js";
|
|
7
7
|
import {
|
|
8
8
|
generateCIWorkflow
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DJRRTZGD.js";
|
|
10
10
|
import {
|
|
11
11
|
TemplateEngine
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-54JTO4NZ.js";
|
|
13
13
|
import {
|
|
14
14
|
generate,
|
|
15
15
|
validate
|
|
@@ -28,22 +28,22 @@ import {
|
|
|
28
28
|
OutputMode,
|
|
29
29
|
createCheckPhaseGateCommand,
|
|
30
30
|
findFiles
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-5YOHXTK3.js";
|
|
32
32
|
import {
|
|
33
33
|
createGenerateAgentDefinitionsCommand,
|
|
34
34
|
generateAgentDefinitions
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-RYVL76ZF.js";
|
|
36
36
|
import {
|
|
37
37
|
toKebabCase
|
|
38
38
|
} from "./chunk-KET4QQZB.js";
|
|
39
39
|
import {
|
|
40
40
|
listPersonas,
|
|
41
41
|
loadPersona
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-JGPOQJ73.js";
|
|
43
43
|
import {
|
|
44
44
|
createScanCommand,
|
|
45
45
|
loadIngestOptions
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-7BNK4M23.js";
|
|
47
47
|
import {
|
|
48
48
|
appendFrameworkAgents,
|
|
49
49
|
captureHealthSnapshot,
|
|
@@ -57,17 +57,18 @@ import {
|
|
|
57
57
|
loadCachedSnapshot,
|
|
58
58
|
persistToolingConfig,
|
|
59
59
|
recommend
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-Q43LM7CO.js";
|
|
61
61
|
import {
|
|
62
62
|
loadGraphStore
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-TIQU5VY7.js";
|
|
64
64
|
import {
|
|
65
65
|
loadOrRebuildIndex
|
|
66
66
|
} from "./chunk-27AJKSQY.js";
|
|
67
67
|
import {
|
|
68
|
+
BranchingConfigSchema,
|
|
68
69
|
findConfigFile,
|
|
69
70
|
resolveConfig
|
|
70
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-KPWUZSHL.js";
|
|
71
72
|
import {
|
|
72
73
|
VALID_PLATFORMS
|
|
73
74
|
} from "./chunk-3ISINLYT.js";
|
|
@@ -130,7 +131,7 @@ import {
|
|
|
130
131
|
generateSuggestions,
|
|
131
132
|
getOrCreateInstallId,
|
|
132
133
|
gitScan,
|
|
133
|
-
init_dist,
|
|
134
|
+
init_dist as init_dist2,
|
|
134
135
|
isoWeek,
|
|
135
136
|
listStreams,
|
|
136
137
|
listTaintedSessions,
|
|
@@ -163,6 +164,7 @@ import {
|
|
|
163
164
|
setActiveStream,
|
|
164
165
|
validateAgentConfigs,
|
|
165
166
|
validateAgentsMap,
|
|
167
|
+
validateBranchName,
|
|
166
168
|
validateDependencies,
|
|
167
169
|
validateKnowledgeMap,
|
|
168
170
|
validatePulseConfig,
|
|
@@ -170,11 +172,15 @@ import {
|
|
|
170
172
|
validateSolutionsDir,
|
|
171
173
|
writeConfig,
|
|
172
174
|
writeLockfile
|
|
173
|
-
} from "./chunk-
|
|
175
|
+
} from "./chunk-GDJ2MRYH.js";
|
|
174
176
|
import {
|
|
175
177
|
Err,
|
|
176
178
|
Ok
|
|
177
179
|
} from "./chunk-RL4VMEXL.js";
|
|
180
|
+
import {
|
|
181
|
+
DEFAULT_SKIP_DIRS,
|
|
182
|
+
init_dist
|
|
183
|
+
} from "./chunk-XPRGWHBL.js";
|
|
178
184
|
import {
|
|
179
185
|
createCreateSkillCommand
|
|
180
186
|
} from "./chunk-ZP5E7YET.js";
|
|
@@ -195,10 +201,10 @@ import {
|
|
|
195
201
|
} from "./chunk-KFQGP6VL.js";
|
|
196
202
|
|
|
197
203
|
// src/index.ts
|
|
198
|
-
import { Command as
|
|
204
|
+
import { Command as Command94 } from "commander";
|
|
199
205
|
|
|
200
206
|
// src/commands/add.ts
|
|
201
|
-
|
|
207
|
+
init_dist2();
|
|
202
208
|
import { Command } from "commander";
|
|
203
209
|
import * as fs from "fs";
|
|
204
210
|
import * as path from "path";
|
|
@@ -384,7 +390,7 @@ function registerSkillsCommand(adoption) {
|
|
|
384
390
|
const globalOpts = cmd.optsWithGlobals();
|
|
385
391
|
const limit = Math.max(parseInt(opts.limit, 10) || 20, 1);
|
|
386
392
|
const cwd = process.cwd();
|
|
387
|
-
const { readAdoptionRecords, aggregateBySkill } = await import("./dist-
|
|
393
|
+
const { readAdoptionRecords, aggregateBySkill } = await import("./dist-ZJGFXGIB.js");
|
|
388
394
|
const records = readAdoptionRecords(cwd);
|
|
389
395
|
if (records.length === 0) {
|
|
390
396
|
if (globalOpts.json) {
|
|
@@ -420,7 +426,7 @@ function registerRecentCommand(adoption) {
|
|
|
420
426
|
const globalOpts = cmd.optsWithGlobals();
|
|
421
427
|
const limit = Math.max(parseInt(opts.limit, 10) || 20, 1);
|
|
422
428
|
const cwd = process.cwd();
|
|
423
|
-
const { readAdoptionRecords } = await import("./dist-
|
|
429
|
+
const { readAdoptionRecords } = await import("./dist-ZJGFXGIB.js");
|
|
424
430
|
const records = readAdoptionRecords(cwd);
|
|
425
431
|
if (records.length === 0) {
|
|
426
432
|
if (globalOpts.json) {
|
|
@@ -498,7 +504,7 @@ function registerSkillCommand(adoption) {
|
|
|
498
504
|
adoption.command("skill <name>").description("Show detail for a specific skill").action(async (name, _opts, cmd) => {
|
|
499
505
|
const globalOpts = cmd.optsWithGlobals();
|
|
500
506
|
const cwd = process.cwd();
|
|
501
|
-
const { readAdoptionRecords, aggregateBySkill } = await import("./dist-
|
|
507
|
+
const { readAdoptionRecords, aggregateBySkill } = await import("./dist-ZJGFXGIB.js");
|
|
502
508
|
const records = readAdoptionRecords(cwd);
|
|
503
509
|
const skillRecords = records.filter((r) => r.skill === name);
|
|
504
510
|
if (skillRecords.length === 0) {
|
|
@@ -529,8 +535,8 @@ function createAdoptionCommand() {
|
|
|
529
535
|
import { Command as Command5 } from "commander";
|
|
530
536
|
|
|
531
537
|
// src/commands/agent/run.ts
|
|
532
|
-
|
|
533
|
-
|
|
538
|
+
init_dist2();
|
|
539
|
+
init_dist2();
|
|
534
540
|
import { Command as Command3 } from "commander";
|
|
535
541
|
import * as path2 from "path";
|
|
536
542
|
import * as childProcess from "child_process";
|
|
@@ -652,7 +658,7 @@ function createRunCommand() {
|
|
|
652
658
|
}
|
|
653
659
|
|
|
654
660
|
// src/commands/agent/review.ts
|
|
655
|
-
|
|
661
|
+
init_dist2();
|
|
656
662
|
import { Command as Command4 } from "commander";
|
|
657
663
|
import { execSync } from "child_process";
|
|
658
664
|
async function runAgentReview(options) {
|
|
@@ -789,7 +795,7 @@ function createAgentCommand() {
|
|
|
789
795
|
}
|
|
790
796
|
|
|
791
797
|
// src/commands/audit-protected.ts
|
|
792
|
-
|
|
798
|
+
init_dist2();
|
|
793
799
|
import { Command as Command6 } from "commander";
|
|
794
800
|
import * as path3 from "path";
|
|
795
801
|
import * as fs2 from "fs";
|
|
@@ -897,7 +903,7 @@ function createAuditProtectedCommand() {
|
|
|
897
903
|
}
|
|
898
904
|
|
|
899
905
|
// src/commands/blueprint.ts
|
|
900
|
-
|
|
906
|
+
init_dist2();
|
|
901
907
|
import { Command as Command7 } from "commander";
|
|
902
908
|
import * as path4 from "path";
|
|
903
909
|
function createBlueprintCommand() {
|
|
@@ -922,7 +928,7 @@ function createBlueprintCommand() {
|
|
|
922
928
|
}
|
|
923
929
|
|
|
924
930
|
// src/commands/check-arch.ts
|
|
925
|
-
|
|
931
|
+
init_dist2();
|
|
926
932
|
import { Command as Command8 } from "commander";
|
|
927
933
|
import { execSync as execSync2 } from "child_process";
|
|
928
934
|
function getCommitHash(cwd) {
|
|
@@ -1082,8 +1088,8 @@ function createCheckArchCommand() {
|
|
|
1082
1088
|
}
|
|
1083
1089
|
|
|
1084
1090
|
// src/commands/check-deps.ts
|
|
1085
|
-
|
|
1086
|
-
|
|
1091
|
+
init_dist2();
|
|
1092
|
+
init_dist2();
|
|
1087
1093
|
import { Command as Command9 } from "commander";
|
|
1088
1094
|
import * as path5 from "path";
|
|
1089
1095
|
async function runCheckDeps(options) {
|
|
@@ -1183,8 +1189,8 @@ function createCheckDepsCommand() {
|
|
|
1183
1189
|
}
|
|
1184
1190
|
|
|
1185
1191
|
// src/commands/check-docs.ts
|
|
1186
|
-
|
|
1187
|
-
|
|
1192
|
+
init_dist2();
|
|
1193
|
+
init_dist2();
|
|
1188
1194
|
import { Command as Command10 } from "commander";
|
|
1189
1195
|
import * as path6 from "path";
|
|
1190
1196
|
async function runCheckDocs(options) {
|
|
@@ -1293,7 +1299,7 @@ function createCheckDocsCommand() {
|
|
|
1293
1299
|
}
|
|
1294
1300
|
|
|
1295
1301
|
// src/commands/check-perf.ts
|
|
1296
|
-
|
|
1302
|
+
init_dist2();
|
|
1297
1303
|
import { Command as Command11 } from "commander";
|
|
1298
1304
|
import * as path7 from "path";
|
|
1299
1305
|
async function runCheckPerf(cwd, options) {
|
|
@@ -1418,7 +1424,7 @@ function createCheckPerfCommand() {
|
|
|
1418
1424
|
}
|
|
1419
1425
|
|
|
1420
1426
|
// src/commands/check-security.ts
|
|
1421
|
-
|
|
1427
|
+
init_dist2();
|
|
1422
1428
|
import { Command as Command12 } from "commander";
|
|
1423
1429
|
import * as path8 from "path";
|
|
1424
1430
|
import { execSync as execSync3 } from "child_process";
|
|
@@ -1540,7 +1546,7 @@ function createCheckSecurityCommand() {
|
|
|
1540
1546
|
import { Command as Command16 } from "commander";
|
|
1541
1547
|
|
|
1542
1548
|
// src/commands/ci/check.ts
|
|
1543
|
-
|
|
1549
|
+
init_dist2();
|
|
1544
1550
|
import { Command as Command13 } from "commander";
|
|
1545
1551
|
var VALID_CHECKS = [
|
|
1546
1552
|
"validate",
|
|
@@ -1637,7 +1643,7 @@ function createCheckCommand() {
|
|
|
1637
1643
|
}
|
|
1638
1644
|
|
|
1639
1645
|
// src/commands/ci/init.ts
|
|
1640
|
-
|
|
1646
|
+
init_dist2();
|
|
1641
1647
|
import { Command as Command14 } from "commander";
|
|
1642
1648
|
import * as fs3 from "fs";
|
|
1643
1649
|
import * as path9 from "path";
|
|
@@ -1781,7 +1787,7 @@ function createInitCommand() {
|
|
|
1781
1787
|
}
|
|
1782
1788
|
|
|
1783
1789
|
// src/commands/ci/notify.ts
|
|
1784
|
-
|
|
1790
|
+
init_dist2();
|
|
1785
1791
|
import { Command as Command15 } from "commander";
|
|
1786
1792
|
import * as fs4 from "fs";
|
|
1787
1793
|
function loadReport(reportPath) {
|
|
@@ -1894,7 +1900,7 @@ function createCICommand() {
|
|
|
1894
1900
|
}
|
|
1895
1901
|
|
|
1896
1902
|
// src/commands/cleanup.ts
|
|
1897
|
-
|
|
1903
|
+
init_dist2();
|
|
1898
1904
|
import { Command as Command17 } from "commander";
|
|
1899
1905
|
import * as path10 from "path";
|
|
1900
1906
|
async function runCleanup(options) {
|
|
@@ -1916,7 +1922,7 @@ async function runCleanup(options) {
|
|
|
1916
1922
|
const entropyConfig = {
|
|
1917
1923
|
rootDir,
|
|
1918
1924
|
...config.entropy?.entryPoints && { entryPoints: config.entropy.entryPoints },
|
|
1919
|
-
docPaths: [docsDir],
|
|
1925
|
+
docPaths: [path10.join(docsDir, "**/*.md")],
|
|
1920
1926
|
analyze: {
|
|
1921
1927
|
drift: type === "all" || type === "drift",
|
|
1922
1928
|
deadCode: type === "all" || type === "dead-code",
|
|
@@ -2014,7 +2020,7 @@ function createCleanupCommand() {
|
|
|
2014
2020
|
}
|
|
2015
2021
|
|
|
2016
2022
|
// src/commands/cleanup-sessions.ts
|
|
2017
|
-
|
|
2023
|
+
init_dist2();
|
|
2018
2024
|
import { Command as Command18 } from "commander";
|
|
2019
2025
|
import * as fs5 from "fs";
|
|
2020
2026
|
import * as path11 from "path";
|
|
@@ -2123,9 +2129,9 @@ function createCleanupSessionsCommand() {
|
|
|
2123
2129
|
import { Command as Command20 } from "commander";
|
|
2124
2130
|
|
|
2125
2131
|
// src/commands/compound/scan-candidates.ts
|
|
2126
|
-
|
|
2132
|
+
init_dist2();
|
|
2127
2133
|
import { mkdirSync as mkdirSync3, writeFileSync as writeFileSync3 } from "fs";
|
|
2128
|
-
import { dirname as dirname2, join as
|
|
2134
|
+
import { dirname as dirname2, join as join7, resolve as resolve11 } from "path";
|
|
2129
2135
|
import { Command as Command19 } from "commander";
|
|
2130
2136
|
var HOTSPOT_THRESHOLD = 7;
|
|
2131
2137
|
var DEFAULT_LOOKBACK = "7d";
|
|
@@ -2152,7 +2158,7 @@ async function runCompoundScanCandidatesCommand(opts) {
|
|
|
2152
2158
|
isoWeek: week,
|
|
2153
2159
|
lookback
|
|
2154
2160
|
});
|
|
2155
|
-
const outputPath = opts.outputPath ??
|
|
2161
|
+
const outputPath = opts.outputPath ?? join7(cwd, "docs/solutions/.candidates", `${formatIsoWeek(week)}.md`);
|
|
2156
2162
|
mkdirSync3(dirname2(outputPath), { recursive: true });
|
|
2157
2163
|
writeFileSync3(outputPath, report);
|
|
2158
2164
|
const candidatesFound = undocumented.length + hotspots.length;
|
|
@@ -2216,7 +2222,7 @@ import { Command as Command21 } from "commander";
|
|
|
2216
2222
|
import { spawn } from "child_process";
|
|
2217
2223
|
import { existsSync as existsSync4 } from "fs";
|
|
2218
2224
|
import { createRequire } from "module";
|
|
2219
|
-
import { dirname as dirname3, join as
|
|
2225
|
+
import { dirname as dirname3, join as join8, resolve as resolve12 } from "path";
|
|
2220
2226
|
import { setTimeout } from "timers";
|
|
2221
2227
|
import { fileURLToPath } from "url";
|
|
2222
2228
|
var __filename = fileURLToPath(import.meta.url);
|
|
@@ -2232,20 +2238,20 @@ function resolveServerScript() {
|
|
|
2232
2238
|
try {
|
|
2233
2239
|
const pkgPath = require2.resolve("@harness-engineering/dashboard/package.json");
|
|
2234
2240
|
const pkgDir = dirname3(pkgPath);
|
|
2235
|
-
const built2 =
|
|
2241
|
+
const built2 = join8(pkgDir, "dist", "server", "serve.js");
|
|
2236
2242
|
if (existsSync4(built2)) return { script: built2, dev: false };
|
|
2237
|
-
const dev2 =
|
|
2243
|
+
const dev2 = join8(pkgDir, "src", "server", "serve.ts");
|
|
2238
2244
|
if (existsSync4(dev2)) return { script: dev2, dev: true };
|
|
2239
2245
|
} catch {
|
|
2240
2246
|
}
|
|
2241
2247
|
const built = [
|
|
2242
|
-
|
|
2243
|
-
|
|
2248
|
+
join8(__dirname, "..", "..", "..", "dashboard", "dist", "server", "serve.js"),
|
|
2249
|
+
join8(__dirname, "..", "..", "..", "..", "packages", "dashboard", "dist", "server", "serve.js")
|
|
2244
2250
|
].find((p) => existsSync4(p));
|
|
2245
2251
|
if (built) return { script: built, dev: false };
|
|
2246
2252
|
const dev = [
|
|
2247
|
-
|
|
2248
|
-
|
|
2253
|
+
join8(__dirname, "..", "..", "..", "dashboard", "src", "server", "serve.ts"),
|
|
2254
|
+
join8(__dirname, "..", "..", "..", "..", "packages", "dashboard", "src", "server", "serve.ts")
|
|
2249
2255
|
].find((p) => existsSync4(p));
|
|
2250
2256
|
return dev ? { script: dev, dev: true } : null;
|
|
2251
2257
|
}
|
|
@@ -2659,7 +2665,7 @@ function createDoctorCommand() {
|
|
|
2659
2665
|
}
|
|
2660
2666
|
|
|
2661
2667
|
// src/commands/fix-drift.ts
|
|
2662
|
-
|
|
2668
|
+
init_dist2();
|
|
2663
2669
|
import { Command as Command23 } from "commander";
|
|
2664
2670
|
import * as path14 from "path";
|
|
2665
2671
|
async function runFixDrift(options) {
|
|
@@ -2675,7 +2681,7 @@ async function runFixDrift(options) {
|
|
|
2675
2681
|
const entropyConfig = {
|
|
2676
2682
|
rootDir,
|
|
2677
2683
|
...config.entropy?.entryPoints && { entryPoints: config.entropy.entryPoints },
|
|
2678
|
-
docPaths: [docsDir],
|
|
2684
|
+
docPaths: [path14.join(docsDir, "**/*.md")],
|
|
2679
2685
|
analyze: {
|
|
2680
2686
|
drift: true,
|
|
2681
2687
|
deadCode: true,
|
|
@@ -2907,7 +2913,7 @@ async function readConnectorSyncStatus(graphDir) {
|
|
|
2907
2913
|
return result;
|
|
2908
2914
|
}
|
|
2909
2915
|
async function runGraphStatus(projectPath) {
|
|
2910
|
-
const { GraphStore, loadGraphMetadata } = await import("./dist-
|
|
2916
|
+
const { GraphStore, loadGraphMetadata } = await import("./dist-SQAOKWXM.js");
|
|
2911
2917
|
const graphDir = path15.join(projectPath, ".harness", "graph");
|
|
2912
2918
|
const metaResult = await loadGraphMetadata(graphDir);
|
|
2913
2919
|
if (metaResult.status === "not_found") {
|
|
@@ -2959,7 +2965,7 @@ async function runGraphStatus(projectPath) {
|
|
|
2959
2965
|
// src/commands/graph/export.ts
|
|
2960
2966
|
import * as path16 from "path";
|
|
2961
2967
|
async function runGraphExport(projectPath, format) {
|
|
2962
|
-
const { GraphStore } = await import("./dist-
|
|
2968
|
+
const { GraphStore } = await import("./dist-SQAOKWXM.js");
|
|
2963
2969
|
const graphDir = path16.join(projectPath, ".harness", "graph");
|
|
2964
2970
|
const store = new GraphStore();
|
|
2965
2971
|
const loaded = await store.load(graphDir);
|
|
@@ -2995,7 +3001,7 @@ import * as path19 from "path";
|
|
|
2995
3001
|
import { Command as Command25 } from "commander";
|
|
2996
3002
|
import * as path17 from "path";
|
|
2997
3003
|
async function runQuery(projectPath, rootNodeId, opts) {
|
|
2998
|
-
const { GraphStore, ContextQL } = await import("./dist-
|
|
3004
|
+
const { GraphStore, ContextQL } = await import("./dist-SQAOKWXM.js");
|
|
2999
3005
|
const store = new GraphStore();
|
|
3000
3006
|
const graphDir = path17.join(projectPath, ".harness", "graph");
|
|
3001
3007
|
const loaded = await store.load(graphDir);
|
|
@@ -3092,7 +3098,7 @@ async function runIngest(projectPath, source, opts) {
|
|
|
3092
3098
|
ConfluenceConnector,
|
|
3093
3099
|
FigmaConnector,
|
|
3094
3100
|
MiroConnector
|
|
3095
|
-
} = await import("./dist-
|
|
3101
|
+
} = await import("./dist-SQAOKWXM.js");
|
|
3096
3102
|
const graphDir = path18.join(projectPath, ".harness", "graph");
|
|
3097
3103
|
const store = new GraphStore();
|
|
3098
3104
|
await store.load(graphDir);
|
|
@@ -3106,7 +3112,7 @@ async function runIngest(projectPath, source, opts) {
|
|
|
3106
3112
|
path18.join(projectPath, "docs", "changes")
|
|
3107
3113
|
);
|
|
3108
3114
|
const gitResult = await new GitIngestor(store).ingest(projectPath);
|
|
3109
|
-
const { createExtractionRunner } = await import("./dist-
|
|
3115
|
+
const { createExtractionRunner } = await import("./dist-SQAOKWXM.js");
|
|
3110
3116
|
const extractedDir = path18.join(projectPath, ".harness", "knowledge", "extracted");
|
|
3111
3117
|
const signalsResult = await createExtractionRunner().run(projectPath, store, extractedDir);
|
|
3112
3118
|
const syncManager = new SyncManager(store, graphDir);
|
|
@@ -3152,7 +3158,7 @@ async function runIngest(projectPath, source, opts) {
|
|
|
3152
3158
|
);
|
|
3153
3159
|
break;
|
|
3154
3160
|
case "business-signals": {
|
|
3155
|
-
const { createExtractionRunner } = await import("./dist-
|
|
3161
|
+
const { createExtractionRunner } = await import("./dist-SQAOKWXM.js");
|
|
3156
3162
|
const extractedDir = path18.join(projectPath, ".harness", "knowledge", "extracted");
|
|
3157
3163
|
result = await createExtractionRunner().run(projectPath, store, extractedDir);
|
|
3158
3164
|
break;
|
|
@@ -3846,7 +3852,7 @@ function createImpactPreviewCommand() {
|
|
|
3846
3852
|
}
|
|
3847
3853
|
|
|
3848
3854
|
// src/commands/init.ts
|
|
3849
|
-
|
|
3855
|
+
init_dist2();
|
|
3850
3856
|
import { Command as Command35 } from "commander";
|
|
3851
3857
|
import chalk3 from "chalk";
|
|
3852
3858
|
import * as fs15 from "fs";
|
|
@@ -4660,6 +4666,7 @@ function getBundledSkillNames(bundledSkillsDir) {
|
|
|
4660
4666
|
}
|
|
4661
4667
|
|
|
4662
4668
|
// src/commands/install.ts
|
|
4669
|
+
init_dist();
|
|
4663
4670
|
function validateSkillYaml(parsed) {
|
|
4664
4671
|
const result = SkillMetadataSchema.safeParse(parsed);
|
|
4665
4672
|
if (!result.success) {
|
|
@@ -4726,7 +4733,7 @@ function discoverSkillDirs(rootDir) {
|
|
|
4726
4733
|
const entries = fs20.readdirSync(dir, { withFileTypes: true });
|
|
4727
4734
|
for (const entry of entries) {
|
|
4728
4735
|
if (!entry.isDirectory()) continue;
|
|
4729
|
-
if (entry.name.startsWith(".") || entry.name
|
|
4736
|
+
if (entry.name.startsWith(".") || DEFAULT_SKIP_DIRS.has(entry.name)) continue;
|
|
4730
4737
|
scan(path32.join(dir, entry.name), depth + 1);
|
|
4731
4738
|
}
|
|
4732
4739
|
}
|
|
@@ -4945,7 +4952,7 @@ function createInstallCommand() {
|
|
|
4945
4952
|
}
|
|
4946
4953
|
|
|
4947
4954
|
// src/commands/install-constraints.ts
|
|
4948
|
-
|
|
4955
|
+
init_dist2();
|
|
4949
4956
|
import * as fs21 from "fs/promises";
|
|
4950
4957
|
import * as path33 from "path";
|
|
4951
4958
|
import { Command as Command37 } from "commander";
|
|
@@ -5211,7 +5218,7 @@ function createInstallConstraintsCommand() {
|
|
|
5211
5218
|
import { Command as Command42 } from "commander";
|
|
5212
5219
|
|
|
5213
5220
|
// src/commands/integrations/add.ts
|
|
5214
|
-
|
|
5221
|
+
init_dist2();
|
|
5215
5222
|
import { Command as Command38 } from "commander";
|
|
5216
5223
|
import * as fs22 from "fs";
|
|
5217
5224
|
import * as path34 from "path";
|
|
@@ -5351,7 +5358,7 @@ function createListIntegrationsCommand() {
|
|
|
5351
5358
|
}
|
|
5352
5359
|
|
|
5353
5360
|
// src/commands/integrations/remove.ts
|
|
5354
|
-
|
|
5361
|
+
init_dist2();
|
|
5355
5362
|
import { Command as Command40 } from "commander";
|
|
5356
5363
|
import * as fs23 from "fs";
|
|
5357
5364
|
import * as path36 from "path";
|
|
@@ -5400,7 +5407,7 @@ function createRemoveIntegrationCommand() {
|
|
|
5400
5407
|
}
|
|
5401
5408
|
|
|
5402
5409
|
// src/commands/integrations/dismiss.ts
|
|
5403
|
-
|
|
5410
|
+
init_dist2();
|
|
5404
5411
|
import { Command as Command41 } from "commander";
|
|
5405
5412
|
import * as path37 from "path";
|
|
5406
5413
|
function dismissIntegration(cwd, name) {
|
|
@@ -5469,7 +5476,7 @@ function createKnowledgePipelineCommand() {
|
|
|
5469
5476
|
const graphDir = path38.join(projectDir, ".harness", "graph");
|
|
5470
5477
|
const fs44 = await import("fs/promises");
|
|
5471
5478
|
await fs44.mkdir(graphDir, { recursive: true });
|
|
5472
|
-
const { GraphStore, KnowledgePipelineRunner } = await import("./dist-
|
|
5479
|
+
const { GraphStore, KnowledgePipelineRunner } = await import("./dist-SQAOKWXM.js");
|
|
5473
5480
|
const store = new GraphStore();
|
|
5474
5481
|
try {
|
|
5475
5482
|
await store.load(graphDir);
|
|
@@ -5629,7 +5636,7 @@ function createKnowledgePipelineCommand() {
|
|
|
5629
5636
|
import { Command as Command45 } from "commander";
|
|
5630
5637
|
|
|
5631
5638
|
// src/commands/learnings/prune.ts
|
|
5632
|
-
|
|
5639
|
+
init_dist2();
|
|
5633
5640
|
import { Command as Command44 } from "commander";
|
|
5634
5641
|
import * as path39 from "path";
|
|
5635
5642
|
async function handlePrune(opts) {
|
|
@@ -5811,7 +5818,7 @@ function createMcpCommand() {
|
|
|
5811
5818
|
parseBudget
|
|
5812
5819
|
).action(async (opts) => {
|
|
5813
5820
|
const [{ startServer: startServer2, getToolDefinitions: getToolDefinitions2 }, { selectTier }] = await Promise.all([
|
|
5814
|
-
import("./mcp-
|
|
5821
|
+
import("./mcp-UUNLS3MC.js"),
|
|
5815
5822
|
import("./tool-tiers-7QGZ3FKY.js")
|
|
5816
5823
|
]);
|
|
5817
5824
|
if (opts.tools && opts.tools.length > 0) {
|
|
@@ -5832,6 +5839,7 @@ function createMcpCommand() {
|
|
|
5832
5839
|
}
|
|
5833
5840
|
|
|
5834
5841
|
// src/commands/migrate.ts
|
|
5842
|
+
init_dist2();
|
|
5835
5843
|
init_dist();
|
|
5836
5844
|
import { Command as Command50 } from "commander";
|
|
5837
5845
|
import * as fs24 from "fs";
|
|
@@ -5866,7 +5874,7 @@ function walk(dir, predicate) {
|
|
|
5866
5874
|
if (!fs24.existsSync(dir)) return [];
|
|
5867
5875
|
const out = [];
|
|
5868
5876
|
for (const entry of fs24.readdirSync(dir, { withFileTypes: true })) {
|
|
5869
|
-
if (
|
|
5877
|
+
if (DEFAULT_SKIP_DIRS.has(entry.name)) continue;
|
|
5870
5878
|
const full = path40.join(dir, entry.name);
|
|
5871
5879
|
if (entry.isDirectory()) out.push(...walk(full, predicate));
|
|
5872
5880
|
else if (predicate(full)) out.push(full);
|
|
@@ -6299,14 +6307,14 @@ function createOrchestratorCommand() {
|
|
|
6299
6307
|
}
|
|
6300
6308
|
|
|
6301
6309
|
// src/commands/perf.ts
|
|
6302
|
-
|
|
6310
|
+
init_dist2();
|
|
6303
6311
|
import { Command as Command52 } from "commander";
|
|
6304
6312
|
import * as path42 from "path";
|
|
6305
6313
|
function registerBenchCommand(perf) {
|
|
6306
6314
|
perf.command("bench [glob]").description("Run benchmarks via vitest bench").action(async (glob2, _opts, cmd) => {
|
|
6307
6315
|
const globalOpts = cmd.optsWithGlobals();
|
|
6308
6316
|
const cwd = process.cwd();
|
|
6309
|
-
const { BenchmarkRunner } = await import("./dist-
|
|
6317
|
+
const { BenchmarkRunner } = await import("./dist-ZJGFXGIB.js");
|
|
6310
6318
|
const runner = new BenchmarkRunner();
|
|
6311
6319
|
const benchFiles = runner.discover(cwd, glob2);
|
|
6312
6320
|
if (benchFiles.length === 0) {
|
|
@@ -6370,7 +6378,7 @@ async function runBaselinesShow(globalOpts) {
|
|
|
6370
6378
|
}
|
|
6371
6379
|
async function runBaselinesUpdate(globalOpts) {
|
|
6372
6380
|
const cwd = process.cwd();
|
|
6373
|
-
const { BenchmarkRunner } = await import("./dist-
|
|
6381
|
+
const { BenchmarkRunner } = await import("./dist-ZJGFXGIB.js");
|
|
6374
6382
|
const runner = new BenchmarkRunner();
|
|
6375
6383
|
const manager = new BaselineManager(cwd);
|
|
6376
6384
|
logger.info("Running benchmarks to update baselines...");
|
|
@@ -6401,8 +6409,8 @@ function registerBaselinesCommands(perf) {
|
|
|
6401
6409
|
}
|
|
6402
6410
|
async function getCommitHash2(cwd) {
|
|
6403
6411
|
try {
|
|
6404
|
-
const { execSync:
|
|
6405
|
-
return
|
|
6412
|
+
const { execSync: execSync7 } = await import("child_process");
|
|
6413
|
+
return execSync7("git rev-parse --short HEAD", { cwd, encoding: "utf-8" }).trim();
|
|
6406
6414
|
} catch {
|
|
6407
6415
|
return "unknown";
|
|
6408
6416
|
}
|
|
@@ -6411,7 +6419,7 @@ function registerReportCommand(perf) {
|
|
|
6411
6419
|
perf.command("report").description("Full performance report with metrics, trends, and hotspots").action(async (_opts, cmd) => {
|
|
6412
6420
|
const globalOpts = cmd.optsWithGlobals();
|
|
6413
6421
|
const cwd = process.cwd();
|
|
6414
|
-
const { EntropyAnalyzer: EntropyAnalyzer2 } = await import("./dist-
|
|
6422
|
+
const { EntropyAnalyzer: EntropyAnalyzer2 } = await import("./dist-ZJGFXGIB.js");
|
|
6415
6423
|
const analyzer = new EntropyAnalyzer2({
|
|
6416
6424
|
rootDir: path42.resolve(cwd),
|
|
6417
6425
|
analyze: { complexity: true, coupling: true }
|
|
@@ -6582,7 +6590,7 @@ function createPersonaCommand() {
|
|
|
6582
6590
|
}
|
|
6583
6591
|
|
|
6584
6592
|
// src/commands/predict.ts
|
|
6585
|
-
|
|
6593
|
+
init_dist2();
|
|
6586
6594
|
import { Command as Command56 } from "commander";
|
|
6587
6595
|
import chalk8 from "chalk";
|
|
6588
6596
|
var CATEGORY_ORDER = [
|
|
@@ -6715,7 +6723,7 @@ function createPredictCommand() {
|
|
|
6715
6723
|
import * as fs26 from "fs";
|
|
6716
6724
|
import * as path44 from "path";
|
|
6717
6725
|
import { Command as Command57 } from "commander";
|
|
6718
|
-
|
|
6726
|
+
init_dist2();
|
|
6719
6727
|
import {
|
|
6720
6728
|
renderAnalysisComment,
|
|
6721
6729
|
loadPublishedIndex,
|
|
@@ -6776,7 +6784,7 @@ async function buildNameToExternalIdMap(projectPath) {
|
|
|
6776
6784
|
logger.error("No docs/roadmap.md found. Cannot map issue hashes to external IDs.");
|
|
6777
6785
|
return null;
|
|
6778
6786
|
}
|
|
6779
|
-
const { parseRoadmap: parseRoadmap2 } = (
|
|
6787
|
+
const { parseRoadmap: parseRoadmap2 } = (init_dist2(), __toCommonJS(dist_exports));
|
|
6780
6788
|
const roadmapParsed = parseRoadmap2(fs26.readFileSync(roadmapFile, "utf-8"));
|
|
6781
6789
|
if (!roadmapParsed.ok) {
|
|
6782
6790
|
logger.error("Failed to parse docs/roadmap.md");
|
|
@@ -6827,7 +6835,7 @@ async function runPublishAnalyses(opts) {
|
|
|
6827
6835
|
const nameToExternalId = await buildNameToExternalIdMap(projectPath);
|
|
6828
6836
|
if (!nameToExternalId) return process.exit(1);
|
|
6829
6837
|
const { AnalysisArchive } = await import("@harness-engineering/orchestrator");
|
|
6830
|
-
const { GitHubIssuesSyncAdapter: GitHubIssuesSyncAdapter2 } = await import("./dist-
|
|
6838
|
+
const { GitHubIssuesSyncAdapter: GitHubIssuesSyncAdapter2 } = await import("./dist-ZJGFXGIB.js");
|
|
6831
6839
|
const archive = new AnalysisArchive(path44.join(projectPath, ".harness", "analyses"));
|
|
6832
6840
|
const analyses = await archive.list();
|
|
6833
6841
|
if (analyses.length === 0) {
|
|
@@ -6869,9 +6877,9 @@ function createPublishAnalysesCommand() {
|
|
|
6869
6877
|
import { Command as Command59 } from "commander";
|
|
6870
6878
|
|
|
6871
6879
|
// src/commands/pulse/run.ts
|
|
6872
|
-
|
|
6880
|
+
init_dist2();
|
|
6873
6881
|
import { readFileSync as readFileSync15, mkdirSync as mkdirSync13, writeFileSync as writeFileSync14 } from "fs";
|
|
6874
|
-
import { dirname as dirname17, join as
|
|
6882
|
+
import { dirname as dirname17, join as join35, resolve as resolve28 } from "path";
|
|
6875
6883
|
import { Command as Command58 } from "commander";
|
|
6876
6884
|
async function runPulseRunCommand(opts) {
|
|
6877
6885
|
const startedAt = Date.now();
|
|
@@ -6903,7 +6911,7 @@ async function runPulseRunCommand(opts) {
|
|
|
6903
6911
|
const report = assembleReport(result, productName, lookback);
|
|
6904
6912
|
const now = /* @__PURE__ */ new Date();
|
|
6905
6913
|
const ts = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, "0")}-${String(now.getDate()).padStart(2, "0")}_${String(now.getHours()).padStart(2, "0")}-${String(now.getMinutes()).padStart(2, "0")}`;
|
|
6906
|
-
const filePath =
|
|
6914
|
+
const filePath = join35(opts.outputDir, `${ts}.md`);
|
|
6907
6915
|
mkdirSync13(dirname17(filePath), { recursive: true });
|
|
6908
6916
|
writeFileSync14(filePath, report);
|
|
6909
6917
|
const headlines = extractHeadlines(report);
|
|
@@ -7070,7 +7078,7 @@ function createRecommendCommand() {
|
|
|
7070
7078
|
import { Command as Command62 } from "commander";
|
|
7071
7079
|
|
|
7072
7080
|
// src/commands/roadmap/migrate.ts
|
|
7073
|
-
|
|
7081
|
+
init_dist2();
|
|
7074
7082
|
import { Command as Command61 } from "commander";
|
|
7075
7083
|
import * as fs28 from "fs";
|
|
7076
7084
|
import * as path46 from "path";
|
|
@@ -7382,10 +7390,10 @@ function createRoadmapCommand() {
|
|
|
7382
7390
|
}
|
|
7383
7391
|
|
|
7384
7392
|
// src/commands/scan-config.ts
|
|
7385
|
-
|
|
7393
|
+
init_dist2();
|
|
7386
7394
|
import { Command as Command63 } from "commander";
|
|
7387
7395
|
import { existsSync as existsSync25, readFileSync as readFileSync18, writeFileSync as writeFileSync17 } from "fs";
|
|
7388
|
-
import { join as
|
|
7396
|
+
import { join as join38, relative as relative3 } from "path";
|
|
7389
7397
|
var CONFIG_FILES = ["CLAUDE.md", "AGENTS.md", ".gemini/settings.json", "skill.yaml"];
|
|
7390
7398
|
function stripHighSeverityPatterns(content, injectionFindings) {
|
|
7391
7399
|
const highLines = /* @__PURE__ */ new Set();
|
|
@@ -7442,7 +7450,7 @@ async function runScanConfig(targetDir, options) {
|
|
|
7442
7450
|
const scanner = new SecurityScanner(parseSecurityConfig({}));
|
|
7443
7451
|
const results = [];
|
|
7444
7452
|
for (const configFile of CONFIG_FILES) {
|
|
7445
|
-
const result = scanSingleFile(
|
|
7453
|
+
const result = scanSingleFile(join38(targetDir, configFile), targetDir, scanner, options);
|
|
7446
7454
|
if (result) results.push(result);
|
|
7447
7455
|
}
|
|
7448
7456
|
return { exitCode: computeScanExitCode(results), results };
|
|
@@ -7795,7 +7803,7 @@ async function detectLegacyLayout(cwd) {
|
|
|
7795
7803
|
}
|
|
7796
7804
|
async function runInitialGraphScan(cwd) {
|
|
7797
7805
|
try {
|
|
7798
|
-
const { runScan: runScan2 } = await import("./scan-
|
|
7806
|
+
const { runScan: runScan2 } = await import("./scan-SFX5U3TE.js");
|
|
7799
7807
|
const result = await runScan2(cwd);
|
|
7800
7808
|
return {
|
|
7801
7809
|
status: "pass",
|
|
@@ -7856,7 +7864,7 @@ function createSetupCommand() {
|
|
|
7856
7864
|
}
|
|
7857
7865
|
|
|
7858
7866
|
// src/commands/share.ts
|
|
7859
|
-
|
|
7867
|
+
init_dist2();
|
|
7860
7868
|
import { Command as Command65 } from "commander";
|
|
7861
7869
|
import * as fs32 from "fs";
|
|
7862
7870
|
import * as path50 from "path";
|
|
@@ -8816,7 +8824,7 @@ function createSkillCommand() {
|
|
|
8816
8824
|
}
|
|
8817
8825
|
|
|
8818
8826
|
// src/commands/snapshot.ts
|
|
8819
|
-
|
|
8827
|
+
init_dist2();
|
|
8820
8828
|
import { Command as Command74 } from "commander";
|
|
8821
8829
|
import { execSync as execSync5 } from "child_process";
|
|
8822
8830
|
import chalk13 from "chalk";
|
|
@@ -9010,7 +9018,7 @@ function createSnapshotCommand() {
|
|
|
9010
9018
|
import { Command as Command79 } from "commander";
|
|
9011
9019
|
|
|
9012
9020
|
// src/commands/state/show.ts
|
|
9013
|
-
|
|
9021
|
+
init_dist2();
|
|
9014
9022
|
import { Command as Command75 } from "commander";
|
|
9015
9023
|
import * as path58 from "path";
|
|
9016
9024
|
function printStateText(state, stream) {
|
|
@@ -9053,7 +9061,7 @@ function createShowCommand() {
|
|
|
9053
9061
|
}
|
|
9054
9062
|
|
|
9055
9063
|
// src/commands/state/reset.ts
|
|
9056
|
-
|
|
9064
|
+
init_dist2();
|
|
9057
9065
|
import { Command as Command76 } from "commander";
|
|
9058
9066
|
import * as fs40 from "fs";
|
|
9059
9067
|
import * as path59 from "path";
|
|
@@ -9102,7 +9110,7 @@ function createResetCommand() {
|
|
|
9102
9110
|
}
|
|
9103
9111
|
|
|
9104
9112
|
// src/commands/state/learn.ts
|
|
9105
|
-
|
|
9113
|
+
init_dist2();
|
|
9106
9114
|
import { Command as Command77 } from "commander";
|
|
9107
9115
|
import * as path60 from "path";
|
|
9108
9116
|
function createLearnCommand() {
|
|
@@ -9120,7 +9128,7 @@ function createLearnCommand() {
|
|
|
9120
9128
|
}
|
|
9121
9129
|
|
|
9122
9130
|
// src/commands/state/streams.ts
|
|
9123
|
-
|
|
9131
|
+
init_dist2();
|
|
9124
9132
|
import { Command as Command78 } from "commander";
|
|
9125
9133
|
import * as path61 from "path";
|
|
9126
9134
|
async function runListStreams(opts, globalOpts) {
|
|
@@ -9194,7 +9202,7 @@ function createStateCommand() {
|
|
|
9194
9202
|
import * as fs41 from "fs";
|
|
9195
9203
|
import * as path62 from "path";
|
|
9196
9204
|
import { Command as Command80 } from "commander";
|
|
9197
|
-
|
|
9205
|
+
init_dist2();
|
|
9198
9206
|
function isValidRecord(record) {
|
|
9199
9207
|
return typeof record.issueId === "string" && !!record.issueId && typeof record.identifier === "string" && !!record.identifier && typeof record.analyzedAt === "string" && !/[/\\]/.test(record.issueId);
|
|
9200
9208
|
}
|
|
@@ -9267,7 +9275,7 @@ async function loadRoadmapFeatures(projectPath) {
|
|
|
9267
9275
|
logger.error("No docs/roadmap.md found. Cannot discover features with externalIds.");
|
|
9268
9276
|
return null;
|
|
9269
9277
|
}
|
|
9270
|
-
const { parseRoadmap: parseRoadmap2 } = (
|
|
9278
|
+
const { parseRoadmap: parseRoadmap2 } = (init_dist2(), __toCommonJS(dist_exports));
|
|
9271
9279
|
const roadmapParsed = parseRoadmap2(fs41.readFileSync(roadmapFile, "utf-8"));
|
|
9272
9280
|
if (!roadmapParsed.ok) {
|
|
9273
9281
|
logger.error("Failed to parse docs/roadmap.md");
|
|
@@ -9319,7 +9327,7 @@ async function runSyncAnalyses(opts) {
|
|
|
9319
9327
|
return;
|
|
9320
9328
|
}
|
|
9321
9329
|
const { AnalysisArchive, loadPublishedIndex: loadPublishedIndex2, savePublishedIndex: savePublishedIndex2 } = await import("@harness-engineering/orchestrator");
|
|
9322
|
-
const { GitHubIssuesSyncAdapter: GitHubIssuesSyncAdapter2 } = await import("./dist-
|
|
9330
|
+
const { GitHubIssuesSyncAdapter: GitHubIssuesSyncAdapter2 } = await import("./dist-ZJGFXGIB.js");
|
|
9323
9331
|
const adapter = new GitHubIssuesSyncAdapter2({ token, config: trackerConfig });
|
|
9324
9332
|
const archive = new AnalysisArchive(path62.join(projectPath, ".harness", "analyses"));
|
|
9325
9333
|
const publishedIndex = loadPublishedIndex2(projectPath);
|
|
@@ -9394,7 +9402,7 @@ function createSyncMainCommand() {
|
|
|
9394
9402
|
}
|
|
9395
9403
|
|
|
9396
9404
|
// src/commands/taint.ts
|
|
9397
|
-
|
|
9405
|
+
init_dist2();
|
|
9398
9406
|
import { Command as Command82 } from "commander";
|
|
9399
9407
|
function getProjectRoot() {
|
|
9400
9408
|
return process.cwd();
|
|
@@ -9477,7 +9485,7 @@ function createTaintCommand() {
|
|
|
9477
9485
|
import { Command as Command86 } from "commander";
|
|
9478
9486
|
|
|
9479
9487
|
// src/commands/telemetry/identify.ts
|
|
9480
|
-
|
|
9488
|
+
init_dist2();
|
|
9481
9489
|
import { Command as Command83 } from "commander";
|
|
9482
9490
|
import * as fs42 from "fs";
|
|
9483
9491
|
import * as path64 from "path";
|
|
@@ -9526,7 +9534,7 @@ function createIdentifyCommand() {
|
|
|
9526
9534
|
}
|
|
9527
9535
|
|
|
9528
9536
|
// src/commands/telemetry/status.ts
|
|
9529
|
-
|
|
9537
|
+
init_dist2();
|
|
9530
9538
|
import { Command as Command84 } from "commander";
|
|
9531
9539
|
function gatherEnvOverrides() {
|
|
9532
9540
|
const overrides = {};
|
|
@@ -9601,12 +9609,12 @@ function createStatusCommand() {
|
|
|
9601
9609
|
}
|
|
9602
9610
|
|
|
9603
9611
|
// src/commands/telemetry/test.ts
|
|
9604
|
-
|
|
9612
|
+
init_dist2();
|
|
9605
9613
|
import { Command as Command85 } from "commander";
|
|
9606
9614
|
|
|
9607
9615
|
// src/bin/command-telemetry.ts
|
|
9608
9616
|
import { existsSync as existsSync39, readFileSync as readFileSync29, mkdirSync as mkdirSync19, appendFileSync, writeFileSync as writeFileSync23 } from "fs";
|
|
9609
|
-
import { join as
|
|
9617
|
+
import { join as join53, parse as parsePath, resolve as resolve37 } from "path";
|
|
9610
9618
|
import { spawn as spawn2 } from "child_process";
|
|
9611
9619
|
var POSTHOG_API_KEY = "phc_wNTdCMcfJXZPgdNeDociZW6vwoGGo4nb7vqEfWThFfsG";
|
|
9612
9620
|
var EXCLUDED_COMMANDS = /* @__PURE__ */ new Set(["help", "completion"]);
|
|
@@ -9614,7 +9622,7 @@ function findProjectRoot(cwd) {
|
|
|
9614
9622
|
let dir = resolve37(cwd);
|
|
9615
9623
|
const { root } = parsePath(dir);
|
|
9616
9624
|
while (dir !== root) {
|
|
9617
|
-
if (existsSync39(
|
|
9625
|
+
if (existsSync39(join53(dir, "harness.config.json"))) return dir;
|
|
9618
9626
|
dir = resolve37(dir, "..");
|
|
9619
9627
|
}
|
|
9620
9628
|
return cwd;
|
|
@@ -9652,7 +9660,7 @@ function resolveCommandName(cmd) {
|
|
|
9652
9660
|
}
|
|
9653
9661
|
function writeCommandRecordSync(cwd, command, duration, outcome) {
|
|
9654
9662
|
try {
|
|
9655
|
-
const metricsDir =
|
|
9663
|
+
const metricsDir = join53(cwd, ".harness", "metrics");
|
|
9656
9664
|
mkdirSync19(metricsDir, { recursive: true });
|
|
9657
9665
|
const record = {
|
|
9658
9666
|
skill: command,
|
|
@@ -9662,13 +9670,13 @@ function writeCommandRecordSync(cwd, command, duration, outcome) {
|
|
|
9662
9670
|
outcome,
|
|
9663
9671
|
phasesReached: []
|
|
9664
9672
|
};
|
|
9665
|
-
const adoptionFile =
|
|
9673
|
+
const adoptionFile = join53(metricsDir, "adoption.jsonl");
|
|
9666
9674
|
appendFileSync(adoptionFile, JSON.stringify(record) + "\n");
|
|
9667
9675
|
} catch {
|
|
9668
9676
|
}
|
|
9669
9677
|
}
|
|
9670
9678
|
function isTelemetryDisabledByConfig(cwd) {
|
|
9671
|
-
const configPath =
|
|
9679
|
+
const configPath = join53(cwd, "harness.config.json");
|
|
9672
9680
|
if (!existsSync39(configPath)) return false;
|
|
9673
9681
|
try {
|
|
9674
9682
|
const config = JSON.parse(readFileSync29(configPath, "utf-8"));
|
|
@@ -9683,10 +9691,10 @@ function isTelemetryOptedOut(cwd) {
|
|
|
9683
9691
|
}
|
|
9684
9692
|
function flushTelemetryBackground(cwd) {
|
|
9685
9693
|
try {
|
|
9686
|
-
const adoptionFile =
|
|
9694
|
+
const adoptionFile = join53(cwd, ".harness", "metrics", "adoption.jsonl");
|
|
9687
9695
|
if (!existsSync39(adoptionFile)) return;
|
|
9688
9696
|
if (isTelemetryOptedOut(cwd)) return;
|
|
9689
|
-
const reporterPath =
|
|
9697
|
+
const reporterPath = join53(cwd, ".harness", "hooks", "telemetry-reporter.js");
|
|
9690
9698
|
if (!existsSync39(reporterPath)) return;
|
|
9691
9699
|
const child = spawn2(process.execPath, [reporterPath], {
|
|
9692
9700
|
cwd,
|
|
@@ -9890,7 +9898,7 @@ async function runTraceability(options) {
|
|
|
9890
9898
|
const projectPath = process.cwd();
|
|
9891
9899
|
const store = await loadGraphStore(projectPath);
|
|
9892
9900
|
if (!store) handleNoStore(mode);
|
|
9893
|
-
const graphModule = await import("./dist-
|
|
9901
|
+
const graphModule = await import("./dist-SQAOKWXM.js");
|
|
9894
9902
|
const filterOptions = buildFilterOptions(options);
|
|
9895
9903
|
const results = graphModule.queryTraceability(store, filterOptions);
|
|
9896
9904
|
if (results.length === 0) handleEmptyResults(mode);
|
|
@@ -9975,7 +9983,7 @@ function createUninstallCommand() {
|
|
|
9975
9983
|
}
|
|
9976
9984
|
|
|
9977
9985
|
// src/commands/uninstall-constraints.ts
|
|
9978
|
-
|
|
9986
|
+
init_dist2();
|
|
9979
9987
|
import * as fs43 from "fs/promises";
|
|
9980
9988
|
import * as path66 from "path";
|
|
9981
9989
|
import { Command as Command89 } from "commander";
|
|
@@ -10077,10 +10085,11 @@ function createUninstallConstraintsCommand() {
|
|
|
10077
10085
|
import { Command as Command90 } from "commander";
|
|
10078
10086
|
import { execFile, execFileSync as execFileSync7 } from "child_process";
|
|
10079
10087
|
import { realpathSync, existsSync as existsSync40, readFileSync as readFileSync30 } from "fs";
|
|
10080
|
-
import { join as
|
|
10088
|
+
import { join as join56 } from "path";
|
|
10081
10089
|
import { promisify } from "util";
|
|
10082
10090
|
import readline4 from "readline";
|
|
10083
10091
|
import chalk15 from "chalk";
|
|
10092
|
+
var CLI_PACKAGE = "@harness-engineering/cli";
|
|
10084
10093
|
function detectPackageManager() {
|
|
10085
10094
|
try {
|
|
10086
10095
|
const argv1 = process.argv[1];
|
|
@@ -10123,6 +10132,9 @@ function getInstalledVersions(pm, packages) {
|
|
|
10123
10132
|
versions[pkg] = null;
|
|
10124
10133
|
}
|
|
10125
10134
|
}
|
|
10135
|
+
if (packages.includes(CLI_PACKAGE) && versions[CLI_PACKAGE] === null) {
|
|
10136
|
+
versions[CLI_PACKAGE] = CLI_VERSION;
|
|
10137
|
+
}
|
|
10126
10138
|
return versions;
|
|
10127
10139
|
}
|
|
10128
10140
|
function getInstalledPackages(pm) {
|
|
@@ -10133,9 +10145,13 @@ function getInstalledPackages(pm) {
|
|
|
10133
10145
|
});
|
|
10134
10146
|
const data = JSON.parse(output);
|
|
10135
10147
|
const deps = data.dependencies ?? {};
|
|
10136
|
-
|
|
10148
|
+
const found = Object.keys(deps).filter((name) => name.startsWith("@harness-engineering/"));
|
|
10149
|
+
if (!found.includes(CLI_PACKAGE)) {
|
|
10150
|
+
found.unshift(CLI_PACKAGE);
|
|
10151
|
+
}
|
|
10152
|
+
return found;
|
|
10137
10153
|
} catch {
|
|
10138
|
-
return [
|
|
10154
|
+
return [CLI_PACKAGE, "@harness-engineering/core"];
|
|
10139
10155
|
}
|
|
10140
10156
|
}
|
|
10141
10157
|
function prompt3(question) {
|
|
@@ -10161,10 +10177,10 @@ async function ensureTelemetryIfNeeded() {
|
|
|
10161
10177
|
}
|
|
10162
10178
|
function refreshHooks() {
|
|
10163
10179
|
const cwd = process.cwd();
|
|
10164
|
-
const configPath =
|
|
10180
|
+
const configPath = join56(cwd, "harness.config.json");
|
|
10165
10181
|
if (!existsSync40(configPath)) return;
|
|
10166
10182
|
let profile = "standard";
|
|
10167
|
-
const profilePath =
|
|
10183
|
+
const profilePath = join56(cwd, ".harness", "hooks", "profile.json");
|
|
10168
10184
|
try {
|
|
10169
10185
|
const data = JSON.parse(readFileSync30(profilePath, "utf-8"));
|
|
10170
10186
|
if (data.profile && ["minimal", "standard", "strict"].includes(data.profile)) {
|
|
@@ -10304,7 +10320,7 @@ function createUpdateCommand() {
|
|
|
10304
10320
|
// src/commands/usage.ts
|
|
10305
10321
|
import { Command as Command91 } from "commander";
|
|
10306
10322
|
async function loadAndPriceRecords(cwd, includeClaudeSessions = false) {
|
|
10307
|
-
const { readCostRecords, loadPricingData, calculateCost, parseCCRecords } = await import("./dist-
|
|
10323
|
+
const { readCostRecords, loadPricingData, calculateCost, parseCCRecords } = await import("./dist-ZJGFXGIB.js");
|
|
10308
10324
|
const records = readCostRecords(cwd);
|
|
10309
10325
|
if (includeClaudeSessions) {
|
|
10310
10326
|
const ccRecords = parseCCRecords();
|
|
@@ -10397,7 +10413,7 @@ function registerDailyCommand(usage) {
|
|
|
10397
10413
|
else logger.info("No usage data found. Run some harness sessions first.");
|
|
10398
10414
|
return;
|
|
10399
10415
|
}
|
|
10400
|
-
const { aggregateByDay } = await import("./dist-
|
|
10416
|
+
const { aggregateByDay } = await import("./dist-ZJGFXGIB.js");
|
|
10401
10417
|
const limited = aggregateByDay(records).slice(0, days);
|
|
10402
10418
|
if (globalOpts.json) {
|
|
10403
10419
|
console.log(
|
|
@@ -10426,7 +10442,7 @@ function registerSessionsCommand(usage) {
|
|
|
10426
10442
|
}
|
|
10427
10443
|
return;
|
|
10428
10444
|
}
|
|
10429
|
-
const { aggregateBySession } = await import("./dist-
|
|
10445
|
+
const { aggregateBySession } = await import("./dist-ZJGFXGIB.js");
|
|
10430
10446
|
const sessionData = aggregateBySession(records);
|
|
10431
10447
|
const limited = sessionData.slice(0, limit);
|
|
10432
10448
|
if (globalOpts.json) {
|
|
@@ -10506,7 +10522,7 @@ function registerSessionCommand(usage) {
|
|
|
10506
10522
|
cwd,
|
|
10507
10523
|
globalOpts.includeClaudeSessions
|
|
10508
10524
|
);
|
|
10509
|
-
const { aggregateBySession } = await import("./dist-
|
|
10525
|
+
const { aggregateBySession } = await import("./dist-ZJGFXGIB.js");
|
|
10510
10526
|
const sessionData = aggregateBySession(records);
|
|
10511
10527
|
const match = sessionData.find((s) => s.sessionId === id);
|
|
10512
10528
|
if (!match) {
|
|
@@ -10541,7 +10557,7 @@ function registerLatestCommand(usage) {
|
|
|
10541
10557
|
}
|
|
10542
10558
|
return;
|
|
10543
10559
|
}
|
|
10544
|
-
const { aggregateBySession } = await import("./dist-
|
|
10560
|
+
const { aggregateBySession } = await import("./dist-ZJGFXGIB.js");
|
|
10545
10561
|
const sessionData = aggregateBySession(records);
|
|
10546
10562
|
const latest = sessionData[0];
|
|
10547
10563
|
if (!latest) {
|
|
@@ -10580,8 +10596,8 @@ function createUsageCommand() {
|
|
|
10580
10596
|
}
|
|
10581
10597
|
|
|
10582
10598
|
// src/commands/validate.ts
|
|
10583
|
-
|
|
10584
|
-
|
|
10599
|
+
init_dist2();
|
|
10600
|
+
init_dist2();
|
|
10585
10601
|
import { Command as Command92 } from "commander";
|
|
10586
10602
|
import * as path67 from "path";
|
|
10587
10603
|
async function runValidate(options) {
|
|
@@ -10710,7 +10726,7 @@ function resolveValidateMode(globalOpts) {
|
|
|
10710
10726
|
return OutputMode.TEXT;
|
|
10711
10727
|
}
|
|
10712
10728
|
async function printCrossCheckWarnings(mode) {
|
|
10713
|
-
const { runCrossCheck: runCrossCheck2 } = await import("./validate-cross-check-
|
|
10729
|
+
const { runCrossCheck: runCrossCheck2 } = await import("./validate-cross-check-5YEWZ3EW.js");
|
|
10714
10730
|
const cwd = process.cwd();
|
|
10715
10731
|
const crossResult = await runCrossCheck2({
|
|
10716
10732
|
specsDir: path67.join(cwd, "docs", "specs"),
|
|
@@ -10773,6 +10789,86 @@ Agent configs checked via ${engineLabel}${note}`);
|
|
|
10773
10789
|
}
|
|
10774
10790
|
}
|
|
10775
10791
|
|
|
10792
|
+
// src/commands/verify.ts
|
|
10793
|
+
init_dist2();
|
|
10794
|
+
import { Command as Command93 } from "commander";
|
|
10795
|
+
import { execSync as execSync6 } from "child_process";
|
|
10796
|
+
function loadBranchingConfig(configPath) {
|
|
10797
|
+
const shouldLoad = configPath !== void 0 || findConfigFile().ok;
|
|
10798
|
+
if (!shouldLoad) {
|
|
10799
|
+
return BranchingConfigSchema.parse({});
|
|
10800
|
+
}
|
|
10801
|
+
const result = resolveConfig(configPath);
|
|
10802
|
+
if (!result.ok) {
|
|
10803
|
+
logger.error(result.error.message);
|
|
10804
|
+
process.exit(result.error.exitCode);
|
|
10805
|
+
}
|
|
10806
|
+
const cfg = result.value.compliance?.branching;
|
|
10807
|
+
return cfg ?? BranchingConfigSchema.parse({});
|
|
10808
|
+
}
|
|
10809
|
+
function resolveBranchName(explicit) {
|
|
10810
|
+
if (explicit && explicit.length > 0) return explicit;
|
|
10811
|
+
const envBranch = process.env.HARNESS_BRANCH || process.env.GITHUB_HEAD_REF || process.env.CI_COMMIT_REF_NAME || process.env.BUILDKITE_BRANCH;
|
|
10812
|
+
if (envBranch && envBranch.length > 0) return envBranch;
|
|
10813
|
+
try {
|
|
10814
|
+
const out = execSync6("git rev-parse --abbrev-ref HEAD", {
|
|
10815
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
10816
|
+
}).toString().trim();
|
|
10817
|
+
if (out && out !== "HEAD") return out;
|
|
10818
|
+
} catch {
|
|
10819
|
+
return null;
|
|
10820
|
+
}
|
|
10821
|
+
return null;
|
|
10822
|
+
}
|
|
10823
|
+
async function runVerify(options) {
|
|
10824
|
+
const branchingConfig = loadBranchingConfig(options.configPath);
|
|
10825
|
+
const branchName = resolveBranchName(options.branch);
|
|
10826
|
+
if (!branchName) {
|
|
10827
|
+
const msg = "Could not determine the current branch name. Pass --branch <name>, set HARNESS_BRANCH/GITHUB_HEAD_REF, or run inside a git checkout.";
|
|
10828
|
+
if (options.json) {
|
|
10829
|
+
console.log(JSON.stringify({ valid: false, branchName: "", message: msg }));
|
|
10830
|
+
} else {
|
|
10831
|
+
logger.error(msg);
|
|
10832
|
+
}
|
|
10833
|
+
process.exit(ExitCode.ERROR);
|
|
10834
|
+
}
|
|
10835
|
+
const result = validateBranchName(branchName, branchingConfig);
|
|
10836
|
+
if (options.json) {
|
|
10837
|
+
const payload = {
|
|
10838
|
+
valid: result.valid,
|
|
10839
|
+
branchName: result.branchName,
|
|
10840
|
+
...result.message !== void 0 && { message: result.message },
|
|
10841
|
+
...result.suggestion !== void 0 && { suggestion: result.suggestion }
|
|
10842
|
+
};
|
|
10843
|
+
console.log(JSON.stringify(payload));
|
|
10844
|
+
process.exit(result.valid ? ExitCode.SUCCESS : ExitCode.VALIDATION_FAILED);
|
|
10845
|
+
}
|
|
10846
|
+
if (result.valid) {
|
|
10847
|
+
logger.success(`Branch name "${branchName}" is compliant.`);
|
|
10848
|
+
process.exit(ExitCode.SUCCESS);
|
|
10849
|
+
}
|
|
10850
|
+
logger.error(result.message || `Branch name "${branchName}" is not compliant.`);
|
|
10851
|
+
if (result.suggestion) {
|
|
10852
|
+
logger.info(`Suggestion: ${result.suggestion}`);
|
|
10853
|
+
}
|
|
10854
|
+
process.exit(ExitCode.VALIDATION_FAILED);
|
|
10855
|
+
}
|
|
10856
|
+
function createVerifyCommand() {
|
|
10857
|
+
return new Command93("verify").description(
|
|
10858
|
+
"Verify project conventions (currently: branch naming). Works with or without a harness.config.json."
|
|
10859
|
+
).option(
|
|
10860
|
+
"--branch <name>",
|
|
10861
|
+
"Branch name to verify (defaults to HARNESS_BRANCH/GITHUB_HEAD_REF/current branch)"
|
|
10862
|
+
).option("--json", "Emit machine-readable JSON output").action(async (opts, cmd) => {
|
|
10863
|
+
const globalOpts = cmd.optsWithGlobals();
|
|
10864
|
+
await runVerify({
|
|
10865
|
+
...typeof globalOpts.config === "string" && { configPath: globalOpts.config },
|
|
10866
|
+
...typeof opts.branch === "string" && { branch: opts.branch },
|
|
10867
|
+
json: opts.json === true || globalOpts.json === true
|
|
10868
|
+
});
|
|
10869
|
+
});
|
|
10870
|
+
}
|
|
10871
|
+
|
|
10776
10872
|
// src/commands/_registry.ts
|
|
10777
10873
|
var commandCreators = [
|
|
10778
10874
|
createAddCommand,
|
|
@@ -10837,12 +10933,13 @@ var commandCreators = [
|
|
|
10837
10933
|
createUninstallConstraintsCommand,
|
|
10838
10934
|
createUpdateCommand,
|
|
10839
10935
|
createUsageCommand,
|
|
10840
|
-
createValidateCommand3
|
|
10936
|
+
createValidateCommand3,
|
|
10937
|
+
createVerifyCommand
|
|
10841
10938
|
];
|
|
10842
10939
|
|
|
10843
10940
|
// src/index.ts
|
|
10844
10941
|
function createProgram() {
|
|
10845
|
-
const program = new
|
|
10942
|
+
const program = new Command94();
|
|
10846
10943
|
program.name("harness").description("CLI for Harness Engineering toolkit").version(CLI_VERSION).option("-c, --config <path>", "Path to config file").option("--json", "Output as JSON").option("--verbose", "Verbose output").option("--quiet", "Minimal output");
|
|
10847
10944
|
for (const creator of commandCreators) {
|
|
10848
10945
|
program.addCommand(creator());
|