@sema-agent/core 1.426.0 → 1.427.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.
|
@@ -360,6 +360,9 @@ export async function createRunWorkflowTool(d) {
|
|
|
360
360
|
const primitives = buildWorkflowPrimitives(wfCtx, governance, d.onAgentSpawn, d.parentThinking, principal);
|
|
361
361
|
return d.scriptRunner.run({ scriptSource: script, primitives, scriptArgs: effectiveArgs, signal: wfCtx.signal }).then((r) => r.result);
|
|
362
362
|
};
|
|
363
|
+
if (ctx.signal?.aborted) {
|
|
364
|
+
return structuredError("the launching tool call was aborted before the workflow could start — not started");
|
|
365
|
+
}
|
|
363
366
|
let handle;
|
|
364
367
|
const workflowTaskId = d.taskRegistry?.mintTaskId("workflow");
|
|
365
368
|
try {
|
|
@@ -379,7 +382,6 @@ export async function createRunWorkflowTool(d) {
|
|
|
379
382
|
...(resumeFromRunId !== undefined ? { resumeFromRunId } : {}),
|
|
380
383
|
...(d.onBackgroundChildEvent !== undefined ? { onBackgroundChildEvent: d.onBackgroundChildEvent } : {}),
|
|
381
384
|
scope: taskScope ?? d.scope,
|
|
382
|
-
signal: ctx.signal,
|
|
383
385
|
budget: lim.budget,
|
|
384
386
|
maxAgents: lim.maxAgents ?? DEFAULTS.maxAgents,
|
|
385
387
|
totalTimeoutMs: lim.totalTimeoutMs ?? DEFAULTS.totalTimeoutMs,
|