nexus-agents 8.86.1 → 8.86.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.
@@ -25,10 +25,10 @@ import {
25
25
  toolSuccessStructured,
26
26
  withProgressHeartbeat,
27
27
  wrapToolWithTimeout
28
- } from "./chunk-Q7X4G7TZ.js";
28
+ } from "./chunk-6K2JDJ7A.js";
29
29
  import {
30
30
  VERSION
31
- } from "./chunk-AVG6GVGP.js";
31
+ } from "./chunk-NQKJYGND.js";
32
32
  import {
33
33
  UNRESOLVED_MODEL_ID,
34
34
  assessPanelIndependence,
@@ -9543,4 +9543,4 @@ export {
9543
9543
  CONSENSUS_VOTE_TOOL_SCHEMA,
9544
9544
  registerConsensusVoteTool
9545
9545
  };
9546
- //# sourceMappingURL=chunk-KIFNS4WI.js.map
9546
+ //# sourceMappingURL=chunk-5FXOJYDV.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-AVG6GVGP.js";
3
+ } from "./chunk-NQKJYGND.js";
4
4
  import {
5
5
  sanitizeErrorDetails
6
6
  } from "./chunk-2NDA4DHW.js";
@@ -2342,4 +2342,4 @@ export {
2342
2342
  DEFAULT_CONSENSUS_CONFIG,
2343
2343
  ConsensusMetricsSchema
2344
2344
  };
2345
- //# sourceMappingURL=chunk-Q7X4G7TZ.js.map
2345
+ //# sourceMappingURL=chunk-6K2JDJ7A.js.map
@@ -21,7 +21,7 @@ import {
21
21
  import {
22
22
  DEFAULT_TASK_TTL_MS,
23
23
  clampTaskTtl
24
- } from "./chunk-C2I4YWN5.js";
24
+ } from "./chunk-YOQVGERU.js";
25
25
  import {
26
26
  executeExpert
27
27
  } from "./chunk-QCDYJYGB.js";
