@xmachines/docs 1.0.0-beta.19 → 1.0.0-beta.20

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.
Files changed (168) hide show
  1. package/api/@xmachines/play/classes/PlayError.md +4 -4
  2. package/api/@xmachines/play/type-aliases/PlayEvent.md +2 -2
  3. package/api/@xmachines/play-actor/classes/AbstractActor.md +3 -3
  4. package/api/@xmachines/play-actor/interfaces/PlaySpec.md +2 -2
  5. package/api/@xmachines/play-actor/interfaces/Routable.md +3 -3
  6. package/api/@xmachines/play-actor/interfaces/ViewMetadata.md +3 -3
  7. package/api/@xmachines/play-actor/interfaces/Viewable.md +2 -2
  8. package/api/@xmachines/play-dom/classes/PlayRenderer.md +4 -4
  9. package/api/@xmachines/play-dom/functions/connectRenderer.md +1 -1
  10. package/api/@xmachines/play-dom/functions/renderSpec.md +1 -1
  11. package/api/@xmachines/play-dom/interfaces/ConnectRendererOptions.md +7 -7
  12. package/api/@xmachines/play-dom/interfaces/DomRenderContext.md +7 -7
  13. package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +3 -3
  14. package/api/@xmachines/play-dom/type-aliases/DomComponentRenderer.md +1 -1
  15. package/api/@xmachines/play-dom/type-aliases/DomRegistry.md +1 -1
  16. package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +5 -5
  17. package/api/@xmachines/play-react/functions/useActor.md +1 -1
  18. package/api/@xmachines/play-react/functions/useSignalEffect.md +1 -1
  19. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +4 -4
  20. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +3 -3
  21. package/api/@xmachines/play-react/interfaces/PlayRendererProps.md +6 -6
  22. package/api/@xmachines/play-react/type-aliases/PlayActor.md +1 -1
  23. package/api/@xmachines/play-react/variables/PlayRenderer.md +1 -1
  24. package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +21 -21
  25. package/api/@xmachines/play-react-router/classes/RouteMap.md +4 -4
  26. package/api/@xmachines/play-react-router/functions/PlayRouterProvider.md +1 -1
  27. package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +1 -1
  28. package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +6 -6
  29. package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +5 -5
  30. package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +3 -3
  31. package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +3 -3
  32. package/api/@xmachines/play-router/classes/BaseRouteMap.md +4 -4
  33. package/api/@xmachines/play-router/classes/RouterBridgeBase.md +21 -21
  34. package/api/@xmachines/play-router/functions/buildRouteTree.md +1 -1
  35. package/api/@xmachines/play-router/functions/connectRouter.md +1 -1
  36. package/api/@xmachines/play-router/functions/createBrowserHistory.md +1 -1
  37. package/api/@xmachines/play-router/functions/createRouteMap.md +1 -1
  38. package/api/@xmachines/play-router/functions/createRouter.md +1 -1
  39. package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +1 -1
  40. package/api/@xmachines/play-router/functions/extractMachineRoutes.md +1 -1
  41. package/api/@xmachines/play-router/functions/findRouteById.md +1 -1
  42. package/api/@xmachines/play-router/functions/findRouteByPath.md +1 -1
  43. package/api/@xmachines/play-router/functions/getNavigableRoutes.md +1 -1
  44. package/api/@xmachines/play-router/functions/getRoutableRoutes.md +1 -1
  45. package/api/@xmachines/play-router/functions/getTransitionReachableRoutes.md +1 -1
  46. package/api/@xmachines/play-router/functions/isRouteReachable.md +1 -1
  47. package/api/@xmachines/play-router/functions/machineToGraph.md +1 -1
  48. package/api/@xmachines/play-router/functions/routeExists.md +1 -1
  49. package/api/@xmachines/play-router/functions/sanitizePathname.md +1 -1
  50. package/api/@xmachines/play-router/functions/validateRouteFormat.md +1 -1
  51. package/api/@xmachines/play-router/functions/validateStateExists.md +1 -1
  52. package/api/@xmachines/play-router/interfaces/BaseRouteMapping.md +3 -3
  53. package/api/@xmachines/play-router/interfaces/BrowserHistory.md +14 -14
  54. package/api/@xmachines/play-router/interfaces/BrowserWindow.md +14 -14
  55. package/api/@xmachines/play-router/interfaces/ConnectRouterOptions.md +4 -4
  56. package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +3 -3
  57. package/api/@xmachines/play-router/interfaces/MachineNodeData.md +5 -5
  58. package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +6 -6
  59. package/api/@xmachines/play-router/interfaces/RouteInfo.md +8 -8
  60. package/api/@xmachines/play-router/interfaces/RouteMap.md +4 -4
  61. package/api/@xmachines/play-router/interfaces/RouteNode.md +10 -10
  62. package/api/@xmachines/play-router/interfaces/RouteObject.md +2 -2
  63. package/api/@xmachines/play-router/interfaces/RouteTree.md +5 -5
  64. package/api/@xmachines/play-router/interfaces/RouteWatcherHandle.md +3 -3
  65. package/api/@xmachines/play-router/interfaces/RouterBridge.md +3 -3
  66. package/api/@xmachines/play-router/interfaces/VanillaRouter.md +4 -4
  67. package/api/@xmachines/play-router/type-aliases/MachineGraph.md +1 -1
  68. package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +1 -1
  69. package/api/@xmachines/play-signals/functions/watchSignal.md +1 -1
  70. package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +2 -2
  71. package/api/@xmachines/play-signals/interfaces/SignalComputed.md +2 -2
  72. package/api/@xmachines/play-signals/interfaces/SignalOptions.md +2 -2
  73. package/api/@xmachines/play-signals/interfaces/SignalState.md +3 -3
  74. package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +4 -4
  75. package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +1 -1
  76. package/api/@xmachines/play-solid/functions/useActor.md +1 -1
  77. package/api/@xmachines/play-solid/interfaces/PlayRendererProps.md +6 -6
  78. package/api/@xmachines/play-solid/type-aliases/PlayActor.md +1 -1
  79. package/api/@xmachines/play-solid/variables/PlayRenderer.md +1 -1
  80. package/api/@xmachines/play-solid-router/classes/RouteMap.md +4 -4
  81. package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +22 -22
  82. package/api/@xmachines/play-solid-router/functions/PlayRouterProvider.md +1 -1
  83. package/api/@xmachines/play-solid-router/functions/createRouteMap.md +1 -1
  84. package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +3 -3
  85. package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +6 -6
  86. package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
  87. package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +3 -3
  88. package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +3 -3
  89. package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +1 -1
  90. package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +4 -4
  91. package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +4 -4
  92. package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +21 -21
  93. package/api/@xmachines/play-tanstack-react-router/functions/PlayRouterProvider.md +1 -1
  94. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +1 -1
  95. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +1 -1
  96. package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +1 -1
  97. package/api/@xmachines/play-tanstack-react-router/functions/extractParams.md +1 -1
  98. package/api/@xmachines/play-tanstack-react-router/functions/extractQueryParams.md +1 -1
  99. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +6 -6
  100. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +5 -5
  101. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +3 -3
  102. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +3 -3
  103. package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +3 -3
  104. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
  105. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +4 -4
  106. package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +4 -4
  107. package/api/@xmachines/play-tanstack-solid-router/classes/SolidRouterBridge.md +22 -22
  108. package/api/@xmachines/play-tanstack-solid-router/functions/PlayRouterProvider.md +1 -1
  109. package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +1 -1
  110. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +6 -6
  111. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
  112. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +3 -3
  113. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +3 -3
  114. package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +1 -1
  115. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +1 -1
  116. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +4 -4
  117. package/api/@xmachines/play-vue/functions/defineRegistry.md +1 -1
  118. package/api/@xmachines/play-vue/functions/useActor.md +1 -1
  119. package/api/@xmachines/play-vue/interfaces/PlayRendererProps.md +5 -5
  120. package/api/@xmachines/play-vue/type-aliases/ComponentEntry.md +1 -1
  121. package/api/@xmachines/play-vue/type-aliases/ComponentsMap.md +1 -1
  122. package/api/@xmachines/play-vue/type-aliases/DefineRegistryOptions.md +2 -2
  123. package/api/@xmachines/play-vue/type-aliases/PlayActor.md +1 -1
  124. package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
  125. package/api/@xmachines/play-vue-router/classes/RouteMap.md +7 -7
  126. package/api/@xmachines/play-vue-router/classes/VueBaseRouteMap.md +7 -7
  127. package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +22 -22
  128. package/api/@xmachines/play-vue-router/functions/createRouteMap.md +1 -1
  129. package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +6 -6
  130. package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +4 -4
  131. package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +3 -3
  132. package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +1 -1
  133. package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +1 -1
  134. package/api/@xmachines/play-xstate/classes/PlayerActor.md +11 -11
  135. package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +1 -1
  136. package/api/@xmachines/play-xstate/functions/composeGuards.md +1 -1
  137. package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +1 -1
  138. package/api/@xmachines/play-xstate/functions/contextFieldMatches.md +1 -1
  139. package/api/@xmachines/play-xstate/functions/definePlayer.md +1 -1
  140. package/api/@xmachines/play-xstate/functions/deriveRoute.md +1 -1
  141. package/api/@xmachines/play-xstate/functions/eventMatches.md +1 -1
  142. package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +1 -1
  143. package/api/@xmachines/play-xstate/functions/hasContext.md +1 -1
  144. package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +1 -1
  145. package/api/@xmachines/play-xstate/functions/negateGuard.md +1 -1
  146. package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +3 -3
  147. package/api/@xmachines/play-xstate/interfaces/PlayerFactoryResumeOptions.md +2 -2
  148. package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +6 -6
  149. package/api/@xmachines/play-xstate/interfaces/RouteContext.md +5 -5
  150. package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +1 -1
  151. package/api/@xmachines/play-xstate/type-aliases/Guard.md +1 -1
  152. package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +1 -1
  153. package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +1 -1
  154. package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +4 -4
  155. package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +4 -4
  156. package/api/@xmachines/shared/functions/defineXmVitestConfig.md +2 -2
  157. package/api/@xmachines/shared/functions/xmAliases.md +1 -1
  158. package/package.json +5 -3
  159. package/rfc/broker.md +100 -0
  160. package/rfc/browser.md +44 -0
  161. package/rfc/cli.md +118 -0
  162. package/rfc/git.md +61 -0
  163. package/rfc/mcp.md +43 -0
  164. package/rfc/node.md +36 -0
  165. package/rfc/play.md +447 -0
  166. package/rfc/rest.md +102 -0
  167. package/rfc/run.md +159 -0
  168. package/rfc/streams.md +168 -0
