@ai-ecoverse/slicc-browsers 1.26.1 → 1.26.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/README.md CHANGED
@@ -229,6 +229,7 @@ You supply:
229
229
  | capability | means the transport can |
230
230
  | --- | --- |
231
231
  | `autoAttach` | auto-attach to child targets such as popups and iframes |
232
+ | `iframeAutoAttach` | auto-attach non-tab child targets (out-of-process iframes) under a page session |
232
233
  | `browserSession` | send commands on the browser session, not only a page |
233
234
  | `browserContexts` | create isolated browser contexts |
234
235
  | `discovery` | report target create/change without a session |
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "setVersion": "1.26.1",
3
+ "setVersion": "1.26.2",
4
4
  "sources": [
5
5
  {
6
6
  "repo": "ai-ecoverse/slicc-cli",
@@ -107,6 +107,7 @@
107
107
  "syntheticAutoAttach": "the transport has no native Target.setAutoAttach, so the guard attaches new tabs, pages and their children itself and synthesizes Target.attachedToTarget, with the same placement and holds",
108
108
  "secureOrigin": "the fixture and page origins are secure contexts (HTTPS), so service worker registration is available",
109
109
  "closeProtected": "the guard lets Target.closeTarget close a protected tab",
110
+ "iframeAutoAttach": "the transport auto-attaches non-tab child targets (out-of-process iframes) under a page session: Target.setAutoAttach with children steps and child sessions for iframe targets, not only tab-level auto-attach",
110
111
  "signInHold": "the guard runs seven's sign-in hold: holds about:blank#slicc-sign-in-<marker> popups (and keeps them held after they move to an ordinary URL), and keeps callback-only authorize tabs that name seven's callback out of /json/list, Target.getTargets, discovery events, attach and title/body reads; announcing only the target id with empty URL/title while a Puppeteer-style connect still completes is acceptable"
111
112
  },
112
113
  "placeholders": {
@@ -31785,7 +31786,7 @@
31785
31786
  }
31786
31787
  ],
31787
31788
  "targets": ["seven", "vault"],
31788
- "requires": ["autoAttach"],
31789
+ "requires": ["iframeAutoAttach"],
31789
31790
  "observe": {
31790
31791
  "frameTree": {
31791
31792
  "means": "C3.protected-parent-iframes.page: Page.getFrameTree through the page session shows the ordinary grandchild under the middle frame by frameId, URL, or parentId",
@@ -31948,7 +31949,7 @@
31948
31949
  }
31949
31950
  ],
31950
31951
  "targets": ["seven"],
31951
- "requires": ["autoAttach"],
31952
+ "requires": ["iframeAutoAttach"],
31952
31953
  "observe": {
31953
31954
  "frameTree": {
31954
31955
  "means": "C3.protected-parent-srcdoc.page: Page.getFrameTree through the page session shows the ordinary grandchild under the middle frame by frameId, URL, or parentId",
@@ -32099,7 +32100,7 @@
32099
32100
  }
32100
32101
  ],
32101
32102
  "targets": ["seven"],
