nexus-agents 2.125.37 → 2.125.38
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-V2CLCDW6.js → chunk-2SIYUWT2.js} +146 -60
- package/dist/{chunk-V2CLCDW6.js.map → chunk-2SIYUWT2.js.map} +1 -1
- package/dist/{chunk-FRE5G2OD.js → chunk-GK54JHWC.js} +2 -2
- package/dist/{chunk-QASYDORV.js → chunk-PRFSN66J.js} +11 -2
- package/dist/{chunk-QASYDORV.js.map → chunk-PRFSN66J.js.map} +1 -1
- package/dist/{chunk-L7R6DLF3.js → chunk-Q37HBFVE.js} +3 -3
- package/dist/cli.js +4 -4
- package/dist/{consensus-vote-ZC25LNEC.js → consensus-vote-CSKEO3LA.js} +2 -2
- package/dist/index.d.ts +8 -0
- package/dist/index.js +4 -4
- package/dist/{setup-command-VFACYFPG.js → setup-command-GBO3IMC5.js} +3 -3
- package/package.json +1 -1
- /package/dist/{chunk-FRE5G2OD.js.map → chunk-GK54JHWC.js.map} +0 -0
- /package/dist/{chunk-L7R6DLF3.js.map → chunk-Q37HBFVE.js.map} +0 -0
- /package/dist/{consensus-vote-ZC25LNEC.js.map → consensus-vote-CSKEO3LA.js.map} +0 -0
- /package/dist/{setup-command-VFACYFPG.js.map → setup-command-GBO3IMC5.js.map} +0 -0
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
runConsensusForGoal,
|
|
31
31
|
warnIfSimulatedOutsideTests,
|
|
32
32
|
writeJobCancelled
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-PRFSN66J.js";
|
|
34
34
|
import {
|
|
35
35
|
normalizeTopicToCanonical,
|
|
36
36
|
synthesizeResearch
|
|
@@ -122,7 +122,7 @@ import {
|
|
|
122
122
|
DEFAULT_TASK_TTL_MS,
|
|
123
123
|
DEFAULT_TOOL_RATE_LIMITS,
|
|
124
124
|
clampTaskTtl
|
|
125
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-Q37HBFVE.js";
|
|
126
126
|
import {
|
|
127
127
|
resolveInsideRoot
|
|
128
128
|
} from "./chunk-NUBSJGQZ.js";
|
|
@@ -37599,11 +37599,22 @@ function recordTriageOutcome(success, durationMs, errorMsg) {
|
|
|
37599
37599
|
|
|
37600
37600
|
// src/mcp/tools/run-graph-workflow.ts
|
|
37601
37601
|
import { z as z67 } from "zod";
|
|
37602
|
+
import { randomUUID as randomUUID11 } from "crypto";
|
|
37602
37603
|
var RunGraphWorkflowInputSchema = z67.object({
|
|
37603
37604
|
workflow: z67.string().min(1).max(100).describe("Name of the predefined graph workflow to execute"),
|
|
37604
37605
|
inputs: z67.record(z67.string(), z67.unknown()).optional().default({}).describe("Input values for the workflow"),
|
|
37605
37606
|
enableCheckpointing: z67.boolean().optional().default(true).describe("Enable checkpoint saving between steps"),
|
|
37606
|
-
enableAuditTrail: z67.boolean().optional().default(false).describe("Enable audit trail event logging")
|
|
37607
|
+
enableAuditTrail: z67.boolean().optional().default(false).describe("Enable audit trail event logging"),
|
|
37608
|
+
/**
|
|
37609
|
+
* Dispatch mode (#3732). `sync` (default) runs the graph workflow inline and
|
|
37610
|
+
* returns the result — but a workflow of up to ~100 expert nodes can exceed
|
|
37611
|
+
* the MCP request timeout. `async` returns a `{ status: 'pending', jobId }`
|
|
37612
|
+
* envelope immediately and runs in the background; poll
|
|
37613
|
+
* `get_job_result({ jobId })` for the result. Ignored for the `list` sentinel.
|
|
37614
|
+
*/
|
|
37615
|
+
dispatch: z67.enum(["sync", "async"]).optional().default("sync").describe(
|
|
37616
|
+
"Dispatch mode (#3732). 'sync' (default): run inline. 'async': return a jobId immediately + run in background (poll get_job_result)."
|
|
37617
|
+
)
|
|
37607
37618
|
});
|
|
37608
37619
|
function resolveGraph(workflow, startTime) {
|
|
37609
37620
|
const registry = getGraphRegistry();
|
|
@@ -37688,8 +37699,24 @@ var GRAPH_WORKFLOW_SCHEMA = {
|
|
|
37688
37699
|
),
|
|
37689
37700
|
inputs: z67.record(z67.string(), z67.unknown()).optional().describe("Input values for the workflow"),
|
|
37690
37701
|
enableCheckpointing: z67.boolean().optional().describe("Enable checkpoint saving"),
|
|
37691
|
-
enableAuditTrail: z67.boolean().optional().describe("Enable audit trail logging")
|
|
37702
|
+
enableAuditTrail: z67.boolean().optional().describe("Enable audit trail logging"),
|
|
37703
|
+
dispatch: z67.enum(["sync", "async"]).optional().describe(
|
|
37704
|
+
"Dispatch mode (#3732). 'sync' (default): run inline. 'async': return a jobId immediately + run in background (poll get_job_result)."
|
|
37705
|
+
)
|
|
37692
37706
|
};
|
|
37707
|
+
async function executeGraphWorkflowBody(input, logger57, notifier) {
|
|
37708
|
+
const result = await handleRunGraphWorkflow(input, logger57);
|
|
37709
|
+
const succeeded = result.status === "completed";
|
|
37710
|
+
notifier.info("run_graph_workflow", {
|
|
37711
|
+
event: succeeded ? "graph_workflow_complete" : "graph_workflow_failed",
|
|
37712
|
+
workflow: result.workflow,
|
|
37713
|
+
nodeCount: result.nodesExecuted,
|
|
37714
|
+
durationMs: result.durationMs
|
|
37715
|
+
});
|
|
37716
|
+
recordGraphWorkflowResult(result);
|
|
37717
|
+
const text = JSON.stringify(result, null, 2);
|
|
37718
|
+
return succeeded ? toolSuccess(text) : toolStructuredError({ errorCategory: "internal", message: text });
|
|
37719
|
+
}
|
|
37693
37720
|
function createGraphWorkflowHandler(logger57, notifier) {
|
|
37694
37721
|
return async (args, _ctx) => {
|
|
37695
37722
|
const parsed = RunGraphWorkflowInputSchema.safeParse(args);
|
|
@@ -37699,24 +37726,24 @@ function createGraphWorkflowHandler(logger57, notifier) {
|
|
|
37699
37726
|
message: `Validation error: ${formatZodError(parsed.error)}`
|
|
37700
37727
|
});
|
|
37701
37728
|
}
|
|
37702
|
-
|
|
37729
|
+
const input = parsed.data;
|
|
37730
|
+
if (input.workflow === "list") {
|
|
37703
37731
|
return toolSuccess(JSON.stringify(getGraphWorkflowList(), null, 2));
|
|
37704
37732
|
}
|
|
37705
37733
|
notifier.info("run_graph_workflow", {
|
|
37706
37734
|
event: "graph_workflow_start",
|
|
37707
|
-
workflow:
|
|
37735
|
+
workflow: input.workflow
|
|
37708
37736
|
});
|
|
37709
|
-
|
|
37710
|
-
|
|
37711
|
-
|
|
37712
|
-
|
|
37713
|
-
|
|
37714
|
-
|
|
37715
|
-
|
|
37716
|
-
|
|
37717
|
-
|
|
37718
|
-
|
|
37719
|
-
return succeeded ? toolSuccess(text) : toolStructuredError({ errorCategory: "internal", message: text });
|
|
37737
|
+
if (input.dispatch === "async") {
|
|
37738
|
+
return runAsJob({
|
|
37739
|
+
toolName: "run_graph_workflow",
|
|
37740
|
+
input,
|
|
37741
|
+
freshJobId: () => `gw-${randomUUID11()}`,
|
|
37742
|
+
run: () => executeGraphWorkflowBody(input, logger57, notifier),
|
|
37743
|
+
logger: logger57
|
|
37744
|
+
});
|
|
37745
|
+
}
|
|
37746
|
+
return executeGraphWorkflowBody(input, logger57, notifier);
|
|
37720
37747
|
};
|
|
37721
37748
|
}
|
|
37722
37749
|
function registerRunGraphWorkflowTool(server, deps) {
|
|
@@ -38298,9 +38325,21 @@ function suggestImprovement(criterion) {
|
|
|
38298
38325
|
|
|
38299
38326
|
// src/mcp/tools/execute-spec-tool.ts
|
|
38300
38327
|
import { z as z68 } from "zod";
|
|
38328
|
+
import { randomUUID as randomUUID12 } from "crypto";
|
|
38301
38329
|
var ExecuteSpecInputSchema = z68.object({
|
|
38302
38330
|
spec: z68.string().min(1).max(5e4).describe("Markdown specification to execute"),
|
|
38303
|
-
dryRun: z68.boolean().optional().default(false).describe("Parse and decompose only")
|
|
38331
|
+
dryRun: z68.boolean().optional().default(false).describe("Parse and decompose only"),
|
|
38332
|
+
/**
|
|
38333
|
+
* Dispatch mode (#3732). `sync` (default) runs the full DAG pipeline inline
|
|
38334
|
+
* and returns the result — but a real parse→decompose→compile→execute→
|
|
38335
|
+
* validate→analyze run can exceed the MCP request timeout. `async` returns a
|
|
38336
|
+
* `{ status: 'pending', jobId }` envelope immediately and runs in the
|
|
38337
|
+
* background; poll `get_job_result({ jobId })` for the result. Ignored when
|
|
38338
|
+
* `dryRun` is true (parse+decompose completes fast, so dry runs stay sync).
|
|
38339
|
+
*/
|
|
38340
|
+
dispatch: z68.enum(["sync", "async"]).default("sync").describe(
|
|
38341
|
+
"Dispatch mode (#3732). 'sync' (default): run inline. 'async': return a jobId immediately + run in background (poll get_job_result). Ignored for dryRun."
|
|
38342
|
+
)
|
|
38304
38343
|
});
|
|
38305
38344
|
function createDryRunResponse(input, logger57) {
|
|
38306
38345
|
const parseResult2 = parseSpec(input.spec);
|
|
@@ -38350,9 +38389,8 @@ async function createFullResponse(input, logger57) {
|
|
|
38350
38389
|
};
|
|
38351
38390
|
return toolSuccess(JSON.stringify(output2, null, 2));
|
|
38352
38391
|
}
|
|
38353
|
-
function
|
|
38354
|
-
|
|
38355
|
-
const handler3 = async (args, _ctx) => {
|
|
38392
|
+
function createExecuteSpecHandler(logger57) {
|
|
38393
|
+
return async (args, _ctx) => {
|
|
38356
38394
|
const parsed = ExecuteSpecInputSchema.safeParse(args);
|
|
38357
38395
|
if (!parsed.success) {
|
|
38358
38396
|
return toolStructuredError({
|
|
@@ -38360,11 +38398,25 @@ function registerExecuteSpecTool(server, deps) {
|
|
|
38360
38398
|
message: `Invalid input: ${formatZodError(parsed.error)}`
|
|
38361
38399
|
});
|
|
38362
38400
|
}
|
|
38363
|
-
|
|
38364
|
-
|
|
38401
|
+
const input = parsed.data;
|
|
38402
|
+
if (input.dryRun) {
|
|
38403
|
+
return createDryRunResponse(input, logger57);
|
|
38365
38404
|
}
|
|
38366
|
-
|
|
38405
|
+
if (input.dispatch === "async") {
|
|
38406
|
+
return runAsJob({
|
|
38407
|
+
toolName: "execute_spec",
|
|
38408
|
+
input,
|
|
38409
|
+
freshJobId: () => `es-${randomUUID12()}`,
|
|
38410
|
+
run: () => createFullResponse(input, logger57),
|
|
38411
|
+
logger: logger57
|
|
38412
|
+
});
|
|
38413
|
+
}
|
|
38414
|
+
return createFullResponse(input, logger57);
|
|
38367
38415
|
};
|
|
38416
|
+
}
|
|
38417
|
+
function registerExecuteSpecTool(server, deps) {
|
|
38418
|
+
const logger57 = deps.logger ?? createLogger({ tool: "execute_spec" });
|
|
38419
|
+
const handler3 = createExecuteSpecHandler(logger57);
|
|
38368
38420
|
const secureHandler = createSecureHandler(handler3, {
|
|
38369
38421
|
toolName: "execute_spec",
|
|
38370
38422
|
rateLimiter: deps.rateLimiter,
|
|
@@ -38376,7 +38428,10 @@ function registerExecuteSpecTool(server, deps) {
|
|
|
38376
38428
|
spec: z68.string().min(1).max(5e4).describe(
|
|
38377
38429
|
'Markdown specification to execute. Must contain "## Requirements" and "## Acceptance Criteria" sections.'
|
|
38378
38430
|
),
|
|
38379
|
-
dryRun: z68.boolean().optional().describe("Parse and decompose only (no execution)")
|
|
38431
|
+
dryRun: z68.boolean().optional().describe("Parse and decompose only (no execution)"),
|
|
38432
|
+
dispatch: z68.enum(["sync", "async"]).optional().describe(
|
|
38433
|
+
"Dispatch mode (#3732). 'sync' (default): run inline. 'async': return a jobId immediately + run in background (poll get_job_result). Ignored for dryRun."
|
|
38434
|
+
)
|
|
38380
38435
|
};
|
|
38381
38436
|
const description = "Execute a markdown specification through the full pipeline: parse, decompose into task DAG, compile to graph, execute, validate against acceptance criteria, and analyze failures.";
|
|
38382
38437
|
server.registerTool(
|
|
@@ -39551,7 +39606,13 @@ var TOOL_NAME_BY_PREFIX = {
|
|
|
39551
39606
|
// #3731: pr_review async jobs mint `pr-<uuid>` ids (no sessionId surface).
|
|
39552
39607
|
pr: "pr_review",
|
|
39553
39608
|
// #3731: supply_chain_tradeoff_panel async jobs mint `sc-<uuid>` ids.
|
|
39554
|
-
sc: "supply_chain_tradeoff_panel"
|
|
39609
|
+
sc: "supply_chain_tradeoff_panel",
|
|
39610
|
+
// #3732: execute_spec async jobs mint `es-<uuid>` ids (no sessionId surface).
|
|
39611
|
+
es: "execute_spec",
|
|
39612
|
+
// #3732: run_graph_workflow async jobs mint `gw-<uuid>` ids.
|
|
39613
|
+
gw: "run_graph_workflow",
|
|
39614
|
+
// #3732: run (execute:true) async jobs mint `rn-<uuid>` ids.
|
|
39615
|
+
rn: "run"
|
|
39555
39616
|
};
|
|
39556
39617
|
function toolNameFromJobId(jobId) {
|
|
39557
39618
|
const dash = jobId.indexOf("-");
|
|
@@ -43062,7 +43123,7 @@ ${contextBlock}`;
|
|
|
43062
43123
|
const strategy = config.votingStrategy ?? "higher_order";
|
|
43063
43124
|
await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
|
|
43064
43125
|
try {
|
|
43065
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
43126
|
+
const { executeVoting } = await import("./consensus-vote-CSKEO3LA.js");
|
|
43066
43127
|
const votingResult = await executeVoting(
|
|
43067
43128
|
{
|
|
43068
43129
|
proposal: buildVoteProposal(plan, research),
|
|
@@ -43605,7 +43666,7 @@ function createAuditStageRegistry() {
|
|
|
43605
43666
|
|
|
43606
43667
|
// src/mcp/tools/pr-review-tool.ts
|
|
43607
43668
|
import { z as z90 } from "zod";
|
|
43608
|
-
import { randomUUID as
|
|
43669
|
+
import { randomUUID as randomUUID13 } from "crypto";
|
|
43609
43670
|
|
|
43610
43671
|
// src/mcp/tools/pr-review-findings.ts
|
|
43611
43672
|
import { parse as parseYaml2 } from "yaml";
|
|
@@ -43857,7 +43918,7 @@ async function prReviewHandler(args, ctx) {
|
|
|
43857
43918
|
return runAsJob({
|
|
43858
43919
|
toolName: "pr_review",
|
|
43859
43920
|
input,
|
|
43860
|
-
freshJobId: () => `pr-${
|
|
43921
|
+
freshJobId: () => `pr-${randomUUID13()}`,
|
|
43861
43922
|
run: () => executePrReviewBody(input, ctx.logger),
|
|
43862
43923
|
logger: ctx.logger
|
|
43863
43924
|
});
|
|
@@ -45119,9 +45180,10 @@ function registerSuggestResearchTasksTool(server, deps) {
|
|
|
45119
45180
|
|
|
45120
45181
|
// src/mcp/tools/run-tool.ts
|
|
45121
45182
|
import { z as z103 } from "zod";
|
|
45183
|
+
import { randomUUID as randomUUID17 } from "crypto";
|
|
45122
45184
|
|
|
45123
45185
|
// src/orchestration/meta-orchestrator.ts
|
|
45124
|
-
import { randomUUID as
|
|
45186
|
+
import { randomUUID as randomUUID14 } from "crypto";
|
|
45125
45187
|
function createAuditLogSink(logger57) {
|
|
45126
45188
|
return {
|
|
45127
45189
|
record(record) {
|
|
@@ -45294,7 +45356,7 @@ function createMetaOrchestrator(options) {
|
|
|
45294
45356
|
const classification = classifyTask(input.goal);
|
|
45295
45357
|
const forced = input.forceStrategy !== void 0;
|
|
45296
45358
|
const base = input.forceStrategy !== void 0 ? buildForcedDecision(input.forceStrategy, routing, classification) : buildSelectedDecision(routing, classification);
|
|
45297
|
-
const decision = { ...base, decisionId:
|
|
45359
|
+
const decision = { ...base, decisionId: randomUUID14() };
|
|
45298
45360
|
const timestamp = new Date(getTimeProvider().now()).toISOString();
|
|
45299
45361
|
sink.record(toRecord(decision, input.goal, forced, timestamp));
|
|
45300
45362
|
if (shadowSelector !== void 0 && shadowSink !== void 0) {
|
|
@@ -45589,7 +45651,7 @@ function createMetaDispatcher(options) {
|
|
|
45589
45651
|
import { z as z101 } from "zod";
|
|
45590
45652
|
import * as fs11 from "fs";
|
|
45591
45653
|
import * as path10 from "path";
|
|
45592
|
-
import { randomUUID as
|
|
45654
|
+
import { randomUUID as randomUUID15 } from "crypto";
|
|
45593
45655
|
|
|
45594
45656
|
// src/pipeline/task-tracker.ts
|
|
45595
45657
|
import * as fs10 from "fs";
|
|
@@ -45911,7 +45973,7 @@ function dispatchAsyncDevPipeline(input, taskText, stages, pipelineOptions, logg
|
|
|
45911
45973
|
return runAsJob({
|
|
45912
45974
|
toolName: "run_dev_pipeline",
|
|
45913
45975
|
input,
|
|
45914
|
-
freshJobId: () => `dp-${
|
|
45976
|
+
freshJobId: () => `dp-${randomUUID15()}`,
|
|
45915
45977
|
run,
|
|
45916
45978
|
logger: logger57
|
|
45917
45979
|
});
|
|
@@ -45962,7 +46024,7 @@ function registerDevPipelineTool(server, deps) {
|
|
|
45962
46024
|
import { z as z102 } from "zod";
|
|
45963
46025
|
import * as fs12 from "fs";
|
|
45964
46026
|
import * as path11 from "path";
|
|
45965
|
-
import { randomUUID as
|
|
46027
|
+
import { randomUUID as randomUUID16 } from "crypto";
|
|
45966
46028
|
var PIPELINE_ASYNC_HINT = "A full run_pipeline run can exceed the synchronous MCP request timeout. Retry with `dispatch: 'async'` to get a jobId immediately, then poll get_job_result({ jobId }) for the result.";
|
|
45967
46029
|
var PipelineInputSchema = z102.object({
|
|
45968
46030
|
/** The task to execute. */
|
|
@@ -46111,7 +46173,7 @@ async function runPipelineHandler(args, logger57) {
|
|
|
46111
46173
|
return runAsJob({
|
|
46112
46174
|
toolName: "run_pipeline",
|
|
46113
46175
|
input,
|
|
46114
|
-
freshJobId: () => `rp-${
|
|
46176
|
+
freshJobId: () => `rp-${randomUUID16()}`,
|
|
46115
46177
|
run: () => executePipelineBody(task, stages, input.template, input.dryRun),
|
|
46116
46178
|
logger: logger57
|
|
46117
46179
|
});
|
|
@@ -46175,6 +46237,17 @@ var RunInputSchema = z103.object({
|
|
|
46175
46237
|
isNovel: z103.boolean().optional().describe("Hint: this kind of task has not been seen before."),
|
|
46176
46238
|
execute: z103.boolean().optional().describe(
|
|
46177
46239
|
"When true, actually run the selected strategy (if an executor is wired) and return its result; otherwise return the routing decision only (default false, read-only)."
|
|
46240
|
+
),
|
|
46241
|
+
/**
|
|
46242
|
+
* Dispatch mode (#3732). Only meaningful with `execute: true` — `run`
|
|
46243
|
+
* dispatches the heaviest engines (dev-pipeline/pipeline), which can exceed
|
|
46244
|
+
* the MCP request timeout even with the 1800s class guard (#3734). `sync`
|
|
46245
|
+
* (default) runs inline; `async` returns a `{ status: 'pending', jobId }`
|
|
46246
|
+
* envelope immediately and runs in the background; poll
|
|
46247
|
+
* `get_job_result({ jobId })`. Ignored for read-only routing (execute:false).
|
|
46248
|
+
*/
|
|
46249
|
+
dispatch: z103.enum(["sync", "async"]).optional().describe(
|
|
46250
|
+
"Dispatch mode (#3732). 'sync' (default): run inline. 'async' (only with execute:true): return a jobId immediately + run in background (poll get_job_result)."
|
|
46178
46251
|
)
|
|
46179
46252
|
});
|
|
46180
46253
|
var NOTE = "Routing decision only (read-only). Invoke the recommendedTool to execute, or wait for inline execution (run execute: true) in a later release. The other pipeline tools remain available as advanced force-strategy paths.";
|
|
@@ -46257,6 +46330,26 @@ async function executeGoal(input, opts = {}) {
|
|
|
46257
46330
|
result: dispatch.result
|
|
46258
46331
|
};
|
|
46259
46332
|
}
|
|
46333
|
+
async function executeRunBody(input, logger57, trustTier) {
|
|
46334
|
+
try {
|
|
46335
|
+
const exec2 = await executeGoal(input, {
|
|
46336
|
+
logger: logger57,
|
|
46337
|
+
...trustTier !== void 0 ? { trustTier } : {}
|
|
46338
|
+
});
|
|
46339
|
+
logger57.info("run: executed goal", {
|
|
46340
|
+
decisionId: exec2.decisionId,
|
|
46341
|
+
strategy: exec2.strategy,
|
|
46342
|
+
durationMs: exec2.durationMs
|
|
46343
|
+
});
|
|
46344
|
+
return toolSuccess(JSON.stringify(exec2, null, 2));
|
|
46345
|
+
} catch (err2) {
|
|
46346
|
+
const noExecutor = err2 instanceof MetaDispatchError && err2.code === "no_executor";
|
|
46347
|
+
return toolStructuredError({
|
|
46348
|
+
errorCategory: noExecutor ? "business" : "internal",
|
|
46349
|
+
message: err2 instanceof Error ? err2.message : String(err2)
|
|
46350
|
+
});
|
|
46351
|
+
}
|
|
46352
|
+
}
|
|
46260
46353
|
async function runHandler(args, logger57, trustTier) {
|
|
46261
46354
|
const parsed = RunInputSchema.safeParse(args);
|
|
46262
46355
|
if (!parsed.success) {
|
|
@@ -46266,24 +46359,17 @@ async function runHandler(args, logger57, trustTier) {
|
|
|
46266
46359
|
});
|
|
46267
46360
|
}
|
|
46268
46361
|
if (parsed.data.execute === true) {
|
|
46269
|
-
|
|
46270
|
-
|
|
46271
|
-
|
|
46272
|
-
|
|
46273
|
-
|
|
46274
|
-
|
|
46275
|
-
|
|
46276
|
-
|
|
46277
|
-
durationMs: exec2.durationMs
|
|
46278
|
-
});
|
|
46279
|
-
return toolSuccess(JSON.stringify(exec2, null, 2));
|
|
46280
|
-
} catch (err2) {
|
|
46281
|
-
const noExecutor = err2 instanceof MetaDispatchError && err2.code === "no_executor";
|
|
46282
|
-
return toolStructuredError({
|
|
46283
|
-
errorCategory: noExecutor ? "business" : "internal",
|
|
46284
|
-
message: err2 instanceof Error ? err2.message : String(err2)
|
|
46362
|
+
const input = parsed.data;
|
|
46363
|
+
if (input.dispatch === "async") {
|
|
46364
|
+
return runAsJob({
|
|
46365
|
+
toolName: "run",
|
|
46366
|
+
input,
|
|
46367
|
+
freshJobId: () => `rn-${randomUUID17()}`,
|
|
46368
|
+
run: () => executeRunBody(input, logger57, trustTier),
|
|
46369
|
+
logger: logger57
|
|
46285
46370
|
});
|
|
46286
46371
|
}
|
|
46372
|
+
return executeRunBody(input, logger57, trustTier);
|
|
46287
46373
|
}
|
|
46288
46374
|
const response = routeGoal(parsed.data, logger57);
|
|
46289
46375
|
logger57.info("run: routed goal", {
|
|
@@ -46415,7 +46501,7 @@ function registerListAvailableModelsTool(server, deps) {
|
|
|
46415
46501
|
|
|
46416
46502
|
// src/mcp/tools/supply-chain-tradeoff-panel.ts
|
|
46417
46503
|
import { z as z105 } from "zod";
|
|
46418
|
-
import { randomUUID as
|
|
46504
|
+
import { randomUUID as randomUUID18 } from "crypto";
|
|
46419
46505
|
var DEFAULT_AXES = [
|
|
46420
46506
|
"build_time_determinism",
|
|
46421
46507
|
"supply_chain_risk",
|
|
@@ -46675,7 +46761,7 @@ async function tradeoffPanelHandler(args, ctx) {
|
|
|
46675
46761
|
return runAsJob({
|
|
46676
46762
|
toolName: "supply_chain_tradeoff_panel",
|
|
46677
46763
|
input,
|
|
46678
|
-
freshJobId: () => `sc-${
|
|
46764
|
+
freshJobId: () => `sc-${randomUUID18()}`,
|
|
46679
46765
|
run: () => executeTradeoffPanelBody(input, ctx.logger),
|
|
46680
46766
|
logger: ctx.logger
|
|
46681
46767
|
});
|
|
@@ -48231,7 +48317,7 @@ var FeedbackCollectorConfigSchema = z112.object({
|
|
|
48231
48317
|
});
|
|
48232
48318
|
|
|
48233
48319
|
// src/learning/outcome-feedback-helpers.ts
|
|
48234
|
-
import { randomUUID as
|
|
48320
|
+
import { randomUUID as randomUUID19 } from "crypto";
|
|
48235
48321
|
function countOutcomesByClass(outcomes) {
|
|
48236
48322
|
const counts = {
|
|
48237
48323
|
success: 0,
|
|
@@ -48284,7 +48370,7 @@ function generateRewardExplanation(outcome, reward) {
|
|
|
48284
48370
|
}
|
|
48285
48371
|
function createRoutingDecision(params) {
|
|
48286
48372
|
return {
|
|
48287
|
-
id:
|
|
48373
|
+
id: randomUUID19(),
|
|
48288
48374
|
timestamp: getTimeProvider().nowIso(),
|
|
48289
48375
|
...params
|
|
48290
48376
|
};
|
|
@@ -48540,7 +48626,7 @@ var DEFAULT_FEEDBACK_INTEGRATION_CONFIG = {
|
|
|
48540
48626
|
};
|
|
48541
48627
|
|
|
48542
48628
|
// src/learning/feedback-integration.ts
|
|
48543
|
-
import { randomUUID as
|
|
48629
|
+
import { randomUUID as randomUUID20 } from "crypto";
|
|
48544
48630
|
var STEP_QUALITY_SCORING = {
|
|
48545
48631
|
/** Base score for successful steps. */
|
|
48546
48632
|
successBase: 0.8,
|
|
@@ -48616,8 +48702,8 @@ var FeedbackIntegration = class {
|
|
|
48616
48702
|
});
|
|
48617
48703
|
}
|
|
48618
48704
|
recordRoutingDecision(decision, traceId) {
|
|
48619
|
-
const id =
|
|
48620
|
-
const trace = traceId ??
|
|
48705
|
+
const id = randomUUID20();
|
|
48706
|
+
const trace = traceId ?? randomUUID20();
|
|
48621
48707
|
const now = getTimeProvider().now();
|
|
48622
48708
|
this.evictStaleEntriesThrottled(now);
|
|
48623
48709
|
if (this.decisionMap.size >= MAX_DECISION_MAP_SIZE) {
|
|
@@ -48691,7 +48777,7 @@ var FeedbackIntegration = class {
|
|
|
48691
48777
|
} = params;
|
|
48692
48778
|
const outcomeClass = this.determineOutcomeClass(success, qualityScore);
|
|
48693
48779
|
const completionRatio = success ? 1 : qualityScore / this.config.successQualityThreshold;
|
|
48694
|
-
const trace = traceId ??
|
|
48780
|
+
const trace = traceId ?? randomUUID20();
|
|
48695
48781
|
const outcome = {
|
|
48696
48782
|
routingDecisionId,
|
|
48697
48783
|
timestamp: getTimeProvider().nowIso(),
|
|
@@ -50374,4 +50460,4 @@ export {
|
|
|
50374
50460
|
shutdownFeedbackSubscriber,
|
|
50375
50461
|
createEventBusBridge
|
|
50376
50462
|
};
|
|
50377
|
-
//# sourceMappingURL=chunk-
|
|
50463
|
+
//# sourceMappingURL=chunk-2SIYUWT2.js.map
|