eyeling 1.26.6 → 1.27.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.
Files changed (32) hide show
  1. package/HANDBOOK.md +100 -3
  2. package/dist/browser/eyeling.browser.js +396 -3
  3. package/examples/deck/act-barley-seed-lineage.md +1 -1
  4. package/examples/deck/faltings-genus2-finiteness.md +1 -1
  5. package/examples/deck/high-trust-rdf-bloom-envelope.md +1 -1
  6. package/examples/deck/odrl-dpv-risk-ranked.md +1 -1
  7. package/examples/deck/rdf-message-cold-chain-recall.md +71 -0
  8. package/examples/deck/rdf-message-flow.md +1 -1
  9. package/examples/deck/rdf-message-ldes-incremental.md +94 -0
  10. package/examples/deck/rdf-message-window-repair.md +175 -0
  11. package/examples/deck/schema-foaf-mapping.md +2 -0
  12. package/examples/input/rdf-message-cold-chain-recall.trig +668 -0
  13. package/examples/input/rdf-message-flow.trig +3 -0
  14. package/examples/input/rdf-message-ldes-incremental.trig +564 -0
  15. package/examples/input/rdf-message-microgrid.trig +3 -0
  16. package/examples/input/rdf-message-window-repair.trig +82 -0
  17. package/examples/input/rdf-messages.trig +3 -0
  18. package/examples/output/rdf-message-cold-chain-recall.md +13 -0
  19. package/examples/output/rdf-message-ldes-incremental.md +13 -0
  20. package/examples/output/rdf-message-window-repair.md +13 -0
  21. package/examples/rdf-message-cold-chain-recall.n3 +229 -0
  22. package/examples/rdf-message-flow.n3 +3 -0
  23. package/examples/rdf-message-ldes-incremental.n3 +231 -0
  24. package/examples/rdf-message-microgrid.n3 +3 -0
  25. package/examples/rdf-message-window-repair.n3 +166 -0
  26. package/examples/rdf-messages.n3 +3 -0
  27. package/eyeling.js +396 -3
  28. package/lib/cli.js +396 -3
  29. package/package.json +5 -3
  30. package/test/examples.test.js +25 -14
  31. package/test/fixtures/marc-rules-stream-messages.n3 +192 -0
  32. package/test/stream_messages.test.js +243 -0
@@ -0,0 +1,564 @@
1
+ # =========================================
2
+ # RDF Message LDES Incremental Repair input
3
+ # =========================================
4
+ #
5
+ # This file is the data half of the runnable example:
6
+ #
7
+ # eyeling -r examples/rdf-message-ldes-incremental.n3 examples/input/rdf-message-ldes-incremental.trig
8
+ #
9
+ # See the handbook section on RDF Message Log replay under -r:
10
+ # https://eyereasoner.github.io/eyeling/HANDBOOK#rdf-message-log-replay-under--r
11
+ #
12
+ # It serializes one LDES configuration message followed by forty append-only
13
+ # LDES member messages. A consumer checkpoint at sequence 34 lets the N3 rules
14
+ # skip the large committed prefix and repair only the new tail.
15
+
16
+ VERSION "1.2-messages"
17
+ PREFIX : <https://eyereasoner.github.io/eyeling/examples/rdf-message-ldes-incremental#>
18
+ PREFIX ldes: <https://w3id.org/ldes#>
19
+ PREFIX tree: <https://w3id.org/tree#>
20
+ PREFIX see: <https://example.org/see#>
21
+ PREFIX in: <https://example.org/see/input#>
22
+ PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
23
+
24
+ # Message 1: stable LDES stream metadata and consumer checkpoint.
25
+ :doorStream a ldes:EventStream ;
26
+ ldes:timestampPath :observedAt ;
27
+ ldes:sequencePath :sequence ;
28
+ tree:view :doorStreamPage ;
29
+ :lastCommittedSequence 34 ;
30
+ :currentWindowFromSequence 35 ;
31
+ :windowSize 6 ;
32
+ :repairPolicy :preferHigherPriority .
33
+
34
+ :open :stateText "open" ;
35
+ :actionText "dispatch an operator to inspect and close the door" .
36
+ :closed :stateText "closed" ;
37
+ :actionText "keep the compartment sealed and continue monitoring" .
38
+
39
+ in:run a see:InputDataset ;
40
+ see:name "rdf_message_ldes_incremental" ;
41
+ see:title "RDF Message LDES Incremental Repair" ;
42
+ see:sourceFile "examples/rdf-message-ldes-incremental.n3" ;
43
+ see:description "Forty LDES members serialized as RDF Messages; the rules use a sequence bookmark to reason only over the new tail." ;
44
+ see:compiler "Eyeling RDF Message Log input" .
45
+
46
+ MESSAGE
47
+
48
+ # Message 2: historical LDES member 001, already committed by the checkpoint.
49
+ :doorStream tree:member :obs-001 .
50
+
51
+ :obs-001 a :DoorObservation ;
52
+ :sequence 1 ;
53
+ :observedAt "2026-05-12T18:18:00Z"^^xsd:dateTime ;
54
+ :door :doorA ;
55
+ :doorState :closed ;
56
+ :priority 1 ;
57
+ :source "hallway-latch" .
58
+
59
+ MESSAGE
60
+
61
+ # Message 3: historical LDES member 002, already committed by the checkpoint.
62
+ :doorStream tree:member :obs-002 .
63
+
64
+ :obs-002 a :DoorObservation ;
65
+ :sequence 2 ;
66
+ :observedAt "2026-05-12T18:18:30Z"^^xsd:dateTime ;
67
+ :door :doorA ;
68
+ :doorState :closed ;
69
+ :priority 1 ;
70
+ :source "hallway-latch" .
71
+
72
+ MESSAGE
73
+
74
+ # Message 4: historical LDES member 003, already committed by the checkpoint.
75
+ :doorStream tree:member :obs-003 .
76
+
77
+ :obs-003 a :DoorObservation ;
78
+ :sequence 3 ;
79
+ :observedAt "2026-05-12T18:19:00Z"^^xsd:dateTime ;
80
+ :door :doorA ;
81
+ :doorState :closed ;
82
+ :priority 1 ;
83
+ :source "hallway-latch" .
84
+
85
+ MESSAGE
86
+
87
+ # Message 5: historical LDES member 004, already committed by the checkpoint.
88
+ :doorStream tree:member :obs-004 .
89
+
90
+ :obs-004 a :DoorObservation ;
91
+ :sequence 4 ;
92
+ :observedAt "2026-05-12T18:19:30Z"^^xsd:dateTime ;
93
+ :door :doorA ;
94
+ :doorState :closed ;
95
+ :priority 1 ;
96
+ :source "hallway-latch" .
97
+
98
+ MESSAGE
99
+
100
+ # Message 6: historical LDES member 005, already committed by the checkpoint.
101
+ :doorStream tree:member :obs-005 .
102
+
103
+ :obs-005 a :DoorObservation ;
104
+ :sequence 5 ;
105
+ :observedAt "2026-05-12T18:20:00Z"^^xsd:dateTime ;
106
+ :door :doorA ;
107
+ :doorState :closed ;
108
+ :priority 1 ;
109
+ :source "hallway-latch" .
110
+
111
+ MESSAGE
112
+
113
+ # Message 7: historical LDES member 006, already committed by the checkpoint.
114
+ :doorStream tree:member :obs-006 .
115
+
116
+ :obs-006 a :DoorObservation ;
117
+ :sequence 6 ;
118
+ :observedAt "2026-05-12T18:20:30Z"^^xsd:dateTime ;
119
+ :door :doorA ;
120
+ :doorState :closed ;
121
+ :priority 1 ;
122
+ :source "hallway-latch" .
123
+
124
+ MESSAGE
125
+
126
+ # Message 8: historical LDES member 007, already committed by the checkpoint.
127
+ :doorStream tree:member :obs-007 .
128
+
129
+ :obs-007 a :DoorObservation ;
130
+ :sequence 7 ;
131
+ :observedAt "2026-05-12T18:21:00Z"^^xsd:dateTime ;
132
+ :door :doorA ;
133
+ :doorState :open ;
134
+ :priority 1 ;
135
+ :source "maintenance-camera" .
136
+
137
+ MESSAGE
138
+
139
+ # Message 9: historical LDES member 008, already committed by the checkpoint.
140
+ :doorStream tree:member :obs-008 .
141
+
142
+ :obs-008 a :DoorObservation ;
143
+ :sequence 8 ;
144
+ :observedAt "2026-05-12T18:21:30Z"^^xsd:dateTime ;
145
+ :door :doorA ;
146
+ :doorState :closed ;
147
+ :priority 1 ;
148
+ :source "hallway-latch" .
149
+
150
+ MESSAGE
151
+
152
+ # Message 10: historical LDES member 009, already committed by the checkpoint.
153
+ :doorStream tree:member :obs-009 .
154
+
155
+ :obs-009 a :DoorObservation ;
156
+ :sequence 9 ;
157
+ :observedAt "2026-05-12T18:22:00Z"^^xsd:dateTime ;
158
+ :door :doorA ;
159
+ :doorState :closed ;
160
+ :priority 1 ;
161
+ :source "hallway-latch" .
162
+
163
+ MESSAGE
164
+
165
+ # Message 11: historical LDES member 010, already committed by the checkpoint.
166
+ :doorStream tree:member :obs-010 .
167
+
168
+ :obs-010 a :DoorObservation ;
169
+ :sequence 10 ;
170
+ :observedAt "2026-05-12T18:22:30Z"^^xsd:dateTime ;
171
+ :door :doorA ;
172
+ :doorState :closed ;
173
+ :priority 1 ;
174
+ :source "hallway-latch" .
175
+
176
+ MESSAGE
177
+
178
+ # Message 12: historical LDES member 011, already committed by the checkpoint.
179
+ :doorStream tree:member :obs-011 .
180
+
181
+ :obs-011 a :DoorObservation ;
182
+ :sequence 11 ;
183
+ :observedAt "2026-05-12T18:23:00Z"^^xsd:dateTime ;
184
+ :door :doorA ;
185
+ :doorState :closed ;
186
+ :priority 1 ;
187
+ :source "hallway-latch" .
188
+
189
+ MESSAGE
190
+
191
+ # Message 13: historical LDES member 012, already committed by the checkpoint.
192
+ :doorStream tree:member :obs-012 .
193
+
194
+ :obs-012 a :DoorObservation ;
195
+ :sequence 12 ;
196
+ :observedAt "2026-05-12T18:23:30Z"^^xsd:dateTime ;
197
+ :door :doorA ;
198
+ :doorState :closed ;
199
+ :priority 1 ;
200
+ :source "hallway-latch" .
201
+
202
+ MESSAGE
203
+
204
+ # Message 14: historical LDES member 013, already committed by the checkpoint.
205
+ :doorStream tree:member :obs-013 .
206
+
207
+ :obs-013 a :DoorObservation ;
208
+ :sequence 13 ;
209
+ :observedAt "2026-05-12T18:24:00Z"^^xsd:dateTime ;
210
+ :door :doorA ;
211
+ :doorState :closed ;
212
+ :priority 1 ;
213
+ :source "hallway-latch" .
214
+
215
+ MESSAGE
216
+
217
+ # Message 15: historical LDES member 014, already committed by the checkpoint.
218
+ :doorStream tree:member :obs-014 .
219
+
220
+ :obs-014 a :DoorObservation ;
221
+ :sequence 14 ;
222
+ :observedAt "2026-05-12T18:24:30Z"^^xsd:dateTime ;
223
+ :door :doorA ;
224
+ :doorState :open ;
225
+ :priority 1 ;
226
+ :source "maintenance-camera" .
227
+
228
+ MESSAGE
229
+
230
+ # Message 16: historical LDES member 015, already committed by the checkpoint.
231
+ :doorStream tree:member :obs-015 .
232
+
233
+ :obs-015 a :DoorObservation ;
234
+ :sequence 15 ;
235
+ :observedAt "2026-05-12T18:25:00Z"^^xsd:dateTime ;
236
+ :door :doorA ;
237
+ :doorState :closed ;
238
+ :priority 1 ;
239
+ :source "hallway-latch" .
240
+
241
+ MESSAGE
242
+
243
+ # Message 17: historical LDES member 016, already committed by the checkpoint.
244
+ :doorStream tree:member :obs-016 .
245
+
246
+ :obs-016 a :DoorObservation ;
247
+ :sequence 16 ;
248
+ :observedAt "2026-05-12T18:25:30Z"^^xsd:dateTime ;
249
+ :door :doorA ;
250
+ :doorState :closed ;
251
+ :priority 1 ;
252
+ :source "hallway-latch" .
253
+
254
+ MESSAGE
255
+
256
+ # Message 18: historical LDES member 017, already committed by the checkpoint.
257
+ :doorStream tree:member :obs-017 .
258
+
259
+ :obs-017 a :DoorObservation ;
260
+ :sequence 17 ;
261
+ :observedAt "2026-05-12T18:26:00Z"^^xsd:dateTime ;
262
+ :door :doorA ;
263
+ :doorState :closed ;
264
+ :priority 1 ;
265
+ :source "hallway-latch" .
266
+
267
+ MESSAGE
268
+
269
+ # Message 19: historical LDES member 018, already committed by the checkpoint.
270
+ :doorStream tree:member :obs-018 .
271
+
272
+ :obs-018 a :DoorObservation ;
273
+ :sequence 18 ;
274
+ :observedAt "2026-05-12T18:26:30Z"^^xsd:dateTime ;
275
+ :door :doorA ;
276
+ :doorState :closed ;
277
+ :priority 1 ;
278
+ :source "hallway-latch" .
279
+
280
+ MESSAGE
281
+
282
+ # Message 20: historical LDES member 019, already committed by the checkpoint.
283
+ :doorStream tree:member :obs-019 .
284
+
285
+ :obs-019 a :DoorObservation ;
286
+ :sequence 19 ;
287
+ :observedAt "2026-05-12T18:27:00Z"^^xsd:dateTime ;
288
+ :door :doorA ;
289
+ :doorState :closed ;
290
+ :priority 1 ;
291
+ :source "hallway-latch" .
292
+
293
+ MESSAGE
294
+
295
+ # Message 21: historical LDES member 020, already committed by the checkpoint.
296
+ :doorStream tree:member :obs-020 .
297
+
298
+ :obs-020 a :DoorObservation ;
299
+ :sequence 20 ;
300
+ :observedAt "2026-05-12T18:27:30Z"^^xsd:dateTime ;
301
+ :door :doorA ;
302
+ :doorState :closed ;
303
+ :priority 1 ;
304
+ :source "hallway-latch" .
305
+
306
+ MESSAGE
307
+
308
+ # Message 22: historical LDES member 021, already committed by the checkpoint.
309
+ :doorStream tree:member :obs-021 .
310
+
311
+ :obs-021 a :DoorObservation ;
312
+ :sequence 21 ;
313
+ :observedAt "2026-05-12T18:28:00Z"^^xsd:dateTime ;
314
+ :door :doorA ;
315
+ :doorState :open ;
316
+ :priority 1 ;
317
+ :source "maintenance-camera" .
318
+
319
+ MESSAGE
320
+
321
+ # Message 23: historical LDES member 022, already committed by the checkpoint.
322
+ :doorStream tree:member :obs-022 .
323
+
324
+ :obs-022 a :DoorObservation ;
325
+ :sequence 22 ;
326
+ :observedAt "2026-05-12T18:28:30Z"^^xsd:dateTime ;
327
+ :door :doorA ;
328
+ :doorState :closed ;
329
+ :priority 1 ;
330
+ :source "hallway-latch" .
331
+
332
+ MESSAGE
333
+
334
+ # Message 24: historical LDES member 023, already committed by the checkpoint.
335
+ :doorStream tree:member :obs-023 .
336
+
337
+ :obs-023 a :DoorObservation ;
338
+ :sequence 23 ;
339
+ :observedAt "2026-05-12T18:29:00Z"^^xsd:dateTime ;
340
+ :door :doorA ;
341
+ :doorState :closed ;
342
+ :priority 1 ;
343
+ :source "hallway-latch" .
344
+
345
+ MESSAGE
346
+
347
+ # Message 25: historical LDES member 024, already committed by the checkpoint.
348
+ :doorStream tree:member :obs-024 .
349
+
350
+ :obs-024 a :DoorObservation ;
351
+ :sequence 24 ;
352
+ :observedAt "2026-05-12T18:29:30Z"^^xsd:dateTime ;
353
+ :door :doorA ;
354
+ :doorState :closed ;
355
+ :priority 1 ;
356
+ :source "hallway-latch" .
357
+
358
+ MESSAGE
359
+
360
+ # Message 26: historical LDES member 025, already committed by the checkpoint.
361
+ :doorStream tree:member :obs-025 .
362
+
363
+ :obs-025 a :DoorObservation ;
364
+ :sequence 25 ;
365
+ :observedAt "2026-05-12T18:30:00Z"^^xsd:dateTime ;
366
+ :door :doorA ;
367
+ :doorState :closed ;
368
+ :priority 1 ;
369
+ :source "hallway-latch" .
370
+
371
+ MESSAGE
372
+
373
+ # Message 27: historical LDES member 026, already committed by the checkpoint.
374
+ :doorStream tree:member :obs-026 .
375
+
376
+ :obs-026 a :DoorObservation ;
377
+ :sequence 26 ;
378
+ :observedAt "2026-05-12T18:30:30Z"^^xsd:dateTime ;
379
+ :door :doorA ;
380
+ :doorState :closed ;
381
+ :priority 1 ;
382
+ :source "hallway-latch" .
383
+
384
+ MESSAGE
385
+
386
+ # Message 28: historical LDES member 027, already committed by the checkpoint.
387
+ :doorStream tree:member :obs-027 .
388
+
389
+ :obs-027 a :DoorObservation ;
390
+ :sequence 27 ;
391
+ :observedAt "2026-05-12T18:31:00Z"^^xsd:dateTime ;
392
+ :door :doorA ;
393
+ :doorState :closed ;
394
+ :priority 1 ;
395
+ :source "hallway-latch" .
396
+
397
+ MESSAGE
398
+
399
+ # Message 29: historical LDES member 028, already committed by the checkpoint.
400
+ :doorStream tree:member :obs-028 .
401
+
402
+ :obs-028 a :DoorObservation ;
403
+ :sequence 28 ;
404
+ :observedAt "2026-05-12T18:31:30Z"^^xsd:dateTime ;
405
+ :door :doorA ;
406
+ :doorState :open ;
407
+ :priority 1 ;
408
+ :source "maintenance-camera" .
409
+
410
+ MESSAGE
411
+
412
+ # Message 30: historical LDES member 029, already committed by the checkpoint.
413
+ :doorStream tree:member :obs-029 .
414
+
415
+ :obs-029 a :DoorObservation ;
416
+ :sequence 29 ;
417
+ :observedAt "2026-05-12T18:32:00Z"^^xsd:dateTime ;
418
+ :door :doorA ;
419
+ :doorState :closed ;
420
+ :priority 1 ;
421
+ :source "hallway-latch" .
422
+
423
+ MESSAGE
424
+
425
+ # Message 31: historical LDES member 030, already committed by the checkpoint.
426
+ :doorStream tree:member :obs-030 .
427
+
428
+ :obs-030 a :DoorObservation ;
429
+ :sequence 30 ;
430
+ :observedAt "2026-05-12T18:32:30Z"^^xsd:dateTime ;
431
+ :door :doorA ;
432
+ :doorState :closed ;
433
+ :priority 1 ;
434
+ :source "hallway-latch" .
435
+
436
+ MESSAGE
437
+
438
+ # Message 32: historical LDES member 031, already committed by the checkpoint.
439
+ :doorStream tree:member :obs-031 .
440
+
441
+ :obs-031 a :DoorObservation ;
442
+ :sequence 31 ;
443
+ :observedAt "2026-05-12T18:33:00Z"^^xsd:dateTime ;
444
+ :door :doorA ;
445
+ :doorState :closed ;
446
+ :priority 1 ;
447
+ :source "hallway-latch" .
448
+
449
+ MESSAGE
450
+
451
+ # Message 33: historical LDES member 032, already committed by the checkpoint.
452
+ :doorStream tree:member :obs-032 .
453
+
454
+ :obs-032 a :DoorObservation ;
455
+ :sequence 32 ;
456
+ :observedAt "2026-05-12T18:33:30Z"^^xsd:dateTime ;
457
+ :door :doorA ;
458
+ :doorState :open ;
459
+ :priority 1 ;
460
+ :source "maintenance-camera" .
461
+
462
+ MESSAGE
463
+
464
+ # Message 34: historical LDES member 033, already committed by the checkpoint.
465
+ :doorStream tree:member :obs-033 .
466
+
467
+ :obs-033 a :DoorObservation ;
468
+ :sequence 33 ;
469
+ :observedAt "2026-05-12T18:34:00Z"^^xsd:dateTime ;
470
+ :door :doorA ;
471
+ :doorState :closed ;
472
+ :priority 1 ;
473
+ :source "hallway-latch" .
474
+
475
+ MESSAGE
476
+
477
+ # Message 35: historical LDES member 034, already committed by the checkpoint.
478
+ :doorStream tree:member :obs-034 .
479
+
480
+ :obs-034 a :DoorObservation ;
481
+ :sequence 34 ;
482
+ :observedAt "2026-05-12T18:34:30Z"^^xsd:dateTime ;
483
+ :door :doorA ;
484
+ :doorState :closed ;
485
+ :priority 1 ;
486
+ :source "hallway-latch" .
487
+
488
+ MESSAGE
489
+
490
+ # Message 36: first new tail member after the LDES checkpoint.
491
+ :doorStream tree:member :obs-035 .
492
+
493
+ :obs-035 a :DoorObservation ;
494
+ :sequence 35 ;
495
+ :observedAt "2026-05-12T18:35:00Z"^^xsd:dateTime ;
496
+ :door :doorA ;
497
+ :doorState :closed ;
498
+ :priority 1 ;
499
+ :source "hallway-latch" .
500
+
501
+ MESSAGE
502
+
503
+ # Message 37: new tail LDES member 036.
504
+ :doorStream tree:member :obs-036 .
505
+
506
+ :obs-036 a :DoorObservation ;
507
+ :sequence 36 ;
508
+ :observedAt "2026-05-12T18:35:30Z"^^xsd:dateTime ;
509
+ :door :doorA ;
510
+ :doorState :closed ;
511
+ :priority 1 ;
512
+ :source "hallway-latch" .
513
+
514
+ MESSAGE
515
+
516
+ # Message 38: new tail LDES member 037.
517
+ :doorStream tree:member :obs-037 .
518
+
519
+ :obs-037 a :DoorObservation ;
520
+ :sequence 37 ;
521
+ :observedAt "2026-05-12T18:36:00Z"^^xsd:dateTime ;
522
+ :door :doorA ;
523
+ :doorState :open ;
524
+ :priority 1 ;
525
+ :source "corridor-camera" .
526
+
527
+ MESSAGE
528
+
529
+ # Message 39: new tail LDES member 038.
530
+ :doorStream tree:member :obs-038 .
531
+
532
+ :obs-038 a :DoorObservation ;
533
+ :sequence 38 ;
534
+ :observedAt "2026-05-12T18:36:30Z"^^xsd:dateTime ;
535
+ :door :doorA ;
536
+ :doorState :open ;
537
+ :priority 1 ;
538
+ :source "thermal-edge-camera" .
539
+
540
+ MESSAGE
541
+
542
+ # Message 40: new tail LDES member 039.
543
+ :doorStream tree:member :obs-039 .
544
+
545
+ :obs-039 a :DoorObservation ;
546
+ :sequence 39 ;
547
+ :observedAt "2026-05-12T18:37:00Z"^^xsd:dateTime ;
548
+ :door :doorA ;
549
+ :doorState :closed ;
550
+ :priority 1 ;
551
+ :source "hallway-latch" .
552
+
553
+ MESSAGE
554
+
555
+ # Message 41: high-priority tail member used by the preferred repair.
556
+ :doorStream tree:member :obs-040 .
557
+
558
+ :obs-040 a :DoorObservation ;
559
+ :sequence 40 ;
560
+ :observedAt "2026-05-12T18:37:30Z"^^xsd:dateTime ;
561
+ :door :doorA ;
562
+ :doorState :closed ;
563
+ :priority 5 ;
564
+ :source "safety-controller" .
@@ -6,6 +6,9 @@
6
6
  #
7
7
  # eyeling -r examples/rdf-message-microgrid.n3 examples/input/rdf-message-microgrid.trig
8
8
  #
9
+ # See the handbook section on RDF Message Log replay under -r:
10
+ # https://eyereasoner.github.io/eyeling/HANDBOOK#rdf-message-log-replay-under--r
11
+ #
9
12
  # The scene is a clinic operating as an islanded microgrid after a storm. The
10
13
  # data arrives as a true RDF Message Log: life-safety loads, power status,
11
14
  # flexible demand, and an empty heartbeat. Eyeling parses the MESSAGE boundaries
@@ -0,0 +1,82 @@
1
+ # =====================================
2
+ # RDF Message Window Repair message log
3
+ # =====================================
4
+ #
5
+ # This file is the data half of the runnable example:
6
+ #
7
+ # eyeling -r examples/rdf-message-window-repair.n3 examples/input/rdf-message-window-repair.trig
8
+ #
9
+ # See the handbook section on RDF Message Log replay under -r:
10
+ # https://eyereasoner.github.io/eyeling/HANDBOOK#rdf-message-log-replay-under--r
11
+ #
12
+ # The log models a fire-door monitoring ABox stream. Message 1 is stable
13
+ # configuration/TBox-like policy. Messages 2-5 are ordered ABox assertions. The
14
+ # rules use a sliding window over the last three ABox messages and repair a noisy
15
+ # contradiction by preferring the highest-priority assertion.
16
+
17
+ VERSION "1.2-messages"
18
+ PREFIX : <https://eyereasoner.github.io/eyeling/examples/rdf-message-window-repair#>
19
+ PREFIX see: <https://example.org/see#>
20
+ PREFIX in: <https://example.org/see/input#>
21
+ PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
22
+
23
+ # Message 1: fixed stream policy and action vocabulary.
24
+ :doorA a :FireDoor ;
25
+ :windowSize 3 ;
26
+ :repairPolicy :preferHigherPriority .
27
+
28
+ :open :actionText "send a technician to inspect and close the fire door";
29
+ :stateText "open" .
30
+ :closed :actionText "mark the fire compartment as sealed";
31
+ :stateText "closed" .
32
+
33
+ in:run a see:InputDataset ;
34
+ see:name "rdf_message_window_repair" ;
35
+ see:title "RDF Message Window Repair" ;
36
+ see:sourceFile "examples/rdf-message-window-repair.n3" ;
37
+ see:description "A true RDF 1.2 Message Log for sliding-window repair of an open/closed fire-door inconsistency." ;
38
+ see:compiler "Eyeling RDF Message Log input" .
39
+
40
+ MESSAGE
41
+
42
+ # Message 2: the previous window starts with a normal closed reading. It expires
43
+ # when the current window slides forward.
44
+ :reading-001 a :DoorAssertion ;
45
+ :about :doorA ;
46
+ :doorState :closed ;
47
+ :priority 1 ;
48
+ :source "hallway-latch" ;
49
+ :observedAt "2026-05-12T18:20:00Z"^^xsd:dateTime .
50
+
51
+ MESSAGE
52
+
53
+ # Message 3: overlapping evidence retained in the next window. The camera says
54
+ # the door is open.
55
+ :reading-002 a :DoorAssertion ;
56
+ :about :doorA ;
57
+ :doorState :open ;
58
+ :priority 1 ;
59
+ :source "corridor-camera" ;
60
+ :observedAt "2026-05-12T18:20:30Z"^^xsd:dateTime .
61
+
62
+ MESSAGE
63
+
64
+ # Message 4: another overlapping reading conflicts with message 3: the latch
65
+ # says the same door is closed.
66
+ :reading-003 a :DoorAssertion ;
67
+ :about :doorA ;
68
+ :doorState :closed ;
69
+ :priority 1 ;
70
+ :source "hallway-latch" ;
71
+ :observedAt "2026-05-12T18:21:00Z"^^xsd:dateTime .
72
+
73
+ MESSAGE
74
+
75
+ # Message 5: entering high-priority safety-controller assertion. The preferred
76
+ # repair keeps this assertion rather than the lower-priority conflicting fact.
77
+ :reading-004 a :DoorAssertion ;
78
+ :about :doorA ;
79
+ :doorState :closed ;
80
+ :priority 3 ;
81
+ :source "safety-controller" ;
82
+ :observedAt "2026-05-12T18:21:30Z"^^xsd:dateTime .
@@ -6,6 +6,9 @@
6
6
  #
