@xmachines/docs 1.0.0-beta.18 → 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 (189) hide show
  1. package/api/@xmachines/play/README.md +1 -1
  2. package/api/@xmachines/play/classes/PlayError.md +4 -4
  3. package/api/@xmachines/play/type-aliases/PlayEvent.md +3 -3
  4. package/api/@xmachines/play-actor/README.md +2 -2
  5. package/api/@xmachines/play-actor/classes/AbstractActor.md +4 -4
  6. package/api/@xmachines/play-actor/interfaces/PlaySpec.md +2 -2
  7. package/api/@xmachines/play-actor/interfaces/Routable.md +3 -3
  8. package/api/@xmachines/play-actor/interfaces/ViewMetadata.md +3 -3
  9. package/api/@xmachines/play-actor/interfaces/Viewable.md +2 -2
  10. package/api/@xmachines/play-dom/classes/PlayRenderer.md +4 -4
  11. package/api/@xmachines/play-dom/functions/connectRenderer.md +1 -1
  12. package/api/@xmachines/play-dom/functions/renderSpec.md +1 -1
  13. package/api/@xmachines/play-dom/interfaces/ConnectRendererOptions.md +7 -7
  14. package/api/@xmachines/play-dom/interfaces/DomRenderContext.md +7 -7
  15. package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +3 -3
  16. package/api/@xmachines/play-dom/type-aliases/DomComponentRenderer.md +1 -1
  17. package/api/@xmachines/play-dom/type-aliases/DomRegistry.md +1 -1
  18. package/api/@xmachines/play-react/README.md +7 -2
  19. package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +9 -5
  20. package/api/@xmachines/play-react/functions/useActor.md +1 -1
  21. package/api/@xmachines/play-react/functions/useSignalEffect.md +1 -1
  22. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +4 -4
  23. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +3 -3
  24. package/api/@xmachines/play-react/interfaces/PlayRendererProps.md +6 -6
  25. package/api/@xmachines/play-react/type-aliases/PlayActor.md +1 -1
  26. package/api/@xmachines/play-react/variables/PlayRenderer.md +1 -1
  27. package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +23 -23
  28. package/api/@xmachines/play-react-router/classes/RouteMap.md +4 -4
  29. package/api/@xmachines/play-react-router/functions/PlayRouterProvider.md +1 -1
  30. package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +1 -1
  31. package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +9 -9
  32. package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +5 -5
  33. package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +3 -3
  34. package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +4 -4
  35. package/api/@xmachines/play-router/README.md +103 -47
  36. package/api/@xmachines/play-router/classes/BaseRouteMap.md +4 -4
  37. package/api/@xmachines/play-router/classes/RouterBridgeBase.md +21 -21
  38. package/api/@xmachines/play-router/functions/buildRouteTree.md +1 -1
  39. package/api/@xmachines/play-router/functions/connectRouter.md +1 -1
  40. package/api/@xmachines/play-router/functions/createBrowserHistory.md +1 -1
  41. package/api/@xmachines/play-router/functions/createRouteMap.md +1 -1
  42. package/api/@xmachines/play-router/functions/createRouter.md +1 -1
  43. package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +1 -1
  44. package/api/@xmachines/play-router/functions/extractMachineRoutes.md +6 -42
  45. package/api/@xmachines/play-router/functions/findRouteById.md +1 -1
  46. package/api/@xmachines/play-router/functions/findRouteByPath.md +1 -1
  47. package/api/@xmachines/play-router/functions/getNavigableRoutes.md +1 -1
  48. package/api/@xmachines/play-router/functions/getRoutableRoutes.md +1 -1
  49. package/api/@xmachines/play-router/functions/getTransitionReachableRoutes.md +38 -0
  50. package/api/@xmachines/play-router/functions/isRouteReachable.md +38 -0
  51. package/api/@xmachines/play-router/functions/machineToGraph.md +19 -0
  52. package/api/@xmachines/play-router/functions/routeExists.md +1 -1
  53. package/api/@xmachines/play-router/functions/sanitizePathname.md +40 -0
  54. package/api/@xmachines/play-router/functions/validateRouteFormat.md +9 -8
  55. package/api/@xmachines/play-router/functions/validateStateExists.md +8 -8
  56. package/api/@xmachines/play-router/interfaces/BaseRouteMapping.md +3 -3
  57. package/api/@xmachines/play-router/interfaces/BrowserHistory.md +14 -14
  58. package/api/@xmachines/play-router/interfaces/BrowserWindow.md +14 -14
  59. package/api/@xmachines/play-router/interfaces/ConnectRouterOptions.md +4 -4
  60. package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +15 -0
  61. package/api/@xmachines/play-router/interfaces/MachineNodeData.md +17 -0
  62. package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +7 -7
  63. package/api/@xmachines/play-router/interfaces/RouteInfo.md +8 -8
  64. package/api/@xmachines/play-router/interfaces/RouteMap.md +4 -4
  65. package/api/@xmachines/play-router/interfaces/RouteNode.md +12 -12
  66. package/api/@xmachines/play-router/interfaces/RouteObject.md +2 -2
  67. package/api/@xmachines/play-router/interfaces/RouteTree.md +7 -6
  68. package/api/@xmachines/play-router/interfaces/RouteWatcherHandle.md +3 -3
  69. package/api/@xmachines/play-router/interfaces/RouterBridge.md +4 -4
  70. package/api/@xmachines/play-router/interfaces/VanillaRouter.md +4 -4
  71. package/api/@xmachines/play-router/type-aliases/MachineGraph.md +20 -0
  72. package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +1 -1
  73. package/api/@xmachines/play-signals/README.md +8 -2
  74. package/api/@xmachines/play-signals/functions/watchSignal.md +8 -1
  75. package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +2 -2
  76. package/api/@xmachines/play-signals/interfaces/SignalComputed.md +2 -2
  77. package/api/@xmachines/play-signals/interfaces/SignalOptions.md +2 -2
  78. package/api/@xmachines/play-signals/interfaces/SignalState.md +3 -3
  79. package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +4 -4
  80. package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +1 -1
  81. package/api/@xmachines/play-solid/README.md +1 -1
  82. package/api/@xmachines/play-solid/functions/useActor.md +1 -1
  83. package/api/@xmachines/play-solid/interfaces/PlayRendererProps.md +6 -6
  84. package/api/@xmachines/play-solid/type-aliases/PlayActor.md +1 -1
  85. package/api/@xmachines/play-solid/variables/PlayRenderer.md +1 -1
  86. package/api/@xmachines/play-solid-router/README.md +1 -1
  87. package/api/@xmachines/play-solid-router/classes/RouteMap.md +4 -4
  88. package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +24 -24
  89. package/api/@xmachines/play-solid-router/functions/PlayRouterProvider.md +1 -1
  90. package/api/@xmachines/play-solid-router/functions/createRouteMap.md +1 -1
  91. package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +16 -16
  92. package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +9 -9
  93. package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
  94. package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +3 -3
  95. package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +4 -4
  96. package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +1 -1
  97. package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +4 -4
  98. package/api/@xmachines/play-tanstack-react-router/README.md +1 -4
  99. package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +4 -4
  100. package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +23 -23
  101. package/api/@xmachines/play-tanstack-react-router/functions/PlayRouterProvider.md +1 -1
  102. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +1 -1
  103. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +1 -1
  104. package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +28 -0
  105. package/api/@xmachines/play-tanstack-react-router/functions/extractParams.md +1 -1
  106. package/api/@xmachines/play-tanstack-react-router/functions/extractQueryParams.md +1 -1
  107. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +9 -9
  108. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +5 -5
  109. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +3 -3
  110. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +3 -3
  111. package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +4 -4
  112. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
  113. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +4 -4
  114. package/api/@xmachines/play-tanstack-solid-router/README.md +1 -1
  115. package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +4 -4
  116. package/api/@xmachines/play-tanstack-solid-router/classes/SolidRouterBridge.md +26 -25
  117. package/api/@xmachines/play-tanstack-solid-router/functions/PlayRouterProvider.md +1 -1
  118. package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +1 -1
  119. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +9 -9
  120. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
  121. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +3 -3
  122. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +4 -4
  123. package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +1 -1
  124. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +1 -1
  125. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +4 -4
  126. package/api/@xmachines/play-vue/README.md +1 -1
  127. package/api/@xmachines/play-vue/functions/defineRegistry.md +1 -1
  128. package/api/@xmachines/play-vue/functions/useActor.md +1 -1
  129. package/api/@xmachines/play-vue/interfaces/PlayRendererProps.md +5 -5
  130. package/api/@xmachines/play-vue/type-aliases/ComponentEntry.md +1 -1
  131. package/api/@xmachines/play-vue/type-aliases/ComponentsMap.md +1 -1
  132. package/api/@xmachines/play-vue/type-aliases/DefineRegistryOptions.md +2 -2
  133. package/api/@xmachines/play-vue/type-aliases/PlayActor.md +1 -1
  134. package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
  135. package/api/@xmachines/play-vue-router/README.md +2 -1
  136. package/api/@xmachines/play-vue-router/classes/RouteMap.md +7 -7
  137. package/api/@xmachines/play-vue-router/classes/VueBaseRouteMap.md +7 -7
  138. package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +27 -32
  139. package/api/@xmachines/play-vue-router/functions/createRouteMap.md +1 -1
  140. package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +9 -9
  141. package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +4 -4
  142. package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +4 -4
  143. package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +1 -1
  144. package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +1 -1
  145. package/api/@xmachines/play-xstate/README.md +6 -6
  146. package/api/@xmachines/play-xstate/classes/PlayerActor.md +12 -12
  147. package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +1 -1
  148. package/api/@xmachines/play-xstate/functions/composeGuards.md +1 -1
  149. package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +1 -1
  150. package/api/@xmachines/play-xstate/functions/contextFieldMatches.md +36 -0
  151. package/api/@xmachines/play-xstate/functions/definePlayer.md +2 -2
  152. package/api/@xmachines/play-xstate/functions/deriveRoute.md +2 -2
  153. package/api/@xmachines/play-xstate/functions/eventMatches.md +1 -1
  154. package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +1 -1
  155. package/api/@xmachines/play-xstate/functions/hasContext.md +1 -1
  156. package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +1 -1
  157. package/api/@xmachines/play-xstate/functions/negateGuard.md +1 -1
  158. package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +3 -3
  159. package/api/@xmachines/play-xstate/interfaces/PlayerFactoryResumeOptions.md +2 -2
  160. package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +6 -6
  161. package/api/@xmachines/play-xstate/interfaces/RouteContext.md +5 -5
  162. package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +1 -1
  163. package/api/@xmachines/play-xstate/type-aliases/Guard.md +1 -1
  164. package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +1 -1
  165. package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +1 -1
  166. package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +4 -4
  167. package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +4 -4
  168. package/api/@xmachines/shared/functions/defineXmVitestConfig.md +2 -2
  169. package/api/@xmachines/shared/functions/xmAliases.md +1 -1
  170. package/api/_media/play.md +447 -0
  171. package/examples/multi-router-integration.md +1 -1
  172. package/examples/routing-patterns.md +1 -1
  173. package/guides/installation.md +30 -30
  174. package/package.json +5 -3
  175. package/rfc/broker.md +100 -0
  176. package/rfc/browser.md +44 -0
  177. package/rfc/cli.md +118 -0
  178. package/rfc/git.md +61 -0
  179. package/rfc/mcp.md +43 -0
  180. package/rfc/node.md +36 -0
  181. package/rfc/play.md +447 -0
  182. package/rfc/rest.md +102 -0
  183. package/rfc/run.md +159 -0
  184. package/rfc/streams.md +168 -0
  185. package/api/@xmachines/play-router/functions/crawlMachine.md +0 -92
  186. package/api/@xmachines/play-router/functions/extractRoute.md +0 -45
  187. package/api/@xmachines/play-router/interfaces/StateVisit.md +0 -15
  188. package/api/@xmachines/play-tanstack-react-router/variables/extractMachineRoutes.md +0 -64
  189. package/api/@xmachines/play-xstate/functions/stateMatches.md +0 -25
