Skip to content

Migrate examples to machine event constructors - #109

Merged
SandroMaglione merged 1 commit into
mainfrom
agent/migrate-example-event-constructors
Aug 14, 2026
Merged

Migrate examples to machine event constructors#109
SandroMaglione merged 1 commit into
mainfrom
agent/migrate-example-event-constructors

Conversation

@SandroMaglione

Copy link
Copy Markdown
Member

Summary

  • Replace every remaining Event.cases.<Tag>.make(...) call under examples/ with the protocol-bound event construction APIs.
  • Use Machine.events for public UI and planner delivery and Machine.internalEvents for timers, raised events, invoke results, and snapshot mappings.
  • Keep decoded Machine.event construction at model-trace and Worker/BroadcastChannel boundaries, where events must remain inspectable or structured-cloneable.
  • Split the media-player definition from its handlers so invocation helpers can share machine-owned internal constructors without a module cycle.

Changeset

  • Added or updated for a library or package-metadata change
  • Not required because this PR does not change src/ or package.json

Validation

  • pnpm check
  • examples/platformer: pnpm check
  • examples/playground: pnpm check
  • Automated type-performance measurement passed or was not required (pnpm perf:types passed locally)
  • Automated runtime- and memory-performance measurement passed or was not required (pnpm perf:runtime completed locally)

@SandroMaglione
SandroMaglione merged commit d222e01 into main Aug 14, 2026
12 checks passed
@SandroMaglione
SandroMaglione deleted the agent/migrate-example-event-constructors branch August 14, 2026 17:59
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