@harness-engineering/cli 2.5.0 → 2.6.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.
Files changed (51) hide show
  1. package/dist/{agents-md-KAD3L2NO.js → agents-md-2JUQ4FE2.js} +4 -4
  2. package/dist/{analyzer-VY6DJVOU-NI56JRFK.js → analyzer-VY6DJVOU-4AHIJLNS.js} +2 -2
  3. package/dist/{architecture-OC7TFCFF.js → architecture-CXAVNB5X.js} +5 -5
  4. package/dist/{assess-project-ZGMRPTS3.js → assess-project-M626SSPN.js} +1 -1
  5. package/dist/bin/harness-mcp.js +15 -15
  6. package/dist/bin/harness.js +24 -24
  7. package/dist/{check-phase-gate-PD5MVEZT.js → check-phase-gate-XMU6LLUQ.js} +5 -5
  8. package/dist/{chunk-N6VWCISQ.js → chunk-24KCOJJG.js} +2 -2
  9. package/dist/{chunk-XIW24BJY.js → chunk-43M3RLFQ.js} +3 -3
  10. package/dist/{chunk-2RNGLYOG.js → chunk-5JNSFYZU.js} +2 -2
  11. package/dist/{chunk-XSI3RDH6.js → chunk-6AX6R3LM.js} +7 -7
  12. package/dist/{chunk-DOUS4ULX.js → chunk-GWE5LL3R.js} +6 -6
  13. package/dist/{chunk-7DOGGXQU.js → chunk-GWF2OILZ.js} +2 -2
  14. package/dist/{chunk-TCSNO7YW.js → chunk-HFOB2MPQ.js} +2 -2
  15. package/dist/{chunk-6SRKI77C.js → chunk-HMW3VKUF.js} +3 -3
  16. package/dist/{chunk-IXKGMPMT.js → chunk-HYTRDAHV.js} +2 -2
  17. package/dist/{chunk-NOOPJD5R.js → chunk-I6K43QQS.js} +3 -3
  18. package/dist/{chunk-IGBQIXPS.js → chunk-JFZOWO7D.js} +2 -2
  19. package/dist/{chunk-57TS3UGN.js → chunk-K246XQ2L.js} +2 -2
  20. package/dist/{chunk-A3EBWI7U.js → chunk-L5BCZ5XS.js} +2 -2
  21. package/dist/{chunk-UCL3UZIC.js → chunk-NX6A24DS.js} +1588 -925
  22. package/dist/{chunk-65MJPWFN.js → chunk-OA6SWTU4.js} +6 -6
  23. package/dist/{chunk-2LPUIBVH.js → chunk-OH3NXXUY.js} +121 -2
  24. package/dist/{chunk-LT244Y6E.js → chunk-ORNMAYHB.js} +196 -75
  25. package/dist/{chunk-4CWFVEVV.js → chunk-PFZEADQM.js} +1 -1
  26. package/dist/{chunk-JE5GQVCQ.js → chunk-Q6ZR2L6Q.js} +2 -2
  27. package/dist/{chunk-UF7BKRH4.js → chunk-QOKMDDBJ.js} +4 -4
  28. package/dist/{chunk-IWRYCUDO.js → chunk-SZEFU6XC.js} +1 -1
  29. package/dist/{chunk-HIZXUWWC.js → chunk-VTTNIZJL.js} +21 -2
  30. package/dist/{chunk-ELMV6QU2.js → chunk-YP7I25SL.js} +2 -2
  31. package/dist/{chunk-KQ6TDRPS.js → chunk-YYRQCQPZ.js} +425 -173
  32. package/dist/{ci-workflow-WAG4TOV6.js → ci-workflow-3JNDZQYD.js} +4 -4
  33. package/dist/{dist-HVJUGPSY.js → dist-E3SAAHCM.js} +23 -1
  34. package/dist/{dist-TKHVYUWZ.js → dist-OHDQBTSO.js} +43 -3
  35. package/dist/{docs-4WPBYSCF.js → docs-5RYMDHN3.js} +5 -5
  36. package/dist/{engine-5BXDQT5T.js → engine-KZ3PPUYE.js} +4 -4
  37. package/dist/{entropy-7FIUFACI.js → entropy-DQTAPSSE.js} +4 -4
  38. package/dist/{feedback-ER2HRTFD.js → feedback-WH6XPQJS.js} +1 -1
  39. package/dist/{generate-agent-definitions-5PV4O3BD.js → generate-agent-definitions-SZA4QIHN.js} +5 -5
  40. package/dist/index.d.ts +47 -0
  41. package/dist/index.js +24 -24
  42. package/dist/{loader-6RTEYN5Q.js → loader-BNKGM23C.js} +4 -4
  43. package/dist/{mcp-QWSDEYMN.js → mcp-GZH4EYGD.js} +15 -15
  44. package/dist/{performance-AZJAT35R.js → performance-54TMJOEU.js} +5 -5
  45. package/dist/{review-pipeline-4VF73V4V.js → review-pipeline-OTDDVPNY.js} +4 -4
  46. package/dist/{runtime-SAZGLILX.js → runtime-W5THSNAL.js} +4 -4
  47. package/dist/{security-ZWRABJNE.js → security-27HW7CYT.js} +1 -1
  48. package/dist/{tool-tiers-LTQNNAFU.js → tool-tiers-B7JC2XC3.js} +3 -1
  49. package/dist/{validate-AFJVI4OX.js → validate-QRVCD4GP.js} +5 -5
  50. package/dist/{validate-cross-check-7PO7CBVT.js → validate-cross-check-BUAGBAPO.js} +4 -4
  51. package/package.json +6 -6
