@ai-ecoverse/slicc-browsers 1.49.0 → 1.50.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.
- package/README.md +4 -2
- package/engine/engine-wasm.mjs +1 -1
- package/engine/engine.wasm +0 -0
- package/engine-vectors.json +2119 -0
- package/engine.mjs +35 -4
- package/guard-vectors.json +1 -1
- package/package.json +5 -2
- package/protected.mjs +1 -1
- package/schema/engine-vectors.schema.json +216 -0
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/ai-ecoverse/slicc-browsers/schema/engine-vectors.schema.json",
|
|
4
|
+
"title": "Shared pure engine decision vectors",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schema", "pages", "rows"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema": { "const": 1 },
|
|
10
|
+
"pages": { "type": "object", "additionalProperties": { "$ref": "#/$defs/page" } },
|
|
11
|
+
"rows": {
|
|
12
|
+
"type": "array",
|
|
13
|
+
"minItems": 1,
|
|
14
|
+
"items": {
|
|
15
|
+
"oneOf": [
|
|
16
|
+
{
|
|
17
|
+
"type": "object",
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"required": ["id", "op", "frame", "expect"],
|
|
20
|
+
"properties": {
|
|
21
|
+
"id": { "type": "string", "minLength": 1 },
|
|
22
|
+
"op": { "const": "capture" },
|
|
23
|
+
"frame": { "$ref": "#/$defs/frame" },
|
|
24
|
+
"expect": { "$ref": "#/$defs/capture" }
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"type": "object",
|
|
29
|
+
"additionalProperties": false,
|
|
30
|
+
"required": ["id", "op", "page", "expect"],
|
|
31
|
+
"properties": {
|
|
32
|
+
"id": { "type": "string", "minLength": 1 },
|
|
33
|
+
"op": { "const": "page" },
|
|
34
|
+
"page": { "type": "string", "minLength": 1 },
|
|
35
|
+
"expect": { "$ref": "#/$defs/pageDecision" }
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"type": "object",
|
|
40
|
+
"additionalProperties": false,
|
|
41
|
+
"required": ["id", "op", "page", "method", "result", "expect"],
|
|
42
|
+
"properties": {
|
|
43
|
+
"id": { "type": "string", "minLength": 1 },
|
|
44
|
+
"op": { "const": "reply" },
|
|
45
|
+
"page": { "type": "string", "minLength": 1 },
|
|
46
|
+
"method": { "type": "string", "minLength": 1 },
|
|
47
|
+
"params": { "type": "object" },
|
|
48
|
+
"result": { "type": "object" },
|
|
49
|
+
"observed": {
|
|
50
|
+
"$ref": "#/$defs/observation",
|
|
51
|
+
"description": "Record the dispatch revision. For a capture, observed.mixed is the logical OR of all mixed observations from dispatch through release, including both endpoints (per screencast frame). At release pass the freshly verified page. Reject an unstable mixed capture; apply screenshot and screencast masks privately. PDFs requiring blanking are refused, not overpainted."
|
|
52
|
+
},
|
|
53
|
+
"expect": { "$ref": "#/$defs/replyDecision" }
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"invalidPages": {
|
|
60
|
+
"type": "array",
|
|
61
|
+
"items": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"additionalProperties": false,
|
|
64
|
+
"required": ["id", "page", "error"],
|
|
65
|
+
"properties": {
|
|
66
|
+
"id": { "type": "string", "minLength": 1 },
|
|
67
|
+
"page": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"additionalProperties": false,
|
|
70
|
+
"required": ["frames"],
|
|
71
|
+
"properties": { "frames": { "type": "array", "items": { "$ref": "#/$defs/frame" } } }
|
|
72
|
+
},
|
|
73
|
+
"error": {
|
|
74
|
+
"enum": ["missing or duplicate frame id", "ambiguous page root", "cyclic frame parents"]
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"$defs": {
|
|
81
|
+
"frame": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"additionalProperties": false,
|
|
84
|
+
"required": [],
|
|
85
|
+
"properties": {
|
|
86
|
+
"id": { "type": "string", "minLength": 1 },
|
|
87
|
+
"parentId": { "type": "string", "minLength": 1 },
|
|
88
|
+
"loaderId": { "type": "string" },
|
|
89
|
+
"url": { "type": "string" },
|
|
90
|
+
"securityOrigin": { "type": "string" },
|
|
91
|
+
"unreachableUrl": { "type": "string" },
|
|
92
|
+
"type": { "type": "string" },
|
|
93
|
+
"shown": { "type": "boolean" },
|
|
94
|
+
"box": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"additionalProperties": false,
|
|
97
|
+
"required": ["x", "y", "width", "height"],
|
|
98
|
+
"properties": {
|
|
99
|
+
"x": { "type": "number" },
|
|
100
|
+
"y": { "type": "number" },
|
|
101
|
+
"width": { "type": "number" },
|
|
102
|
+
"height": { "type": "number" }
|
|
103
|
+
},
|
|
104
|
+
"description": "Frame box in the top page CSS pixel coordinate system of this capture. A zero area is a measured empty box, not a missing measurement."
|
|
105
|
+
},
|
|
106
|
+
"defaultContext": {
|
|
107
|
+
"type": "object",
|
|
108
|
+
"additionalProperties": false,
|
|
109
|
+
"required": ["frameId", "loaderId", "origin"],
|
|
110
|
+
"properties": {
|
|
111
|
+
"frameId": { "type": "string", "minLength": 1 },
|
|
112
|
+
"loaderId": { "type": "string", "minLength": 1 },
|
|
113
|
+
"origin": { "type": "string" }
|
|
114
|
+
},
|
|
115
|
+
"description": "Default context observed by the guard; only the same frame and loader identify this document."
|
|
116
|
+
},
|
|
117
|
+
"opener": { "type": "string" },
|
|
118
|
+
"previous": { "type": "boolean" },
|
|
119
|
+
"creator": { "type": "string" }
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"page": {
|
|
123
|
+
"type": "object",
|
|
124
|
+
"additionalProperties": false,
|
|
125
|
+
"required": ["frames"],
|
|
126
|
+
"properties": {
|
|
127
|
+
"frames": {
|
|
128
|
+
"type": "array",
|
|
129
|
+
"items": {
|
|
130
|
+
"$ref": "#/$defs/frame",
|
|
131
|
+
"properties": { "id": { "type": "string" } },
|
|
132
|
+
"required": ["id"],
|
|
133
|
+
"type": "object"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"revision": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"minLength": 1,
|
|
139
|
+
"description": "Guard-owned identity of this page observation, invalidated on membership, document, origin, geometry, visibility or focus changes. Use newly verified facts at release."
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"capture": {
|
|
144
|
+
"description": "Frame-local pixel decision, not permission to publish a capture. A mixed-page reply supplies the complete mask or a refusal, including the method-specific extension policy.",
|
|
145
|
+
"enum": ["allow", "blank"]
|
|
146
|
+
},
|
|
147
|
+
"observation": {
|
|
148
|
+
"type": "object",
|
|
149
|
+
"additionalProperties": false,
|
|
150
|
+
"required": ["revision", "mixed"],
|
|
151
|
+
"properties": {
|
|
152
|
+
"revision": { "type": "string", "minLength": 1 },
|
|
153
|
+
"mixed": { "type": "boolean" }
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"pageDecision": {
|
|
157
|
+
"type": "object",
|
|
158
|
+
"additionalProperties": false,
|
|
159
|
+
"required": ["mixed", "frames"],
|
|
160
|
+
"properties": {
|
|
161
|
+
"mixed": { "type": "boolean" },
|
|
162
|
+
"frames": {
|
|
163
|
+
"type": "object",
|
|
164
|
+
"additionalProperties": {
|
|
165
|
+
"type": "object",
|
|
166
|
+
"additionalProperties": false,
|
|
167
|
+
"required": ["protected", "role", "capture"],
|
|
168
|
+
"properties": {
|
|
169
|
+
"protected": { "type": "boolean" },
|
|
170
|
+
"role": {
|
|
171
|
+
"enum": [
|
|
172
|
+
"seven",
|
|
173
|
+
"slicc",
|
|
174
|
+
"extra",
|
|
175
|
+
"browser",
|
|
176
|
+
"extension",
|
|
177
|
+
"file",
|
|
178
|
+
"unparseable",
|
|
179
|
+
"ordinary"
|
|
180
|
+
]
|
|
181
|
+
},
|
|
182
|
+
"capture": { "$ref": "#/$defs/capture" }
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"replyDecision": {
|
|
189
|
+
"oneOf": [
|
|
190
|
+
{
|
|
191
|
+
"type": "object",
|
|
192
|
+
"additionalProperties": false,
|
|
193
|
+
"required": ["result"],
|
|
194
|
+
"properties": { "result": { "type": "object" } }
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"type": "object",
|
|
198
|
+
"additionalProperties": false,
|
|
199
|
+
"required": ["action", "reason"],
|
|
200
|
+
"properties": {
|
|
201
|
+
"action": { "const": "refuse" },
|
|
202
|
+
"reason": {
|
|
203
|
+
"enum": [
|
|
204
|
+
"surface.protected",
|
|
205
|
+
"resource.protected",
|
|
206
|
+
"extension.present",
|
|
207
|
+
"extension.shown",
|
|
208
|
+
"reply.unprojectable"
|
|
209
|
+
]
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
]
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|