nexus-agents 2.92.4 → 2.93.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 (119) hide show
  1. package/dist/{child-mcp-config-WUHKXBWX.js → child-mcp-config-WNISXFYD.js} +2 -2
  2. package/dist/{chunk-Y7E5ZWRQ.js → chunk-2IBJC2EP.js} +2 -2
  3. package/dist/chunk-2IBJC2EP.js.map +1 -0
  4. package/dist/{chunk-2SMTCNXP.js → chunk-2T4NV6QT.js} +2 -2
  5. package/dist/{chunk-3HTUYAKS.js → chunk-4A4WPM75.js} +10 -126
  6. package/dist/chunk-4A4WPM75.js.map +1 -0
  7. package/dist/{chunk-6Q33PBXC.js → chunk-57OH2O2U.js} +2 -2
  8. package/dist/{chunk-VUVCSWMC.js → chunk-5BTRDVWC.js} +5 -5
  9. package/dist/{chunk-TWAH7VM2.js → chunk-AZP66FIA.js} +3 -3
  10. package/dist/{chunk-X5BQF6HM.js → chunk-BHA6V7GK.js} +4 -4
  11. package/dist/{chunk-E6W4Z6GN.js → chunk-BNHBZRU7.js} +3 -3
  12. package/dist/{chunk-EFHZHCF2.js → chunk-CPH6LKXO.js} +2 -2
  13. package/dist/{chunk-27CNQPQ4.js → chunk-DTFMYM3V.js} +2 -2
  14. package/dist/{chunk-AQTHLUCP.js → chunk-E3QWWP67.js} +2 -2
  15. package/dist/{chunk-7QXEK3O6.js → chunk-FTCU55O6.js} +4 -4
  16. package/dist/{chunk-IHPYT6WU.js → chunk-G5IDRWWI.js} +15 -6
  17. package/dist/chunk-G5IDRWWI.js.map +1 -0
  18. package/dist/{chunk-W5I6L4UT.js → chunk-HKISF2E7.js} +191 -11
  19. package/dist/chunk-HKISF2E7.js.map +1 -0
  20. package/dist/{chunk-4LEUIAYB.js → chunk-IJ2AZZVH.js} +66 -48
  21. package/dist/chunk-IJ2AZZVH.js.map +1 -0
  22. package/dist/{chunk-YEQE7WLP.js → chunk-JCETWDU7.js} +2 -2
  23. package/dist/{chunk-3FVSYMHK.js → chunk-JEBWSHSU.js} +2 -2
  24. package/dist/{chunk-4GOT42ZA.js → chunk-K7VGX37L.js} +3 -3
  25. package/dist/{chunk-JCYCITBK.js → chunk-LJMO5P6O.js} +38 -128
  26. package/dist/chunk-LJMO5P6O.js.map +1 -0
  27. package/dist/chunk-NESW2TTD.js +134 -0
  28. package/dist/chunk-NESW2TTD.js.map +1 -0
  29. package/dist/{chunk-JYIKPBXW.js → chunk-RTUZSR4R.js} +2 -2
  30. package/dist/{chunk-MZFWRU6E.js → chunk-SHSKW5ML.js} +7 -7
  31. package/dist/{chunk-SFZESA5O.js → chunk-SMGH2B3A.js} +2 -2
  32. package/dist/{chunk-PRGNJRID.js → chunk-SORBJPRA.js} +2 -2
  33. package/dist/{chunk-3LKW4IEW.js → chunk-T73G67GT.js} +3 -3
  34. package/dist/{chunk-57HMLBYN.js → chunk-ULBKFMVO.js} +2 -2
  35. package/dist/{chunk-VYNNVUY6.js → chunk-VSG6RSE6.js} +3 -3
  36. package/dist/{chunk-EAT4GTMT.js → chunk-WU3SUA35.js} +2 -2
  37. package/dist/{chunk-S6FXRXYE.js → chunk-XVY3I7JT.js} +7 -7
  38. package/dist/{chunk-CGSVTROC.js → chunk-ZOAU7RE4.js} +6 -4
  39. package/dist/chunk-ZOAU7RE4.js.map +1 -0
  40. package/dist/{chunk-52ACUN6T.js → chunk-ZYHHDPFW.js} +4 -4
  41. package/dist/{cli-circuit-breaker-4SWB6DEB.js → cli-circuit-breaker-6E4E2IU7.js} +4 -4
  42. package/dist/cli.js +109 -38
  43. package/dist/cli.js.map +1 -1
  44. package/dist/{composite-router-NLVKSTA2.js → composite-router-MQOPXLVV.js} +2 -2
  45. package/dist/{consensus-vote-4RIUUEZQ.js → consensus-vote-ZRADOLXH.js} +13 -12
  46. package/dist/{context-retriever-C4CNVKR5.js → context-retriever-TZGIETJO.js} +6 -6
  47. package/dist/{doctor-deep-QSVGAHAO.js → doctor-deep-OU2WC55V.js} +3 -3
  48. package/dist/{expert-bridge-VIWFPPGZ.js → expert-bridge-WP5ZWXFY.js} +4 -4
  49. package/dist/{factory-NNSXCD25.js → factory-2TN2VZTR.js} +5 -5
  50. package/dist/{factory-T3SEZUGW.js → factory-RJTRVII5.js} +5 -5
  51. package/dist/index.d.ts +54 -9
  52. package/dist/index.js +199 -55
  53. package/dist/index.js.map +1 -1
  54. package/dist/{init-opencode-WEKHD7YE.js → init-opencode-AYMNMWU7.js} +5 -5
  55. package/dist/{issue-triage-VB5CVE43.js → issue-triage-QIVZN3PJ.js} +5 -5
  56. package/dist/{pr-reviewer-helpers-CI72F4XM.js → pr-reviewer-helpers-P24OBKVM.js} +4 -4
  57. package/dist/{registry-command-VNFULRTL.js → registry-command-KWWOKJ5C.js} +2 -2
  58. package/dist/{repo-security-plan-5MFY7GGQ.js → repo-security-plan-KZNEXDCI.js} +3 -3
  59. package/dist/{research-helpers-synthesize-CNZ4C3FN.js → research-helpers-synthesize-DH5PPX7A.js} +4 -3
  60. package/dist/{routing-memory-PYO46COZ.js → routing-memory-AGHJQTRH.js} +2 -2
  61. package/dist/{session-memory-HGCDSZ5R.js → session-memory-O24IVZAW.js} +3 -3
  62. package/dist/{setup-command-E35O56BN.js → setup-command-NBXZ4NGV.js} +12 -11
  63. package/dist/{setup-config-QPS4K5QU.js → setup-config-Y4JA5QWO.js} +3 -3
  64. package/dist/{setup-custom-api-SP2ZAVGC.js → setup-custom-api-UNX4OJEX.js} +5 -4
  65. package/dist/{setup-custom-api-SP2ZAVGC.js.map → setup-custom-api-UNX4OJEX.js.map} +1 -1
  66. package/dist/{tool-memory-SDPIAV2S.js → tool-memory-UEQNXIGC.js} +5 -5
  67. package/dist/{weather-report-RWAMQHBL.js → weather-report-S5YXRY7G.js} +2 -2
  68. package/package.json +1 -1
  69. package/dist/chunk-3HTUYAKS.js.map +0 -1
  70. package/dist/chunk-4LEUIAYB.js.map +0 -1
  71. package/dist/chunk-CGSVTROC.js.map +0 -1
  72. package/dist/chunk-IHPYT6WU.js.map +0 -1
  73. package/dist/chunk-JCYCITBK.js.map +0 -1
  74. package/dist/chunk-W5I6L4UT.js.map +0 -1
  75. package/dist/chunk-Y7E5ZWRQ.js.map +0 -1
  76. /package/dist/{child-mcp-config-WUHKXBWX.js.map → child-mcp-config-WNISXFYD.js.map} +0 -0
  77. /package/dist/{chunk-2SMTCNXP.js.map → chunk-2T4NV6QT.js.map} +0 -0
  78. /package/dist/{chunk-6Q33PBXC.js.map → chunk-57OH2O2U.js.map} +0 -0
  79. /package/dist/{chunk-VUVCSWMC.js.map → chunk-5BTRDVWC.js.map} +0 -0
  80. /package/dist/{chunk-TWAH7VM2.js.map → chunk-AZP66FIA.js.map} +0 -0
  81. /package/dist/{chunk-X5BQF6HM.js.map → chunk-BHA6V7GK.js.map} +0 -0
  82. /package/dist/{chunk-E6W4Z6GN.js.map → chunk-BNHBZRU7.js.map} +0 -0
  83. /package/dist/{chunk-EFHZHCF2.js.map → chunk-CPH6LKXO.js.map} +0 -0
  84. /package/dist/{chunk-27CNQPQ4.js.map → chunk-DTFMYM3V.js.map} +0 -0
  85. /package/dist/{chunk-AQTHLUCP.js.map → chunk-E3QWWP67.js.map} +0 -0
  86. /package/dist/{chunk-7QXEK3O6.js.map → chunk-FTCU55O6.js.map} +0 -0
  87. /package/dist/{chunk-YEQE7WLP.js.map → chunk-JCETWDU7.js.map} +0 -0
  88. /package/dist/{chunk-3FVSYMHK.js.map → chunk-JEBWSHSU.js.map} +0 -0
  89. /package/dist/{chunk-4GOT42ZA.js.map → chunk-K7VGX37L.js.map} +0 -0
  90. /package/dist/{chunk-JYIKPBXW.js.map → chunk-RTUZSR4R.js.map} +0 -0
  91. /package/dist/{chunk-MZFWRU6E.js.map → chunk-SHSKW5ML.js.map} +0 -0
  92. /package/dist/{chunk-SFZESA5O.js.map → chunk-SMGH2B3A.js.map} +0 -0
  93. /package/dist/{chunk-PRGNJRID.js.map → chunk-SORBJPRA.js.map} +0 -0
  94. /package/dist/{chunk-3LKW4IEW.js.map → chunk-T73G67GT.js.map} +0 -0
  95. /package/dist/{chunk-57HMLBYN.js.map → chunk-ULBKFMVO.js.map} +0 -0
  96. /package/dist/{chunk-VYNNVUY6.js.map → chunk-VSG6RSE6.js.map} +0 -0
  97. /package/dist/{chunk-EAT4GTMT.js.map → chunk-WU3SUA35.js.map} +0 -0
  98. /package/dist/{chunk-S6FXRXYE.js.map → chunk-XVY3I7JT.js.map} +0 -0
  99. /package/dist/{chunk-52ACUN6T.js.map → chunk-ZYHHDPFW.js.map} +0 -0
  100. /package/dist/{cli-circuit-breaker-4SWB6DEB.js.map → cli-circuit-breaker-6E4E2IU7.js.map} +0 -0
  101. /package/dist/{composite-router-NLVKSTA2.js.map → composite-router-MQOPXLVV.js.map} +0 -0
  102. /package/dist/{consensus-vote-4RIUUEZQ.js.map → consensus-vote-ZRADOLXH.js.map} +0 -0
  103. /package/dist/{context-retriever-C4CNVKR5.js.map → context-retriever-TZGIETJO.js.map} +0 -0
  104. /package/dist/{doctor-deep-QSVGAHAO.js.map → doctor-deep-OU2WC55V.js.map} +0 -0
  105. /package/dist/{expert-bridge-VIWFPPGZ.js.map → expert-bridge-WP5ZWXFY.js.map} +0 -0
  106. /package/dist/{factory-NNSXCD25.js.map → factory-2TN2VZTR.js.map} +0 -0
  107. /package/dist/{factory-T3SEZUGW.js.map → factory-RJTRVII5.js.map} +0 -0
  108. /package/dist/{init-opencode-WEKHD7YE.js.map → init-opencode-AYMNMWU7.js.map} +0 -0
  109. /package/dist/{issue-triage-VB5CVE43.js.map → issue-triage-QIVZN3PJ.js.map} +0 -0
  110. /package/dist/{pr-reviewer-helpers-CI72F4XM.js.map → pr-reviewer-helpers-P24OBKVM.js.map} +0 -0
  111. /package/dist/{registry-command-VNFULRTL.js.map → registry-command-KWWOKJ5C.js.map} +0 -0
  112. /package/dist/{repo-security-plan-5MFY7GGQ.js.map → repo-security-plan-KZNEXDCI.js.map} +0 -0
  113. /package/dist/{research-helpers-synthesize-CNZ4C3FN.js.map → research-helpers-synthesize-DH5PPX7A.js.map} +0 -0
  114. /package/dist/{routing-memory-PYO46COZ.js.map → routing-memory-AGHJQTRH.js.map} +0 -0
  115. /package/dist/{session-memory-HGCDSZ5R.js.map → session-memory-O24IVZAW.js.map} +0 -0
  116. /package/dist/{setup-command-E35O56BN.js.map → setup-command-NBXZ4NGV.js.map} +0 -0
  117. /package/dist/{setup-config-QPS4K5QU.js.map → setup-config-Y4JA5QWO.js.map} +0 -0
  118. /package/dist/{tool-memory-SDPIAV2S.js.map → tool-memory-UEQNXIGC.js.map} +0 -0
  119. /package/dist/{weather-report-RWAMQHBL.js.map → weather-report-S5YXRY7G.js.map} +0 -0
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  getTokenEnvVars,
3
3
  resolveToken
