feat(workflow): durable QuickJS workflow engine
Adds the native workflow execution seam on the existing cmux NEXT QuickJS code-mode runtime. Workflow scripts reuse the ordinary interpreter and preserve deterministic activity ordering while the daemon owns journal and activity effects.
Leo's ask: "go do all those/help out where you can + examine how you can improve yourself and your available options and capabilities and speed". This slice implements the native workflow runtime described in leo-workspace/workstreams/cmux-next-nightly-train.md §3.2ā3.3 and design PR teamleaderleo/leo-workspace#624.
Changes:
- Adds
agent(),machine(), phase/parallel/pipeline helpers and pinnedargsto workflow code mode. - Keeps clocks and randomness unavailable for deterministic replay.
- Queues starts before waits so parallel branches retain call order; preserves complete workflow results without normal MCP truncation.
- Rejects workflow-only activity requests from ordinary
cmux_execcallers. - Adds focused engine tests, including replay scheduling, errors, unfinished children and large results.
This is the engine-only slice; daemon lifecycle, activity execution, reply policy and public workflow catalog are separate changes.
Leo-ask: ask-6ef2624788
š¤ Generated with Codex
Agent session: agent session