@automatalabs/workflows 0.47.1 → 0.47.2
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/mcp-server.js +11 -2
- package/package.json +2 -2
package/dist/mcp-server.js
CHANGED
|
@@ -33712,7 +33712,7 @@ function registerReplTool(mcp, options) {
|
|
|
33712
33712
|
mcp.registerTool(
|
|
33713
33713
|
"repl",
|
|
33714
33714
|
{
|
|
33715
|
-
description: "
|
|
33715
|
+
description: "A persistent QuickJS-in-WASM JavaScript VM you drive interactively to orchestrate subagents \u2014 one VM per projectDir, addressed by the same project model as the workflow tool. Where workflow runs a deterministic script to completion, repl is the LIVE plane: you write JavaScript with action:\"eval\", and every binding, pending subagent call, raised checkpoint, and logged value PERSISTS in the VM between tool calls \u2014 a later eval sees the same variables and awaits the same promises; nothing lives in the transcript. Inside code (JavaScript; top-level await is allowed, top-level return is a syntax error; console output is captured) the host bridge provides: agent(modelSpec, task, opts?) \u2192 Promise \u2014 spawn an ACP subagent on a registry built-in (currently Claude, Codex, OpenCode, and pi) or a registered custom agent (opts: a structured-output JSON schema validated per call, cwd, backend config); checkpoint(question) \u2014 park a promise for a human answer, resolved by checkpoint.answer(id, value) in a later eval; and console, whose logged values are captured as addressable $1, $2, \u2026 references so you can slice deeper in a later eval (console.log($14.sections.map(s => s.title))) instead of re-running work. Agent handles carry followUp / steer / cancel, which resolve with what actually happened (live injection where the backend supports steering, queued-for-next-turn delivery where it does not). Everything else workflow authors know \u2014 parallel, pipeline, verify, judgePanel, gate, retry, loopUntilDry \u2014 is plain JavaScript layered on agent(), injected as the guest library. Start-and-don't-await is idiomatic: `const research = agent(...)` returns immediately with the eval and keeps running server-side; await it (or read $N) in a later call. No fs, no net, no timers, and no budget surface. Subagents (6 concurrent per workspace) take stable ids c1, c2, \u2026 used by interrupt and status. Actions: eval runs code, drains jobs, settles what it can, and returns immediately \u2014 a suspended eval (awaiting a subagent, a checkpoint, or any unsettled promise) lists its pending call ids and resumes its continuation at settlement with no fabricated result; a throw/reject/syntax-error/interrupt renders in output. wait blocks server-side (bounded; default 30 000 ms, max 120 000 ms) until the target calls settle, then returns the same shape. status is ls for the workspace: the binding manifest (name, type, size, provenance), live agents, pending ops, and the $N range \u2014 a named status is a first touch, a project-less status lists every open workspace without creating one. interrupt cancels one subagent call (with id) or breaks the running eval (no id). reset tears the workspace down. State survives MCP-session churn and daemon restarts: every eval and every settlement drain that changed state persists the workspace to the daemon's per-project repl store, and the first touch of a stored workspace restores it and reconciles every outstanding call (settle from the store / re-attach via ACP session/load / re-issue). A stored snapshot that refuses (corrupt, a format upgrade, or a wasm-binary mismatch) is surfaced loudly and never silently discarded \u2014 reset drops it and starts fresh. On last-client disconnect the workspace drains in-flight subagent turns to completion (each settlement boundary snapshots) and closes idle children; followUp re-attaches the subagent session lazily on the next connect. Every result carries the machine-readable shape (see the output schema) as structuredContent alongside the bounded text, with guest output kept in fields separate from the orchestration metadata.",
|
|
33716
33716
|
inputSchema: replToolInputShape,
|
|
33717
33717
|
outputSchema: replToolOutputShape
|
|
33718
33718
|
},
|
|
@@ -34513,6 +34513,12 @@ var WorkflowScriptResources = class {
|
|
|
34513
34513
|
var SERVER_NAME = "agentprism-workflow";
|
|
34514
34514
|
var require2 = createRequire(import.meta.url);
|
|
34515
34515
|
var SERVER_VERSION = require2("../package.json").version;
|
|
34516
|
+
var SERVER_INSTRUCTIONS = [
|
|
34517
|
+
"This server exposes two model-facing tools for orchestrating multi-agent work. Both 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.",
|
|
34518
|
+
'\u2022 workflow \u2014 DETERMINISTIC BATCH orchestration. Supply a JavaScript workflow script (inline or by absolute scriptPath) that fans out agent() subagents and optional checkpoint() gates; it runs to completion in the foreground, or background:true returns a durable runId for bounded action:"await"/"inspect"/"stop" calls, with journaling, replay, and resumeFromRunId. Reach for it when the orchestration is known up front and you want it repeatable and resumable. The user-invocable author-workflow prompt helps write scripts.',
|
|
34519
|
+
'\u2022 repl \u2014 INTERACTIVE STATEFUL orchestration. A persistent per-project JavaScript VM you drive incrementally with action:"eval"; bindings, pending subagents, checkpoints, and logged $N values persist in the VM between calls and survive daemon restarts. Reach for it when you want to inspect intermediate results and decide the next step adaptively, or keep a human in the loop via checkpoint().',
|
|
34520
|
+
"Rule of thumb: use workflow when you can script the whole plan ahead of time; use repl when you want a live, stateful session that evolves call by call."
|
|
34521
|
+
].join("\n\n");
|
|
34516
34522
|
var TERMINAL_STATUSES = /* @__PURE__ */ new Set(["paused", "completed", "failed", "aborted"]);
|
|
34517
34523
|
function createExecutionAdmissionLatch() {
|
|
34518
34524
|
let decision;
|
|
@@ -35294,7 +35300,10 @@ function replEvalTimeoutMs() {
|
|
|
35294
35300
|
return DEFAULT_REPL_EVAL_TIMEOUT_MS;
|
|
35295
35301
|
}
|
|
35296
35302
|
function createWorkflowServer(runner, options = {}) {
|
|
35297
|
-
const mcp = new McpServer(
|
|
35303
|
+
const mcp = new McpServer(
|
|
35304
|
+
{ name: SERVER_NAME, version: SERVER_VERSION },
|
|
35305
|
+
{ capabilities: { tools: {} }, instructions: SERVER_INSTRUCTIONS }
|
|
35306
|
+
);
|
|
35298
35307
|
let acceptingWork = true;
|
|
35299
35308
|
const ownsReplEvalBreakChannel = options.replEvalBreakChannel === void 0;
|
|
35300
35309
|
const replEvalBreakChannel = options.replEvalBreakChannel ?? createEvalBreakChannel();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automatalabs/workflows",
|
|
3
|
-
"version": "0.47.
|
|
3
|
+
"version": "0.47.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"typebox": "1.3.2",
|
|
34
|
-
"@automatalabs/repl-engine": "0.
|
|
34
|
+
"@automatalabs/repl-engine": "0.2.0",
|
|
35
35
|
"@automatalabs/shared-types": "0.29.1",
|
|
36
36
|
"@automatalabs/workflow-engine": "0.35.2",
|
|
37
37
|
"@automatalabs/acp-agents": "0.36.3"
|