4
- } from "./chunk-EAT4GTMT.js";
4
+ } from "./chunk-WU3SUA35.js";
5
5
  import {
6
6
  executeExpert
7
- } from "./chunk-S6FXRXYE.js";
7
+ } from "./chunk-XVY3I7JT.js";
8
8
  import {
9
9
  EventTopics,
10
10
  JobStatusSchema,
@@ -42,7 +42,7 @@ import {
42
42
  writeJobComplete,
43
43
  writeJobFailed,
44
44
  writeJobPending
45
- } from "./chunk-JCYCITBK.js";
45
+ } from "./chunk-LJMO5P6O.js";
46
46
  import {
47
47
  REGISTRY_PATH,
48
48
  getProjectRoot,
@@ -51,19 +51,19 @@ import {
51
51
  normalizeTopicToCanonical,
52
52
  savePapersRegistry,
53
53
  synthesizeResearch
54
- } from "./chunk-CGSVTROC.js";
54
+ } from "./chunk-ZOAU7RE4.js";
55
55
  import {
56
56
  IssueTriage,
57
57
  createAuditTrail,
58
58
  createGraphAuditBridge
59
- } from "./chunk-IHPYT6WU.js";
59
+ } from "./chunk-G5IDRWWI.js";
60
60
  import {
61
61
  resolveEnvMode,
62
62
  sanitizeInput
63
- } from "./chunk-27CNQPQ4.js";
63
+ } from "./chunk-DTFMYM3V.js";
64
64
  import {
65
65
  generateSecurityPlan
66
- } from "./chunk-57HMLBYN.js";
66
+ } from "./chunk-ULBKFMVO.js";
67
67
  import {
68
68
  analyzeGitHubRepo
69
69
  } from "./chunk-HFOQKCD2.js";
