nexus-agents 6.3.17 → 7.0.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.
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-OQB3XC5O.js";
7
7
  import {
8
8
  VERSION
9
- } from "./chunk-KASDQSEA.js";
9
+ } from "./chunk-OXJEIMLS.js";
10
10
  import {
11
11
  capitalize
12
12
  } from "./chunk-6T3EPABN.js";
@@ -1201,7 +1201,7 @@ async function runDoctorFix(result) {
1201
1201
  writeLine2("\u2500".repeat(40));
1202
1202
  let fixCount = 0;
1203
1203
  if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
1204
- const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-BQVEUXP5.js");
1204
+ const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-3MPQZUHC.js");
1205
1205
  const outcome = describeDataDirFix2(initDataDirectories2());
1206
1206
  writeLine2(outcome.line);
1207
1207
  if (outcome.counted) fixCount++;
@@ -1303,4 +1303,4 @@ export {
1303
1303
  startStdioServer,
1304
1304
  closeServer
1305
1305
  };
1306
- //# sourceMappingURL=chunk-OI6XXZOE.js.map
1306
+ //# sourceMappingURL=chunk-46XUGUB4.js.map
@@ -7,7 +7,7 @@ import {
7
7
  toolStructuredError,
8
8
  toolSuccessStructured,
9
9
  wrapToolWithTimeout
10
- } from "./chunk-N34KB6DR.js";
10
+ } from "./chunk-XF6J4PCH.js";
11
11
  import {
12
12
  JsonlStore,
13
13
  SECURITY_KEYWORDS,
@@ -2159,4 +2159,4 @@ export {
2159
2159
  runImprovementReview,
2160
2160
  registerImprovementReviewTool
2161
2161
  };
2162
- //# sourceMappingURL=chunk-V2OHGKB5.js.map
2162
+ //# sourceMappingURL=chunk-6SA3FIBZ.js.map
@@ -23,7 +23,7 @@ import {
23
23
  toolSuccessStructured,
24
24
  withProgressHeartbeat,
25
25
  wrapToolWithTimeout
26
- } from "./chunk-N34KB6DR.js";
26
+ } from "./chunk-XF6J4PCH.js";
27
27
  import {
28
28
  assessPanelIndependence,
29
29
  countDistinctModels,
@@ -6878,4 +6878,4 @@ export {
6878
6878
  CONSENSUS_VOTE_TOOL_SCHEMA,
6879
6879
  registerConsensusVoteTool
6880
6880
  };
6881
- //# sourceMappingURL=chunk-IRHLTW3P.js.map
6881
+ //# sourceMappingURL=chunk-K3ZTZSLW.js.map
@@ -0,0 +1,7 @@
1
+ // src/version.ts
2
+ var VERSION = true ? "7.0.0" : "dev";
3
+
4
+ export {
5
+ VERSION
6
+ };
7
+ //# sourceMappingURL=chunk-OXJEIMLS.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/version.ts"],"sourcesContent":["/**\n * nexus-agents - Version constant\n *\n * Injected at build time via tsup define from package.json.\n * Do NOT edit this value manually — it is replaced during build.\n */\n\ndeclare const __NEXUS_VERSION__: string;\n\nexport const VERSION: string = typeof __NEXUS_VERSION__ !== 'undefined' ? __NEXUS_VERSION__ : 'dev';\n"],"mappings":";AASO,IAAM,UAAkB,OAA2C,WAAoB;","names":[]}
1
+ {"version":3,"sources":["../src/version.ts"],"sourcesContent":["/**\n * nexus-agents - Version constant\n *\n * Injected at build time via tsup define from package.json.\n * Do NOT edit this value manually — it is replaced during build.\n */\n\ndeclare const __NEXUS_VERSION__: string;\n\nexport const VERSION: string = typeof __NEXUS_VERSION__ !== 'undefined' ? __NEXUS_VERSION__ : 'dev';\n"],"mappings":";AASO,IAAM,UAAkB,OAA2C,UAAoB;","names":[]}
@@ -21,7 +21,7 @@ import {
21
21
  import {
22
22
  DEFAULT_TASK_TTL_MS,
23
23
  clampTaskTtl
24
- } from "./chunk-OI6XXZOE.js";
24
+ } from "./chunk-46XUGUB4.js";
25
25
  import {
26
26
  executeExpert
27
27
  } from "./chunk-ET67NYCJ.js";
@@ -47,7 +47,7 @@ import {
47
47
  simulationDeniedResult,
48
48
  toJobSummary,
49
49
  writeJobCancelled
50
- } from "./chunk-IRHLTW3P.js";
50
+ } from "./chunk-K3ZTZSLW.js";
51
51
  import {
52
52
  allOf
53
53
  } from "./chunk-OQB3XC5O.js";
@@ -64,7 +64,7 @@ import {
64
64
  } from "./chunk-NVFYMGCC.js";