package/rfc/streams.md ADDED
@@ -0,0 +1,168 @@
1
+ # RFC: Streams
2
+
3
+ **Status:** Draft
4
+ **Version:** 1
5
+ **Scope:** Stream primitives, transforms, framing, durability
6
+ **Non-goals:** Execution semantics, protocols, storage backends
7
+
8
+ ---
9
+
10
+ ## 1. Purpose
11
+
12
+ This RFC defines the **stream abstraction** used throughout XMachines.
13
+
14
+ Streams are the **only integration boundary** between:
15
+
16
+ - runtimes
17
+ - transports
18
+ - durability backends
19
+ - adapters (REST, MCP, Git, server, browser)
20
+
21
+ Everything that moves data in XMachines moves through **streams**.
22
+
23
+ ---
24
+
25
+ ## 2. Canonical Stream Type
26
+
27
+ ### 2.1 Web Streams (authoritative)
28
+
29
+ All streams in XMachines are defined using **WHATWG Web Streams**:
30
+
31
+ - `ReadableStream<T>`
32
+ - `WritableStream<T>`
33
+ - `TransformStream<I, O>`
34
+
35
+ This applies uniformly to:
36
+
37
+ - browsers
38
+ - Node.js
39
+ - servers
40
+ - workers
41
+
42
+ No other stream type is part of the core contract.
43
+
44
+ ---
45
+
46
+ ### 2.2 Node.js interop (non-core)
47
+
48
+ Node classic streams (`stream.Readable`, `stream.Writable`) are **not** part of the
49
+ contract.
50
+
51
+ Interop with Node streams is handled by explicit Node adapter packages
52
+ (see [Node RFC](node.md)).
53
+
54
+ ---
55
+
56
+ ## 3. Stream Roles
57
+
58
+ Streams appear in four distinct roles:
59
+
60
+ | Role | Type | Meaning |
61
+ | -------- | -------------- | ------------------------ |
62
+ | Input | WritableStream | accepts events |
63
+ | Output | ReadableStream | emits outputs |
64
+ | Error | ReadableStream | emits errors |
65
+ | Snapshot | ReadableStream | emits materialized state |
66
+
67
+ Roles are never overloaded.
68
+
69
+ ---
70
+
71
+ ## 4. Transforms
72
+
73
+ A **transform** is a `TransformStream` that:
74
+
75
+ - preserves ordering
76
+ - preserves backpressure
77
+ - does not buffer unbounded data
78
+
79
+ Transforms are the **only mechanism** for:
80
+
81
+ - framing (NDJSON, SSE)
82
+ - durability
83
+ - filtering
84
+ - projection
85
+ - multiplexing
86
+
87
+ ---
88
+
89
+ ## 5. Framing Transforms
90
+
91
+ ### 5.1 NDJSON
92
+
93
+ - newline-delimited JSON
94
+ - one logical record per chunk
95
+ - ordering preserved
96
+ - used for logs and bulk streaming
97
+
98
+ ---
99
+
100
+ ### 5.2 SSE
101
+
102
+ - text-based framing
103
+ - browser-friendly
104
+ - transform-only
105
+ - no protocol semantics
106
+
107
+ ---
108
+
109
+ ### 5.3 JSON (single value)
110
+
111
+ - non-streaming
112
+ - used for snapshots and acknowledgements
113
+
114
+ ---
115
+
116
+ ## 6. Durability Transforms
117
+
118
+ Durability is implemented as **stream transforms**.
119
+
120
+ Examples:
121
+
122
+ - Git-backed transforms
123
+ - Valkey-backed transforms
124
+ - filesystem-backed transforms
125
+
126
+ Rules:
127
+
128
+ - append-only
129
+ - ordering preserved
130
+ - replayable
131
+ - never implicit
132
+
133
+ ---
134
+
135
+ ## 7. Replay & Projection
136
+
137
+ **Replay** is reading from a durable stream and piping it into another stream.
138
+
139
+ **Projection** is transforming a stream into another representation **without
140
+ changing semantics**.
141
+
142
+ ---
143
+
144
+ ## 8. Backpressure & Cancellation
145
+
146
+ - Backpressure MUST be respected
147
+ - Cancellation MUST propagate across transforms
148
+ - Closing a stream signals upstream cancellation
149
+
150
+ ---
151
+
152
+ ## 9. Invariants
153
+
154
+ 1. Web Streams are the only core abstraction
155
+ 2. Everything is a stream or transform
156
+ 3. Framing does not change semantics
157
+ 4. Durability is implemented as transforms
158
+ 5. Ordering is preserved
159
+ 6. Replay is deterministic
160
+
161
+ ---
162
+
163
+ ## 10. Lock statement
164
+
165
+ > Streams are the universal integration boundary in XMachines.
166
+ > All execution, transport, durability, and projection is expressed as streams
167
+ > and transforms.
168
+ > This is Streams.