@jarenjs/flow 0.72.3 → 0.73.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.
@@ -0,0 +1,216 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://jarenjs.dev/schemas/jaren-fsm/0.2/authoring",
4
+ "title": "Jaren statechart 0.2 (authoring profile)",
5
+ "description": "Authoring profile of the canonical grammar: the document SHAPE only, with queryDocument left open. Constrains decoding on small models, where the full grammar does not decode at all. It is deliberately WEAKER than the canonical schema - a document valid here may be nonsense - so the engine compiler is the gate that makes it safe, and generated documents must be compiled before use.",
6
+ "type": "object",
7
+ "properties": {
8
+ "$fsm": {
9
+ "const": "0.2"
10
+ },
11
+ "initial": {
12
+ "type": "string",
13
+ "minLength": 1
14
+ },
15
+ "states": {
16
+ "type": "array",
17
+ "items": {
18
+ "anyOf": [
19
+ {
20
+ "type": "string",
21
+ "minLength": 1
22
+ },
23
+ {
24
+ "$ref": "#/$defs/state"
25
+ }
26
+ ]
27
+ },
28
+ "minItems": 1
29
+ },
30
+ "transitions": {
31
+ "type": "array",
32
+ "items": {
33
+ "$ref": "#/$defs/transition"
34
+ },
35
+ "minItems": 0
36
+ }
37
+ },
38
+ "required": [
39
+ "$fsm",
40
+ "initial",
41
+ "states",
42
+ "transitions"
43
+ ],
44
+ "additionalProperties": false,
45
+ "$defs": {
46
+ "effects": {
47
+ "description": "Effect descriptors, returned as resolved data when their state or transition fires — the engine never executes them.",
48
+ "type": "array",
49
+ "items": {
50
+ "type": "object",
51
+ "properties": {
52
+ "run": {
53
+ "description": "The host-registered handler name.",
54
+ "type": "string",
55
+ "minLength": 1
56
+ },
57
+ "with": {
58
+ "description": "Handler props: a Jaren JSON Query document evaluated against the scope at fire time; an empty result omits the member.",
59
+ "allOf": [
60
+ {
61
+ "$ref": "#/$defs/queryDocument"
62
+ }
63
+ ]
64
+ }
65
+ },
66
+ "required": [
67
+ "run"
68
+ ]
69
+ }
70
+ },
71
+ "queryDocument": {
72
+ "description": "A Jaren query expression; validate against the full grammar and compile locally."
73
+ },
74
+ "state": {
75
+ "type": "object",
76
+ "properties": {
77
+ "id": {
78
+ "type": "string",
79
+ "minLength": 1
80
+ },
81
+ "parent": {
82
+ "type": "string",
83
+ "minLength": 1
84
+ },
85
+ "initial": {
86
+ "type": "string",
87
+ "minLength": 1
88
+ },
89
+ "type": {
90
+ "enum": [
91
+ "atomic",
92
+ "compound",
93
+ "parallel",
94
+ "final",
95
+ "history"
96
+ ]
97
+ },
98
+ "history": {
99
+ "enum": [
100
+ "shallow",
101
+ "deep"
102
+ ]
103
+ },
104
+ "final": {
105
+ "type": "boolean"
106
+ },
107
+ "entry": {
108
+ "$ref": "#/$defs/effects"
109
+ },
110
+ "exit": {
111
+ "$ref": "#/$defs/effects"
112
+ }
113
+ },
114
+ "required": [
115
+ "id"
116
+ ],
117
+ "additionalProperties": false
118
+ },
119
+ "transition": {
120
+ "type": "object",
121
+ "properties": {
122
+ "from": {
123
+ "type": "string",
124
+ "minLength": 1
125
+ },
126
+ "to": {
127
+ "type": "string",
128
+ "minLength": 1
129
+ },
130
+ "event": {
131
+ "type": [
132
+ "string",
133
+ "null"
134
+ ]
135
+ },
136
+ "after": {
137
+ "type": "number",
138
+ "minimum": 0
139
+ },
140
+ "done": {
141
+ "const": true
142
+ },
143
+ "always": {
144
+ "const": true
145
+ },
146
+ "type": {
147
+ "enum": [
148
+ "internal",
149
+ "external"
150
+ ]
151
+ },
152
+ "guard": {
153
+ "$ref": "#/$defs/queryDocument"
154
+ },
155
+ "effects": {
156
+ "$ref": "#/$defs/effects"
157
+ }
158
+ },
159
+ "required": [
160
+ "from",
161
+ "to"
162
+ ],
163
+ "additionalProperties": false,
164
+ "allOf": [
165
+ {
166
+ "not": {
167
+ "required": [
168
+ "event",
169
+ "after"
170
+ ]
171
+ }
172
+ },
173
+ {
174
+ "not": {
175
+ "required": [
176
+ "event",
177
+ "done"
178
+ ]
179
+ }
180
+ },
181
+ {
182
+ "not": {
183
+ "required": [
184
+ "event",
185
+ "always"
186
+ ]
187
+ }
188
+ },
189
+ {
190
+ "not": {
191
+ "required": [
192
+ "after",
193
+ "done"
194
+ ]
195
+ }
196
+ },
197
+ {
198
+ "not": {
199
+ "required": [
200
+ "after",
201
+ "always"
202
+ ]
203
+ }
204
+ },
205
+ {
206
+ "not": {
207
+ "required": [
208
+ "done",
209
+ "always"
210
+ ]
211
+ }
212
+ }
213
+ ]
214
+ }
215
+ }
216
+ }
@@ -0,0 +1,216 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://jarenjs.dev/schemas/jaren-fsm/0.2/draft-07",
4
+ "title": "Jaren statechart 0.2",
5
+ "description": "Pure explicit-time statecharts. The compiler proves hierarchy, initial states, legal transition domains and history configuration; this grammar validates document structure.",
6
+ "type": "object",
7
+ "properties": {
8
+ "$fsm": {
9
+ "const": "0.2"
10
+ },
11
+ "initial": {
12
+ "type": "string",
13
+ "minLength": 1
14
+ },
15
+ "states": {
16
+ "type": "array",
17
+ "items": {
18
+ "anyOf": [
19
+ {
20
+ "type": "string",
21
+ "minLength": 1
22
+ },
23
+ {
24
+ "$ref": "#/definitions/state"
25
+ }
26
+ ]
27
+ },
28
+ "minItems": 1
29
+ },
30
+ "transitions": {
31
+ "type": "array",
32
+ "items": {
33
+ "$ref": "#/definitions/transition"
34
+ },
35
+ "minItems": 0
36
+ }
37
+ },
38
+ "required": [
39
+ "$fsm",
40
+ "initial",
41
+ "states",
42
+ "transitions"
43
+ ],
44
+ "additionalProperties": false,
45
+ "definitions": {
46
+ "effects": {
47
+ "description": "Effect descriptors, returned as resolved data when their state or transition fires — the engine never executes them.",
48
+ "type": "array",
49
+ "items": {
50
+ "type": "object",
51
+ "properties": {
52
+ "run": {
53
+ "description": "The host-registered handler name.",
54
+ "type": "string",
55
+ "minLength": 1
56
+ },
57
+ "with": {
58
+ "description": "Handler props: a Jaren JSON Query document evaluated against the scope at fire time; an empty result omits the member.",
59
+ "allOf": [
60
+ {
61
+ "$ref": "#/definitions/queryDocument"
62
+ }
63
+ ]
64
+ }
65
+ },
66
+ "required": [
67
+ "run"
68
+ ]
69
+ }
70
+ },
71
+ "queryDocument": {
72
+ "$ref": "https://jarenjs.dev/schemas/jaren-query/0.1/draft-07"
73
+ },
74
+ "state": {
75
+ "type": "object",
76
+ "properties": {
77
+ "id": {
78
+ "type": "string",
79
+ "minLength": 1
80
+ },
81
+ "parent": {
82
+ "type": "string",
83
+ "minLength": 1
84
+ },
85
+ "initial": {
86
+ "type": "string",
87
+ "minLength": 1
88
+ },
89
+ "type": {
90
+ "enum": [
91
+ "atomic",
92
+ "compound",
93
+ "parallel",
94
+ "final",
95
+ "history"
96
+ ]
97
+ },
98
+ "history": {
99
+ "enum": [
100
+ "shallow",
101
+ "deep"
102
+ ]
103
+ },
104
+ "final": {
105
+ "type": "boolean"
106
+ },
107
+ "entry": {
108
+ "$ref": "#/definitions/effects"
109
+ },
110
+ "exit": {
111
+ "$ref": "#/definitions/effects"
112
+ }
113
+ },
114
+ "required": [
115
+ "id"
116
+ ],
117
+ "additionalProperties": false
118
+ },
119
+ "transition": {
120
+ "type": "object",
121
+ "properties": {
122
+ "from": {
123
+ "type": "string",
124
+ "minLength": 1
125
+ },
126
+ "to": {
127
+ "type": "string",
128
+ "minLength": 1
129
+ },
130
+ "event": {
131
+ "type": [
132
+ "string",
133
+ "null"
134
+ ]
135
+ },
136
+ "after": {
137
+ "type": "number",
138
+ "minimum": 0
139
+ },
140
+ "done": {
141
+ "const": true
142
+ },
143
+ "always": {
144
+ "const": true
145
+ },
146
+ "type": {
147
+ "enum": [
148
+ "internal",
149
+ "external"
150
+ ]
151
+ },
152
+ "guard": {
153
+ "$ref": "#/definitions/queryDocument"
154
+ },
155
+ "effects": {
156
+ "$ref": "#/definitions/effects"
157
+ }
158
+ },
159
+ "required": [
160
+ "from",
161
+ "to"
162
+ ],
163
+ "additionalProperties": false,
164
+ "allOf": [
165
+ {
166
+ "not": {
167
+ "required": [
168
+ "event",
169
+ "after"
170
+ ]
171
+ }
172
+ },
173
+ {
174
+ "not": {
175
+ "required": [
176
+ "event",
177
+ "done"
178
+ ]
179
+ }
180
+ },
181
+ {
182
+ "not": {
183
+ "required": [
184
+ "event",
185
+ "always"
186
+ ]
187
+ }
188
+ },
189
+ {
190
+ "not": {
191
+ "required": [
192
+ "after",
193
+ "done"
194
+ ]
195
+ }
196
+ },
197
+ {
198
+ "not": {
199
+ "required": [
200
+ "after",
201
+ "always"
202
+ ]
203
+ }
204
+ },
205
+ {
206
+ "not": {
207
+ "required": [
208
+ "done",
209
+ "always"
210
+ ]
211
+ }
212
+ }
213
+ ]
214
+ }
215
+ }
216
+ }
@@ -0,0 +1,216 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://jarenjs.dev/schemas/jaren-fsm/0.2",
4
+ "title": "Jaren statechart 0.2",
5
+ "description": "Pure explicit-time statecharts. The compiler proves hierarchy, initial states, legal transition domains and history configuration; this grammar validates document structure.",
6
+ "type": "object",
7
+ "properties": {
8
+ "$fsm": {
9
+ "const": "0.2"
10
+ },
11
+ "initial": {
12
+ "type": "string",
13
+ "minLength": 1
14
+ },
15
+ "states": {
16
+ "type": "array",
17
+ "items": {
18
+ "anyOf": [
19
+ {
20
+ "type": "string",
21
+ "minLength": 1
22
+ },
23
+ {
24
+ "$ref": "#/$defs/state"
25
+ }
26
+ ]
27
+ },
28
+ "minItems": 1
29
+ },
30
+ "transitions": {
31
+ "type": "array",
32
+ "items": {
33
+ "$ref": "#/$defs/transition"
34
+ },
35
+ "minItems": 0
36
+ }
37
+ },
38
+ "required": [
39
+ "$fsm",
40
+ "initial",
41
+ "states",
42
+ "transitions"
43
+ ],
44
+ "additionalProperties": false,
45
+ "$defs": {
46
+ "effects": {
47
+ "description": "Effect descriptors, returned as resolved data when their state or transition fires — the engine never executes them.",
48
+ "type": "array",
49
+ "items": {
50
+ "type": "object",
51
+ "properties": {
52
+ "run": {
53
+ "description": "The host-registered handler name.",
54
+ "type": "string",
55
+ "minLength": 1
56
+ },
57
+ "with": {
58
+ "description": "Handler props: a Jaren JSON Query document evaluated against the scope at fire time; an empty result omits the member.",
59
+ "allOf": [
60
+ {
61
+ "$ref": "#/$defs/queryDocument"
62
+ }
63
+ ]
64
+ }
65
+ },
66
+ "required": [
67
+ "run"
68
+ ]
69
+ }
70
+ },
71
+ "queryDocument": {
72
+ "$ref": "https://jarenjs.dev/schemas/jaren-query/0.1"
73
+ },
74
+ "state": {
75
+ "type": "object",
76
+ "properties": {
77
+ "id": {
78
+ "type": "string",
79
+ "minLength": 1
80
+ },
81
+ "parent": {
82
+ "type": "string",
83
+ "minLength": 1
84
+ },
85
+ "initial": {
86
+ "type": "string",
87
+ "minLength": 1
88
+ },
89
+ "type": {
90
+ "enum": [
91
+ "atomic",
92
+ "compound",
93
+ "parallel",
94
+ "final",
95
+ "history"
96
+ ]
97
+ },
98
+ "history": {
99
+ "enum": [
100
+ "shallow",
101
+ "deep"
102
+ ]
103
+ },
104
+ "final": {
105
+ "type": "boolean"
106
+ },
107
+ "entry": {
108
+ "$ref": "#/$defs/effects"
109
+ },
110
+ "exit": {
111
+ "$ref": "#/$defs/effects"
112
+ }
113
+ },
114
+ "required": [
115
+ "id"
116
+ ],
117
+ "additionalProperties": false
118
+ },
119
+ "transition": {
120
+ "type": "object",
121
+ "properties": {
122
+ "from": {
123
+ "type": "string",
124
+ "minLength": 1
125
+ },
126
+ "to": {
127
+ "type": "string",
128
+ "minLength": 1
129
+ },
130
+ "event": {
131
+ "type": [
132
+ "string",
133
+ "null"
134
+ ]
135
+ },
136
+ "after": {
137
+ "type": "number",
138
+ "minimum": 0
139
+ },
140
+ "done": {
141
+ "const": true
142
+ },
143
+ "always": {
144
+ "const": true
145
+ },
146
+ "type": {
147
+ "enum": [
148
+ "internal",
149
+ "external"
150
+ ]
151
+ },
152
+ "guard": {
153
+ "$ref": "#/$defs/queryDocument"
154
+ },
155
+ "effects": {
156
+ "$ref": "#/$defs/effects"
157
+ }
158
+ },
159
+ "required": [
160
+ "from",
161
+ "to"
162
+ ],
163
+ "additionalProperties": false,
164
+ "allOf": [
165
+ {
166
+ "not": {
167
+ "required": [
168
+ "event",
169
+ "after"
170
+ ]
171
+ }
172
+ },
173
+ {
174
+ "not": {
175
+ "required": [
176
+ "event",
177
+ "done"
178
+ ]
179
+ }
180
+ },
181
+ {
182
+ "not": {
183
+ "required": [
184
+ "event",
185
+ "always"
186
+ ]
187
+ }
188
+ },
189
+ {
190
+ "not": {
191
+ "required": [
192
+ "after",
193
+ "done"
194
+ ]
195
+ }
196
+ },
197
+ {
198
+ "not": {
199
+ "required": [
200
+ "after",
201
+ "always"
202
+ ]
203
+ }
204
+ },
205
+ {
206
+ "not": {
207
+ "required": [
208
+ "done",
209
+ "always"
210
+ ]
211
+ }
212
+ }
213
+ ]
214
+ }
215
+ }
216
+ }