nexus-agents 2.145.1 → 2.147.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 (31) hide show
  1. package/dist/{chunk-QKWS3REM.js → chunk-45QUEZNS.js} +2 -2
  2. package/dist/{chunk-MFTWFPXS.js → chunk-C7PXTRAR.js} +2 -2
  3. package/dist/{chunk-ZRRL3YB6.js → chunk-I5T7GUM7.js} +4 -194
  4. package/dist/chunk-I5T7GUM7.js.map +1 -0
  5. package/dist/{chunk-SDJLXKZZ.js → chunk-LREXQ6DP.js} +3 -3
  6. package/dist/chunk-RCQLUJY3.js +208 -0
  7. package/dist/chunk-RCQLUJY3.js.map +1 -0
  8. package/dist/{chunk-J2KMYVWA.js → chunk-RII4VXHO.js} +34 -1
  9. package/dist/{chunk-J2KMYVWA.js.map → chunk-RII4VXHO.js.map} +1 -1
  10. package/dist/{chunk-IIGRVRKD.js → chunk-VFA66KF5.js} +239 -200
  11. package/dist/{chunk-IIGRVRKD.js.map → chunk-VFA66KF5.js.map} +1 -1
  12. package/dist/{chunk-AREFLH3S.js → chunk-Y4NDNQYU.js} +2 -2
  13. package/dist/cli.js +55 -12
  14. package/dist/cli.js.map +1 -1
  15. package/dist/{consensus-vote-6V3JNRXI.js → consensus-vote-IBT3C5YC.js} +4 -3
  16. package/dist/{improvement-review-K7YYYZCJ.js → improvement-review-WMDMS32T.js} +4 -3
  17. package/dist/index.d.ts +33 -1
  18. package/dist/index.js +19 -17
  19. package/dist/index.js.map +1 -1
  20. package/dist/{issue-triage-44OGWBDA.js → issue-triage-R7DMXIEN.js} +3 -2
  21. package/dist/{setup-command-I3U4QK54.js → setup-command-IOHRDNII.js} +3 -3
  22. package/package.json +1 -1
  23. package/dist/chunk-ZRRL3YB6.js.map +0 -1
  24. /package/dist/{chunk-QKWS3REM.js.map → chunk-45QUEZNS.js.map} +0 -0
  25. /package/dist/{chunk-MFTWFPXS.js.map → chunk-C7PXTRAR.js.map} +0 -0
  26. /package/dist/{chunk-SDJLXKZZ.js.map → chunk-LREXQ6DP.js.map} +0 -0
  27. /package/dist/{chunk-AREFLH3S.js.map → chunk-Y4NDNQYU.js.map} +0 -0
  28. /package/dist/{consensus-vote-6V3JNRXI.js.map → consensus-vote-IBT3C5YC.js.map} +0 -0
  29. /package/dist/{improvement-review-K7YYYZCJ.js.map → improvement-review-WMDMS32T.js.map} +0 -0
  30. /package/dist/{issue-triage-44OGWBDA.js.map → issue-triage-R7DMXIEN.js.map} +0 -0
  31. /package/dist/{setup-command-I3U4QK54.js.map → setup-command-IOHRDNII.js.map} +0 -0
@@ -7,7 +7,7 @@ import {
7
7
  toolStructuredError,
8
8
  toolSuccessStructured,
9
9
  wrapToolWithTimeout
10
- } from "./chunk-J2KMYVWA.js";
10
+ } from "./chunk-RII4VXHO.js";
11
11
  import {
12
12
  JsonlStore,
13
13
  SECURITY_KEYWORDS,
@@ -2132,4 +2132,4 @@ export {
2132
2132
  runImprovementReview,
2133
2133
  registerImprovementReviewTool
2134
2134
  };
2135
- //# sourceMappingURL=chunk-AREFLH3S.js.map
2135
+ //# sourceMappingURL=chunk-Y4NDNQYU.js.map
package/dist/cli.js CHANGED
@@ -22,7 +22,7 @@ import "./chunk-UUEK5FP6.js";
22
22
  import {
23
23
  setupCommandAsync,
24
24
  verifyCommand
25
- } from "./chunk-MFTWFPXS.js";
25
+ } from "./chunk-C7PXTRAR.js";
26
26
  import "./chunk-LEUP55YB.js";
