@cynodia/axiom-server 0.13.0-alpha.1 → 0.14.0-alpha.1

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 (60) hide show
  1. package/conformance/live/aggregate-reset.json +1 -1
  2. package/conformance/live/dependency-commit-no-change.json +1 -1
  3. package/conformance/live/f2-state-ref-refused.json +430 -0
  4. package/conformance/live/initial-result.json +1 -1
  5. package/conformance/live/insert-on-filter-entry.json +1 -1
  6. package/conformance/live/limit-boundary.json +1 -1
  7. package/conformance/live/manifest.json +18 -1
  8. package/conformance/live/not-live-capable.json +1 -1
  9. package/conformance/live/provider-only-sequence.json +485 -0
  10. package/conformance/live/provider-record-remove.json +1 -1
  11. package/conformance/live/remove-on-filter-exit.json +1 -1
  12. package/conformance/live/update-with-move.json +1 -1
  13. package/conformance/live/update-without-move.json +1 -1
  14. package/conformance/workflow/manifest.json +94 -0
  15. package/conformance/workflow/workflow-action-on-error.json +278 -0
  16. package/conformance/workflow/workflow-action-retry.json +296 -0
  17. package/conformance/workflow/workflow-action-success.json +268 -0
  18. package/conformance/workflow/workflow-action-terminal-failure.json +274 -0
  19. package/conformance/workflow/workflow-branch-false.json +267 -0
  20. package/conformance/workflow/workflow-branch-true.json +267 -0
  21. package/conformance/workflow/workflow-cancel-waiting.json +278 -0
  22. package/conformance/workflow/workflow-event-match.json +277 -0
  23. package/conformance/workflow/workflow-event-nonmatch.json +275 -0
  24. package/conformance/workflow/workflow-event-timeout.json +274 -0
  25. package/conformance/workflow/workflow-start-complete.json +264 -0
  26. package/conformance/workflow/workflow-start-idempotency.json +264 -0
  27. package/conformance/workflow/workflow-timer.json +270 -0
  28. package/dist/data-provider.d.ts +17 -0
  29. package/dist/deps.d.ts +2 -2
  30. package/dist/deps.js +1 -1
  31. package/dist/index.d.ts +4 -0
  32. package/dist/index.js +4 -0
  33. package/dist/live-query-conformance.js +5 -1
  34. package/dist/live-query.d.ts +2 -2
  35. package/dist/live-query.js +2 -2
  36. package/dist/memory-data-provider.js +10 -0
  37. package/dist/persistence.d.ts +32 -0
  38. package/dist/persistence.js +24 -0
  39. package/dist/server.d.ts +59 -0
  40. package/dist/server.js +233 -32
  41. package/dist/sqlite-data-provider.js +16 -0
  42. package/dist/sqlite-persistence.js +46 -0
  43. package/dist/sqlite-workflow-store.d.ts +25 -0
  44. package/dist/sqlite-workflow-store.js +382 -0
  45. package/dist/workflow-conformance.d.ts +65 -0
  46. package/dist/workflow-conformance.js +75 -0
  47. package/dist/workflow-store.d.ts +212 -0
  48. package/dist/workflow-store.js +226 -0
  49. package/dist/workflows.d.ts +111 -0
  50. package/dist/workflows.js +720 -0
  51. package/package.json +3 -3
  52. package/schema/protocol.v1.schema.json +1 -1
  53. package/schema/server-ir.v1.schema.json +1 -1
  54. package/schema/server-ir.v2.schema.json +1 -1
  55. package/schema/server-ir.v3.schema.json +1 -1
  56. package/schema/server-ir.v4.schema.json +1 -1
  57. package/schema/server-ir.v5.schema.json +1 -1
  58. package/schema/server-ir.v6.schema.json +1 -1
  59. package/schema/server-ir.v7.schema.json +1 -1
  60. package/schema/server-ir.v8.schema.json +2899 -0