@@ -76,25 +76,25 @@ import {
76
76
  getContextForTask,
77
77
  inferTaskCategory,
78
78
  summarizeContextForPrompt
79
- } from "./chunk-4GOT42ZA.js";
79
+ } from "./chunk-K7VGX37L.js";
80
80
  import {
81
81
  DEFAULT_RELEVANCE_CONFIG,
82
82
  MemoryImportance,
83
83
  calculateTextJaccardSimilarity,
84
84
  getToolMemory
85
- } from "./chunk-7QXEK3O6.js";
85
+ } from "./chunk-FTCU55O6.js";
86
86
  import {
87
87
  DEFAULT_TASK_TTL_MS,
88
88
  DEFAULT_TOOL_RATE_LIMITS,
89
89
  clampTaskTtl
90
- } from "./chunk-MZFWRU6E.js";
90
+ } from "./chunk-SHSKW5ML.js";
91
91
  import {
92
92
  getAvailabilityCache,
93
93
  resolveFallback
94
- } from "./chunk-SFZESA5O.js";
94
+ } from "./chunk-SMGH2B3A.js";
95
95
  import {
96
96
  DEFAULTS
97
- } from "./chunk-3HTUYAKS.js";
97
+ } from "./chunk-4A4WPM75.js";
98
98
  import {
99
99
  resolveInsideRoot
100
100
  } from "./chunk-NUBSJGQZ.js";
