@typeonce/effect-machine-devtools 0.24.0 → 0.26.0
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/NOTICE +4 -0
- package/README.md +13 -13
- package/dist/DevToolsProtocol.d.ts +66 -630
- package/dist/DevToolsProtocol.d.ts.map +1 -1
- package/dist/DevToolsProtocol.js +0 -190
- package/dist/DevToolsProtocol.js.map +1 -1
- package/dist/MachineDocument.d.ts +38 -18
- package/dist/MachineDocument.d.ts.map +1 -1
- package/dist/MachineDocument.js +14 -12
- package/dist/MachineDocument.js.map +1 -1
- package/dist/MachineRegistry.d.ts +22 -2
- package/dist/MachineRegistry.d.ts.map +1 -1
- package/dist/MachineWalkthrough.d.ts +171 -0
- package/dist/MachineWalkthrough.d.ts.map +1 -0
- package/dist/MachineWalkthrough.js +98 -0
- package/dist/MachineWalkthrough.js.map +1 -0
- package/dist/ProjectInspector.d.ts +0 -2
- package/dist/ProjectInspector.d.ts.map +1 -1
- package/dist/ProjectInspector.js.map +1 -1
- package/dist/client/assets/index-BsorPSDS.css +1 -0
- package/dist/client/assets/index-eiptehRd.js +37 -0
- package/dist/client/index.html +4 -4
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/internal/devServer.d.ts.map +1 -1
- package/dist/internal/devServer.js +4 -64
- package/dist/internal/devServer.js.map +1 -1
- package/dist/internal/evaluationWorker.d.ts.map +1 -1
- package/dist/internal/evaluationWorker.js +7 -263
- package/dist/internal/evaluationWorker.js.map +1 -1
- package/dist/internal/machineDocument.d.ts.map +1 -1
- package/dist/internal/machineDocument.js +3 -1
- package/dist/internal/machineDocument.js.map +1 -1
- package/dist/internal/machineWalkthrough.d.ts +26 -0
- package/dist/internal/machineWalkthrough.d.ts.map +1 -0
- package/dist/internal/machineWalkthrough.js +256 -0
- package/dist/internal/machineWalkthrough.js.map +1 -0
- package/dist/internal/projectInspector.d.ts.map +1 -1
- package/dist/internal/projectInspector.js +1 -11
- package/dist/internal/projectInspector.js.map +1 -1
- package/index.html +2 -2
- package/package.json +8 -7
- package/src/DevToolsProtocol.ts +0 -285
- package/src/MachineDocument.ts +21 -19
- package/src/MachineWalkthrough.ts +199 -0
- package/src/ProjectInspector.ts +0 -5
- package/src/index.ts +2 -2
- package/src/internal/browser/chart-layout-policy.ts +206 -0
- package/src/internal/browser/chart-layout.ts +686 -0
- package/src/internal/browser/chart-model.ts +244 -0
- package/src/internal/browser/chart-renderer.ts +774 -0
- package/src/internal/browser/example-machine.ts +15 -6
- package/src/internal/browser/input-form.ts +1 -418
- package/src/internal/browser/invoke-outcomes-example.ts +231 -0
- package/src/internal/browser/parallel-completion-example.ts +199 -0
- package/src/internal/browser/planner-example.ts +2 -0
- package/src/internal/browser/protocol-events-example.ts +200 -0
- package/src/internal/browser/styles.css +974 -342
- package/src/internal/browser/transition-semantics-example.ts +245 -0
- package/src/internal/browser/visualizer-analysis.ts +52 -0
- package/src/internal/browser/visualizer-app.ts +874 -706
- package/src/internal/browser/visualizer-model.ts +104 -0
- package/src/internal/devServer.ts +4 -82
- package/src/internal/evaluationWorker.ts +7 -371
- package/src/internal/machineDocument.ts +3 -1
- package/src/internal/machineWalkthrough.ts +355 -0
- package/src/internal/projectInspector.ts +3 -31
- package/dist/MachineSimulator.d.ts +0 -169
- package/dist/MachineSimulator.d.ts.map +0 -1
- package/dist/MachineSimulator.js +0 -98
- package/dist/MachineSimulator.js.map +0 -1
- package/dist/client/assets/index-B49Tjawc.js +0 -14
- package/dist/client/assets/index-BKH0cOG2.css +0 -1
- package/dist/internal/machineSimulator.d.ts +0 -5
- package/dist/internal/machineSimulator.d.ts.map +0 -1
- package/dist/internal/machineSimulator.js +0 -156
- package/dist/internal/machineSimulator.js.map +0 -1
- package/src/MachineSimulator.ts +0 -154
- package/src/internal/browser/simulation-client.ts +0 -20
- package/src/internal/machineSimulator.ts +0 -199
package/NOTICE
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
Portions are adapted from the Effect project, which is distributed under the
|
|
2
2
|
MIT License. See https://github.com/Effect-TS/effect and the source history for
|
|
3
3
|
authorship and provenance.
|
|
4
|
+
|
|
5
|
+
This product includes Eclipse Layout Kernel for JavaScript (elkjs), which is
|
|
6
|
+
distributed under the Eclipse Public License 2.0. See
|
|
7
|
+
https://github.com/kieler/elkjs for source and license information.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Effect Machine devtools
|
|
2
2
|
|
|
3
|
-
`@typeonce/effect-machine-devtools` scans a local project for exported Effect Machine `.handle(...)` results and serves a live
|
|
3
|
+
`@typeonce/effect-machine-devtools` scans a local project for exported Effect Machine `.handle(...)` results and serves a live, statically laid-out statechart.
|
|
4
4
|
|
|
5
5
|
The package is experimental and pre-1.0. Minor releases may change its command options, document schemas, and programmatic modules.
|
|
6
6
|
|
|
@@ -9,13 +9,13 @@ The package is experimental and pre-1.0. Minor releases may change its command o
|
|
|
9
9
|
Core and devtools always release at the same version. Install matching versions:
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
|
-
pnpm add @typeonce/effect-machine@latest effect@4.0.0-rc.
|
|
12
|
+
pnpm add @typeonce/effect-machine@latest effect@4.0.0-rc.112
|
|
13
13
|
pnpm add --save-dev @typeonce/effect-machine-devtools@latest
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
When pinning a release instead of using `latest`, use the same explicit version for both packages.
|
|
17
17
|
|
|
18
|
-
The current release requires Node.js 22.19 or newer and Effect `4.0.0-rc.
|
|
18
|
+
The current release requires Node.js 22.19 or newer and Effect `4.0.0-rc.112`.
|
|
19
19
|
|
|
20
20
|
## Run the visualizer
|
|
21
21
|
|
|
@@ -62,26 +62,26 @@ Discovery parses source files without executing them. Evaluation then loads cand
|
|
|
62
62
|
|
|
63
63
|
Run the devtools only against code you trust. The server has no authentication and binds to the loopback interface by default. Do not expose it on a public or untrusted network.
|
|
64
64
|
|
|
65
|
-
## Inspection and
|
|
65
|
+
## Inspection and walkthroughs
|
|
66
66
|
|
|
67
|
-
The visualizer shows topology
|
|
67
|
+
The visualizer shows topology as a read-only statechart with native horizontal and vertical scrolling, incremental zoom, and a fit-to-viewport overview. Machine tabs run across the top so the chart uses the rest of the viewport. States remain grouped inside their compound parents, while orthogonal routes connect each enabled transition without requiring a draggable canvas. State cards show projected value fields and invocations at a glance. A single click selects a state or transition, while a double click opens its dismissible inspector. State selection distinguishes incoming from outgoing relationships, and conditional branches with the same source and target share one topology edge while retaining their full details in the inspector.
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
The machine document includes projected value and output schemas for every state, plus the public machine and event input contracts. The browser renders those contracts as read-only field metadata: names, projected types, required or optional status, descriptions, ranges, lengths, patterns, and literal or enum values. It never asks for payload values merely to explore a static document.
|
|
70
70
|
|
|
71
|
-
Start a
|
|
71
|
+
Start a simulation to enter the document's captured configuration or its declared initial topology. Simulation mode turns transition edges into the control surface while state nodes remain read-only. Targetless transitions are rendered as self-loops, and runtime-resolved targets terminate at disabled dashed placeholders. Click an unambiguous available edge to advance directly; ambiguous branches open a compact picker at the click rather than guessing. Parallel regions stay active independently, compound states enter their declared initial child, and recorded shallow or deep history can be restored later in the same simulation.
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
Conditional branches, declinable transitions, automatic triggers, and invoke outcomes are shown as explicit choices rather than guessed. A runtime-resolved target or first use of an unrecorded history target remains visible but unavailable. Public event contracts are shown beside their choices, but values are not fabricated because no value can change a document-only decision reliably.
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
Every selected branch is retained in the immutable bottom timeline. Select an earlier step, then choose a different branch on the chart to truncate the old future and explore another path. The chart keeps candidate edges visible and reveals a new active configuration only when it falls outside the viewport.
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
Simulations do not load project modules again, call resolvers or guards, apply state updates, run Effects, start invocations, deliver events, or commit commands. They are deliberately topology-only and side-effect-free. A file change remounts the latest document; restart the simulation to explore the new revision.
|
|
78
78
|
|
|
79
79
|
## Programmatic modules
|
|
80
80
|
|
|
81
|
-
The
|
|
81
|
+
The package publishes three programmatic modules:
|
|
82
82
|
|
|
83
|
-
- `DevToolsProtocol` defines the versioned
|
|
83
|
+
- `DevToolsProtocol` defines the versioned discovery and browser registry messages.
|
|
84
84
|
- `MachineDocument` defines and constructs the serializable inspection document.
|
|
85
|
-
- `
|
|
85
|
+
- `MachineWalkthrough` provides immutable, document-only topology exploration with explicit choices, history, and time travel.
|
|
86
86
|
|
|
87
87
|
The project inspector, registry, worker, and local server remain implementation modules. Their interfaces can change without becoming package-level compatibility commitments.
|