nexus-agents 3.12.1 → 3.13.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-Q4E6MPAW.js → chunk-6BTRY45Y.js} +30 -19
- package/dist/{chunk-Q4E6MPAW.js.map → chunk-6BTRY45Y.js.map} +1 -1
- package/dist/{chunk-TRZTLCL4.js → chunk-ERHCCLT7.js} +3 -3
- package/dist/{chunk-GO3GAPVQ.js → chunk-J75ZZ3HI.js} +2 -2
- package/dist/cli.js +3 -3
- package/dist/index.d.ts +14 -0
- package/dist/index.js +2 -2
- package/dist/{setup-command-LWHN672O.js → setup-command-GCDDJMCC.js} +3 -3
- package/package.json +1 -1
- /package/dist/{chunk-TRZTLCL4.js.map → chunk-ERHCCLT7.js.map} +0 -0
- /package/dist/{chunk-GO3GAPVQ.js.map → chunk-J75ZZ3HI.js.map} +0 -0
- /package/dist/{setup-command-LWHN672O.js.map → setup-command-GCDDJMCC.js.map} +0 -0
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
DEFAULT_TASK_TTL_MS,
|
|
23
23
|
DEFAULT_TOOL_RATE_LIMITS,
|
|
24
24
|
clampTaskTtl
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-ERHCCLT7.js";
|
|
26
26
|
import {
|
|
27
27
|
executeExpert
|
|
28
28
|
} from "./chunk-TPU5DT74.js";
|
|
@@ -45711,6 +45711,7 @@ function classifyVoteStageResult(votingResult) {
|
|
|
45711
45711
|
}
|
|
45712
45712
|
return { vote: { kind: "approved", approvalPercentage: pct }, label: "Approved" };
|
|
45713
45713
|
}
|
|
45714
|
+
var UNMEASURED_TRUST_TIER = "unmeasured";
|
|
45714
45715
|
function emitStageEvent2(stage, status, details) {
|
|
45715
45716
|
emitPipelineStageEvent("dev-pipeline", stage, status, details);
|
|
45716
45717
|
}
|
|
@@ -45929,9 +45930,13 @@ function getTrendContext() {
|
|
|
45929
45930
|
}
|
|
45930
45931
|
function createAgentStages(config = {}) {
|
|
45931
45932
|
const guard = createBudgetGuard(config.budget);
|
|
45933
|
+
const trustTier = config.trustTier ?? UNMEASURED_TRUST_TIER;
|
|
45934
|
+
const startStage = (stage) => {
|
|
45935
|
+
emitStageEvent2(stage, "started", { trustTier });
|
|
45936
|
+
};
|
|
45932
45937
|
return {
|
|
45933
45938
|
research: async (task) => {
|
|
45934
|
-
|
|
45939
|
+
startStage("research");
|
|
45935
45940
|
await postProgress(config, "Research", "Querying research tools (structured)...");
|
|
45936
45941
|
const start = getTimeProvider().now();
|
|
45937
45942
|
const topic = task.slice(0, 200);
|
|
@@ -45974,7 +45979,7 @@ function createAgentStages(config = {}) {
|
|
|
45974
45979
|
}
|
|
45975
45980
|
},
|
|
45976
45981
|
plan: async (task, research, feedback) => {
|
|
45977
|
-
|
|
45982
|
+
startStage("plan");
|
|
45978
45983
|
const outcomeCtx = getOutcomeContext();
|
|
45979
45984
|
const trendCtx = getTrendContext();
|
|
45980
45985
|
const weatherCtx = await getWeatherContext();
|
|
@@ -46007,7 +46012,7 @@ ${contextBlock}`;
|
|
|
46007
46012
|
return r.text || prompt;
|
|
46008
46013
|
},
|
|
46009
46014
|
vote: async (plan, research) => {
|
|
46010
|
-
|
|
46015
|
+
startStage("vote");
|
|
46011
46016
|
const start = getTimeProvider().now();
|
|
46012
46017
|
const strategy = config.votingStrategy ?? "higher_order";
|
|
46013
46018
|
await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
|
|
@@ -46061,7 +46066,7 @@ ${contextBlock}`;
|
|
|
46061
46066
|
}
|
|
46062
46067
|
},
|
|
46063
46068
|
decompose: async (plan) => {
|
|
46064
|
-
|
|
46069
|
+
startStage("decompose");
|
|
46065
46070
|
await postProgress(config, "PM", "PM expert decomposing...");
|
|
46066
46071
|
const r = await runExpert(
|
|
46067
46072
|
guard,
|
|
@@ -46085,7 +46090,7 @@ ${plan}`,
|
|
|
46085
46090
|
return tasks;
|
|
46086
46091
|
},
|
|
46087
46092
|
implement: async (task) => {
|
|
46088
|
-
|
|
46093
|
+
startStage(`impl-${task.id}`);
|
|
46089
46094
|
await postProgress(config, `Code [${task.id}]`, task.title);
|
|
46090
46095
|
const fb = task.feedback !== void 0 ? `
|
|
46091
46096
|
|
|
@@ -46122,7 +46127,7 @@ ${task.description}${fb}`,
|
|
|
46122
46127
|
return r.text || `[Implementation failed: ${r.error}]`;
|
|
46123
46128
|
},
|
|
46124
46129
|
qaReview: async (task, implementation) => {
|
|
46125
|
-
|
|
46130
|
+
startStage(`qa-${task.id}`);
|
|
46126
46131
|
await postProgress(config, `QA [${task.id}]`, "QA expert reviewing...");
|
|
46127
46132
|
const r = await runExpert(
|
|
46128
46133
|
guard,
|
|
@@ -46162,7 +46167,7 @@ Verdict: PASS/NEEDS_WORK/REJECT`,
|
|
|
46162
46167
|
return review;
|
|
46163
46168
|
},
|
|
46164
46169
|
qualityGate: async () => {
|
|
46165
|
-
|
|
46170
|
+
startStage("quality-gate");
|
|
46166
46171
|
const start = getTimeProvider().now();
|
|
46167
46172
|
const target = config.scanTarget ?? process.cwd();
|
|
46168
46173
|
await postProgress(config, "QualityGate", `Typecheck/lint/tests on ${target}...`);
|
|
@@ -46186,7 +46191,7 @@ Verdict: PASS/NEEDS_WORK/REJECT`,
|
|
|
46186
46191
|
return { passed, feedback: result.feedback };
|
|
46187
46192
|
},
|
|
46188
46193
|
securityScan: async () => {
|
|
46189
|
-
|
|
46194
|
+
startStage("security");
|
|
46190
46195
|
const start = getTimeProvider().now();
|
|
46191
46196
|
const target = config.scanTarget ?? process.cwd();
|
|
46192
46197
|
await postProgress(config, "Security", `Scanning ${target}...`);
|
|
@@ -49822,11 +49827,12 @@ async function resolveTaskInput(input) {
|
|
|
49822
49827
|
}
|
|
49823
49828
|
throw new Error("Either task or planFile must be provided");
|
|
49824
49829
|
}
|
|
49825
|
-
async function createStages(input) {
|
|
49830
|
+
async function createStages(input, trustTier) {
|
|
49826
49831
|
const backendChoice = input.trackerBackend;
|
|
49827
49832
|
const backend = backendChoice === "json" && input.repo !== void 0 ? await detectBackend() : backendChoice;
|
|
49828
49833
|
const tracker = input.repo !== void 0 ? createTaskTracker({ backend, repo: input.repo, labels: input.labels }) : void 0;
|
|
49829
49834
|
return createAgentStages({
|
|
49835
|
+
...trustTier !== void 0 ? { trustTier } : {},
|
|
49830
49836
|
scanTarget: input.workingDir,
|
|
49831
49837
|
simulateVotes: input.simulateVotes,
|
|
49832
49838
|
votingStrategy: input.votingStrategy,
|
|
@@ -49842,7 +49848,7 @@ async function createStages(input) {
|
|
|
49842
49848
|
}
|
|
49843
49849
|
async function runDevPipelineForGoal(goal, trustTier) {
|
|
49844
49850
|
const input = DevPipelineInputSchema.parse({ task: goal });
|
|
49845
|
-
const stages = await createStages(input);
|
|
49851
|
+
const stages = await createStages(input, trustTier);
|
|
49846
49852
|
return runDevPipeline(goal, stages, trustTier !== void 0 ? { trustTier } : void 0);
|
|
49847
49853
|
}
|
|
49848
49854
|
function buildStructuredOutput(result, simulated) {
|
|
@@ -49899,7 +49905,7 @@ async function runDevPipelineHandler(args, logger59, trustTier, auditLogger) {
|
|
|
49899
49905
|
}
|
|
49900
49906
|
try {
|
|
49901
49907
|
const taskText = await resolveTaskInput(input);
|
|
49902
|
-
const stages = await createStages(input);
|
|
49908
|
+
const stages = await createStages(input, trustTier);
|
|
49903
49909
|
const pipelineOptions = buildPipelineOptions(input, trustTier, auditLogger);
|
|
49904
49910
|
const hasOptions = Object.keys(pipelineOptions).length > 0;
|
|
49905
49911
|
const resolvedOptions = hasOptions ? pipelineOptions : void 0;
|
|
@@ -50106,7 +50112,7 @@ async function executePipelineBody(task, stages, templateId, dryRun, simulated)
|
|
|
50106
50112
|
}
|
|
50107
50113
|
return toolSuccessStructured(output2);
|
|
50108
50114
|
}
|
|
50109
|
-
async function runPipelineHandler(args, logger59) {
|
|
50115
|
+
async function runPipelineHandler(args, logger59, trustTier) {
|
|
50110
50116
|
const parsed = PipelineInputSchema.safeParse(args);
|
|
50111
50117
|
if (!parsed.success) {
|
|
50112
50118
|
return toolStructuredError({
|
|
@@ -50127,6 +50133,9 @@ async function runPipelineHandler(args, logger59) {
|
|
|
50127
50133
|
simulateVotes: input.simulateVotes,
|
|
50128
50134
|
votingStrategy: input.votingStrategy,
|
|
50129
50135
|
quickMode: input.quickMode,
|
|
50136
|
+
// #4694: record-only. Absent stays absent — createAgentStages stamps
|
|
50137
|
+
// UNMEASURED_TRUST_TIER rather than inventing a trusted default.
|
|
50138
|
+
...trustTier !== void 0 ? { trustTier } : {},
|
|
50130
50139
|
budget: resolveRunBudget(task, input.template, logger59)
|
|
50131
50140
|
});
|
|
50132
50141
|
const stages = selectStageRegistry(input.template, task, agentStages);
|
|
@@ -50149,11 +50158,13 @@ async function runPipelineHandler(args, logger59) {
|
|
|
50149
50158
|
}
|
|
50150
50159
|
function registerPipelineTool(server, deps) {
|
|
50151
50160
|
const logger59 = deps.logger ?? createLogger({ tool: "run_pipeline" });
|
|
50152
|
-
const secureHandler = createSecureHandler(
|
|
50153
|
-
|
|
50154
|
-
|
|
50155
|
-
|
|
50156
|
-
|
|
50161
|
+
const secureHandler = createSecureHandler(
|
|
50162
|
+
// Optional chaining is deliberate, not defensive noise: a handler invoked
|
|
50163
|
+
// without a context has genuinely NOT measured a tier, and that flows to
|
|
50164
|
+
// UNMEASURED_TRUST_TIER rather than to a default. Absence stays absence.
|
|
50165
|
+
(args, ctx) => runPipelineHandler(args, logger59, ctx?.requestContext.trustTier),
|
|
50166
|
+
{ toolName: "run_pipeline", rateLimiter: deps.rateLimiter, logger: logger59 }
|
|
50167
|
+
);
|
|
50157
50168
|
const timeoutMs = getToolTimeout("run_pipeline", deps.security);
|
|
50158
50169
|
const wrapped = wrapToolWithTimeout("run_pipeline", secureHandler, { timeoutMs, logger: logger59 });
|
|
50159
50170
|
server.registerTool(
|
|
@@ -54487,4 +54498,4 @@ export {
|
|
|
54487
54498
|
shutdownFeedbackSubscriber,
|
|
54488
54499
|
createEventBusBridge
|
|
54489
54500
|
};
|
|
54490
|
-
//# sourceMappingURL=chunk-
|
|
54501
|
+
//# sourceMappingURL=chunk-6BTRY45Y.js.map
|