@ai-ecoverse/slicc-browsers 1.24.1 → 1.26.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 CHANGED
@@ -240,6 +240,7 @@ You supply:
240
240
  | `secureOrigin` | HTTPS origins (service workers) |
241
241
  | `stockSetup`, `syntheticAutoAttach` | admit stock clients' setup calls; synthesize auto-attach |
242
242
  | `closeProtected` | close a protected tab, except live vault/seven-UI disguises |
243
+ | `signInHold` | hold seven's sign-in popups and hide callback-only authorize tabs |
243
244
 
244
245
  ### Reading the result
245
246
 
@@ -115,11 +115,24 @@ function route(req, url, send, html, redirects) {
115
115
  `<p>oopif-mid ${escape(p.get('n') ?? '')}</p><iframe src="${escape(inner)}"></iframe>`
116
116
  );
117
117
  },
118
- '/oopif-srcdoc': () =>
119
- html(
118
+ '/oopif-srcdoc': () => {
119
+ const marker = p.get('n') ?? '';
120
+ return html(
120
121
  'oopif-srcdoc',
121
- `<p>oopif-srcdoc ${escape(p.get('n') ?? '')}</p><iframe sandbox="allow-scripts allow-forms" srcdoc="${escape('<!doctype html><title>srcdoc</title><p>ordinary srcdoc</p>')}"></iframe>`
122
+ `<p>oopif-srcdoc ${escape(marker)}</p><iframe sandbox="allow-scripts allow-forms" srcdoc="${escape(`<!doctype html><title>srcdoc</title><p>ordinary srcdoc ${marker}</p>`)}"></iframe>`
123
+ );
124
+ },
125
+ '/held': () =>
126
+ html(
127
+ 'SIGN-IN-HOLD-BODY-title',
128
+ `<p>SIGN-IN-HOLD-BODY</p><p>held ${escape(p.get('n') ?? '')}</p>`
129
+ ),
130
+ '/ims/authorize/v2': () =>
131
+ html(
132
+ 'SIGN-IN-HOLD-BODY-title',
133
+ `<h1>SIGN-IN-HOLD-BODY</h1><p>authorize ${escape(p.get('client_id') ?? '')}</p>`
122
134
  ),
135
+ '/cb': () => html('cb', `<p>callback ${escape(p.get('n') ?? '')}</p>`),
123
136
  '/bfcache': () => {
124
137
  const marker = JSON.stringify(`bfcache-marker-${p.get('n') ?? ''}`).replaceAll(
125
138
  '<',
package/guard-runner.mjs CHANGED
@@ -43,6 +43,7 @@ import {
43
43
  workerTypeForKind,
44
44
  } from './protected-worker.mjs';
45
45
  import { redirectSecret } from './redirect-secret.mjs';
46
+ import { signInHold } from './sign-in-hold.mjs';
46
47
  import { canonicalURL, unparseableURLs } from './unparseable-url.mjs';
47
48
 
48
49
  export { leftoverPersistentWorker, releasePersistentWorkerSessions, workerTypeForKind };
@@ -903,6 +904,7 @@ class Execution {
903
904
  'errorPage',
904
905
  'closeProtectedShape',
905
906
  'protectedParentIframes',
907
+ 'signInHold',
906
908
  'extensionWorld',
907
909
  'extensionFrame',
908
910
  'frameRead',
@@ -915,6 +917,7 @@ class Execution {
915
917
  'errorPage',
916
918
  'closeProtectedShape',
917
919
  'protectedParentIframes',
920
+ 'signInHold',
918
921
  'redirectSecret',
919
922
  'extensionFrame',
920
923
  'frameRead',
@@ -1020,6 +1023,7 @@ class Execution {
1020
1023
  step.errorPage ||
1021
1024
  step.closeProtectedShape ||
1022
1025
  step.protectedParentIframes ||
1026
+ step.signInHold ||
1023
1027
  step.spawnWorker ||
1024
1028
  step.probeSessions
1025
1029
  )
@@ -1168,6 +1172,7 @@ class Execution {
1168
1172
  if (step.redirectSecret || step.errorPage) return this.originProbe(step, session);
1169
1173
  if (step.closeProtectedShape) return this.runCloseProtectedShape(step);
1170
1174
  if (step.protectedParentIframes) return this.runProtectedParentIframes(step);
1175
+ if (step.signInHold) return this.runSignInHold(step);
1171
1176
  if (step.spawnWorker) return this.spawnWorker(step);
1172
1177
  return this.probeSessions(step);
1173
1178
  }
@@ -1254,6 +1259,29 @@ class Execution {
1254
1259
  return out;
1255
1260
  }
1256
1261
 
1262
+ async runSignInHold(step) {
1263
+ const out = await outcome(
1264
+ signInHold({
1265
+ client: this.client,
1266
+ reader: this.reader,
1267
+ mode: step.signInHold,
1268
+ openerOrigin: this.vars.target,
1269
+ ordinary: this.vars.ordinary,
1270
+ cross: this.options.targets?.cross,
1271
+ tag: this.vars.tag,
1272
+ internalSessions: this.internalSessions,
1273
+ notes: this.notes,
1274
+ budget: this.bound(5000),
1275
+ discovery: supported(['discovery'], this.options.capabilities),
1276
+ eventStart: this.eventStart,
1277
+ control: this.side === 'control',
1278
+ })
1279
+ );
1280
+ if (out.ok && out.result?.openerId) this.targets.push(out.result.openerId);
1281
+ if (out.ok && out.result?.targetId) this.targets.push(out.result.targetId);
1282
+ return out;
1283
+ }
1284
+
1257
1285
  spawnWorkerKind() {
1258
1286
  return allSteps([...(this.vector.setup ?? []), ...(this.vector.trigger ?? [])]).find(
1259
1287
  (step) => step.spawnWorker
@@ -2246,7 +2274,8 @@ const needsObserver = (vector) =>
2246
2274
  step.observer ||
2247
2275
  step.spawnWorker ||
2248
2276
  step.closeProtectedShape ||
2249
- step.protectedParentIframes
2277
+ step.protectedParentIframes ||
2278
+ step.signInHold
2250
2279
  ) ||
2251
2280
  vector.control.via === 'unguarded' ||
2252
2281
  observerRequired(vector.liveCheck) ||