Bag-of-Actions is a distributed operating system for mobile continuations. Unlike traditional workflow engines that push tasks to static queues, Bag-of-Actions represents units of work as Batons—serialized execution states that search for environments matching their required capabilities.
-
Resource Safety — Linear types ensure work is never lost or duplicated.
-
Resumable execution — Pause execution on one node, resume on another.
-
Capability Routing — Dynamic dispatch based on hardware, identity, and trust.
-
Polylingual Mesh — Orchestrated by Elixir, executed by Zig, proven by Idris.
| Milestone | Status | Capability |
|---|---|---|
1. Local Baton Cycle |
✓ Complete |
Zig-hosted Wasm "Freeze/Thaw" state cycle. |
2. Elixir Mesh |
✓ Complete |
Distributed orchestration and Baton handoffs via process groups. |
3. Verified ABI |
✓ Complete |
Idris 2 formal proofs for linear resource preservation typecheck ( |
4. Guix Integration |
✓ Complete |
Guix build orchestration from the Zig host (shelling out to the |
-
Linear Baton Logic — Modelled on Ephapax linear types. In the current POC one-time consumption is enforced by the Elixir orchestrator (process isolation); language-level linearity is a Milestone 3+ goal (see EXPLAINME.adoc).
-
Mobile Wasm Contexts — State capture of WebAssembly execution via return values and CLI output; full linear-memory snapshotting is planned (see EXPLAINME.adoc).
-
Guix-Powered Builds — Integrated Guix orchestration for reproducible artifact creation during continuation steps.
-
Formal Estate Manifest — Verified mapping of infrastructure capabilities (Linux, macOS, GPU, Guix) to physical nodes, mirrored across
Estate.idr,src/estate.zig, andnodes.scm. -
Distributed Fault Tolerance — Built on Elixir/OTP, leveraging the BEAM for robust node discovery and supervision.
-
Trust Attestation — Every frozen verdict carries an HMAC-SHA256 integrity digest, plus an optional ed25519 signature (per-node key) for authenticity; tampering is rejected on thaw. See
src/main.zig(CheckBaton) and docs/ci-check-baton.adoc.
# Build the Zig host
zig build
# Initialize a new Baton starting at counter 0
./zig-out/bin/bag_of_actions init
# Run the Elixir orchestrator
# This will trigger a recursive 10-step distributed handoff demo
cd bag
mix compile
elixir --sname mesh1 --cookie bag_secret -S mix run -e "Bag.Mesh.submit(0); :timer.sleep(15000)"Wondering how this works? See EXPLAINME.adoc.
| Path | Purpose |
|---|---|
|
Zig source code for the Execution Host (Baton supervisor). |
|
Elixir source code for the Mesh Orchestrator (Control Plane). |
|
Idris 2 formal proofs and the Estate Manifest ( |
|
Guix-native representation of the estate capabilities. |
|
Persistent serialization format for the Milestone 1/2 Baton. |
-
EXPLAINME.adoc — Implementation receipts and evidence index.
-
GOVERNANCE.adoc — Project governance.
-
MAINTAINERS.adoc — Maintainers and contacts.
-
docs/ci-check-baton.adoc — How a CI check becomes a frozen, attested Baton.
-
.github/ISSUE_TEMPLATE/ — Bug / feature / custom issue forms.
Distributed under the MPL-2.0 (MPL-2.0).
The future of work is mobile.