eyeling 1.22.0 → 1.22.2
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/examples/arcling/README.md +5 -4
- package/examples/arcling/calidor/calidor.data.json +79 -0
- package/examples/arcling/calidor/calidor.expected.json +94 -0
- package/examples/arcling/calidor/calidor.model.go +612 -0
- package/examples/arcling/calidor/calidor.spec.md +166 -0
- package/examples/arcling/delfour/delfour.data.json +0 -1
- package/examples/arcling/delfour/delfour.model.go +18 -0
- package/examples/arcling/flandor/flandor.data.json +0 -1
- package/examples/arcling/flandor/flandor.model.go +25 -0
- package/examples/arcling/medior/medior.data.json +0 -1
- package/examples/arcling/medior/medior.model.go +26 -0
- package/examples/calidor.n3 +500 -0
- package/examples/output/calidor.n3 +29 -0
- package/package.json +1 -1
- package/test/arcling.test.js +50 -15
|
@@ -10,15 +10,16 @@ In one line:
|
|
|
10
10
|
|
|
11
11
|
## Insight Economy context
|
|
12
12
|
|
|
13
|
-
The `delfour`, `medior`, and `
|
|
13
|
+
The `delfour`, `medior`, `flandor`, and `calidor` cases are concrete Arcling readings of Ruben Verborgh’s [Inside the Insight Economy](https://ruben.verborgh.org/blog/2025/08/12/inside-the-insight-economy/). The central move is the same in all four cases: what gets traded is not risky raw data, but a narrow, expiring, purpose-bound insight that is useful enough to trigger action. In Ruben’s phrasing, the goal is to “don’t exchange raw data” and to prefer “meaningful insights, not risky raw data”.
|
|
14
14
|
|
|
15
|
-
In this directory, the
|
|
15
|
+
In this directory, the four cases show that pattern across four settings:
|
|
16
16
|
|
|
17
17
|
- **Delfour** keeps a household-level medical condition private and turns it into a neutral shopping insight such as “prefer lower-sugar products” for shopping assistance.
|
|
18
18
|
- **Medior** keeps laboratory, medication, and readmission evidence local and turns it into a minimal post-discharge coordination insight that can justify activating a continuity bundle.
|
|
19
19
|
- **Flandor** keeps exporter, labour-market, and grid evidence local and turns it into a regional macro-economic insight that justifies a temporary retooling response.
|
|
20
|
+
- **Calidor** keeps household heat, vulnerability, and prepaid-energy stress local and turns them into a narrow municipal heatwave-support insight that can justify a priority cooling package.
|
|
20
21
|
|
|
21
|
-
That progression is intentional: `delfour` is the micro case, `medior` is the care-coordination case, and `flandor` is the macro case. They are easiest to read next to their declarative Eyeling counterparts: `examples/delfour.n3`, `examples/medior.n3`, and `examples/flandor.n3`.
|
|
22
|
+
That progression is intentional: `delfour` is the micro case, `medior` is the care-coordination case, `calidor` is the civic-response case, and `flandor` is the macro case. They are easiest to read next to their declarative Eyeling counterparts: `examples/delfour.n3`, `examples/medior.n3`, and `examples/flandor.n3`.
|
|
22
23
|
|
|
23
24
|
## Why this directory exists
|
|
24
25
|
|
|
@@ -152,7 +153,7 @@ A check should add confidence. It should not only restate the answer.
|
|
|
152
153
|
|
|
153
154
|
### 5. Keep names aligned
|
|
154
155
|
|
|
155
|
-
If a case is called `delfour`, `medior`, or `
|
|
156
|
+
If a case is called `delfour`, `medior`, `flandor` or `calidor` in `examples/`, the Arcling case should use the same base name.
|
|
156
157
|
|
|
157
158
|
## Suggested workflow for a new case
|
|
158
159
|
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"caseName": "Calidor",
|
|
3
|
+
"municipality": "Calidor",
|
|
4
|
+
"question": "Is the Calidor heat-response system allowed to use a narrow household support insight for heatwave response, and if so which support package should it recommend?",
|
|
5
|
+
"timestamps": {
|
|
6
|
+
"createdAt": "2026-07-18T09:00:00+00:00",
|
|
7
|
+
"expiresAt": "2026-07-18T21:00:00+00:00",
|
|
8
|
+
"authorizedAt": "2026-07-18T09:05:00+00:00",
|
|
9
|
+
"dutyPerformedAt": "2026-07-18T20:30:00+00:00"
|
|
10
|
+
},
|
|
11
|
+
"evaluationContext": {
|
|
12
|
+
"scopeDevice": "household-gateway",
|
|
13
|
+
"scopeEvent": "heat-alert-window",
|
|
14
|
+
"purpose": "heatwave_response",
|
|
15
|
+
"prohibitedReusePurpose": "tenant_screening",
|
|
16
|
+
"requestAction": "odrl:use"
|
|
17
|
+
},
|
|
18
|
+
"thresholds": {
|
|
19
|
+
"alertLevelAtLeast": 3,
|
|
20
|
+
"indoorTempCAtLeast": 30.0,
|
|
21
|
+
"hoursAtOrAboveThresholdAtLeast": 6,
|
|
22
|
+
"energyCreditEurAtMost": 5.0,
|
|
23
|
+
"minimumActiveNeedCount": 3
|
|
24
|
+
},
|
|
25
|
+
"localProfile": {
|
|
26
|
+
"vulnerabilityFlags": ["heat_sensitive_condition", "mobility_limitation"]
|
|
27
|
+
},
|
|
28
|
+
"heatStatus": {
|
|
29
|
+
"currentAlertLevel": 4,
|
|
30
|
+
"currentIndoorTempC": 31.4,
|
|
31
|
+
"hoursAtOrAboveThreshold": 9
|
|
32
|
+
},
|
|
33
|
+
"energyProfile": {
|
|
34
|
+
"remainingPrepaidCreditEur": 3.2
|
|
35
|
+
},
|
|
36
|
+
"supportCatalog": [
|
|
37
|
+
{
|
|
38
|
+
"id": "pkg:CHECK",
|
|
39
|
+
"name": "Cooling Check Call",
|
|
40
|
+
"costEur": 8,
|
|
41
|
+
"capabilities": ["welfare_check"]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"id": "pkg:VOUCHER",
|
|
45
|
+
"name": "Cooling Center Transport Voucher",
|
|
46
|
+
"costEur": 12,
|
|
47
|
+
"capabilities": ["transport", "welfare_check"]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"id": "pkg:BUNDLE",
|
|
51
|
+
"name": "Calidor Priority Cooling Bundle",
|
|
52
|
+
"costEur": 18,
|
|
53
|
+
"capabilities": ["cooling_kit", "welfare_check", "transport", "bill_credit"]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"id": "pkg:DELUXE",
|
|
57
|
+
"name": "Extended Resilience Package",
|
|
58
|
+
"costEur": 28,
|
|
59
|
+
"capabilities": ["cooling_kit", "welfare_check", "transport", "bill_credit", "followup_visit"]
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"budget": {
|
|
63
|
+
"maxPackageCostEur": 20
|
|
64
|
+
},
|
|
65
|
+
"insightPolicy": {
|
|
66
|
+
"id": "https://example.org/insight/calidor",
|
|
67
|
+
"metric": "active_need_count",
|
|
68
|
+
"type": "ins:Insight",
|
|
69
|
+
"supportPolicy": "lowest_cost_covering_package",
|
|
70
|
+
"policyType": "odrl:Policy",
|
|
71
|
+
"policyProfile": "Calidor-Heatwave-Policy"
|
|
72
|
+
},
|
|
73
|
+
"integrity": {
|
|
74
|
+
"hashAlgorithm": "SHA-256",
|
|
75
|
+
"macAlgorithm": "HMAC-SHA-256",
|
|
76
|
+
"secret": "calidor-heatwave-demo-shared-secret",
|
|
77
|
+
"verificationMode": "trustedPrecomputedInput"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"caseName": "Calidor",
|
|
3
|
+
"derived": {
|
|
4
|
+
"heatAlertActive": true,
|
|
5
|
+
"unsafeIndoorHeat": true,
|
|
6
|
+
"vulnerabilityPresent": true,
|
|
7
|
+
"energyConstraint": true,
|
|
8
|
+
"activeNeedCount": 4,
|
|
9
|
+
"priorityCoolingSupportNeeded": true,
|
|
10
|
+
"requiredCapabilities": ["bill_credit", "cooling_kit", "transport", "welfare_check"],
|
|
11
|
+
"eligiblePackageIds": ["pkg:BUNDLE"],
|
|
12
|
+
"recommendedPackageId": "pkg:BUNDLE",
|
|
13
|
+
"recommendedPackageName": "Calidor Priority Cooling Bundle"
|
|
14
|
+
},
|
|
15
|
+
"envelope": {
|
|
16
|
+
"insight": {
|
|
17
|
+
"createdAt": "2026-07-18T09:00:00+00:00",
|
|
18
|
+
"expiresAt": "2026-07-18T21:00:00+00:00",
|
|
19
|
+
"id": "https://example.org/insight/calidor",
|
|
20
|
+
"metric": "active_need_count",
|
|
21
|
+
"municipality": "Calidor",
|
|
22
|
+
"scopeDevice": "household-gateway",
|
|
23
|
+
"scopeEvent": "heat-alert-window",
|
|
24
|
+
"supportPolicy": "lowest_cost_covering_package",
|
|
25
|
+
"threshold": 3,
|
|
26
|
+
"type": "ins:Insight"
|
|
27
|
+
},
|
|
28
|
+
"policy": {
|
|
29
|
+
"duty": {
|
|
30
|
+
"action": "odrl:delete",
|
|
31
|
+
"constraint": {
|
|
32
|
+
"leftOperand": "odrl:dateTime",
|
|
33
|
+
"operator": "odrl:eq",
|
|
34
|
+
"rightOperand": "2026-07-18T21:00:00+00:00"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"permission": {
|
|
38
|
+
"action": "odrl:use",
|
|
39
|
+
"constraint": {
|
|
40
|
+
"leftOperand": "odrl:purpose",
|
|
41
|
+
"operator": "odrl:eq",
|
|
42
|
+
"rightOperand": "heatwave_response"
|
|
43
|
+
},
|
|
44
|
+
"target": "https://example.org/insight/calidor"
|
|
45
|
+
},
|
|
46
|
+
"profile": "Calidor-Heatwave-Policy",
|
|
47
|
+
"prohibition": {
|
|
48
|
+
"action": "odrl:distribute",
|
|
49
|
+
"constraint": {
|
|
50
|
+
"leftOperand": "odrl:purpose",
|
|
51
|
+
"operator": "odrl:eq",
|
|
52
|
+
"rightOperand": "tenant_screening"
|
|
53
|
+
},
|
|
54
|
+
"target": "https://example.org/insight/calidor"
|
|
55
|
+
},
|
|
56
|
+
"type": "odrl:Policy"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"integrity": {
|
|
60
|
+
"canonicalEnvelope": "{\"insight\":{\"createdAt\":\"2026-07-18T09:00:00+00:00\",\"expiresAt\":\"2026-07-18T21:00:00+00:00\",\"id\":\"https://example.org/insight/calidor\",\"metric\":\"active_need_count\",\"municipality\":\"Calidor\",\"scopeDevice\":\"household-gateway\",\"scopeEvent\":\"heat-alert-window\",\"supportPolicy\":\"lowest_cost_covering_package\",\"threshold\":3.0,\"type\":\"ins:Insight\"},\"policy\":{\"duty\":{\"action\":\"odrl:delete\",\"constraint\":{\"leftOperand\":\"odrl:dateTime\",\"operator\":\"odrl:eq\",\"rightOperand\":\"2026-07-18T21:00:00+00:00\"}},\"permission\":{\"action\":\"odrl:use\",\"constraint\":{\"leftOperand\":\"odrl:purpose\",\"operator\":\"odrl:eq\",\"rightOperand\":\"heatwave_response\"},\"target\":\"https://example.org/insight/calidor\"},\"profile\":\"Calidor-Heatwave-Policy\",\"prohibition\":{\"action\":\"odrl:distribute\",\"constraint\":{\"leftOperand\":\"odrl:purpose\",\"operator\":\"odrl:eq\",\"rightOperand\":\"tenant_screening\"},\"target\":\"https://example.org/insight/calidor\"},\"type\":\"odrl:Policy\"}}",
|
|
61
|
+
"payloadHashSHA256": "1bf53a644fa39f5a1dd324f24872767f04379656e888fd456f4d498e12f1a65c",
|
|
62
|
+
"envelopeHmacSHA256": "e635c7c1991742a5c36992fc0da32a7abc80b32aa5777a1142adaab55183681c",
|
|
63
|
+
"verificationMode": "trustedPrecomputedInput"
|
|
64
|
+
},
|
|
65
|
+
"answer": {
|
|
66
|
+
"sentence": "The city is allowed to use a narrow heatwave-response insight and recommends Calidor Priority Cooling Bundle for this household.",
|
|
67
|
+
"recommendedPackage": "Calidor Priority Cooling Bundle",
|
|
68
|
+
"requiredCapabilities": ["bill_credit", "cooling_kit", "transport", "welfare_check"],
|
|
69
|
+
"payloadHashSHA256": "1bf53a644fa39f5a1dd324f24872767f04379656e888fd456f4d498e12f1a65c",
|
|
70
|
+
"envelopeHmacSHA256": "e635c7c1991742a5c36992fc0da32a7abc80b32aa5777a1142adaab55183681c"
|
|
71
|
+
},
|
|
72
|
+
"reasonWhy": [
|
|
73
|
+
"The household gateway converts local heat, vulnerability, and prepaid-energy stress into an expiring priority-support insight rather than sharing raw household traces or sensitive details.",
|
|
74
|
+
"recommended package: Calidor Priority Cooling Bundle",
|
|
75
|
+
"required capabilities: bill_credit, cooling_kit, transport, welfare_check",
|
|
76
|
+
"payload SHA-256 : 1bf53a644fa39f5a1dd324f24872767f04379656e888fd456f4d498e12f1a65c",
|
|
77
|
+
"HMAC-SHA256 : e635c7c1991742a5c36992fc0da32a7abc80b32aa5777a1142adaab55183681c"
|
|
78
|
+
],
|
|
79
|
+
"checks": {
|
|
80
|
+
"signatureVerifies": true,
|
|
81
|
+
"payloadHashMatches": true,
|
|
82
|
+
"minimizationRespected": true,
|
|
83
|
+
"scopeComplete": true,
|
|
84
|
+
"authorizationAllowed": true,
|
|
85
|
+
"heatAlertActive": true,
|
|
86
|
+
"unsafeIndoorHeat": true,
|
|
87
|
+
"priorityCoolingSupportNeeded": true,
|
|
88
|
+
"recommendedPackageEligible": true,
|
|
89
|
+
"dutyTimingConsistent": true,
|
|
90
|
+
"tenantScreeningProhibited": true
|
|
91
|
+
},
|
|
92
|
+
"allChecksPass": true,
|
|
93
|
+
"arcText": "=== Answer ===\nThe city is allowed to use a narrow heatwave-response insight and recommends Calidor Priority Cooling Bundle for this household.\n\n=== Reason Why ===\nThe household gateway converts local heat, vulnerability, and prepaid-energy stress into an expiring priority-support insight rather than sharing raw household traces or sensitive details.\nrecommended package: Calidor Priority Cooling Bundle\nrequired capabilities: bill_credit, cooling_kit, transport, welfare_check\npayload SHA-256 : 1bf53a644fa39f5a1dd324f24872767f04379656e888fd456f4d498e12f1a65c\nHMAC-SHA256 : e635c7c1991742a5c36992fc0da32a7abc80b32aa5777a1142adaab55183681c\n\n=== Check ===\nsignature verifies : yes\npayload hash matches : yes\nminimization strips sensitive terms: yes\nscope complete : yes\nauthorization allowed : yes\nheat-alert active : yes\nunsafe indoor heat : yes\npriority cooling support needed : yes\nrecommended package eligible : yes\nduty timing consistent : yes\ntenant screening prohibited : yes"
|
|
94
|
+
}
|