@harness-engineering/cli 1.25.5 → 1.25.7

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.
Files changed (54) hide show
  1. package/dist/{agents-md-COWXFHR5.js → agents-md-QPO3H5HX.js} +3 -3
  2. package/dist/{architecture-EYPG4ZMC.js → architecture-IJLXRHZA.js} +4 -4
  3. package/dist/{assess-project-JQPEVJIA.js → assess-project-QU6XIVJK.js} +1 -1
  4. package/dist/bin/harness-mcp.js +16 -15
  5. package/dist/bin/harness.js +26 -25
  6. package/dist/business-knowledge-6RHYJOB3.js +7 -0
  7. package/dist/{check-phase-gate-AJRMDGYW.js → check-phase-gate-TNY64AOS.js} +4 -4
  8. package/dist/{chunk-HWLHJSJQ.js → chunk-2DF6OZLG.js} +2 -2
  9. package/dist/{chunk-2OIPQMU5.js → chunk-AS5DQT4S.js} +9 -9
  10. package/dist/{chunk-YFIALHGI.js → chunk-D3XL2FLX.js} +5 -5
  11. package/dist/{chunk-4NK7Z3BP.js → chunk-E5Z6NTTQ.js} +1 -1
  12. package/dist/{chunk-KWQTMJ3B.js → chunk-FRDS4XGD.js} +1 -1
  13. package/dist/{chunk-KXUCIAM4.js → chunk-G5SNXUIK.js} +1 -1
  14. package/dist/{chunk-2TFT7XRX.js → chunk-GVNT2YC7.js} +9 -9
  15. package/dist/{chunk-UI6NWJJK.js → chunk-IQO7IINR.js} +1 -1
  16. package/dist/{chunk-ZYYVDA5K.js → chunk-IT2KORSK.js} +1 -1
  17. package/dist/{chunk-2X42NMPD.js → chunk-JJQ3TW2E.js} +227 -109
  18. package/dist/{chunk-BOQRTARD.js → chunk-JPZY7ZQX.js} +1 -1
  19. package/dist/{chunk-24ZGGCIW.js → chunk-K35D7HF3.js} +1 -1
  20. package/dist/{chunk-KDHZAL4B.js → chunk-K533WNZG.js} +38 -2
  21. package/dist/{chunk-WN6YIQ66.js → chunk-KVJZQ2MV.js} +1 -1
  22. package/dist/{chunk-Q6ZEUMOF.js → chunk-LTCEV7VF.js} +3 -3
  23. package/dist/{chunk-BVRWLK5U.js → chunk-LXPRO2FH.js} +2 -2
  24. package/dist/{chunk-2X336Q7J.js → chunk-MCDCZMKN.js} +1 -1
  25. package/dist/{chunk-UB6NZNJJ.js → chunk-MLOGYWLY.js} +2 -2
  26. package/dist/{chunk-K2SON7TI.js → chunk-NKQEMWGT.js} +333 -121
  27. package/dist/{chunk-PVRKHUTA.js → chunk-PCOU2UXU.js} +8 -8
  28. package/dist/chunk-RC5ZY3EV.js +82 -0
  29. package/dist/{chunk-2OM5TA56.js → chunk-SZ3Q4XEO.js} +212 -183
  30. package/dist/{chunk-5R2LFUU3.js → chunk-TQRCODRJ.js} +1 -1
  31. package/dist/{chunk-KVK3KAFQ.js → chunk-XVJRFP7W.js} +6 -6
  32. package/dist/{chunk-JD4FGVHH.js → chunk-YRBNAHH4.js} +4 -4
  33. package/dist/{chunk-KHMKAC6E.js → chunk-ZIYLIYN4.js} +115 -103
  34. package/dist/{ci-workflow-35KBJC2U.js → ci-workflow-FJYRFZYQ.js} +3 -3
  35. package/dist/{dist-RADHOOXG.js → dist-HPWNWCT6.js} +3 -1
  36. package/dist/{dist-UMONICND.js → dist-ZV6GO6FA.js} +2 -2
  37. package/dist/{docs-T5J2AJH6.js → docs-7DW3DI4Z.js} +4 -4
  38. package/dist/{engine-KWHV2LUX.js → engine-P7EE2IWO.js} +3 -3
  39. package/dist/{entropy-GEBHWBPR.js → entropy-HCXRTDFU.js} +3 -3
  40. package/dist/{feedback-I4QPE3RI.js → feedback-Y4FYN3NR.js} +1 -1
  41. package/dist/{generate-agent-definitions-3XNR77ET.js → generate-agent-definitions-3EHPIWBO.js} +4 -4
  42. package/dist/{graph-loader-JHQVQRUS.js → graph-loader-KXVS3YK3.js} +1 -1
  43. package/dist/index.d.ts +14 -8
  44. package/dist/index.js +26 -25
  45. package/dist/{loader-MN2CZXPG.js → loader-SKHF3JVV.js} +3 -3
  46. package/dist/{mcp-XSU77BZY.js → mcp-MWYIPDQU.js} +16 -15
  47. package/dist/{performance-7I5MCEFP.js → performance-ADWH5NJY.js} +4 -4
  48. package/dist/{review-pipeline-PWPKJXSN.js → review-pipeline-TLKE5OQD.js} +3 -3
  49. package/dist/{runtime-ZYEFJSGS.js → runtime-7LYAW7GU.js} +3 -3
  50. package/dist/{scan-MPJ6JHUY.js → scan-BGJ7TLLV.js} +1 -1
  51. package/dist/{security-OVTGS7DL.js → security-5XWINYVB.js} +1 -1
  52. package/dist/{validate-ACIP5BUO.js → validate-BFFHYHY7.js} +4 -4
  53. package/dist/{validate-cross-check-OWITNCHN.js → validate-cross-check-GQX7OVCR.js} +3 -3
  54. package/package.json +5 -5