@@ -10,7 +10,7 @@
10
10
  "contract": "axiom.server.v6",
11
11
  "id": "live-query-conformance",
12
12
  "name": "Live Query Conformance",
13
- "version": "0.13.0-alpha.1",
13
+ "version": "0.14.0-alpha.1",
14
14
  "entities": [
15
15
  {
16
16
  "id": "entity_order",
@@ -10,7 +10,7 @@
10
10
  "contract": "axiom.server.v6",
11
11
  "id": "live-query-conformance",
12
12
  "name": "Live Query Conformance",
13
- "version": "0.13.0-alpha.1",
13
+ "version": "0.14.0-alpha.1",
14
14
  "entities": [
15
15
  {
16
16
  "id": "entity_order",
@@ -0,0 +1,430 @@
1
+ {
2
+ "conformance": "axiom.conformance.v7",
3
+ "name": "f2-state-ref-refused",
4
+ "covers": [
5
+ "f2",
6
+ "query-scope",
7
+ "validation"
8
+ ],
9
+ "description": "A hand-tampered Server IR whose query filter references a StateDef. Opening a live query on it is refused with QUERY_STATE_REF_NOT_ALLOWED — the runtime never serves a plausible-but-wrong result (spec13.1 F2, §81).",
10
+ "serverIR": {
11
+ "contract": "axiom.server.v6",
12
+ "id": "live-query-conformance",
13
+ "name": "Live Query Conformance",
14
+ "version": "0.14.0-alpha.1",
15
+ "entities": [
16
+ {
17
+ "id": "entity_order",
18
+ "kind": "entity",
19
+ "identityFieldId": "field_order_id",
20
+ "fields": [
21
+ {
22
+ "id": "field_order_id",
23
+ "valueType": {
24
+ "kind": "primitive",
25
+ "primitive": "string"
26
+ },
27
+ "required": true
28
+ },
29
+ {
30
+ "id": "field_order_status",
31
+ "valueType": {
32
+ "kind": "enum",
33
+ "values": [
34
+ "open",
35
+ "closed"
36
+ ]
37
+ },
38
+ "required": true
39
+ },
40
+ {
41
+ "id": "field_order_total",
42
+ "valueType": {
43
+ "kind": "primitive",
44
+ "primitive": "number"
45
+ },
46
+ "required": true
47
+ }
48
+ ]
49
+ }
50
+ ],
51
+ "fields": {
52
+ "field_order_id": {
53
+ "entityId": "entity_order",
54
+ "field": {
55
+ "id": "field_order_id",
56
+ "valueType": {
57
+ "kind": "primitive",
58
+ "primitive": "string"
59
+ },
60
+ "required": true
61
+ }
62
+ },
63
+ "field_order_status": {
64
+ "entityId": "entity_order",
65
+ "field": {
66
+ "id": "field_order_status",
67
+ "valueType": {
68
+ "kind": "enum",
69
+ "values": [
70
+ "open",
71
+ "closed"
72
+ ]
73
+ },
74
+ "required": true
75
+ }
76
+ },
77
+ "field_order_total": {
78
+ "entityId": "entity_order",
79
+ "field": {
80
+ "id": "field_order_total",
81
+ "valueType": {
82
+ "kind": "primitive",
83
+ "primitive": "number"
84
+ },
85
+ "required": true
86
+ }
87
+ }
88
+ },
89
+ "states": [
90
+ {
91
+ "id": "state_threshold",
92
+ "kind": "state",
93
+ "authority": "server",
94
+ "valueType": {
95
+ "kind": "primitive",
96
+ "primitive": "number"
97
+ },
98
+ "initialValue": 0
99
+ }
100
+ ],
101
+ "actions": {
102
+ "action_set_status": {
103
+ "id": "action_set_status",
104
+ "kind": "action",
105
+ "parameters": [
106
+ {
107
+ "id": "param_id",
108
+ "valueType": {
109
+ "kind": "primitive",
110
+ "primitive": "string"
111
+ },
112
+ "required": true
113
+ },
114
+ {
115
+ "id": "param_status",
116
+ "valueType": {
117
+ "kind": "enum",
118
+ "values": [
119
+ "open",
120
+ "closed"
121
+ ]
122
+ },
123
+ "required": true
124
+ }
125
+ ],
126
+ "operations": [
127
+ {
128
+ "kind": "set",
129
+ "target": {
130
+ "kind": "field",
131
+ "target": {
132
+ "kind": "provider-record",
133
+ "sourceEntityId": "entity_order",
134
+ "identityFieldId": "field_order_id",
135
+ "identityValue": {
136
+ "kind": "ref",
137
+ "targetId": "param_id"
138
+ }
139
+ },
140
+ "fieldId": "field_order_status"
141
+ },
142
+ "value": {
143
+ "kind": "ref",
144
+ "targetId": "param_status"
145
+ }
146
+ }
147
+ ],
148
+ "preconditions": [],
149
+ "failureModes": []
150
+ },
151
+ "action_set_total": {
152
+ "id": "action_set_total",
153
+ "kind": "action",
154
+ "parameters": [
155
+ {
156
+ "id": "param_id",
157
+ "valueType": {
158
+ "kind": "primitive",
159
+ "primitive": "string"
160
+ },
161
+ "required": true
162
+ },
163
+ {
164
+ "id": "param_total",
165
+ "valueType": {
166
+ "kind": "primitive",
167
+ "primitive": "number"
168
+ },
169
+ "required": true
170
+ }
171
+ ],
172
+ "operations": [
173
+ {
174
+ "kind": "set",
175
+ "target": {
176
+ "kind": "field",
177
+ "target": {
178
+ "kind": "provider-record",
179
+ "sourceEntityId": "entity_order",
180
+ "identityFieldId": "field_order_id",
181
+ "identityValue": {
182
+ "kind": "ref",
183
+ "targetId": "param_id"
184
+ }
185
+ },
186
+ "fieldId": "field_order_total"
187
+ },
188
+ "value": {
189
+ "kind": "ref",
190
+ "targetId": "param_total"
191
+ }
192
+ }
193
+ ],
194
+ "preconditions": [],
195
+ "failureModes": []
196
+ },
197
+ "action_remove": {
198
+ "id": "action_remove",
199
+ "kind": "action",
200
+ "parameters": [
201
+ {
202
+ "id": "param_id",
203
+ "valueType": {
204
+ "kind": "primitive",
205
+ "primitive": "string"
206
+ },
207
+ "required": true
208
+ }
209
+ ],
210
+ "operations": [
211
+ {
212
+ "kind": "remove",
213
+ "target": {
214
+ "kind": "provider-record",
215
+ "sourceEntityId": "entity_order",
216
+ "identityFieldId": "field_order_id",
217
+ "identityValue": {
218
+ "kind": "ref",
219
+ "targetId": "param_id"
220
+ }
221
+ }
222
+ }
223
+ ],
224
+ "preconditions": [],
225
+ "failureModes": []
226
+ }
227
+ },
228
+ "constraints": [],
229
+ "transitionConstraints": [],
230
+ "observableStateIds": [],
231
+ "queries": [
232
+ {
233
+ "id": "query_open_orders",
234
+ "kind": "query",
235
+ "source": "entity_order",
236
+ "rowScopeId": "scope_row",
237
+ "filter": {
238
+ "kind": "binary",
239
+ "operator": "and",
240
+ "left": {
241
+ "kind": "binary",
242
+ "operator": "eq",
243
+ "left": {
244
+ "kind": "field",
245
+ "source": {
246
+ "kind": "ref",
247
+ "targetId": "scope_row"
248
+ },
249
+ "fieldId": "field_order_status"
250
+ },
251
+ "right": {
252
+ "kind": "literal",
253
+ "value": "open"
254
+ }
255
+ },
256
+ "right": {
257
+ "kind": "binary",
258
+ "operator": "gte",
259
+ "left": {
260
+ "kind": "field",
261
+ "source": {
262
+ "kind": "ref",
263
+ "targetId": "scope_row"
264
+ },
265
+ "fieldId": "field_order_total"
266
+ },
267
+ "right": {
268
+ "kind": "ref",
269
+ "targetId": "state_threshold"
270
+ }
271
+ }
272
+ },
273
+ "sort": [
274
+ {
275
+ "key": {
276
+ "kind": "field",
277
+ "source": {
278
+ "kind": "ref",
279
+ "targetId": "scope_row"
280
+ },
281
+ "fieldId": "field_order_total"
282
+ },
283
+ "direction": "asc"
284
+ }
285
+ ],
286
+ "pagination": {
287
+ "strategy": "offset",
288
+ "maxPageSize": 100
289
+ }
290
+ },
291
+ {
292
+ "id": "query_open_top2",
293
+ "kind": "query",
294
+ "source": "entity_order",
295
+ "rowScopeId": "scope_row",
296
+ "filter": {
297
+ "kind": "binary",
298
+ "operator": "eq",
299
+ "left": {
300
+ "kind": "field",
301
+ "source": {
302
+ "kind": "ref",
303
+ "targetId": "scope_row"
304
+ },
305
+ "fieldId": "field_order_status"
306
+ },
307
+ "right": {
308
+ "kind": "literal",
309
+ "value": "open"
310
+ }
311
+ },
312
+ "sort": [
313
+ {
314
+ "key": {
315
+ "kind": "field",
316
+ "source": {
317
+ "kind": "ref",
318
+ "targetId": "scope_row"
319
+ },
320
+ "fieldId": "field_order_total"
321
+ },
322
+ "direction": "asc"
323
+ }
324
+ ],
325
+ "pagination": {
326
+ "strategy": "offset",
327
+ "maxPageSize": 2
328
+ }
329
+ },
330
+ {
331
+ "id": "query_open_total",
332
+ "kind": "query",
333
+ "source": "entity_order",
334
+ "rowScopeId": "scope_row",
335
+ "filter": {
336
+ "kind": "binary",
337
+ "operator": "eq",
338
+ "left": {
339
+ "kind": "field",
340
+ "source": {
341
+ "kind": "ref",
342
+ "targetId": "scope_row"
343
+ },
344
+ "fieldId": "field_order_status"
345
+ },
346
+ "right": {
347
+ "kind": "literal",
348
+ "value": "open"
349
+ }
350
+ },
351
+ "aggregate": [
352
+ {
353
+ "function": "sum",
354
+ "key": {
355
+ "kind": "field",
356
+ "source": {
357
+ "kind": "ref",
358
+ "targetId": "scope_row"
359
+ },
360
+ "fieldId": "field_order_total"
361
+ },
362
+ "as": "field_total"
363
+ }
364
+ ],
365
+ "pagination": {
366
+ "strategy": "offset",
367
+ "maxPageSize": 100
368
+ }
369
+ },
370
+ {
371
+ "id": "query_recent",
372
+ "kind": "query",
373
+ "source": "entity_order",
374
+ "rowScopeId": "scope_row",
375
+ "filter": {
376
+ "kind": "binary",
377
+ "operator": "gte",
378
+ "left": {
379
+ "kind": "field",
380
+ "source": {
381
+ "kind": "ref",
382
+ "targetId": "scope_row"
383
+ },
384
+ "fieldId": "field_order_total"
385
+ },
386
+ "right": {
387
+ "kind": "call",
388
+ "function": "now",
389
+ "arguments": []
390
+ }
391
+ },
392
+ "pagination": {
393
+ "strategy": "offset",
394
+ "maxPageSize": 100
395
+ }
396
+ }
397
+ ]
398
+ },
399
+ "dataset": {
400
+ "entity_order": [
401
+ {
402
+ "field_order_id": "a",
403
+ "field_order_status": "open",
404
+ "field_order_total": 30
405
+ },
406
+ {
407
+ "field_order_id": "b",
408
+ "field_order_status": "closed",
409
+ "field_order_total": 10
410
+ },
411
+ {
412
+ "field_order_id": "c",
413
+ "field_order_status": "open",
414
+ "field_order_total": 20
415
+ },
416
+ {
417
+ "field_order_id": "d",
418
+ "field_order_status": "closed",
419
+ "field_order_total": 99
420
+ }
421
+ ]
422
+ },
423
+ "open": {
424
+ "queryId": "query_open_orders"
425
+ },
426
+ "expectInitial": {
427
+ "errorCode": "QUERY_STATE_REF_NOT_ALLOWED"
428
+ },
429
+ "steps": []
430
+ }
@@ -9,7 +9,7 @@
9
9
  "contract": "axiom.server.v6",
10
10
  "id": "live-query-conformance",
11
11
  "name": "Live Query Conformance",
12
- "version": "0.13.0-alpha.1",
12
+ "version": "0.14.0-alpha.1",
13
13
  "entities": [
14
14
  {
15
15
  "id": "entity_order",
@@ -10,7 +10,7 @@
10
10
  "contract": "axiom.server.v6",
11
11
  "id": "live-query-conformance",
12
12
  "name": "Live Query Conformance",
13
- "version": "0.13.0-alpha.1",
13
+ "version": "0.14.0-alpha.1",
14
14
  "entities": [
15
15
  {
16
16
  "id": "entity_order",
@@ -9,7 +9,7 @@
9
9
  "contract": "axiom.server.v6",
10
10
  "id": "live-query-conformance",
11
11
  "name": "Live Query Conformance",
12
- "version": "0.13.0-alpha.1",
12
+ "version": "0.14.0-alpha.1",
13
13
  "entities": [
14
14
  {
15
15
  "id": "entity_order",
@@ -2,7 +2,7 @@
2
2
  "conformance": "axiom.conformance.v7",
3
3
  "baseContract": "axiom.server.v7",
4
4
  "protocol": "axiom.protocol.v1",
5
- "release": "0.13.0-alpha.1",
5
+ "release": "0.14.0-alpha.1",
6
6
  "description": "Portable live-query conformance fixtures (spec13 §152, §194). Each file carries a compiled axiom.server.v7 Server IR, a dataset of provider rows, the live query to open, its required initial result, and a script of committed mutations each paired with the live message that must follow (canonical update / whole reset / none). The runner also checks the primary invariant: folding the delivered stream must equal a fresh one-shot execution of the same QueryDef. Running one needs only a DataProvider and the semantics in docs/LIVE_QUERIES.md.",
7
7
  "fixtures": [
8
8
  {
@@ -70,6 +70,23 @@
70
70
  "capability",
71
71
  "nondeterministic"
72
72
  ]
73
+ },
74
+ {
75
+ "name": "provider-only-sequence",
76
+ "covers": [
77
+ "insert",
78
+ "remove",
79
+ "invalidation",
80
+ "f1"
81
+ ]
82
+ },
83
+ {
84
+ "name": "f2-state-ref-refused",
85
+ "covers": [
86
+ "f2",
87
+ "query-scope",
88
+ "validation"
89
+ ]
73
90
  }
74
91
  ]
75
92
  }
@@ -10,7 +10,7 @@
10
10
  "contract": "axiom.server.v6",
11
11
  "id": "live-query-conformance",
12
12
  "name": "Live Query Conformance",
13
- "version": "0.13.0-alpha.1",
13
+ "version": "0.14.0-alpha.1",
14
14
  "entities": [
15
15
  {
16
16
  "id": "entity_order",