@harness-engineering/cli 1.19.0 → 1.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/{agents-md-DFY5W2DJ.js → agents-md-WHXVPOK2.js} +1 -1
  2. package/dist/{architecture-E6PIU27A.js → architecture-45YCLD26.js} +2 -2
  3. package/dist/bin/harness-mcp.js +11 -11
  4. package/dist/bin/harness.js +13 -13
  5. package/dist/{check-phase-gate-PRCIABVA.js → check-phase-gate-2VXVOUJ5.js} +3 -3
  6. package/dist/{chunk-WWXD6MAR.js → chunk-45ZJPG24.js} +1 -1
  7. package/dist/{chunk-ZR2C5FG2.js → chunk-4U4V7A6U.js} +2 -2
  8. package/dist/{chunk-7WS7GIOW.js → chunk-A33LHIRD.js} +1 -1
  9. package/dist/{chunk-7KGLJ74A.js → chunk-H6KZAGHZ.js} +4 -4
  10. package/dist/{chunk-OIPVOH5E.js → chunk-HAJD5LTI.js} +14 -14
  11. package/dist/{chunk-XULGZC2A.js → chunk-IC5CZSHF.js} +42 -0
  12. package/dist/{chunk-I2NEJO3P.js → chunk-LEWXD6PR.js} +1 -1
  13. package/dist/{chunk-DEMZ3JKK.js → chunk-LVJ7SCD7.js} +2 -2
  14. package/dist/{chunk-TCTYRFWX.js → chunk-PDEEQJHH.js} +5 -5
  15. package/dist/{chunk-E7N77TZW.js → chunk-PDOSLTWP.js} +1 -1
  16. package/dist/{chunk-4KE55XRN.js → chunk-SQY4AAKP.js} +98 -84
  17. package/dist/{chunk-DYY3YKA6.js → chunk-V73TEHIF.js} +3 -3
  18. package/dist/{chunk-FUQDDES3.js → chunk-YDOGGQSF.js} +1 -1
  19. package/dist/{ci-workflow-N2TJ7B7G.js → ci-workflow-HWX5OVLI.js} +1 -1
  20. package/dist/{dist-WABFDP2V.js → dist-WHL3NN5S.js} +1 -1
  21. package/dist/{docs-UOCKFYBH.js → docs-FJFY7GF2.js} +3 -3
  22. package/dist/{engine-R24ZLV44.js → engine-R5BZHIZB.js} +1 -1
  23. package/dist/{entropy-5Y32Q6UO.js → entropy-Y2GE4MYS.js} +2 -2
  24. package/dist/{feedback-NANNPO22.js → feedback-FKZ7GMPO.js} +1 -1
  25. package/dist/{generate-agent-definitions-BDHDLUZK.js → generate-agent-definitions-LN3A45OL.js} +1 -1
  26. package/dist/index.d.ts +2 -0
  27. package/dist/index.js +13 -13
  28. package/dist/{loader-NOLQCQGX.js → loader-2TBQUFWX.js} +1 -1
  29. package/dist/{mcp-SDUVCYMR.js → mcp-KEY575NJ.js} +11 -11
  30. package/dist/{performance-AN4AJVEF.js → performance-BSOMMWK5.js} +3 -3
  31. package/dist/{review-pipeline-UBXJ4IAH.js → review-pipeline-KUBHP3RV.js} +1 -1
  32. package/dist/{runtime-23OFHLCZ.js → runtime-BN7KGJAO.js} +1 -1
  33. package/dist/{security-NNEE7IQT.js → security-3T4JGDZP.js} +1 -1
  34. package/dist/{validate-YLMMPRUI.js → validate-R5WGB2AV.js} +2 -2
  35. package/dist/{validate-cross-check-MM23HXVY.js → validate-cross-check-76Z5P6EX.js} +1 -1
  36. package/package.json +4 -4
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  detectEntropyDefinition,
3
3
  handleDetectEntropy
4
- } from "./chunk-ZR2C5FG2.js";
4
+ } from "./chunk-4U4V7A6U.js";
5
5
  import {
6
6
  checkPerformanceDefinition,
7
7
  getCriticalPathsDefinition,
@@ -11,7 +11,7 @@ import {
11
11
  handleGetPerfBaselines,
12
12
  handleUpdatePerfBaselines,
13
13
  updatePerfBaselinesDefinition
14
- } from "./chunk-TCTYRFWX.js";
14
+ } from "./chunk-PDEEQJHH.js";
15
15
  import {
16
16
  analyzeDiffDefinition,
17
17
  createSelfReviewDefinition,
@@ -19,15 +19,15 @@ import {
19
19
  handleCreateSelfReview,
20
20
  handleRequestPeerReview,
21
21
  requestPeerReviewDefinition
22
- } from "./chunk-DYY3YKA6.js";
22
+ } from "./chunk-V73TEHIF.js";
23
23
  import {
24
24
  handleRunSecurityScan,
25
25
  runSecurityScanDefinition
26
- } from "./chunk-I2NEJO3P.js";
26
+ } from "./chunk-LEWXD6PR.js";
27
27
  import {
28
28
  handleRunCodeReview,
29
29
  runCodeReviewDefinition
30
- } from "./chunk-WWXD6MAR.js";
30
+ } from "./chunk-45ZJPG24.js";
31
31
  import {
32
32
  GENERATED_HEADER_CLAUDE,
33
33
  GENERATED_HEADER_CODEX,
@@ -40,25 +40,25 @@ import {
40
40
  import {
41
41
  handleValidateProject,
42
42
  validateToolDefinition
43
- } from "./chunk-DEMZ3JKK.js";
43
+ } from "./chunk-LVJ7SCD7.js";
44
44
  import {
45
45
  loadGraphStore
46
46
  } from "./chunk-CZZXE6BL.js";
47
47
  import {
48
48
  checkDependenciesDefinition,
49
49
  handleCheckDependencies
50
- } from "./chunk-7WS7GIOW.js";
50
+ } from "./chunk-A33LHIRD.js";
51
51
  import {
52
52
  resolveProjectConfig
53
53
  } from "./chunk-H7Y5CKTM.js";