27
27
  import {
28
28
  AuthHandler,
@@ -142,7 +142,7 @@ import {
142
142
  validateCommand,
143
143
  validateWorkflow,
144
144
  wrapInMarkdownFence
145
- } from "./chunk-IIGRVRKD.js";
145
+ } from "./chunk-VFA66KF5.js";
146
146
  import "./chunk-RPTEVESB.js";
147
147
  import "./chunk-JQZ5R3EM.js";
148
148
  import "./chunk-HFOQKCD2.js";
@@ -170,7 +170,7 @@ import {
170
170
  loadConfig,
171
171
  runDoctor,
172
172
  validateNexusEnv
173
- } from "./chunk-SDJLXKZZ.js";
173
+ } from "./chunk-LREXQ6DP.js";
174
174
  import "./chunk-SOCIRTAC.js";
175
175
  import {
176
176
  shutdownExpertBridge
@@ -183,7 +183,7 @@ import {
183
183
  VoteThresholdSchema,
184
184
  executeVoting,
185
185
  registerConsensusVoteTool
186
- } from "./chunk-QKWS3REM.js";
186
+ } from "./chunk-45QUEZNS.js";
187
187
  import {
188
188
  loadUsageEvents,
189
189
  rollupByModel
@@ -196,7 +196,7 @@ import {
196
196
  createFullGitHubProvider,
197
197
  evaluatePolicy,
198
198
  parsePRUrl
199
- } from "./chunk-ZRRL3YB6.js";
199
+ } from "./chunk-I5T7GUM7.js";
200
200
  import "./chunk-SUGO2OSD.js";
