Repository navigation
Human-sent transitions, ignored events in traces, MCP workflow example - #176
Conversation
- machine.transition carries ignored: true for the host event result.ignored reports; foldTraces counts it per state
- transition meta actor: "human": agent.decide and decideNext withhold the event, getAcceptedEvents({ actor: "agent" }) drops it, describeMachine marks it, lint reports decide-allows-human-event
🦋 Changeset detectedLatest commit: 906b417 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 13 minutes. View limit details
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
…vents, step-path decisions skip human events
Three additions for hosts that let an outside agent drive a machine.
Ignored events in traces
machine.transitioncarriesignored: truefor the host event the state had no transition for, the same eventresult.ignoredreports. Runtime only;traceTransitionsdoes not set it.foldTracescounts them per state asignored.Transitions a person sends
meta: { actor: "human" }on a transition marks its event as sent by a person, such as an approval.agent.decideanddecideNextnever offer it. A closed choice lists its options inwithheld; a choice of it anyway is retried.getAcceptedEvents(snapshot, { actor: "agent" })returns the model-facing list.describeMachinemarks the transition(human).decide-allows-human-event(error): a decision's literalallowedEventsnames a tagged event.verifyAgentConfigfails itslintgate on it. ReadsfromConfig@exprinputs too.meta.examples/mcp-workflowstart,status,send) over a bug-fix machine a coding agent works through.actor: "human", sosendrefuses them; the host's UI answers withanswer(...).@modelcontextprotocol/sdk@^1.29.0as a dev dependency. An example, not a subpath: Scope leaves MCP transport to the host.For review
error, notwarning: listing an event the model can never be offered is always a mistake, and a model-written config should fail the gate.Verification
vitest --run: 137 files, 1624 tests pass.typecheck:src,typecheck:examples,lint,format:check,knip,docs:checkpass.Summary by CodeRabbit