nexus-agents 4.21.0 → 4.22.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.
package/dist/cli.js CHANGED
@@ -153,7 +153,7 @@ import {
153
153
  validateNexusEnv,
154
154
  validateWorkflow,
155
155
  wrapInMarkdownFence
156
- } from "./chunk-I5SIJNTE.js";
156
+ } from "./chunk-RNMJUIPI.js";
157
157
  import "./chunk-VZHZFAYL.js";
158
158
  import "./chunk-HFOQKCD2.js";
159
159
  import "./chunk-RSMG2DPB.js";
@@ -173,7 +173,7 @@ import {
173
173
  doctorCommand,
174
174
  initDataDirectories,
175
175
  runDoctor
176
- } from "./chunk-HSTJBWEB.js";
176
+ } from "./chunk-IIJSUNEK.js";
177
177
  import {
178
178
  buildOpenAICompatAdapters,
179
179
  readOpenAICompatEnv
@@ -191,7 +191,7 @@ import {
191
191
  mapOutcomeToDecision,
192
192
  recordAuthenticVote,
193
193
  registerConsensusVoteTool
194
- } from "./chunk-WRJGJNPL.js";
194
+ } from "./chunk-G2USF7DN.js";
195
195
  import {
196
196
  loadUsageEvents,
197
197
  rollupByModel
@@ -227,10 +227,12 @@ import {
227
227
  registerImprovementReviewTool,
228
228
  runImprovementReview,
229
229
  scanForSecrets
230
- } from "./chunk-3STSLKZ4.js";
230
+ } from "./chunk-PT3QWCKF.js";
231
231
  import {
232
- createDefaultPolicyFirewall
233
- } from "./chunk-F6ZTTBI3.js";
232
+ createDefaultPolicyFirewall,
233
+ setGlobalPolicyFirewall,
234
+ stagePolicyFirewallForRollout
235
+ } from "./chunk-JJC5YKBH.js";
234
236
  import "./chunk-NF7GW4QQ.js";
235
237
  import {
236
238
  createUnifiedRegistry,
@@ -19551,7 +19553,7 @@ function startImprovementReviewScheduler(options) {
19551
19553
  let running = false;
19552
19554
  const runOnce = async () => {
19553
19555
  try {
19554
- const { runImprovementReview: runImprovementReview2, ImprovementReviewInputSchema: ImprovementReviewInputSchema2 } = await import("./improvement-review-R3BIIG2O.js");
19556
+ const { runImprovementReview: runImprovementReview2, ImprovementReviewInputSchema: ImprovementReviewInputSchema2 } = await import("./improvement-review-W6HJIQLG.js");
19555
19557
  const input = ImprovementReviewInputSchema2.parse({ fileIssues });
19556
19558
  const result = await runImprovementReview2(input, { logger: logger22 });
19557
19559
  logger22.info("Scheduled improvement_review complete", {
@@ -20045,10 +20047,13 @@ function logToolRegistration(logger22, allowlist, info) {
20045
20047
  executionMode: info.executionMode ?? "read-only"
20046
20048
  });
20047
20049
  if (info.policyFirewall !== void 0) {
20048
- logger22.warn(
20049
- "PolicyFirewall is configured but not wired to any tool \u2014 no policy middleware runs",
20050
- { configuredMode: info.policyFirewall.getMode() }
20051
- );
20050
+ const mode = info.policyFirewall.getMode();
20051
+ logger22.info("Policy firewall wired to locally registered tools", {
20052
+ policyMode: mode,
20053
+ denialsApplied: mode === "enforce",
20054
+ coveredTools: activeTools.length,
20055
+ upstreamProxiesUncovered: true
20056
+ });
20052
20057
  }
20053
20058
  }
20054
20059
  function buildStandardDeps(ctx, toolName) {
@@ -20210,6 +20215,9 @@ function registerMcpTools(options) {
20210
20215
  logger: toolInfra.logger
20211
20216
  });
20212
20217
  setGlobalToolRateLimiterFactory(rateLimiterFactory);
20218
+ if (policyFirewall !== void 0) {
20219
+ setGlobalPolicyFirewall(stagePolicyFirewallForRollout(policyFirewall, logger22));
20220
+ }
20213
20221
  initV2PipelineSubsystems(logger22, options.auditLogger);
20214
20222
  const gatewayOptions = { ...options, server: observableServer };
20215
20223
  const ctx = createToolContext(gatewayOptions, toolInfra, rateLimiterFactory);
@@ -21806,7 +21814,12 @@ function logSecurityConfig(logger22, config) {
21806
21814
  const policyVals = getPolicyValues(config);
21807
21815
  const rateLimitVals = getRateLimitValues(config);
21808
21816
  logger22.info("Security configuration", {
21809
- policyMode: policyVals.mode,
21817
+ // #4888: named `configuredPolicyMode`, not `policyMode`. This runs at
21818
+ // startup, before `stagePolicyFirewallForRollout` decides the mode that
21819
+ // will actually apply — which is `warn` unless the operator opted in. A
21820
+ // field called `policyMode` reading `enforce` here would claim an
21821
+ // enforcement the staged rollout does not perform.
21822
+ configuredPolicyMode: policyVals.mode,
21810
21823
  defaultExecutionMode: policyVals.defaultExec,
21811
21824
  policyRuleCount: policyFirewall.getRules().length,
21812
21825
  authEnabled: authVals.enabled,