@harness-engineering/cli 1.24.3 → 1.25.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 (106) hide show
  1. package/dist/agents/skills/claude-code/harness-architecture-advisor/SKILL.md +10 -6
  2. package/dist/agents/skills/claude-code/harness-code-review/SKILL.md +40 -5
  3. package/dist/agents/skills/claude-code/harness-git-workflow/SKILL.md +32 -11
  4. package/dist/agents/skills/claude-code/harness-planning/SKILL.md +19 -0
  5. package/dist/agents/skills/claude-code/harness-skill-authoring/SKILL.md +42 -7
  6. package/dist/agents/skills/claude-code/harness-verification/SKILL.md +25 -0
  7. package/dist/agents/skills/codex/harness-architecture-advisor/SKILL.md +10 -6
  8. package/dist/agents/skills/codex/harness-code-review/SKILL.md +40 -5
  9. package/dist/agents/skills/codex/harness-git-workflow/SKILL.md +32 -11
  10. package/dist/agents/skills/codex/harness-planning/SKILL.md +19 -0
  11. package/dist/agents/skills/codex/harness-skill-authoring/SKILL.md +42 -7
  12. package/dist/agents/skills/codex/harness-verification/SKILL.md +25 -0
  13. package/dist/agents/skills/cursor/harness-architecture-advisor/SKILL.md +10 -6
  14. package/dist/agents/skills/cursor/harness-code-review/SKILL.md +40 -5
  15. package/dist/agents/skills/cursor/harness-git-workflow/SKILL.md +32 -11
  16. package/dist/agents/skills/cursor/harness-planning/SKILL.md +19 -0
  17. package/dist/agents/skills/cursor/harness-skill-authoring/SKILL.md +42 -7
  18. package/dist/agents/skills/cursor/harness-verification/SKILL.md +25 -0
  19. package/dist/agents/skills/gemini-cli/harness-architecture-advisor/SKILL.md +10 -6
  20. package/dist/agents/skills/gemini-cli/harness-code-review/SKILL.md +40 -5
  21. package/dist/agents/skills/gemini-cli/harness-git-workflow/SKILL.md +32 -11
  22. package/dist/agents/skills/gemini-cli/harness-planning/SKILL.md +19 -0
  23. package/dist/agents/skills/gemini-cli/harness-skill-authoring/SKILL.md +42 -7
  24. package/dist/agents/skills/gemini-cli/harness-verification/SKILL.md +25 -0
  25. package/dist/agents-md-MCUM4SIZ.js +10 -0
  26. package/dist/{architecture-FBSLURIB.js → architecture-HNIO6AUX.js} +6 -5
  27. package/dist/{assess-project-74UVWPMB.js → assess-project-6MV5TNY3.js} +2 -1
  28. package/dist/bin/harness-mcp.js +18 -17
  29. package/dist/bin/harness.js +47 -31
  30. package/dist/{check-phase-gate-WY6UICCL.js → check-phase-gate-VCBQHQAC.js} +6 -5
  31. package/dist/{chunk-Q3XYV5UC.js → chunk-47N6R2F4.js} +5 -1
  32. package/dist/{chunk-3XAPHB2Z.js → chunk-4NK7Z3BP.js} +1 -1
  33. package/dist/{chunk-I4QR3HNH.js → chunk-5BQ5BOJL.js} +5 -1
  34. package/dist/{chunk-LM5Z2WCA.js → chunk-6VZQJ5CX.js} +5 -1
  35. package/dist/{chunk-NV4FPO7J.js → chunk-AT74HEQM.js} +1 -1
  36. package/dist/{chunk-ZAMT24QN.js → chunk-AZT567I6.js} +1525 -735
  37. package/dist/{chunk-TDLOFNNQ.js → chunk-BOQRTARD.js} +1 -1
  38. package/dist/{chunk-A737JDL4.js → chunk-CXJTVICF.js} +4 -4
  39. package/dist/{chunk-LOUH2LIC.js → chunk-EHRZMOQ2.js} +5 -1
  40. package/dist/{chunk-L5UONZ53.js → chunk-F23H3U5U.js} +6 -2
  41. package/dist/{chunk-YPKKEP3O.js → chunk-FES2YEQU.js} +9 -9
  42. package/dist/{chunk-SPTKLCKC.js → chunk-FIQL2HND.js} +6 -2
  43. package/dist/{chunk-FP53DDB5.js → chunk-FSNPBT74.js} +5 -1
  44. package/dist/{chunk-TB427QOK.js → chunk-GEEYCQDS.js} +13 -9
  45. package/dist/{chunk-ZOVATVQC.js → chunk-HIK6OEUF.js} +6 -1
  46. package/dist/chunk-K2SON7TI.js +5382 -0
  47. package/dist/chunk-KFQGP6VL.js +33 -0
  48. package/dist/{chunk-V2FGX2KD.js → chunk-M55DGGF3.js} +9 -5
  49. package/dist/{chunk-H4U2QNY2.js → chunk-MI6MA6OP.js} +16888 -13143
  50. package/dist/{chunk-YDRB55Q4.js → chunk-P7PANON5.js} +5 -1
  51. package/dist/chunk-RL4VMEXL.js +53 -0
  52. package/dist/{chunk-XNEMDKV5.js → chunk-RRHUCDRD.js} +1 -1
  53. package/dist/{chunk-O6UF33QH.js → chunk-RX7TUMBR.js} +320 -136
  54. package/dist/{chunk-3VYWO6QN.js → chunk-TYV4EUAD.js} +12 -8
  55. package/dist/{chunk-FJYP32IV.js → chunk-UQZBZINS.js} +6 -6
  56. package/dist/{chunk-UFQQBGC3.js → chunk-UV3BZMGT.js} +64 -3
  57. package/dist/{chunk-5PMRARB5.js → chunk-WIQA4BSH.js} +12 -5
  58. package/dist/{chunk-UQEUYRBP.js → chunk-WWACIIBA.js} +1 -1
  59. package/dist/{chunk-LVYPPKZI.js → chunk-XTITAVUR.js} +5 -1
  60. package/dist/{chunk-WEN5Z7CL.js → chunk-YTP2UDPV.js} +3 -3
  61. package/dist/ci-workflow-RTM7VVTD.js +10 -0
  62. package/dist/{constants-5JGUXPEK.js → constants-P4M3C2T3.js} +1 -0
  63. package/dist/{create-skill-QCXINA5Q.js → create-skill-6QWJHQYS.js} +3 -2
  64. package/dist/{dist-666AAZQ6.js → dist-3EWNRFFQ.js} +6 -1
  65. package/dist/{dist-RRMRZRV7.js → dist-ABTKRYZH.js} +1 -0
  66. package/dist/{dist-QW5G3GX3.js → dist-RADHOOXG.js} +4 -1
  67. package/dist/{dist-7EBSGAHX.js → dist-WCSJHQPK.js} +106 -3
  68. package/dist/{docs-H34GBVRS.js → docs-UBOGGHTY.js} +6 -5
  69. package/dist/engine-MJJAP5CH.js +10 -0
  70. package/dist/{entropy-ZAY73R6A.js → entropy-EMSXF2PX.js} +5 -4
  71. package/dist/{feedback-TMEGYMWU.js → feedback-ZLUX72HD.js} +2 -1
  72. package/dist/{generate-agent-definitions-PQPG6SX5.js → generate-agent-definitions-AWLPJ27C.js} +6 -5
  73. package/dist/{glob-helper-SRXMZPKM.js → glob-helper-VCQXK5XY.js} +2 -0
  74. package/dist/{graph-loader-M6FXJAKK.js → graph-loader-JHQVQRUS.js} +2 -1
  75. package/dist/index.d.ts +13 -7
  76. package/dist/index.js +30 -29
  77. package/dist/loader-JVSJZSWZ.js +12 -0
  78. package/dist/mcp-2553PNUC.js +38 -0
  79. package/dist/{performance-N67YJJDG.js → performance-7AGWJUY4.js} +6 -5
  80. package/dist/review-pipeline-ZWVQJTJX.js +13 -0
  81. package/dist/{runner-TY7DJGQV.js → runner-AAEF2TXY.js} +1 -0
  82. package/dist/runtime-D6YUQPP2.js +11 -0
  83. package/dist/{scan-U67OKDRS.js → scan-MPJ6JHUY.js} +2 -1
  84. package/dist/security-JLZUAQYT.js +14 -0
  85. package/dist/skill-executor-MOCUIAYS.js +9 -0
  86. package/dist/templates/base/.agnix.toml +16 -0
  87. package/dist/templates/orchestrator/WORKFLOW.md +55 -7
  88. package/dist/templates/orchestrator/template.json +1 -0
  89. package/dist/tool-tiers-7QGZ3FKY.js +98 -0
  90. package/dist/validate-TIIHRPMA.js +14 -0
  91. package/dist/validate-cross-check-ZOWFA3DB.js +10 -0
  92. package/dist/{version-KFFPOQAX.js → version-CUI434OP.js} +1 -0
  93. package/package.json +4 -4
  94. package/dist/agents-md-PBKKTSQY.js +0 -9
  95. package/dist/chunk-5LMZA5LZ.js +0 -38
  96. package/dist/chunk-OZIHPMA7.js +0 -5171
  97. package/dist/ci-workflow-QZRHAIO2.js +0 -9
  98. package/dist/engine-VUQEAJFZ.js +0 -9
  99. package/dist/loader-Y6A42WBD.js +0 -11
  100. package/dist/mcp-LCHC4NZ5.js +0 -37
  101. package/dist/review-pipeline-YXF5ITL2.js +0 -12
  102. package/dist/runtime-XNJUJCSG.js +0 -10
  103. package/dist/security-L2YN3CTI.js +0 -9
  104. package/dist/skill-executor-GA7BDX3F.js +0 -8
  105. package/dist/validate-MNE25KLZ.js +0 -13
  106. package/dist/validate-cross-check-Y4PDR63C.js +0 -9
