@automatalabs/workflows 0.54.1 → 0.55.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/README.md +21 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp-server.js +182 -17
- package/dist/validate.d.ts +7 -0
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +10 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -46,8 +46,10 @@ pnpm add @automatalabs/workflows
|
|
|
46
46
|
- **OpenCode** — credentials configured for the provider OpenCode will use.
|
|
47
47
|
- **pi** — a selected provider API key or credentials in `~/.pi/agent/auth.json`.
|
|
48
48
|
|
|
49
|
-
You only need auth for the backend(s) your scripts actually route to.
|
|
50
|
-
Claude (override with `AGENTPRISM_DEFAULT_BACKEND`; see
|
|
49
|
+
You only need auth for the backend(s) your scripts actually route to. Direct SDK runners retain
|
|
50
|
+
the historical Claude default (override with `AGENTPRISM_DEFAULT_BACKEND`; see
|
|
51
|
+
[Backend selection](#backend-selection)). The bundled MCP server auto-selects a pinned project
|
|
52
|
+
default from no-prompt readiness probes when that environment variable is absent.
|
|
51
53
|
|
|
52
54
|
---
|
|
53
55
|
|
|
@@ -660,7 +662,8 @@ and `configOptions` bag against it. Only exact ids in `modes.availableModes` pas
|
|
|
660
662
|
means omit `mode`, never infer `"default"`. This probe uses zero tokens. A target that cannot spawn,
|
|
661
663
|
authenticate, select its model, or open a session contributes one warning and `probed:false`; only
|
|
662
664
|
that target's configuration checks are skipped, so probe failure alone never invalidates the script.
|
|
663
|
-
There is no cached catalog
|
|
665
|
+
There is no cached catalog. Programmatic hosts may set `probeConfig:false` for a mock routing-discovery
|
|
666
|
+
pass that intentionally skips all no-prompt config checks; the CLI and ordinary validation keep them enabled.
|
|
664
667
|
A mock live confirm answers checkpoints with `default ?? true`, so `headless: "pause"`
|
|
665
668
|
dry-runs cleanly; `headless: "abort"` warns because a truly unattended run would abort.
|
|
666
669
|
Script-declared `meta.backends` are treated as approved (with a warning that real runs require
|
|
@@ -729,7 +732,12 @@ const mockAnswers: MockAnswers = {
|
|
|
729
732
|
],
|
|
730
733
|
},
|
|
731
734
|
};
|
|
732
|
-
const report = await validateWorkflowScript(script, {
|
|
735
|
+
const report = await validateWorkflowScript(script, {
|
|
736
|
+
args: { target: "src/" },
|
|
737
|
+
mockAnswers,
|
|
738
|
+
// defaultModel: "codex", // optional host-pinned fallback for otherwise model-less calls
|
|
739
|
+
// probeConfig: false, // optional routing-discovery pass; skips live config checks
|
|
740
|
+
});
|
|
733
741
|
report.ok; // parse ok AND dry run completed
|
|
734
742
|
report.dryRun?.agentCalls; // calls include mockAnswer: { glob, sequenceIndex?, sequenceLength? }
|
|
735
743
|
report.dryRun?.harnessOptions;
|
|
@@ -758,8 +766,10 @@ default set). Each harness opens one session without a prompt — zero tokens
|
|
|
758
766
|
advertised ACP modes plus its config-option catalog: model ids (including bracket variants), effort
|
|
759
767
|
levels, and boolean knobs. A non-null `modes` object contains `currentModeId` and `availableModes`;
|
|
760
768
|
only exact listed ids may be authored. `modes: null` means omit `mode`, never infer `"default"`.
|
|
761
|
-
A harness that
|
|
762
|
-
`probed: false` with the reason and never blocks the others.
|
|
769
|
+
A harness that reports spawn/session/auth failure during `session/new` produces
|
|
770
|
+
`probed: false` with the reason and never blocks the others. A successful row proves only that
|
|
771
|
+
session/config discovery completed; some agents defer credential validation until the first prompt,
|
|
772
|
+
so `probed:true` is not a universal authentication-status result. Flags: `--cwd <dir>` (probe
|
|
763
773
|
session cwd; default the current directory), `--timeout-ms <n>` (per-harness bound, default
|
|
764
774
|
60000), `--models[=<filter>]`, `--json`. Exit codes: `0` all probed, `1` at least one probe
|
|
765
775
|
failed, `3` usage error.
|
|
@@ -882,7 +892,10 @@ the string on its first `/`. If the first segment, ASCII-case-insensitively, is
|
|
|
882
892
|
once; a custom registration wins on a built-in-name collision. A registered harness name alone is
|
|
883
893
|
backend-only and preserves that harness's configured default model. Any other first segment sends
|
|
884
894
|
the entire authored string unchanged to `AGENTPRISM_DEFAULT_BACKEND` (default `claude`). Omitting
|
|
885
|
-
the spec also uses the configured default backend and its default model.
|
|
895
|
+
the spec also uses the configured default backend and its default model. This paragraph describes
|
|
896
|
+
the SDK runner. The bundled MCP composition root adds an operator-friendly policy: when the env var
|
|
897
|
+
is truly unset and a workflow reaches a model-less call, it probes backend readiness without
|
|
898
|
+
prompting and injects a pinned backend-only default before validation/execution and resume.
|
|
886
899
|
|
|
887
900
|
```ts
|
|
888
901
|
import { selectBackend } from "@automatalabs/workflows";
|
|
@@ -924,6 +937,7 @@ runIsolation, // ACP-defaulted single-target substitution over a
|
|
|
924
937
|
createReplayRunner, // backend-neutral in-memory replay composition primitive
|
|
925
938
|
runWorkflow, // the bare engine run (no status trio)
|
|
926
939
|
parseWorkflowScript, // parse a script's meta + body
|
|
940
|
+
workflowMayUseDefaultModel, // conservative static detection of host-default agent allocation
|
|
927
941
|
validateWorkflowScript, // token-free parse + mock dry run + no-prompt harness option probes
|
|
928
942
|
probeHarnessConfig, // the same no-prompt option probe standalone (the `config` CLI command)
|
|
929
943
|
fabricateFromSchema, // the dry run's JSON-Schema value fabricator
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { ExecOptions, WorkflowDir, WorkflowManagerOptions } from "@automata
|
|
|
4
4
|
import type { AgentRunner, RunEvent, WorkflowRunResult } from "@automatalabs/shared-types";
|
|
5
5
|
import { type ScriptBackendApproval } from "./script-backends.js";
|
|
6
6
|
export { projectWorkflowAgentActivity, workflowAgentEventSource, type WorkflowAgentEventSink, type WorkflowAgentEventSource, } from "./agent-event-source.js";
|
|
7
|
-
export { runWorkflow, parseWorkflowScript, hashCheckpointInputs, resolveAgentTimeoutMs, resolveWorkflowRunLimits, redactText, truncateUtf8, AGENT_PROGRESS_HEARTBEAT_MS, AGENT_PROGRESS_MIN_INTERVAL_MS, CALL_PATH_FORMAT, CALL_INPUTS_FORMAT, CHECKPOINT_INPUTS_FORMAT, RESUME_FALLBACK_REASONS, RESUME_DISABLED_REASONS, RESUME_CALL_LIVE_REASONS, RESUME_CALL_FAILED_REASONS, } from "@automatalabs/workflow-engine";
|
|
7
|
+
export { runWorkflow, parseWorkflowScript, workflowMayUseDefaultModel, hashCheckpointInputs, resolveAgentTimeoutMs, resolveWorkflowRunLimits, redactText, truncateUtf8, AGENT_PROGRESS_HEARTBEAT_MS, AGENT_PROGRESS_MIN_INTERVAL_MS, CALL_PATH_FORMAT, CALL_INPUTS_FORMAT, CHECKPOINT_INPUTS_FORMAT, RESUME_FALLBACK_REASONS, RESUME_DISABLED_REASONS, RESUME_CALL_LIVE_REASONS, RESUME_CALL_FAILED_REASONS, } from "@automatalabs/workflow-engine";
|
|
8
8
|
export { runIsolation, createReplayRunner, type RunIsolationSdkOptions } from "./isolation.js";
|
|
9
9
|
export type { RunIsolationOptions, IsolationRunResult, ReplayRunnerOptions, ResolvedIsolationTarget, IsolationTarget, ReplayRunner, ReplayObservation, ReplayReport, ReplayCallReport, ReplayDivergenceEvent, CheckpointCallContext, WorkflowCallRecord, WorkflowRecordedError, } from "./isolation.js";
|
|
10
10
|
export { openWorkflowDir, type WorkflowDir, type WorkflowDirEntry, type OpenWorkflowDirOptions, } from "@automatalabs/workflow-engine";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,OAAO,EAKL,eAAe,IAAI,qBAAqB,EACzC,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAiB,MAAM,0BAA0B,CAAC;AAC/F,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACtG,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAyB,iBAAiB,EAAE,MAA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sBAAsB;CAiC/B;AAED;;;;;;;;GAQG;AACH,YAAY,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAElE,8CAA8C;AAC9C,MAAM,WAAW,yBAAyB;IACxC;;;;OAIG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,+EAA+E;IAC/E,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,0FAA0F;IAC1F,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,+FAA+F;IAC/F,mBAAmB,CAAC,EAAE,qBAAqB,CAAC;IAC5C;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,WAAW,CAAC;CAC7C;AAED;;;;;;;;;GASG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,MAAM,EACd,IAAI,GAAE,yBAA8B,GACnC,OAAO,CAAC,iBAAiB,CAAC,CAsC5B"}
|
package/dist/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import { projectWorkflowAgentActivity, workflowAgentEventSource, } from "./agent
|
|
|
16
16
|
export { projectWorkflowAgentActivity, workflowAgentEventSource, } from "./agent-event-source.js";
|
|
17
17
|
// ── Engine: run entry, script parsing, the managed-run lifecycle, and the
|
|
18
18
|
// option/result + error types the host composes against. ──
|
|
19
|
-
export { runWorkflow, parseWorkflowScript, hashCheckpointInputs, resolveAgentTimeoutMs, resolveWorkflowRunLimits, redactText, truncateUtf8, AGENT_PROGRESS_HEARTBEAT_MS, AGENT_PROGRESS_MIN_INTERVAL_MS, CALL_PATH_FORMAT, CALL_INPUTS_FORMAT, CHECKPOINT_INPUTS_FORMAT, RESUME_FALLBACK_REASONS, RESUME_DISABLED_REASONS, RESUME_CALL_LIVE_REASONS, RESUME_CALL_FAILED_REASONS, } from "@automatalabs/workflow-engine";
|
|
19
|
+
export { runWorkflow, parseWorkflowScript, workflowMayUseDefaultModel, hashCheckpointInputs, resolveAgentTimeoutMs, resolveWorkflowRunLimits, redactText, truncateUtf8, AGENT_PROGRESS_HEARTBEAT_MS, AGENT_PROGRESS_MIN_INTERVAL_MS, CALL_PATH_FORMAT, CALL_INPUTS_FORMAT, CHECKPOINT_INPUTS_FORMAT, RESUME_FALLBACK_REASONS, RESUME_DISABLED_REASONS, RESUME_CALL_LIVE_REASONS, RESUME_CALL_FAILED_REASONS, } from "@automatalabs/workflow-engine";
|
|
20
20
|
// ── Isolation mode: deterministic substitution testing over a recorded run. The SDK
|
|
21
21
|
// wrapper defaults the live target runner to ACP and owns that runner's disposal. ──
|
|
22
22
|
export { runIsolation, createReplayRunner } from "./isolation.js";
|
package/dist/mcp-server.js
CHANGED
|
@@ -30645,10 +30645,11 @@ import { createRequire } from "node:module";
|
|
|
30645
30645
|
import {
|
|
30646
30646
|
buildModelFilter,
|
|
30647
30647
|
parseWorkflowScript,
|
|
30648
|
-
probeHarnessConfig,
|
|
30648
|
+
probeHarnessConfig as probeHarnessConfig2,
|
|
30649
30649
|
redactText as redactText2,
|
|
30650
30650
|
validateWorkflowScript,
|
|
30651
30651
|
truncateUtf8 as truncateUtf83,
|
|
30652
|
+
workflowMayUseDefaultModel,
|
|
30652
30653
|
WorkflowError,
|
|
30653
30654
|
WorkflowErrorCode,
|
|
30654
30655
|
WorkflowManager as WorkflowManager3
|
|
@@ -30826,6 +30827,128 @@ function clampWorkflowInput(input) {
|
|
|
30826
30827
|
};
|
|
30827
30828
|
}
|
|
30828
30829
|
|
|
30830
|
+
// ../mcp-server/src/default-backend.ts
|
|
30831
|
+
import {
|
|
30832
|
+
probeHarnessConfig
|
|
30833
|
+
} from "@automatalabs/workflows";
|
|
30834
|
+
var DEFAULT_BACKEND_ENV = "AGENTPRISM_DEFAULT_BACKEND";
|
|
30835
|
+
var BUILTIN_BACKENDS = /* @__PURE__ */ new Set(["claude", "codex", "opencode", "pi"]);
|
|
30836
|
+
var NoAutoDefaultBackendError = class extends Error {
|
|
30837
|
+
constructor(candidates) {
|
|
30838
|
+
super(
|
|
30839
|
+
[
|
|
30840
|
+
"No usable default ACP backend was found for workflow agent() calls that omit model/tier.",
|
|
30841
|
+
...candidates.map((candidate) => `- ${candidate.backendId}: ${candidate.reason}`),
|
|
30842
|
+
`Authenticate or install a backend, set ${DEFAULT_BACKEND_ENV} explicitly, or pin model on each agent() call.`
|
|
30843
|
+
].join("\n")
|
|
30844
|
+
);
|
|
30845
|
+
this.candidates = candidates;
|
|
30846
|
+
this.name = "NoAutoDefaultBackendError";
|
|
30847
|
+
}
|
|
30848
|
+
candidates;
|
|
30849
|
+
};
|
|
30850
|
+
function workflowNeedsPinnedDefault(report) {
|
|
30851
|
+
return report.dryRun?.agentCalls.some((call) => call.model === void 0 && call.tier === void 0) === true;
|
|
30852
|
+
}
|
|
30853
|
+
function recordedDefaultModel(source) {
|
|
30854
|
+
if (!source) return void 0;
|
|
30855
|
+
if (typeof source.defaultModel === "string" && source.defaultModel.trim() !== "") return source.defaultModel;
|
|
30856
|
+
const backends = new Set(
|
|
30857
|
+
(source.calls ?? []).filter((call) => call.kind === "agent" && call.modelRequested === void 0 && call.backendId).map((call) => call.backendId)
|
|
30858
|
+
);
|
|
30859
|
+
return backends.size === 1 ? [...backends][0] : void 0;
|
|
30860
|
+
}
|
|
30861
|
+
function modelCatalogState(harness) {
|
|
30862
|
+
const option = (harness.options ?? []).find(
|
|
30863
|
+
(candidate) => candidate.id === "model" && candidate.type === "select"
|
|
30864
|
+
);
|
|
30865
|
+
if (!option || option.type !== "select") return "absent";
|
|
30866
|
+
const current = typeof option.currentValue === "string" ? option.currentValue.trim() : "";
|
|
30867
|
+
return current !== "" || option.options.length > 0 ? "usable" : "empty";
|
|
30868
|
+
}
|
|
30869
|
+
function classifyAutoDefaultCandidates(report, customBackendIds = []) {
|
|
30870
|
+
const customs = new Set(customBackendIds.map((id) => id.toLowerCase()));
|
|
30871
|
+
return report.harnessOptions.map((harness) => {
|
|
30872
|
+
const backendId = harness.backendId.toLowerCase();
|
|
30873
|
+
if (!harness.probed) {
|
|
30874
|
+
return {
|
|
30875
|
+
backendId: harness.backendId,
|
|
30876
|
+
status: "unavailable",
|
|
30877
|
+
reason: `probe failed${harness.error ? ` \u2014 ${harness.error}` : ""}`
|
|
30878
|
+
};
|
|
30879
|
+
}
|
|
30880
|
+
const builtIn = BUILTIN_BACKENDS.has(backendId) && !customs.has(backendId);
|
|
30881
|
+
const catalog = modelCatalogState(harness);
|
|
30882
|
+
if (builtIn && catalog === "empty") {
|
|
30883
|
+
return {
|
|
30884
|
+
backendId: harness.backendId,
|
|
30885
|
+
status: "unavailable",
|
|
30886
|
+
reason: "session opened but the built-in advertised no usable default or selectable model"
|
|
30887
|
+
};
|
|
30888
|
+
}
|
|
30889
|
+
if (builtIn && backendId === "codex") {
|
|
30890
|
+
return {
|
|
30891
|
+
backendId: harness.backendId,
|
|
30892
|
+
status: "ready",
|
|
30893
|
+
readiness: "ready",
|
|
30894
|
+
reason: "session/config probe succeeded and Codex checks authorization during session creation"
|
|
30895
|
+
};
|
|
30896
|
+
}
|
|
30897
|
+
if (builtIn && backendId === "pi" && catalog === "usable") {
|
|
30898
|
+
return {
|
|
30899
|
+
backendId: harness.backendId,
|
|
30900
|
+
status: "ready",
|
|
30901
|
+
readiness: "ready",
|
|
30902
|
+
reason: "session/config probe succeeded with Pi's credential-filtered model catalog"
|
|
30903
|
+
};
|
|
30904
|
+
}
|
|
30905
|
+
return {
|
|
30906
|
+
backendId: harness.backendId,
|
|
30907
|
+
status: "unknown",
|
|
30908
|
+
readiness: "unknown",
|
|
30909
|
+
reason: "session/config probe succeeded; zero-token authentication readiness is not universally observable"
|
|
30910
|
+
};
|
|
30911
|
+
});
|
|
30912
|
+
}
|
|
30913
|
+
function selectAutoDefaultBackend(report, customBackendIds = []) {
|
|
30914
|
+
const candidates = classifyAutoDefaultCandidates(report, customBackendIds);
|
|
30915
|
+
const selected = candidates.find((candidate) => candidate.status === "ready") ?? candidates.find((candidate) => candidate.status === "unknown");
|
|
30916
|
+
if (!selected || selected.status === "unavailable") throw new NoAutoDefaultBackendError(candidates);
|
|
30917
|
+
return { backendId: selected.backendId, readiness: selected.readiness, reason: selected.reason };
|
|
30918
|
+
}
|
|
30919
|
+
async function discoverProjectDefaultBackend(context, probeRunner, timeoutMs = 6e4) {
|
|
30920
|
+
if (context.autoDefaultBackend) return context.autoDefaultBackend;
|
|
30921
|
+
if (context.autoDefaultBackendPending) return context.autoDefaultBackendPending;
|
|
30922
|
+
const backendIds = [...new Set(probeRunner.listBackends?.() ?? [])];
|
|
30923
|
+
if (backendIds.length === 0) throw new NoAutoDefaultBackendError([]);
|
|
30924
|
+
const pending = Promise.all(
|
|
30925
|
+
backendIds.map(
|
|
30926
|
+
(backendId) => probeHarnessConfig({
|
|
30927
|
+
harnesses: [backendId],
|
|
30928
|
+
cwd: context.projectDir,
|
|
30929
|
+
timeoutMs,
|
|
30930
|
+
probeRunner
|
|
30931
|
+
})
|
|
30932
|
+
)
|
|
30933
|
+
).then((reports) => {
|
|
30934
|
+
const harnessOptions = reports.flatMap((report2) => report2.harnessOptions);
|
|
30935
|
+
const report = {
|
|
30936
|
+
ok: harnessOptions.every((harness) => harness.probed),
|
|
30937
|
+
exitCode: harnessOptions.every((harness) => harness.probed) ? 0 : 1,
|
|
30938
|
+
harnessOptions
|
|
30939
|
+
};
|
|
30940
|
+
const selected = selectAutoDefaultBackend(report, probeRunner.listCustomBackends?.() ?? []);
|
|
30941
|
+
context.autoDefaultBackend = selected;
|
|
30942
|
+
return selected;
|
|
30943
|
+
});
|
|
30944
|
+
context.autoDefaultBackendPending = pending;
|
|
30945
|
+
try {
|
|
30946
|
+
return await pending;
|
|
30947
|
+
} finally {
|
|
30948
|
+
context.autoDefaultBackendPending = void 0;
|
|
30949
|
+
}
|
|
30950
|
+
}
|
|
30951
|
+
|
|
30829
30952
|
// ../mcp-server/src/project-registry.ts
|
|
30830
30953
|
import { existsSync as existsSync2, readdirSync, readFileSync, realpathSync, statSync } from "node:fs";
|
|
30831
30954
|
import { isAbsolute as isAbsolute2, join } from "node:path";
|
|
@@ -32142,9 +32265,9 @@ var AUTHORING_DOC_TOPICS = [
|
|
|
32142
32265
|
"workflow/run-lifecycle",
|
|
32143
32266
|
"workflow/examples"
|
|
32144
32267
|
],
|
|
32145
|
-
"bytes":
|
|
32146
|
-
"sha256": "
|
|
32147
|
-
"text": '# Workflow scripts: quickstart\n\n**Context:** JavaScript passed to the MCP `workflow` tool. This is not REPL code: workflow scripts use `agent(prompt, options?)`, allow top-level `return`, and start from a required metadata export.\n\nA workflow script is a deterministic orchestrator. Script code owns loops, fan-out, conditionals, aggregation, and checkpoints; `agent()` workers perform repository or research tasks. Workers start fresh sessions and do not share memory, so interpolate every prior result a later worker needs into its prompt.\n\n## Minimal valid script\n\n```js\nexport const meta = {\n name: "review-target",\n description: "Review a target and return concrete findings",\n phases: [{ title: "Review" }],\n};\n\nphase("Review");\nconst report = await agent(\n `Review ${args.target}. Read the relevant files and report concrete findings.`,\n { label: "review" },\n);\nreturn { report };\n```\n\nThe metadata export must be the first statement and a pure object literal. `name` and `description` are required non-empty strings. `phases`, when present, is an array of objects shaped `{ title: string, detail?: string, model?: string }`, never strings.\n\nSubmit the source without Markdown fences using the `workflow` tool\'s run form, with an absolute `projectDir` on the shared daemon. `args` is the JSON value supplied by the tool call. Some hosts may carry caller data as a JSON string, so harden scripts that accept external input:\n\n```js\nconst raw = typeof args === "string" ? (() => {\n try { return JSON.parse(args); } catch { return {}; }\n})() : args;\nconst input = raw && typeof raw === "object" && !Array.isArray(raw) ? raw : {};\n```\n\n## Core rules\n\n- The DSL primitives are injected globals; do not import them.\n- Top-level `await` and top-level `return` are supported.\n- Scripts are JavaScript, not TypeScript.\n- No `require`, imports, filesystem API, network API, timers, `Date.now()`, `Math.random()`, or no-argument `Date` construction. Pass nondeterministic values through `args`.\n- Every `agent()` call should have a stable descriptive `label`.\n- A recoverable worker failure resolves to `null` after retries. Null-check load-bearing results.\n- `parallel()` takes thunks, not already-started promises:\n\n```js\nconst results = (await parallel([\n () => agent("Review correctness", { label: "review:correctness" }),\n () => agent("Review test coverage", { label: "review:coverage" }),\n])).filter(Boolean);\n```\n\n- Use a plain JSON Schema object in `schema` when script control flow depends on a worker result.\n- Return a compact JSON-serializable result; do not return a transcript.\n\n## Model selection\n\nOmit `model` for the server default, or use a backend-only value such as `"codex"` to retain that backend\'s configured default model. Before pinning a model id, `mode`, or `configOptions`, call `workflow` with `action:"config"`. After choosing a model, use `modelSpecs` to read that exact model\'s option domain. Set `mode` only when that selected harness entry\'s `modes.availableModes` explicitly lists the exact id; `modes:null` means the backend/model supports no modes, so omit `mode`. Never infer a generic `"default"` and never guess model or option ids.\n\n## Validation and execution\n\nEvery run is statically parsed, mock-executed, and checked against no-prompt backend configuration before admission. A rejection creates no run ID, reserves no background slot, and spends no tokens. Read the diagnostic, correct the script, and submit it again.\n\nUse foreground execution for short work. Use `background:true` for work that may outlive one tool request; retain the returned `runId`, then use bounded `await`, `inspect`, or `stop` calls.\n\n## What to read next\n\n- `workflow/composition-and-failure` \u2014 metadata, fan-out, phases, and null semantics.\n- `workflow/api-agents` \u2014 every `agent()` option and structured output.\n- `workflow/run-lifecycle` \u2014 config, run, await, inspect, stop, and resume.\n- `workflow/examples` \u2014 complete composition patterns.\n'
|
|
32268
|
+
"bytes": 4233,
|
|
32269
|
+
"sha256": "42ce5da7c5f57960b4cee8e0901c5ae6542a77a17dc5c0e4db8b97cf72544130",
|
|
32270
|
+
"text": '# Workflow scripts: quickstart\n\n**Context:** JavaScript passed to the MCP `workflow` tool. This is not REPL code: workflow scripts use `agent(prompt, options?)`, allow top-level `return`, and start from a required metadata export.\n\nA workflow script is a deterministic orchestrator. Script code owns loops, fan-out, conditionals, aggregation, and checkpoints; `agent()` workers perform repository or research tasks. Workers start fresh sessions and do not share memory, so interpolate every prior result a later worker needs into its prompt.\n\n## Minimal valid script\n\n```js\nexport const meta = {\n name: "review-target",\n description: "Review a target and return concrete findings",\n phases: [{ title: "Review" }],\n};\n\nphase("Review");\nconst report = await agent(\n `Review ${args.target}. Read the relevant files and report concrete findings.`,\n { label: "review" },\n);\nreturn { report };\n```\n\nThe metadata export must be the first statement and a pure object literal. `name` and `description` are required non-empty strings. `phases`, when present, is an array of objects shaped `{ title: string, detail?: string, model?: string }`, never strings.\n\nSubmit the source without Markdown fences using the `workflow` tool\'s run form, with an absolute `projectDir` on the shared daemon. `args` is the JSON value supplied by the tool call. Some hosts may carry caller data as a JSON string, so harden scripts that accept external input:\n\n```js\nconst raw = typeof args === "string" ? (() => {\n try { return JSON.parse(args); } catch { return {}; }\n})() : args;\nconst input = raw && typeof raw === "object" && !Array.isArray(raw) ? raw : {};\n```\n\n## Core rules\n\n- The DSL primitives are injected globals; do not import them.\n- Top-level `await` and top-level `return` are supported.\n- Scripts are JavaScript, not TypeScript.\n- No `require`, imports, filesystem API, network API, timers, `Date.now()`, `Math.random()`, or no-argument `Date` construction. Pass nondeterministic values through `args`.\n- Every `agent()` call should have a stable descriptive `label`.\n- A recoverable worker failure resolves to `null` after retries. Null-check load-bearing results.\n- `parallel()` takes thunks, not already-started promises:\n\n```js\nconst results = (await parallel([\n () => agent("Review correctness", { label: "review:correctness" }),\n () => agent("Review test coverage", { label: "review:coverage" }),\n])).filter(Boolean);\n```\n\n- Use a plain JSON Schema object in `schema` when script control flow depends on a worker result.\n- Return a compact JSON-serializable result; do not return a transcript.\n\n## Model selection\n\nOmit `model` for the server default, or use a backend-only value such as `"codex"` to retain that backend\'s configured default model. When `AGENTPRISM_DEFAULT_BACKEND` is truly unset, the MCP server probes backend readiness without prompting, pins one project default before validation/execution, and keeps that backend for the run and resume; an explicit environment default always wins. Before pinning a model id, `mode`, or `configOptions`, call `workflow` with `action:"config"`. After choosing a model, use `modelSpecs` to read that exact model\'s option domain. Set `mode` only when that selected harness entry\'s `modes.availableModes` explicitly lists the exact id; `modes:null` means the backend/model supports no modes, so omit `mode`. Never infer a generic `"default"` and never guess model or option ids.\n\n## Validation and execution\n\nEvery run is statically parsed, mock-executed, and checked against no-prompt backend configuration before admission. A rejection creates no run ID, reserves no background slot, and spends no tokens. Read the diagnostic, correct the script, and submit it again.\n\nUse foreground execution for short work. Use `background:true` for work that may outlive one tool request; retain the returned `runId`, then use bounded `await`, `inspect`, or `stop` calls.\n\n## What to read next\n\n- `workflow/composition-and-failure` \u2014 metadata, fan-out, phases, and null semantics.\n- `workflow/api-agents` \u2014 every `agent()` option and structured output.\n- `workflow/run-lifecycle` \u2014 config, run, await, inspect, stop, and resume.\n- `workflow/examples` \u2014 complete composition patterns.\n'
|
|
32148
32271
|
},
|
|
32149
32272
|
{
|
|
32150
32273
|
"id": "workflow/run-lifecycle",
|
|
@@ -32172,9 +32295,9 @@ var AUTHORING_DOC_TOPICS = [
|
|
|
32172
32295
|
"workflow/environment-and-tools",
|
|
32173
32296
|
"workflow/run-lifecycle"
|
|
32174
32297
|
],
|
|
32175
|
-
"bytes":
|
|
32176
|
-
"sha256": "
|
|
32177
|
-
"text": '## Choosing the agent for each call\n\n**Context:** JavaScript passed to the MCP `workflow` tool. Workflow scripts use `agent(prompt, options?)`; REPL evals use a different API.\n\nThe backend is selected **per `agent()` call** from its effective `model` string. One script can plan on one vendor\'s agent, implement on another\'s, and review on a third\'s, handing structured results between them.\n\nThe built-in names (`claude`, `codex`, `opencode`, `pi`) come from the runtime backend registry. Registered custom names extend that set.\n\n- **Omit `model` entirely** for maximum portability
|
|
32298
|
+
"bytes": 9604,
|
|
32299
|
+
"sha256": "21ea6e619a1e0220c60cba74f8323fb5ae00db29b06fe2858d27e750d80c5795",
|
|
32300
|
+
"text": '## Choosing the agent for each call\n\n**Context:** JavaScript passed to the MCP `workflow` tool. Workflow scripts use `agent(prompt, options?)`; REPL evals use a different API.\n\nThe backend is selected **per `agent()` call** from its effective `model` string. One script can plan on one vendor\'s agent, implement on another\'s, and review on a third\'s, handing structured results between them.\n\nThe built-in names (`claude`, `codex`, `opencode`, `pi`) come from the runtime backend registry. Registered custom names extend that set.\n\n- **Omit `model` entirely** for maximum portability. In the MCP server, an explicitly present `AGENTPRISM_DEFAULT_BACKEND` wins; when it is truly unset, the first model-less run for a project performs zero-token backend readiness probes, pins one effective backend before validation/execution, and reuses that pin for the run and resume. The SDK runner itself retains its configured default (`AGENTPRISM_DEFAULT_BACKEND`, historical fallback Claude). A script with no model specs remains backend-portable.\n- **Route by one registered first segment.** Split on the first `/`; ASCII-case-insensitive `claude`, `codex`, `opencode`, `pi`, or a registered custom backend name selects that harness and is stripped exactly once. A custom registration wins on a built-in-name collision.\n- **Use a backend name alone** (`claude`, `codex`, `opencode`, `pi`, or a custom name) to preserve the harness\'s configured default model. No model config call is made.\n- **Everything else goes intact to the default backend.** `anthropic/\u2026`, `openai/\u2026`, bare `opus`, and bare `gpt-\u2026` are not routing aliases. When an id remains after routing, it is sent byte-for-byte: no catalog matching, case folding, bracket parsing, effort/Fast option driving, retry, or fallback. Harness rejection is an agent error.\n- **`tier`** (`"small" | "medium" | "big"`) is a coarse alternative resolved from the host\'s tier config \u2014 use it for "a cheap model" without naming a vendor.\n\nThe published examples use ids verified against live harness catalogs: `claude/opus[1m]`, `codex/gpt-5.6-sol`, and `opencode/zai/glm-5.2`. For Pi, `pi/openrouter/vendor/model-id` strips only `pi/`; Pi then splits provider `openrouter` from model id `vendor/model-id`. Prefer backend-only forms when the desired model is configured inside the harness.\n\nNever guess model ids, mode ids, effort values, or option names from memory. With MCP, call the `workflow` tool using `action:"config"` and optional `harnesses` / `modelFilter`; it returns the live catalog without starting a workflow.\n\nOne no-prompt session per harness, zero tokens: each successful harness entry contains `modes` plus its config-option catalog. A non-null `modes` object carries `currentModeId` and `availableModes`; only those exact advertised ids are valid. `modes:null` explicitly means that backend/model supports no ACP session modes, so omit `mode`\u2014absence never licenses an invented generic `"default"`. Config options list model ids (including bracket variants like `opus[1m]`), effort levels, and every other negotiable option exactly as the installed harness advertises them. `probed:true` means session/config discovery succeeded, **not** that every backend has proven it can authenticate a first prompt: ACP has no universal zero-token auth-status method, and some agents defer that check. Automatic MCP default selection treats failed probes and explicitly empty built-in model catalogs as unavailable, prefers stronger session-open evidence (Codex authorization; Pi\'s credential-filtered catalog), then falls back to the first session-ready backend whose prompt readiness is unknown. One additional caveat: the bare `config` probe reads each harness with its **default model** selected, and option domains are **model-specific**. An option can appear only after a particular model is selected. Ceilings differ per model. Provider-served variants of the same model can advertise different domains. The authoritative per-model probe is the validator run on your real script: it selects each authored model spec first and echoes that pair\'s advertised modes and options. Confirm every pinned value against its own echoed entry; do not read package internals to discover options.\n\n```js\nconst plan = await agent(PLAN_PROMPT, { label: "plan", model: "opencode/zai/glm-5.2", schema: PLAN });\nconst impl = await agent(implPrompt(plan), { label: "implement", model: "codex/gpt-5.6-sol" });\nconst review = await agent(reviewPrompt(impl), { label: "review", model: "claude/opus[1m]", schema: REVIEW });\n```\n\nUse `configOptions` only for exact ACP session options advertised by that routed harness. With MCP, read the selected harness\'s `action:"config"` result before choosing ids or select values; catalogs vary by harness version, login, and machine.\n\n```js\nconst impl = await agent(implPrompt(plan), {\n label: "implement",\n model: "codex",\n configOptions: { "fast-mode": true, reasoning_effort: "high" },\n});\n```\n\nIds and string/boolean values pass through verbatim in ascending id order, after model selection and before the prompt. There are no aliases, coercion, client-side vocabulary, defaults, or cached catalogs. Copy option ids character-for-character from the catalog, punctuation included \u2014 `"fast-mode"`, not `fast_mode` \u2014 and quote ids that are not valid identifiers. Never put `"model"` in `configOptions`; use the dedicated `model` field. A harness rejection follows the ordinary agent-error path.\n\nPi\'s thought-level option is named `thinkingLevel`, and its choices depend on the exact model in the same call:\n\n```js\nconst review = await agent(REVIEW_PROMPT, {\n label: "pi-review",\n model: "pi/openrouter/vendor/model-id",\n configOptions: { thinkingLevel: "high" },\n});\n```\n\nValidation selects `openrouter/vendor/model-id` before reading Pi\'s choices. A listed value passes unchanged. A recognized value above an ordered model\'s ceiling, or in a model-specific gap, passes with a warning that names the effective clamp target. Pi advertises its SDK-derived domain directly. Claude and Codex are also ordered: when their options omit domain metadata, validation enumerates the advertised models and merges their per-model effort orders. A Claude model without an `effort` option does not support effort, and `default` never becomes a ceiling target. OpenCode and custom backends have no declared value order, so validation is exact-set. An unrecognized or unadvertised value fails with exit code `2`. Enumeration stops at 32 advertised models; a larger or inconsistently ordered catalog warns and falls back to exact advertised-value validation.\n\n**The harness is authoritative.** The client never substitutes a nearby model or silently falls back. A rejected id follows the existing agent-error path; a harness that accepts or ignores it determines the outcome. The public `fallbacks`/`onModelFallback` fields remain for compatibility but model resolution does not emit them.\n\n## Structured output\n\nPass `schema` \u2014 a **plain JSON Schema object literal** (no schema builders exist inside the realm) \u2014 and the call resolves to a **validated object** instead of text:\n\n```js\nconst FINDINGS = {\n type: "object",\n additionalProperties: false,\n required: ["findings"],\n properties: {\n findings: {\n type: "array",\n items: {\n type: "object",\n additionalProperties: false,\n required: ["file", "line", "summary"],\n properties: {\n file: { type: "string", description: "Repo-relative path \u2014 copy it exactly, never invent one" },\n line: { type: "number", description: "1-indexed line the finding anchors to" },\n summary: { type: "string", description: "One sentence stating the defect, grounded in code you actually read" },\n },\n },\n },\n },\n};\n\nconst report = await agent("Review the diff on this branch for correctness bugs.", {\n label: "review", schema: FINDINGS,\n});\nreport.findings.forEach((f) => log(`${f.file}:${f.line} ${f.summary}`));\n```\n\nThe same schema works on **every** backend; only the fulfillment channel differs, and the runner picks it for you: Claude uses its `outputFormat`, Codex its strict `outputSchema`, while Pi, OpenCode, and eligible custom ACP agents receive a client-hosted `StructuredOutput` MCP tool when they advertise HTTP MCP support. Pi accepts stdio, Streamable HTTP, and SSE MCP servers. If no valid tool capture exists, Pi retains the runner\'s common prompt-embedded schema and validated final-text JSON fallback. In every channel the runner validates the value client-side (with type coercion) and re-prompts a bounded number of times before failing the call with non-recoverable `SCHEMA_NONCOMPLIANCE`.\n\nSchema authoring rules that keep all channels healthy:\n\n- Root must be an object; set `additionalProperties: false` and list every property in `required`.\n- Put a `description` on every field \u2014 descriptions are the per-field prompt.\n- Keep schemas structurally simple. Exotic keywords (`oneOf`, `patternProperties`, unusual `format`s, backreference regexes) are normalized or stripped on the wire for some backends \u2014 validation still enforces them client-side, which shows up as re-prompt churn. Prefer `anyOf`, `enum`, and plain types.\n- Keep free-text fields small (tens of lines). An oversized structured output can exhaust schema repair and fail the call.\n- Validation checks structure, not truth. Check load-bearing values in script code (for example, reject findings whose `file` is not in a known file list) before spending more agents on them.\n'
|
|
32178
32301
|
},
|
|
32179
32302
|
{
|
|
32180
32303
|
"id": "workflow/composition-and-failure",
|
|
@@ -32247,9 +32370,9 @@ var AUTHORING_DOC_TOPICS = [
|
|
|
32247
32370
|
"workflow/environment-and-tools",
|
|
32248
32371
|
"workflow/api-control-flow"
|
|
32249
32372
|
],
|
|
32250
|
-
"bytes":
|
|
32251
|
-
"sha256": "
|
|
32252
|
-
"text": '# Workflow agent API reference\n\n**Context:** JavaScript passed to the MCP `workflow` tool. Workflow scripts use `agent(prompt, options?)`; REPL evals use a different API.\n\n## `agent(prompt, options?)` \u2014 full option table\n\nReturns the agent\'s final assistant text, or the schema-validated object when `schema` is set. Resolves to `null` when a *recoverable* failure survives all retries.\n\n| option | type | meaning |\n|---|---|---|\n| `label` | `string` | Display/telemetry name; also stamped on every live ACP event for this call. Always set it. Not part of the resume hash. |\n| `phase` | `string` | Assign this call to a phase explicitly (needed inside concurrent stages where the global `phase()` state would race). |\n| `schema` | JSON Schema object | Structured output. Plain object literal only \u2014 no schema builders exist in the realm. Part of the resume hash. |\n| `model` | `string` | Model spec: optional registered harness prefix plus a verbatim id, or a backend-only name. See [Model specs & routing](#model-specs--routing). Part of the resume hash. |\n| `tier` | `"small" \\| "medium" \\| "big"` | Coarse tier resolved from host config; beats phase/meta model, loses to explicit `model`. Part of the resume hash. |\n| `mode` | `string` | ACP session mode id advertised by the selected backend/model. **Strict**: unsupported/unadvertised ids fail before prompting (and automatic workflow preflight rejects them before admission). Read the selected `action:"config"` entry\'s `modes.availableModes` and copy only an exact id; `modes:null` means omit this field. Never infer a generic `"default"`. Part of the resume hash when set. |\n| `configOptions` | `Record<string, string \\| boolean>` | Exact ACP session option ids and authored values. Applied in ascending id order after model and before the prompt, with no aliases or coercion. `"model"` is reserved for the dedicated `model` field. Part of the resume hash only when non-empty, with sorted keys. With MCP, read the advertised-options table from `workflow` action `config` before choosing values. |\n| `agentType` | `string` | Bind a named subagent definition (tools allow/deny, model, isolation, role prompt). See [agentType definitions](#agenttype-definitions). Part of the resume hash. |\n| `isolation` | `"worktree"` | Run in a throwaway git worktree branched from the run cwd. **Always removed (worktree + branch) when the call ends** \u2014 edits are discarded; return work as data. Degrades to the shared tree outside a git repo (logged). |\n| `resume` | `{ filesystem: "read-only" }` | Deprecated compatibility annotation. It is recorded as legacy diagnostic provenance, is not sent to the runner or hashed, and has no effect on replay. New scripts should omit it. |\n| `cwd` | `string` | Per-session working directory; relative resolves against the run\'s base cwd. Overridden by worktree isolation. Not hashed. |\n| `timeoutMs` | `number \\| null` | Total wall-clock cap for each attempt. A finite value may tighten a finite host `agentTimeoutMs` ceiling but cannot raise or disable it. With no host ceiling, a finite value applies and `null`/omitted is uncapped. |\n| `retries` | `number` | Retries after *recoverable* failures (default 0, host-overridable). Exhausted retries \u21D2 the call resolves `null`. |\n| `mcpServers` | `McpServerConfig[]` | MCP servers attached to this session. Stdio shape: `{ name, command, args: [], env: [{ name, value }] }` (`args`/`env` required, `env` is name/value pairs, not a map); `{ type: "http" \\| "sse", name, url, headers: [] }` also accepted. Not hashed. |\n| `images` | `PromptImage[]` | Base64 image blocks appended to the prompt; backends without image support get a bracketed text note. Not hashed. |\n| `meta` | `object` | ACP `_meta` merged into `session/new` \u2014 session-scoped extension passthrough (pairs with custom backends). Not hashed. |\n| `promptMeta` | `object` | ACP `_meta` merged into `session/prompt` \u2014 turn-scoped passthrough. Backend-computed keys win on conflict. Not hashed. |\n| `keepSession` | `boolean` | Skip release-time best-effort `session/close`; the non-secret re-attach record lands in `WorkflowRunResult.agentSessions` for host-side `loadSession()` / `resumeSession()`. Usage/auth pause failures are kept open automatically for managed continuation. Not identity-hashed; included in the input fingerprint. |\n\nThe timeout clock measures the whole attempt, including backend startup, model/config setup, tool\nwork, and streamed output; it is not an idle timer. Each retry starts a fresh clock, so the maximum\ntimeout envelope is `(retries + 1) \xD7 resolved timeoutMs` (retries are clamped to 3). An exhausted\ntimeout is recoverable `AGENT_TIMEOUT`: the call resolves to `null`, releases its concurrency slot,\nand asks the ACP session to cancel. A session that keeps running after the cancellation grace is\nclosed where supported and its pooled child is recycled.\n\nEvery new run, including one admitted with `resumeFromRunId`, resolves host limits from that run\'s\nrequest. It does not inherit `agentTimeoutMs`, retries, concurrency, or agent-count values from\nits source, so pass every operational bound the resumed execution should use.\n\n## Model specs & routing\n\nA `model` string is resolved solely from its first segment, then delegated to the harness:\n\n| spec shape | routes to | notes |\n|---|---|---|\n| *(omitted)* | host
|
|
32373
|
+
"bytes": 8551,
|
|
32374
|
+
"sha256": "84d2cb5639a385074b815fa8e13214138d1d59fa3f7fd34f206e4f9ce19d37d0",
|
|
32375
|
+
"text": '# Workflow agent API reference\n\n**Context:** JavaScript passed to the MCP `workflow` tool. Workflow scripts use `agent(prompt, options?)`; REPL evals use a different API.\n\n## `agent(prompt, options?)` \u2014 full option table\n\nReturns the agent\'s final assistant text, or the schema-validated object when `schema` is set. Resolves to `null` when a *recoverable* failure survives all retries.\n\n| option | type | meaning |\n|---|---|---|\n| `label` | `string` | Display/telemetry name; also stamped on every live ACP event for this call. Always set it. Not part of the resume hash. |\n| `phase` | `string` | Assign this call to a phase explicitly (needed inside concurrent stages where the global `phase()` state would race). |\n| `schema` | JSON Schema object | Structured output. Plain object literal only \u2014 no schema builders exist in the realm. Part of the resume hash. |\n| `model` | `string` | Model spec: optional registered harness prefix plus a verbatim id, or a backend-only name. See [Model specs & routing](#model-specs--routing). Part of the resume hash. |\n| `tier` | `"small" \\| "medium" \\| "big"` | Coarse tier resolved from host config; beats phase/meta model, loses to explicit `model`. Part of the resume hash. |\n| `mode` | `string` | ACP session mode id advertised by the selected backend/model. **Strict**: unsupported/unadvertised ids fail before prompting (and automatic workflow preflight rejects them before admission). Read the selected `action:"config"` entry\'s `modes.availableModes` and copy only an exact id; `modes:null` means omit this field. Never infer a generic `"default"`. Part of the resume hash when set. |\n| `configOptions` | `Record<string, string \\| boolean>` | Exact ACP session option ids and authored values. Applied in ascending id order after model and before the prompt, with no aliases or coercion. `"model"` is reserved for the dedicated `model` field. Part of the resume hash only when non-empty, with sorted keys. With MCP, read the advertised-options table from `workflow` action `config` before choosing values. |\n| `agentType` | `string` | Bind a named subagent definition (tools allow/deny, model, isolation, role prompt). See [agentType definitions](#agenttype-definitions). Part of the resume hash. |\n| `isolation` | `"worktree"` | Run in a throwaway git worktree branched from the run cwd. **Always removed (worktree + branch) when the call ends** \u2014 edits are discarded; return work as data. Degrades to the shared tree outside a git repo (logged). |\n| `resume` | `{ filesystem: "read-only" }` | Deprecated compatibility annotation. It is recorded as legacy diagnostic provenance, is not sent to the runner or hashed, and has no effect on replay. New scripts should omit it. |\n| `cwd` | `string` | Per-session working directory; relative resolves against the run\'s base cwd. Overridden by worktree isolation. Not hashed. |\n| `timeoutMs` | `number \\| null` | Total wall-clock cap for each attempt. A finite value may tighten a finite host `agentTimeoutMs` ceiling but cannot raise or disable it. With no host ceiling, a finite value applies and `null`/omitted is uncapped. |\n| `retries` | `number` | Retries after *recoverable* failures (default 0, host-overridable). Exhausted retries \u21D2 the call resolves `null`. |\n| `mcpServers` | `McpServerConfig[]` | MCP servers attached to this session. Stdio shape: `{ name, command, args: [], env: [{ name, value }] }` (`args`/`env` required, `env` is name/value pairs, not a map); `{ type: "http" \\| "sse", name, url, headers: [] }` also accepted. Not hashed. |\n| `images` | `PromptImage[]` | Base64 image blocks appended to the prompt; backends without image support get a bracketed text note. Not hashed. |\n| `meta` | `object` | ACP `_meta` merged into `session/new` \u2014 session-scoped extension passthrough (pairs with custom backends). Not hashed. |\n| `promptMeta` | `object` | ACP `_meta` merged into `session/prompt` \u2014 turn-scoped passthrough. Backend-computed keys win on conflict. Not hashed. |\n| `keepSession` | `boolean` | Skip release-time best-effort `session/close`; the non-secret re-attach record lands in `WorkflowRunResult.agentSessions` for host-side `loadSession()` / `resumeSession()`. Usage/auth pause failures are kept open automatically for managed continuation. Not identity-hashed; included in the input fingerprint. |\n\nThe timeout clock measures the whole attempt, including backend startup, model/config setup, tool\nwork, and streamed output; it is not an idle timer. Each retry starts a fresh clock, so the maximum\ntimeout envelope is `(retries + 1) \xD7 resolved timeoutMs` (retries are clamped to 3). An exhausted\ntimeout is recoverable `AGENT_TIMEOUT`: the call resolves to `null`, releases its concurrency slot,\nand asks the ACP session to cancel. A session that keeps running after the cancellation grace is\nclosed where supported and its pooled child is recycled.\n\nEvery new run, including one admitted with `resumeFromRunId`, resolves host limits from that run\'s\nrequest. It does not inherit `agentTimeoutMs`, retries, concurrency, or agent-count values from\nits source, so pass every operational bound the resumed execution should use.\n\n## Model specs & routing\n\nA `model` string is resolved solely from its first segment, then delegated to the harness:\n\n| spec shape | routes to | notes |\n|---|---|---|\n| *(omitted)* | host-pinned/default backend | MCP: explicit `AGENTPRISM_DEFAULT_BACKEND` wins; when truly unset, zero-token readiness discovery pins one project default before validation/execution and preserves it across resume. SDK runner: configured default, historical fallback `claude`. The selected harness keeps its session default model. Most portable. |\n| `claude`, `codex`, `opencode`, `pi`, or `<custom-name>` | that registered harness | Backend-only: no model config call; the harness default remains active. |\n| `claude/<id>`, `codex/<id>`, `opencode/<id>`, `pi/<id>`, or `<custom-name>/<id>` | that registered harness | Match the first segment ASCII-case-insensitively and strip exactly one segment. Custom names take priority on collision. The remaining `<id>` is sent verbatim, including further `/` characters. For Pi, that remainder is its `<provider>/<model-id>` and Pi preserves any further slashes in the model id. |\n| any other string, including `anthropic/\u2026`, `openai/\u2026`, bare `opus`, or bare `gpt-\u2026` | host default backend | The **entire** authored string is sent verbatim; these are not routing aliases. |\n\nSelection is a single `session/set_config_option` with `configId: "model"` and the exact remaining string. There is no catalog matching, case folding, normalization, bracket parsing, nearest-neighbor selection, sibling effort/Fast option driving, retry, or echo verification. Brackets, dots, and provider-style prefixes are ordinary model-id characters.\n\nWhatever the harness returns is the outcome. A rejection follows the existing agent-error path with no resolution-specific code or model fallback event. `onModelFallback` and `WorkflowRunResult.fallbacks` remain public compatibility surfaces; model resolution does not emit entries, while pause recovery emits `kind: "continuation"` reattach/skip notices.\n\n## Structured output channels\n\nOne author API (`schema`), four fulfillment paths \u2014 chosen automatically per backend:\n\n| backend | channel |\n|---|---|\n| Claude | native `outputFormat`, schema normalized to Anthropic\'s structured-outputs subset (e.g. `oneOf` \u2192 `anyOf`; unsupported keywords/formats stripped on the wire) |\n| Codex | native strict `outputSchema` (OpenAI strict subset normalization) |\n| Pi | a client-hosted `StructuredOutput` MCP tool injected when the agent advertises HTTP MCP support; common prompt-embedded schema and validated final-text JSON fallback |\n| OpenCode / custom ACP | a client-hosted **`StructuredOutput` MCP tool** injected into the session when the agent advertises HTTP MCP support (an agent may show it as `structured_output_StructuredOutput`); otherwise prompt-embedded schema + JSON parse of the final message. Custom backends can opt out of tool injection with `structuredOutputTool: false`. |\n\nPi accepts stdio, Streamable HTTP, and SSE MCP servers; ACP-transport MCP hosting remains client-side.\n\nIn every channel the runner coerces + validates client-side and re-prompts a bounded number of times; the final miss fails the call with non-recoverable `SCHEMA_NONCOMPLIANCE`. Constraints stripped from the wire are still enforced client-side \u2014 an exotic schema keyword shows up as re-prompt churn, so keep schemas simple.\n'
|
|
32253
32376
|
},
|
|
32254
32377
|
{
|
|
32255
32378
|
"id": "workflow/api-control-flow",
|
|
@@ -33839,7 +33962,7 @@ var DEFAULT_REQUEST_STATE_CODEC = createRequestStateCodec({
|
|
|
33839
33962
|
bind: (ctx) => ctx.mcpReq.method
|
|
33840
33963
|
});
|
|
33841
33964
|
var require2 = createRequire(import.meta.url);
|
|
33842
|
-
var SERVER_VERSION = true ? "0.
|
|
33965
|
+
var SERVER_VERSION = true ? "0.35.0" : require2("../package.json").version;
|
|
33843
33966
|
var SERVER_INSTRUCTIONS = [
|
|
33844
33967
|
"This server exposes three model-facing tools for authoring and orchestrating multi-agent work. workflow and repl spawn subagents over the same ACP backends \u2014 the registry built-ins Claude, Codex, OpenCode, and pi, plus any registered custom agents \u2014 and key their durable state by an absolute projectDir (required on the shared daemon; defaults to the server's own project in single-project mode). Backend credentials come from each agent's own login (claude, codex, opencode, pi), so there is nothing auth-shaped to configure here.",
|
|
33845
33968
|
'\u2022 docs \u2014 SELECTIVE VERSION-MATCHED REFERENCE. Omit topic or use topic:"index" for the bounded catalog, then read exactly one workflow/* or repl/* topic. It embeds the selected text/markdown resource, runs no code, opens no backend, and needs no projectDir. Use it when the compact tool descriptions do not contain enough syntax or lifecycle detail.',
|
|
@@ -34797,7 +34920,7 @@ function createWorkflowServer(runner, options = {}) {
|
|
|
34797
34920
|
const workflowToolOutputSchema = workflowToolOutputShape;
|
|
34798
34921
|
const workflowToolConfig = {
|
|
34799
34922
|
title: "Discover, validate, run, inspect, await, stop, or narrow-cancel an agent workflow",
|
|
34800
|
-
description: 'Author and operate JavaScript agent workflows through one project-scoped tool. A script\'s first statement must be `export const meta = { name, description, phases? }`. When present, phases must be an array of objects shaped `{ title: string, detail?: string, model?: string }`, never an array of strings. Inside the deterministic script realm use agent(prompt, options?) for one subagent; parallel([thunks]) for a barrier; pipeline(items, ...stages) for streaming stages; checkpoint(prompt, options?) for a human gate; phase(title) and log(message) for progress; and return the final JSON-serializable value. Top-level await is supported. Imports, require, network APIs, Date.now(), and Math.random() are unavailable. Always label agent calls; schema is a plain JSON Schema object for structured results. The only agent option keys are label, phase, model, tier, mode, configOptions, schema, cwd, timeoutMs, retries, isolation:"worktree", resume, agentType, mcpServers, images, meta, promptMeta, and keepSession; unknown keys reject before admission. Every parallel entry must be a thunk: parallel([() => agent(...), () => agent(...)]). For deeper syntax, read docs topic workflow/quickstart and then one related workflow/* topic. Minimal script: `export const meta = { name: "review", description: "Review a target", phases: [{ title: "Review" }] }; phase("Review"); const report = await agent("Review " + args.target, { label: "review" }); return { report };`. Omit model for the server default, or use a backend name alone to preserve that backend\'s configured default. Before choosing a pinned model, mode, or configOptions, call action:"config" with projectDir and optional harnesses/modelFilter; after choosing a model, pass modelSpecs to read its model-specific options. Set mode only when that selected harness entry\'s modes.availableModes explicitly lists the exact id; modes:null means unsupported, so omit mode\u2014never infer a default from an absent value. Config opens no-prompt sessions, spends zero tokens, and starts no workflow. action:"run" automatically performs static validation, a mocked dry run, and routed config checks before admission. Invalid scripts return bounded diagnostics with status:"rejected" and create no run ID, reserve no background slot, and spend no tokens. Run, resume, inspect, await, or stop an admitted workflow through the same tool. The script orchestrates agent() subagents (and optional checkpoint() gates) over registry built-ins\u2014currently Claude, Codex, OpenCode, and pi\u2014ACP backends, plus registered custom agents. Supply exactly one of inline script or absolute scriptPath; path content is read once and snapshotted at admission. ' + (requireProjectDir ? "config and run REQUIRE projectDir (absolute): it is the discovery cwd and selects the project-scoped run store/default execution cwd. " : "run optionally takes projectDir (absolute) to select the project-scoped run store; default is this server's own project. ") + 'inspect/await/stop take only a runId \u2014 it locates its project store automatically. Foreground is the default and streams progress; background:true returns a durable runId for bounded action:"await" calls. run and await honor _meta.progressToken with notifications/progress while they block. Pass resumeFromRunId to execute a new run from a prior journal prefix. In hosts that render MCP Apps, every call of this tool shows a live self-updating run-monitor panel and the panel reports phase starts, pauses, and terminal outcomes on its own \u2014 do NOT poll action:"inspect" to check on a run there; prefer a single bounded action:"await". Use action:"inspect" with a runId when you need machine-readable status data: a safe bounded status, log tail, and attributed call previews. Use action:"stop" to durably abort a live run; add callIndex to cancel only that in-flight agent and keep the run live. labelGlob remains an output filter in both forms. A whole-run stop returns the final run fate; resume is safe immediately, and only agent-session wind-down can remain asynchronous. Every admitted script is readable at workflow://runs/{runId}/script and results include resource links. Background runs are tracked per project, capped at four active/starting runs, and use headless checkpoint semantics; checkpointReplies continue a checkpoint pause in a new run.',
|
|
34923
|
+
description: 'Author and operate JavaScript agent workflows through one project-scoped tool. A script\'s first statement must be `export const meta = { name, description, phases? }`. When present, phases must be an array of objects shaped `{ title: string, detail?: string, model?: string }`, never an array of strings. Inside the deterministic script realm use agent(prompt, options?) for one subagent; parallel([thunks]) for a barrier; pipeline(items, ...stages) for streaming stages; checkpoint(prompt, options?) for a human gate; phase(title) and log(message) for progress; and return the final JSON-serializable value. Top-level await is supported. Imports, require, network APIs, Date.now(), and Math.random() are unavailable. Always label agent calls; schema is a plain JSON Schema object for structured results. The only agent option keys are label, phase, model, tier, mode, configOptions, schema, cwd, timeoutMs, retries, isolation:"worktree", resume, agentType, mcpServers, images, meta, promptMeta, and keepSession; unknown keys reject before admission. Every parallel entry must be a thunk: parallel([() => agent(...), () => agent(...)]). For deeper syntax, read docs topic workflow/quickstart and then one related workflow/* topic. Minimal script: `export const meta = { name: "review", description: "Review a target", phases: [{ title: "Review" }] }; phase("Review"); const report = await agent("Review " + args.target, { label: "review" }); return { report };`. Omit model for the server default (explicit AGENTPRISM_DEFAULT_BACKEND, else a zero-token auto-selected project pin), or use a backend name alone to preserve that backend\'s configured default. Before choosing a pinned model, mode, or configOptions, call action:"config" with projectDir and optional harnesses/modelFilter; after choosing a model, pass modelSpecs to read its model-specific options. Set mode only when that selected harness entry\'s modes.availableModes explicitly lists the exact id; modes:null means unsupported, so omit mode\u2014never infer a default from an absent value. Config opens no-prompt sessions, spends zero tokens, and starts no workflow. action:"run" automatically performs static validation, a mocked dry run, and routed config checks before admission. Invalid scripts return bounded diagnostics with status:"rejected" and create no run ID, reserve no background slot, and spend no tokens. Run, resume, inspect, await, or stop an admitted workflow through the same tool. The script orchestrates agent() subagents (and optional checkpoint() gates) over registry built-ins\u2014currently Claude, Codex, OpenCode, and pi\u2014ACP backends, plus registered custom agents. Supply exactly one of inline script or absolute scriptPath; path content is read once and snapshotted at admission. ' + (requireProjectDir ? "config and run REQUIRE projectDir (absolute): it is the discovery cwd and selects the project-scoped run store/default execution cwd. " : "run optionally takes projectDir (absolute) to select the project-scoped run store; default is this server's own project. ") + 'inspect/await/stop take only a runId \u2014 it locates its project store automatically. Foreground is the default and streams progress; background:true returns a durable runId for bounded action:"await" calls. run and await honor _meta.progressToken with notifications/progress while they block. Pass resumeFromRunId to execute a new run from a prior journal prefix. In hosts that render MCP Apps, every call of this tool shows a live self-updating run-monitor panel and the panel reports phase starts, pauses, and terminal outcomes on its own \u2014 do NOT poll action:"inspect" to check on a run there; prefer a single bounded action:"await". Use action:"inspect" with a runId when you need machine-readable status data: a safe bounded status, log tail, and attributed call previews. Use action:"stop" to durably abort a live run; add callIndex to cancel only that in-flight agent and keep the run live. labelGlob remains an output filter in both forms. A whole-run stop returns the final run fate; resume is safe immediately, and only agent-session wind-down can remain asynchronous. Every admitted script is readable at workflow://runs/{runId}/script and results include resource links. Background runs are tracked per project, capped at four active/starting runs, and use headless checkpoint semantics; checkpointReplies continue a checkpoint pause in a new run.',
|
|
34801
34924
|
inputSchema: workflowToolInputSchema,
|
|
34802
34925
|
outputSchema: workflowToolOutputSchema,
|
|
34803
34926
|
annotations: void 0
|
|
@@ -34849,7 +34972,7 @@ function createWorkflowServer(runner, options = {}) {
|
|
|
34849
34972
|
);
|
|
34850
34973
|
}
|
|
34851
34974
|
}
|
|
34852
|
-
const report = await
|
|
34975
|
+
const report = await probeHarnessConfig2({
|
|
34853
34976
|
harnesses: parsedInput.harnesses,
|
|
34854
34977
|
modelSpecs: parsedInput.modelSpecs,
|
|
34855
34978
|
cwd,
|
|
@@ -35306,12 +35429,49 @@ function createWorkflowServer(runner, options = {}) {
|
|
|
35306
35429
|
isError: true
|
|
35307
35430
|
};
|
|
35308
35431
|
}
|
|
35432
|
+
const routingDiscovery = await validateWorkflowScript(admittedScript, {
|
|
35433
|
+
args: input.args,
|
|
35434
|
+
cwd: context.projectDir,
|
|
35435
|
+
maxAgents: input.maxAgents,
|
|
35436
|
+
timeoutMs: 3e4,
|
|
35437
|
+
probeConfig: false,
|
|
35438
|
+
loadSavedWorkflow: (name) => context.manager.resolveSavedWorkflow(name)
|
|
35439
|
+
});
|
|
35440
|
+
let defaultModel;
|
|
35441
|
+
let defaultBackendWarning;
|
|
35442
|
+
if (workflowNeedsPinnedDefault(routingDiscovery) || workflowMayUseDefaultModel(admittedScript)) {
|
|
35443
|
+
const explicitDefault = process.env[DEFAULT_BACKEND_ENV] !== void 0;
|
|
35444
|
+
if (explicitDefault) {
|
|
35445
|
+
defaultModel = probeRunner.defaultBackendId?.();
|
|
35446
|
+
} else {
|
|
35447
|
+
const source = input.resumeFromRunId ? context.manager.getPersistence().load(input.resumeFromRunId) : null;
|
|
35448
|
+
defaultModel = recordedDefaultModel(source);
|
|
35449
|
+
if (defaultModel) {
|
|
35450
|
+
defaultBackendWarning = `Model-less agent calls inherit pinned backend ${JSON.stringify(defaultModel)} from the resume source; the run will not switch providers automatically.`;
|
|
35451
|
+
} else if (probeRunner.defaultBackendId && probeRunner.listBackends) {
|
|
35452
|
+
try {
|
|
35453
|
+
const selected = await discoverProjectDefaultBackend(context, probeRunner);
|
|
35454
|
+
defaultModel = selected.backendId;
|
|
35455
|
+
defaultBackendWarning = `Model-less agent calls use auto-selected backend ${JSON.stringify(selected.backendId)} for this run (${selected.reason}); the run will not switch providers automatically.`;
|
|
35456
|
+
} catch (error51) {
|
|
35457
|
+
if (error51 instanceof NoAutoDefaultBackendError) {
|
|
35458
|
+
return {
|
|
35459
|
+
content: [{ type: "text", text: truncateUtf83(error51.message, 8192, "\u2026[backend diagnostics truncated]") }],
|
|
35460
|
+
isError: true
|
|
35461
|
+
};
|
|
35462
|
+
}
|
|
35463
|
+
throw error51;
|
|
35464
|
+
}
|
|
35465
|
+
}
|
|
35466
|
+
}
|
|
35467
|
+
}
|
|
35309
35468
|
const preflight = await validateWorkflowScript(admittedScript, {
|
|
35310
35469
|
args: input.args,
|
|
35311
35470
|
cwd: context.projectDir,
|
|
35312
35471
|
maxAgents: input.maxAgents,
|
|
35313
35472
|
timeoutMs: 3e4,
|
|
35314
35473
|
probeTimeoutMs: 6e4,
|
|
35474
|
+
defaultModel,
|
|
35315
35475
|
probeRunner,
|
|
35316
35476
|
loadSavedWorkflow: (name) => context.manager.resolveSavedWorkflow(name)
|
|
35317
35477
|
});
|
|
@@ -35323,10 +35483,14 @@ function createWorkflowServer(runner, options = {}) {
|
|
|
35323
35483
|
isError: true
|
|
35324
35484
|
};
|
|
35325
35485
|
}
|
|
35326
|
-
|
|
35327
|
-
|
|
35328
|
-
|
|
35329
|
-
|
|
35486
|
+
const admissionWarnings = [
|
|
35487
|
+
...defaultBackendWarning ? [defaultBackendWarning] : [],
|
|
35488
|
+
...preflight.warnings
|
|
35489
|
+
];
|
|
35490
|
+
if (admissionWarnings.length > 0) {
|
|
35491
|
+
const lines = admissionWarnings.slice(0, 20).map((warning) => `- ${warning}`);
|
|
35492
|
+
if (admissionWarnings.length > lines.length) {
|
|
35493
|
+
lines.push(`- \u2026 ${admissionWarnings.length - lines.length} more warning(s) omitted`);
|
|
35330
35494
|
}
|
|
35331
35495
|
preflightWarningText = truncateUtf83(
|
|
35332
35496
|
`
|
|
@@ -35353,6 +35517,7 @@ ${lines.join("\n")}`,
|
|
|
35353
35517
|
const exec = {
|
|
35354
35518
|
agent: runner,
|
|
35355
35519
|
executionAdmission: executionLatch.decision,
|
|
35520
|
+
defaultModel,
|
|
35356
35521
|
scriptBackends: backendsGate.backends,
|
|
35357
35522
|
maxAgents: input.maxAgents,
|
|
35358
35523
|
concurrency: input.concurrency,
|
package/dist/validate.d.ts
CHANGED
|
@@ -28,6 +28,13 @@ export interface ValidateWorkflowOptions {
|
|
|
28
28
|
timeoutMs?: number;
|
|
29
29
|
/** Per routed backend/model config-probe limit. Default 60_000 ms. */
|
|
30
30
|
probeTimeoutMs?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Host-pinned model/backend for calls with no authored model, agentType model, tier,
|
|
33
|
+
* or phase/meta route. The dry run resolves and reports it like live execution.
|
|
34
|
+
*/
|
|
35
|
+
defaultModel?: string;
|
|
36
|
+
/** Run routed no-prompt config probes after the mock dry run. Default true. */
|
|
37
|
+
probeConfig?: boolean;
|
|
31
38
|
/** Host-owned no-prompt probe runner. When supplied it is reused and never disposed. */
|
|
32
39
|
probeRunner?: ValidateProbeRunner;
|
|
33
40
|
/** Optional saved-workflow resolver used by nested workflow("name") calls in the dry run. */
|
package/dist/validate.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAGV,mBAAmB,EACnB,gBAAgB,EAEjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,KAAK,EAA2B,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAExF,OAAO,EAA6B,KAAK,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7F,MAAM,MAAM,cAAc,GACtB,IAAI,GACJ,OAAO,GACP,MAAM,GACN,MAAM,GACN,cAAc,EAAE,GAChB;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAAA;CAAE,CAAC;AAEtC,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,SAAS,EAAE,SAAS,cAAc,EAAE,CAAC;CAC/C;AAED,MAAM,MAAM,cAAc,GAAG,cAAc,GAAG,kBAAkB,CAAC;AAEjE,uEAAuE;AACvE,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC;AAEnE,MAAM,WAAW,uBAAuB;IACtC,iEAAiE;IACjE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;2FACuF;IACvF,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,WAAW,CAAC;IAC5C;6EACyE;IACzE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,4DAA4D;IAC5D,MAAM,CAAC,EAAE,OAAO,CAAC;I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M,EAAE,sBAAsB,GAAG,MAAM,CAyC3E"}
|
package/dist/validate.js
CHANGED
|
@@ -1239,6 +1239,7 @@ export async function validateWorkflowScript(script, options = {}) {
|
|
|
1239
1239
|
journaling: false,
|
|
1240
1240
|
signal: controller.signal,
|
|
1241
1241
|
maxAgents: options.maxAgents,
|
|
1242
|
+
defaultModel: options.defaultModel,
|
|
1242
1243
|
scriptBackends: declaredBackends,
|
|
1243
1244
|
confirm: async (promptText, checkpointOptions) => {
|
|
1244
1245
|
const opts = (checkpointOptions ?? {});
|
|
@@ -1291,9 +1292,15 @@ export async function validateWorkflowScript(script, options = {}) {
|
|
|
1291
1292
|
const mockAnswers = mockAnswerState ? buildMockAnswersReport(mockAnswerState) : undefined;
|
|
1292
1293
|
if (mockAnswerState && mockAnswers)
|
|
1293
1294
|
appendMockAnswerWarnings(mockAnswerState, mockAnswers, warnings);
|
|
1294
|
-
const probed =
|
|
1295
|
-
|
|
1296
|
-
|
|
1295
|
+
const probed = options.probeConfig === false
|
|
1296
|
+
? { harnessOptions: [], catalogs: new Map(), modes: new Map() }
|
|
1297
|
+
: await probeHarnessConfigOptions(agentCalls, baseCwd, backendRegistry, hostRegistry, declaredBackends, warnings, options.probeRunner, probeTimeoutMs);
|
|
1298
|
+
const optionErrors = options.probeConfig === false
|
|
1299
|
+
? []
|
|
1300
|
+
: configOptionErrors(agentCalls, probed.catalogs, backendRegistry, hostRegistry, declaredBackends, warnings);
|
|
1301
|
+
const modeErrors = options.probeConfig === false
|
|
1302
|
+
? []
|
|
1303
|
+
: sessionModeErrors(agentCalls, probed.modes, backendRegistry, hostRegistry, declaredBackends);
|
|
1297
1304
|
const configurationErrors = [...modeErrors, ...optionErrors];
|
|
1298
1305
|
const ok = runOk && configurationErrors.length === 0;
|
|
1299
1306
|
const runReason = timedOut ? `dry run exceeded ${timeoutMs}ms and was aborted` : run.reason;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automatalabs/workflows",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.55.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22"
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"typebox": "1.3.2",
|
|
34
|
-
"@automatalabs/repl-engine": "0.4.
|
|
34
|
+
"@automatalabs/repl-engine": "0.4.8",
|
|
35
35
|
"@automatalabs/shared-types": "0.32.0",
|
|
36
|
-
"@automatalabs/workflow-engine": "0.
|
|
36
|
+
"@automatalabs/workflow-engine": "0.39.0",
|
|
37
37
|
"@automatalabs/acp-agents": "0.41.4"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|