nexus-agents 2.30.7 → 2.30.8

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.
@@ -12347,7 +12347,7 @@ async function processVotesWithCascade(votes, opts) {
12347
12347
  var CONTRARIAN_ESCALATION_THRESHOLD = 0.8;
12348
12348
  async function runContrarianCheck(proposal, log) {
12349
12349
  try {
12350
- const { executeExpert } = await import("./expert-bridge-IKR23WRI.js");
12350
+ const { executeExpert } = await import("./expert-bridge-DXSKS5OG.js");
12351
12351
  const prompt = [
12352
12352
  "You are a contrarian analyst. Your job is to find reasons this proposal should be REJECTED.",
12353
12353
  "Look for: YAGNI (not needed), MISALIGNED (wrong tech/architecture), SECURITY_RISK, SCOPE_CREEP.",
@@ -12717,4 +12717,4 @@ export {
12717
12717
  CONSENSUS_VOTE_OUTPUT_SCHEMA,
12718
12718
  registerConsensusVoteTool
12719
12719
  };
12720
- //# sourceMappingURL=chunk-23G7NV6B.js.map
12720
+ //# sourceMappingURL=chunk-4PRT4F7I.js.map
@@ -25,7 +25,7 @@ import {
25
25
  toolSuccessStructured,
26
26
  withProgressHeartbeat,
27
27
  wrapToolWithTimeout
28
- } from "./chunk-23G7NV6B.js";
28
+ } from "./chunk-4PRT4F7I.js";
29
29
  import {
30
30
  REGISTRY_PATH,
31
31
  getProjectRoot,
@@ -65,7 +65,7 @@ import {
65
65
  import {
66
66
  DEFAULT_TASK_TTL_MS,
67
67
  clampTaskTtl
68
- } from "./chunk-WGP6G6QU.js";
68
+ } from "./chunk-MDFQ3G3Y.js";
69
69
  import {
70
70
  createSessionMemory
71
71
  } from "./chunk-ZXIFNJ7Q.js";
@@ -87,7 +87,7 @@ import {
87
87
  } from "./chunk-2L6A7RUZ.js";
88
88
  import {
89
89
  executeExpert
90
- } from "./chunk-ZVUNIQLB.js";
90
+ } from "./chunk-US7Z5ITC.js";
91
91
  import {
92
92
  ClaudeCliAdapter,
93
93
  CliDetectionCache,
@@ -35794,7 +35794,13 @@ var ExecuteExpertInputSchema = z67.object({
35794
35794
  )
35795
35795
  });
35796
35796
  function sanitizeExpertSummary(summary) {
35797
- return summary.replace(/<[^>]*>/g, "").replace(/\b(ignore|forget|disregard)\s+(previous|above|all)\b/gi, "[REDACTED]").slice(0, 2e3);
35797
+ let cleaned = summary;
35798
+ for (let i = 0; i < 10; i++) {
35799
+ const next = cleaned.replace(/<[^>]*>/g, "");
35800
+ if (next === cleaned) break;
35801
+ cleaned = next;
35802
+ }
35803
+ return cleaned.replace(/\b(ignore|forget|disregard)\s+(previous|above|all)\b/gi, "[REDACTED]").slice(0, 2e3);
35798
35804
  }
35799
35805
  function buildTask(input) {
35800
35806
  const autoTimeout = getExpertTaskTimeout(input.task);
@@ -40993,7 +40999,7 @@ var VALID_TEMPLATES = /* @__PURE__ */ new Set([
40993
40999
  ]);
40994
41000
  async function classifyWithLLM(task) {
40995
41001
  try {
40996
- const { executeExpert: executeExpert2 } = await import("./expert-bridge-IKR23WRI.js");
41002
+ const { executeExpert: executeExpert2 } = await import("./expert-bridge-DXSKS5OG.js");
40997
41003
  const prompt = [
40998
41004
  "Classify this task into exactly one pipeline template.",
40999
41005
  "Templates: dev (implementation/bug fix/refactor), research (investigate/evaluate/compare),",
@@ -41996,7 +42002,7 @@ ${contextBlock}`;
41996
42002
  const strategy = config.votingStrategy ?? "higher_order";
41997
42003
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
41998
42004
  try {
41999
- const { executeVoting } = await import("./consensus-vote-MFGKPIAO.js");
42005
+ const { executeVoting } = await import("./consensus-vote-6U4LANAT.js");
42000
42006
  const votingResult = await executeVoting(
42001
42007
  {
42002
42008
  proposal: plan.slice(0, 4e3),
@@ -47993,12 +47999,39 @@ var PATCH_PATTERNS = [
47993
47999
  // Alternative fences: ```patch, ```text, ``` with diff --git
47994
48000
  /```(?:patch|text|)\n(diff --git[\s\S]*?)```/i,
47995
48001
  // Unified diff in fenced block: --- a/file
47996
- /```(?:diff|patch|text|)\n(---\s+a\/[\s\S]*?)```/i,
47997
- // Raw diff --git without fences
47998
- /(diff --git[\s\S]*?)(?:\n\n[^d]|$)/,
47999
- // Raw unified diff without fences
48000
- /\n(--- a\/[\s\S]*?\n\+\+\+ b\/[\s\S]*?)(?:\n\n[^-+@ ]|$)/
48002
+ /```(?:diff|patch|text|)\n(---\s+a\/[\s\S]*?)```/i
48001
48003
  ];
48004
+ var MAX_RAW_EXTRACT_LEN = 256 * 1024;
48005
+ function extractRawDiffGit(response) {
48006
+ const start = response.indexOf("diff --git");
48007
+ if (start === -1) return null;
48008
+ let i = start;
48009
+ while (i < response.length) {
48010
+ const nl = response.indexOf("\n\n", i);
48011
+ if (nl === -1) return response.slice(start);
48012
+ const after = response.charAt(nl + 2);
48013
+ if (after !== "d" && after !== "") return response.slice(start, nl);
48014
+ i = nl + 2;
48015
+ }
48016
+ return response.slice(start);
48017
+ }
48018
+ function extractRawUnifiedDiff(response) {
48019
+ const start = response.indexOf("\n--- a/");
48020
+ if (start === -1) return null;
48021
+ const plusIdx = response.indexOf("\n+++ b/", start);
48022
+ if (plusIdx === -1) return null;
48023
+ let i = plusIdx;
48024
+ while (i < response.length) {
48025
+ const nl = response.indexOf("\n\n", i);
48026
+ if (nl === -1) return response.slice(start + 1);
48027
+ const after = response.charAt(nl + 2);
48028
+ if (after !== "-" && after !== "+" && after !== "@" && after !== " " && after !== "") {
48029
+ return response.slice(start + 1, nl);
48030
+ }
48031
+ i = nl + 2;
48032
+ }
48033
+ return response.slice(start + 1);
48034
+ }
48002
48035
  function extractPatch(response) {
48003
48036
  for (const pattern of PATCH_PATTERNS) {
48004
48037
  const match = pattern.exec(response);
@@ -48006,6 +48039,11 @@ function extractPatch(response) {
48006
48039
  return normalizePatch(match[1]);
48007
48040
  }
48008
48041
  }
48042
+ const bounded = response.length > MAX_RAW_EXTRACT_LEN ? response.slice(0, MAX_RAW_EXTRACT_LEN) : response;
48043
+ const raw1 = extractRawDiffGit(bounded);
48044
+ if (raw1 !== null) return normalizePatch(raw1);
48045
+ const raw2 = extractRawUnifiedDiff(bounded);
48046
+ if (raw2 !== null) return normalizePatch(raw2);
48009
48047
  return null;
48010
48048
  }
48011
48049
  function normalizePatch(raw) {
@@ -48146,7 +48184,7 @@ function extractErrorHint(response, maxLen = 200) {
48146
48184
  response
48147
48185
  );
48148
48186
  if (errorMatch !== null) return errorMatch[0].slice(0, maxLen);
48149
- const failMatch = /(?:still fails|test.*fail|doesn't work|incorrect)[^\n]{0,100}/i.exec(response);
48187
+ const failMatch = /(?:still fails|test.{0,200}?fail|doesn't work|incorrect)[^\n]{0,100}/i.exec(response);
48150
48188
  if (failMatch !== null) return failMatch[0].slice(0, maxLen);
48151
48189
  return "";
48152
48190
  }
@@ -53168,4 +53206,4 @@ export {
53168
53206
  detectBackend,
53169
53207
  createTaskTracker
53170
53208
  };
53171
- //# sourceMappingURL=chunk-7GW7ZRJ3.js.map
53209
+ //# sourceMappingURL=chunk-ILGF6JIL.js.map