@@ -5,39 +5,41 @@ import {
5
5
  handleCreateSelfReview,
6
6
  handleRequestPeerReview,
7
7
  requestPeerReviewDefinition
8
- } from "./chunk-YPKKEP3O.js";
8
+ } from "./chunk-FES2YEQU.js";
9
9
  import {
10
+ getSecurityTrendsDefinition,
11
+ handleGetSecurityTrends,
10
12
  handleRunSecurityScan,
11
13
  runSecurityScanDefinition
12
- } from "./chunk-UFQQBGC3.js";
14
+ } from "./chunk-UV3BZMGT.js";
13
15
  import {
14
16
  handleRunCodeReview,
15
17
  runCodeReviewDefinition,
16
18
  sortFindingsBySeverity
17
- } from "./chunk-L5UONZ53.js";
19
+ } from "./chunk-F23H3U5U.js";
18
20
  import {
19
21
  assessProjectDefinition,
20
22
  handleAssessProject
21
- } from "./chunk-FJYP32IV.js";
23
+ } from "./chunk-UQZBZINS.js";
22
24
  import {
23
25
  handleValidateProject,
24
26
  validateToolDefinition
25
- } from "./chunk-WEN5Z7CL.js";
27
+ } from "./chunk-YTP2UDPV.js";
26
28
  import {
27
29
  checkDependenciesDefinition,
28
30
  handleCheckDependencies
29
- } from "./chunk-A737JDL4.js";
31
+ } from "./chunk-CXJTVICF.js";
30
32
  import {
31
33
  resolveProjectConfig
32
- } from "./chunk-Q3XYV5UC.js";
34
+ } from "./chunk-47N6R2F4.js";
33
35
  import {
34
36
  checkDocsDefinition,
35
37
  handleCheckDocs
36
- } from "./chunk-TB427QOK.js";
38
+ } from "./chunk-GEEYCQDS.js";
37
39
  import {
38
40
  detectEntropyDefinition,
39
41
  handleDetectEntropy
40
- } from "./chunk-V2FGX2KD.js";
42
+ } from "./chunk-M55DGGF3.js";
41
43
  import {
42
44
  checkPerformanceDefinition,
43
45
  getCriticalPathsDefinition,
@@ -47,7 +49,7 @@ import {
47
49
  handleGetPerfBaselines,
48
50
  handleUpdatePerfBaselines,
49
51
  updatePerfBaselinesDefinition
50
- } from "./chunk-3VYWO6QN.js";
52
+ } from "./chunk-TYV4EUAD.js";
51
53
  import {
52
54
  resultToMcpResponse
53
55
  } from "./chunk-EPUKTTJZ.js";
@@ -55,9 +57,8 @@ import {
55
57
  sanitizePath
56
58
  } from "./chunk-W6Y7ZW3Y.js";