@@ -110,11 +110,11 @@ import {
110
110
  getAvailableClis,
111
111
  sleep,
112
112
  withTimeout
113
- } from "./chunk-X5BQF6HM.js";
113
+ } from "./chunk-BHA6V7GK.js";
114
114
  import {
115
115
  generateHyphenId,
116
116
  generateUUID
117
- } from "./chunk-PRGNJRID.js";
117
+ } from "./chunk-SORBJPRA.js";
118
118
  import {
119
119
  BUILT_IN_EXPERTS,
120
120
  BuiltInExpertTypeSchema,
@@ -126,12 +126,13 @@ import {
126
126
  } from "./chunk-PQHVC4BD.js";
127
127
  import {
128
128
  createSessionMemory
129
- } from "./chunk-YEQE7WLP.js";
129
+ } from "./chunk-JCETWDU7.js";
130
130
  import {
131
131
  AGENT_ROUTER_TIMEOUTS,
132
132
  API_TIMEOUTS,
133
133
  ARCHITECTURE_KEYWORDS,
134
134
  AgentError,
135
+ BoundedLRUCache,
135
136
  CLI_NAMES,
136
137
  CLI_SUBPROCESS_TIMEOUTS,
137
138
  DEFAULT_CLI,
@@ -197,7 +198,7 @@ import {
197
198
  resolveModelIdentitySync,
198
199
  toExpertTaskAnalysisResult,
199
200
  withStep
200
- } from "./chunk-W5I6L4UT.js";
201
+ } from "./chunk-HKISF2E7.js";
201
202
  import {
202
203
  getNexusDataDir,
203
204
  nexusDataPath,
@@ -26891,7 +26892,7 @@ async function populateUnifiedContextOnState(state) {
26891
26892
  try {
26892
26893
  const taskCandidate = state["task"];
26893
26894
  if (typeof taskCandidate !== "string" || taskCandidate === "") return;
26894
- const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-C4CNVKR5.js");
26895
+ const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-TZGIETJO.js");
26895
26896
  const ctx = await getContextForTask2({
26896
26897
  task: taskCandidate,
26897
26898
  category: inferTaskCategory2(taskCandidate),
@@ -28502,7 +28503,7 @@ var logger21 = createLogger({ component: "PolicyEvaluator" });
28502
28503
  function getPolicyMode() {
28503
28504
  return resolveV2Config().policyMode;
28504
28505
  }
28505
- function evaluatePolicy2(options, context) {
28506
+ function evaluatePipelinePolicy(options, context) {
28506
28507
  const mode = options.mode ?? getPolicyMode();
28507
28508
  if (mode === "off") {
28508
28509
  return { allowed: true, violations: [], mode };
@@ -28664,7 +28665,7 @@ function checkPipelinePolicy(task, stageType) {
28664
28665
  // forces an explicit producer wire-up at this single chokepoint.
28665
28666
  pipelineState: toPipelineStateSnapshot(task.metadata)
28666
28667
  };
28667
- const result = evaluatePolicy2({ engine, mode }, context);
28668
+ const result = evaluatePipelinePolicy({ engine, mode }, context);
28668
28669
  if (!result.allowed) {
28669
28670
  logger22.warn("Pipeline blocked by policy", {
28670
28671
  taskId: task.id,
@@ -32561,34 +32562,24 @@ import { createHash as createHash2 } from "crypto";
32561
32562
  // src/security/access-constraint-deriver/cache.ts
32562
32563
  var DEFAULT_MAX_ENTRIES = 256;
32563
32564
  var PolicyCache = class {
32565
+ cache;
32564
32566
  constructor(maxEntries = DEFAULT_MAX_ENTRIES) {
32565
- this.maxEntries = maxEntries;
32567
+ this.cache = new BoundedLRUCache(maxEntries);
32566
32568
  }
32567
- entries = /* @__PURE__ */ new Map();
32568
32569
  /** Gets a cached policy or undefined. Side effect: bumps LRU position. */
32569
32570
  get(objectiveHash) {
32570
- const entry = this.entries.get(objectiveHash);
32571
- if (entry === void 0) return void 0;
32572
- this.entries.delete(objectiveHash);
32573
- this.entries.set(objectiveHash, entry);
32574
- return entry.policy;
32571
+ return this.cache.get(objectiveHash);
32575
32572
  }
32576
- /** Stores a policy. Evicts the oldest entry if at capacity. */
32573
+ /** Stores a policy. Evicts the least-recently-used entry if at capacity. */
32577
32574
  set(objectiveHash, policy) {
32578
- if (this.entries.has(objectiveHash)) {
32579
- this.entries.delete(objectiveHash);
32580
- } else if (this.entries.size >= this.maxEntries) {
32581
- const oldest = this.entries.keys().next().value;
32582
- if (oldest !== void 0) this.entries.delete(oldest);
32583
- }
32584
- this.entries.set(objectiveHash, { policy, insertedAt: getTimeProvider().now() });
32575
+ this.cache.set(objectiveHash, policy);
32585
32576
  }
32586
32577
  /** Clears all entries. Useful for tests. */
32587
32578
  clear() {
32588
- this.entries.clear();
32579
+ this.cache.clear();
32589
32580
  }
32590
32581
  get size() {
32591
- return this.entries.size;
32582
+ return this.cache.size;
32592
32583
  }
32593
32584
  };
32594
32585
  var instance;
@@ -42385,7 +42376,7 @@ async function tryIssueTriage(task) {
42385
42376
  try {
42386
42377
  const issueMatch = task.match(/github\.com\/([^/]+\/[^/]+)\/issues\/(\d+)/);
42387
42378
  if (issueMatch === null) return null;
42388
- const { createIssueTriage } = await import("./issue-triage-VB5CVE43.js");
42379
+ const { createIssueTriage } = await import("./issue-triage-QIVZN3PJ.js");
42389
42380
  const triage = createIssueTriage();
42390
42381
  const owner = issueMatch[1] ?? "";
42391
42382
  const num = issueMatch[2] ?? "";
@@ -42413,7 +42404,7 @@ var VALID_TEMPLATES = /* @__PURE__ */ new Set([
42413
42404
  ]);
42414
42405
  async function classifyWithLLM(task) {
42415
42406
  try {
42416
- const { executeExpert: executeExpert2 } = await import("./expert-bridge-VIWFPPGZ.js");
42407
+ const { executeExpert: executeExpert2 } = await import("./expert-bridge-WP5ZWXFY.js");
42417
42408
  const prompt = [
42418
42409
  "Classify this task into exactly one pipeline template.",
42419
42410
  "Templates: dev (implementation/bug fix/refactor), research (investigate/evaluate/compare),",
@@ -43195,7 +43186,7 @@ var memoryInitPromise = null;
43195
43186
  async function initPipelineMemory() {
43196
43187
  if (cachedMemory !== null) return cachedMemory;
43197
43188
  try {
43198
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-HGCDSZ5R.js");
43189
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-O24IVZAW.js");
43199
43190
  const { getLearningDir } = await import("./learning-persistence-UKPO7RYK.js");
43200
43191
  const mem = createSessionMemory2(getLearningDir());
43201
43192
  mem.startSession(`pipeline-${String(getTimeProvider().now())}`);
@@ -43252,7 +43243,7 @@ function recordRoutingExperience(category, success, durationMs) {
43252
43243
  callRecord(routingMemoryCache);
43253
43244
  return;
43254
43245
  }
43255
- routingMemoryInitPromise ??= import("./routing-memory-PYO46COZ.js").then(({ createRoutingMemory }) => {
43246
+ routingMemoryInitPromise ??= import("./routing-memory-AGHJQTRH.js").then(({ createRoutingMemory }) => {
43256
43247
  routingMemoryCache ??= createRoutingMemory();
43257
43248
  return routingMemoryCache;
43258
43249
  }).catch((error) => {
@@ -43286,7 +43277,7 @@ ${text}` : "";
43286
43277
  }
43287
43278
  async function getWeatherContext() {
43288
43279
  try {
43289
- const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-RWAMQHBL.js");
43280
+ const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-S5YXRY7G.js");
43290
43281
  const report = generateWeatherReport2({ includeAdaptive: true });
43291
43282
  const mappings = "recommendedMappings" in report ? report.recommendedMappings : [];
43292
43283
  if (!Array.isArray(mappings) || mappings.length === 0) return "";
@@ -43304,7 +43295,7 @@ ${lines}
43304
43295
  }
43305
43296
  async function getMemoryContext(task) {
43306
43297
  try {
43307
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-HGCDSZ5R.js");
43298
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-O24IVZAW.js");
43308
43299
  const { getLearningDir } = await import("./learning-persistence-UKPO7RYK.js");
43309
43300
  const memory = createSessionMemory2(getLearningDir(), { maxLearningsInContext: 10 });
43310
43301
  const learnings = memory.searchLearnings(task.slice(0, 200));
@@ -43410,7 +43401,7 @@ ${contextBlock}`;
43410
43401
  const strategy = config.votingStrategy ?? "higher_order";
43411
43402
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
43412
43403
  try {
43413
- const { executeVoting } = await import("./consensus-vote-4RIUUEZQ.js");
43404
+ const { executeVoting } = await import("./consensus-vote-ZRADOLXH.js");
43414
43405
  const votingResult = await executeVoting(
43415
43406
  {
43416
43407
  proposal: plan.slice(0, 4e3),
@@ -44337,7 +44328,7 @@ async function searchCodebaseForTask(task) {
44337
44328
  }
44338
44329
  async function queryResearchRegistry(task) {
44339
44330
  try {
44340
- const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-CNZ4C3FN.js");
44331
+ const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-DH5PPX7A.js");
44341
44332
  const topic = task.split(/[.!?\n]/).filter((s) => s.trim().length > 10)[0]?.trim();
44342
44333
  if (topic === void 0) return null;
44343
44334
  const result = await synthesizeResearch2(topic.slice(0, 50));
@@ -44408,7 +44399,7 @@ function createScanStageWrapper() {
44408
44399
  try {
44409
44400
  const slug = ctx.task.match(/([a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+)/)?.[1];
44410
44401
  if (slug !== void 0) {
44411
- const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-5MFY7GGQ.js");
44402
+ const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-KZNEXDCI.js");
44412
44403
  const plan = await generateSecurityPlan2({ repo: slug, maxScanners: 10 });
44413
44404
  const recs = plan.recommendations.slice(0, 5).map((r) => `${r.priority}: ${r.displayName} (${r.category})`).join("; ");
44414
44405
  return output(PIPELINE_STATE_KEYS.FINDINGS, recs, getTimeProvider().now() - start, true);
@@ -45858,6 +45849,32 @@ function calculateFitnessScore(version) {
45858
45849
  return calculator.audit(version);
45859
45850
  }
45860
45851
 
45852
+ // src/mcp/tools/improvement-review-signals.ts
45853
+ function worstDimension(audit) {
45854
+ let worst;
45855
+ for (const finding of audit.findings) {
45856
+ if (worst === void 0 || finding.pointsDeducted > worst.pointsDeducted) {
45857
+ worst = { dimension: finding.dimension, pointsDeducted: finding.pointsDeducted };
45858
+ }
45859
+ }
45860
+ return worst?.dimension;
45861
+ }
45862
+ function emitFitnessDeclinedSignal(audit, fitnessFloor, bus, logger55) {
45863
+ if (audit.score >= fitnessFloor) return;
45864
+ try {
45865
+ const dimension = worstDimension(audit);
45866
+ bus.emit({
45867
+ type: "signal.fitness_declined",
45868
+ timestamp: getTimeProvider().now(),
45869
+ score: audit.score,
45870
+ floor: fitnessFloor,
45871
+ ...dimension !== void 0 ? { dimension } : {}
45872
+ });
45873
+ } catch (error) {
45874
+ logger55.warn("Failed to emit signal.fitness_declined", { error: getErrorMessage(error) });
45875
+ }
45876
+ }
45877
+
45861
45878
  // src/mcp/tools/improvement-review.ts
45862
45879
  var execFileAsync3 = promisify3(execFile3);
45863
45880
  var ImprovementReviewInputSchema = z95.object({
@@ -46112,6 +46129,7 @@ async function runImprovementReview(input, deps = {}) {
46112
46129
  ...detectFitnessSignals(audit, fitnessFloor)
46113
46130
  ];
46114
46131
  signals.sort((a, b) => SEVERITY_ORDER3[a.severity] - SEVERITY_ORDER3[b.severity]);
46132
+ emitFitnessDeclinedSignal(audit, fitnessFloor, getPipelineEventBus(), logger55);
46115
46133
  const { issuesFiled, issuesSkipped } = fileIssues ? await fileSignalsAsIssues(signals, { logger: logger55 }) : { issuesFiled: [], issuesSkipped: [] };
46116
46134
  return {
46117
46135
  window: windowLabel,
@@ -51024,7 +51042,7 @@ var GitHubTaskTracker = class {
51024
51042
  cachedProvider = null;
51025
51043
  async getProvider() {
51026
51044
  if (this.cachedProvider !== null) return this.cachedProvider;
51027
- const { createScmProvider } = await import("./factory-NNSXCD25.js");
51045
+ const { createScmProvider } = await import("./factory-2TN2VZTR.js");
51028
51046
  const result = await createScmProvider({ repo: this.config.repo ?? "" });
51029
51047
  if (!result.ok) throw new Error(`SCM provider error: ${result.error.message}`);
51030
51048
  this.cachedProvider = result.value;
@@ -51532,7 +51550,7 @@ export {
51532
51550
  createDefaultPolicyEngine,
51533
51551
  resolveV2Config,
51534
51552
  getPolicyMode,
51535
- evaluatePolicy2 as evaluatePolicy,
51553
+ evaluatePipelinePolicy,
51536
51554
  createDelegatePipeline,
51537
51555
  delegateInputToTaskContract,
51538
51556
  executeDelegatePipeline,
@@ -51728,4 +51746,4 @@ export {
51728
51746
  detectBackend,
51729
51747
  createTaskTracker
51730
51748
  };
51731
- //# sourceMappingURL=chunk-4LEUIAYB.js.map
51749
+ //# sourceMappingURL=chunk-IJ2AZZVH.js.map