32102
- "requires": ["autoAttach"],
32103
+ "requires": ["iframeAutoAttach"],
32103
32104
  "observe": {
32104
32105
  "frameTree": {
32105
32106
  "means": "C3.ordinary-parent-iframes.page: Page.getFrameTree through the page session shows the ordinary grandchild under the middle frame by frameId, URL, or parentId",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-browsers",
3
- "version": "1.26.1",
3
+ "version": "1.26.2",
4
4
  "description": "SLICC's shared browser catalog, JSON schemas and discovery conformance corpus",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -88,7 +88,7 @@
88
88
  "test:unit:guard": "mkdir -p coverage/unit && node --experimental-vm-modules --no-warnings --experimental-test-coverage --test --test-concurrency=1 --test-coverage-include=guard-runner.mjs --test-coverage-include=guard-driver.mjs --test-coverage-include=extension-frame.mjs --test-coverage-include=fixture-server.mjs --test-coverage-include=fixture-client.mjs --test-coverage-include=observer-target.mjs --test-coverage-include=frame-read.mjs --test-coverage-include=bfcache-restore.mjs --test-coverage-include=protected-error-page.mjs --test-coverage-include=protected-parent-iframes.mjs --test-coverage-include=unparseable-url.mjs --test-coverage-include=scripts/browser-runner.mjs --test-coverage-include=scripts/validate.mjs --test-reporter=lcov --test-reporter-destination=coverage/unit/guard.lcov test/unit/guard-*.test.mjs && slicc-diff-cover coverage/unit/guard.lcov"
89
89
  },
90
90
  "devDependencies": {
91
- "@ai-ecoverse/slicc-cdp": "1.50.1",
91
+ "@ai-ecoverse/slicc-cdp": "1.52.1",
92
92
  "@ai-ecoverse/slicc-shared-web": "2.14.4",
93
93
  "@biomejs/biome": "2.6.6",
94
94
  "ajv": "8.20.0",
@@ -1267,6 +1267,7 @@ async function evaluateContexts(client, sessionIds, contexts, evaluateArm, resul
1267
1267
  const sessions = [...new Set((sessionIds ?? []).filter(Boolean))];
1268
1268
  let anyUnanswered = false;
1269
1269
  let unansweredId;
1270
+ let unansweredText;
1270
1271
  for (const context of contexts) {
1271
1272
  const ordered = [
1272
1273
  context.sessionId,
@@ -1287,6 +1288,7 @@ async function evaluateContexts(client, sessionIds, contexts, evaluateArm, resul
1287
1288
  if (!answered(evaluated) && !gone) {
1288
1289
  anyUnanswered = true;
1289
1290
  unansweredId ??= context.id;
1291
+ unansweredText ??= errorText(evaluated);
1290
1292
  continue;
1291
1293
  }
1292
1294
  takeFirst(
@@ -1306,6 +1308,7 @@ async function evaluateContexts(client, sessionIds, contexts, evaluateArm, resul
1306
1308
  if (result.contextEvaluate !== true && anyUnanswered) {
1307
1309
  evaluateArm.unanswered = true;
1308
1310
  evaluateArm.unansweredId ??= unansweredId;
1311
+ evaluateArm.unansweredText ??= unansweredText;
1309
1312
  evaluateArm.out ??= { ok: false };
1310
1313
  }
1311
1314
  }
@@ -1345,7 +1348,7 @@ function recordChildEnable(out, label, child, childSessions, missing, result) {
1345
1348
  return 'refused';
1346
1349
  }
1347
1350
  if (!answered(out)) {
1348
- missing.push(`${label} unanswered`);
1351
+ missing.push(`${label} unanswered${errorText(out)}`);
1349
1352
  return 'missing';
1350
1353
  }
1351
1354
  missing.push(`${label} failed: ${out.error?.message ?? out.error}`);
@@ -1560,8 +1563,13 @@ async function pollPageClient({
1560
1563
  return windowMs;
1561
1564
  }
1562
1565
 
1566
+ function errorText(out) {
1567
+ const text = String(out?.error?.message ?? out?.error ?? '').slice(0, 160);
1568
+ return text ? `: ${text}` : '';
1569
+ }
1570
+
1563
1571
  function enableFailure(out, label, missing) {
1564
- if (!answered(out)) missing.push(`${label} unanswered`);
1572
+ if (!answered(out)) missing.push(`${label} unanswered${errorText(out)}`);
1565
1573
  else if (!out.ok) missing.push(`${label} failed: ${out.error?.message ?? out.error}`);
1566
1574
  }
1567
1575
 
@@ -2266,7 +2274,7 @@ function settlePageContexts(liveContexts, raw, evaluateArm, result, missing, ski
2266
2274
  'contextEvaluate',
2267
2275
  evaluateArm.unanswered,
2268
2276
  evaluateArm.unansweredId
2269
- ? `Runtime.evaluate unanswered (${evaluateArm.unansweredId})`
2277
+ ? `Runtime.evaluate unanswered (${evaluateArm.unansweredId}${evaluateArm.unansweredText ?? ''})`
2270
2278
  : 'Runtime.evaluate unanswered',
2271
2279
  missing,
2272
2280
  { contextEvaluate: false }
@@ -158,6 +158,10 @@
158
158
  "signInHold": {
159
159
  "type": "string",
160
160
  "minLength": 1
161
+ },
162
+ "iframeAutoAttach": {
163
+ "type": "string",
164
+ "minLength": 1
161
165
  }
162
166
  }
163
167
  },
@@ -197,7 +201,8 @@
197
201
  "stockSetup",
198
202
  "syntheticAutoAttach",
199
203
  "closeProtected",
200
- "signInHold"
204
+ "signInHold",
205
+ "iframeAutoAttach"
201
206
  ]
202
207
  },
203
208
  "requires": {