65
65
  import {
66
66
  withPrerequisite
67
- } from "./chunk-V2OHGKB5.js";
67
+ } from "./chunk-6SA3FIBZ.js";
68
68
  import {
69
69
  NOOP_NOTIFIER,
70
70
  RateLimiter,
@@ -88,7 +88,7 @@ import {
88
88
  withAuditTrail,
89
89
  withProgressHeartbeat,
90
90
  wrapToolWithTimeout
91
- } from "./chunk-N34KB6DR.js";
91
+ } from "./chunk-XF6J4PCH.js";
92
92
  import {
93
93
  createAuditTrail,
94
94
  createGraphAuditBridge,
@@ -44218,6 +44218,23 @@ var AuditEventSchema = z97.object({
44218
44218
  // Policy and security
44219
44219
  policyName: z97.string().optional(),
44220
44220
  policyDecision: z97.string().optional(),
44221
+ /**
44222
+ * Which occurrence of this `{tool, rule}` near-miss the record represents
44223
+ * (#5228 review). Present only on a sampled `would_deny`.
44224
+ *
44225
+ * TYPED and queryable rather than prose in `description`. The first version
44226
+ * of the sampler wrote the ordinal into the reason string to "avoid a second
44227
+ * schema widening" — two reviewers rejected that, correctly: a machine
44228
+ * consumer counting records would read 14 records as 14 near-misses when
44229
+ * 10,000 occurred, so the record did not structurally represent its own
44230
+ * partial coverage. That is the defect this PR exists to fix, reintroduced
44231
+ * one field over. An additive OPTIONAL field is a minor change, not a second
44232
+ * break, so the stated reason for avoiding it did not hold.
44233
+ *
44234
+ * Absent means "not sampled" — every occurrence was recorded — which is
44235
+ * distinct from `1`.
44236
+ */
44237
+ policyOccurrence: z97.number().int().min(1).optional(),
44221
44238
  violationType: z97.string().optional(),
44222
44239
  // Integrity (for tamper-evidence)
44223
44240
  previousHash: z97.string().optional(),
@@ -44251,6 +44268,8 @@ var AuditEventInputSchema = z97.object({
44251
44268
  metadata: z97.record(z97.string(), z97.unknown()).optional(),
44252
44269
  policyName: z97.string().optional(),
44253
44270
  policyDecision: z97.string().optional(),
44271
+ /** @see AuditEventSchema.policyOccurrence (#5228 review). */
44272
+ policyOccurrence: z97.number().int().min(1).optional(),
44254
44273
  violationType: z97.string().optional()
44255
44274
  });
44256
44275
  var AuditLogConfigSchema = z97.object({
@@ -44712,6 +44731,20 @@ var SYSTEM_ACTOR = {
44712
44731
  id: "nexus-agents",
44713
44732
  name: "Nexus Agents System"
44714
44733
  };
44734
+ function policyDecisionFields(decision) {
44735
+ switch (decision) {
44736
+ case "allow":
44737
+ return { severity: "info", outcome: "success" };
44738
+ case "deny":
44739
+ return { severity: "warning", outcome: "denied" };
44740
+ case "would_deny":
44741
+ return { severity: "warning", outcome: "success" };
44742
+ default: {
44743
+ const unreachable = decision;
44744
+ throw new Error(`Unhandled policy decision: ${String(unreachable)}`);
44745
+ }
44746
+ }
44747
+ }
44715
44748
  var DROP_WARN_INTERVAL = 1e3;
44716
44749
  var AuditLogger = class {
44717
44750
  storage;
@@ -44868,14 +44901,14 @@ var AuditLogger = class {
44868
44901
  requestId: opts.requestId,
44869
44902
  toolName: opts.toolName,
44870
44903
  durationMs: opts.durationMs,
44904
+ ...opts.policyDecision === void 0 ? {} : { policyDecision: opts.policyDecision },
44871
44905
  metadata: opts.metadata
44872
44906
  });
44873
44907
  }
44874
44908
  logPolicyDecision(opts) {
44875
44909
  this.log({
44876
44910
  category: "authorization",
44877
- severity: opts.decision === "deny" ? "warning" : "info",
44878
- outcome: opts.decision === "allow" ? "success" : "denied",
44911
+ ...policyDecisionFields(opts.decision),
44879
44912
  action: "policy.evaluate",
44880
44913
  description: opts.reason,
44881
44914
  actor: opts.actor,
@@ -44883,6 +44916,7 @@ var AuditLogger = class {
44883
44916
  requestId: opts.requestId,
44884
44917
  policyName: opts.policyName,
44885
44918
  policyDecision: opts.decision,
44919
+ ...opts.occurrence === void 0 ? {} : { policyOccurrence: opts.occurrence },
44886
44920
  metadata: opts.metadata
44887
44921
  });
44888
44922
  }
@@ -47490,7 +47524,7 @@ ${contextBlock}`;
47490
47524
  const strategy = config.votingStrategy ?? "higher_order";
47491
47525
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
47492
47526
  try {
47493
- const { executeVoting } = await import("./consensus-vote-OHOQXNTT.js");
47527
+ const { executeVoting } = await import("./consensus-vote-ZMEESJFP.js");
47494
47528
  const votingResult = await executeVoting(
47495
47529
  {
47496
47530
  proposal: buildVoteProposal(plan, research),
@@ -56121,4 +56155,4 @@ export {
56121
56155
  shutdownFeedbackSubscriber,
56122
56156
  createEventBusBridge
56123
56157
  };
56124
- //# sourceMappingURL=chunk-LT2LUIQK.js.map
56158
+ //# sourceMappingURL=chunk-WMXHD6UA.js.map