@@ -3,20 +3,20 @@ import {
3
3
  handleGetSecurityTrends,
4
4
  handleRunSecurityScan,
5
5
  runSecurityScanDefinition
6
- } from "./chunk-TCSNO7YW.js";
6
+ } from "./chunk-HFOB2MPQ.js";
7
7
  import {
8
8
  handleRunCodeReview,
9
9
  runCodeReviewDefinition,
10
10
  sortFindingsBySeverity
11
- } from "./chunk-JE5GQVCQ.js";
11
+ } from "./chunk-Q6ZR2L6Q.js";
12
12
  import {
13
13
  assessProjectDefinition,
14
14
  handleAssessProject
15
- } from "./chunk-65MJPWFN.js";
15
+ } from "./chunk-OA6SWTU4.js";
16
16
  import {
17
17
  detectEntropyDefinition,
18
18
  handleDetectEntropy
19
- } from "./chunk-UF7BKRH4.js";
19
+ } from "./chunk-QOKMDDBJ.js";
20
20
  import {
21
21
  checkPerformanceDefinition,
22
22
  getCriticalPathsDefinition,
@@ -26,7 +26,7 @@ import {
26
26
  handleGetPerfBaselines,
27
27
  handleUpdatePerfBaselines,
28
28
  updatePerfBaselinesDefinition
29
- } from "./chunk-XSI3RDH6.js";
29
+ } from "./chunk-6AX6R3LM.js";
30
30
  import {
31
31
  getBusinessKnowledgeResource
32
32
  } from "./chunk-IOW3MW2K.js";
@@ -37,7 +37,7 @@ import {
37
37
  handleCreateSelfReview,
38
38
  handleRequestPeerReview,
39
39
  requestPeerReviewDefinition
40
- } from "./chunk-6SRKI77C.js";
40
+ } from "./chunk-HMW3VKUF.js";
41
41
  import {
42
42
  GENERATED_HEADER_CLAUDE,
43
43
  GENERATED_HEADER_CODEX,
@@ -53,18 +53,18 @@ import {
53
53
  import {
54
54
  handleValidateProject,
55
55
  validateToolDefinition
56
- } from "./chunk-NOOPJD5R.js";
56
+ } from "./chunk-I6K43QQS.js";
57
57
  import {
58
58
  checkDependenciesDefinition,
59
59
  handleCheckDependencies
60
- } from "./chunk-2RNGLYOG.js";
60
+ } from "./chunk-5JNSFYZU.js";
61
61
  import {
62
62
  resolveProjectConfig
63
- } from "./chunk-7DOGGXQU.js";
63
+ } from "./chunk-GWF2OILZ.js";
64
64
  import {
65
65
  checkDocsDefinition,
66
66
  handleCheckDocs
67
- } from "./chunk-DOUS4ULX.js";
67
+ } from "./chunk-GWE5LL3R.js";
68
68
  import {
69
69
  resultToMcpResponse
70
70
  } from "./chunk-EPUKTTJZ.js";
@@ -88,7 +88,7 @@ import {
88
88
  } from "./chunk-HIK6OEUF.js";
89
89
  import {
90
90
  resolveConfig
91
- } from "./chunk-HIZXUWWC.js";
91
+ } from "./chunk-VTTNIZJL.js";
92
92
  import {
93
93
  logger
94
94
  } from "./chunk-EBJQ6N4M.js";
@@ -118,14 +118,14 @@ import {
118
118
  scanForInjection,
119
119
  serializeEnvelope,
120
120
  writeTaint
121
- } from "./chunk-KQ6TDRPS.js";
121
+ } from "./chunk-YYRQCQPZ.js";
122
122
  import {
123
123
  Err,
124
124
  INDEXED_FILE_KINDS,
125
125
  INSIGHTS_KEYS,
126
126
  Ok,
127
127
  init_dist
128
- } from "./chunk-2LPUIBVH.js";
128
+ } from "./chunk-OH3NXXUY.js";
129
129
 
130
130
  // src/mcp/server.ts
