nexus-agents 8.24.1 → 8.25.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.
- package/dist/{chunk-7EMTQUFH.js → chunk-4744KWA5.js} +3 -3
- package/dist/{chunk-ZRR5GL5P.js → chunk-BJ62QD3C.js} +75 -23
- package/dist/{chunk-ZRR5GL5P.js.map → chunk-BJ62QD3C.js.map} +1 -1
- package/dist/{chunk-FNSW2YQO.js → chunk-ERHGMXM3.js} +2 -2
- package/dist/{chunk-6CZ62UGB.js → chunk-NS5IBMNA.js} +3 -3
- package/dist/{chunk-6OLJGAHD.js → chunk-SHYVHNIH.js} +2 -2
- package/dist/{chunk-QWGLAGBX.js → chunk-WRNPOLO7.js} +2 -2
- package/dist/cli.js +7 -7
- package/dist/{consensus-vote-NANVCVZJ.js → consensus-vote-YH7WHROQ.js} +4 -4
- package/dist/{improvement-review-5P66EY63.js → improvement-review-4FYWUYX3.js} +4 -4
- package/dist/index.d.ts +18 -0
- package/dist/index.js +6 -6
- package/dist/{setup-data-dir-Q3DEAHF7.js → setup-data-dir-SECRHK4F.js} +3 -3
- package/package.json +1 -1
- /package/dist/{chunk-7EMTQUFH.js.map → chunk-4744KWA5.js.map} +0 -0
- /package/dist/{chunk-FNSW2YQO.js.map → chunk-ERHGMXM3.js.map} +0 -0
- /package/dist/{chunk-6CZ62UGB.js.map → chunk-NS5IBMNA.js.map} +0 -0
- /package/dist/{chunk-6OLJGAHD.js.map → chunk-SHYVHNIH.js.map} +0 -0
- /package/dist/{chunk-QWGLAGBX.js.map → chunk-WRNPOLO7.js.map} +0 -0
- /package/dist/{consensus-vote-NANVCVZJ.js.map → consensus-vote-YH7WHROQ.js.map} +0 -0
- /package/dist/{improvement-review-5P66EY63.js.map → improvement-review-4FYWUYX3.js.map} +0 -0
- /package/dist/{setup-data-dir-Q3DEAHF7.js.map → setup-data-dir-SECRHK4F.js.map} +0 -0
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
NODE_ENGINE_RANGE,
|
|
9
9
|
VERSION,
|
|
10
10
|
isNodeVersionSupported
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-WRNPOLO7.js";
|
|
12
12
|
import {
|
|
13
13
|
capitalize
|
|
14
14
|
} from "./chunk-7LP6VJRP.js";
|
|
@@ -1228,7 +1228,7 @@ async function runDoctorFix(result) {
|
|
|
1228
1228
|
writeLine2("\u2500".repeat(40));
|
|
1229
1229
|
let fixCount = 0;
|
|
1230
1230
|
if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
|
|
1231
|
-
const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-
|
|
1231
|
+
const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-SECRHK4F.js");
|
|
1232
1232
|
const outcome = describeDataDirFix2(initDataDirectories2());
|
|
1233
1233
|
writeLine2(outcome.line);
|
|
1234
1234
|
if (outcome.counted) fixCount++;
|
|
@@ -1330,4 +1330,4 @@ export {
|
|
|
1330
1330
|
startStdioServer,
|
|
1331
1331
|
closeServer
|
|
1332
1332
|
};
|
|
1333
|
-
//# sourceMappingURL=chunk-
|
|
1333
|
+
//# sourceMappingURL=chunk-4744KWA5.js.map
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
import {
|
|
22
22
|
DEFAULT_TASK_TTL_MS,
|
|
23
23
|
clampTaskTtl
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-4744KWA5.js";
|
|
25
25
|
import {
|
|
26
26
|
executeExpert
|
|
27
27
|
} from "./chunk-CN3VAMQD.js";
|
|
@@ -55,9 +55,10 @@ import {
|
|
|
55
55
|
toJobSummary,
|
|
56
56
|
updateStage,
|
|
57
57
|
writeJobCancelled
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-NS5IBMNA.js";
|
|
59
59
|
import {
|
|
60
|
-
allOf
|
|
60
|
+
allOf,
|
|
61
|
+
anyOf
|
|
61
62
|
} from "./chunk-OQB3XC5O.js";
|
|
62
63
|
import {
|
|
63
64
|
normalizeTopicToCanonical,
|
|
@@ -74,7 +75,7 @@ import {
|
|
|
74
75
|
} from "./chunk-OYTRYITB.js";
|
|
75
76
|
import {
|
|
76
77
|
withPrerequisite
|
|
77
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-SHYVHNIH.js";
|
|
78
79
|
import {
|
|
79
80
|
NOOP_NOTIFIER,
|
|
80
81
|
RateLimiter,
|
|
@@ -99,7 +100,7 @@ import {
|
|
|
99
100
|
withAuditTrail,
|
|
100
101
|
withProgressHeartbeat,
|
|
101
102
|
wrapToolWithTimeout
|
|
102
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-ERHGMXM3.js";
|
|
103
104
|
import {
|
|
104
105
|
createAuditTrail,
|
|
105
106
|
createGraphAuditBridge,
|
|
@@ -45665,7 +45666,7 @@ function buildVotingInput(plan, config) {
|
|
|
45665
45666
|
}
|
|
45666
45667
|
async function executeSingleVote(plan, config, log) {
|
|
45667
45668
|
try {
|
|
45668
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
45669
|
+
const { executeVoting } = await import("./consensus-vote-YH7WHROQ.js");
|
|
45669
45670
|
const input = buildVotingInput(plan, config);
|
|
45670
45671
|
const result = await executeVoting(input, log);
|
|
45671
45672
|
return parseVotingResult(result);
|
|
@@ -46057,11 +46058,29 @@ function buildHarnessResult(planResult, tasks) {
|
|
|
46057
46058
|
securityRan: false
|
|
46058
46059
|
};
|
|
46059
46060
|
}
|
|
46061
|
+
function deriveTaskAggregate(plannedTasks, completedTasks) {
|
|
46062
|
+
const completedById = new Map(completedTasks.map((t) => [t.id, t]));
|
|
46063
|
+
const allTasksDone = allOf(
|
|
46064
|
+
plannedTasks,
|
|
46065
|
+
(task) => completedById.get(task.id)?.status === "done",
|
|
46066
|
+
false
|
|
46067
|
+
);
|
|
46068
|
+
const anyTaskDone = anyOf(
|
|
46069
|
+
plannedTasks,
|
|
46070
|
+
(task) => completedById.get(task.id)?.status === "done",
|
|
46071
|
+
false
|
|
46072
|
+
);
|
|
46073
|
+
return {
|
|
46074
|
+
allTasksDone,
|
|
46075
|
+
taskStatus: allTasksDone ? "all_done" : anyTaskDone ? "partial" : "none"
|
|
46076
|
+
};
|
|
46077
|
+
}
|
|
46060
46078
|
async function runImplSecurityPhase(planResult, tasks, stages, run) {
|
|
46061
46079
|
const { sid, qualityGateMode, limits } = run;
|
|
46062
46080
|
const implResult = await implementQaLoop(tasks, stages, limits);
|
|
46063
46081
|
if (sid !== void 0)
|
|
46064
46082
|
saveStageCheckpoint(sid, "implement", { type: "implement", tasks: implResult.completedTasks });
|
|
46083
|
+
const { allTasksDone, taskStatus } = deriveTaskAggregate(tasks, implResult.completedTasks);
|
|
46065
46084
|
const qaGate = await runQualityGateStage(stages, qualityGateMode);
|
|
46066
46085
|
if (qualityGateMode === "blocking" && !qaGate.passed) {
|
|
46067
46086
|
return {
|
|
@@ -46072,7 +46091,8 @@ async function runImplSecurityPhase(planResult, tasks, stages, run) {
|
|
|
46072
46091
|
qaIterations: implResult.totalIterations,
|
|
46073
46092
|
// The gate short-circuited before the scan — absence, not a verdict.
|
|
46074
46093
|
securityPassed: false,
|
|
46075
|
-
securityRan: false
|
|
46094
|
+
securityRan: false,
|
|
46095
|
+
taskStatus
|
|
46076
46096
|
};
|
|
46077
46097
|
}
|
|
46078
46098
|
const security = await withStep({ name: "security-scan" }, async (ctx) => {
|
|
@@ -46085,13 +46105,14 @@ async function runImplSecurityPhase(planResult, tasks, stages, run) {
|
|
|
46085
46105
|
if (security.passed) cleanupCheckpoint2(sid);
|
|
46086
46106
|
}
|
|
46087
46107
|
return {
|
|
46088
|
-
completed: security.passed,
|
|
46108
|
+
completed: allTasksDone && security.passed,
|
|
46089
46109
|
plan: planResult.plan,
|
|
46090
46110
|
tasks: implResult.completedTasks.length > 0 ? implResult.completedTasks : tasks,
|
|
46091
46111
|
voteIterations: planResult.iterations,
|
|
46092
46112
|
qaIterations: implResult.totalIterations,
|
|
46093
46113
|
securityPassed: security.passed,
|
|
46094
46114
|
securityRan: security.verdict !== "skip",
|
|
46115
|
+
taskStatus,
|
|
46095
46116
|
...security.verdict === "skip" ? { securityNote: security.feedback } : {}
|
|
46096
46117
|
};
|
|
46097
46118
|
}
|
|
@@ -47437,7 +47458,7 @@ ${contextBlock}`;
|
|
|
47437
47458
|
const strategy = config.votingStrategy ?? "higher_order";
|
|
47438
47459
|
await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
|
|
47439
47460
|
try {
|
|
47440
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
47461
|
+
const { executeVoting } = await import("./consensus-vote-YH7WHROQ.js");
|
|
47441
47462
|
const votingResult = await executeVoting(
|
|
47442
47463
|
{
|
|
47443
47464
|
proposal: buildVoteProposal(plan, research),
|
|
@@ -50225,6 +50246,24 @@ function createAuditLogOutcomeSink(logger56) {
|
|
|
50225
50246
|
function errorMessage(err2) {
|
|
50226
50247
|
return err2 instanceof Error ? err2.message : String(err2);
|
|
50227
50248
|
}
|
|
50249
|
+
function classifyEngineResult(result) {
|
|
50250
|
+
if (typeof result !== "object" || result === null) {
|
|
50251
|
+
return { success: true };
|
|
50252
|
+
}
|
|
50253
|
+
const record = result;
|
|
50254
|
+
if (record["success"] === false) {
|
|
50255
|
+
const reason = typeof record["error"] === "string" ? record["error"] : "no error message";
|
|
50256
|
+
return { success: false, failureReason: reason };
|
|
50257
|
+
}
|
|
50258
|
+
if (record["completed"] === false) {
|
|
50259
|
+
if (record["dryRun"] === true && record["planStatus"] === void 0) {
|
|
50260
|
+
return { success: true };
|
|
50261
|
+
}
|
|
50262
|
+
const reason = typeof record["error"] === "string" ? record["error"] : "pipeline did not complete";
|
|
50263
|
+
return { success: false, failureReason: reason };
|
|
50264
|
+
}
|
|
50265
|
+
return { success: true };
|
|
50266
|
+
}
|
|
50228
50267
|
function recordOutcome2(deps, decision, start, success, failureReason) {
|
|
50229
50268
|
const record = {
|
|
50230
50269
|
decisionId: decision.decisionId,
|
|
@@ -50262,7 +50301,8 @@ async function dispatchDecision(decision, input, deps) {
|
|
|
50262
50301
|
}
|
|
50263
50302
|
try {
|
|
50264
50303
|
const result = await executor(decision, input);
|
|
50265
|
-
|
|
50304
|
+
const classification = deps.classifyResult(result);
|
|
50305
|
+
recordOutcome2(deps, decision, start, classification.success, classification.failureReason);
|
|
50266
50306
|
return {
|
|
50267
50307
|
decisionId,
|
|
50268
50308
|
strategy,
|
|
@@ -50291,7 +50331,8 @@ function createMetaDispatcher(options) {
|
|
|
50291
50331
|
executors: options.executors,
|
|
50292
50332
|
outcomeSink,
|
|
50293
50333
|
logger: logger56,
|
|
50294
|
-
onOutcome: options.onOutcome
|
|
50334
|
+
onOutcome: options.onOutcome,
|
|
50335
|
+
classifyResult: options.classifyResult ?? classifyEngineResult
|
|
50295
50336
|
};
|
|
50296
50337
|
return {
|
|
50297
50338
|
dispatch(decision, input) {
|
|
@@ -50433,12 +50474,24 @@ function describePlanFailure(record) {
|
|
|
50433
50474
|
}
|
|
50434
50475
|
return void 0;
|
|
50435
50476
|
}
|
|
50477
|
+
function describeTaskFailure(record) {
|
|
50478
|
+
if (record["taskStatus"] === "none") {
|
|
50479
|
+
return `${FAILURE_PREFIX} no planned tasks completed successfully`;
|
|
50480
|
+
}
|
|
50481
|
+
if (record["taskStatus"] === "partial") {
|
|
50482
|
+
return `${FAILURE_PREFIX} one or more planned tasks did not complete successfully`;
|
|
50483
|
+
}
|
|
50484
|
+
return void 0;
|
|
50485
|
+
}
|
|
50436
50486
|
function describeIncompletePipeline(record) {
|
|
50437
50487
|
const planFailure = describePlanFailure(record);
|
|
50438
50488
|
if (planFailure !== void 0) return planFailure;
|
|
50439
|
-
|
|
50489
|
+
const taskFailure = describeTaskFailure(record);
|
|
50490
|
+
if (taskFailure !== void 0 && record["securityPassed"] !== false) return taskFailure;
|
|
50491
|
+
if (record["securityRan"] === true && record["securityPassed"] !== true) {
|
|
50440
50492
|
return `${FAILURE_PREFIX} the security gate rejected the change`;
|
|
50441
50493
|
}
|
|
50494
|
+
if (taskFailure !== void 0) return taskFailure;
|
|
50442
50495
|
if (record["securityRan"] === false) {
|
|
50443
50496
|
if (typeof record["securityNote"] === "string") {
|
|
50444
50497
|
return `${FAILURE_PREFIX} the security scan did not run (${record["securityNote"]}); the change is blocked until it does`;
|
|
@@ -51413,6 +51466,7 @@ function buildStructuredOutput(result, simulated) {
|
|
|
51413
51466
|
// describing it. A live `run_dev_pipeline({ dryRun: true })` came back with
|
|
51414
51467
|
// no way to tell a successful dry run from a failed pipeline.
|
|
51415
51468
|
...result.dryRun !== void 0 ? { dryRun: result.dryRun } : {},
|
|
51469
|
+
...result.taskStatus !== void 0 ? { taskStatus: result.taskStatus } : {},
|
|
51416
51470
|
voteIterations: result.voteIterations,
|
|
51417
51471
|
qaIterations: result.qaIterations,
|
|
51418
51472
|
plan: result.plan,
|
|
@@ -51887,7 +51941,8 @@ async function executeGoal(input, opts = {}) {
|
|
|
51887
51941
|
executors: opts.executors ?? buildDefaultExecutors(opts.trustTier, opts.gatewayAdapters, input.dryRun),
|
|
51888
51942
|
...opts.logger !== void 0 ? { logger: opts.logger } : {},
|
|
51889
51943
|
...opts.outcomeSink !== void 0 ? { outcomeSink: opts.outcomeSink } : {},
|
|
51890
|
-
...onOutcome !== void 0 ? { onOutcome } : {}
|
|
51944
|
+
...onOutcome !== void 0 ? { onOutcome } : {},
|
|
51945
|
+
...opts.classifyResult !== void 0 ? { classifyResult: opts.classifyResult } : {}
|
|
51891
51946
|
});
|
|
51892
51947
|
const dispatch = await dispatcher.dispatch(decision, toMetaInput(input, "execute"));
|
|
51893
51948
|
return {
|
|
@@ -51900,17 +51955,14 @@ async function executeGoal(input, opts = {}) {
|
|
|
51900
51955
|
};
|
|
51901
51956
|
}
|
|
51902
51957
|
function detectEngineFailure(result) {
|
|
51903
|
-
|
|
51904
|
-
|
|
51905
|
-
|
|
51906
|
-
|
|
51907
|
-
return { message: `Engine reported failure: ${detail}` };
|
|
51908
|
-
}
|
|
51909
|
-
if (record["completed"] === false) {
|
|
51910
|
-
if (record["dryRun"] === true && record["planStatus"] === void 0) return null;
|
|
51958
|
+
const classification = classifyEngineResult(result);
|
|
51959
|
+
if (classification.success) return null;
|
|
51960
|
+
const record = typeof result === "object" && result !== null ? result : void 0;
|
|
51961
|
+
if (record?.["completed"] === false) {
|
|
51911
51962
|
return { message: describeIncompletePipeline(record), detail: record };
|
|
51912
51963
|
}
|
|
51913
|
-
|
|
51964
|
+
const detail = classification.failureReason ?? "no error message";
|
|
51965
|
+
return { message: `Engine reported failure: ${detail}` };
|
|
51914
51966
|
}
|
|
51915
51967
|
async function executeRunBody(input, logger56, trustTier, gatewayAdapters) {
|
|
51916
51968
|
try {
|
|
@@ -56122,4 +56174,4 @@ export {
|
|
|
56122
56174
|
shutdownFeedbackSubscriber,
|
|
56123
56175
|
createEventBusBridge
|
|
56124
56176
|
};
|
|
56125
|
-
//# sourceMappingURL=chunk-
|
|
56177
|
+
//# sourceMappingURL=chunk-BJ62QD3C.js.map
|