nexus-agents 4.30.0 → 4.31.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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-HC327G22.js";
3
+ } from "./chunk-4I73QDDC.js";
4
4
  import {
5
5
  emitClawGuardViolation
6
6
  } from "./chunk-R2VI7R4E.js";
@@ -2116,4 +2116,4 @@ export {
2116
2116
  VOTING_THRESHOLDS,
2117
2117
  ConsensusMetricsSchema
2118
2118
  };
2119
- //# sourceMappingURL=chunk-UMHEYLSJ.js.map
2119
+ //# sourceMappingURL=chunk-3X24NGC3.js.map
@@ -0,0 +1,7 @@
1
+ // src/version.ts
2
+ var VERSION = true ? "4.31.0" : "dev";
3
+
4
+ export {
5
+ VERSION
6
+ };
7
+ //# sourceMappingURL=chunk-4I73QDDC.js.map
@@ -23,7 +23,7 @@ import {
23
23
  toolSuccessStructured,
24
24
  withProgressHeartbeat,
25
25
  wrapToolWithTimeout
26
- } from "./chunk-UMHEYLSJ.js";
26
+ } from "./chunk-3X24NGC3.js";
27
27
  import {
28
28
  assessPanelIndependence,
29
29
  countDistinctModels,
@@ -6803,4 +6803,4 @@ export {
6803
6803
  CONSENSUS_VOTE_TOOL_SCHEMA,
6804
6804
  registerConsensusVoteTool
6805
6805
  };
6806
- //# sourceMappingURL=chunk-HQHWPMDH.js.map
6806
+ //# sourceMappingURL=chunk-ASRGWLV6.js.map
@@ -21,7 +21,7 @@ import {
21
21
  import {
22
22
  DEFAULT_TASK_TTL_MS,
23
23
  clampTaskTtl
24
- } from "./chunk-H6BVXWQA.js";
24
+ } from "./chunk-NEF7BWPK.js";
25
25
  import {
26
26
  executeExpert
27
27
  } from "./chunk-UQCF3MLC.js";
@@ -47,7 +47,7 @@ import {
47
47
  simulationDeniedResult,
48
48
  toJobSummary,
49
49
  writeJobCancelled
50
- } from "./chunk-HQHWPMDH.js";
50
+ } from "./chunk-ASRGWLV6.js";
51
51
  import {
52
52
  allOf
53
53
  } from "./chunk-OQB3XC5O.js";
@@ -64,7 +64,7 @@ import {
64
64
  } from "./chunk-U6ITIQUU.js";
