Skip to content

Strengthen typed statechart protocols - #1

Merged
SandroMaglione merged 2 commits into
mainfrom
codex/typed-statechart-protocols
Jul 31, 2026
Merged

Strengthen typed statechart protocols#1
SandroMaglione merged 2 commits into
mainfrom
codex/typed-statechart-protocols

Conversation

@SandroMaglione

Copy link
Copy Markdown
Member

Summary

  • strengthen public versus machine-local event protocols, output/finality typing, action staging, child addressing, and runtime error boundaries
  • add bound Atom runtimes, fail-aware results, reactive child bridges, and snapshot-inferred state selectors
  • add one-shot invoke/timer helpers, state retagging, persistence protocol coverage, strict consumer validation, and comprehensive runtime/type tests
  • remove the obsolete Effect PR synchronization contract and tooling
  • expand README, agent guidance, public JSDoc, and validate the Pokémon example against the local package build

Why

The XState migration exposed API friction and several places where protocol, output, child-machine, and Atom bridge types could become wider than their runtime behavior. These changes make invalid configurations fail at compile time while reducing application plumbing and duplicate APIs.

User impact

This is an early-release breaking API refinement. Public commands are separated from internal machine events, finality and output schemas live in state definitions, Atom selectors infer paths from their bridge snapshots, and runtime-bound Atom factories use AtomMachine.bind(runtime).make(machine).

A minor Changeset is included. After this PR merges, the repository's Changesets workflow should open the separate version/release PR.

Validation

  • pnpm check
    • 194 runtime tests
    • 83 type tests / 311 assertions
    • strict packed-consumer validation
    • package verification
  • Pokémon example TypeScript and Vite production build
  • git diff --check

@SandroMaglione
SandroMaglione merged commit b0af97e into main Jul 31, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant