@ai-ecoverse/slicc-browsers 1.52.0 → 1.54.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.
@@ -315,6 +315,34 @@
315
315
  "unparseableRefusal": {
316
316
  "const": "slicc: refused: slicc can't parse this URL, so it could be a protected page"
317
317
  },
318
+ "sealedAllowed": {
319
+ "description": "Exact commands allowed on a sealed document. Event-producing subscriptions are not implicitly allowed. Target discovery is redacted, Page.enable is for lifecycle and navigation, and Fetch.enable still requires the guard’s request restrictions. Tree replies are separately projected. Unlisted commands are refused.",
320
+ "type": "array",
321
+ "uniqueItems": true,
322
+ "items": {
323
+ "type": "string",
324
+ "pattern": "^[A-Z][A-Za-z0-9]*\\.[a-z][A-Za-z0-9]*$"
325
+ }
326
+ },
327
+ "sealedEvents": {
328
+ "description": "Content events withheld on sealed documents even for earlier subscriptions. Domain.* covers every event in the domain; named events do not close other lifecycle or metadata events.",
329
+ "type": "array",
330
+ "minItems": 1,
331
+ "uniqueItems": true,
332
+ "items": {
333
+ "type": "string",
334
+ "pattern": "^[A-Z][A-Za-z0-9]*\\.(?:[a-z][A-Za-z0-9]*|\\*)$"
335
+ }
336
+ },
337
+ "sealedContent": {
338
+ "description": "Examples of content methods denied on sealed documents; Domain.* denotes a domain prefix. sealedAllowed is the only allowlist.",
339
+ "type": "array",
340
+ "uniqueItems": true,
341
+ "items": {
342
+ "type": "string",
343
+ "pattern": "^[A-Z][A-Za-z0-9]*\\.(?:[a-z][A-Za-z0-9]*|\\*)$"
344
+ }
345
+ },
318
346
  "extensionWorlds": {
319
347
  "type": "object",
320
348
  "additionalProperties": false,
@@ -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": {
@@ -88,20 +188,13 @@
88
188
  "loaderId": { "type": "string" },
89
189
  "url": { "type": "string" },
90
190
  "securityOrigin": { "type": "string" },
191
+ "originRead": { "enum": ["ok", "failed", "none"] },
91
192
  "unreachableUrl": { "type": "string" },
92
193
  "type": { "type": "string" },
93
194
  "shown": { "type": "boolean" },
94
195
  "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."
196
+ "$ref": "#/$defs/rect",
197
+ "description": "Measured top-level viewport-relative CSS pixels. A zero area is a measured empty box."
105
198
  },
106
199
  "defaultContext": {
107
200
  "type": "object",
@@ -116,7 +209,11 @@
116
209
  },
117
210
  "opener": { "type": "string" },
118
211
  "previous": { "type": "boolean" },
119
- "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
+ }
120
217
  }
121
218
  },
122
219
  "page": {
@@ -137,11 +234,28 @@
137
234
  "type": "string",
138
235
  "minLength": 1,
139
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."
140
254
  }
141
255
  }
142
256
  },
143
257
  "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.",
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 {}.",
145
259
  "enum": ["allow", "blank"]
146
260
  },
147
261
  "observation": {
@@ -164,9 +278,10 @@
164
278
  "additionalProperties": {
165
279
  "type": "object",
166
280
  "additionalProperties": false,
167
- "required": ["protected", "role", "capture"],
281
+ "required": ["protected", "sealed", "role", "capture"],
168
282
  "properties": {
169
283
  "protected": { "type": "boolean" },
284
+ "sealed": { "type": "boolean" },
170
285
  "role": {
171
286
  "enum": [
172
287
  "seven",
@@ -211,6 +326,37 @@
211
326
  }
212
327
  }
213
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
+ }
214
360
  }
215
361
  }
216
362
  }
@@ -63,6 +63,9 @@
63
63
  "opener": { "enum": ["protected", "unprotected", "unknown"] },
64
64
  "contextOrigin": { "type": "string" },
65
65
  "securityOrigin": { "type": "string" },
66
+ "origin": { "type": "string" },
67
+ "sealed": { "type": "boolean" },
68
+ "originRead": { "enum": ["ok", "failed", "none"] },
66
69
  "role": {
67
70
  "enum": [
68
71
  "ordinary",
@@ -0,0 +1,18 @@
1
+ export default Object.freeze([
2
+ 'Page.screencastFrame',
3
+ 'Runtime.*',
4
+ 'Debugger.*',
5
+ 'DOM.*',
6
+ 'CSS.*',
7
+ 'Log.*',
8
+ 'Console.*',
9
+ 'Accessibility.*',
10
+ 'Overlay.*',
11
+ 'LayerTree.*',
12
+ 'DOMStorage.*',
13
+ 'IndexedDB.*',
14
+ 'Animation.*',
15
+ 'Audits.*',
16
+ 'Media.*',
17
+ 'DOMSnapshot.*',
18
+ ]);
@@ -0,0 +1,8 @@
1
+ import rules from './sealed-event-rules.mjs';
2
+
3
+ const names = new Set(rules);
4
+ export const sealedEventDomains = Object.freeze([
5
+ ...new Set(rules.map((rule) => rule.split('.')[0])),
6
+ ]);
7
+ export const sealedContentEvent = (method) =>
8
+ names.has(method) || names.has(method.split('.')[0] + '.*');