@xmachines/docs 1.0.0-beta.19 → 1.0.0-beta.21
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/api/@xmachines/play/README.md +1 -1
- package/api/@xmachines/play/classes/PlayError.md +4 -4
- package/api/@xmachines/play/type-aliases/PlayEvent.md +3 -3
- package/api/@xmachines/play-actor/README.md +2 -2
- package/api/@xmachines/play-actor/classes/AbstractActor.md +4 -4
- package/api/@xmachines/play-actor/interfaces/PlaySpec.md +2 -2
- package/api/@xmachines/play-actor/interfaces/Routable.md +3 -3
- package/api/@xmachines/play-actor/interfaces/ViewMetadata.md +3 -3
- package/api/@xmachines/play-actor/interfaces/Viewable.md +2 -2
- package/api/@xmachines/play-dom/classes/PlayRenderer.md +4 -4
- package/api/@xmachines/play-dom/functions/connectRenderer.md +1 -1
- package/api/@xmachines/play-dom/functions/renderSpec.md +1 -1
- package/api/@xmachines/play-dom/interfaces/ConnectRendererOptions.md +7 -7
- package/api/@xmachines/play-dom/interfaces/DomRenderContext.md +7 -7
- package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +3 -3
- package/api/@xmachines/play-dom/type-aliases/DomComponentRenderer.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/DomRegistry.md +1 -1
- package/api/@xmachines/play-react/README.md +1 -1
- package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +5 -5
- package/api/@xmachines/play-react/functions/useActor.md +1 -1
- package/api/@xmachines/play-react/functions/useSignalEffect.md +1 -1
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +4 -4
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +3 -3
- package/api/@xmachines/play-react/interfaces/PlayRendererProps.md +6 -6
- package/api/@xmachines/play-react/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-react/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +21 -21
- package/api/@xmachines/play-react-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-react-router/functions/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +7 -7
- package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +4 -4
- package/api/@xmachines/play-router/README.md +1 -1
- package/api/@xmachines/play-router/classes/BaseRouteMap.md +4 -4
- package/api/@xmachines/play-router/classes/RouterBridgeBase.md +21 -21
- package/api/@xmachines/play-router/functions/buildRouteTree.md +1 -1
- package/api/@xmachines/play-router/functions/connectRouter.md +1 -1
- package/api/@xmachines/play-router/functions/createBrowserHistory.md +1 -1
- package/api/@xmachines/play-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-router/functions/createRouter.md +1 -1
- package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/extractMachineRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/findRouteById.md +1 -1
- package/api/@xmachines/play-router/functions/findRouteByPath.md +1 -1
- package/api/@xmachines/play-router/functions/getNavigableRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/getRoutableRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/getTransitionReachableRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/isRouteReachable.md +1 -1
- package/api/@xmachines/play-router/functions/machineToGraph.md +1 -1
- package/api/@xmachines/play-router/functions/routeExists.md +1 -1
- package/api/@xmachines/play-router/functions/sanitizePathname.md +1 -1
- package/api/@xmachines/play-router/functions/validateRouteFormat.md +1 -1
- package/api/@xmachines/play-router/functions/validateStateExists.md +1 -1
- package/api/@xmachines/play-router/interfaces/BaseRouteMapping.md +3 -3
- package/api/@xmachines/play-router/interfaces/BrowserHistory.md +14 -14
- package/api/@xmachines/play-router/interfaces/BrowserWindow.md +14 -14
- package/api/@xmachines/play-router/interfaces/ConnectRouterOptions.md +4 -4
- package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +3 -3
- package/api/@xmachines/play-router/interfaces/MachineNodeData.md +5 -5
- package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +7 -7
- package/api/@xmachines/play-router/interfaces/RouteInfo.md +8 -8
- package/api/@xmachines/play-router/interfaces/RouteMap.md +4 -4
- package/api/@xmachines/play-router/interfaces/RouteNode.md +10 -10
- package/api/@xmachines/play-router/interfaces/RouteObject.md +2 -2
- package/api/@xmachines/play-router/interfaces/RouteTree.md +5 -5
- package/api/@xmachines/play-router/interfaces/RouteWatcherHandle.md +3 -3
- package/api/@xmachines/play-router/interfaces/RouterBridge.md +4 -4
- package/api/@xmachines/play-router/interfaces/VanillaRouter.md +4 -4
- package/api/@xmachines/play-router/type-aliases/MachineGraph.md +1 -1
- package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +1 -1
- package/api/@xmachines/play-signals/README.md +2 -2
- package/api/@xmachines/play-signals/functions/watchSignal.md +1 -1
- package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +2 -2
- package/api/@xmachines/play-signals/interfaces/SignalComputed.md +2 -2
- package/api/@xmachines/play-signals/interfaces/SignalOptions.md +2 -2
- package/api/@xmachines/play-signals/interfaces/SignalState.md +3 -3
- package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +4 -4
- package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +1 -1
- package/api/@xmachines/play-solid/README.md +1 -1
- package/api/@xmachines/play-solid/functions/useActor.md +1 -1
- package/api/@xmachines/play-solid/interfaces/PlayRendererProps.md +6 -6
- package/api/@xmachines/play-solid/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-solid/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-solid-router/README.md +1 -1
- package/api/@xmachines/play-solid-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +22 -22
- package/api/@xmachines/play-solid-router/functions/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-solid-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +4 -4
- package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +7 -7
- package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +4 -4
- package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +4 -4
- package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +21 -21
- package/api/@xmachines/play-tanstack-react-router/functions/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/extractParams.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/extractQueryParams.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +7 -7
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +4 -4
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +4 -4
- package/api/@xmachines/play-tanstack-solid-router/README.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-tanstack-solid-router/classes/SolidRouterBridge.md +22 -22
- package/api/@xmachines/play-tanstack-solid-router/functions/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +7 -7
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +4 -4
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +4 -4
- package/api/@xmachines/play-vue/README.md +1 -1
- package/api/@xmachines/play-vue/functions/defineRegistry.md +1 -1
- package/api/@xmachines/play-vue/functions/useActor.md +1 -1
- package/api/@xmachines/play-vue/interfaces/PlayRendererProps.md +5 -5
- package/api/@xmachines/play-vue/type-aliases/ComponentEntry.md +1 -1
- package/api/@xmachines/play-vue/type-aliases/ComponentsMap.md +1 -1
- package/api/@xmachines/play-vue/type-aliases/DefineRegistryOptions.md +2 -2
- package/api/@xmachines/play-vue/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-vue-router/README.md +1 -1
- package/api/@xmachines/play-vue-router/classes/RouteMap.md +7 -7
- package/api/@xmachines/play-vue-router/classes/VueBaseRouteMap.md +7 -7
- package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +22 -22
- package/api/@xmachines/play-vue-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +7 -7
- package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +4 -4
- package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +4 -4
- package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-xstate/README.md +1 -1
- package/api/@xmachines/play-xstate/classes/PlayerActor.md +12 -12
- package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +1 -1
- package/api/@xmachines/play-xstate/functions/composeGuards.md +1 -1
- package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +1 -1
- package/api/@xmachines/play-xstate/functions/contextFieldMatches.md +1 -1
- package/api/@xmachines/play-xstate/functions/definePlayer.md +2 -2
- package/api/@xmachines/play-xstate/functions/deriveRoute.md +2 -2
- package/api/@xmachines/play-xstate/functions/eventMatches.md +1 -1
- package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +1 -1
- package/api/@xmachines/play-xstate/functions/hasContext.md +1 -1
- package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +1 -1
- package/api/@xmachines/play-xstate/functions/negateGuard.md +1 -1
- package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +3 -3
- package/api/@xmachines/play-xstate/interfaces/PlayerFactoryResumeOptions.md +2 -2
- package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +6 -6
- package/api/@xmachines/play-xstate/interfaces/RouteContext.md +5 -5
- package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/Guard.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +4 -4
- package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +4 -4
- package/api/@xmachines/shared/functions/defineXmVitestConfig.md +2 -2
- package/api/@xmachines/shared/functions/xmAliases.md +1 -1
- package/package.json +5 -3
- package/rfc/broker.md +100 -0
- package/rfc/browser.md +44 -0
- package/rfc/cli.md +118 -0
- package/rfc/git.md +61 -0
- package/rfc/mcp.md +43 -0
- package/rfc/node.md +36 -0
- package/rfc/play.md +447 -0
- package/rfc/rest.md +102 -0
- package/rfc/run.md +159 -0
- package/rfc/streams.md +168 -0
- /package/api/{_media → rfc}/play.md +0 -0
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function eventMatches<TEvent>(eventType): Guard<unknown, TEvent>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-xstate/src/guards/helpers.ts:49](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-xstate/src/guards/helpers.ts:49](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/guards/helpers.ts#L49)
|
|
10
10
|
|
|
11
11
|
Check if event type matches expected type
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function formatPlayRouteTransitions<T>(machineConfig): T;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:88](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:88](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/routing/format-play-route-transitions.ts#L88)
|
|
10
10
|
|
|
11
11
|
Formats play.route transitions from declarative route configs
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function hasContext<TContext>(path): Guard<TContext, PlayEvent>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-xstate/src/guards/helpers.ts:23](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-xstate/src/guards/helpers.ts:23](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/guards/helpers.ts#L23)
|
|
10
10
|
|
|
11
11
|
Check if context has a truthy value at path
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function isAbsoluteRoute(path): boolean;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-xstate/src/routing/derive-route.ts:150](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-xstate/src/routing/derive-route.ts:150](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/routing/derive-route.ts#L150)
|
|
10
10
|
|
|
11
11
|
Check if route path is absolute
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function negateGuard<TContext, TEvent>(guard): ComposedGuard;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-xstate/src/guards/compose.ts:203](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-xstate/src/guards/compose.ts:203](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/guards/compose.ts#L203)
|
|
10
10
|
|
|
11
11
|
Negate a guard using XState's not() helper
|
|
12
12
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: PlayerConfig\<TMachine\>
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-xstate/src/types.ts:7](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play-xstate/src/types.ts:7](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/types.ts#L7)
|
|
6
6
|
|
|
7
7
|
Configuration for definePlayer()
|
|
8
8
|
|
|
@@ -16,5 +16,5 @@ Configuration for definePlayer()
|
|
|
16
16
|
|
|
17
17
|
| Property | Type | Description | Defined in |
|
|
18
18
|
| ---------------------------------------- | ------------------------------------------------- | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
19
|
-
| <a id="property-machine"></a> `machine` | `TMachine` | XState v5 state machine | [packages/play-xstate/src/types.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
20
|
-
| <a id="property-options"></a> `options?` | [`PlayerOptions`](PlayerOptions.md)\<`TMachine`\> | Lifecycle hooks and configuration | [packages/play-xstate/src/types.ts:12](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
19
|
+
| <a id="property-machine"></a> `machine` | `TMachine` | XState v5 state machine | [packages/play-xstate/src/types.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/types.ts#L9) |
|
|
20
|
+
| <a id="property-options"></a> `options?` | [`PlayerOptions`](PlayerOptions.md)\<`TMachine`\> | Lifecycle hooks and configuration | [packages/play-xstate/src/types.ts:12](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/types.ts#L12) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: PlayerFactoryResumeOptions\<TMachine\>
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-xstate/src/types.ts:47](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play-xstate/src/types.ts:47](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/types.ts#L47)
|
|
6
6
|
|
|
7
7
|
Optional restore arguments for the player factory.
|
|
8
8
|
|
|
@@ -19,4 +19,4 @@ Mirrors XState's createActor options bag while preserving the existing
|
|
|
19
19
|
|
|
20
20
|
| Property | Type | Description | Defined in |
|
|
21
21
|
| ------------------------------------------ | --------------------------------------------------------------------------------- | ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
22
|
-
| <a id="property-snapshot"></a> `snapshot?` | [`SnapshotFrom`](https://www.jsdocs.io/package/xstate#SnapshotFrom)\<`TMachine`\> | Persisted XState snapshot used to restore actor state. | [packages/play-xstate/src/types.ts:49](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
22
|
+
| <a id="property-snapshot"></a> `snapshot?` | [`SnapshotFrom`](https://www.jsdocs.io/package/xstate#SnapshotFrom)\<`TMachine`\> | Persisted XState snapshot used to restore actor state. | [packages/play-xstate/src/types.ts:49](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/types.ts#L49) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: PlayerOptions\<TMachine\>
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-xstate/src/types.ts:20](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play-xstate/src/types.ts:20](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/types.ts#L20)
|
|
6
6
|
|
|
7
7
|
Player lifecycle hooks
|
|
8
8
|
|
|
@@ -18,8 +18,8 @@ Per CONTEXT.md: Rich set of hooks for observability
|
|
|
18
18
|
|
|
19
19
|
| Property | Type | Description | Defined in |
|
|
20
20
|
| ---------------------------------------------------- | --------------------------------------------- | -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
21
|
-
| <a id="property-onerror"></a> `onError?` | (`actor`, `error`) => `void` | Called on actor errors | [packages/play-xstate/src/types.ts:38](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
22
|
-
| <a id="property-onstart"></a> `onStart?` | (`actor`) => `void` | Called when actor starts | [packages/play-xstate/src/types.ts:22](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
23
|
-
| <a id="property-onstatechange"></a> `onStateChange?` | (`actor`, `state`) => `void` | Called when state signal changes | [packages/play-xstate/src/types.ts:35](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
24
|
-
| <a id="property-onstop"></a> `onStop?` | (`actor`) => `void` | Called when actor stops | [packages/play-xstate/src/types.ts:25](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
25
|
-
| <a id="property-ontransition"></a> `onTransition?` | (`actor`, `prevState`, `nextState`) => `void` | Called on every state transition | [packages/play-xstate/src/types.ts:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
21
|
+
| <a id="property-onerror"></a> `onError?` | (`actor`, `error`) => `void` | Called on actor errors | [packages/play-xstate/src/types.ts:38](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/types.ts#L38) |
|
|
22
|
+
| <a id="property-onstart"></a> `onStart?` | (`actor`) => `void` | Called when actor starts | [packages/play-xstate/src/types.ts:22](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/types.ts#L22) |
|
|
23
|
+
| <a id="property-onstatechange"></a> `onStateChange?` | (`actor`, `state`) => `void` | Called when state signal changes | [packages/play-xstate/src/types.ts:35](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/types.ts#L35) |
|
|
24
|
+
| <a id="property-onstop"></a> `onStop?` | (`actor`) => `void` | Called when actor stops | [packages/play-xstate/src/types.ts:25](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/types.ts#L25) |
|
|
25
|
+
| <a id="property-ontransition"></a> `onTransition?` | (`actor`, `prevState`, `nextState`) => `void` | Called on every state transition | [packages/play-xstate/src/types.ts:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/types.ts#L28) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: RouteContext
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-xstate/src/routing/types.ts:11](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play-xstate/src/routing/types.ts:11](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/routing/types.ts#L11)
|
|
6
6
|
|
|
7
7
|
Route build context from machine context
|
|
8
8
|
|
|
@@ -16,7 +16,7 @@ Route build context from machine context
|
|
|
16
16
|
|
|
17
17
|
| Property | Type | Description | Defined in |
|
|
18
18
|
| ------------------------------------------------ | ------------------------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
19
|
-
| <a id="property-basepath"></a> `basePath?` | `string` | Base path for relative routes | [packages/play-xstate/src/routing/types.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
20
|
-
| <a id="property-hash"></a> `hash?` | `string` | Hash fragment | [packages/play-xstate/src/routing/types.ts:19](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
21
|
-
| <a id="property-query"></a> `query?` | `Record`\<`string`, `unknown`\> | Query parameters | [packages/play-xstate/src/routing/types.ts:17](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
22
|
-
| <a id="property-routeparams"></a> `routeParams?` | `Record`\<`string`, `unknown`\> | Route parameters to substitute | [packages/play-xstate/src/routing/types.ts:15](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
19
|
+
| <a id="property-basepath"></a> `basePath?` | `string` | Base path for relative routes | [packages/play-xstate/src/routing/types.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/routing/types.ts#L13) |
|
|
20
|
+
| <a id="property-hash"></a> `hash?` | `string` | Hash fragment | [packages/play-xstate/src/routing/types.ts:19](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/routing/types.ts#L19) |
|
|
21
|
+
| <a id="property-query"></a> `query?` | `Record`\<`string`, `unknown`\> | Query parameters | [packages/play-xstate/src/routing/types.ts:17](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/routing/types.ts#L17) |
|
|
22
|
+
| <a id="property-routeparams"></a> `routeParams?` | `Record`\<`string`, `unknown`\> | Route parameters to substitute | [packages/play-xstate/src/routing/types.ts:15](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/routing/types.ts#L15) |
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type ComposedGuard = GuardPredicate<MachineContext, EventObject, unknown, ParameterizedObject>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-xstate/src/guards/compose.ts:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-xstate/src/guards/compose.ts:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/guards/compose.ts#L14)
|
|
10
10
|
|
|
11
11
|
Narrowest public return type for guard composition helpers.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type Guard<TContext, TEvent> = (args) => boolean;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-xstate/src/guards/types.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-xstate/src/guards/types.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/guards/types.ts#L13)
|
|
10
10
|
|
|
11
11
|
Standard XState guard function signature
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type GuardArray<TContext, TEvent> = Guard<TContext, TEvent>[] | string[];
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-xstate/src/guards/types.ts:23](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-xstate/src/guards/types.ts:23](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/guards/types.ts#L23)
|
|
10
10
|
|
|
11
11
|
Array of guard predicates or guard names
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type PlayerFactory<TMachine> = (input?, options?) => PlayerActor<TMachine>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-xstate/src/types.ts:57](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-xstate/src/types.ts:57](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/types.ts#L57)
|
|
10
10
|
|
|
11
11
|
Factory function returned by definePlayer()
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type RouteMachineConfig = object;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:52](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:52](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/routing/format-play-route-transitions.ts#L52)
|
|
10
10
|
|
|
11
11
|
Minimal structural constraint for machine configs accepted by
|
|
12
12
|
`formatPlayRouteTransitions`.
|
|
@@ -32,7 +32,7 @@ through the transform, so the return value remains directly usable by
|
|
|
32
32
|
optional context?: unknown;
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:53](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
35
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:53](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/routing/format-play-route-transitions.ts#L53)
|
|
36
36
|
|
|
37
37
|
---
|
|
38
38
|
|
|
@@ -42,7 +42,7 @@ Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:5
|
|
|
42
42
|
optional on?: Record<string, unknown>;
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:55](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
45
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:55](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/routing/format-play-route-transitions.ts#L55)
|
|
46
46
|
|
|
47
47
|
---
|
|
48
48
|
|
|
@@ -52,4 +52,4 @@ Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:5
|
|
|
52
52
|
optional states?: Record<string, unknown>;
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:54](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
55
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:54](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/routing/format-play-route-transitions.ts#L54)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type RouteStateNode = object;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:21](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:21](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/routing/format-play-route-transitions.ts#L21)
|
|
10
10
|
|
|
11
11
|
Minimal structural shape of a single XState state node as read by
|
|
12
12
|
`formatPlayRouteTransitions` when crawling the machine config.
|
|
@@ -29,7 +29,7 @@ the index signature.
|
|
|
29
29
|
optional id?: string;
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:23](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
32
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:23](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/routing/format-play-route-transitions.ts#L23)
|
|
33
33
|
|
|
34
34
|
Optional explicit state ID (e.g. `"home"`, `"settings"`). Used as the `#id` target in `play.route` events.
|
|
35
35
|
|
|
@@ -41,7 +41,7 @@ Optional explicit state ID (e.g. `"home"`, `"settings"`). Used as the `#id` targ
|
|
|
41
41
|
optional meta?: object;
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:25](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
44
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:25](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/routing/format-play-route-transitions.ts#L25)
|
|
45
45
|
|
|
46
46
|
State metadata — `meta.route` marks the state as routable.
|
|
47
47
|
|
|
@@ -61,6 +61,6 @@ URL path template (e.g. `"/profile/:username"`, `"/settings/:section?"`).
|
|
|
61
61
|
optional states?: Record<string, RouteStateNode>;
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:30](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
64
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:30](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/routing/format-play-route-transitions.ts#L30)
|
|
65
65
|
|
|
66
66
|
Nested child states, recursively crawled for additional route declarations.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function defineXmVitestConfig(importMetaUrl, overrides): object;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [src/index.ts:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [src/index.ts:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/shared/src/index.ts#L10)
|
|
10
10
|
|
|
11
11
|
Create a Vitest config with XMachines workspace defaults.
|
|
12
12
|
|
|
@@ -26,4 +26,4 @@ render it under `@xmachines/shared` instead of nested module pages.
|
|
|
26
26
|
|
|
27
27
|
| Name | Type | Defined in |
|
|
28
28
|
| ------ | ----- | ---------------------------------------------------------------------------------------------------------------------------- |
|
|
29
|
-
| `test` | `any` | [config/vitest.ts:82](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
29
|
+
| `test` | `any` | [config/vitest.ts:82](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/shared/config/vitest.ts#L82) |
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function xmAliases(importMetaUrl): Record<string, string>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [src/index.ts:20](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [src/index.ts:20](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/shared/src/index.ts#L20)
|
|
10
10
|
|
|
11
11
|
Build Vite/Vitest alias entries for all `@xmachines/*` workspace packages.
|
|
12
12
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xmachines/docs",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.21",
|
|
4
4
|
"description": "Documentation for XMachines",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"documentation",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"api",
|
|
23
23
|
"examples",
|
|
24
24
|
"guides",
|
|
25
|
+
"rfc",
|
|
25
26
|
"index.js",
|
|
26
27
|
"index.d.ts"
|
|
27
28
|
],
|
|
@@ -33,7 +34,8 @@
|
|
|
33
34
|
},
|
|
34
35
|
"./api/*": "./api/*",
|
|
35
36
|
"./examples/*": "./examples/*",
|
|
36
|
-
"./guides/*": "./guides/*"
|
|
37
|
+
"./guides/*": "./guides/*",
|
|
38
|
+
"./rfc/*": "./rfc/*"
|
|
37
39
|
},
|
|
38
40
|
"publishConfig": {
|
|
39
41
|
"access": "public"
|
|
@@ -46,7 +48,7 @@
|
|
|
46
48
|
"typedoc": "typedoc"
|
|
47
49
|
},
|
|
48
50
|
"devDependencies": {
|
|
49
|
-
"@xmachines/shared": "1.0.0-beta.
|
|
51
|
+
"@xmachines/shared": "1.0.0-beta.21",
|
|
50
52
|
"typedoc": "^0.28.18",
|
|
51
53
|
"typedoc-plugin-llms-txt": "^0.1.2",
|
|
52
54
|
"typedoc-plugin-markdown": "^4.11.0"
|
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.
|