@ai-ecoverse/slicc-browsers 1.53.0 → 1.55.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 +5 -5
- package/engine/builtins.mjs +1 -0
- package/engine/engine-js.mjs +1 -1
- package/engine/engine-wasm.mjs +1 -1
- package/engine/engine.wasm +0 -0
- package/engine-vectors.json +8617 -55
- package/engine.mjs +22 -1
- package/guard-vectors.json +1 -1
- package/package.json +3 -3
- package/protected-js.mjs +1 -1
- package/protected-worker.mjs +24 -7
- package/protected.json +8 -0
- package/protected.mjs +1 -1
- package/schema/engine-vectors.schema.json +157 -13
- package/schema/protected.schema.json +13 -0
|
@@ -50,12 +50,112 @@
|
|
|
50
50
|
"$ref": "#/$defs/observation",
|
|
51
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
52
|
},
|
|
53
|
-
"expect": { "$ref": "#/$defs/replyDecision" }
|
|
53
|
+
"expect": { "$ref": "#/$defs/replyDecision" },
|
|
54
|
+
"addressed": { "type": "string", "minLength": 1 }
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"type": "object",
|
|
59
|
+
"additionalProperties": false,
|
|
60
|
+
"required": ["id", "op", "page", "method", "params", "expect"],
|
|
61
|
+
"properties": {
|
|
62
|
+
"id": { "type": "string", "minLength": 1 },
|
|
63
|
+
"op": { "const": "command" },
|
|
64
|
+
"page": { "type": "string", "minLength": 1 },
|
|
65
|
+
"method": { "type": "string", "minLength": 1 },
|
|
66
|
+
"params": { "type": "object" },
|
|
67
|
+
"addressed": { "type": "string", "minLength": 1 },
|
|
68
|
+
"expect": {
|
|
69
|
+
"oneOf": [
|
|
70
|
+
{
|
|
71
|
+
"type": "object",
|
|
72
|
+
"additionalProperties": false,
|
|
73
|
+
"required": ["action"],
|
|
74
|
+
"properties": {
|
|
75
|
+
"action": { "const": "allow" },
|
|
76
|
+
"replyFilter": { "type": "string", "minLength": 1 }
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"type": "object",
|
|
81
|
+
"additionalProperties": false,
|
|
82
|
+
"required": ["action", "reason"],
|
|
83
|
+
"properties": {
|
|
84
|
+
"action": { "const": "refuse" },
|
|
85
|
+
"reason": { "type": "string", "minLength": 1 }
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"type": "object",
|
|
94
|
+
"additionalProperties": false,
|
|
95
|
+
"required": ["id", "op", "page", "method", "params", "expect"],
|
|
96
|
+
"properties": {
|
|
97
|
+
"id": { "type": "string", "minLength": 1 },
|
|
98
|
+
"op": { "const": "event" },
|
|
99
|
+
"page": { "type": "string", "minLength": 1 },
|
|
100
|
+
"method": { "type": "string", "minLength": 1 },
|
|
101
|
+
"params": { "type": "object" },
|
|
102
|
+
"context": { "type": "string", "minLength": 1 },
|
|
103
|
+
"expect": {
|
|
104
|
+
"oneOf": [
|
|
105
|
+
{
|
|
106
|
+
"type": "object",
|
|
107
|
+
"additionalProperties": false,
|
|
108
|
+
"required": ["action"],
|
|
109
|
+
"properties": { "action": { "const": "pass" } }
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"type": "object",
|
|
113
|
+
"additionalProperties": false,
|
|
114
|
+
"required": ["action"],
|
|
115
|
+
"properties": { "action": { "const": "drop" } }
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"type": "object",
|
|
119
|
+
"additionalProperties": false,
|
|
120
|
+
"required": ["action"],
|
|
121
|
+
"properties": { "action": { "const": "internal" } }
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"type": "object",
|
|
125
|
+
"additionalProperties": false,
|
|
126
|
+
"required": ["action", "params"],
|
|
127
|
+
"properties": {
|
|
128
|
+
"action": { "const": "rewrite" },
|
|
129
|
+
"params": { "type": "object" }
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"type": "object",
|
|
138
|
+
"additionalProperties": false,
|
|
139
|
+
"required": ["id", "op", "url", "ownerProtected", "expect"],
|
|
140
|
+
"properties": {
|
|
141
|
+
"id": { "type": "string", "minLength": 1 },
|
|
142
|
+
"op": { "const": "har" },
|
|
143
|
+
"url": { "type": "string" },
|
|
144
|
+
"ownerProtected": {
|
|
145
|
+
"type": ["boolean", "null"],
|
|
146
|
+
"description": "Use the owning frame’s current engine-produced protected verdict for a correlated record, not the recording page’s verdict. Explicit null means no attributable owner: exclude. Omitting this optional ABI field retains the legacy URL-only operation."
|
|
147
|
+
},
|
|
148
|
+
"expect": { "enum": ["include", "exclude"] }
|
|
54
149
|
}
|
|
55
150
|
}
|
|
56
151
|
]
|
|
57
152
|
}
|
|
58
153
|
},
|
|
154
|
+
"proofs": {
|
|
155
|
+
"type": "object",
|
|
156
|
+
"description": "Named fixture sets of trusted, session-owned observations. They never come from CDP params. The adapter verifies the containing page revision again at release; revisions cover realm and handle liveness as well as placement. Before send, translate numeric or default Runtime selectors into the observed uniqueContextId; do not send an unpinned selector. At event observation retain the revision, session, frame, loader, unique realm or request hop generation. A queued Fetch item needs both that original observation and current placement at take time. An event pass authorizes this frame attribution only; existing cookie, header, redirect and other independent filters still apply. A screencast rewrite supplies a private mask plan, never raw pixels.",
|
|
157
|
+
"additionalProperties": { "$ref": "#/$defs/proof" }
|
|
158
|
+
},
|
|
59
159
|
"invalidPages": {
|
|
60
160
|
"type": "array",
|
|
61
161
|
"items": {
|
|
@@ -93,16 +193,8 @@
|
|
|
93
193
|
"type": { "type": "string" },
|
|
94
194
|
"shown": { "type": "boolean" },
|
|
95
195
|
"box": {
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"required": ["x", "y", "width", "height"],
|
|
99
|
-
"properties": {
|
|
100
|
-
"x": { "type": "number" },
|
|
101
|
-
"y": { "type": "number" },
|
|
102
|
-
"width": { "type": "number" },
|
|
103
|
-
"height": { "type": "number" }
|
|
104
|
-
},
|
|
105
|
-
"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."
|
|
196
|
+
"$ref": "#/$defs/rect",
|
|
197
|
+
"description": "Measured top-level viewport-relative CSS pixels. A zero area is a measured empty box."
|
|
106
198
|
},
|
|
107
199
|
"defaultContext": {
|
|
108
200
|
"type": "object",
|
|
@@ -117,7 +209,11 @@
|
|
|
117
209
|
},
|
|
118
210
|
"opener": { "type": "string" },
|
|
119
211
|
"previous": { "type": "boolean" },
|
|
120
|
-
"creator": { "type": "string" }
|
|
212
|
+
"creator": { "type": "string" },
|
|
213
|
+
"documentBox": {
|
|
214
|
+
"$ref": "#/$defs/rect",
|
|
215
|
+
"description": "Document-relative CSS pixels in the actual beyond-viewport capture layout, not viewport bounds from before relayout."
|
|
216
|
+
}
|
|
121
217
|
}
|
|
122
218
|
},
|
|
123
219
|
"page": {
|
|
@@ -138,11 +234,28 @@
|
|
|
138
234
|
"type": "string",
|
|
139
235
|
"minLength": 1,
|
|
140
236
|
"description": "Guard-owned identity of this page observation, invalidated on membership, document, origin, geometry, visibility or focus changes. Use newly verified facts at release."
|
|
237
|
+
},
|
|
238
|
+
"viewport": {
|
|
239
|
+
"type": "object",
|
|
240
|
+
"additionalProperties": false,
|
|
241
|
+
"required": ["width", "height", "deviceScaleFactor"],
|
|
242
|
+
"properties": {
|
|
243
|
+
"width": { "type": "number", "exclusiveMinimum": 0 },
|
|
244
|
+
"height": { "type": "number", "exclusiveMinimum": 0 },
|
|
245
|
+
"deviceScaleFactor": { "type": "number", "exclusiveMinimum": 0 },
|
|
246
|
+
"pageScaleFactor": { "type": "number", "exclusiveMinimum": 0 },
|
|
247
|
+
"offsetTop": { "type": "number" },
|
|
248
|
+
"offsetX": { "type": "number" },
|
|
249
|
+
"offsetY": { "type": "number" },
|
|
250
|
+
"scrollOffsetX": { "type": "number" },
|
|
251
|
+
"scrollOffsetY": { "type": "number" }
|
|
252
|
+
},
|
|
253
|
+
"description": "Current capture surface in DIP and device scale in output pixels/DIP. Supply pageScaleFactor, offsetX and offsetY from Page.getLayoutMetrics.cssVisualViewport (scale, offsetX, offsetY); offsets are visual displacement within the layout viewport in CSS pixels. offsetTop is the screencast top inset in DIP. scrollOffsetX/Y locate the layout viewport in document CSS pixels for a screenshot clip. Bind these measurements and the boxes to the capture revision. A screencast frame must match all six geometry fields of its metadata."
|
|
141
254
|
}
|
|
142
255
|
}
|
|
143
256
|
},
|
|
144
257
|
"capture": {
|
|
145
|
-
"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.",
|
|
258
|
+
"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. Output rects are in encoded-image pixels. Cover all touched pixels (floor near edges, ceil far edges, intersect with image bounds). A clipped surface capture subtracts the document-relative clip origin in the matching box space and multiplies by clip.scale and deviceScaleFactor; it ignores pinch scale and visual offsets. Without a surface clip, subtract the measured visual offsets and multiply by the pinch scale. An unclipped surface raster also uses deviceScaleFactor. A fromSurface:false view raster ignores clip, device scale and captureBeyondViewport. A screencast is bounded by the smaller width/height ratio and the native raster scale; scale the viewport box and account for page zoom and top inset. Pass original startScreencast params in context.screencastParams for every frame, even {}.",
|
|
146
259
|
"enum": ["allow", "blank"]
|
|
147
260
|
},
|
|
148
261
|
"observation": {
|
|
@@ -213,6 +326,37 @@
|
|
|
213
326
|
}
|
|
214
327
|
}
|
|
215
328
|
]
|
|
329
|
+
},
|
|
330
|
+
"proof": {
|
|
331
|
+
"type": "object",
|
|
332
|
+
"properties": {
|
|
333
|
+
"level": { "enum": ["browser", "page", "child"] },
|
|
334
|
+
"visibility": { "enum": ["public", "private", "quarantined", "tombstone"] },
|
|
335
|
+
"sessionId": { "type": "string", "minLength": 1 },
|
|
336
|
+
"revision": { "type": "string", "minLength": 1 },
|
|
337
|
+
"boundFrames": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
338
|
+
"observed": { "type": "object" },
|
|
339
|
+
"child": {
|
|
340
|
+
"type": "object",
|
|
341
|
+
"description": "A routed child receipt binds sessionId to parentSessionId, targetId and revision. Non-public children are never delivered. On a non-mixed page the reported targetInfo can prove an ordinary child without a receipt. For absent or empty targetInfo supply the bound child’s retained targetInfo, or a bound public attached/retiredOrdinary receipt. For an empty-URL dedicated worker without its own reported origin, context.frame identifies the attaching document and loader. Shared and service worker routes need their own script URL, never an owner verdict."
|
|
342
|
+
},
|
|
343
|
+
"queued": {
|
|
344
|
+
"type": "boolean",
|
|
345
|
+
"description": "True when releasing a queued event. Supply the original context.observed session, composition revision and mixed flag (plus realm or hop receipts where applicable) and the current release revision on both context and page. Missing or changed evidence withholds the item. An immediate event on a never-mixed page needs no queue receipt."
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
"additionalProperties": true
|
|
349
|
+
},
|
|
350
|
+
"rect": {
|
|
351
|
+
"type": "object",
|
|
352
|
+
"additionalProperties": false,
|
|
353
|
+
"required": ["x", "y", "width", "height"],
|
|
354
|
+
"properties": {
|
|
355
|
+
"x": { "type": "number" },
|
|
356
|
+
"y": { "type": "number" },
|
|
357
|
+
"width": { "type": "number" },
|
|
358
|
+
"height": { "type": "number" }
|
|
359
|
+
}
|
|
216
360
|
}
|
|
217
361
|
}
|
|
218
362
|
}
|
|
@@ -31,6 +31,19 @@
|
|
|
31
31
|
"const": "slicc: refused: slicc can't parse this URL, so it could be a protected page"
|
|
32
32
|
},
|
|
33
33
|
"origins": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
34
|
+
"configErrors": {
|
|
35
|
+
"type": "array",
|
|
36
|
+
"minItems": 1,
|
|
37
|
+
"items": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"additionalProperties": false,
|
|
40
|
+
"required": ["extraOrigins", "error"],
|
|
41
|
+
"properties": {
|
|
42
|
+
"extraOrigins": { "type": "array", "minItems": 1, "items": { "type": "string" } },
|
|
43
|
+
"error": { "type": "string", "minLength": 1 }
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
34
47
|
"urls": {
|
|
35
48
|
"type": "array",
|
|
36
49
|
"items": {
|