eyeling 1.26.7 → 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 (31) hide show
  1. package/HANDBOOK.md +32 -1
  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 +1 -1
  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 +3 -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/rdf-message-cold-chain-recall.n3 +229 -0
  21. package/examples/rdf-message-flow.n3 +3 -0
  22. package/examples/rdf-message-ldes-incremental.n3 +231 -0
  23. package/examples/rdf-message-microgrid.n3 +3 -0
  24. package/examples/rdf-message-window-repair.n3 +3 -0
  25. package/examples/rdf-messages.n3 +3 -0
  26. package/eyeling.js +396 -3
  27. package/lib/cli.js +396 -3
  28. package/package.json +5 -3
  29. package/test/examples.test.js +25 -14
  30. package/test/fixtures/marc-rules-stream-messages.n3 +192 -0
  31. package/test/stream_messages.test.js +243 -0
@@ -0,0 +1,94 @@
1
+ # RDF Message LDES Incremental Repair
2
+
3
+ This deck walks through a stream that is large enough to make full recomputation unattractive. The [rules](../rdf-message-ldes-incremental.n3) consume the replayed LDES [message log input](../input/rdf-message-ldes-incremental.trig), the [golden output](../output/rdf-message-ldes-incremental.md) shows the incremental repair result, and the [handbook section](https://eyereasoner.github.io/eyeling/HANDBOOK#rdf-message-log-replay-under--r) explains how `-r` turns RDF Message boundaries into facts for the rules.
4
+
5
+ ## Why this example exists
6
+
7
+ A long-running stream should not force a reasoner to reload and re-check all past data every time a new event arrives.
8
+
9
+ This example shows the intended shape:
10
+
11
+ 1. publish events as an append-only **LDES**;
12
+ 2. serialize each emitted member as an **RDF Message**;
13
+ 3. remember a sequence bookmark from the previous synchronization run;
14
+ 4. reason only over the new tail;
15
+ 5. repair a noisy inconsistency before materializing the operational result.
16
+
17
+ ## The story
18
+
19
+ A building monitors a fire door, `doorA`.
20
+
21
+ The stream contains forty door observations. Most are boring historical facts that were already processed. The consumer has stored this checkpoint:
22
+
23
+ ```turtle
24
+ :doorStream :lastCommittedSequence 34 .
25
+ ```
26
+
27
+ So when the log is replayed, the reasoner can classify:
28
+
29
+ - sequences `1..34` as committed history;
30
+ - sequences `35..40` as newly emitted LDES members;
31
+ - the new tail as the current repair window.
32
+
33
+ ## Why RDF Messages help
34
+
35
+ The input file is a real RDF Message Log:
36
+
37
+ ```turtle
38
+ VERSION "1.2-messages"
39
+ ...
40
+ MESSAGE
41
+ ...
42
+ MESSAGE
43
+ ...
44
+ ```
45
+
46
+ Eyeling's `-r` mode preserves those message boundaries as `eymsg:` envelopes and payload graphs. The rules inspect payloads with `log:includes`, so each member remains scoped to the message that emitted it.
47
+
48
+ Handbook: <https://eyereasoner.github.io/eyeling/HANDBOOK#rdf-message-log-replay-under--r>
49
+
50
+ ## Why LDES helps
51
+
52
+ LDES contributes the stream shape:
53
+
54
+ ```turtle
55
+ :doorStream a ldes:EventStream ;
56
+ ldes:timestampPath :observedAt ;
57
+ ldes:sequencePath :sequence ;
58
+ tree:member :obs-040 .
59
+ ```
60
+
61
+ The stream is append-only, and each member has a sequence number. That sequence number is the incremental bookmark: a consumer that already committed `34` does not need to re-run the repair over members `1..34`.
62
+
63
+ LDES spec: <https://semiceu.github.io/LinkedDataEventStreams/releases/1.0.0-alpha/index.html>
64
+
65
+ ## The inconsistency
66
+
67
+ The new tail contains contradictory evidence:
68
+
69
+ - the camera says `doorA` is `:open`;
70
+ - the latch says `doorA` is `:closed`;
71
+ - the safety controller also says `doorA` is `:closed`, with higher priority.
72
+
73
+ Raw materialization would say the same door is both open and closed.
74
+
75
+ ## The repair
76
+
77
+ The preferred repair keeps the highest-priority tail assertion:
78
+
79
+ ```turtle
80
+ :obs-040 :doorState :closed ;
81
+ :priority 5 ;
82
+ :source "safety-controller" .
83
+ ```
84
+
85
+ The materialized action is therefore:
86
+
87
+ > keep the compartment sealed and continue monitoring
88
+
89
+ ## Run it
90
+
91
+ ```bash
92
+ eyeling -r examples/rdf-message-ldes-incremental.n3 \
93
+ examples/input/rdf-message-ldes-incremental.trig
94
+ ```
@@ -1,6 +1,6 @@
1
1
  # RDF Message window repair — fixing an open/closed door conflict
2
2
 
3
- This deck explains the example `rdf-message-window-repair.n3` and its input file `input/rdf-message-window-repair.trig`.
3
+ This deck follows a small RDF Message window where one door is reported both open and closed. The [rules](../rdf-message-window-repair.n3) inspect the replayed [message log input](../input/rdf-message-window-repair.trig), the [golden output](../output/rdf-message-window-repair.md) shows the repaired conclusion, and the [handbook section](https://eyereasoner.github.io/eyeling/HANDBOOK#rdf-message-log-replay-under--r) explains how `-r` exposes message payloads without silently merging them.
4
4
 
5
5
  The goal is to show how Eyeling can reason over a replayed RDF Message Log, keep message boundaries visible, detect an inconsistency in a sliding window, and materialize a repaired conclusion instead of blindly merging contradictory facts.
6
6
 
@@ -1,5 +1,7 @@
1
1
  # Mapping two data models (beginner-friendly)
2
2
 
3
+ [Start with the source](../schema-foaf-mapping.n3) to see the vocabulary mapping rules; the [golden output](../output/schema-foaf-mapping.n3) shows the FOAF-shaped facts derived from the Schema.org-shaped input.
4
+
3
5
  When people say “map two data models,” they mean:
4
6
 
5
7
  > **Taking data described using one vocabulary (Model A) and expressing the same meaning using another vocabulary (Model B).**