nexus-agents 2.88.1 → 2.89.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1595,25 +1595,26 @@ function internalError(message, requestId) {
1595
1595
  var MAX_INPUT_SIZE_BYTES = 10 * 1024 * 1024;
1596
1596
  var SECRET_PATTERNS = [
1597
1597
  // API keys with common prefixes
1598
- /\b(sk-[a-zA-Z0-9]{20,})\b/,
1599
- /\b(pk-[a-zA-Z0-9]{20,})\b/,
1598
+ /\b(sk-[a-zA-Z0-9]{20,})\b/g,
1599
+ /\b(pk-[a-zA-Z0-9]{20,})\b/g,
1600
1600
  // AWS-style keys
1601
- /\b(AKIA[A-Z0-9]{16})\b/,
1601
+ /\b(AKIA[A-Z0-9]{16})\b/g,
1602
1602
  // Bearer tokens in output
1603
- /Bearer\s+[a-zA-Z0-9_\-.~+/]+=*/,
1603
+ /Bearer\s+[a-zA-Z0-9_\-.~+/]+=*/g,
1604
1604
  // Generic long hex secrets (40+ chars)
1605
- /\b[0-9a-f]{40,}\b/i,
1605
+ /\b[0-9a-f]{40,}\b/gi,
1606
1606
  // password= or token= in output
1607
- /(?:password|token|secret|apikey|api_key)\s*[=:]\s*\S{8,}/i
1607
+ /(?:password|token|secret|apikey|api_key)\s*[=:]\s*\S{8,}/gi
1608
1608
  ];
1609
1609
  function sanitizeOutput2(text, logger11) {
1610
1610
  let sanitized = text;
1611
1611
  for (const pattern of SECRET_PATTERNS) {
1612
- if (pattern.test(sanitized)) {
1612
+ const before = sanitized;
1613
+ sanitized = sanitized.replace(pattern, "[REDACTED]");
1614
+ if (sanitized !== before) {
1613
1615
  logger11.warn("Potential secret detected in tool output, redacting", {
1614
1616
  pattern: pattern.source.slice(0, 30)
1615
1617
  });
1616
- sanitized = sanitized.replace(pattern, "[REDACTED]");
1617
1618
  }
1618
1619
  }
1619
1620
  return sanitized;
@@ -3317,7 +3318,7 @@ var ResilientAdapter = class {
3317
3318
  async *stream(request) {
3318
3319
  const adapter = await this.ensureAdapter();
3319
3320
  if (adapter === void 0) {
3320
- return;
3321
+ throw new ModelError("No model adapter available");
3321
3322
  }
3322
3323
  yield* adapter.stream(request);
3323
3324
  }
@@ -9602,4 +9603,4 @@ export {
9602
9603
  CONSENSUS_VOTE_OUTPUT_SCHEMA,
9603
9604
  registerConsensusVoteTool
9604
9605
  };
9605
- //# sourceMappingURL=chunk-QA6YV4YF.js.map
9606
+ //# sourceMappingURL=chunk-7QTWFRHH.js.map