131
131
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
@@ -725,7 +725,7 @@ async function handleInsightsSummary(input) {
725
725
  const skip = Array.isArray(input.skip) ? input.skip.filter(
726
726
  (k) => typeof k === "string" && INSIGHTS_KEYS.includes(k)
727
727
  ) : void 0;
728
- const { composeInsights } = await import("./dist-TKHVYUWZ.js");
728
+ const { composeInsights } = await import("./dist-OHDQBTSO.js");
729
729
  const report = await composeInsights(projectPath, {
730
730
  ...skip && skip.length > 0 && { skip }
731
731
  });
@@ -901,7 +901,7 @@ ${skippedMsg}`
901
901
  async function handleInitProject(input) {
902
902
  const i = input;
903
903
  try {
904
- const { TemplateEngine } = await import("./engine-5BXDQT5T.js");
904
+ const { TemplateEngine } = await import("./engine-KZ3PPUYE.js");
905
905
  const engine = new TemplateEngine(resolveTemplatesDir());
906
906
  const safePath = sanitizePath(i.path);
907
907
  const detected = tryDetectFramework(engine, safePath, i);
@@ -923,7 +923,7 @@ var listPersonasDefinition = {
923
923
  inputSchema: { type: "object", properties: {} }
924
924
  };
925
925
  async function handleListPersonas() {
926
- const { listPersonas } = await import("./loader-6RTEYN5Q.js");
926
+ const { listPersonas } = await import("./loader-BNKGM23C.js");
927
927
  const result = listPersonas(resolvePersonasDir());
928
928
  return resultToMcpResponse(result);
929
929
  }
@@ -947,10 +947,10 @@ async function handleGeneratePersonaArtifacts(input) {
947
947
  if (!/^[a-z0-9][a-z0-9._-]*$/i.test(input.name)) {
948
948
  return resultToMcpResponse(Err(new Error(`Invalid persona name: ${input.name}`)));
949
949
  }
950
- const { loadPersona } = await import("./loader-6RTEYN5Q.js");
951
- const { generateRuntime } = await import("./runtime-SAZGLILX.js");
952
- const { generateAgentsMd } = await import("./agents-md-KAD3L2NO.js");
953
- const { generateCIWorkflow } = await import("./ci-workflow-WAG4TOV6.js");
950
+ const { loadPersona } = await import("./loader-BNKGM23C.js");
951
+ const { generateRuntime } = await import("./runtime-W5THSNAL.js");
952
+ const { generateAgentsMd } = await import("./agents-md-2JUQ4FE2.js");
953
+ const { generateCIWorkflow } = await import("./ci-workflow-3JNDZQYD.js");
954
954
  const personasDir = resolvePersonasDir();
955
955
  const filePath = path4.join(personasDir, `${input.name}.yaml`);
956
956
  if (!filePath.startsWith(personasDir)) {
@@ -1005,7 +1005,7 @@ async function handleRunPersona(input) {
1005
1005
  if (!/^[a-z0-9][a-z0-9._-]*$/i.test(input.persona)) {
1006
1006
  return resultToMcpResponse(Err(new Error(`Invalid persona name: ${input.persona}`)));
1007
1007
  }
1008
- const { loadPersona } = await import("./loader-6RTEYN5Q.js");
1008
+ const { loadPersona } = await import("./loader-BNKGM23C.js");
1009
1009
  const { runPersona } = await import("./runner-AAEF2TXY.js");
1010
1010
  const { executeSkill } = await import("./skill-executor-MOCUIAYS.js");
1011
1011
  const personasDir = resolvePersonasDir();
@@ -1450,7 +1450,7 @@ function loadOrGenerateProfile(projectRoot) {
1450
1450
  // src/mcp/tools/event-emitter.ts
1451
1451
  async function emitSkillEvent(projectPath, event) {
1452
1452
  try {
1453
- const { emitEvent } = await import("./dist-TKHVYUWZ.js");
1453
+ const { emitEvent } = await import("./dist-OHDQBTSO.js");
1454
1454
  await emitEvent(projectPath, event);
1455
1455
  } catch {
1456
1456
  }
@@ -1722,7 +1722,7 @@ async function autoSyncRoadmap(projectPath) {
1722
1722
  try {
1723
1723
  const roadmapFile = path11.join(projectPath, "docs", "roadmap.md");
1724
1724
  if (!fs10.existsSync(roadmapFile)) return;
1725
- const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges } = await import("./dist-TKHVYUWZ.js");
1725
+ const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges } = await import("./dist-OHDQBTSO.js");
1726
1726
  const raw = fs10.readFileSync(roadmapFile, "utf-8");
1727
1727
  const parseResult = parseRoadmap(raw);
1728
1728
  if (!parseResult.ok) return;
@@ -1752,7 +1752,7 @@ async function triggerExternalSync(projectPath, roadmapFile) {
1752
1752
  console.warn("[roadmap-sync] GITHUB_TOKEN not found \u2014 external sync skipped");
1753
1753
  return;
1754
1754
  }
1755
- const { fullSync, GitHubIssuesSyncAdapter } = await import("./dist-TKHVYUWZ.js");
1755
+ const { fullSync, GitHubIssuesSyncAdapter } = await import("./dist-OHDQBTSO.js");
1756
1756
  const adapter = new GitHubIssuesSyncAdapter({
1757
1757
  token,
1758
1758
  config: trackerConfig
@@ -1849,12 +1849,12 @@ var manageStateDefinition = {
1849
1849
  }
1850
1850
  };
1851
1851
  async function handleShow(projectPath, input) {
1852
- const { loadState } = await import("./dist-TKHVYUWZ.js");
1852
+ const { loadState } = await import("./dist-OHDQBTSO.js");
1853
1853
  return resultToMcpResponse(await loadState(projectPath, input.stream, input.session));
1854
1854
  }
1855
1855
  async function handleLearn(projectPath, input) {
1856
1856
  if (!input.learning) return mcpError("Error: learning is required for learn action");
1857
- const { appendLearning } = await import("./dist-TKHVYUWZ.js");
1857
+ const { appendLearning } = await import("./dist-OHDQBTSO.js");
1858
1858
  const result = await appendLearning(
1859
1859
  projectPath,
1860
1860
  input.learning,
@@ -1869,7 +1869,7 @@ async function handleLearn(projectPath, input) {
1869
1869
  async function handleFailure(projectPath, input) {
1870
1870
  if (!input.description) return mcpError("Error: description is required for failure action");
1871
1871
  if (!input.failureType) return mcpError("Error: failureType is required for failure action");
1872
- const { appendFailure } = await import("./dist-TKHVYUWZ.js");
1872
+ const { appendFailure } = await import("./dist-OHDQBTSO.js");
1873
1873
  const result = await appendFailure(
1874
1874
  projectPath,
1875
1875
  input.description,
@@ -1888,19 +1888,19 @@ async function handleFailure(projectPath, input) {
1888
1888
  return resultToMcpResponse(Ok({ recorded: true }));
1889
1889
  }
1890
1890
  async function handleArchive(projectPath, input) {
1891
- const { archiveFailures } = await import("./dist-TKHVYUWZ.js");
1891
+ const { archiveFailures } = await import("./dist-OHDQBTSO.js");
1892
1892
  const result = await archiveFailures(projectPath, input.stream, input.session);
1893
1893
  if (!result.ok) return resultToMcpResponse(result);
1894
1894
  return resultToMcpResponse(Ok({ archived: true }));
1895
1895
  }
1896
1896
  async function handleReset(projectPath, input) {
1897
- const { saveState, DEFAULT_STATE } = await import("./dist-TKHVYUWZ.js");
1897
+ const { saveState, DEFAULT_STATE } = await import("./dist-OHDQBTSO.js");
1898
1898
  const result = await saveState(projectPath, { ...DEFAULT_STATE }, input.stream, input.session);
1899
1899
  if (!result.ok) return resultToMcpResponse(result);
1900
1900
  return resultToMcpResponse(Ok({ reset: true }));
1901
1901
  }
1902
1902
  async function handleGate(projectPath, input) {
1903
- const { runMechanicalGate } = await import("./dist-TKHVYUWZ.js");
1903
+ const { runMechanicalGate } = await import("./dist-OHDQBTSO.js");
1904
1904
  const result = await runMechanicalGate(projectPath);
1905
1905
  if (result.ok) {
1906
1906
  await emitSkillEvent(projectPath, {
@@ -1920,7 +1920,7 @@ async function handleGate(projectPath, input) {
1920
1920
  }
1921
1921
  async function handleSaveHandoff(projectPath, input) {
1922
1922
  if (!input.handoff) return mcpError("Error: handoff is required for save-handoff action");
1923
- const { saveHandoff } = await import("./dist-TKHVYUWZ.js");
1923
+ const { saveHandoff } = await import("./dist-OHDQBTSO.js");
1924
1924
  const result = await saveHandoff(
1925
1925
  projectPath,
1926
1926
  input.handoff,
@@ -1942,7 +1942,7 @@ async function handleSaveHandoff(projectPath, input) {
1942
1942
  return resultToMcpResponse(Ok({ saved: true }));
1943
1943
  }
1944
1944
  async function handleLoadHandoff(projectPath, input) {
1945
- const { loadHandoff } = await import("./dist-TKHVYUWZ.js");
1945
+ const { loadHandoff } = await import("./dist-OHDQBTSO.js");
1946
1946
  return resultToMcpResponse(await loadHandoff(projectPath, input.stream, input.session));
1947
1947
  }
1948
1948
  async function handleAppendEntry(projectPath, input) {
@@ -1950,7 +1950,7 @@ async function handleAppendEntry(projectPath, input) {
1950
1950
  if (!input.authorSkill) return mcpError("Error: authorSkill is required for append_entry action");
1951
1951
  if (!input.content) return mcpError("Error: content is required for append_entry action");
1952
1952
  if (input.session) {
1953
- const { appendSessionEntry } = await import("./dist-TKHVYUWZ.js");
1953
+ const { appendSessionEntry } = await import("./dist-OHDQBTSO.js");
1954
1954
  const result = await appendSessionEntry(
1955
1955
  projectPath,
1956
1956
  input.session,
@@ -1963,7 +1963,7 @@ async function handleAppendEntry(projectPath, input) {
1963
1963
  if (input.section !== "decisions") {
1964
1964
  return mcpError("Error: session is required for non-decisions sections");
1965
1965
  }
1966
- const { loadState, saveState } = await import("./dist-TKHVYUWZ.js");
1966
+ const { loadState, saveState } = await import("./dist-OHDQBTSO.js");
1967
1967
  const lr = await loadState(projectPath, input.stream);
1968
1968
  if (!lr.ok) return resultToMcpResponse(lr);
1969
1969
  lr.value.decisions.push({
@@ -1981,7 +1981,7 @@ async function handleUpdateEntryStatus(projectPath, input) {
1981
1981
  if (!input.entryId) return mcpError("Error: entryId is required for update_entry_status action");
1982
1982
  if (!input.newStatus)
1983
1983
  return mcpError("Error: newStatus is required for update_entry_status action");
1984
- const { updateSessionEntryStatus } = await import("./dist-TKHVYUWZ.js");
1984
+ const { updateSessionEntryStatus } = await import("./dist-OHDQBTSO.js");
1985
1985
  const result = await updateSessionEntryStatus(
1986
1986
  projectPath,
1987
1987
  input.session,
@@ -1994,7 +1994,7 @@ async function handleUpdateEntryStatus(projectPath, input) {
1994
1994
  async function handleReadSection(projectPath, input) {
1995
1995
  if (!input.session) return mcpError("Error: session is required for read_section action");
1996
1996
  if (!input.section) return mcpError("Error: section is required for read_section action");
1997
- const { readSessionSection } = await import("./dist-TKHVYUWZ.js");
1997
+ const { readSessionSection } = await import("./dist-OHDQBTSO.js");
1998
1998
  const result = await readSessionSection(
1999
1999
  projectPath,
2000
2000
  input.session,
@@ -2004,13 +2004,13 @@ async function handleReadSection(projectPath, input) {
2004
2004
  }
2005
2005
  async function handleReadSections(projectPath, input) {
2006
2006
  if (!input.session) return mcpError("Error: session is required for read_sections action");
2007
- const { readSessionSections } = await import("./dist-TKHVYUWZ.js");
2007
+ const { readSessionSections } = await import("./dist-OHDQBTSO.js");
2008
2008
  const result = await readSessionSections(projectPath, input.session);
2009
2009
  return resultToMcpResponse(result);
2010
2010
  }
2011
2011
  async function handleArchiveSession(projectPath, input) {
2012
2012
  if (!input.session) return mcpError("Error: session is required for archive_session action");
2013
- const { archiveSession } = await import("./dist-TKHVYUWZ.js");
2013
+ const { archiveSession } = await import("./dist-OHDQBTSO.js");
2014
2014
  const { buildArchiveHooks } = await import("@harness-engineering/orchestrator");
2015
2015
  const hooks = buildArchiveHooks({ projectPath });
2016
2016
  const result = await archiveSession(projectPath, input.session, { hooks });
@@ -2092,7 +2092,7 @@ var listStreamsDefinition = {
2092
2092
  };
2093
2093
  async function handleListStreams(input) {
2094
2094
  try {
2095
- const { listStreams, loadStreamIndex } = await import("./dist-TKHVYUWZ.js");
2095
+ const { listStreams, loadStreamIndex } = await import("./dist-OHDQBTSO.js");
2096
2096
  const projectPath = sanitizePath(input.path);
2097
2097
  const indexResult = await loadStreamIndex(projectPath);
2098
2098
  const streamsResult = await listStreams(projectPath);
@@ -2130,7 +2130,7 @@ var checkPhaseGateDefinition = {
2130
2130
  };
2131
2131
  async function handleCheckPhaseGate(input) {
2132
2132
  try {
2133
- const { runCheckPhaseGate } = await import("./check-phase-gate-PD5MVEZT.js");
2133
+ const { runCheckPhaseGate } = await import("./check-phase-gate-XMU6LLUQ.js");
2134
2134
  const result = await runCheckPhaseGate({ cwd: sanitizePath(input.path) });
2135
2135
  if (result.ok) {
2136
2136
  return { content: [{ type: "text", text: JSON.stringify(result.value) }] };
@@ -2186,7 +2186,7 @@ async function handleValidateCrossCheck(input) {
2186
2186
  };
2187
2187
  }
2188
2188
  try {
2189
- const { runCrossCheck } = await import("./validate-cross-check-7PO7CBVT.js");
2189
+ const { runCrossCheck } = await import("./validate-cross-check-BUAGBAPO.js");
2190
2190
  const specsDir = path12.resolve(projectPath, input.specsDir ?? "docs/specs");
2191
2191
  if (!specsDir.startsWith(projectPath)) {
2192
2192
  return {
@@ -2953,7 +2953,7 @@ async function handleGenerateSlashCommands(input) {
2953
2953
  // src/mcp/resources/state.ts
2954
2954
  async function getStateResource(projectRoot) {
2955
2955
  try {
2956
- const { loadState, migrateToStreams } = await import("./dist-TKHVYUWZ.js");
2956
+ const { loadState, migrateToStreams } = await import("./dist-OHDQBTSO.js");
2957
2957
  await migrateToStreams(projectRoot);
2958
2958
  const result = await loadState(projectRoot);
2959
2959
  if (result.ok) {
@@ -3973,7 +3973,7 @@ var generateAgentDefinitionsDefinition = {
3973
3973
  }
3974
3974
  };
3975
3975
  async function handleGenerateAgentDefinitions(input) {
3976
- const { generateAgentDefinitions } = await import("./generate-agent-definitions-5PV4O3BD.js");
3976
+ const { generateAgentDefinitions } = await import("./generate-agent-definitions-SZA4QIHN.js");
3977
3977
  const platforms = input.platform === "all" || !input.platform ? ["claude-code", "gemini-cli"] : [input.platform];
3978
3978
  const results = generateAgentDefinitions({
3979
3979
  platforms: [...platforms],
@@ -4467,8 +4467,8 @@ async function handleManageRoadmap(input) {
4467
4467
  return handleManageRoadmapFileLess(input, clientResult.value);
4468
4468
  }
4469
4469
  try {
4470
- const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges, assignFeature } = await import("./dist-TKHVYUWZ.js");
4471
- const { Ok: Ok2 } = await import("./dist-HVJUGPSY.js");
4470
+ const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges, assignFeature } = await import("./dist-OHDQBTSO.js");
4471
+ const { Ok: Ok2 } = await import("./dist-E3SAAHCM.js");
4472
4472
  const projectPath = projectPathPre;
4473
4473
  const deps = {
4474
4474
  parseRoadmap,
@@ -4906,7 +4906,7 @@ async function handleTransition(validInput, projectPath, id) {
4906
4906
  const transition = transitionResult.data;
4907
4907
  const prompt = renderTransition(transition);
4908
4908
  try {
4909
- const { saveHandoff } = await import("./dist-TKHVYUWZ.js");
4909
+ const { saveHandoff } = await import("./dist-OHDQBTSO.js");
4910
4910
  await saveHandoff(
4911
4911
  projectPath,
4912
4912
  {
@@ -4987,7 +4987,7 @@ async function handleEmitInteraction(input) {
4987
4987
  }
4988
4988
  async function recordInteraction(projectPath, id, type, decision, stream) {
4989
4989
  try {
4990
- const { loadState, saveState } = await import("./dist-TKHVYUWZ.js");
4990
+ const { loadState, saveState } = await import("./dist-OHDQBTSO.js");
4991
4991
  const stateResult = await loadState(projectPath, stream);
4992
4992
  if (stateResult.ok) {
4993
4993
  const state = stateResult.value;
@@ -5148,10 +5148,10 @@ async function handleGatherContext(input) {
5148
5148
  input.include ?? ["state", "learnings", "handoff", "graph", "validation", "businessKnowledge"]
5149
5149
  );
5150
5150
  const errors = [];
5151
- const statePromise = includeSet.has("state") ? import("./dist-TKHVYUWZ.js").then(
5151
+ const statePromise = includeSet.has("state") ? import("./dist-OHDQBTSO.js").then(
5152
5152
  (core) => core.loadState(projectPath, void 0, input.session)
5153
5153
  ) : Promise.resolve(null);
5154
- const learningsPromise = includeSet.has("learnings") ? import("./dist-TKHVYUWZ.js").then(
5154
+ const learningsPromise = includeSet.has("learnings") ? import("./dist-OHDQBTSO.js").then(
5155
5155
  (core) => core.loadBudgetedLearnings(projectPath, {
5156
5156
  intent: input.intent,
5157
5157
  tokenBudget: input.learningsBudget ?? 1e3,
@@ -5160,7 +5160,7 @@ async function handleGatherContext(input) {
5160
5160
  ...input.depth !== void 0 && { depth: input.depth }
5161
5161
  })
5162
5162
  ) : Promise.resolve(null);
5163
- const handoffPromise = includeSet.has("handoff") ? import("./dist-TKHVYUWZ.js").then(
5163
+ const handoffPromise = includeSet.has("handoff") ? import("./dist-OHDQBTSO.js").then(
5164
5164
  (core) => core.loadHandoff(projectPath, void 0, input.session)
5165
5165
  ) : Promise.resolve(null);
5166
5166
  const graphPromise = includeSet.has("graph") ? (async () => {
@@ -5204,11 +5204,11 @@ async function handleGatherContext(input) {
5204
5204
  context: contextBlocks
5205
5205
  };
5206
5206
  })() : Promise.resolve(null);
5207
- const sessionsPromise = includeSet.has("sessions") && input.session ? import("./dist-TKHVYUWZ.js").then(
5207
+ const sessionsPromise = includeSet.has("sessions") && input.session ? import("./dist-OHDQBTSO.js").then(
5208
5208
  (core) => core.readSessionSections(projectPath, input.session)
5209
5209
  ) : Promise.resolve(null);
5210
5210
  const shouldIncludeEvents = input.includeEvents !== void 0 ? input.includeEvents : includeSet.has("events") || !!input.session && !input.include;
5211
- const eventsPromise = shouldIncludeEvents ? import("./dist-TKHVYUWZ.js").then(async (core) => {
5211
+ const eventsPromise = shouldIncludeEvents ? import("./dist-OHDQBTSO.js").then(async (core) => {
5212
5212
  const result = await core.loadEvents(projectPath, {
5213
5213
  session: input.session
5214
5214
  });
@@ -5216,7 +5216,7 @@ async function handleGatherContext(input) {
5216
5216
  return core.formatEventTimeline(result.value);
5217
5217
  }) : Promise.resolve(null);
5218
5218
  const validationPromise = includeSet.has("validation") ? (async () => {
5219
- const { handleValidateProject: handleValidateProject2 } = await import("./validate-AFJVI4OX.js");
5219
+ const { handleValidateProject: handleValidateProject2 } = await import("./validate-QRVCD4GP.js");
5220
5220
  const result = await handleValidateProject2({ path: projectPath });
5221
5221
  const first = result.content[0];
5222
5222
  return first ? JSON.parse(first.text) : null;
@@ -5319,7 +5319,7 @@ async function handleGatherContext(input) {
5319
5319
  };
5320
5320
  if (input.session) {
5321
5321
  try {
5322
- const core = await import("./dist-TKHVYUWZ.js");
5322
+ const core = await import("./dist-OHDQBTSO.js");
5323
5323
  core.updateSessionIndex(
5324
5324
  projectPath,
5325
5325
  input.session,
@@ -5471,7 +5471,7 @@ async function handleReviewChanges(input) {
5471
5471
  }
5472
5472
  }
5473
5473
  async function runQuickReview(projectPath, diff, diffLines, downgraded, offset, limit) {
5474
- const { handleAnalyzeDiff: handleAnalyzeDiff2 } = await import("./feedback-ER2HRTFD.js");
5474
+ const { handleAnalyzeDiff: handleAnalyzeDiff2 } = await import("./feedback-WH6XPQJS.js");
5475
5475
  const result = await handleAnalyzeDiff2({ diff, path: projectPath });
5476
5476
  const firstContent = result.content[0];
5477
5477
  if (!firstContent) throw new Error("Empty analyze_diff response");
@@ -5506,7 +5506,7 @@ function extractFileCount(diffParsed) {
5506
5506
  return files?.length ?? 0;
5507
5507
  }
5508
5508
  async function runStandardReview(projectPath, diff, diffLines, downgraded, offset, limit) {
5509
- const { handleAnalyzeDiff: handleAnalyzeDiff2, handleCreateSelfReview: handleCreateSelfReview2 } = await import("./feedback-ER2HRTFD.js");
5509
+ const { handleAnalyzeDiff: handleAnalyzeDiff2, handleCreateSelfReview: handleCreateSelfReview2 } = await import("./feedback-WH6XPQJS.js");
5510
5510
  const [diffResult, reviewResult] = await Promise.all([
5511
5511
  handleAnalyzeDiff2({ diff, path: projectPath }),
5512
5512
  handleCreateSelfReview2({ path: projectPath, diff })
@@ -5541,7 +5541,7 @@ async function runStandardReview(projectPath, diff, diffLines, downgraded, offse
5541
5541
  };
5542
5542
  }
5543
5543
  async function runDeepReview(projectPath, diff, diffLines, _downgraded, offset, limit) {
5544
- const { handleRunCodeReview: handleRunCodeReview2 } = await import("./review-pipeline-4VF73V4V.js");
5544
+ const { handleRunCodeReview: handleRunCodeReview2 } = await import("./review-pipeline-OTDDVPNY.js");
5545
5545
  const result = await handleRunCodeReview2({
5546
5546
  path: projectPath,
5547
5547
  diff,
@@ -5835,7 +5835,7 @@ async function handleDetectStaleConstraints(input) {
5835
5835
  ]
5836
5836
  };
5837
5837
  }
5838
- const { detectStaleConstraints } = await import("./dist-TKHVYUWZ.js");
5838
+ const { detectStaleConstraints } = await import("./dist-OHDQBTSO.js");
5839
5839
  const result = detectStaleConstraints(
5840
5840
  store,
5841
5841
  windowDays,
@@ -5955,10 +5955,10 @@ function countCriticalFindings(securityData) {
5955
5955
  return findings.filter((f) => f.severity === "error").length;
5956
5956
  }
5957
5957
  async function runHealthChecks(projectPath) {
5958
- const { handleAssessProject: handleAssessProject2 } = await import("./assess-project-ZGMRPTS3.js");
5959
- const { handleCheckDependencies: handleCheckDependencies2 } = await import("./architecture-OC7TFCFF.js");
5960
- const { handleDetectEntropy: handleDetectEntropy2 } = await import("./entropy-7FIUFACI.js");
5961
- const { handleRunSecurityScan: handleRunSecurityScan2 } = await import("./security-ZWRABJNE.js");
5958
+ const { handleAssessProject: handleAssessProject2 } = await import("./assess-project-M626SSPN.js");
5959
+ const { handleCheckDependencies: handleCheckDependencies2 } = await import("./architecture-CXAVNB5X.js");
5960
+ const { handleDetectEntropy: handleDetectEntropy2 } = await import("./entropy-DQTAPSSE.js");
5961
+ const { handleRunSecurityScan: handleRunSecurityScan2 } = await import("./security-27HW7CYT.js");
5962
5962
  const [assessResult, depsResult, entropyResult, securityResult] = await Promise.all([
5963
5963
  handleAssessProject2({
5964
5964
  path: projectPath,
@@ -6799,7 +6799,7 @@ async function handleGetDecayTrends(input) {
6799
6799
  };
6800
6800
  }
6801
6801
  try {
6802
- const core = await import("./dist-TKHVYUWZ.js");
6802
+ const core = await import("./dist-OHDQBTSO.js");
6803
6803
  const { TimelineManager } = core;
6804
6804
  const manager = new TimelineManager(projectPath);
6805
6805
  const timeline = manager.load();
@@ -6934,7 +6934,7 @@ async function handleCodeOutline(input) {
6934
6934
  };
6935
6935
  }
6936
6936
  try {
6937
- const { getOutline, formatOutline, EXTENSION_MAP } = await import("./dist-TKHVYUWZ.js");
6937
+ const { getOutline, formatOutline, EXTENSION_MAP } = await import("./dist-OHDQBTSO.js");
6938
6938
  const { stat } = await import("fs/promises");
6939
6939
  const stats = await stat(targetPath).catch(() => null);
6940
6940
  if (stats?.isFile()) {
@@ -6953,7 +6953,7 @@ async function handleCodeOutline(input) {
6953
6953
  })
6954
6954
  );
6955
6955
  fileStats.sort((a, b) => b.mtimeMs - a.mtimeMs);
6956
- const { paginate: paginate2 } = await import("./dist-TKHVYUWZ.js");
6956
+ const { paginate: paginate2 } = await import("./dist-OHDQBTSO.js");
6957
6957
  const paged = paginate2(fileStats, input.offset ?? 0, input.limit ?? 30);
6958
6958
  const results = [];
6959
6959
  for (const entry of paged.items) {
@@ -7026,7 +7026,7 @@ async function handleCodeSearch(input) {
7026
7026
  };
7027
7027
  }
7028
7028
  try {
7029
- const { searchSymbols } = await import("./dist-TKHVYUWZ.js");
7029
+ const { searchSymbols } = await import("./dist-OHDQBTSO.js");
7030
7030
  const result = await searchSymbols(input.query, directory, input.glob);
7031
7031
  const lines = [`Search: "${result.query}" \u2014 ${result.matches.length} matches`];
7032
7032
  for (const match of result.matches) {
@@ -7095,7 +7095,7 @@ async function handleCodeUnfold(input) {
7095
7095
  }
7096
7096
  try {
7097
7097
  if (input.symbol) {
7098
- const { unfoldSymbol } = await import("./dist-TKHVYUWZ.js");
7098
+ const { unfoldSymbol } = await import("./dist-OHDQBTSO.js");
7099
7099
  const result = await unfoldSymbol(filePath, input.symbol);
7100
7100
  const header = result.warning ? `${result.file}:${result.startLine}-${result.endLine} ${result.warning}
7101
7101
  ` : `${result.file}:${result.startLine}-${result.endLine}
@@ -7103,7 +7103,7 @@ async function handleCodeUnfold(input) {
7103
7103
  return { content: [{ type: "text", text: header + result.content }] };
7104
7104
  }
7105
7105
  if (input.startLine != null && input.endLine != null) {
7106
- const { unfoldRange } = await import("./dist-TKHVYUWZ.js");
7106
+ const { unfoldRange } = await import("./dist-OHDQBTSO.js");
7107
7107
  const result = await unfoldRange(filePath, input.startLine, input.endLine);
7108
7108
  const header = `${result.file}:${result.startLine}-${result.endLine}
7109
7109
  `;
@@ -7288,7 +7288,7 @@ async function handlePredictFailures(input) {
7288
7288
  };
7289
7289
  }
7290
7290
  try {
7291
- const core = await import("./dist-TKHVYUWZ.js");
7291
+ const core = await import("./dist-OHDQBTSO.js");
7292
7292
  const { TimelineManager, PredictionEngine, SpecImpactEstimator } = core;
7293
7293
  const manager = new TimelineManager(projectPath);
7294
7294
  const includeRoadmap = input.includeRoadmap !== false;
@@ -8397,7 +8397,7 @@ async function handleDetectConstraintEmergence(input) {
8397
8397
  }
8398
8398
  const nodePath = await import("path");
8399
8399
  const historyPath = nodePath.resolve(projectPath, ".harness/arch/violation-history.json");
8400
- const { ViolationHistoryManager, detectEmergentConstraints } = await import("./dist-TKHVYUWZ.js");
8400
+ const { ViolationHistoryManager, detectEmergentConstraints } = await import("./dist-OHDQBTSO.js");
8401
8401
  const manager = new ViolationHistoryManager(historyPath);
8402
8402
  const history = manager.load();
8403
8403
  const options = { windowWeeks, minOccurrences };
@@ -8485,7 +8485,7 @@ async function handleRunCIChecks(input) {
8485
8485
  };
8486
8486
  }
8487
8487
  try {
8488
- const { runCIChecks } = await import("./dist-TKHVYUWZ.js");
8488
+ const { runCIChecks } = await import("./dist-OHDQBTSO.js");
8489
8489
  const skip = input.checks ? VALID_CHECKS.filter((c) => !input.checks.includes(c)) : [];
8490
8490
  const result = await runCIChecks({
8491
8491
  projectRoot: projectPath,
@@ -8547,7 +8547,7 @@ async function handleGenerateBlueprint(input) {
8547
8547
  };
8548
8548
  }
8549
8549
  try {
8550
- const { ProjectScanner } = await import("./dist-TKHVYUWZ.js");
8550
+ const { ProjectScanner } = await import("./dist-OHDQBTSO.js");
8551
8551
  const scanner = new ProjectScanner(projectPath);
8552
8552
  const data = await scanner.scan();
8553
8553
  return {
@@ -8669,6 +8669,125 @@ async function handleSubscribeWebhook(input) {
8669
8669
  return { content: [{ type: "text", text }] };
8670
8670
  }
8671
8671
 
8672
+ // src/mcp/tools/skill-proposal.ts
8673
+ var emitSkillProposalDefinition = {
8674
+ name: "emit_skill_proposal",
8675
+ description: "Emit a skill proposal (new-skill or refinement) into the review queue. Writes `.harness/proposals/<id>.json` and returns the queue URL. The proposal does not gate the agent \u2014 soundness-review runs at approval time.",
8676
+ inputSchema: {
8677
+ type: "object",
8678
+ properties: {
8679
+ path: { type: "string", description: "Path to project root" },
8680
+ kind: {
8681
+ type: "string",
8682
+ enum: ["new-skill", "refinement"],
8683
+ description: "new-skill = full content; refinement = unified-diff against targetSkill"
8684
+ },
8685
+ targetSkill: {
8686
+ type: "string",
8687
+ description: "Existing skill name (required when kind is refinement)"
8688
+ },
8689
+ proposedBy: {
8690
+ type: "string",
8691
+ description: 'Agent identifier, e.g. "claude-code:harness-execution"'
8692
+ },
8693
+ justification: {
8694
+ type: "string",
8695
+ description: "Why this skill / refinement is worth promoting (20\u20132000 chars)"
8696
+ },
8697
+ sessionId: { type: "string", description: "Originating session id (optional)" },
8698
+ taskId: { type: "string", description: "Originating maintenance task id (optional)" },
8699
+ content: {
8700
+ type: "object",
8701
+ description: "Proposal content. new-skill \u21D2 skillYaml+skillMd; refinement \u21D2 diff",
8702
+ properties: {
8703
+ name: {
8704
+ type: "string",
8705
+ description: "kebab-case skill name (matches /^[a-z][a-z0-9-]*$/, \u226464 chars)"
8706
+ },
8707
+ description: { type: "string", description: "20\u2013280 chars" },
8708
+ skillYaml: { type: "string", description: "Full skill.yaml (new-skill only)" },
8709
+ skillMd: { type: "string", description: "Full SKILL.md (new-skill only)" },
8710
+ diff: { type: "string", description: "Unified diff (refinement only)" }
8711
+ },
8712
+ required: ["name", "description"]
8713
+ }
8714
+ },
8715
+ required: ["path", "kind", "proposedBy", "justification", "content"]
8716
+ }
8717
+ };
8718
+ async function handleEmitSkillProposal(input) {
8719
+ let projectPath;
8720
+ try {
8721
+ projectPath = sanitizePath(input.path);
8722
+ } catch (err2) {
8723
+ return mcpError(err2 instanceof Error ? err2.message : "Invalid path");
8724
+ }
8725
+ if (input.kind === "new-skill") {
8726
+ if (!input.content.skillYaml || !input.content.skillMd) {
8727
+ return mcpError("new-skill proposals require both skillYaml and skillMd");
8728
+ }
8729
+ if (input.targetSkill) {
8730
+ return mcpError("targetSkill is forbidden on new-skill proposals");
8731
+ }
8732
+ if (input.content.diff) {
8733
+ return mcpError("diff is forbidden on new-skill proposals (use skillYaml/skillMd)");
8734
+ }
8735
+ } else if (input.kind === "refinement") {
8736
+ if (!input.targetSkill) {
8737
+ return mcpError("refinement proposals require targetSkill");
8738
+ }
8739
+ if (!input.content.diff) {
8740
+ return mcpError("refinement proposals require a unified diff");
8741
+ }
8742
+ if (input.content.skillYaml || input.content.skillMd) {
8743
+ return mcpError("skillYaml/skillMd are forbidden on refinement proposals (encode in diff)");
8744
+ }
8745
+ }
8746
+ let createProposal;
8747
+ let ProposalConflictError;
8748
+ try {
8749
+ const core = await import("./dist-OHDQBTSO.js");
8750
+ createProposal = core.createProposal;
8751
+ ProposalConflictError = core.ProposalConflictError;
8752
+ } catch (err2) {
8753
+ return mcpError(
8754
+ `Failed to load proposal store: ${err2 instanceof Error ? err2.message : "unknown error"}`
8755
+ );
8756
+ }
8757
+ try {
8758
+ const proposal = await createProposal(projectPath, {
8759
+ kind: input.kind,
8760
+ targetSkill: input.targetSkill,
8761
+ proposedBy: input.proposedBy,
8762
+ justification: input.justification,
8763
+ sessionId: input.sessionId,
8764
+ taskId: input.taskId,
8765
+ content: input.content
8766
+ });
8767
+ const result = {
8768
+ id: proposal.id,
8769
+ path: `.harness/proposals/${proposal.id}.json`,
8770
+ queueUrl: "/s/proposals",
8771
+ status: proposal.status
8772
+ };
8773
+ return {
8774
+ content: [
8775
+ {
8776
+ type: "text",
8777
+ text: JSON.stringify(result, null, 2)
8778
+ }
8779
+ ]
8780
+ };
8781
+ } catch (err2) {
8782
+ if (err2 instanceof ProposalConflictError) {
8783
+ return mcpError(err2.message);
8784
+ }
8785
+ return mcpError(
8786
+ `Failed to write proposal: ${err2 instanceof Error ? err2.message : "unknown error"}`
8787
+ );
8788
+ }
8789
+ }
8790
+
8672
8791
  // src/mcp/server.ts
8673
8792
  var TOOL_DEFINITIONS = [
8674
8793
  validateToolDefinition,
@@ -8737,7 +8856,8 @@ var TOOL_DEFINITIONS = [
8737
8856
  subscribeWebhookDefinition,
8738
8857
  searchSessionsDefinition,
8739
8858
  summarizeSessionDefinition,
8740
- insightsSummaryDefinition
8859
+ insightsSummaryDefinition,
8860
+ emitSkillProposalDefinition
8741
8861
  ].map((def) => ({ ...def, trustedOutput: true }));
8742
8862
  var TOOL_HANDLERS = {
8743
8863
  validate_project: handleValidateProject,
@@ -8806,7 +8926,8 @@ var TOOL_HANDLERS = {
8806
8926
  subscribe_webhook: handleSubscribeWebhook,
8807
8927
  search_sessions: handleSearchSessions,
8808
8928
  summarize_session: handleSummarizeSession,
8809
- insights_summary: handleInsightsSummary
8929
+ insights_summary: handleInsightsSummary,
8930
+ emit_skill_proposal: handleEmitSkillProposal
8810
8931
  };
8811
8932
  var RESOURCE_DEFINITIONS = [
8812
8933
  {
@@ -8908,7 +9029,7 @@ async function appendUpdateNotification(result, resolvedRoot) {
8908
9029
  shouldRunCheck,
8909
9030
  readCheckState,
8910
9031
  spawnBackgroundCheck
8911
- } = await import("./dist-TKHVYUWZ.js");
9032
+ } = await import("./dist-OHDQBTSO.js");
8912
9033
  const { CLI_VERSION } = await import("./version-CUI434OP.js");
8913
9034
  const configInterval = readConfigInterval(resolvedRoot);
8914
9035
  const DEFAULT_INTERVAL = 864e5;