54
54
  import {
55
55
  checkDocsDefinition,
56
56
  handleCheckDocs
57
- } from "./chunk-7KGLJ74A.js";
57
+ } from "./chunk-H6KZAGHZ.js";
58
58
  import {
59
59
  TrackerConfigSchema,
60
60
  resolveConfig
61
- } from "./chunk-FUQDDES3.js";
61
+ } from "./chunk-YDOGGQSF.js";
62
62
  import {
63
63
  resultToMcpResponse
64
64
  } from "./chunk-IDZNPTYD.js";
@@ -87,7 +87,7 @@ import {
87
87
  checkTaint,
88
88
  scanForInjection,
89
89
  writeTaint
90
- } from "./chunk-XULGZC2A.js";
90
+ } from "./chunk-IC5CZSHF.js";
91
91
  import {
92
92
  Err,
93
93
  Ok
@@ -150,6 +150,7 @@ function isDestructiveOperation(toolName, toolInput, workspaceRoot) {
150
150
  function wrapWithInjectionGuard(toolName, handler, options = {}) {
151
151
  const projectRoot = options.projectRoot ?? process.cwd();
152
152
  const sessionId = options.sessionId ?? "default";
153
+ const trustedOutput = options.trustedOutputTools?.has(toolName) ?? false;
153
154
  return async (input) => {
154
155
  try {
155
156
  const taintCheck = checkTaint(projectRoot, sessionId);
@@ -181,29 +182,31 @@ function wrapWithInjectionGuard(toolName, handler, options = {}) {
181
182
  }
182
183
  }
183
184
  const result = await handler(input);
184
- const outputText = extractResultText(result);
185
- if (outputText) {
186
- const outputFindings = scanForInjection(outputText);
187
- const actionableOutput = outputFindings.filter(
188
- (f) => f.severity === "high" || f.severity === "medium"
189
- );
190
- if (actionableOutput.length > 0) {
191
- writeTaint(
192
- projectRoot,
193
- sessionId,
194
- `Injection pattern detected in MCP:${toolName} result`,
195
- actionableOutput,
196
- `MCP:${toolName}:output`
197
- );
198
- const warningLines = actionableOutput.map(
199
- (f) => `Sentinel [${f.severity}] ${f.ruleId}: detected in ${toolName} output`
185
+ if (!trustedOutput) {
186
+ const outputText = extractResultText(result);
187
+ if (outputText) {
188
+ const outputFindings = scanForInjection(outputText);
189
+ const actionableOutput = outputFindings.filter(
190
+ (f) => f.severity === "high" || f.severity === "medium"
200
191
  );
201
- result.content.push({
202
- type: "text",
203
- text: `
192
+ if (actionableOutput.length > 0) {
193
+ writeTaint(
194
+ projectRoot,
195
+ sessionId,
196
+ `Injection pattern detected in MCP:${toolName} result`,
197
+ actionableOutput,
198
+ `MCP:${toolName}:output`
199
+ );
200
+ const warningLines = actionableOutput.map(
201
+ (f) => `Sentinel [${f.severity}] ${f.ruleId}: detected in ${toolName} output`
202
+ );
203
+ result.content.push({
204
+ type: "text",
205
+ text: `
204
206
  ---
205
207
  Sentinel Warning: ${warningLines.join("; ")}`
206
- });
208
+ });
209
+ }
207
210
  }
208
211
  }
209
212
  return result;
@@ -554,7 +557,7 @@ ${skippedMsg}`
554
557
  async function handleInitProject(input) {
555
558
  const i = input;
556
559
  try {
557
- const { TemplateEngine } = await import("./engine-R24ZLV44.js");
560
+ const { TemplateEngine } = await import("./engine-R5BZHIZB.js");
558
561
  const engine = new TemplateEngine(resolveTemplatesDir());
559
562
  const safePath = sanitizePath(i.path);
560
563
  const detected = tryDetectFramework(engine, safePath, i);
@@ -575,7 +578,7 @@ var listPersonasDefinition = {
575
578
  inputSchema: { type: "object", properties: {} }
576
579
  };
577
580
  async function handleListPersonas() {
578
- const { listPersonas } = await import("./loader-NOLQCQGX.js");
581
+ const { listPersonas } = await import("./loader-2TBQUFWX.js");
579
582
  const result = listPersonas(resolvePersonasDir());
580
583
  return resultToMcpResponse(result);
581
584
  }
@@ -599,10 +602,10 @@ async function handleGeneratePersonaArtifacts(input) {
599
602
  if (!/^[a-z0-9][a-z0-9._-]*$/i.test(input.name)) {
600
603
  return resultToMcpResponse(Err(new Error(`Invalid persona name: ${input.name}`)));
601
604
  }
602
- const { loadPersona } = await import("./loader-NOLQCQGX.js");
603
- const { generateRuntime } = await import("./runtime-23OFHLCZ.js");
604
- const { generateAgentsMd } = await import("./agents-md-DFY5W2DJ.js");
605
- const { generateCIWorkflow } = await import("./ci-workflow-N2TJ7B7G.js");
605
+ const { loadPersona } = await import("./loader-2TBQUFWX.js");
606
+ const { generateRuntime } = await import("./runtime-BN7KGJAO.js");
607
+ const { generateAgentsMd } = await import("./agents-md-WHXVPOK2.js");
608
+ const { generateCIWorkflow } = await import("./ci-workflow-HWX5OVLI.js");
606
609
  const personasDir = resolvePersonasDir();
607
610
  const filePath = path3.join(personasDir, `${input.name}.yaml`);
608
611
  if (!filePath.startsWith(personasDir)) {
@@ -657,7 +660,7 @@ async function handleRunPersona(input) {
657
660
  if (!/^[a-z0-9][a-z0-9._-]*$/i.test(input.persona)) {
658
661
  return resultToMcpResponse(Err(new Error(`Invalid persona name: ${input.persona}`)));
659
662
  }
660
- const { loadPersona } = await import("./loader-NOLQCQGX.js");
663
+ const { loadPersona } = await import("./loader-2TBQUFWX.js");
661
664
  const { runPersona } = await import("./runner-VMYLHWOC.js");
662
665
  const { executeSkill } = await import("./skill-executor-XEVDGXUM.js");
663
666
  const personasDir = resolvePersonasDir();
@@ -1275,7 +1278,7 @@ async function autoSyncRoadmap(projectPath) {
1275
1278
  try {
1276
1279
  const roadmapFile = path11.join(projectPath, "docs", "roadmap.md");
1277
1280
  if (!fs10.existsSync(roadmapFile)) return;
1278
- const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges } = await import("./dist-WABFDP2V.js");
1281
+ const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges } = await import("./dist-WHL3NN5S.js");
1279
1282
  const raw = fs10.readFileSync(roadmapFile, "utf-8");
1280
1283
  const parseResult = parseRoadmap(raw);
1281
1284
  if (!parseResult.ok) return;
@@ -1295,9 +1298,14 @@ async function triggerExternalSync(projectPath, roadmapFile) {
1295
1298
  try {
1296
1299
  const trackerConfig = loadTrackerConfig(projectPath);
1297
1300
  if (!trackerConfig) return;
1301
+ const projectEnvPath = path11.join(projectPath, ".env");
1302
+ if (fs10.existsSync(projectEnvPath) && !process.env.GITHUB_TOKEN) {
1303
+ const { config: loadDotenv } = await import("dotenv");
1304
+ loadDotenv({ path: projectEnvPath });
1305
+ }
1298
1306
  const token = process.env.GITHUB_TOKEN;
1299
1307
  if (!token) return;
1300
- const { fullSync, GitHubIssuesSyncAdapter } = await import("./dist-WABFDP2V.js");
1308
+ const { fullSync, GitHubIssuesSyncAdapter } = await import("./dist-WHL3NN5S.js");
1301
1309
  const adapter = new GitHubIssuesSyncAdapter({
1302
1310
  token,
1303
1311
  config: trackerConfig
@@ -1409,12 +1417,12 @@ var manageStateDefinition = {
1409
1417
  }
1410
1418
  };
1411
1419
  async function handleShow(projectPath, input) {
1412
- const { loadState } = await import("./dist-WABFDP2V.js");
1420
+ const { loadState } = await import("./dist-WHL3NN5S.js");
1413
1421
  return resultToMcpResponse(await loadState(projectPath, input.stream, input.session));
1414
1422
  }
1415
1423
  async function handleLearn(projectPath, input) {
1416
1424
  if (!input.learning) return mcpError("Error: learning is required for learn action");
1417
- const { appendLearning } = await import("./dist-WABFDP2V.js");
1425
+ const { appendLearning } = await import("./dist-WHL3NN5S.js");
1418
1426
  const result = await appendLearning(
1419
1427
  projectPath,
1420
1428
  input.learning,
@@ -1429,7 +1437,7 @@ async function handleLearn(projectPath, input) {
1429
1437
  async function handleFailure(projectPath, input) {
1430
1438
  if (!input.description) return mcpError("Error: description is required for failure action");
1431
1439
  if (!input.failureType) return mcpError("Error: failureType is required for failure action");
1432
- const { appendFailure } = await import("./dist-WABFDP2V.js");
1440
+ const { appendFailure } = await import("./dist-WHL3NN5S.js");
1433
1441
  const result = await appendFailure(
1434
1442
  projectPath,
1435
1443
  input.description,
@@ -1442,24 +1450,24 @@ async function handleFailure(projectPath, input) {
1442
1450
  return resultToMcpResponse(Ok({ recorded: true }));
1443
1451
  }
1444
1452
  async function handleArchive(projectPath, input) {
1445
- const { archiveFailures } = await import("./dist-WABFDP2V.js");
1453
+ const { archiveFailures } = await import("./dist-WHL3NN5S.js");
1446
1454
  const result = await archiveFailures(projectPath, input.stream, input.session);
1447
1455
  if (!result.ok) return resultToMcpResponse(result);
1448
1456
  return resultToMcpResponse(Ok({ archived: true }));
1449
1457
  }
1450
1458
  async function handleReset(projectPath, input) {
1451
- const { saveState, DEFAULT_STATE } = await import("./dist-WABFDP2V.js");
1459
+ const { saveState, DEFAULT_STATE } = await import("./dist-WHL3NN5S.js");
1452
1460
  const result = await saveState(projectPath, { ...DEFAULT_STATE }, input.stream, input.session);
1453
1461
  if (!result.ok) return resultToMcpResponse(result);
1454
1462
  return resultToMcpResponse(Ok({ reset: true }));
1455
1463
  }
1456
1464
  async function handleGate(projectPath, _input) {
1457
- const { runMechanicalGate } = await import("./dist-WABFDP2V.js");
1465
+ const { runMechanicalGate } = await import("./dist-WHL3NN5S.js");
1458
1466
  return resultToMcpResponse(await runMechanicalGate(projectPath));
1459
1467
  }
1460
1468
  async function handleSaveHandoff(projectPath, input) {
1461
1469
  if (!input.handoff) return mcpError("Error: handoff is required for save-handoff action");
1462
- const { saveHandoff } = await import("./dist-WABFDP2V.js");
1470
+ const { saveHandoff } = await import("./dist-WHL3NN5S.js");
1463
1471
  const result = await saveHandoff(
1464
1472
  projectPath,
1465
1473
  input.handoff,
@@ -1471,7 +1479,7 @@ async function handleSaveHandoff(projectPath, input) {
1471
1479
  return resultToMcpResponse(Ok({ saved: true }));
1472
1480
  }
1473
1481
  async function handleLoadHandoff(projectPath, input) {
1474
- const { loadHandoff } = await import("./dist-WABFDP2V.js");
1482
+ const { loadHandoff } = await import("./dist-WHL3NN5S.js");
1475
1483
  return resultToMcpResponse(await loadHandoff(projectPath, input.stream, input.session));
1476
1484
  }
1477
1485
  async function handleAppendEntry(projectPath, input) {
@@ -1479,7 +1487,7 @@ async function handleAppendEntry(projectPath, input) {
1479
1487
  if (!input.section) return mcpError("Error: section is required for append_entry action");
1480
1488
  if (!input.authorSkill) return mcpError("Error: authorSkill is required for append_entry action");
1481
1489
  if (!input.content) return mcpError("Error: content is required for append_entry action");
1482
- const { appendSessionEntry } = await import("./dist-WABFDP2V.js");
1490
+ const { appendSessionEntry } = await import("./dist-WHL3NN5S.js");
1483
1491
  const result = await appendSessionEntry(
1484
1492
  projectPath,
1485
1493
  input.session,
@@ -1495,7 +1503,7 @@ async function handleUpdateEntryStatus(projectPath, input) {
1495
1503
  if (!input.entryId) return mcpError("Error: entryId is required for update_entry_status action");
1496
1504
  if (!input.newStatus)
1497
1505
  return mcpError("Error: newStatus is required for update_entry_status action");
1498
- const { updateSessionEntryStatus } = await import("./dist-WABFDP2V.js");
1506
+ const { updateSessionEntryStatus } = await import("./dist-WHL3NN5S.js");
1499
1507
  const result = await updateSessionEntryStatus(
1500
1508
  projectPath,
1501
1509
  input.session,
@@ -1508,7 +1516,7 @@ async function handleUpdateEntryStatus(projectPath, input) {
1508
1516
  async function handleReadSection(projectPath, input) {
1509
1517
  if (!input.session) return mcpError("Error: session is required for read_section action");
1510
1518
  if (!input.section) return mcpError("Error: section is required for read_section action");
1511
- const { readSessionSection } = await import("./dist-WABFDP2V.js");
1519
+ const { readSessionSection } = await import("./dist-WHL3NN5S.js");
1512
1520
  const result = await readSessionSection(
1513
1521
  projectPath,
1514
1522
  input.session,
@@ -1518,13 +1526,13 @@ async function handleReadSection(projectPath, input) {
1518
1526
  }
1519
1527
  async function handleReadSections(projectPath, input) {
1520
1528
  if (!input.session) return mcpError("Error: session is required for read_sections action");
1521
- const { readSessionSections } = await import("./dist-WABFDP2V.js");
1529
+ const { readSessionSections } = await import("./dist-WHL3NN5S.js");
1522
1530
  const result = await readSessionSections(projectPath, input.session);
1523
1531
  return resultToMcpResponse(result);
1524
1532
  }
1525
1533
  async function handleArchiveSession(projectPath, input) {
1526
1534
  if (!input.session) return mcpError("Error: session is required for archive_session action");
1527
- const { archiveSession } = await import("./dist-WABFDP2V.js");
1535
+ const { archiveSession } = await import("./dist-WHL3NN5S.js");
1528
1536
  const result = await archiveSession(projectPath, input.session);
1529
1537
  if (!result.ok) return resultToMcpResponse(result);
1530
1538
  await autoSyncRoadmap(projectPath);
@@ -1588,7 +1596,7 @@ var listStreamsDefinition = {
1588
1596
  };
1589
1597
  async function handleListStreams(input) {
1590
1598
  try {
1591
- const { listStreams, loadStreamIndex } = await import("./dist-WABFDP2V.js");
1599
+ const { listStreams, loadStreamIndex } = await import("./dist-WHL3NN5S.js");
1592
1600
  const projectPath = sanitizePath(input.path);
1593
1601
  const indexResult = await loadStreamIndex(projectPath);
1594
1602
  const streamsResult = await listStreams(projectPath);
@@ -1626,7 +1634,7 @@ var checkPhaseGateDefinition = {
1626
1634
  };
1627
1635
  async function handleCheckPhaseGate(input) {
1628
1636
  try {
1629
- const { runCheckPhaseGate } = await import("./check-phase-gate-PRCIABVA.js");
1637
+ const { runCheckPhaseGate } = await import("./check-phase-gate-2VXVOUJ5.js");
1630
1638
  const result = await runCheckPhaseGate({ cwd: sanitizePath(input.path) });
1631
1639
  if (result.ok) {
1632
1640
  return { content: [{ type: "text", text: JSON.stringify(result.value) }] };
@@ -1682,7 +1690,7 @@ async function handleValidateCrossCheck(input) {
1682
1690
  };
1683
1691
  }
1684
1692
  try {
1685
- const { runCrossCheck } = await import("./validate-cross-check-MM23HXVY.js");
1693
+ const { runCrossCheck } = await import("./validate-cross-check-76Z5P6EX.js");
1686
1694
  const specsDir = path12.resolve(projectPath, input.specsDir ?? "docs/specs");
1687
1695
  if (!specsDir.startsWith(projectPath)) {
1688
1696
  return {
@@ -2327,7 +2335,7 @@ async function handleGenerateSlashCommands(input) {
2327
2335
  // src/mcp/resources/state.ts
2328
2336
  async function getStateResource(projectRoot) {
2329
2337
  try {
2330
- const { loadState, migrateToStreams } = await import("./dist-WABFDP2V.js");
2338
+ const { loadState, migrateToStreams } = await import("./dist-WHL3NN5S.js");
2331
2339
  await migrateToStreams(projectRoot);
2332
2340
  const result = await loadState(projectRoot);
2333
2341
  if (result.ok) {
@@ -3146,7 +3154,7 @@ var generateAgentDefinitionsDefinition = {
3146
3154
  }
3147
3155
  };
3148
3156
  async function handleGenerateAgentDefinitions(input) {
3149
- const { generateAgentDefinitions } = await import("./generate-agent-definitions-BDHDLUZK.js");
3157
+ const { generateAgentDefinitions } = await import("./generate-agent-definitions-LN3A45OL.js");
3150
3158
  const platforms = input.platform === "all" || !input.platform ? ["claude-code", "gemini-cli"] : [input.platform];
3151
3159
  const results = generateAgentDefinitions({
3152
3160
  platforms: [...platforms],
@@ -3443,7 +3451,7 @@ function handleSync(projectPath, input, deps) {
3443
3451
  }
3444
3452
  async function handleManageRoadmap(input) {
3445
3453
  try {
3446
- const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges } = await import("./dist-WABFDP2V.js");
3454
+ const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges } = await import("./dist-WHL3NN5S.js");
3447
3455
  const { Ok: Ok2 } = await import("./dist-USY2C5JL.js");
3448
3456
  const projectPath = sanitizePath(input.path);
3449
3457
  const deps = { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges, Ok: Ok2 };
@@ -3871,7 +3879,7 @@ async function handleTransition(validInput, projectPath, id) {
3871
3879
  const transition = transitionResult.data;
3872
3880
  const prompt = renderTransition(transition);
3873
3881
  try {
3874
- const { saveHandoff } = await import("./dist-WABFDP2V.js");
3882
+ const { saveHandoff } = await import("./dist-WHL3NN5S.js");
3875
3883
  await saveHandoff(
3876
3884
  projectPath,
3877
3885
  {
@@ -3941,7 +3949,7 @@ async function handleEmitInteraction(input) {
3941
3949
  }
3942
3950
  async function recordInteraction(projectPath, id, type, decision, stream) {
3943
3951
  try {
3944
- const { loadState, saveState } = await import("./dist-WABFDP2V.js");
3952
+ const { loadState, saveState } = await import("./dist-WHL3NN5S.js");
3945
3953
  const stateResult = await loadState(projectPath, stream);
3946
3954
  if (stateResult.ok) {
3947
3955
  const state = stateResult.value;
@@ -4030,10 +4038,10 @@ async function handleGatherContext(input) {
4030
4038
  input.include ?? ["state", "learnings", "handoff", "graph", "validation"]
4031
4039
  );
4032
4040
  const errors = [];
4033
- const statePromise = includeSet.has("state") ? import("./dist-WABFDP2V.js").then(
4041
+ const statePromise = includeSet.has("state") ? import("./dist-WHL3NN5S.js").then(
4034
4042
  (core) => core.loadState(projectPath, void 0, input.session)
4035
4043
  ) : Promise.resolve(null);
4036
- const learningsPromise = includeSet.has("learnings") ? import("./dist-WABFDP2V.js").then(
4044
+ const learningsPromise = includeSet.has("learnings") ? import("./dist-WHL3NN5S.js").then(
4037
4045
  (core) => core.loadBudgetedLearnings(projectPath, {
4038
4046
  intent: input.intent,
4039
4047
  tokenBudget: input.learningsBudget ?? 1e3,
@@ -4042,7 +4050,7 @@ async function handleGatherContext(input) {
4042
4050
  ...input.depth !== void 0 && { depth: input.depth }
4043
4051
  })
4044
4052
  ) : Promise.resolve(null);
4045
- const handoffPromise = includeSet.has("handoff") ? import("./dist-WABFDP2V.js").then(
4053
+ const handoffPromise = includeSet.has("handoff") ? import("./dist-WHL3NN5S.js").then(
4046
4054
  (core) => core.loadHandoff(projectPath, void 0, input.session)
4047
4055
  ) : Promise.resolve(null);
4048
4056
  const graphPromise = includeSet.has("graph") ? (async () => {
@@ -4086,11 +4094,11 @@ async function handleGatherContext(input) {
4086
4094
  context: contextBlocks
4087
4095
  };
4088
4096
  })() : Promise.resolve(null);
4089
- const sessionsPromise = includeSet.has("sessions") && input.session ? import("./dist-WABFDP2V.js").then(
4097
+ const sessionsPromise = includeSet.has("sessions") && input.session ? import("./dist-WHL3NN5S.js").then(
4090
4098
  (core) => core.readSessionSections(projectPath, input.session)
4091
4099
  ) : Promise.resolve(null);
4092
4100
  const shouldIncludeEvents = input.includeEvents !== void 0 ? input.includeEvents : includeSet.has("events") || !!input.session && !input.include;
4093
- const eventsPromise = shouldIncludeEvents ? import("./dist-WABFDP2V.js").then(async (core) => {
4101
+ const eventsPromise = shouldIncludeEvents ? import("./dist-WHL3NN5S.js").then(async (core) => {
4094
4102
  const result = await core.loadEvents(projectPath, {
4095
4103
  session: input.session
4096
4104
  });
@@ -4098,7 +4106,7 @@ async function handleGatherContext(input) {
4098
4106
  return core.formatEventTimeline(result.value);
4099
4107
  }) : Promise.resolve(null);
4100
4108
  const validationPromise = includeSet.has("validation") ? (async () => {
4101
- const { handleValidateProject: handleValidateProject2 } = await import("./validate-YLMMPRUI.js");
4109
+ const { handleValidateProject: handleValidateProject2 } = await import("./validate-R5WGB2AV.js");
4102
4110
  const result = await handleValidateProject2({ path: projectPath });
4103
4111
  const first = result.content[0];
4104
4112
  return first ? JSON.parse(first.text) : null;
@@ -4192,7 +4200,7 @@ async function handleGatherContext(input) {
4192
4200
  };
4193
4201
  if (input.session) {
4194
4202
  try {
4195
- const core = await import("./dist-WABFDP2V.js");
4203
+ const core = await import("./dist-WHL3NN5S.js");
4196
4204
  core.updateSessionIndex(
4197
4205
  projectPath,
4198
4206
  input.session,
@@ -4262,7 +4270,7 @@ async function handleAssessProject(input) {
4262
4270
  let validateResult = null;
4263
4271
  if (checksToRun.has("validate")) {
4264
4272
  try {
4265
- const { handleValidateProject: handleValidateProject2 } = await import("./validate-YLMMPRUI.js");
4273
+ const { handleValidateProject: handleValidateProject2 } = await import("./validate-R5WGB2AV.js");
4266
4274
  const result = await handleValidateProject2({ path: projectPath });
4267
4275
  const first = result.content[0];
4268
4276
  const parsed = first ? JSON.parse(first.text) : {};
@@ -4287,7 +4295,7 @@ async function handleAssessProject(input) {
4287
4295
  parallelChecks.push(
4288
4296
  (async () => {
4289
4297
  try {
4290
- const { handleCheckDependencies: handleCheckDependencies2 } = await import("./architecture-E6PIU27A.js");
4298
+ const { handleCheckDependencies: handleCheckDependencies2 } = await import("./architecture-45YCLD26.js");
4291
4299
  const result = await handleCheckDependencies2({ path: projectPath });
4292
4300
  const first = result.content[0];
4293
4301
  const parsed = first ? JSON.parse(first.text) : {};
@@ -4314,7 +4322,7 @@ async function handleAssessProject(input) {
4314
4322
  parallelChecks.push(
4315
4323
  (async () => {
4316
4324
  try {
4317
- const { handleCheckDocs: handleCheckDocs2 } = await import("./docs-UOCKFYBH.js");
4325
+ const { handleCheckDocs: handleCheckDocs2 } = await import("./docs-FJFY7GF2.js");
4318
4326
  const result = await handleCheckDocs2({ path: projectPath, scope: "coverage" });
4319
4327
  const first = result.content[0];
4320
4328
  const parsed = first ? JSON.parse(first.text) : {};
@@ -4341,7 +4349,7 @@ async function handleAssessProject(input) {
4341
4349
  parallelChecks.push(
4342
4350
  (async () => {
4343
4351
  try {
4344
- const { handleDetectEntropy: handleDetectEntropy2 } = await import("./entropy-5Y32Q6UO.js");
4352
+ const { handleDetectEntropy: handleDetectEntropy2 } = await import("./entropy-Y2GE4MYS.js");
4345
4353
  const result = await handleDetectEntropy2({ path: projectPath, type: "all" });
4346
4354
  const first = result.content[0];
4347
4355
  const parsed = first ? JSON.parse(first.text) : {};
@@ -4368,7 +4376,7 @@ async function handleAssessProject(input) {
4368
4376
  parallelChecks.push(
4369
4377
  (async () => {
4370
4378
  try {
4371
- const { handleRunSecurityScan: handleRunSecurityScan2 } = await import("./security-NNEE7IQT.js");
4379
+ const { handleRunSecurityScan: handleRunSecurityScan2 } = await import("./security-3T4JGDZP.js");
4372
4380
  const result = await handleRunSecurityScan2({ path: projectPath });
4373
4381
  const first = result.content[0];
4374
4382
  const parsed = first ? JSON.parse(first.text) : {};
@@ -4400,7 +4408,7 @@ async function handleAssessProject(input) {
4400
4408
  parallelChecks.push(
4401
4409
  (async () => {
4402
4410
  try {
4403
- const { handleCheckPerformance: handleCheckPerformance2 } = await import("./performance-AN4AJVEF.js");
4411
+ const { handleCheckPerformance: handleCheckPerformance2 } = await import("./performance-BSOMMWK5.js");
4404
4412
  const result = await handleCheckPerformance2({ path: projectPath });
4405
4413
  if ("isError" in result && result.isError) {
4406
4414
  const msg = result.content[0]?.text ?? "Performance check failed";
@@ -4603,7 +4611,7 @@ async function handleReviewChanges(input) {
4603
4611
  }
4604
4612
  }
4605
4613
  async function runQuickReview(projectPath, diff, diffLines, downgraded) {
4606
- const { handleAnalyzeDiff: handleAnalyzeDiff2 } = await import("./feedback-NANNPO22.js");
4614
+ const { handleAnalyzeDiff: handleAnalyzeDiff2 } = await import("./feedback-FKZ7GMPO.js");
4607
4615
  const result = await handleAnalyzeDiff2({ diff, path: projectPath });
4608
4616
  const firstContent = result.content[0];
4609
4617
  if (!firstContent) throw new Error("Empty analyze_diff response");
@@ -4634,7 +4642,7 @@ function extractFileCount(diffParsed) {
4634
4642
  return files?.length ?? 0;
4635
4643
  }
4636
4644
  async function runStandardReview(projectPath, diff, diffLines, downgraded) {
4637
- const { handleAnalyzeDiff: handleAnalyzeDiff2, handleCreateSelfReview: handleCreateSelfReview2 } = await import("./feedback-NANNPO22.js");
4645
+ const { handleAnalyzeDiff: handleAnalyzeDiff2, handleCreateSelfReview: handleCreateSelfReview2 } = await import("./feedback-FKZ7GMPO.js");
4638
4646
  const [diffResult, reviewResult] = await Promise.all([
4639
4647
  handleAnalyzeDiff2({ diff, path: projectPath }),
4640
4648
  handleCreateSelfReview2({ path: projectPath, diff })
@@ -4666,7 +4674,7 @@ async function runStandardReview(projectPath, diff, diffLines, downgraded) {
4666
4674
  };
4667
4675
  }
4668
4676
  async function runDeepReview(projectPath, diff, diffLines, _downgraded) {
4669
- const { handleRunCodeReview: handleRunCodeReview2 } = await import("./review-pipeline-UBXJ4IAH.js");
4677
+ const { handleRunCodeReview: handleRunCodeReview2 } = await import("./review-pipeline-KUBHP3RV.js");
4670
4678
  const result = await handleRunCodeReview2({ path: projectPath, diff });
4671
4679
  const deepContent = result.content[0];
4672
4680
  if (!deepContent) throw new Error("Empty code review response");
@@ -4952,7 +4960,7 @@ async function handleDetectStaleConstraints(input) {
4952
4960
  ]
4953
4961
  };
4954
4962
  }
4955
- const { detectStaleConstraints } = await import("./dist-WABFDP2V.js");
4963
+ const { detectStaleConstraints } = await import("./dist-WHL3NN5S.js");
4956
4964
  const result = detectStaleConstraints(
4957
4965
  store,
4958
4966
  windowDays,
@@ -5084,7 +5092,7 @@ async function handleCodeOutline(input) {
5084
5092
  };
5085
5093
  }
5086
5094
  try {
5087
- const { getOutline, formatOutline, EXTENSION_MAP } = await import("./dist-WABFDP2V.js");
5095
+ const { getOutline, formatOutline, EXTENSION_MAP } = await import("./dist-WHL3NN5S.js");
5088
5096
  const { stat } = await import("fs/promises");
5089
5097
  const stats = await stat(targetPath).catch(() => null);
5090
5098
  if (stats?.isFile()) {
@@ -5164,7 +5172,7 @@ async function handleCodeSearch(input) {
5164
5172
  };
5165
5173
  }
5166
5174
  try {
5167
- const { searchSymbols } = await import("./dist-WABFDP2V.js");
5175
+ const { searchSymbols } = await import("./dist-WHL3NN5S.js");
5168
5176
  const result = await searchSymbols(input.query, directory, input.glob);
5169
5177
  const lines = [`Search: "${result.query}" \u2014 ${result.matches.length} matches`];
5170
5178
  for (const match of result.matches) {
@@ -5233,7 +5241,7 @@ async function handleCodeUnfold(input) {
5233
5241
  }
5234
5242
  try {
5235
5243
  if (input.symbol) {
5236
- const { unfoldSymbol } = await import("./dist-WABFDP2V.js");
5244
+ const { unfoldSymbol } = await import("./dist-WHL3NN5S.js");
5237
5245
  const result = await unfoldSymbol(filePath, input.symbol);
5238
5246
  const header = result.warning ? `${result.file}:${result.startLine}-${result.endLine} ${result.warning}
5239
5247
  ` : `${result.file}:${result.startLine}-${result.endLine}
@@ -5241,7 +5249,7 @@ async function handleCodeUnfold(input) {
5241
5249
  return { content: [{ type: "text", text: header + result.content }] };
5242
5250
  }
5243
5251
  if (input.startLine != null && input.endLine != null) {
5244
- const { unfoldRange } = await import("./dist-WABFDP2V.js");
5252
+ const { unfoldRange } = await import("./dist-WHL3NN5S.js");
5245
5253
  const result = await unfoldRange(filePath, input.startLine, input.endLine);
5246
5254
  const header = `${result.file}:${result.startLine}-${result.endLine}
5247
5255
  `;
@@ -5320,7 +5328,7 @@ var TOOL_DEFINITIONS = [
5320
5328
  codeOutlineDefinition,
5321
5329
  codeSearchDefinition,
5322
5330
  codeUnfoldDefinition
5323
- ];
5331
+ ].map((def) => ({ ...def, trustedOutput: true }));
5324
5332
  var TOOL_HANDLERS = {
5325
5333
  validate_project: handleValidateProject,
5326
5334
  check_dependencies: handleCheckDependencies,
@@ -5456,7 +5464,7 @@ async function appendUpdateNotification(result, resolvedRoot) {
5456
5464
  shouldRunCheck,
5457
5465
  readCheckState,
5458
5466
  spawnBackgroundCheck
5459
- } = await import("./dist-WABFDP2V.js");
5467
+ } = await import("./dist-WHL3NN5S.js");
5460
5468
  const { CLI_VERSION } = await import("./version-KFFPOQAX.js");
5461
5469
  const configInterval = readConfigInterval(resolvedRoot);
5462
5470
  const DEFAULT_INTERVAL = 864e5;
@@ -5488,7 +5496,13 @@ function createHarnessServer(projectRoot, toolFilter) {
5488
5496
  server.setRequestHandler(ListToolsRequestSchema, async () => ({
5489
5497
  tools: filteredDefinitions
5490
5498
  }));
5491
- const guardedHandlers = applyInjectionGuard(filteredHandlers, { projectRoot: resolvedRoot });
5499
+ const trustedOutputTools = new Set(
5500
+ filteredDefinitions.filter((t) => t.trustedOutput === true).map((t) => t.name)
5501
+ );
5502
+ const guardedHandlers = applyInjectionGuard(filteredHandlers, {
5503
+ projectRoot: resolvedRoot,
5504
+ trustedOutputTools
5505
+ });
5492
5506
  server.setRequestHandler(CallToolRequestSchema, async (request) => {
5493
5507
  const { name, arguments: args } = request.params;
5494
5508
  const handler = guardedHandlers[name];
@@ -33,7 +33,7 @@ var createSelfReviewDefinition = {
33
33
  };
34
34
  async function handleCreateSelfReview(input) {
35
35
  try {
36
- const { parseDiff, createSelfReview } = await import("./dist-WABFDP2V.js");
36
+ const { parseDiff, createSelfReview } = await import("./dist-WHL3NN5S.js");
37
37
  const parseResult = parseDiff(input.diff);
38
38
  if (!parseResult.ok) {
39
39
  return resultToMcpResponse(parseResult);
@@ -119,7 +119,7 @@ var analyzeDiffDefinition = {
119
119
  };
120
120
  async function handleAnalyzeDiff(input) {
121
121
  try {
122
- const { parseDiff, analyzeDiff } = await import("./dist-WABFDP2V.js");
122
+ const { parseDiff, analyzeDiff } = await import("./dist-WHL3NN5S.js");
123
123
  const parseResult = parseDiff(input.diff);
124
124
  if (!parseResult.ok) {
125
125
  return resultToMcpResponse(parseResult);
@@ -195,7 +195,7 @@ var requestPeerReviewDefinition = {
195
195
  };
196
196
  async function handleRequestPeerReview(input) {
197
197
  try {
198
- const { parseDiff, requestPeerReview } = await import("./dist-WABFDP2V.js");
198
+ const { parseDiff, requestPeerReview } = await import("./dist-WHL3NN5S.js");
199
199
  const parseResult = parseDiff(input.diff);
200
200
  if (!parseResult.ok) {
201
201
  return resultToMcpResponse(parseResult);
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-3WGJMBKH.js";
5
5
  import {
6
6
  ArchConfigSchema
7
- } from "./chunk-XULGZC2A.js";
7
+ } from "./chunk-IC5CZSHF.js";
8
8
  import {
9
9
  Err,
10
10
  Ok
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  generateCIWorkflow
3
3
  } from "./chunk-SD3SQOZ2.js";
4
- import "./chunk-XULGZC2A.js";
4
+ import "./chunk-IC5CZSHF.js";
5
5
  import "./chunk-ERS5EVUZ.js";
6
6
  export {
7
7
  generateCIWorkflow
@@ -291,7 +291,7 @@ import {
291
291
  writeSessionSummary,
292
292
  writeTaint,
293
293
  xssRules
294
- } from "./chunk-XULGZC2A.js";
294
+ } from "./chunk-IC5CZSHF.js";
295
295
  import {
296
296
  Err,
297
297
  Ok,
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  checkDocsDefinition,
3
3
  handleCheckDocs
4
- } from "./chunk-7KGLJ74A.js";
5
- import "./chunk-FUQDDES3.js";
4
+ } from "./chunk-H6KZAGHZ.js";
5
+ import "./chunk-YDOGGQSF.js";
6
6
  import "./chunk-IDZNPTYD.js";
7
7
  import "./chunk-W6Y7ZW3Y.js";
8
8
  import "./chunk-3WGJMBKH.js";
9
- import "./chunk-XULGZC2A.js";
9
+ import "./chunk-IC5CZSHF.js";
10
10
  import "./chunk-ERS5EVUZ.js";
11
11
  export {
12
12
  checkDocsDefinition,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  TemplateEngine
3
3
  } from "./chunk-YLN34N65.js";
4
- import "./chunk-XULGZC2A.js";
4
+ import "./chunk-IC5CZSHF.js";
5
5
  import "./chunk-ERS5EVUZ.js";
6
6
  export {
7
7
  TemplateEngine