57
59
  import {
58
- TrackerConfigSchema,
59
60
  resolveConfig
60
- } from "./chunk-5PMRARB5.js";
61
+ } from "./chunk-WIQA4BSH.js";
61
62
  import {
62
63
  GENERATED_HEADER_CLAUDE,
63
64
  GENERATED_HEADER_CODEX,
@@ -79,7 +80,7 @@ import {
79
80
  } from "./chunk-6B6UN6SG.js";
80
81
  import {
81
82
  loadGraphStore
82
- } from "./chunk-TDLOFNNQ.js";
83
+ } from "./chunk-BOQRTARD.js";
83
84
  import {
84
85
  CompactionPipeline,
85
86
  DEFAULT_TOKEN_BUDGET,
@@ -87,20 +88,24 @@ import {
87
88
  StructuralStrategy,
88
89
  TruncationStrategy,
89
90
  checkTaint,
91
+ computeLoadPlan,
90
92
  detectChangeType,
91
93
  estimateTokens,
94
+ extractLevel,
95
+ init_dist,
96
+ loadTrackerSyncConfig,
92
97
  paginate,
93
98
  scanForInjection,
94
99
  serializeEnvelope,
95
100
  writeTaint
96
- } from "./chunk-H4U2QNY2.js";
101
+ } from "./chunk-MI6MA6OP.js";
97
102
  import {
98
103
  Err,
99
104
  Ok
100
- } from "./chunk-5LMZA5LZ.js";
105
+ } from "./chunk-RL4VMEXL.js";
101
106
  import {
102
107
  SkillMetadataSchema
103
- } from "./chunk-ZOVATVQC.js";
108
+ } from "./chunk-HIK6OEUF.js";
104
109
  import {
105
110
  CLIError,
106
111
  ExitCode,
@@ -118,6 +123,7 @@ import {
118
123
  } from "@modelcontextprotocol/sdk/types.js";
119
124
 
120
125
  // src/mcp/middleware/injection-guard.ts
126
+ init_dist();
121
127
  import { realpathSync } from "fs";
122
128
  import { resolve } from "path";
123
129
  function isDestructiveBash(command) {
@@ -238,6 +244,7 @@ function applyInjectionGuard(handlers, options = {}) {
238
244
  }
239
245
 
240
246
  // src/mcp/middleware/compaction.ts
247
+ init_dist();
241
248
  var DEFAULT_PIPELINE = new CompactionPipeline([
242
249
  new StructuralStrategy(),
243
250
  new TruncationStrategy()
@@ -339,7 +346,7 @@ var generateLinterDefinition = {
339
346
  };
340
347
  async function handleGenerateLinter(input) {
341
348
  try {
342
- const { generate } = await import("./dist-RRMRZRV7.js");
349
+ const { generate } = await import("./dist-ABTKRYZH.js");
343
350
  const result = await generate({
344
351
  configPath: sanitizePath(input.configPath),
345
352
  ...input.outputDir !== void 0 && { outputDir: sanitizePath(input.outputDir) }
@@ -373,7 +380,7 @@ var validateLinterConfigDefinition = {
373
380
  };
374
381
  async function handleValidateLinterConfig(input) {
375
382
  try {
376
- const { validate } = await import("./dist-RRMRZRV7.js");
383
+ const { validate } = await import("./dist-ABTKRYZH.js");
377
384
  const result = await validate({ configPath: sanitizePath(input.configPath) });
378
385
  if ("success" in result && result.success) {
379
386
  return { content: [{ type: "text", text: JSON.stringify(result) }] };
@@ -571,6 +578,9 @@ skills-index.json
571
578
  stack-profile.json
572
579
  metrics/
573
580
  events.jsonl
581
+ .install-id
582
+ telemetry.json
583
+ .telemetry-notice-shown
574
584
  `;
575
585
  fs.mkdirSync(path.dirname(gitignorePath), { recursive: true });
576
586
  fs.writeFileSync(gitignorePath, content);
@@ -683,7 +693,7 @@ ${skippedMsg}`
683
693
  async function handleInitProject(input) {
684
694
  const i = input;
685
695
  try {
686
- const { TemplateEngine } = await import("./engine-VUQEAJFZ.js");
696
+ const { TemplateEngine } = await import("./engine-MJJAP5CH.js");
687
697
  const engine = new TemplateEngine(resolveTemplatesDir());
688
698
  const safePath = sanitizePath(i.path);
689
699
  const detected = tryDetectFramework(engine, safePath, i);
@@ -697,6 +707,7 @@ async function handleInitProject(input) {
697
707
  }
698
708
 
699
709
  // src/mcp/tools/persona.ts
710
+ init_dist();
700
711
  import * as path3 from "path";
701
712
  var listPersonasDefinition = {
702
713
  name: "list_personas",
@@ -704,7 +715,7 @@ var listPersonasDefinition = {
704
715
  inputSchema: { type: "object", properties: {} }
705
716
  };
706
717
  async function handleListPersonas() {
707
- const { listPersonas } = await import("./loader-Y6A42WBD.js");
718
+ const { listPersonas } = await import("./loader-JVSJZSWZ.js");
708
719
  const result = listPersonas(resolvePersonasDir());
709
720
  return resultToMcpResponse(result);
710
721
  }
@@ -728,10 +739,10 @@ async function handleGeneratePersonaArtifacts(input) {
728
739
  if (!/^[a-z0-9][a-z0-9._-]*$/i.test(input.name)) {
729
740
  return resultToMcpResponse(Err(new Error(`Invalid persona name: ${input.name}`)));
730
741
  }
731
- const { loadPersona } = await import("./loader-Y6A42WBD.js");
732
- const { generateRuntime } = await import("./runtime-XNJUJCSG.js");
733
- const { generateAgentsMd } = await import("./agents-md-PBKKTSQY.js");
734
- const { generateCIWorkflow } = await import("./ci-workflow-QZRHAIO2.js");
742
+ const { loadPersona } = await import("./loader-JVSJZSWZ.js");
743
+ const { generateRuntime } = await import("./runtime-D6YUQPP2.js");
744
+ const { generateAgentsMd } = await import("./agents-md-MCUM4SIZ.js");
745
+ const { generateCIWorkflow } = await import("./ci-workflow-RTM7VVTD.js");
735
746
  const personasDir = resolvePersonasDir();
736
747
  const filePath = path3.join(personasDir, `${input.name}.yaml`);
737
748
  if (!filePath.startsWith(personasDir)) {
@@ -786,9 +797,9 @@ async function handleRunPersona(input) {
786
797
  if (!/^[a-z0-9][a-z0-9._-]*$/i.test(input.persona)) {
787
798
  return resultToMcpResponse(Err(new Error(`Invalid persona name: ${input.persona}`)));
788
799
  }
789
- const { loadPersona } = await import("./loader-Y6A42WBD.js");
790
- const { runPersona } = await import("./runner-TY7DJGQV.js");
791
- const { executeSkill } = await import("./skill-executor-GA7BDX3F.js");
800
+ const { loadPersona } = await import("./loader-JVSJZSWZ.js");
801
+ const { runPersona } = await import("./runner-AAEF2TXY.js");
802
+ const { executeSkill } = await import("./skill-executor-MOCUIAYS.js");
792
803
  const personasDir = resolvePersonasDir();
793
804
  const filePath = path3.join(personasDir, `${input.persona}.yaml`);
794
805
  if (!filePath.startsWith(personasDir)) {
@@ -798,7 +809,7 @@ async function handleRunPersona(input) {
798
809
  if (!personaResult.ok) return resultToMcpResponse(personaResult);
799
810
  const projectPath = input.path ? sanitizePath(input.path) : process.cwd();
800
811
  const trigger = input.trigger ?? "auto";
801
- const { ALLOWED_PERSONA_COMMANDS } = await import("./constants-5JGUXPEK.js");
812
+ const { ALLOWED_PERSONA_COMMANDS } = await import("./constants-P4M3C2T3.js");
802
813
  const commandExecutor = async (command) => {
803
814
  if (!ALLOWED_PERSONA_COMMANDS.has(command)) {
804
815
  return Err(new Error(`Unknown harness command: ${command}`));
@@ -952,6 +963,7 @@ async function handleRunAgentTask(input) {
952
963
  }
953
964
 
954
965
  // src/mcp/tools/skill.ts
966
+ init_dist();
955
967
  import * as fs5 from "fs";
956
968
  import * as path6 from "path";
957
969
  import { parse as parseYaml } from "yaml";
@@ -1178,7 +1190,13 @@ function parseSkillEntry(yamlPath, source, tierOverrides) {
1178
1190
  relatedSkills: meta.related_skills ?? [],
1179
1191
  source,
1180
1192
  addresses: meta.addresses ?? [],
1181
- dependsOn: meta.depends_on ?? []
1193
+ dependsOn: meta.depends_on ?? [],
1194
+ ...meta.context_budget && {
1195
+ contextBudget: {
1196
+ maxTokens: meta.context_budget.max_tokens,
1197
+ priority: meta.context_budget.priority
1198
+ }
1199
+ }
1182
1200
  };
1183
1201
  }
1184
1202
  function scanDirectory(dir, source, index, tierOverrides) {
@@ -1356,6 +1374,30 @@ async function handleRunSkill(input) {
1356
1374
  return resultToMcpResponse(Err(new Error(`SKILL.md not found for skill: ${input.skill}`)));
1357
1375
  }
1358
1376
  let content = fs5.readFileSync(skillMdPath, "utf-8");
1377
+ const projectRoot = input.path ? sanitizePath(input.path) : process.cwd();
1378
+ const configResult = resolveConfig();
1379
+ const skillsConfig = configResult.ok ? configResult.value.skills : void 0;
1380
+ let sharedIndex;
1381
+ try {
1382
+ sharedIndex = loadOrRebuildIndex("claude-code", projectRoot, skillsConfig?.tierOverrides);
1383
+ const plan = computeLoadPlan(
1384
+ Object.entries(sharedIndex.skills).map(([name, entry]) => {
1385
+ const skill = { name };
1386
+ if (entry.contextBudget) {
1387
+ skill.budget = {
1388
+ max_tokens: entry.contextBudget.maxTokens,
1389
+ priority: entry.contextBudget.priority
1390
+ };
1391
+ }
1392
+ return skill;
1393
+ })
1394
+ );
1395
+ const skillPlan = plan.find((p) => p.skillName === input.skill);
1396
+ if (skillPlan && skillPlan.level < 5) {
1397
+ content = extractLevel(content, skillPlan.level);
1398
+ }
1399
+ } catch {
1400
+ }
1359
1401
  if (input.path) {
1360
1402
  const projectPath = sanitizePath(input.path);
1361
1403
  const stateFile = path6.join(projectPath, ".harness", "state.json");
@@ -1387,11 +1429,7 @@ ${stateContent}
1387
1429
  }
1388
1430
  if (isTier1Skill(input.skill)) {
1389
1431
  try {
1390
- const projectRoot = input.path ? sanitizePath(input.path) : process.cwd();
1391
- const platform = "claude-code";
1392
- const configResult = resolveConfig();
1393
- const skillsConfig = configResult.ok ? configResult.value.skills : void 0;
1394
- const index = loadOrRebuildIndex(platform, projectRoot, skillsConfig?.tierOverrides);
1432
+ const index = sharedIndex ?? loadOrRebuildIndex("claude-code", projectRoot, skillsConfig?.tierOverrides);
1395
1433
  const profile = loadOrGenerateProfile(projectRoot);
1396
1434
  const taskDesc = [input.skill, input.phase].filter(Boolean).join(" ");
1397
1435
  const result = suggest(index, taskDesc, profile, [], skillsConfig);
@@ -1431,7 +1469,7 @@ var createSkillDefinition = {
1431
1469
  };
1432
1470
  async function handleCreateSkill(input) {
1433
1471
  try {
1434
- const { generateSkillFiles } = await import("./create-skill-QCXINA5Q.js");
1472
+ const { generateSkillFiles } = await import("./create-skill-6QWJHQYS.js");
1435
1473
  const result = generateSkillFiles({
1436
1474
  name: input.name,
1437
1475
  description: input.description,
@@ -1542,14 +1580,18 @@ async function getLearningsResource(projectRoot) {
1542
1580
  return sections.length > 0 ? sections.join("\n\n---\n\n") : "No learnings files found.";
1543
1581
  }
1544
1582
 
1583
+ // src/mcp/tools/state.ts
1584
+ init_dist();
1585
+
1545
1586
  // src/mcp/tools/roadmap-auto-sync.ts
1587
+ init_dist();
1546
1588
  import * as fs10 from "fs";
1547
1589
  import * as path11 from "path";
1548
1590
  async function autoSyncRoadmap(projectPath) {
1549
1591
  try {
1550
1592
  const roadmapFile = path11.join(projectPath, "docs", "roadmap.md");
1551
1593
  if (!fs10.existsSync(roadmapFile)) return;
1552
- const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges } = await import("./dist-7EBSGAHX.js");
1594
+ const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges } = await import("./dist-WCSJHQPK.js");
1553
1595
  const raw = fs10.readFileSync(roadmapFile, "utf-8");
1554
1596
  const parseResult = parseRoadmap(raw);
1555
1597
  if (!parseResult.ok) return;
@@ -1567,7 +1609,7 @@ async function autoSyncRoadmap(projectPath) {
1567
1609
  }
1568
1610
  async function triggerExternalSync(projectPath, roadmapFile) {
1569
1611
  try {
1570
- const trackerConfig = loadTrackerConfig(projectPath);
1612
+ const trackerConfig = loadTrackerSyncConfig(projectPath);
1571
1613
  if (!trackerConfig) return;
1572
1614
  const projectEnvPath = path11.join(projectPath, ".env");
1573
1615
  if (fs10.existsSync(projectEnvPath) && !process.env.GITHUB_TOKEN) {
@@ -1575,8 +1617,11 @@ async function triggerExternalSync(projectPath, roadmapFile) {
1575
1617
  loadDotenv({ path: projectEnvPath });
1576
1618
  }
1577
1619
  const token = process.env.GITHUB_TOKEN;
1578
- if (!token) return;
1579
- const { fullSync, GitHubIssuesSyncAdapter } = await import("./dist-7EBSGAHX.js");
1620
+ if (!token) {
1621
+ console.warn("[roadmap-sync] GITHUB_TOKEN not found \u2014 external sync skipped");
1622
+ return;
1623
+ }
1624
+ const { fullSync, GitHubIssuesSyncAdapter } = await import("./dist-WCSJHQPK.js");
1580
1625
  const adapter = new GitHubIssuesSyncAdapter({
1581
1626
  token,
1582
1627
  config: trackerConfig
@@ -1595,21 +1640,6 @@ async function triggerExternalSync(projectPath, roadmapFile) {
1595
1640
  );
1596
1641
  }
1597
1642
  }
1598
- function loadTrackerConfig(projectPath) {
1599
- try {
1600
- const configPath = path11.join(projectPath, "harness.config.json");
1601
- if (!fs10.existsSync(configPath)) return null;
1602
- const raw = fs10.readFileSync(configPath, "utf-8");
1603
- const config = JSON.parse(raw);
1604
- const trackerRaw = config.roadmap?.tracker;
1605
- if (!trackerRaw) return null;
1606
- const parsed = TrackerConfigSchema.safeParse(trackerRaw);
1607
- if (!parsed.success) return null;
1608
- return parsed.data;
1609
- } catch {
1610
- return null;
1611
- }
1612
- }
1613
1643
 
1614
1644
  // src/mcp/utils.ts
1615
1645
  function mcpError(text) {
@@ -1688,12 +1718,12 @@ var manageStateDefinition = {
1688
1718
  }
1689
1719
  };
1690
1720
  async function handleShow(projectPath, input) {
1691
- const { loadState } = await import("./dist-7EBSGAHX.js");
1721
+ const { loadState } = await import("./dist-WCSJHQPK.js");
1692
1722
  return resultToMcpResponse(await loadState(projectPath, input.stream, input.session));
1693
1723
  }
1694
1724
  async function handleLearn(projectPath, input) {
1695
1725
  if (!input.learning) return mcpError("Error: learning is required for learn action");
1696
- const { appendLearning } = await import("./dist-7EBSGAHX.js");
1726
+ const { appendLearning } = await import("./dist-WCSJHQPK.js");
1697
1727
  const result = await appendLearning(
1698
1728
  projectPath,
1699
1729
  input.learning,
@@ -1708,7 +1738,7 @@ async function handleLearn(projectPath, input) {
1708
1738
  async function handleFailure(projectPath, input) {
1709
1739
  if (!input.description) return mcpError("Error: description is required for failure action");
1710
1740
  if (!input.failureType) return mcpError("Error: failureType is required for failure action");
1711
- const { appendFailure } = await import("./dist-7EBSGAHX.js");
1741
+ const { appendFailure } = await import("./dist-WCSJHQPK.js");
1712
1742
  const result = await appendFailure(
1713
1743
  projectPath,
1714
1744
  input.description,
@@ -1721,24 +1751,24 @@ async function handleFailure(projectPath, input) {
1721
1751
  return resultToMcpResponse(Ok({ recorded: true }));
1722
1752
  }
1723
1753
  async function handleArchive(projectPath, input) {
1724
- const { archiveFailures } = await import("./dist-7EBSGAHX.js");
1754
+ const { archiveFailures } = await import("./dist-WCSJHQPK.js");
1725
1755
  const result = await archiveFailures(projectPath, input.stream, input.session);
1726
1756
  if (!result.ok) return resultToMcpResponse(result);
1727
1757
  return resultToMcpResponse(Ok({ archived: true }));
1728
1758
  }
1729
1759
  async function handleReset(projectPath, input) {
1730
- const { saveState, DEFAULT_STATE } = await import("./dist-7EBSGAHX.js");
1760
+ const { saveState, DEFAULT_STATE } = await import("./dist-WCSJHQPK.js");
1731
1761
  const result = await saveState(projectPath, { ...DEFAULT_STATE }, input.stream, input.session);
1732
1762
  if (!result.ok) return resultToMcpResponse(result);
1733
1763
  return resultToMcpResponse(Ok({ reset: true }));
1734
1764
  }
1735
1765
  async function handleGate(projectPath, _input) {
1736
- const { runMechanicalGate } = await import("./dist-7EBSGAHX.js");
1766
+ const { runMechanicalGate } = await import("./dist-WCSJHQPK.js");
1737
1767
  return resultToMcpResponse(await runMechanicalGate(projectPath));
1738
1768
  }
1739
1769
  async function handleSaveHandoff(projectPath, input) {
1740
1770
  if (!input.handoff) return mcpError("Error: handoff is required for save-handoff action");
1741
- const { saveHandoff } = await import("./dist-7EBSGAHX.js");
1771
+ const { saveHandoff } = await import("./dist-WCSJHQPK.js");
1742
1772
  const result = await saveHandoff(
1743
1773
  projectPath,
1744
1774
  input.handoff,
@@ -1750,23 +1780,38 @@ async function handleSaveHandoff(projectPath, input) {
1750
1780
  return resultToMcpResponse(Ok({ saved: true }));
1751
1781
  }
1752
1782
  async function handleLoadHandoff(projectPath, input) {
1753
- const { loadHandoff } = await import("./dist-7EBSGAHX.js");
1783
+ const { loadHandoff } = await import("./dist-WCSJHQPK.js");
1754
1784
  return resultToMcpResponse(await loadHandoff(projectPath, input.stream, input.session));
1755
1785
  }
1756
1786
  async function handleAppendEntry(projectPath, input) {
1757
- if (!input.session) return mcpError("Error: session is required for append_entry action");
1758
1787
  if (!input.section) return mcpError("Error: section is required for append_entry action");
1759
1788
  if (!input.authorSkill) return mcpError("Error: authorSkill is required for append_entry action");
1760
1789
  if (!input.content) return mcpError("Error: content is required for append_entry action");
1761
- const { appendSessionEntry } = await import("./dist-7EBSGAHX.js");
1762
- const result = await appendSessionEntry(
1763
- projectPath,
1764
- input.session,
1765
- input.section,
1766
- input.authorSkill,
1767
- input.content
1768
- );
1769
- return resultToMcpResponse(result);
1790
+ if (input.session) {
1791
+ const { appendSessionEntry } = await import("./dist-WCSJHQPK.js");
1792
+ const result = await appendSessionEntry(
1793
+ projectPath,
1794
+ input.session,
1795
+ input.section,
1796
+ input.authorSkill,
1797
+ input.content
1798
+ );
1799
+ return resultToMcpResponse(result);
1800
+ }
1801
+ if (input.section !== "decisions") {
1802
+ return mcpError("Error: session is required for non-decisions sections");
1803
+ }
1804
+ const { loadState, saveState } = await import("./dist-WCSJHQPK.js");
1805
+ const lr = await loadState(projectPath, input.stream);
1806
+ if (!lr.ok) return resultToMcpResponse(lr);
1807
+ lr.value.decisions.push({
1808
+ date: (/* @__PURE__ */ new Date()).toISOString(),
1809
+ decision: input.content,
1810
+ context: input.authorSkill
1811
+ });
1812
+ const sr = await saveState(projectPath, lr.value, input.stream);
1813
+ if (!sr.ok) return resultToMcpResponse(sr);
1814
+ return resultToMcpResponse(Ok({ appended: true, target: "global-state" }));
1770
1815
  }
1771
1816
  async function handleUpdateEntryStatus(projectPath, input) {
1772
1817
  if (!input.session) return mcpError("Error: session is required for update_entry_status action");
@@ -1774,7 +1819,7 @@ async function handleUpdateEntryStatus(projectPath, input) {
1774
1819
  if (!input.entryId) return mcpError("Error: entryId is required for update_entry_status action");
1775
1820
  if (!input.newStatus)
1776
1821
  return mcpError("Error: newStatus is required for update_entry_status action");
1777
- const { updateSessionEntryStatus } = await import("./dist-7EBSGAHX.js");
1822
+ const { updateSessionEntryStatus } = await import("./dist-WCSJHQPK.js");
1778
1823
  const result = await updateSessionEntryStatus(
1779
1824
  projectPath,
1780
1825
  input.session,
@@ -1787,7 +1832,7 @@ async function handleUpdateEntryStatus(projectPath, input) {
1787
1832
  async function handleReadSection(projectPath, input) {
1788
1833
  if (!input.session) return mcpError("Error: session is required for read_section action");
1789
1834
  if (!input.section) return mcpError("Error: section is required for read_section action");
1790
- const { readSessionSection } = await import("./dist-7EBSGAHX.js");
1835
+ const { readSessionSection } = await import("./dist-WCSJHQPK.js");
1791
1836
  const result = await readSessionSection(
1792
1837
  projectPath,
1793
1838
  input.session,
@@ -1797,13 +1842,13 @@ async function handleReadSection(projectPath, input) {
1797
1842
  }
1798
1843
  async function handleReadSections(projectPath, input) {
1799
1844
  if (!input.session) return mcpError("Error: session is required for read_sections action");
1800
- const { readSessionSections } = await import("./dist-7EBSGAHX.js");
1845
+ const { readSessionSections } = await import("./dist-WCSJHQPK.js");
1801
1846
  const result = await readSessionSections(projectPath, input.session);
1802
1847
  return resultToMcpResponse(result);
1803
1848
  }
1804
1849
  async function handleArchiveSession(projectPath, input) {
1805
1850
  if (!input.session) return mcpError("Error: session is required for archive_session action");
1806
- const { archiveSession } = await import("./dist-7EBSGAHX.js");
1851
+ const { archiveSession } = await import("./dist-WCSJHQPK.js");
1807
1852
  const result = await archiveSession(projectPath, input.session);
1808
1853
  if (!result.ok) return resultToMcpResponse(result);
1809
1854
  await autoSyncRoadmap(projectPath);
@@ -1867,7 +1912,7 @@ var listStreamsDefinition = {
1867
1912
  };
1868
1913
  async function handleListStreams(input) {
1869
1914
  try {
1870
- const { listStreams, loadStreamIndex } = await import("./dist-7EBSGAHX.js");
1915
+ const { listStreams, loadStreamIndex } = await import("./dist-WCSJHQPK.js");
1871
1916
  const projectPath = sanitizePath(input.path);
1872
1917
  const indexResult = await loadStreamIndex(projectPath);
1873
1918
  const streamsResult = await listStreams(projectPath);
@@ -1905,7 +1950,7 @@ var checkPhaseGateDefinition = {
1905
1950
  };
1906
1951
  async function handleCheckPhaseGate(input) {
1907
1952
  try {
1908
- const { runCheckPhaseGate } = await import("./check-phase-gate-WY6UICCL.js");
1953
+ const { runCheckPhaseGate } = await import("./check-phase-gate-VCBQHQAC.js");
1909
1954
  const result = await runCheckPhaseGate({ cwd: sanitizePath(input.path) });
1910
1955
  if (result.ok) {
1911
1956
  return { content: [{ type: "text", text: JSON.stringify(result.value) }] };
@@ -1961,7 +2006,7 @@ async function handleValidateCrossCheck(input) {
1961
2006
  };
1962
2007
  }
1963
2008
  try {
1964
- const { runCrossCheck } = await import("./validate-cross-check-Y4PDR63C.js");
2009
+ const { runCrossCheck } = await import("./validate-cross-check-ZOWFA3DB.js");
1965
2010
  const specsDir = path12.resolve(projectPath, input.specsDir ?? "docs/specs");
1966
2011
  if (!specsDir.startsWith(projectPath)) {
1967
2012
  return {
@@ -1998,6 +2043,9 @@ async function handleValidateCrossCheck(input) {
1998
2043
  }
1999
2044
  }
2000
2045
 
2046
+ // src/mcp/tools/generate-slash-commands.ts
2047
+ init_dist();
2048
+
2001
2049
  // src/commands/generate-slash-commands.ts
2002
2050
  import { Command } from "commander";
2003
2051
  import fs13 from "fs";
@@ -2681,7 +2729,7 @@ async function handleGenerateSlashCommands(input) {
2681
2729
  // src/mcp/resources/state.ts
2682
2730
  async function getStateResource(projectRoot) {
2683
2731
  try {
2684
- const { loadState, migrateToStreams } = await import("./dist-7EBSGAHX.js");
2732
+ const { loadState, migrateToStreams } = await import("./dist-WCSJHQPK.js");
2685
2733
  await migrateToStreams(projectRoot);
2686
2734
  const result = await loadState(projectRoot);
2687
2735
  if (result.ok) {
@@ -2705,6 +2753,9 @@ async function getStateResource(projectRoot) {
2705
2753
  }
2706
2754
  }
2707
2755
 
2756
+ // src/mcp/tools/graph/query-graph.ts
2757
+ init_dist();
2758
+
2708
2759
  // src/mcp/tools/graph/shared.ts
2709
2760
  function graphNotFoundError() {
2710
2761
  return {
@@ -2796,7 +2847,7 @@ async function handleQueryGraph(input) {
2796
2847
  const projectPath = sanitizePath(input.path);
2797
2848
  const store = await loadGraphStore(projectPath);
2798
2849
  if (!store) return graphNotFoundError();
2799
- const { ContextQL } = await import("./dist-QW5G3GX3.js");
2850
+ const { ContextQL } = await import("./dist-RADHOOXG.js");
2800
2851
  const cql = new ContextQL(store);
2801
2852
  const result = cql.execute({
2802
2853
  rootNodeIds: input.rootNodeIds,
@@ -2878,7 +2929,7 @@ async function handleSearchSimilar(input) {
2878
2929
  const projectPath = sanitizePath(input.path);
2879
2930
  const store = await loadGraphStore(projectPath);
2880
2931
  if (!store) return graphNotFoundError();
2881
- const { FusionLayer } = await import("./dist-QW5G3GX3.js");
2932
+ const { FusionLayer } = await import("./dist-RADHOOXG.js");
2882
2933
  const fusion = new FusionLayer(store);
2883
2934
  const results = fusion.search(input.query, input.topK ?? 10);
2884
2935
  if (input.mode === "summary") {
@@ -2933,7 +2984,7 @@ async function handleFindContextFor(input) {
2933
2984
  const projectPath = sanitizePath(input.path);
2934
2985
  const store = await loadGraphStore(projectPath);
2935
2986
  if (!store) return graphNotFoundError();
2936
- const { FusionLayer, ContextQL } = await import("./dist-QW5G3GX3.js");
2987
+ const { FusionLayer, ContextQL } = await import("./dist-RADHOOXG.js");
2937
2988
  const fusion = new FusionLayer(store);
2938
2989
  const cql = new ContextQL(store);
2939
2990
  const tokenBudget = input.tokenBudget ?? 4e3;
@@ -3001,6 +3052,7 @@ async function handleFindContextFor(input) {
3001
3052
  }
3002
3053
 
3003
3054
  // src/mcp/tools/graph/get-relationships.ts
3055
+ init_dist();
3004
3056
  var getRelationshipsDefinition = {
3005
3057
  name: "get_relationships",
3006
3058
  description: "Get relationships for a specific node in the knowledge graph, with configurable direction and depth.",
@@ -3037,7 +3089,7 @@ async function handleGetRelationships(input) {
3037
3089
  const projectPath = sanitizePath(input.path);
3038
3090
  const store = await loadGraphStore(projectPath);
3039
3091
  if (!store) return graphNotFoundError();
3040
- const { ContextQL } = await import("./dist-QW5G3GX3.js");
3092
+ const { ContextQL } = await import("./dist-RADHOOXG.js");
3041
3093
  const cql = new ContextQL(store);
3042
3094
  const direction = input.direction ?? "both";
3043
3095
  const bidirectional = direction === "both" || direction === "inbound";
@@ -3155,7 +3207,7 @@ async function handleGetImpact(input) {
3155
3207
  const projectPath = sanitizePath(input.path);
3156
3208
  const store = await loadGraphStore(projectPath);
3157
3209
  if (!store) return graphNotFoundError();
3158
- const { ContextQL } = await import("./dist-QW5G3GX3.js");
3210
+ const { ContextQL } = await import("./dist-RADHOOXG.js");
3159
3211
  let targetNodeId = input.nodeId;
3160
3212
  if (!targetNodeId && input.filePath) {
3161
3213
  const fileNodes = store.findNodes({ type: "file" });
@@ -3287,7 +3339,7 @@ async function handleIngestSource(input) {
3287
3339
  try {
3288
3340
  const projectPath = sanitizePath(input.path);
3289
3341
  const graphDir = path16.join(projectPath, ".harness", "graph");
3290
- const { GraphStore, CodeIngestor, TopologicalLinker, KnowledgeIngestor, GitIngestor } = await import("./dist-QW5G3GX3.js");
3342
+ const { GraphStore, CodeIngestor, TopologicalLinker, KnowledgeIngestor, GitIngestor } = await import("./dist-RADHOOXG.js");
3291
3343
  const fs17 = await import("fs/promises");
3292
3344
  await fs17.mkdir(graphDir, { recursive: true });
3293
3345
  const store = new GraphStore();
@@ -3340,6 +3392,7 @@ async function handleIngestSource(input) {
3340
3392
  }
3341
3393
 
3342
3394
  // src/mcp/tools/graph/detect-anomalies.ts
3395
+ init_dist();
3343
3396
  var detectAnomaliesDefinition = {
3344
3397
  name: "detect_anomalies",
3345
3398
  description: "Detect structural anomalies \u2014 statistical outliers across code metrics and topological single points of failure in the import graph",
@@ -3370,7 +3423,7 @@ async function handleDetectAnomalies(input) {
3370
3423
  const projectPath = sanitizePath(input.path);
3371
3424
  const store = await loadGraphStore(projectPath);
3372
3425
  if (!store) return graphNotFoundError();
3373
- const { GraphAnomalyAdapter } = await import("./dist-QW5G3GX3.js");
3426
+ const { GraphAnomalyAdapter } = await import("./dist-RADHOOXG.js");
3374
3427
  const adapter = new GraphAnomalyAdapter(store);
3375
3428
  const report = adapter.detect({
3376
3429
  ...input.threshold !== void 0 && { threshold: input.threshold },
@@ -3419,7 +3472,7 @@ async function handleAskGraph(input) {
3419
3472
  const projectPath = sanitizePath(input.path);
3420
3473
  const store = await loadGraphStore(projectPath);
3421
3474
  if (!store) return graphNotFoundError();
3422
- const { askGraph } = await import("./dist-QW5G3GX3.js");
3475
+ const { askGraph } = await import("./dist-RADHOOXG.js");
3423
3476
  const result = await askGraph(store, input.question);
3424
3477
  return {
3425
3478
  content: [{ type: "text", text: JSON.stringify(result) }]
@@ -3483,7 +3536,7 @@ async function handleComputeBlastRadius(input) {
3483
3536
  const projectPath = sanitizePath(input.path);
3484
3537
  const store = await loadGraphStore(projectPath);
3485
3538
  if (!store) return graphNotFoundError();
3486
- const { CascadeSimulator } = await import("./dist-QW5G3GX3.js");
3539
+ const { CascadeSimulator } = await import("./dist-RADHOOXG.js");
3487
3540
  let targetNodeId = input.nodeId;
3488
3541
  if (!targetNodeId && input.file) {
3489
3542
  const fileNodes = store.findNodes({ type: "file" });
@@ -3666,6 +3719,7 @@ async function getRelationshipsResource(projectRoot) {
3666
3719
  }
3667
3720
 
3668
3721
  // src/mcp/tools/agent-definitions.ts
3722
+ init_dist();
3669
3723
  var generateAgentDefinitionsDefinition = {
3670
3724
  name: "generate_agent_definitions",
3671
3725
  description: "Generate agent definition files from personas for Claude Code and Gemini CLI",
@@ -3683,7 +3737,7 @@ var generateAgentDefinitionsDefinition = {
3683
3737
  }
3684
3738
  };
3685
3739
  async function handleGenerateAgentDefinitions(input) {
3686
- const { generateAgentDefinitions } = await import("./generate-agent-definitions-PQPG6SX5.js");
3740
+ const { generateAgentDefinitions } = await import("./generate-agent-definitions-AWLPJ27C.js");
3687
3741
  const platforms = input.platform === "all" || !input.platform ? ["claude-code", "gemini-cli"] : [input.platform];
3688
3742
  const results = generateAgentDefinitions({
3689
3743
  platforms: [...platforms],
@@ -3837,7 +3891,8 @@ function buildFeatureFromInput(input) {
3837
3891
  summary: input.summary,
3838
3892
  assignee: null,
3839
3893
  priority: null,
3840
- externalId: null
3894
+ externalId: null,
3895
+ updatedAt: null
3841
3896
  };
3842
3897
  }
3843
3898
  function handleAdd(projectPath, input, deps) {
@@ -4010,8 +4065,8 @@ function shouldTriggerExternalSync(input, response) {
4010
4065
  }
4011
4066
  async function handleManageRoadmap(input) {
4012
4067
  try {
4013
- const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges, assignFeature } = await import("./dist-7EBSGAHX.js");
4014
- const { Ok: Ok2 } = await import("./dist-666AAZQ6.js");
4068
+ const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges, assignFeature } = await import("./dist-WCSJHQPK.js");
4069
+ const { Ok: Ok2 } = await import("./dist-3EWNRFFQ.js");
4015
4070
  const projectPath = sanitizePath(input.path);
4016
4071
  const deps = {
4017
4072
  parseRoadmap,
@@ -4445,7 +4500,7 @@ async function handleTransition(validInput, projectPath, id) {
4445
4500
  const transition = transitionResult.data;
4446
4501
  const prompt = renderTransition(transition);
4447
4502
  try {
4448
- const { saveHandoff } = await import("./dist-7EBSGAHX.js");
4503
+ const { saveHandoff } = await import("./dist-WCSJHQPK.js");
4449
4504
  await saveHandoff(
4450
4505
  projectPath,
4451
4506
  {
@@ -4513,7 +4568,7 @@ async function handleEmitInteraction(input) {
4513
4568
  }
4514
4569
  async function recordInteraction(projectPath, id, type, decision, stream) {
4515
4570
  try {
4516
- const { loadState, saveState } = await import("./dist-7EBSGAHX.js");
4571
+ const { loadState, saveState } = await import("./dist-WCSJHQPK.js");
4517
4572
  const stateResult = await loadState(projectPath, stream);
4518
4573
  if (stateResult.ok) {
4519
4574
  const state = stateResult.value;
@@ -4529,6 +4584,7 @@ async function recordInteraction(projectPath, id, type, decision, stream) {
4529
4584
  }
4530
4585
 
4531
4586
  // src/mcp/tools/gather-context.ts
4587
+ init_dist();
4532
4588
  function flattenSessionSections(sections) {
4533
4589
  if (!sections) return [];
4534
4590
  return Object.entries(sections).flatMap(
@@ -4659,10 +4715,10 @@ async function handleGatherContext(input) {
4659
4715
  input.include ?? ["state", "learnings", "handoff", "graph", "validation"]
4660
4716
  );
4661
4717
  const errors = [];
4662
- const statePromise = includeSet.has("state") ? import("./dist-7EBSGAHX.js").then(
4718
+ const statePromise = includeSet.has("state") ? import("./dist-WCSJHQPK.js").then(
4663
4719
  (core) => core.loadState(projectPath, void 0, input.session)
4664
4720
  ) : Promise.resolve(null);
4665
- const learningsPromise = includeSet.has("learnings") ? import("./dist-7EBSGAHX.js").then(
4721
+ const learningsPromise = includeSet.has("learnings") ? import("./dist-WCSJHQPK.js").then(
4666
4722
  (core) => core.loadBudgetedLearnings(projectPath, {
4667
4723
  intent: input.intent,
4668
4724
  tokenBudget: input.learningsBudget ?? 1e3,
@@ -4671,14 +4727,14 @@ async function handleGatherContext(input) {
4671
4727
  ...input.depth !== void 0 && { depth: input.depth }
4672
4728
  })
4673
4729
  ) : Promise.resolve(null);
4674
- const handoffPromise = includeSet.has("handoff") ? import("./dist-7EBSGAHX.js").then(
4730
+ const handoffPromise = includeSet.has("handoff") ? import("./dist-WCSJHQPK.js").then(
4675
4731
  (core) => core.loadHandoff(projectPath, void 0, input.session)
4676
4732
  ) : Promise.resolve(null);
4677
4733
  const graphPromise = includeSet.has("graph") ? (async () => {
4678
- const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-M6FXJAKK.js");
4734
+ const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-JHQVQRUS.js");
4679
4735
  const store = await loadGraphStore2(projectPath);
4680
4736
  if (!store) return null;
4681
- const { FusionLayer, ContextQL } = await import("./dist-QW5G3GX3.js");
4737
+ const { FusionLayer, ContextQL } = await import("./dist-RADHOOXG.js");
4682
4738
  const fusion = new FusionLayer(store);
4683
4739
  const cql = new ContextQL(store);
4684
4740
  const tokenBudget = input.tokenBudget ?? 4e3;
@@ -4715,11 +4771,11 @@ async function handleGatherContext(input) {
4715
4771
  context: contextBlocks
4716
4772
  };
4717
4773
  })() : Promise.resolve(null);
4718
- const sessionsPromise = includeSet.has("sessions") && input.session ? import("./dist-7EBSGAHX.js").then(
4774
+ const sessionsPromise = includeSet.has("sessions") && input.session ? import("./dist-WCSJHQPK.js").then(
4719
4775
  (core) => core.readSessionSections(projectPath, input.session)
4720
4776
  ) : Promise.resolve(null);
4721
4777
  const shouldIncludeEvents = input.includeEvents !== void 0 ? input.includeEvents : includeSet.has("events") || !!input.session && !input.include;
4722
- const eventsPromise = shouldIncludeEvents ? import("./dist-7EBSGAHX.js").then(async (core) => {
4778
+ const eventsPromise = shouldIncludeEvents ? import("./dist-WCSJHQPK.js").then(async (core) => {
4723
4779
  const result = await core.loadEvents(projectPath, {
4724
4780
  session: input.session
4725
4781
  });
@@ -4727,7 +4783,7 @@ async function handleGatherContext(input) {
4727
4783
  return core.formatEventTimeline(result.value);
4728
4784
  }) : Promise.resolve(null);
4729
4785
  const validationPromise = includeSet.has("validation") ? (async () => {
4730
- const { handleValidateProject: handleValidateProject2 } = await import("./validate-MNE25KLZ.js");
4786
+ const { handleValidateProject: handleValidateProject2 } = await import("./validate-TIIHRPMA.js");
4731
4787
  const result = await handleValidateProject2({ path: projectPath });
4732
4788
  const first = result.content[0];
4733
4789
  return first ? JSON.parse(first.text) : null;
@@ -4821,7 +4877,7 @@ async function handleGatherContext(input) {
4821
4877
  };
4822
4878
  if (input.session) {
4823
4879
  try {
4824
- const core = await import("./dist-7EBSGAHX.js");
4880
+ const core = await import("./dist-WCSJHQPK.js");
4825
4881
  core.updateSessionIndex(
4826
4882
  projectPath,
4827
4883
  input.session,
@@ -4831,8 +4887,8 @@ async function handleGatherContext(input) {
4831
4887
  }
4832
4888
  }
4833
4889
  const outputText = JSON.stringify(output);
4834
- const tokenEstimate = Math.ceil(outputText.length / 4);
4835
- output.meta.tokenEstimate = tokenEstimate;
4890
+ const totalTokenEstimate = Math.ceil(outputText.length / 4);
4891
+ output.meta.tokenEstimate = totalTokenEstimate;
4836
4892
  if (input.section) {
4837
4893
  const guardError = checkSectionGuards(input.section, input.mode);
4838
4894
  if (guardError) return guardError;
@@ -4845,8 +4901,9 @@ async function handleGatherContext(input) {
4845
4901
  sessionSections,
4846
4902
  meta: output.meta
4847
4903
  });
4904
+ const wrapped = { ...result, totalTokenEstimate };
4848
4905
  return {
4849
- content: [{ type: "text", text: JSON.stringify(result) }]
4906
+ content: [{ type: "text", text: JSON.stringify(wrapped) }]
4850
4907
  };
4851
4908
  }
4852
4909
  return {
@@ -4860,6 +4917,7 @@ async function handleGatherContext(input) {
4860
4917
  }
4861
4918
 
4862
4919
  // src/mcp/tools/review-changes.ts
4920
+ init_dist();
4863
4921
  var SIZE_GATE_LINES = 1e4;
4864
4922
  var reviewChangesDefinition = {
4865
4923
  name: "review_changes",
@@ -4971,7 +5029,7 @@ async function handleReviewChanges(input) {
4971
5029
  }
4972
5030
  }
4973
5031
  async function runQuickReview(projectPath, diff, diffLines, downgraded, offset, limit) {
4974
- const { handleAnalyzeDiff: handleAnalyzeDiff2 } = await import("./feedback-TMEGYMWU.js");
5032
+ const { handleAnalyzeDiff: handleAnalyzeDiff2 } = await import("./feedback-ZLUX72HD.js");
4975
5033
  const result = await handleAnalyzeDiff2({ diff, path: projectPath });
4976
5034
  const firstContent = result.content[0];
4977
5035
  if (!firstContent) throw new Error("Empty analyze_diff response");
@@ -5006,7 +5064,7 @@ function extractFileCount(diffParsed) {
5006
5064
  return files?.length ?? 0;
5007
5065
  }
5008
5066
  async function runStandardReview(projectPath, diff, diffLines, downgraded, offset, limit) {
5009
- const { handleAnalyzeDiff: handleAnalyzeDiff2, handleCreateSelfReview: handleCreateSelfReview2 } = await import("./feedback-TMEGYMWU.js");
5067
+ const { handleAnalyzeDiff: handleAnalyzeDiff2, handleCreateSelfReview: handleCreateSelfReview2 } = await import("./feedback-ZLUX72HD.js");
5010
5068
  const [diffResult, reviewResult] = await Promise.all([
5011
5069
  handleAnalyzeDiff2({ diff, path: projectPath }),
5012
5070
  handleCreateSelfReview2({ path: projectPath, diff })
@@ -5041,7 +5099,7 @@ async function runStandardReview(projectPath, diff, diffLines, downgraded, offse
5041
5099
  };
5042
5100
  }
5043
5101
  async function runDeepReview(projectPath, diff, diffLines, _downgraded, offset, limit) {
5044
- const { handleRunCodeReview: handleRunCodeReview2 } = await import("./review-pipeline-YXF5ITL2.js");
5102
+ const { handleRunCodeReview: handleRunCodeReview2 } = await import("./review-pipeline-ZWVQJTJX.js");
5045
5103
  const result = await handleRunCodeReview2({
5046
5104
  path: projectPath,
5047
5105
  diff,
@@ -5120,7 +5178,7 @@ async function handleCheckTaskIndependence(input) {
5120
5178
  try {
5121
5179
  const projectPath = sanitizePath(input.path);
5122
5180
  const store = await loadGraphStore(projectPath);
5123
- const { TaskIndependenceAnalyzer } = await import("./dist-QW5G3GX3.js");
5181
+ const { TaskIndependenceAnalyzer } = await import("./dist-RADHOOXG.js");
5124
5182
  const analyzer = new TaskIndependenceAnalyzer(store ?? void 0);
5125
5183
  const result = analyzer.analyze({
5126
5184
  tasks: input.tasks,
@@ -5208,7 +5266,7 @@ async function handlePredictConflicts(input) {
5208
5266
  try {
5209
5267
  const projectPath = sanitizePath(input.path);
5210
5268
  const store = await loadGraphStore(projectPath);
5211
- const { ConflictPredictor } = await import("./dist-QW5G3GX3.js");
5269
+ const { ConflictPredictor } = await import("./dist-RADHOOXG.js");
5212
5270
  const predictor = new ConflictPredictor(store ?? void 0);
5213
5271
  const result = predictor.predict({
5214
5272
  tasks: input.tasks,
@@ -5314,7 +5372,7 @@ async function handleDetectStaleConstraints(input) {
5314
5372
  isError: true
5315
5373
  };
5316
5374
  }
5317
- const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-M6FXJAKK.js");
5375
+ const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-JHQVQRUS.js");
5318
5376
  const store = await loadGraphStore2(projectPath);
5319
5377
  if (!store) {
5320
5378
  return {
@@ -5335,7 +5393,7 @@ async function handleDetectStaleConstraints(input) {
5335
5393
  ]
5336
5394
  };
5337
5395
  }
5338
- const { detectStaleConstraints } = await import("./dist-7EBSGAHX.js");
5396
+ const { detectStaleConstraints } = await import("./dist-WCSJHQPK.js");
5339
5397
  const result = detectStaleConstraints(
5340
5398
  store,
5341
5399
  windowDays,
@@ -5362,6 +5420,9 @@ async function handleDetectStaleConstraints(input) {
5362
5420
  }
5363
5421
  }
5364
5422
 
5423
+ // src/mcp/tools/search-skills.ts
5424
+ init_dist();
5425
+
5365
5426
  // src/skill/health-snapshot.ts
5366
5427
  import { execSync } from "child_process";
5367
5428
  import * as fs16 from "fs";
@@ -5452,10 +5513,10 @@ function countCriticalFindings(securityData) {
5452
5513
  return findings.filter((f) => f.severity === "error").length;
5453
5514
  }
5454
5515
  async function runHealthChecks(projectPath) {
5455
- const { handleAssessProject: handleAssessProject2 } = await import("./assess-project-74UVWPMB.js");
5456
- const { handleCheckDependencies: handleCheckDependencies2 } = await import("./architecture-FBSLURIB.js");
5457
- const { handleDetectEntropy: handleDetectEntropy2 } = await import("./entropy-ZAY73R6A.js");
5458
- const { handleRunSecurityScan: handleRunSecurityScan2 } = await import("./security-L2YN3CTI.js");
5516
+ const { handleAssessProject: handleAssessProject2 } = await import("./assess-project-6MV5TNY3.js");
5517
+ const { handleCheckDependencies: handleCheckDependencies2 } = await import("./architecture-HNIO6AUX.js");
5518
+ const { handleDetectEntropy: handleDetectEntropy2 } = await import("./entropy-EMSXF2PX.js");
5519
+ const { handleRunSecurityScan: handleRunSecurityScan2 } = await import("./security-JLZUAQYT.js");
5459
5520
  const [assessResult, depsResult, entropyResult, securityResult] = await Promise.all([
5460
5521
  handleAssessProject2({
5461
5522
  path: projectPath,
@@ -5510,10 +5571,10 @@ function avg(values) {
5510
5571
  }
5511
5572
  async function runGraphMetrics(projectPath) {
5512
5573
  try {
5513
- const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-M6FXJAKK.js");
5574
+ const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-JHQVQRUS.js");
5514
5575
  const store = await loadGraphStore2(projectPath);
5515
5576
  if (!store) return ZERO_METRICS;
5516
- const { GraphCouplingAdapter, GraphComplexityAdapter, GraphAnomalyAdapter } = await import("./dist-QW5G3GX3.js");
5577
+ const { GraphCouplingAdapter, GraphComplexityAdapter, GraphAnomalyAdapter } = await import("./dist-RADHOOXG.js");
5517
5578
  const couplingAdapter = new GraphCouplingAdapter(store);
5518
5579
  const couplingData = couplingAdapter.computeCouplingData();
5519
5580
  const files = couplingData.files;
@@ -5588,6 +5649,14 @@ var searchSkillsDefinition = {
5588
5649
  type: "string",
5589
5650
  enum: ["claude-code", "gemini-cli"],
5590
5651
  description: "Target platform (defaults to claude-code)"
5652
+ },
5653
+ offset: {
5654
+ type: "number",
5655
+ description: "Number of results to skip (default 0)"
5656
+ },
5657
+ limit: {
5658
+ type: "number",
5659
+ description: "Maximum results to return (default 5)"
5591
5660
  }
5592
5661
  },
5593
5662
  required: ["query"]
@@ -5620,18 +5689,23 @@ async function handleSearchSkills(input) {
5620
5689
  }
5621
5690
  }
5622
5691
  results.sort((a, b) => b.score - a.score);
5623
- const top5 = results.slice(0, 5);
5692
+ const { items, pagination } = paginate(
5693
+ results,
5694
+ input.offset ?? 0,
5695
+ input.limit ?? 5
5696
+ );
5624
5697
  return {
5625
5698
  content: [
5626
5699
  {
5627
5700
  type: "text",
5628
- text: JSON.stringify({ results: top5 }, null, 2)
5701
+ text: JSON.stringify({ results: items, pagination }, null, 2)
5629
5702
  }
5630
5703
  ]
5631
5704
  };
5632
5705
  }
5633
5706
 
5634
5707
  // src/skill/dispatch-engine.ts
5708
+ init_dist();
5635
5709
  import { execSync as execSync2 } from "child_process";
5636
5710
 
5637
5711
  // src/skill/recommendation-rules.ts
@@ -6182,6 +6256,7 @@ async function handleDispatchSkills(input) {
6182
6256
  }
6183
6257
 
6184
6258
  // src/mcp/tools/decay-trends.ts
6259
+ init_dist();
6185
6260
  var getDecayTrendsDefinition = {
6186
6261
  name: "get_decay_trends",
6187
6262
  description: 'Get architecture decay trends over time. Returns stability score history and per-category trend analysis from timeline snapshots. Use to answer questions like "is the architecture decaying?" or "which metrics are getting worse?"',
@@ -6238,7 +6313,7 @@ async function handleGetDecayTrends(input) {
6238
6313
  };
6239
6314
  }
6240
6315
  try {
6241
- const core = await import("./dist-7EBSGAHX.js");
6316
+ const core = await import("./dist-WCSJHQPK.js");
6242
6317
  const { TimelineManager } = core;
6243
6318
  const manager = new TimelineManager(projectPath);
6244
6319
  const timeline = manager.load();
@@ -6373,7 +6448,7 @@ async function handleCodeOutline(input) {
6373
6448
  };
6374
6449
  }
6375
6450
  try {
6376
- const { getOutline, formatOutline, EXTENSION_MAP } = await import("./dist-7EBSGAHX.js");
6451
+ const { getOutline, formatOutline, EXTENSION_MAP } = await import("./dist-WCSJHQPK.js");
6377
6452
  const { stat } = await import("fs/promises");
6378
6453
  const stats = await stat(targetPath).catch(() => null);
6379
6454
  if (stats?.isFile()) {
@@ -6392,7 +6467,7 @@ async function handleCodeOutline(input) {
6392
6467
  })
6393
6468
  );
6394
6469
  fileStats.sort((a, b) => b.mtimeMs - a.mtimeMs);
6395
- const { paginate: paginate2 } = await import("./dist-7EBSGAHX.js");
6470
+ const { paginate: paginate2 } = await import("./dist-WCSJHQPK.js");
6396
6471
  const paged = paginate2(fileStats, input.offset ?? 0, input.limit ?? 30);
6397
6472
  const results = [];
6398
6473
  for (const entry of paged.items) {
@@ -6465,7 +6540,7 @@ async function handleCodeSearch(input) {
6465
6540
  };
6466
6541
  }
6467
6542
  try {
6468
- const { searchSymbols } = await import("./dist-7EBSGAHX.js");
6543
+ const { searchSymbols } = await import("./dist-WCSJHQPK.js");
6469
6544
  const result = await searchSymbols(input.query, directory, input.glob);
6470
6545
  const lines = [`Search: "${result.query}" \u2014 ${result.matches.length} matches`];
6471
6546
  for (const match of result.matches) {
@@ -6534,7 +6609,7 @@ async function handleCodeUnfold(input) {
6534
6609
  }
6535
6610
  try {
6536
6611
  if (input.symbol) {
6537
- const { unfoldSymbol } = await import("./dist-7EBSGAHX.js");
6612
+ const { unfoldSymbol } = await import("./dist-WCSJHQPK.js");
6538
6613
  const result = await unfoldSymbol(filePath, input.symbol);
6539
6614
  const header = result.warning ? `${result.file}:${result.startLine}-${result.endLine} ${result.warning}
6540
6615
  ` : `${result.file}:${result.startLine}-${result.endLine}
@@ -6542,7 +6617,7 @@ async function handleCodeUnfold(input) {
6542
6617
  return { content: [{ type: "text", text: header + result.content }] };
6543
6618
  }
6544
6619
  if (input.startLine != null && input.endLine != null) {
6545
- const { unfoldRange } = await import("./dist-7EBSGAHX.js");
6620
+ const { unfoldRange } = await import("./dist-WCSJHQPK.js");
6546
6621
  const result = await unfoldRange(filePath, input.startLine, input.endLine);
6547
6622
  const header = `${result.file}:${result.startLine}-${result.endLine}
6548
6623
  `;
@@ -6604,7 +6679,7 @@ async function handleCheckTraceability(input) {
6604
6679
  isError: true
6605
6680
  };
6606
6681
  }
6607
- const { queryTraceability } = await import("./dist-QW5G3GX3.js");
6682
+ const { queryTraceability } = await import("./dist-RADHOOXG.js");
6608
6683
  const options = {};
6609
6684
  if (input.spec) options.specPath = input.spec;
6610
6685
  if (input.feature) options.featureName = input.feature;
@@ -6727,7 +6802,7 @@ async function handlePredictFailures(input) {
6727
6802
  };
6728
6803
  }
6729
6804
  try {
6730
- const core = await import("./dist-7EBSGAHX.js");
6805
+ const core = await import("./dist-WCSJHQPK.js");
6731
6806
  const { TimelineManager, PredictionEngine, SpecImpactEstimator } = core;
6732
6807
  const manager = new TimelineManager(projectPath);
6733
6808
  const includeRoadmap = input.includeRoadmap !== false;
@@ -6830,6 +6905,7 @@ async function handleRecommendSkills(input) {
6830
6905
  }
6831
6906
 
6832
6907
  // src/mcp/tools/compact.ts
6908
+ init_dist();
6833
6909
  var COMPACT_TOOL_DEFAULT_BUDGET = 2e3;
6834
6910
  var compactToolDefinition = {
6835
6911
  name: "compact",
@@ -6916,7 +6992,7 @@ function handleContentMode(content, pipeline, budget, source) {
6916
6992
  };
6917
6993
  }
6918
6994
  async function handleIntentMode(projectPath, intent, pipeline, budget, filterContent) {
6919
- const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-M6FXJAKK.js");
6995
+ const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-JHQVQRUS.js");
6920
6996
  const store = await loadGraphStore2(projectPath);
6921
6997
  if (!store) {
6922
6998
  return {
@@ -6929,7 +7005,7 @@ async function handleIntentMode(projectPath, intent, pipeline, budget, filterCon
6929
7005
  isError: true
6930
7006
  };
6931
7007
  }
6932
- const { PackedSummaryCache, FusionLayer, ContextQL } = await import("./dist-QW5G3GX3.js");
7008
+ const { PackedSummaryCache, FusionLayer, ContextQL } = await import("./dist-RADHOOXG.js");
6933
7009
  const cache = new PackedSummaryCache(store);
6934
7010
  const cachedEnvelope = cache.get(intent);
6935
7011
  if (cachedEnvelope) {
@@ -7067,6 +7143,110 @@ Warning: unknown strategies ignored: ${unknownStrategies.join(", ")}` : "";
7067
7143
  };
7068
7144
  }
7069
7145
 
7146
+ // src/mcp/tools/constraint-emergence.ts
7147
+ var detectConstraintEmergenceDefinition = {
7148
+ name: "detect_constraint_emergence",
7149
+ description: "Cluster recurring violations by pattern and suggest new constraint rules. When N similar violations appear in M weeks, suggests emergent architectural norms learned from team behavior.",
7150
+ inputSchema: {
7151
+ type: "object",
7152
+ properties: {
7153
+ path: { type: "string", description: "Path to project root" },
7154
+ windowWeeks: {
7155
+ type: "number",
7156
+ description: "Time window in weeks to analyze (default: 4)"
7157
+ },
7158
+ minOccurrences: {
7159
+ type: "number",
7160
+ description: "Minimum number of similar violations to trigger a suggestion (default: 3)"
7161
+ },
7162
+ category: {
7163
+ type: "string",
7164
+ description: "Optional filter by constraint category",
7165
+ enum: [
7166
+ "circular-deps",
7167
+ "layer-violations",
7168
+ "complexity",
7169
+ "coupling",
7170
+ "forbidden-imports",
7171
+ "module-size",
7172
+ "dependency-depth"
7173
+ ]
7174
+ }
7175
+ },
7176
+ required: ["path"]
7177
+ }
7178
+ };
7179
+ async function handleDetectConstraintEmergence(input) {
7180
+ let projectPath;
7181
+ try {
7182
+ projectPath = sanitizePath(input.path);
7183
+ } catch (error) {
7184
+ return {
7185
+ content: [
7186
+ {
7187
+ type: "text",
7188
+ text: `Error: ${error instanceof Error ? error.message : String(error)}`
7189
+ }
7190
+ ],
7191
+ isError: true
7192
+ };
7193
+ }
7194
+ try {
7195
+ const windowWeeks = input.windowWeeks ?? 4;
7196
+ if (!Number.isFinite(windowWeeks) || windowWeeks < 1) {
7197
+ return {
7198
+ content: [
7199
+ {
7200
+ type: "text",
7201
+ text: "Error: windowWeeks must be a finite number >= 1"
7202
+ }
7203
+ ],
7204
+ isError: true
7205
+ };
7206
+ }
7207
+ const minOccurrences = input.minOccurrences ?? 3;
7208
+ if (!Number.isFinite(minOccurrences) || minOccurrences < 2) {
7209
+ return {
7210
+ content: [
7211
+ {
7212
+ type: "text",
7213
+ text: "Error: minOccurrences must be a finite number >= 2"
7214
+ }
7215
+ ],
7216
+ isError: true
7217
+ };
7218
+ }
7219
+ const nodePath = await import("path");
7220
+ const historyPath = nodePath.resolve(projectPath, ".harness/arch/violation-history.json");
7221
+ const { ViolationHistoryManager, detectEmergentConstraints } = await import("./dist-WCSJHQPK.js");
7222
+ const manager = new ViolationHistoryManager(historyPath);
7223
+ const history = manager.load();
7224
+ const options = { windowWeeks, minOccurrences };
7225
+ if (input.category) {
7226
+ options.category = input.category;
7227
+ }
7228
+ const result = detectEmergentConstraints(history, options);
7229
+ return {
7230
+ content: [
7231
+ {
7232
+ type: "text",
7233
+ text: JSON.stringify(result, null, 2)
7234
+ }
7235
+ ]
7236
+ };
7237
+ } catch (error) {
7238
+ return {
7239
+ content: [
7240
+ {
7241
+ type: "text",
7242
+ text: `Error: ${error instanceof Error ? error.message : String(error)}`
7243
+ }
7244
+ ],
7245
+ isError: true
7246
+ };
7247
+ }
7248
+ }
7249
+
7070
7250
  // src/mcp/server.ts
7071
7251
  var TOOL_DEFINITIONS = [
7072
7252
  validateToolDefinition,
@@ -7098,6 +7278,7 @@ var TOOL_DEFINITIONS = [
7098
7278
  ingestSourceDefinition,
7099
7279
  generateAgentDefinitionsDefinition,
7100
7280
  runSecurityScanDefinition,
7281
+ getSecurityTrendsDefinition,
7101
7282
  checkPerformanceDefinition,
7102
7283
  getPerfBaselinesDefinition,
7103
7284
  updatePerfBaselinesDefinition,
@@ -7124,7 +7305,8 @@ var TOOL_DEFINITIONS = [
7124
7305
  recommendSkillsDefinition,
7125
7306
  computeBlastRadiusDefinition,
7126
7307
  dispatchSkillsDefinition,
7127
- compactToolDefinition
7308
+ compactToolDefinition,
7309
+ detectConstraintEmergenceDefinition
7128
7310
  ].map((def) => ({ ...def, trustedOutput: true }));
7129
7311
  var TOOL_HANDLERS = {
7130
7312
  validate_project: handleValidateProject,
@@ -7156,6 +7338,7 @@ var TOOL_HANDLERS = {
7156
7338
  ingest_source: handleIngestSource,
7157
7339
  generate_agent_definitions: handleGenerateAgentDefinitions,
7158
7340
  run_security_scan: handleRunSecurityScan,
7341
+ get_security_trends: handleGetSecurityTrends,
7159
7342
  check_performance: handleCheckPerformance,
7160
7343
  get_perf_baselines: handleGetPerfBaselines,
7161
7344
  update_perf_baselines: handleUpdatePerfBaselines,
@@ -7182,7 +7365,8 @@ var TOOL_HANDLERS = {
7182
7365
  recommend_skills: handleRecommendSkills,
7183
7366
  compute_blast_radius: handleComputeBlastRadius,
7184
7367
  dispatch_skills: handleDispatchSkills,
7185
- compact: handleCompact
7368
+ compact: handleCompact,
7369
+ detect_constraint_emergence: handleDetectConstraintEmergence
7186
7370
  };
7187
7371
  var RESOURCE_DEFINITIONS = [
7188
7372
  {
@@ -7276,8 +7460,8 @@ async function appendUpdateNotification(result, resolvedRoot) {
7276
7460
  shouldRunCheck,
7277
7461
  readCheckState,
7278
7462
  spawnBackgroundCheck
7279
- } = await import("./dist-7EBSGAHX.js");
7280
- const { CLI_VERSION } = await import("./version-KFFPOQAX.js");
7463
+ } = await import("./dist-WCSJHQPK.js");
7464
+ const { CLI_VERSION } = await import("./version-CUI434OP.js");
7281
7465
  const configInterval = readConfigInterval(resolvedRoot);
7282
7466
  const DEFAULT_INTERVAL = 864e5;
7283
7467
  if (!isUpdateCheckEnabled(configInterval)) return;