65
65
  import {
66
66
  withPrerequisite
67
- } from "./chunk-RUW24EJC.js";
67
+ } from "./chunk-OJS5NGWF.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-UMHEYLSJ.js";
91
+ } from "./chunk-3X24NGC3.js";
92
92
  import {
93
93
  createAuditTrail,
94
94
  createGraphAuditBridge,
@@ -47537,7 +47537,7 @@ ${contextBlock}`;
47537
47537
  const strategy = config.votingStrategy ?? "higher_order";
47538
47538
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
47539
47539
  try {
47540
- const { executeVoting } = await import("./consensus-vote-2BCRIZT3.js");
47540
+ const { executeVoting } = await import("./consensus-vote-CFQLDSR5.js");
47541
47541
  const votingResult = await executeVoting(
47542
47542
  {
47543
47543
  proposal: buildVoteProposal(plan, research),
@@ -56165,4 +56165,4 @@ export {
56165
56165
  shutdownFeedbackSubscriber,
56166
56166
  createEventBusBridge
56167
56167
  };
56168
- //# sourceMappingURL=chunk-VTPVDM7B.js.map
56168
+ //# sourceMappingURL=chunk-IMVFH4BO.js.map
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-OQB3XC5O.js";
7
7
  import {
8
8
  VERSION
9
- } from "./chunk-HC327G22.js";
9
+ } from "./chunk-4I73QDDC.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-EYLDVNVX.js");
1204
+ const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-QBB23LVM.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-H6BVXWQA.js.map
1306
+ //# sourceMappingURL=chunk-NEF7BWPK.js.map
@@ -7,7 +7,7 @@ import {
7
7
  toolStructuredError,
8
8
  toolSuccessStructured,
9
9
  wrapToolWithTimeout
10
- } from "./chunk-UMHEYLSJ.js";
10
+ } from "./chunk-3X24NGC3.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-RUW24EJC.js.map
2162
+ //# sourceMappingURL=chunk-OJS5NGWF.js.map
package/dist/cli.js CHANGED
@@ -152,7 +152,7 @@ import {
152
152
  validateNexusEnv,
153
153
  validateWorkflow,
154
154
  wrapInMarkdownFence
155
- } from "./chunk-VTPVDM7B.js";
155
+ } from "./chunk-IMVFH4BO.js";
156
156
  import "./chunk-POW3WZJ7.js";
157
157
  import "./chunk-HFOQKCD2.js";
158
158
  import "./chunk-RSMG2DPB.js";
@@ -171,7 +171,7 @@ import {
171
171
  doctorCommand,
172
172
  initDataDirectories,
173
173
  runDoctor
174
- } from "./chunk-H6BVXWQA.js";
174
+ } from "./chunk-NEF7BWPK.js";
175
175
  import {
176
176
  buildOpenAICompatAdapters,
177
177
  readOpenAICompatEnv
@@ -190,7 +190,7 @@ import {
190
190
  recordAuthenticVote,
191
191
  registerConsensusVoteTool,
192
192
  toRecordDecision
193
- } from "./chunk-HQHWPMDH.js";
193
+ } from "./chunk-ASRGWLV6.js";
194
194
  import {
195
195
  loadUsageEvents,
196
196
  rollupByModel
@@ -226,15 +226,15 @@ import {
226
226
  registerImprovementReviewTool,
227
227
  runImprovementReview,
228
228
  scanForSecrets
229
- } from "./chunk-RUW24EJC.js";
229
+ } from "./chunk-OJS5NGWF.js";
230
230
  import {
231
231
  createDefaultPolicyFirewall,
232
232
  setGlobalPolicyFirewall,
233
233
  stagePolicyFirewallForRollout
234
- } from "./chunk-UMHEYLSJ.js";
234
+ } from "./chunk-3X24NGC3.js";
235
235
  import {
236
236
  VERSION
237
- } from "./chunk-HC327G22.js";
237
+ } from "./chunk-4I73QDDC.js";
238
238
  import "./chunk-R2VI7R4E.js";
239
239
  import {
240
240
  createUnifiedRegistry,
@@ -19553,7 +19553,7 @@ function startImprovementReviewScheduler(options) {
19553
19553
  let running = false;
19554
19554
  const runOnce = async () => {
19555
19555
  try {
19556
- const { runImprovementReview: runImprovementReview2, ImprovementReviewInputSchema: ImprovementReviewInputSchema2 } = await import("./improvement-review-6IZ7PPEI.js");
19556
+ const { runImprovementReview: runImprovementReview2, ImprovementReviewInputSchema: ImprovementReviewInputSchema2 } = await import("./improvement-review-MVJEKOJT.js");
19557
19557
  const input = ImprovementReviewInputSchema2.parse({ fileIssues });
19558
19558
  const result = await runImprovementReview2(input, { logger: logger22 });
19559
19559
  logger22.info("Scheduled improvement_review complete", {
@@ -11,11 +11,11 @@ import {
11
11
  resetCorrelationTracker,
12
12
  runConsensusForGoal,
13
13
  unwrapVoteOrThrow
14
- } from "./chunk-HQHWPMDH.js";
14
+ } from "./chunk-ASRGWLV6.js";
15
15
  import "./chunk-NUMAE43O.js";
16
16
  import "./chunk-OQB3XC5O.js";
17
- import "./chunk-UMHEYLSJ.js";
18
- import "./chunk-HC327G22.js";
17
+ import "./chunk-3X24NGC3.js";
18
+ import "./chunk-4I73QDDC.js";
19
19
  import "./chunk-R2VI7R4E.js";
20
20
  import "./chunk-2CIBUCTU.js";
21
21
  import "./chunk-TUGN4IPL.js";
@@ -50,4 +50,4 @@ export {
50
50
  runConsensusForGoal,
51
51
  unwrapVoteOrThrow
52
52
  };
53
- //# sourceMappingURL=consensus-vote-2BCRIZT3.js.map
53
+ //# sourceMappingURL=consensus-vote-CFQLDSR5.js.map
@@ -11,9 +11,9 @@ import {
11
11
  loadSelfEvalSignals,
12
12
  registerImprovementReviewTool,
13
13
  runImprovementReview
14
- } from "./chunk-RUW24EJC.js";
15
- import "./chunk-UMHEYLSJ.js";
16
- import "./chunk-HC327G22.js";
14
+ } from "./chunk-OJS5NGWF.js";
15
+ import "./chunk-3X24NGC3.js";
16
+ import "./chunk-4I73QDDC.js";
17
17
  import "./chunk-R2VI7R4E.js";
18
18
  import "./chunk-54Q6XJCX.js";
19
19
  import "./chunk-GBHJ37V3.js";
@@ -33,4 +33,4 @@ export {
33
33
  registerImprovementReviewTool,
34
34
  runImprovementReview
35
35
  };
36
- //# sourceMappingURL=improvement-review-6IZ7PPEI.js.map
36
+ //# sourceMappingURL=improvement-review-MVJEKOJT.js.map
package/dist/index.js CHANGED
@@ -553,7 +553,7 @@ import {
553
553
  withLogging,
554
554
  withRetry,
555
555
  withRetryWrapper
556
- } from "./chunk-VTPVDM7B.js";
556
+ } from "./chunk-IMVFH4BO.js";
557
557
  import {
558
558
  FALLBACK_SCANNER_DATA,
559
559
  buildPlanFromAnalysis,
@@ -574,7 +574,7 @@ import {
574
574
  connectTransport,
575
575
  createServer,
576
576
  startStdioServer
577
- } from "./chunk-H6BVXWQA.js";
577
+ } from "./chunk-NEF7BWPK.js";
578
578
  import {
579
579
  OPENAI_MODELS,
580
580
  OPENAI_MODEL_ALIASES,
@@ -632,7 +632,7 @@ import {
632
632
  generateProposalId,
633
633
  parseAgentPairKey,
634
634
  registerConsensusVoteTool
635
- } from "./chunk-HQHWPMDH.js";
635
+ } from "./chunk-ASRGWLV6.js";
636
636
  import "./chunk-NUMAE43O.js";
637
637
  import {
638
638
  allOf
@@ -683,7 +683,7 @@ import {
683
683
  import {
684
684
  ImprovementReviewInputSchema,
685
685
  registerImprovementReviewTool
686
- } from "./chunk-RUW24EJC.js";
686
+ } from "./chunk-OJS5NGWF.js";
687
687
  import {
688
688
  AgentPerformanceSchema,
689
689
  ConsensusAlgorithmSchema,
@@ -719,10 +719,10 @@ import {
719
719
  toolSuccess,
720
720
  toolSuccessStructured,
721
721
  validateToolInput
722
- } from "./chunk-UMHEYLSJ.js";
722
+ } from "./chunk-3X24NGC3.js";
723
723
  import {
724
724
  VERSION
725
- } from "./chunk-HC327G22.js";
725
+ } from "./chunk-4I73QDDC.js";
726
726
  import {
727
727
  AuditTrail,
728
728
  MAX_STRIPPED_ELEMENTS_PER_EVENT,
@@ -888,6 +888,7 @@ import {
888
888
  categorizeOutcomeError,
889
889
  categorizeOutcomeErrorMessage,
890
890
  computeAdaptiveThresholds,
891
+ computeTokenCost,
891
892
  createCompositeRouter,
892
893
  createLogger,
893
894
  createPreferenceRouter,
@@ -3344,12 +3345,34 @@ var OrchestrationObserverConfigSchema = z14.object({
3344
3345
  metricsUpdateIntervalMs: z14.number().positive().optional().default(5e3),
3345
3346
  /** Enable detailed event logging */
3346
3347
  verboseLogging: z14.boolean().optional().default(false),
3347
- /** Token cost rates per model (USD per 1K tokens) */
3348
- tokenCostRates: z14.record(z14.string(), z14.number().nonnegative()).optional().default({
3349
- claude: 0.015,
3350
- gemini: 1e-3,
3351
- codex: 0.01
3352
- })
3348
+ /**
3349
+ * Per-model cost rate override, USD per 1,000 tokens (#5180).
3350
+ *
3351
+ * Two accepted shapes, and the distinction is deliberate:
3352
+ *
3353
+ * - `{ input, output }` — a SPLIT rate. Output bills at several times input,
3354
+ * so this is the accurate form.
3355
+ * - a bare number — a BLENDED rate, the historical shape. It keeps its
3356
+ * original meaning exactly: one rate applied to total tokens. It is NOT
3357
+ * silently reinterpreted as an input rate, which would quietly change every
3358
+ * existing operator's numbers.
3359
+ *
3360
+ * OMITTED means read split rates from the model registry — never zero. Before
3361
+ * #5180 the default was a private per-model table (`claude: 0.015` blended)
3362
+ * that disagreed with the registry by ~3x on output-heavy runs, which is the
3363
+ * defect this replaces. An operator who wants the old figures can keep their
3364
+ * existing scalar config and get byte-identical results.
3365
+ */
3366
+ tokenCostRates: z14.record(
3367
+ z14.string(),
3368
+ z14.union([
3369
+ z14.number().nonnegative(),
3370
+ z14.object({
3371
+ input: z14.number().nonnegative(),
3372
+ output: z14.number().nonnegative()
3373
+ })
3374
+ ])
3375
+ ).optional().default({})
3353
3376
  });
3354
3377
 
3355
3378
  // src/agents/observability/orchestration-observer-helpers.ts
@@ -3454,7 +3477,10 @@ function identifySessionsToRemove(sessions, maxSessions) {
3454
3477
  return toRemove.map(([sessionId]) => sessionId);
3455
3478
  }
3456
3479
  function calculateTokenCost(tokens, ratePerThousand) {
3457
- return tokens.totalTokens / 1e3 * ratePerThousand;
3480
+ return computeTokenCost(
3481
+ { input: 0, output: 0, blended: tokens.totalTokens },
3482
+ { inputPer1M: 0, outputPer1M: 0, blendedPer1M: ratePerThousand * 1e3 }
3483
+ ).costUsd;
3458
3484
  }
3459
3485
 
3460
3486
  // src/benchmarks/memory-benchmarks-helpers.ts
@@ -4729,7 +4755,7 @@ function buildVotingInput(plan, config) {
4729
4755
  }
4730
4756
  async function executeSingleVote(plan, config, log) {
4731
4757
  try {
4732
- const { executeVoting } = await import("./consensus-vote-2BCRIZT3.js");
4758
+ const { executeVoting } = await import("./consensus-vote-CFQLDSR5.js");
4733
4759
  const input = buildVotingInput(plan, config);
4734
4760
  const result = await executeVoting(input, log);
4735
4761
  return parseVotingResult(result);