@@ -15,7 +15,7 @@ function evictIfNeeded() {
15
15
  }
16
16
  }
17
17
  async function doLoadGraphStore(projectRoot) {
18
- const { GraphStore } = await import("./dist-RADHOOXG.js");
18
+ const { GraphStore } = await import("./dist-HPWNWCT6.js");
19
19
  const graphDir = path.join(projectRoot, ".harness", "graph");
20
20
  const store = new GraphStore();
21
21
  const loaded = await store.load(graphDir);
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-KET4QQZB.js";
4
4
  import {
5
5
  init_dist
6
- } from "./chunk-KHMKAC6E.js";
6
+ } from "./chunk-ZIYLIYN4.js";
7
7
  import {
8
8
  Err,
9
9
  Ok
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  init_dist
3
- } from "./chunk-KHMKAC6E.js";
3
+ } from "./chunk-ZIYLIYN4.js";
4
4
  import {
5
5
  Err,
6
6
  Ok
@@ -84,7 +84,33 @@ function mergePackageJson(base, overlay) {
84
84
  }
85
85
 
86
86
  // src/templates/engine.ts
87
- var NON_JSON_PACKAGE_CONFIGS = /* @__PURE__ */ new Set(["pyproject.toml", "go.mod", "Cargo.toml", "pom.xml"]);
87
+ var NON_JSON_PACKAGE_CONFIGS = /* @__PURE__ */ new Set([
88
+ "pyproject.toml",
89
+ "go.mod",
90
+ "Cargo.toml",
91
+ "pom.xml",
92
+ "build.gradle",
93
+ "build.gradle.kts"
94
+ ]);
95
+ var HARNESS_CONFIG_FILES = /* @__PURE__ */ new Set(["harness.config.json", "AGENTS.md", ".harness/.gitignore"]);
96
+ function isHarnessConfigFile(relativePath) {
97
+ return HARNESS_CONFIG_FILES.has(relativePath);
98
+ }
99
+ var PROJECT_MARKERS = [
100
+ "package.json",
101
+ "pom.xml",
102
+ "build.gradle",
103
+ "build.gradle.kts",
104
+ "pyproject.toml",
105
+ "setup.py",
106
+ "requirements.txt",
107
+ "Pipfile",
108
+ "go.mod",
109
+ "Cargo.toml",
110
+ "Makefile",
111
+ "CMakeLists.txt",
112
+ "meson.build"
113
+ ];
88
114
  function scoreDetectPatterns(targetDir, patterns) {
89
115
  let score = 0;
90
116
  for (const pattern of patterns) {
@@ -244,6 +270,9 @@ var TemplateEngine = class {
244
270
  for (const file of files.files) {
245
271
  const targetPath = path.join(targetDir, file.relativePath);
246
272
  const dir = path.dirname(targetPath);
273
+ if (!options.overwrite && options.existingProject && !isHarnessConfigFile(file.relativePath)) {
274
+ continue;
275
+ }
247
276
  if (!options.overwrite && isNonJsLanguage && NON_JSON_PACKAGE_CONFIGS.has(file.relativePath) && fs.existsSync(targetPath)) {
248
277
  skippedConfigs.push(file.relativePath);
249
278
  continue;
@@ -262,6 +291,13 @@ var TemplateEngine = class {
262
291
  );
263
292
  }
264
293
  }
294
+ /**
295
+ * Check whether the target directory already contains a project by looking for
296
+ * common build/package configuration files. Returns true if any marker is found.
297
+ */
298
+ isExistingProject(targetDir) {
299
+ return PROJECT_MARKERS.some((marker) => fs.existsSync(path.join(targetDir, marker)));
300
+ }
265
301
  detectFramework(targetDir) {
266
302
  try {
267
303
  const templatesResult = this.listTemplates();
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  init_dist
3
- } from "./chunk-KHMKAC6E.js";
3
+ } from "./chunk-ZIYLIYN4.js";
4
4
  import {
5
5
  Err,
6
6
  Ok
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveProjectConfig
3
- } from "./chunk-UI6NWJJK.js";
3
+ } from "./chunk-IQO7IINR.js";
4
4
  import {
5
5
  sanitizePath
6
6
  } from "./chunk-W6Y7ZW3Y.js";
@@ -49,7 +49,7 @@ async function handleValidateProject(input) {
49
49
  checks.config = "pass";
50
50
  const config = configResult.value;
51
51
  try {
52
- const core = await import("./dist-UMONICND.js");
52
+ const core = await import("./dist-ZV6GO6FA.js");
53
53
  if (typeof core.validateFileStructure === "function" && Array.isArray(config.conventions)) {
54
54
  const conventions = config.conventions;
55
55
  const structureResult = await core.validateFileStructure(projectPath, conventions);
@@ -68,7 +68,7 @@ async function handleValidateProject(input) {
68
68
  } catch {
69
69
  }
70
70
  try {
71
- const core = await import("./dist-UMONICND.js");
71
+ const core = await import("./dist-ZV6GO6FA.js");
72
72
  if (typeof core.validateAgentsMap === "function") {
73
73
  const agentsMapPath = path.join(projectPath, "AGENTS.md");
74
74
  const agentsResult = await core.validateAgentsMap(agentsMapPath);
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  resolveConfig
3
- } from "./chunk-5R2LFUU3.js";
3
+ } from "./chunk-TQRCODRJ.js";
4
4
  import {
5
5
  init_dist
6
- } from "./chunk-KHMKAC6E.js";
6
+ } from "./chunk-ZIYLIYN4.js";
7
7
  import {
8
8
  Ok
9
9
  } from "./chunk-RL4VMEXL.js";
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  listPersonas,
6
6
  loadPersona
7
- } from "./chunk-KWQTMJ3B.js";
7
+ } from "./chunk-FRDS4XGD.js";
8
8
  import {
9
9
  GENERATED_HEADER_AGENT,
10
10
  VALID_PLATFORMS,
@@ -27,7 +27,7 @@ var runSecurityScanDefinition = {
27
27
  };
28
28
  async function handleRunSecurityScan(input) {
29
29
  try {
30
- const core = await import("./dist-UMONICND.js");
30
+ const core = await import("./dist-ZV6GO6FA.js");
31
31
  const projectRoot = sanitizePath(input.path);
32
32
  let configData = {};
33
33
  try {
@@ -114,7 +114,7 @@ var getSecurityTrendsDefinition = {
114
114
  };
115
115
  async function handleGetSecurityTrends(input) {
116
116
  try {
117
- const core = await import("./dist-UMONICND.js");
117
+ const core = await import("./dist-ZV6GO6FA.js");
118
118
  const projectRoot = sanitizePath(input.path);
119
119
  const manager = new core.SecurityTimelineManager(projectRoot);
120
120
  const trendOptions = {};