nexus-agents 8.23.1 → 8.23.2

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.
@@ -8,7 +8,7 @@ import {
8
8
  NODE_ENGINE_RANGE,
9
9
  VERSION,
10
10
  isNodeVersionSupported
11
- } from "./chunk-5HR5VEYY.js";
11
+ } from "./chunk-OXUJBY4W.js";
12
12
  import {
13
13
  capitalize
14
14
  } from "./chunk-7LP6VJRP.js";
@@ -1228,7 +1228,7 @@ async function runDoctorFix(result) {
1228
1228
  writeLine2("\u2500".repeat(40));
1229
1229
  let fixCount = 0;
1230
1230
  if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
1231
- const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-PJJMHEEO.js");
1231
+ const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-IJ6CYVCL.js");
1232
1232
  const outcome = describeDataDirFix2(initDataDirectories2());
1233
1233
  writeLine2(outcome.line);
1234
1234
  if (outcome.counted) fixCount++;
@@ -1330,4 +1330,4 @@ export {
1330
1330
  startStdioServer,
1331
1331
  closeServer
1332
1332
  };
1333
- //# sourceMappingURL=chunk-T6HYZUV7.js.map
1333
+ //# sourceMappingURL=chunk-TCUEFOPW.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-5HR5VEYY.js";
3
+ } from "./chunk-OXUJBY4W.js";
4
4
  import {
5
5
  emitClawGuardViolation
6
6
  } from "./chunk-YOT4GWJV.js";
@@ -859,6 +859,11 @@ function emitPolicyAudit({
859
859
  }
860
860
 
861
861
  // src/mcp/middleware/secure-handler.ts
862
+ var registrationAuditLoggers = /* @__PURE__ */ new WeakMap();
863
+ function setSecureHandlerAuditLogger(logger, auditLogger) {
864
+ if (auditLogger === void 0) registrationAuditLoggers.delete(logger);
865
+ else registrationAuditLoggers.set(logger, auditLogger);
866
+ }
862
867
  function rateLimitError(nextTokenMs) {
863
868
  return toolStructuredError({
864
869
  errorCategory: "transient",
@@ -1062,6 +1067,9 @@ function runPreChecks(config, args, mode, requestContext, logger) {
1062
1067
  return { error: null, sanitizedArgs, nearMiss: policy.nearMiss, sanitization };
1063
1068
  }
1064
1069
  function createSecureHandler(handler, config) {
1070
+ const registeredAuditLogger = config.logger && registrationAuditLoggers.get(config.logger);
1071
+ if (config.auditLogger === void 0 && registeredAuditLogger !== void 0)
1072
+ config = { ...config, auditLogger: registeredAuditLogger };
1065
1073
  const logger = config.logger ?? createLogger({ tool: config.toolName });
1066
1074
  const mode = config.executionMode ?? "read-only";
1067
1075
  return async (args) => {
@@ -2218,6 +2226,7 @@ export {
2218
2226
  toolError,
2219
2227
  setGlobalPolicyFirewall,
2220
2228
  stagePolicyFirewallForRollout,
2229
+ setSecureHandlerAuditLogger,
2221
2230
  createSecureHandler,
2222
2231
  createMcpNotifier,
2223
2232
  NOOP_NOTIFIER,
@@ -2246,4 +2255,4 @@ export {
2246
2255
  VOTING_THRESHOLDS,
2247
2256
  ConsensusMetricsSchema
2248
2257
  };
2249
- //# sourceMappingURL=chunk-B2EOHLII.js.map
2258
+ //# sourceMappingURL=chunk-ZFZJ6LTJ.js.map