@statelyai/mcp 0.9.0 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -293,6 +293,20 @@ createMachine({
293
293
  Applies semantic patches to a machine and returns the updated document. Use
294
294
  `to` to choose the returned format.
295
295
 
296
+ Patches use semantic graph operations. For example:
297
+
298
+ ```json
299
+ {
300
+ "op": "createTransition",
301
+ "sourceId": "player.playing",
302
+ "targetId": "player.paused",
303
+ "eventType": "STOP"
304
+ }
305
+ ```
306
+
307
+ Use graph entity IDs; top-level states commonly use `<machine-id>.<state-key>`. Use
308
+ camelCase operation names such as `createTransition`, not snake_case names.
309
+
296
310
  <details>
297
311
  <summary>Summary: update a machine</summary>
298
312
 
@@ -327,6 +341,8 @@ converted to structural XGraph first.
327
341
  ```text
328
342
  Use Stately to find up to five shortest paths through this machine:
329
343
 
344
+ import { createMachine } from 'xstate';
345
+
330
346
  createMachine({
331
347
  id: 'player',
332
348
  initial: 'paused',
@@ -355,6 +371,8 @@ normalization explicitly.
355
371
  ```text
356
372
  Use Stately to simulate PLAY followed by STOP on this machine:
357
373
 
374
+ import { createMachine } from 'xstate';
375
+
358
376
  createMachine({
359
377
  id: 'player',
360
378
  initial: 'paused',