nexus-agents 4.15.6 → 4.16.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-QZAMRR2Q.js → chunk-2XNL5FUJ.js} +3 -3
- package/dist/{chunk-XED5OLWO.js → chunk-5EB36WJD.js} +35 -22
- package/dist/{chunk-XED5OLWO.js.map → chunk-5EB36WJD.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/index.d.ts +10 -0
- package/dist/index.js +2 -2
- package/dist/{setup-data-dir-VLOT7GSQ.js → setup-data-dir-LIZTPE42.js} +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-QZAMRR2Q.js.map → chunk-2XNL5FUJ.js.map} +0 -0
- /package/dist/{setup-data-dir-VLOT7GSQ.js.map → setup-data-dir-LIZTPE42.js.map} +0 -0
|
@@ -170,7 +170,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
170
170
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
171
171
|
|
|
172
172
|
// src/version.ts
|
|
173
|
-
var VERSION = true ? "4.
|
|
173
|
+
var VERSION = true ? "4.16.0" : "dev";
|
|
174
174
|
|
|
175
175
|
// src/mcp/task-store.ts
|
|
176
176
|
import { InMemoryTaskStore } from "@modelcontextprotocol/sdk/experimental/tasks";
|
|
@@ -1134,7 +1134,7 @@ async function runDoctorFix(result) {
|
|
|
1134
1134
|
writeLine2("\u2500".repeat(40));
|
|
1135
1135
|
let fixCount = 0;
|
|
1136
1136
|
if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
|
|
1137
|
-
const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-
|
|
1137
|
+
const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-LIZTPE42.js");
|
|
1138
1138
|
const outcome = describeDataDirFix2(initDataDirectories2());
|
|
1139
1139
|
writeLine2(outcome.line);
|
|
1140
1140
|
if (outcome.counted) fixCount++;
|
|
@@ -1237,4 +1237,4 @@ export {
|
|
|
1237
1237
|
startStdioServer,
|
|
1238
1238
|
closeServer
|
|
1239
1239
|
};
|
|
1240
|
-
//# sourceMappingURL=chunk-
|
|
1240
|
+
//# sourceMappingURL=chunk-2XNL5FUJ.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-2XNL5FUJ.js";
|
|
25
25
|
import {
|
|
26
26
|
executeExpert
|
|
27
27
|
} from "./chunk-BH5PWPKK.js";
|
|
@@ -45597,6 +45597,12 @@ function getVoteFeedback(result) {
|
|
|
45597
45597
|
}
|
|
45598
45598
|
var MAX_VOTE_ITERATIONS = 3;
|
|
45599
45599
|
var MAX_QA_ITERATIONS = 3;
|
|
45600
|
+
function resolveIterationLimits(options) {
|
|
45601
|
+
return {
|
|
45602
|
+
vote: options?.maxVoteIterations ?? MAX_VOTE_ITERATIONS,
|
|
45603
|
+
qa: options?.maxQaIterations ?? MAX_QA_ITERATIONS
|
|
45604
|
+
};
|
|
45605
|
+
}
|
|
45600
45606
|
async function runDevPipeline(task, stages, options) {
|
|
45601
45607
|
const sid = options?.sessionId;
|
|
45602
45608
|
const prior = sid !== void 0 ? loadCheckpointState(sid) : null;
|
|
@@ -45626,13 +45632,11 @@ async function runDevPipelineInner(task, stages, options, sid, prior) {
|
|
|
45626
45632
|
logger42.info("Harness mode \u2014 returning tasks for external implementation");
|
|
45627
45633
|
return buildHarnessResult(planResult, tasks);
|
|
45628
45634
|
}
|
|
45629
|
-
const result = await runImplSecurityPhase(
|
|
45630
|
-
planResult,
|
|
45631
|
-
tasks,
|
|
45632
|
-
stages,
|
|
45635
|
+
const result = await runImplSecurityPhase(planResult, tasks, stages, {
|
|
45633
45636
|
sid,
|
|
45634
|
-
options?.qualityGate ?? "off"
|
|
45635
|
-
|
|
45637
|
+
qualityGateMode: options?.qualityGate ?? "off",
|
|
45638
|
+
limits: resolveIterationLimits(options)
|
|
45639
|
+
});
|
|
45636
45640
|
applyPipelineHindsight(bm, task, sid, result);
|
|
45637
45641
|
return result;
|
|
45638
45642
|
}
|
|
@@ -45846,7 +45850,10 @@ async function runPlanningPhase(task, stages, prior, options) {
|
|
|
45846
45850
|
saveStageCheckpoint(sid, "research", { type: "research", text: research.text });
|
|
45847
45851
|
}
|
|
45848
45852
|
const planContext = await assemblePlanContext(research.text, task, sid, bm);
|
|
45849
|
-
const planResult = await runPlanOrResume(prior, task, planContext, stages,
|
|
45853
|
+
const planResult = await runPlanOrResume(prior, task, planContext, stages, {
|
|
45854
|
+
sid,
|
|
45855
|
+
limits: resolveIterationLimits(options)
|
|
45856
|
+
});
|
|
45850
45857
|
if (sid !== void 0) {
|
|
45851
45858
|
saveStageCheckpoint(sid, "plan", {
|
|
45852
45859
|
type: "plan",
|
|
@@ -45877,8 +45884,9 @@ function buildHarnessResult(planResult, tasks) {
|
|
|
45877
45884
|
securityRan: false
|
|
45878
45885
|
};
|
|
45879
45886
|
}
|
|
45880
|
-
async function runImplSecurityPhase(planResult, tasks, stages,
|
|
45881
|
-
const
|
|
45887
|
+
async function runImplSecurityPhase(planResult, tasks, stages, run) {
|
|
45888
|
+
const { sid, qualityGateMode, limits } = run;
|
|
45889
|
+
const implResult = await implementQaLoop(tasks, stages, limits);
|
|
45882
45890
|
if (sid !== void 0)
|
|
45883
45891
|
saveStageCheckpoint(sid, "implement", { type: "implement", tasks: implResult.completedTasks });
|
|
45884
45892
|
const qaGate = await runQualityGateStage(stages, qualityGateMode);
|
|
@@ -45936,7 +45944,8 @@ async function runQualityGateStage(stages, mode) {
|
|
|
45936
45944
|
}
|
|
45937
45945
|
);
|
|
45938
45946
|
}
|
|
45939
|
-
async function runPlanOrResume(prior, task, research, stages,
|
|
45947
|
+
async function runPlanOrResume(prior, task, research, stages, run) {
|
|
45948
|
+
const { sid: sessionId, limits } = run;
|
|
45940
45949
|
if (prior?.plan !== void 0) {
|
|
45941
45950
|
logger42.info("Resuming from checkpoint", { stage: "plan", sessionId });
|
|
45942
45951
|
return {
|
|
@@ -45947,7 +45956,7 @@ async function runPlanOrResume(prior, task, research, stages, sessionId) {
|
|
|
45947
45956
|
caveats: prior.voteCaveats ?? []
|
|
45948
45957
|
};
|
|
45949
45958
|
}
|
|
45950
|
-
return planVoteLoop(task, research, stages, sessionId);
|
|
45959
|
+
return planVoteLoop(task, research, stages, sessionId, limits);
|
|
45951
45960
|
}
|
|
45952
45961
|
async function runOrResumeDecompose(prior, plan, stages, meta) {
|
|
45953
45962
|
if (prior?.tasks !== void 0) {
|
|
@@ -45971,10 +45980,10 @@ function extractConditionalMeta(vote) {
|
|
|
45971
45980
|
}
|
|
45972
45981
|
return { conditional: false, conditions: [], caveats: [] };
|
|
45973
45982
|
}
|
|
45974
|
-
async function planVoteLoop(task, research, stages, sessionId) {
|
|
45983
|
+
async function planVoteLoop(task, research, stages, sessionId, limits) {
|
|
45975
45984
|
let feedback;
|
|
45976
45985
|
let plan = "";
|
|
45977
|
-
for (let i = 1; i <=
|
|
45986
|
+
for (let i = 1; i <= limits.vote; i++) {
|
|
45978
45987
|
plan = await withStep(
|
|
45979
45988
|
{ name: `plan (i=${String(i)})`, kind: "pipeline.stage", attrs: { iteration: i } },
|
|
45980
45989
|
() => stages.plan(task, research, feedback)
|
|
@@ -46011,9 +46020,9 @@ async function planVoteLoop(task, research, stages, sessionId) {
|
|
|
46011
46020
|
});
|
|
46012
46021
|
}
|
|
46013
46022
|
logger42.warn("Max vote iterations reached, proceeding with last plan", { sessionId });
|
|
46014
|
-
return { plan, iterations:
|
|
46023
|
+
return { plan, iterations: limits.vote, conditional: false, conditions: [], caveats: [] };
|
|
46015
46024
|
}
|
|
46016
|
-
async function implementSingleTask(task, stages) {
|
|
46025
|
+
async function implementSingleTask(task, stages, limits) {
|
|
46017
46026
|
let currentTask = { ...task, status: "in_progress" };
|
|
46018
46027
|
const qaResult = await runQaLoop(
|
|
46019
46028
|
async (feedback) => {
|
|
@@ -46035,7 +46044,7 @@ async function implementSingleTask(task, stages) {
|
|
|
46035
46044
|
const review = await stages.qaReview(currentTask, impl);
|
|
46036
46045
|
return { verdict: review.verdict, feedback: review.feedback, issues: review.issues };
|
|
46037
46046
|
},
|
|
46038
|
-
|
|
46047
|
+
limits.qa
|
|
46039
46048
|
);
|
|
46040
46049
|
const finalTask = {
|
|
46041
46050
|
id: task.id,
|
|
@@ -46051,15 +46060,15 @@ async function implementSingleTask(task, stages) {
|
|
|
46051
46060
|
return { iterations: qaResult.iterations, task: finalTask };
|
|
46052
46061
|
}
|
|
46053
46062
|
var MAX_IMPL_CONCURRENCY = 4;
|
|
46054
|
-
async function implementQaLoop(tasks, stages) {
|
|
46063
|
+
async function implementQaLoop(tasks, stages, limits) {
|
|
46055
46064
|
if (tasks.length === 0) return { totalIterations: 0, completedTasks: [] };
|
|
46056
|
-
const taskFns = tasks.map((task) => () => implementSingleTaskSafe(task, stages));
|
|
46065
|
+
const taskFns = tasks.map((task) => () => implementSingleTaskSafe(task, stages, limits));
|
|
46057
46066
|
const results = await executeWithConcurrency(taskFns, MAX_IMPL_CONCURRENCY);
|
|
46058
46067
|
return aggregateImplResults(results);
|
|
46059
46068
|
}
|
|
46060
|
-
async function implementSingleTaskSafe(task, stages) {
|
|
46069
|
+
async function implementSingleTaskSafe(task, stages, limits) {
|
|
46061
46070
|
try {
|
|
46062
|
-
return await implementSingleTask(task, stages);
|
|
46071
|
+
return await implementSingleTask(task, stages, limits);
|
|
46063
46072
|
} catch (error) {
|
|
46064
46073
|
const reason = error instanceof Error ? error : new Error(String(error));
|
|
46065
46074
|
logger42.error("Task implementation failed", reason, {});
|
|
@@ -51167,6 +51176,10 @@ function buildPipelineOptions(input, trustTier, auditLogger) {
|
|
|
51167
51176
|
...input.dryRun ? { dryRun: true } : {},
|
|
51168
51177
|
...input.mode === "harness" ? { mode: "harness" } : {},
|
|
51169
51178
|
...input.qualityGate !== "off" ? { qualityGate: input.qualityGate } : {},
|
|
51179
|
+
// #4939: both were advertised, bounds-checked and defaulted since the tool
|
|
51180
|
+
// shipped, and neither was ever read off `parsed.data`.
|
|
51181
|
+
maxVoteIterations: input.maxVoteIterations,
|
|
51182
|
+
maxQaIterations: input.maxQaIterations,
|
|
51170
51183
|
...trustTier !== void 0 ? { trustTier } : {},
|
|
51171
51184
|
// #3710: thread the server's durable audit logger so the consensus→execute
|
|
51172
51185
|
// policy gate persists decisions to the shared hash chain.
|
|
@@ -55850,4 +55863,4 @@ export {
|
|
|
55850
55863
|
shutdownFeedbackSubscriber,
|
|
55851
55864
|
createEventBusBridge
|
|
55852
55865
|
};
|
|
55853
|
-
//# sourceMappingURL=chunk-
|
|
55866
|
+
//# sourceMappingURL=chunk-5EB36WJD.js.map
|