workflow: run durable native scripts through code mode

Closed
TE
2d ago
+6088-28

HOLD: integrated runtime verification and remote placement are still in progress.

Native workflows reuse the existing QuickJS code-mode runtime and Server::call catalog gates. This adds daemon-owned start/status/pause/resume, pinned script versions, per-resume call budgets, durable activity replay, schema correction, stall recovery, and the cmux_workflow tool. Each agent and machine activity retains a stable identity across explicit resume; failures and parallel completion order are journaled before delivery.

Foundations are split into #33563 (journal), #33654 (reply policy), and #33663 (run lifecycle); this integration will be reconciled onto their merged base. The runtime, activity executor, and end-to-end tests belong together because each side defines the same authenticated activity protocol. Remote machine execution remains denied until a scoped supported transport is integrated. Signing and publishing stay in Actions.

Validation: regression-first journal tests and foundation tests passed in fleet runs linked on those PRs. Integrated Cargo and actual product CLI tests are pending on this head; formatting and whitespace checks passed. The CLI tests read the final reply, validate one schema correction, and exercise pause/resume after editing the source.

Design: teamleaderleo/leo-workspace#624, native workflows sections 3.2–3.3. User documentation: docs/native-workflows.md.

Leo-ask: ask-6ef2624788
Leo asked: “go do all those/help out where you can + examine how you can improve yourself and your available options and capabilities and speed”.

🤖 Generated with Codex

Agent session: agent session


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Runs native workflows on the existing code-mode runtime with daemon-owned start/status/pause/resume, durable activity journaling, schema correction, and stall recovery.

  • Adds cmux workflow CLI and cmux_workflow MCP tool, both gated through the standard server calls.
  • Pins script versions, enforces per-resume call budgets, and replays activities with stable identities after daemon restarts.
  • Remote machine execution stays denied until a scoped transport is integrated; signing and publishing remain in Actions.