@@ -72,7 +72,7 @@ import {
72
72
  updateStage,
73
73
  withWarnings,
74
74
  writeJobCancelled
75
- } from "./chunk-KIFNS4WI.js";
75
+ } from "./chunk-5FXOJYDV.js";
76
76
  import {
77
77
  allOf,
78
78
  anyOf
@@ -95,7 +95,7 @@ import {
95
95
  } from "./chunk-KXFPJOPL.js";
96
96
  import {
97
97
  withPrerequisite
98
- } from "./chunk-JRAIVGXS.js";
98
+ } from "./chunk-O73BSBJ6.js";
99
99
  import {
100
100
  NOOP_NOTIFIER,
101
101
  RateLimiter,
@@ -120,7 +120,7 @@ import {
120
120
  toolSuccessStructured,
121
121
  withProgressHeartbeat,
122
122
  wrapToolWithTimeout
123
- } from "./chunk-Q7X4G7TZ.js";
123
+ } from "./chunk-6K2JDJ7A.js";
124
124
  import {
125
125
  EventTopics,
126
126
  UNRESOLVED_MODEL_ID,
@@ -10911,8 +10911,8 @@ function chunkByDirectory(files, basePath) {
10911
10911
  const normalizedBase = basePath.endsWith("/") ? basePath : `${basePath}/`;
10912
10912
  const groups = /* @__PURE__ */ new Map();
10913
10913
  for (const file of files) {
10914
- const relative2 = file.startsWith(normalizedBase) ? file.slice(normalizedBase.length) : file;
10915
- const stripped = relative2.startsWith("/") ? relative2.slice(1) : relative2;
10914
+ const relative3 = file.startsWith(normalizedBase) ? file.slice(normalizedBase.length) : file;
10915
+ const stripped = relative3.startsWith("/") ? relative3.slice(1) : relative3;
10916
10916
  const topDir = stripped.split("/")[0] ?? "root";
10917
10917
  const existing = groups.get(topDir);
10918
10918
  if (existing !== void 0) {
@@ -44471,6 +44471,7 @@ var InMemoryAuditStorage = class {
44471
44471
 
44472
44472
  // src/audit/audit-storage.ts
44473
44473
  import * as fs5 from "node:fs";
44474
+ import * as os from "node:os";
44474
44475
  import * as path3 from "node:path";
44475
44476
  function validateLogDir(logDir, allowedRoot) {
44476
44477
  const resolvedRoot = path3.resolve(allowedRoot);
@@ -44499,19 +44500,27 @@ function validateLogDirBasic(logDir) {
44499
44500
  }
44500
44501
  }
44501
44502
  const resolved = path3.resolve(logDir);
44502
- const systemDirs = ["/etc", "/var", "/usr", "/bin", "/sbin", "/root", "/proc", "/sys"];
44503
- for (const sysDir of systemDirs) {
44504
- if (resolved === sysDir || resolved.startsWith(sysDir + path3.sep)) {
44505
- return {
44506
- ok: false,
44507
- error: new SecurityError("logDir cannot be a system directory", {
44508
- context: { logDir, resolved }
44509
- })
44510
- };
44511
- }
44503
+ if (isRefusedSystemPath(resolved, path3.resolve(os.homedir()))) {
44504
+ return {
44505
+ ok: false,
44506
+ error: new SecurityError("logDir cannot be a system directory", {
44507
+ context: { logDir, resolved }
44508
+ })
44509
+ };
44512
44510
  }
44513
44511
  return { ok: true, value: resolved };
44514
44512
  }
44513
+ var ALWAYS_REFUSED_DIRS = ["/etc", "/usr", "/bin", "/sbin", "/proc", "/sys"];
44514
+ var REFUSED_OUTSIDE_HOME_DIRS = ["/root", "/var"];
44515
+ function isWithin(child, parent) {
44516
+ const rel = path3.relative(parent, child);
44517
+ return rel === "" || rel !== ".." && !rel.startsWith(".." + path3.sep) && !path3.isAbsolute(rel);
44518
+ }
44519
+ function isRefusedSystemPath(resolved, home) {
44520
+ if (ALWAYS_REFUSED_DIRS.some((dir) => isWithin(resolved, dir))) return true;
44521
+ const homeGrants = home !== path3.parse(home).root && isWithin(resolved, home);
44522
+ return REFUSED_OUTSIDE_HOME_DIRS.some((dir) => isWithin(resolved, dir)) && !homeGrants;
44523
+ }
44515
44524
  var FileAuditStorage = class _FileAuditStorage {
44516
44525
  logDir;
44517
44526
  filePrefix;
@@ -46136,7 +46145,7 @@ function buildVotingInput(plan, config) {
46136
46145
  }
46137
46146
  async function executeSingleVote(plan, config, log) {
46138
46147
  try {
46139
- const { executeVoting } = await import("./consensus-vote-G46TEZNQ.js");
46148
+ const { executeVoting } = await import("./consensus-vote-63FZ6VV5.js");
46140
46149
  const input = buildVotingInput(plan, config);
46141
46150
  const result = await executeVoting(input, log);
46142
46151
  return parseVotingResult(result);
@@ -47059,7 +47068,7 @@ function createVoteStage({ config, startStage }) {
47059
47068
  const strategy = config.votingStrategy ?? "higher_order";
47060
47069
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
47061
47070
  try {
47062
- const { executeVoting } = await import("./consensus-vote-G46TEZNQ.js");
47071
+ const { executeVoting } = await import("./consensus-vote-63FZ6VV5.js");
47063
47072
  const votingResult = await executeVoting(
47064
47073
  {
47065
47074
  proposal: buildVoteProposal(plan, research),
@@ -48727,7 +48736,7 @@ function reviewedDiffWasTruncated(diff) {
48727
48736
 
48728
48737
  // src/audit/pr-review-record-store.ts
48729
48738
  import { appendFileSync as appendFileSync3, existsSync as existsSync9, mkdirSync as mkdirSync5, readFileSync as readFileSync8 } from "node:fs";
48730
- import { dirname as dirname3, isAbsolute, join as join11, resolve as resolve12 } from "node:path";
48739
+ import { dirname as dirname3, isAbsolute as isAbsolute2, join as join11, resolve as resolve12 } from "node:path";
48731
48740
 
48732
48741
  // src/audit/pr-review-record.ts
48733
48742
  import * as crypto3 from "node:crypto";
@@ -49061,7 +49070,7 @@ function buildPrReviewRecord(input) {
49061
49070
  function resolvePrReviewRecordsPath(repoPathOverride) {
49062
49071
  const envPath = process.env[PR_REVIEW_RECORDS_PATH_ENV];
49063
49072
  if (envPath !== void 0 && envPath.trim() !== "") {
49064
- return isAbsolute(envPath) ? envPath : resolve12(envPath);
49073
+ return isAbsolute2(envPath) ? envPath : resolve12(envPath);
49065
49074
  }
49066
49075
  if (repoPathOverride !== void 0 && repoPathOverride.trim() !== "") {
49067
49076
  const overrideRoot = findRepoRoot(repoPathOverride);
@@ -56510,4 +56519,4 @@ export {
56510
56519
  startPipelineEventBridge,
56511
56520
  shutdownPipelineEventBridge
56512
56521
  };
56513
- //# sourceMappingURL=chunk-CK4HFCWY.js.map
56522
+ //# sourceMappingURL=chunk-EYBWZHGQ.js.map