7
7
  # eyeling -r examples/rdf-messages.n3 examples/input/rdf-messages.trig
8
8
  #
9
+ # See the handbook section on RDF Message Log replay under -r:
10
+ # https://eyereasoner.github.io/eyeling/HANDBOOK#rdf-message-log-replay-under--r
11
+ #
9
12
  # It is a true RDF Message Log. VERSION "1.2-messages" tells Eyeling to parse
10
13
  # MESSAGE delimiters as message boundaries before ordinary N3 reasoning starts.
11
14
  # Eyeling then materializes an internal eymsg: replay view with ordered envelopes
@@ -0,0 +1,13 @@
1
+ # rdf-message-cold-chain-recall
2
+
3
+ ## Source files
4
+
5
+ - [N3 rules](../rdf-message-cold-chain-recall.n3)
6
+ - [Input RDF Message Log](../input/rdf-message-cold-chain-recall.trig)
7
+ - [Story deck](../deck/rdf-message-cold-chain-recall.md)
8
+
9
+ ## Answer
10
+ Cold-chain recall reasoning accepted: 49 RDF Message envelopes contained 48 append-only telemetry members. The consumer checkpoint was sequence 42, so 42 committed history members were skipped and only 6 newly emitted members entered the repair window. The tail window has 6 members and says batchA is both within range and over the 8.0°C limit. The repair keeps the calibrated logger evidence at sequence 47 from calibrated-cold-chain-logger with priority 5, resolves the repaired temperature to 11.8°C, and materializes the decision: quarantine batchA, notify QA, and hold shipment.
11
+
12
+ ## Explanation
13
+ This is the streaming shape that matters operationally. A cold-chain consumer can replay a long RDF Message Log, use LDES sequence metadata to resume after its checkpoint, and inspect only the new tail. The raw tail is contradictory, so the rules do not materialize from the flattened data. They first choose the calibrated logger reading, then derive the quarantine decision from that repaired state.
@@ -0,0 +1,13 @@
1
+ # rdf-message-ldes-incremental
2
+
3
+ ## Source files
4
+
5
+ - [N3 rules](../rdf-message-ldes-incremental.n3)
6
+ - [Input RDF Message Log](../input/rdf-message-ldes-incremental.trig)
7
+ - [Story deck](../deck/rdf-message-ldes-incremental.md)
8
+
9
+ ## Answer
10
+ Incremental LDES reasoning accepted: 41 RDF Message envelopes contained 40 append-only LDES members. The consumer checkpoint was sequence 34, so 34 committed history members were skipped and only 6 newly emitted members entered the repair window. The tail window has 6 members, contains a raw open/closed inconsistency for doorA, repairs it by keeping the priority-5 member at sequence 40 from safety-controller, resolves the door state to closed, and materializes the action: keep the compartment sealed and continue monitoring.
11
+
12
+ ## Explanation
13
+ The input is deliberately larger than the reasoning task: it serializes many LDES members as RDF Messages, but the LDES sequence bookmark tells the consumer which prefix was already materialized. Eyeling's -r mode replays the RDF Message Log into ordered eymsg: envelopes; the rules inspect each payload with log:includes, classify old versus new members from the LDES sequence path, and run the inconsistency repair only over the new tail. This mirrors an incremental streaming pipeline: append-only publication, resumable synchronization, small repair window, and monotonic output after the noisy tail is fixed.
@@ -0,0 +1,13 @@
1
+ # rdf-message-window-repair
2
+
3
+ ## Source files
4
+
5
+ - [N3 rules](../rdf-message-window-repair.n3)
6
+ - [Input RDF Message Log](../input/rdf-message-window-repair.trig)
7
+ - [Story deck](../deck/rdf-message-window-repair.md)
8
+
9
+ ## Answer
10
+ Sliding-window RDF Message repair accepted: 5 parser-replayed messages produced two overlapping 3-message ABox windows. The current window retained two envelopes from the previous window, expired one old door reading, and added one new safety-controller reading. Its raw graph-level materialization was inconsistent because doorA was both open and closed. The preferred repair kept the priority-3 assertion from safety-controller, resolved the door state to closed, and materialized the action: mark the fire compartment as sealed.
11
+
12
+ ## Explanation
13
+ The RDF Message Log uses VERSION \"1.2-messages\" and MESSAGE delimiters. Eyeling parses those boundaries into eymsg: envelopes and payload graphs; the rules inspect each payload with log:includes rather than merging message bodies by hand. The example mirrors a sliding-window stream-reasoning pattern: when the window advances, overlapping message evidence is retained, an expired assertion leaves the window, an entering assertion can change the materialization, and a preferred repair fixes a noisy open/closed contradiction before the final action is produced.