package/rfc/broker.md ADDED
@@ -0,0 +1,100 @@
1
+ # RFC: Broker
2
+
3
+ **Status:** Draft
4
+ **Version:** 1
5
+ **Scope:** Real-time event transport, consumer coordination, run execution bindings
6
+ **Non-goals:** Persistence formats, execution semantics
7
+
8
+ ---
9
+
10
+ ## 1. Purpose
11
+
12
+ This RFC defines how **XMachines runs** are driven by streaming broker backends.
13
+
14
+ Unlike **Git**, which solves for durability and offline distribution, **Broker** solves for:
15
+
16
+ - **Liveness:** pushing events to machines in real-time
17
+ - **Coordination:** managing concurrency via consumer groups
18
+ - **Transport:** bridging the gap between topics and run streams
19
+
20
+ ---
21
+
22
+ ## 2. Separation of Concerns
23
+
24
+ This RFC establishes **Broker** as orthogonal to **Git**.
25
+
26
+ | Feature | Git (Persistence) | Broker (Execution) |
27
+ | ---------------- | ------------------------------ | ------------------------------------- |
28
+ | Role | the ledger (storage) | the pipe (transport) |
29
+ | Model | pull (fetch/clone) | push (subscribe) |
30
+ | Concurrency | optimistic locking (branching) | pessimistic locking (consumer groups) |
31
+ | Latency | batch / high latency | streaming / sub-second |
32
+ | Primary Artifact | commit (immutable record) | message (trigger) |
33
+
34
+ A typical setup uses Broker for the **hot path** (real-time execution) and Git for the **cold path** (archival/audit).
35
+
36
+ ---
37
+
38
+ ## 3. Package Model
39
+
40
+ The Broker implementation follows the adapter pattern:
41
+
42
+ - **`@xmachines/broker`** — core interfaces for `BrokerConsumer` and `BrokerProducer`
43
+ - **`@xmachines/broker-kafka`** — Kafka adapter
44
+ - **`@xmachines/broker-redpanda`** — Redpanda adapter
45
+
46
+ ---
47
+
48
+ ## 4. Execution Model
49
+
50
+ The Broker acts as the **drive mechanism** for a run. It does not replace the run; it feeds it.
51
+
52
+ ### Consumer Binding
53
+
54
+ - The Broker subscribes to a topic
55
+ - It maps the partition key to a specific **run ID**
56
+ - It instantiates the run (if not already running)
57
+
58
+ ### Stream Piping
59
+
60
+ **Inbound:**
61
+ The Broker pipes the topic partition into the run's **in stream** (`WritableStream`)
62
+
63
+ **Outbound:**
64
+ The Broker pipes the run's **out stream** (`ReadableStream`) back to a result topic or dead-letter queue
65
+
66
+ ### Backpressure
67
+
68
+ Because XMachines uses **Web Streams**, backpressure propagates automatically.
69
+
70
+ If the run is slow to process, the Broker stops fetching from the partition.
71
+
72
+ ---
73
+
74
+ ## 5. Concurrency & Ordering
75
+
76
+ [Run RFC](run.md) mandates that a run is deterministic given an ordered sequence of events.
77
+
78
+ **Broker RFC** guarantees this via **partition leasing**:
79
+
80
+ - A specific run ID is pinned to a specific partition
81
+ - The Broker's consumer group protocol ensures only one worker node holds the lease at any time
82
+
83
+ This provides the **single writer guarantee** required by the run without needing a distributed lock manager.
84
+
85
+ ---
86
+
87
+ ## 6. Invariants
88
+
89
+ 1. Transport agnostic — the run does not know it is being driven by Kafka
90
+ 2. Ordering preserved — messages from a partition are delivered in strict order
91
+ 3. At-least-once — offsets are committed only after the run has successfully processed the event
92
+ 4. Partition alignment — a single run must never span multiple partitions
93
+
94
+ ---
95
+
96
+ ## 7. Lock statement
97
+
98
+ > The Broker is the active transport binding that drives XMachines runs from real-time streams.
99
+ > It handles coordination and delivery, delegating logic to the run and persistence to the configured durability backend.
100
+ > This is Broker.
package/rfc/browser.md ADDED
@@ -0,0 +1,44 @@
1
+ # RFC: Browser
2
+
3
+ **Status:** Draft
4
+ **Version:** 1
5
+ **Scope:** Browser-native interoperability
6
+ **Non-goals:** Execution, persistence, protocols
7
+
8
+ ---
9
+
10
+ ## 1. Purpose
11
+
12
+ Defines browser-specific adapters using Web Streams.
13
+
14
+ ---
15
+
16
+ ## 2. Package Model
17
+
18
+ Alias:
19
+
20
+ - `@xmachines/browser`
21
+
22
+ Implementations:
23
+
24
+ - `browser-dom`
25
+ - `browser-ws`
26
+ - `browser-worker`
27
+
28
+ Only non-isomorphic APIs receive browser packages.
29
+
30
+ ---
31
+
32
+ ## 3. Invariants
33
+
34
+ 1. Web Streams only
35
+ 2. Optional dependency
36
+ 3. No persistence
37
+ 4. No protocol semantics
38
+
39
+ ---
40
+
41
+ ## 4. Lock statement
42
+
43
+ > Browser interop is explicit and stream-based.
44
+ > This is Browser.
package/rfc/cli.md ADDED
@@ -0,0 +1,118 @@
1
+ # RFC: CLI
2
+
3
+ **Status:** Draft
4
+ **Version:** 1
5
+ **Scope:** Command-line interface architecture, configuration, and implementation resolution
6
+ **Non-goals:** Execution semantics, protocol definitions, stream behavior
7
+
8
+ ---
9
+
10
+ ## 1. Purpose
11
+
12
+ This RFC defines the XMachines CLI architecture.
13
+
14
+ The CLI provides:
15
+
16
+ - a human-facing interface to XMachines capabilities
17
+ - configuration and defaults for implementation selection
18
+ - an orchestration layer over RFC-defined capabilities
19
+
20
+ The CLI does not define behavior. It selects and wires implementations.
21
+
22
+ ---
23
+
24
+ ## 2. Design Principles
25
+
26
+ 1. CLI is optional
27
+ 2. CLI never defines semantics
28
+ 3. CLI resolves implementations explicitly
29
+ 4. Configuration is explicit and persistent
30
+ 5. Alias packages expose commands, implementation packages implement behavior
31
+
32
+ ---
33
+
34
+ ## 3. Package Structure
35
+
36
+ - `@xmachines/cli`
37
+ - built using oclif
38
+ - contains command definitions and shared helpers only
39
+
40
+ ---
41
+
42
+ ## 4. Implementation Resolution
43
+
44
+ Resolution order:
45
+
46
+ 1. explicit CLI flags
47
+ 2. persisted configuration
48
+ 3. alias-level defaults (if any)
49
+ 4. error
50
+
51
+ Implementation identifiers are stored as fully qualified package names.
52
+ If no scope is provided, default scope is `@xmachines/`.
53
+
54
+ ---
55
+
56
+ ## 5. Configuration Model
57
+
58
+ - stored via oclif config
59
+ - user-scoped
60
+ - persistent across upgrades
61
+
62
+ Defaults follow a first-writer-wins strategy.
63
+
64
+ ---
65
+
66
+ ## 6. Install & Uninstall Hooks
67
+
68
+ Implementation packages MAY:
69
+
70
+ - suggest themselves as defaults on install
71
+ - respect `if-not-set` or `quiet` strategies
72
+ - avoid auto-reassignment on uninstall
73
+
74
+ Uninstall MAY support an explicit purge option to remove config entries.
75
+
76
+ ---
77
+
78
+ ## 7. Feature Enablement
79
+
80
+ Some capabilities expose features (e.g. REST, Git, MCP).
81
+
82
+ Rules:
83
+
84
+ - features map to installed packages
85
+ - enablement is explicit
86
+ - disablement requires explicit flags
87
+
88
+ ---
89
+
90
+ ## 8. Scope Boundaries
91
+
92
+ The CLI:
93
+
94
+ - wires components
95
+ - launches servers
96
+ - manages configuration
97
+
98
+ The CLI does NOT:
99
+
100
+ - define protocol semantics
101
+ - parse stream payloads
102
+ - implement execution logic
103
+
104
+ ---
105
+
106
+ ## 9. Invariants
107
+
108
+ 1. No implicit defaults
109
+ 2. Explicit implementation selection
110
+ 3. CLI never defines semantics
111
+
112
+ ---
113
+
114
+ ## 10. Lock statement
115
+
116
+ > The CLI is an orchestration and configuration layer only.
117
+ > All semantics live in other RFCs.
118
+ > This is CLI.
package/rfc/git.md ADDED
@@ -0,0 +1,61 @@
1
+ # RFC: Git
2
+
3
+ **Status:** Draft
4
+ **Version:** 1
5
+ **Scope:** Durable streams and distribution
6
+ **Non-goals:** Runtime execution
7
+
8
+ ---
9
+
10
+ ## 1. Purpose
11
+
12
+ Git is used as:
13
+
14
+ - durable stream
15
+ - replication mechanism
16
+ - backup format
17
+
18
+ Git is optional.
19
+
20
+ ---
21
+
22
+ ## 2. Model
23
+
24
+ - machines = orphan branches
25
+ - runs = forks
26
+ - events = commits
27
+ - snapshots = commits
28
+
29
+ History is append-only.
30
+
31
+ ---
32
+
33
+ ## 3. Identity
34
+
35
+ - commit hashes are canonical IDs
36
+ - same algorithm used with or without Git
37
+
38
+ ---
39
+
40
+ ## 4. SmartHTTP
41
+
42
+ ```
43
+ /<repo>.git/**
44
+ ```
45
+
46
+ Standard Git semantics apply.
47
+
48
+ ---
49
+
50
+ ## 5. Invariants
51
+
52
+ 1. No history rewriting
53
+ 2. Git is optional
54
+ 3. Append-only semantics
55
+
56
+ ---
57
+
58
+ ## 6. Lock statement
59
+
60
+ > Git is a durable, append-only stream for XMachines.
61
+ > This is Git.
package/rfc/mcp.md ADDED
@@ -0,0 +1,43 @@
1
+ # RFC: MCP
2
+
3
+ **Status:** Draft
4
+ **Version:** 1
5
+ **Scope:** Model Context Protocol integration
6
+ **Non-goals:** Transport inference, execution semantics
7
+
8
+ ---
9
+
10
+ ## 1. Purpose
11
+
12
+ MCP exposes machines as **tools** to external agents.
13
+
14
+ ---
15
+
16
+ ## 2. Implementations
17
+
18
+ Examples:
19
+
20
+ - `@xmachines/mcp-http`
21
+ - `@xmachines/mcp-tty`
22
+
23
+ ---
24
+
25
+ ## 3. Server Semantics
26
+
27
+ - MCP server runs machines
28
+ - transport is irrelevant server-side
29
+ - tools map to machine events
30
+
31
+ ---
32
+
33
+ ## 4. Invariants
34
+
35
+ 1. MCP implementation selection is explicit
36
+ 2. MCP is bidirectional
37
+
38
+ ---
39
+
40
+ ## 5. Lock statement
41
+
42
+ > MCP integrates XMachines with external agents using explicit transports.
43
+ > This is MCP.
package/rfc/node.md ADDED
@@ -0,0 +1,36 @@
1
+ # RFC: Node
2
+
3
+ **Status:** Draft
4
+ **Version:** 1
5
+ **Scope:** Node.js-specific interoperability
6
+ **Non-goals:** Browser APIs, execution semantics
7
+
8
+ ---
9
+
10
+ ## 1. Purpose
11
+
12
+ Defines Node-only adapters for non-isomorphic APIs.
13
+
14
+ ---
15
+
16
+ ## 2. Packages
17
+
18
+ - `node-stream`
19
+ - `node-process`
20
+
21
+ There is no generic `@xmachines/node`.
22
+
23
+ ---
24
+
25
+ ## 3. Invariants
26
+
27
+ 1. Web Streams are canonical
28
+ 2. Node adapters are optional
29
+ 3. No protocol semantics
30
+
31
+ ---
32
+
33
+ ## 4. Lock statement
34
+
35
+ > Node interop is provided by focused adapters only.
36
+ > This is Node.