nexus-agents 11.1.9 → 11.2.1
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/{chunk-3PIHLQS2.js → chunk-6RYQMJYI.js} +3 -3
- package/dist/{chunk-AW345IU2.js → chunk-7INKG2ZO.js} +2 -2
- package/dist/{chunk-TVU4RTLM.js → chunk-FLD6KM6Q.js} +3 -3
- package/dist/{chunk-GGITROGG.js → chunk-GTAQ744F.js} +2 -2
- package/dist/{chunk-BB7YKZSY.js → chunk-OO762OTH.js} +68 -18
- package/dist/{chunk-BB7YKZSY.js.map → chunk-OO762OTH.js.map} +1 -1
- package/dist/{chunk-7KBAAFNA.js → chunk-SZBLSAEU.js} +2 -2
- package/dist/cli.js +7 -7
- package/dist/{consensus-vote-5GG5JFLD.js → consensus-vote-LZUXE3VP.js} +4 -4
- package/dist/{improvement-review-UQIXV743.js → improvement-review-6ZKZPZTB.js} +4 -4
- package/dist/index.d.ts +4 -0
- package/dist/index.js +6 -6
- package/dist/{setup-data-dir-5E3IIAVV.js → setup-data-dir-TUUQXXMW.js} +3 -3
- package/package.json +1 -1
- /package/dist/{chunk-3PIHLQS2.js.map → chunk-6RYQMJYI.js.map} +0 -0
- /package/dist/{chunk-AW345IU2.js.map → chunk-7INKG2ZO.js.map} +0 -0
- /package/dist/{chunk-TVU4RTLM.js.map → chunk-FLD6KM6Q.js.map} +0 -0
- /package/dist/{chunk-GGITROGG.js.map → chunk-GTAQ744F.js.map} +0 -0
- /package/dist/{chunk-7KBAAFNA.js.map → chunk-SZBLSAEU.js.map} +0 -0
- /package/dist/{consensus-vote-5GG5JFLD.js.map → consensus-vote-LZUXE3VP.js.map} +0 -0
- /package/dist/{improvement-review-UQIXV743.js.map → improvement-review-6ZKZPZTB.js.map} +0 -0
- /package/dist/{setup-data-dir-5E3IIAVV.js.map → setup-data-dir-TUUQXXMW.js.map} +0 -0
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
toolSuccess,
|
|
22
22
|
withProgressHeartbeat,
|
|
23
23
|
wrapToolWithTimeout
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-GTAQ744F.js";
|
|
25
25
|
import {
|
|
26
26
|
getToolMemory
|
|
27
27
|
} from "./chunk-PPH3CAMR.js";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
} from "./chunk-EZNIYU5T.js";
|
|
31
31
|
import {
|
|
32
32
|
VERSION
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-7INKG2ZO.js";
|
|
34
34
|
import {
|
|
35
35
|
ModelBoundAdapter,
|
|
36
36
|
UNVERIFIABLE_STDERR_RE,
|
|
@@ -9915,4 +9915,4 @@ export {
|
|
|
9915
9915
|
CONSENSUS_VOTE_TOOL_SCHEMA,
|
|
9916
9916
|
registerConsensusVoteTool
|
|
9917
9917
|
};
|
|
9918
|
-
//# sourceMappingURL=chunk-
|
|
9918
|
+
//# sourceMappingURL=chunk-6RYQMJYI.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
|
|
5
5
|
// src/version.ts
|
|
6
6
|
import semver from "semver";
|
|
7
|
-
var VERSION = true ? "11.1
|
|
7
|
+
var VERSION = true ? "11.2.1" : "dev";
|
|
8
8
|
var NODE_ENGINE_RANGE = ">=24";
|
|
9
9
|
function isNodeVersionSupported(version) {
|
|
10
10
|
return semver.satisfies(version, NODE_ENGINE_RANGE);
|
|
@@ -106,4 +106,4 @@ export {
|
|
|
106
106
|
contextForLogging,
|
|
107
107
|
measuredTrustTier
|
|
108
108
|
};
|
|
109
|
-
//# sourceMappingURL=chunk-
|
|
109
|
+
//# sourceMappingURL=chunk-7INKG2ZO.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
VERSION,
|
|
8
8
|
isNodeVersionSupported,
|
|
9
9
|
recordServerTransport
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-7INKG2ZO.js";
|
|
11
11
|
import {
|
|
12
12
|
checkGatewayHealth,
|
|
13
13
|
cliFailsVerdict,
|
|
@@ -2263,7 +2263,7 @@ async function runDoctorFix(result) {
|
|
|
2263
2263
|
writeLine2("\u2500".repeat(40));
|
|
2264
2264
|
let fixCount = 0;
|
|
2265
2265
|
if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
|
|
2266
|
-
const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-
|
|
2266
|
+
const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-TUUQXXMW.js");
|
|
2267
2267
|
const outcome = describeDataDirFix2(initDataDirectories2());
|
|
2268
2268
|
writeLine2(outcome.line);
|
|
2269
2269
|
if (outcome.counted) fixCount++;
|
|
@@ -2383,4 +2383,4 @@ export {
|
|
|
2383
2383
|
startStdioServer,
|
|
2384
2384
|
closeServer
|
|
2385
2385
|
};
|
|
2386
|
-
//# sourceMappingURL=chunk-
|
|
2386
|
+
//# sourceMappingURL=chunk-FLD6KM6Q.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
getCurrentRequestContext,
|
|
6
6
|
runWithRequestContext,
|
|
7
7
|
serverCallerInfo
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-7INKG2ZO.js";
|
|
9
9
|
import {
|
|
10
10
|
DEFAULT_EXECUTION_MODE
|
|
11
11
|
} from "./chunk-TYLE7Z2S.js";
|
|
@@ -2345,4 +2345,4 @@ export {
|
|
|
2345
2345
|
DEFAULT_CONSENSUS_CONFIG,
|
|
2346
2346
|
ConsensusMetricsSchema
|
|
2347
2347
|
};
|
|
2348
|
-
//# sourceMappingURL=chunk-
|
|
2348
|
+
//# sourceMappingURL=chunk-GTAQ744F.js.map
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
updateStage,
|
|
59
59
|
withFileLock,
|
|
60
60
|
writeJobCancelled
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-6RYQMJYI.js";
|
|
62
62
|
import {
|
|
63
63
|
normalizeTopicToCanonical,
|
|
64
64
|
synthesizeResearch
|
|
@@ -77,7 +77,7 @@ import {
|
|
|
77
77
|
} from "./chunk-HQ2SMW4Y.js";
|
|
78
78
|
import {
|
|
79
79
|
withPrerequisite
|
|
80
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-SZBLSAEU.js";
|
|
81
81
|
import {
|
|
82
82
|
NOOP_NOTIFIER,
|
|
83
83
|
RateLimiter,
|
|
@@ -105,7 +105,7 @@ import {
|
|
|
105
105
|
toolSuccess,
|
|
106
106
|
withProgressHeartbeat,
|
|
107
107
|
wrapToolWithTimeout
|
|
108
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-GTAQ744F.js";
|
|
109
109
|
import {
|
|
110
110
|
generateSecurityPlan
|
|
111
111
|
} from "./chunk-6ZTMMN2N.js";
|
|
@@ -187,7 +187,7 @@ import {
|
|
|
187
187
|
import {
|
|
188
188
|
DEFAULT_TASK_TTL_MS,
|
|
189
189
|
clampTaskTtl
|
|
190
|
-
} from "./chunk-
|
|
190
|
+
} from "./chunk-FLD6KM6Q.js";
|
|
191
191
|
import {
|
|
192
192
|
allOf,
|
|
193
193
|
anyOf
|
|
@@ -196,7 +196,7 @@ import {
|
|
|
196
196
|
VERSION,
|
|
197
197
|
createRequestContext,
|
|
198
198
|
measuredTrustTier
|
|
199
|
-
} from "./chunk-
|
|
199
|
+
} from "./chunk-7INKG2ZO.js";
|
|
200
200
|
import {
|
|
201
201
|
BWRAP_READ_ONLY_ARGS,
|
|
202
202
|
CliDetectionCache,
|
|
@@ -29751,6 +29751,13 @@ var logger17 = createLogger({ component: "GraphExecutor" });
|
|
|
29751
29751
|
function isPolicyBlockedError(error) {
|
|
29752
29752
|
return error instanceof Error && error.name === "PolicyBlockedError";
|
|
29753
29753
|
}
|
|
29754
|
+
function stageFailureDetails(error) {
|
|
29755
|
+
if (!(error instanceof Error) || error.name !== "StageFailureError") return {};
|
|
29756
|
+
if (!("errorDetail" in error)) return {};
|
|
29757
|
+
const detail = error.errorDetail;
|
|
29758
|
+
if (detail === null || typeof detail !== "object" || Array.isArray(detail)) return {};
|
|
29759
|
+
return { errorDetail: detail };
|
|
29760
|
+
}
|
|
29754
29761
|
function failureClassification(category) {
|
|
29755
29762
|
return { errorCategory: category, isRetryable: defaultRetryable(category) };
|
|
29756
29763
|
}
|
|
@@ -30184,7 +30191,8 @@ function failedNodeResult(nodeId, error, startTime) {
|
|
|
30184
30191
|
durationMs: getTimeProvider().now() - startTime,
|
|
30185
30192
|
status: "failed",
|
|
30186
30193
|
error: message,
|
|
30187
|
-
...failureClassification(category)
|
|
30194
|
+
...failureClassification(category),
|
|
30195
|
+
...stageFailureDetails(error)
|
|
30188
30196
|
};
|
|
30189
30197
|
}
|
|
30190
30198
|
async function executeSingleNode(graph, nodeId, state, nodeCtx, options) {
|
|
@@ -45840,12 +45848,14 @@ function resolveStageTimeoutMs(stageId, stageTimeoutMs, otherStageDefaultMs) {
|
|
|
45840
45848
|
// src/pipeline/pipeline-graph.ts
|
|
45841
45849
|
var logger35 = createLogger({ component: "pipeline-graph" });
|
|
45842
45850
|
var StageFailureError = class extends Error {
|
|
45843
|
-
constructor(stageId, stageError) {
|
|
45851
|
+
constructor(stageId, stageError, errorDetail) {
|
|
45844
45852
|
super(`Stage '${stageId}' failed: ${stageError ?? "no error message"}`);
|
|
45845
45853
|
this.stageId = stageId;
|
|
45854
|
+
this.errorDetail = errorDetail;
|
|
45846
45855
|
this.name = "StageFailureError";
|
|
45847
45856
|
}
|
|
45848
45857
|
stageId;
|
|
45858
|
+
errorDetail;
|
|
45849
45859
|
};
|
|
45850
45860
|
function compilePipelineGraph(template, stages, options) {
|
|
45851
45861
|
const missing = findMissingStages(template, stages);
|
|
@@ -45911,7 +45921,7 @@ function createNodeHandler(stage, template) {
|
|
|
45911
45921
|
};
|
|
45912
45922
|
const output2 = await stage.execute(context);
|
|
45913
45923
|
if (!output2.success) {
|
|
45914
|
-
throw new StageFailureError(stage.id, output2.error);
|
|
45924
|
+
throw new StageFailureError(stage.id, output2.error, { [output2.stateKey]: output2.value });
|
|
45915
45925
|
}
|
|
45916
45926
|
return { [output2.stateKey]: output2.value };
|
|
45917
45927
|
};
|
|
@@ -46022,6 +46032,7 @@ async function executeAndReport(args) {
|
|
|
46022
46032
|
// see how far the run got before it failed.
|
|
46023
46033
|
finalState: result.value.finalState,
|
|
46024
46034
|
error: failures,
|
|
46035
|
+
...failedNodeDetails(result.value.nodeResults),
|
|
46025
46036
|
...stamp(coverage, options)
|
|
46026
46037
|
};
|
|
46027
46038
|
}
|
|
@@ -46038,6 +46049,11 @@ async function executeAndReport(args) {
|
|
|
46038
46049
|
function stamp(coverage, options) {
|
|
46039
46050
|
return { ...coverage, ...options?.dryRun === true ? { dryRun: true } : {} };
|
|
46040
46051
|
}
|
|
46052
|
+
function failedNodeDetails(nodeResults) {
|
|
46053
|
+
const details = nodeResults.filter((node) => node.status === "failed" && node.errorDetail !== void 0).map((node) => node.errorDetail);
|
|
46054
|
+
if (details.length === 0) return {};
|
|
46055
|
+
return { errorDetail: Object.assign({}, ...details) };
|
|
46056
|
+
}
|
|
46041
46057
|
function describeFailedNodes(nodeResults) {
|
|
46042
46058
|
const failed = nodeResults.filter((n) => n.status === "failed");
|
|
46043
46059
|
if (failed.length === 0) return null;
|
|
@@ -46669,7 +46685,7 @@ function buildVotingInput(plan, config) {
|
|
|
46669
46685
|
}
|
|
46670
46686
|
async function executeSingleVote(plan, config, log) {
|
|
46671
46687
|
try {
|
|
46672
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
46688
|
+
const { executeVoting } = await import("./consensus-vote-LZUXE3VP.js");
|
|
46673
46689
|
const input = buildVotingInput(plan, config);
|
|
46674
46690
|
const result = await executeVoting(input, log);
|
|
46675
46691
|
return parseVotingResult(result);
|
|
@@ -48099,13 +48115,14 @@ function buildNoQuorumPlanResult(plan, iterations, vote, retries) {
|
|
|
48099
48115
|
planStatus: "no_quorum",
|
|
48100
48116
|
planVoteDecision: "no_quorum",
|
|
48101
48117
|
planVoteReason: vote.reason,
|
|
48102
|
-
|
|
48118
|
+
// A fail-closed crash has no record; its sentinel zero is unmeasured (#7250).
|
|
48119
|
+
...vote.voteRecordId !== void 0 ? { planVoteApprovalPercentage: vote.approvalPercentage } : {},
|
|
48103
48120
|
...recordIdOf(vote)
|
|
48104
48121
|
};
|
|
48105
48122
|
}
|
|
48106
48123
|
function buildUnapprovedPlanResult(plan, iterations, vote, sessionId) {
|
|
48107
48124
|
const feedback = vote?.feedback ?? "No plan vote was run";
|
|
48108
|
-
const approvalPercentage = vote?.approvalPercentage
|
|
48125
|
+
const approvalPercentage = vote?.approvalPercentage;
|
|
48109
48126
|
logger43.warn("Max vote iterations reached without plan approval \u2014 stopping", {
|
|
48110
48127
|
sessionId,
|
|
48111
48128
|
iterations,
|
|
@@ -48118,7 +48135,7 @@ function buildUnapprovedPlanResult(plan, iterations, vote, sessionId) {
|
|
|
48118
48135
|
planStatus: "unapproved",
|
|
48119
48136
|
// No vote ran at all only when the iteration limit is zero; don't claim one.
|
|
48120
48137
|
...vote !== void 0 ? { planVoteDecision: "rejected" } : {},
|
|
48121
|
-
planVoteApprovalPercentage: approvalPercentage,
|
|
48138
|
+
...approvalPercentage !== void 0 ? { planVoteApprovalPercentage: approvalPercentage } : {},
|
|
48122
48139
|
planVoteFeedback: feedback,
|
|
48123
48140
|
...recordIdOf(vote)
|
|
48124
48141
|
};
|
|
@@ -48501,7 +48518,7 @@ function createVoteStage({ config, startStage }) {
|
|
|
48501
48518
|
const strategy = config.votingStrategy ?? "higher_order";
|
|
48502
48519
|
await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
|
|
48503
48520
|
try {
|
|
48504
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
48521
|
+
const { executeVoting } = await import("./consensus-vote-LZUXE3VP.js");
|
|
48505
48522
|
const proposal = buildVoteProposal(plan, research);
|
|
48506
48523
|
const votingResult = await executeVoting(
|
|
48507
48524
|
{
|
|
@@ -53972,9 +53989,6 @@ function buildStructuredOutput(result, simulated) {
|
|
|
53972
53989
|
...result.harnessMode !== void 0 ? { harnessMode: result.harnessMode } : {},
|
|
53973
53990
|
...result.securityRan !== void 0 ? { securityRan: result.securityRan } : {},
|
|
53974
53991
|
...result.planStatus !== void 0 ? { planStatus: result.planStatus } : {},
|
|
53975
|
-
...result.planVoteReason !== void 0 ? { planVoteReason: result.planVoteReason } : {},
|
|
53976
|
-
...result.planVoteApprovalPercentage !== void 0 ? { planVoteApprovalPercentage: result.planVoteApprovalPercentage } : {},
|
|
53977
|
-
...result.planVoteFeedback !== void 0 ? { planVoteFeedback: result.planVoteFeedback } : {},
|
|
53978
53992
|
// #7181: the dry run's verdict, which otherwise reached only the ledger.
|
|
53979
53993
|
...planVoteVerdictFields(result),
|
|
53980
53994
|
// #4993 added `dryRun` to DevPipelineResult for exactly the reason above —
|
|
@@ -54011,7 +54025,10 @@ function securityStatus(result) {
|
|
|
54011
54025
|
function planVoteVerdictFields(result) {
|
|
54012
54026
|
return {
|
|
54013
54027
|
...result.planVoteDecision !== void 0 ? { planVoteDecision: result.planVoteDecision } : {},
|
|
54014
|
-
...result.
|
|
54028
|
+
...result.planVoteApprovalPercentage !== void 0 ? { planVoteApprovalPercentage: result.planVoteApprovalPercentage } : {},
|
|
54029
|
+
...result.planVoteRecordId !== void 0 ? { planVoteRecordId: result.planVoteRecordId } : {},
|
|
54030
|
+
...result.planVoteReason !== void 0 ? { planVoteReason: result.planVoteReason } : {},
|
|
54031
|
+
...result.planVoteFeedback !== void 0 ? { planVoteFeedback: result.planVoteFeedback } : {}
|
|
54015
54032
|
};
|
|
54016
54033
|
}
|
|
54017
54034
|
|
|
@@ -54547,6 +54564,8 @@ function buildOutput3(result, simulated) {
|
|
|
54547
54564
|
// `dryRunStopAfter`, so `success: true` with `templateId: 'dev'` used to be
|
|
54548
54565
|
// byte-identical whether qa and security ran or were sliced away. Say which.
|
|
54549
54566
|
...result.dryRun === true ? { dryRun: true } : {},
|
|
54567
|
+
// #7240: the terminal vote is the dry run's result, not just ledger output.
|
|
54568
|
+
...dryRunVoteFields(result),
|
|
54550
54569
|
stagesPlanned: result.stagesPlanned,
|
|
54551
54570
|
stagesRun: result.stagesRun,
|
|
54552
54571
|
// #4170: stamped only on an explicit NEXUS_ALLOW_SIMULATE=1 opt-in run so
|
|
@@ -54556,6 +54575,37 @@ function buildOutput3(result, simulated) {
|
|
|
54556
54575
|
rateLimitHint: result.error?.toLowerCase().includes("rate limit") === true ? "Consider using quickMode or increasing delay between pipeline runs" : void 0
|
|
54557
54576
|
};
|
|
54558
54577
|
}
|
|
54578
|
+
var VoteEvidenceSchema = z107.object({
|
|
54579
|
+
approvalPercentage: z107.number(),
|
|
54580
|
+
voteRecordId: z107.string().optional()
|
|
54581
|
+
});
|
|
54582
|
+
var VoteResultSchema = z107.discriminatedUnion("kind", [
|
|
54583
|
+
VoteEvidenceSchema.extend({ kind: z107.literal("approved") }),
|
|
54584
|
+
VoteEvidenceSchema.extend({ kind: z107.literal("rejected"), feedback: z107.string() }),
|
|
54585
|
+
VoteEvidenceSchema.extend({ kind: z107.literal("no_quorum"), reason: z107.string() })
|
|
54586
|
+
]);
|
|
54587
|
+
function isVoteResult(value) {
|
|
54588
|
+
return VoteResultSchema.safeParse(value).success;
|
|
54589
|
+
}
|
|
54590
|
+
function voteFromState(state) {
|
|
54591
|
+
const output2 = state?.[PIPELINE_STATE_KEYS.VOTE_RESULT];
|
|
54592
|
+
return output2 !== null && typeof output2 === "object" && "vote" in output2 ? output2.vote : void 0;
|
|
54593
|
+
}
|
|
54594
|
+
function dryRunVoteFields(result) {
|
|
54595
|
+
if (result.dryRun !== true) return {};
|
|
54596
|
+
const failedVote = voteFromState(result.errorDetail);
|
|
54597
|
+
const stateVote = voteFromState(result.finalState);
|
|
54598
|
+
const vote = isVoteResult(failedVote) ? failedVote : isVoteResult(stateVote) ? stateVote : void 0;
|
|
54599
|
+
if (vote === void 0) return {};
|
|
54600
|
+
const measured = vote.kind !== "no_quorum" || vote.voteRecordId !== void 0;
|
|
54601
|
+
return planVoteVerdictFields({
|
|
54602
|
+
planVoteDecision: vote.kind,
|
|
54603
|
+
...measured ? { planVoteApprovalPercentage: vote.approvalPercentage } : {},
|
|
54604
|
+
...vote.voteRecordId !== void 0 ? { planVoteRecordId: vote.voteRecordId } : {},
|
|
54605
|
+
...vote.kind === "no_quorum" ? { planVoteReason: vote.reason } : {},
|
|
54606
|
+
...vote.kind === "rejected" ? { planVoteFeedback: vote.feedback } : {}
|
|
54607
|
+
});
|
|
54608
|
+
}
|
|
54559
54609
|
async function resolveTask(task, specFile) {
|
|
54560
54610
|
if (specFile === void 0) return task;
|
|
54561
54611
|
const resolved = resolveInsideRoot(specFile);
|
|
@@ -58485,4 +58535,4 @@ export {
|
|
|
58485
58535
|
initializeSandbox,
|
|
58486
58536
|
getSandboxMode
|
|
58487
58537
|
};
|
|
58488
|
-
//# sourceMappingURL=chunk-
|
|
58538
|
+
//# sourceMappingURL=chunk-OO762OTH.js.map
|