201
201
  import {
202
202
  ReputationCache,
@@ -215,10 +215,11 @@ import {
215
215
  registerImprovementReviewTool,
216
216
  runImprovementReview,
217
217
  scanForSecrets
218
- } from "./chunk-AREFLH3S.js";
218
+ } from "./chunk-Y4NDNQYU.js";
219
219
  import {
220
220
  createDefaultPolicyFirewall
221
- } from "./chunk-J2KMYVWA.js";
221
+ } from "./chunk-RII4VXHO.js";
222
+ import "./chunk-RCQLUJY3.js";
222
223
  import {
223
224
  PaperStatusSchema,
224
225
  createResearchIssue,
@@ -3098,7 +3099,7 @@ var COMMAND_CATALOG = [
3098
3099
  },
3099
3100
  {
3100
3101
  command: "remediation-review",
3101
- description: "Soundness-review audit-mode selections (#3765): list pending \xB7 mark --evaluator --sound|--unsound \xB7 sign-off --owner.",
3102
+ description: "Soundness-review audit-mode selections (#3765): list pending \xB7 mark --evaluator --sound|--unsound \xB7 sign-off --owner \xB7 readiness (enforce-readiness verdict + harmful-rate).",
3102
3103
  audience: "maintainer"
3103
3104
  },
3104
3105
  // ── Maintainer (hidden by default) ───────────────────────────────────────
@@ -17829,7 +17830,7 @@ function startImprovementReviewScheduler(options) {
17829
17830
  let running = false;
17830
17831
  const runOnce = async () => {
17831
17832
  try {
17832
- const { runImprovementReview: runImprovementReview2, ImprovementReviewInputSchema: ImprovementReviewInputSchema2 } = await import("./improvement-review-K7YYYZCJ.js");
17833
+ const { runImprovementReview: runImprovementReview2, ImprovementReviewInputSchema: ImprovementReviewInputSchema2 } = await import("./improvement-review-WMDMS32T.js");
17833
17834
  const input = ImprovementReviewInputSchema2.parse({ fileIssues });
17834
17835
  const result = await runImprovementReview2(input, { logger: logger19 });
17835
17836
  logger19.info("Scheduled improvement_review complete", {
@@ -18144,7 +18145,10 @@ function registerExecuteExpert(ctx, shared) {
18144
18145
  logger: ctx.logger,
18145
18146
  rateLimiter: ctx.rateLimiterFactory.getForTool("execute_expert"),
18146
18147
  cliCache: getSharedCliCache(),
18147
- ...ctx.securityConfig !== void 0 && { security: ctx.securityConfig }
18148
+ ...ctx.securityConfig !== void 0 && { security: ctx.securityConfig },
18149
+ // #4097: thread the durable logger so ClawGuard AUDIT-mode violations during
18150
+ // the expert's nested tool calls are persisted to the shared hash chain.
18151
+ ...ctx.auditLogger !== void 0 && { auditLogger: ctx.auditLogger }
18148
18152
  });
18149
18153
  }
18150
18154
  function buildWorkflowEngine(ctx) {
@@ -18223,7 +18227,10 @@ function registerOrchestrateToolSafe(ctx) {
18223
18227
  rateLimiter: ctx.rateLimiterFactory.getForTool("orchestrate"),
18224
18228
  security: ctx.securityConfig,
18225
18229
  // Wire model adapter for fallback orchestration path (Issue #827)
18226
- modelAdapter: ctx.modelAdapter
18230
+ modelAdapter: ctx.modelAdapter,
18231
+ // #4097: thread the durable logger so ClawGuard AUDIT-mode violations
18232
+ // during nested tool calls are persisted to the shared hash chain.
18233
+ ...ctx.auditLogger !== void 0 && { auditLogger: ctx.auditLogger }
18227
18234
  });
18228
18235
  } catch (error) {
18229
18236
  const message = getErrorMessage(error);
@@ -24903,6 +24910,39 @@ function runList(format) {
24903
24910
  process.stdout.write(`${lines.join("\n")}
24904
24911
  `);
24905
24912
  }
24913
+ function harmfulRate(ev) {
24914
+ return ev.judgedSelections === 0 ? 0 : (ev.judgedSelections - ev.judgedSound) / ev.judgedSelections;
24915
+ }
24916
+ function formatReadiness(verdict, evidence, harmful) {
24917
+ const maxPct = Math.round((1 - DEFAULT_ENFORCE_READINESS_CONFIG.minSoundnessRate) * 100);
24918
+ const lines = [
24919
+ `Enforcement readiness: ${verdict.ready ? "READY" : "NOT READY"}`,
24920
+ `harmful-rate: ${String(Math.round(harmful * 100))}% of ${String(evidence.judgedSelections)} judged sound-reviews (threshold \u2264 ${String(maxPct)}%)`,
24921
+ "Criteria:"
24922
+ ];
24923
+ for (const c of verdict.criteria) {
24924
+ lines.push(` [${c.met ? "PASS" : "FAIL"}] ${c.name} \u2014 ${c.detail}`);
24925
+ }
24926
+ if (verdict.blockers.length > 0) lines.push(`Blockers: ${verdict.blockers.join(", ")}`);
24927
+ return lines.join("\n");
24928
+ }
24929
+ function runReadiness(format) {
24930
+ const evidence = buildEnforceReadinessEvidence(
24931
+ readRemediationSoakSummary(),
24932
+ readRemediationReviewSummary()
24933
+ );
24934
+ const verdict = evaluateEnforceReadiness(evidence);
24935
+ const harmful = harmfulRate(evidence);
24936
+ if (format === "json") {
24937
+ process.stdout.write(
24938
+ `${JSON.stringify({ ready: verdict.ready, harmfulRate: harmful, evidence, criteria: verdict.criteria, blockers: verdict.blockers }, null, 2)}
24939
+ `
24940
+ );
24941
+ return;
24942
+ }
24943
+ process.stdout.write(`${formatReadiness(verdict, evidence, harmful)}
24944
+ `);
24945
+ }
24906
24946
  function resolveSound(options) {
24907
24947
  const sound = options.sound === true;
24908
24948
  const unsound = options.unsound === true;
@@ -24991,9 +25031,12 @@ async function handleRemediationReviewCommand(args) {
24991
25031
  case "sign-off":
24992
25032
  runSignOff(args);
24993
25033
  break;
25034
+ case "readiness":
25035
+ runReadiness(args.options.format);
25036
+ break;
24994
25037
  default:
24995
25038
  throw new Error(
24996
- `remediation-review: unknown subcommand '${sub}' (expected list | mark | sign-off)`
25039
+ `remediation-review: unknown subcommand '${sub}' (expected list | mark | sign-off | readiness)`
24997
25040
  );
24998
25041
  }
24999
25042
  await Promise.resolve();