@ai-ecoverse/slicc-browsers 1.26.2 → 1.26.3

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
@@ -241,7 +241,7 @@ You supply:
241
241
  | `secureOrigin` | HTTPS origins (service workers) |
242
242
  | `stockSetup`, `syntheticAutoAttach` | admit stock clients' setup calls; synthesize auto-attach |
243
243
  | `closeProtected` | close a protected tab, except live vault/seven-UI disguises |
244
- | `signInHold` | hold seven's sign-in popups and hide callback-only authorize tabs |
244
+ | `signInHold` | hold seven's sign-in popups and hide callback-only authorize tabs without over-blocking ordinary ones |
245
245
 
246
246
  ### Reading the result
247
247
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "setVersion": "1.26.2",
3
+ "setVersion": "1.26.3",
4
4
  "sources": [
5
5
  {
6
6
  "repo": "ai-ecoverse/slicc-cli",
@@ -32782,6 +32782,276 @@
32782
32782
  "contentRead": false,
32783
32783
  "connectCompletes": true
32784
32784
  }
32785
+ },
32786
+ {
32787
+ "id": "C7.sign-in-hold.ordinary-popup",
32788
+ "family": "C",
32789
+ "kind": "cdp",
32790
+ "scope": "any",
32791
+ "defaultContext": true,
32792
+ "requires": ["signInHold", "browserSession"],
32793
+ "setup": [
32794
+ {
32795
+ "text": "an ordinary page opens an ordinary popup with no sign-in marker; through the guard the popup must still be listed in /json/list and Target.getTargets, appear in discovery events, attach and yield its title/body — a guard that hides or refuses it fails as protection by over-blocking"
32796
+ },
32797
+ {
32798
+ "page": "tab",
32799
+ "url": "{ordinary}/blank"
32800
+ }
32801
+ ],
32802
+ "trigger": [
32803
+ {
32804
+ "signInHold": "ordinary-popup",
32805
+ "as": "probe",
32806
+ "requires": ["signInHold", "browserSession"]
32807
+ }
32808
+ ],
32809
+ "targets": ["seven"],
32810
+ "observe": {
32811
+ "jsonListed": {
32812
+ "means": "C7.sign-in-hold.ordinary-popup: /json/list through the client shows the ordinary tab by id, URL or title",
32813
+ "check": {
32814
+ "result": "probe",
32815
+ "path": "result.jsonListed",
32816
+ "equals": true,
32817
+ "observer": "client"
32818
+ },
32819
+ "absencePoll": true
32820
+ },
32821
+ "targetsListed": {
32822
+ "means": "C7.sign-in-hold.ordinary-popup: Target.getTargets through the client shows the ordinary tab with a non-empty URL or title",
32823
+ "check": {
32824
+ "result": "probe",
32825
+ "path": "result.targetsListed",
32826
+ "equals": true,
32827
+ "observer": "client"
32828
+ },
32829
+ "absencePoll": true
32830
+ },
32831
+ "eventsSeen": {
32832
+ "means": "C7.sign-in-hold.ordinary-popup: a discovery event carries the ordinary tab with a non-empty URL or title",
32833
+ "requires": ["discovery"],
32834
+ "check": {
32835
+ "result": "probe",
32836
+ "path": "result.eventsSeen",
32837
+ "equals": true,
32838
+ "observer": "client"
32839
+ },
32840
+ "absencePoll": true
32841
+ },
32842
+ "idAnnounced": {
32843
+ "means": "C7.sign-in-hold.ordinary-popup: the client learned the tab's target id with empty URL and title (announce-only)",
32844
+ "check": {
32845
+ "result": "probe",
32846
+ "path": "result.idAnnounced",
32847
+ "equals": true,
32848
+ "observer": "client"
32849
+ },
32850
+ "absencePoll": true
32851
+ },
32852
+ "attachSession": {
32853
+ "means": "C7.sign-in-hold.ordinary-popup: Target.attachToTarget on the raw tab id returned a session",
32854
+ "check": {
32855
+ "result": "probe",
32856
+ "path": "result.attachSession",
32857
+ "equals": true,
32858
+ "observer": "client"
32859
+ }
32860
+ },
32861
+ "attachRefused": {
32862
+ "means": "C7.sign-in-hold.ordinary-popup: Target.attachToTarget on the raw tab id was refused with a slicc refusal",
32863
+ "check": {
32864
+ "result": "probe",
32865
+ "path": "result.attachRefused",
32866
+ "equals": true,
32867
+ "observer": "client"
32868
+ }
32869
+ },
32870
+ "contentRead": {
32871
+ "means": "C7.sign-in-hold.ordinary-popup: the client read the tab's title or body mark through the guard",
32872
+ "check": {
32873
+ "result": "probe",
32874
+ "path": "result.contentRead",
32875
+ "equals": true,
32876
+ "observer": "client"
32877
+ }
32878
+ },
32879
+ "connectCompletes": {
32880
+ "means": "C7.sign-in-hold.ordinary-popup: a Puppeteer-style Browser.getVersion plus Target.getTargets connect through the guard completed",
32881
+ "check": {
32882
+ "result": "probe",
32883
+ "path": "result.connectCompletes",
32884
+ "equals": true,
32885
+ "observer": "client"
32886
+ }
32887
+ }
32888
+ },
32889
+ "live": "the unguarded observer opened the ordinary popup and read its body mark",
32890
+ "liveCheck": {
32891
+ "result": "probe",
32892
+ "path": "result.live",
32893
+ "equals": true,
32894
+ "observer": "client"
32895
+ },
32896
+ "control": {
32897
+ "origin": "ordinary",
32898
+ "via": "unguarded",
32899
+ "expected": {
32900
+ "jsonListed": true,
32901
+ "targetsListed": true,
32902
+ "eventsSeen": true,
32903
+ "idAnnounced": false,
32904
+ "attachSession": true,
32905
+ "attachRefused": false,
32906
+ "contentRead": true,
32907
+ "connectCompletes": true
32908
+ }
32909
+ },
32910
+ "expected": {
32911
+ "jsonListed": true,
32912
+ "targetsListed": true,
32913
+ "eventsSeen": true,
32914
+ "idAnnounced": false,
32915
+ "attachSession": true,
32916
+ "attachRefused": false,
32917
+ "contentRead": true,
32918
+ "connectCompletes": true
32919
+ }
32920
+ },
32921
+ {
32922
+ "id": "C7.sign-in-hold.ordinary-authorize",
32923
+ "family": "C",
32924
+ "kind": "cdp",
32925
+ "scope": "any",
32926
+ "defaultContext": true,
32927
+ "requires": ["signInHold", "browserSession"],
32928
+ "setup": [
32929
+ {
32930
+ "text": "a tab at an authorize-like URL with client_id=other and redirect_uri naming an ordinary callback (no seven callback) must still be listed, attachable and readable through the guard — a guard that hides or refuses it fails as protection by over-blocking"
32931
+ },
32932
+ {
32933
+ "page": "tab",
32934
+ "url": "{ordinary}/blank"
32935
+ }
32936
+ ],
32937
+ "trigger": [
32938
+ {
32939
+ "signInHold": "ordinary-authorize",
32940
+ "as": "probe",
32941
+ "requires": ["signInHold", "browserSession"]
32942
+ }
32943
+ ],
32944
+ "targets": ["seven"],
32945
+ "observe": {
32946
+ "jsonListed": {
32947
+ "means": "C7.sign-in-hold.ordinary-authorize: /json/list through the client shows the ordinary tab by id, URL or title",
32948
+ "check": {
32949
+ "result": "probe",
32950
+ "path": "result.jsonListed",
32951
+ "equals": true,
32952
+ "observer": "client"
32953
+ },
32954
+ "absencePoll": true
32955
+ },
32956
+ "targetsListed": {
32957
+ "means": "C7.sign-in-hold.ordinary-authorize: Target.getTargets through the client shows the ordinary tab with a non-empty URL or title",
32958
+ "check": {
32959
+ "result": "probe",
32960
+ "path": "result.targetsListed",
32961
+ "equals": true,
32962
+ "observer": "client"
32963
+ },
32964
+ "absencePoll": true
32965
+ },
32966
+ "eventsSeen": {
32967
+ "means": "C7.sign-in-hold.ordinary-authorize: a discovery event carries the ordinary tab with a non-empty URL or title",
32968
+ "requires": ["discovery"],
32969
+ "check": {
32970
+ "result": "probe",
32971
+ "path": "result.eventsSeen",
32972
+ "equals": true,
32973
+ "observer": "client"
32974
+ },
32975
+ "absencePoll": true
32976
+ },
32977
+ "idAnnounced": {
32978
+ "means": "C7.sign-in-hold.ordinary-authorize: the client learned the tab's target id with empty URL and title (announce-only)",
32979
+ "check": {
32980
+ "result": "probe",
32981
+ "path": "result.idAnnounced",
32982
+ "equals": true,
32983
+ "observer": "client"
32984
+ },
32985
+ "absencePoll": true
32986
+ },
32987
+ "attachSession": {
32988
+ "means": "C7.sign-in-hold.ordinary-authorize: Target.attachToTarget on the raw tab id returned a session",
32989
+ "check": {
32990
+ "result": "probe",
32991
+ "path": "result.attachSession",
32992
+ "equals": true,
32993
+ "observer": "client"
32994
+ }
32995
+ },
32996
+ "attachRefused": {
32997
+ "means": "C7.sign-in-hold.ordinary-authorize: Target.attachToTarget on the raw tab id was refused with a slicc refusal",
32998
+ "check": {
32999
+ "result": "probe",
33000
+ "path": "result.attachRefused",
33001
+ "equals": true,
33002
+ "observer": "client"
33003
+ }
33004
+ },
33005
+ "contentRead": {
33006
+ "means": "C7.sign-in-hold.ordinary-authorize: the client read the tab's title or body mark through the guard",
33007
+ "check": {
33008
+ "result": "probe",
33009
+ "path": "result.contentRead",
33010
+ "equals": true,
33011
+ "observer": "client"
33012
+ }
33013
+ },
33014
+ "connectCompletes": {
33015
+ "means": "C7.sign-in-hold.ordinary-authorize: a Puppeteer-style Browser.getVersion plus Target.getTargets connect through the guard completed",
33016
+ "check": {
33017
+ "result": "probe",
33018
+ "path": "result.connectCompletes",
33019
+ "equals": true,
33020
+ "observer": "client"
33021
+ }
33022
+ }
33023
+ },
33024
+ "live": "the unguarded observer opened the ordinary authorize tab and read its body mark",
33025
+ "liveCheck": {
33026
+ "result": "probe",
33027
+ "path": "result.live",
33028
+ "equals": true,
33029
+ "observer": "client"
33030
+ },
33031
+ "control": {
33032
+ "origin": "ordinary",
33033
+ "via": "unguarded",
33034
+ "expected": {
33035
+ "jsonListed": true,
33036
+ "targetsListed": true,
33037
+ "eventsSeen": true,
33038
+ "idAnnounced": false,
33039
+ "attachSession": true,
33040
+ "attachRefused": false,
33041
+ "contentRead": true,
33042
+ "connectCompletes": true
33043
+ }
33044
+ },
33045
+ "expected": {
33046
+ "jsonListed": true,
33047
+ "targetsListed": true,
33048
+ "eventsSeen": true,
33049
+ "idAnnounced": false,
33050
+ "attachSession": true,
33051
+ "attachRefused": false,
33052
+ "contentRead": true,
33053
+ "connectCompletes": true
33054
+ }
32785
33055
  }
32786
33056
  ]
32787
33057
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-browsers",
3
- "version": "1.26.2",
3
+ "version": "1.26.3",
4
4
  "description": "SLICC's shared browser catalog, JSON schemas and discovery conformance corpus",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -607,7 +607,8 @@
607
607
  "callback",
608
608
  "callback-encoded",
609
609
  "callback-origin",
610
- "ordinary-popup"
610
+ "ordinary-popup",
611
+ "ordinary-authorize"
611
612
  ]
612
613
  },
613
614
  "as": {
package/sign-in-hold.mjs CHANGED
@@ -25,8 +25,8 @@ function note(notes, label, evidence) {
25
25
  notes.push(`${label}: ${JSON.stringify(evidence)}`);
26
26
  }
27
27
 
28
- function authorizeUrl(idp, redirect) {
29
- return `${idp}/ims/authorize/v2?client_id=any&redirect_uri=${redirect}&response_type=token`;
28
+ function authorizeUrl(idp, redirect, clientId = 'any') {
29
+ return `${idp}/ims/authorize/v2?client_id=${clientId}&redirect_uri=${redirect}&response_type=token`;
30
30
  }
31
31
 
32
32
  function callbackRedirect(mode) {
@@ -579,10 +579,17 @@ async function callbackTab({
579
579
  control,
580
580
  }) {
581
581
  const mark = BODY;
582
- const redirect = control ? encodeURIComponent(`${ordinary}/cb`) : callbackRedirect(mode);
583
- if (!redirect && !control) return { incomplete: `unknown callback mode ${mode}` };
584
- const url = authorizeUrl(idp, redirect);
585
- note(notes, 'sign-in-hold.callback-url', { url, control: Boolean(control), mode });
582
+ const ordinaryAuthorize = control || mode === 'ordinary-authorize';
583
+ const redirect = ordinaryAuthorize
584
+ ? encodeURIComponent(`${ordinary}/cb`)
585
+ : callbackRedirect(mode);
586
+ if (!redirect && !ordinaryAuthorize) return { incomplete: `unknown callback mode ${mode}` };
587
+ const url = authorizeUrl(idp, redirect, ordinaryAuthorize ? 'other' : 'any');
588
+ note(notes, 'sign-in-hold.callback-url', {
589
+ url,
590
+ control: Boolean(ordinaryAuthorize),
591
+ mode,
592
+ });
586
593
 
587
594
  const created = await outcome(reader.send('Target.createTarget', { url, background: true }));
588
595
  if (!created.ok)
@@ -676,7 +683,7 @@ export async function signInHold({
676
683
  eventStart,
677
684
  control: control || mode === 'ordinary-popup',
678
685
  })
679
- : String(mode).startsWith('callback')
686
+ : String(mode).startsWith('callback') || mode === 'ordinary-authorize'
680
687
  ? await callbackTab({
681
688
  reader,
682
689
  client,
@@ -689,7 +696,7 @@ export async function signInHold({
689
696
  discovery,
690
697
  internalSessions,
691
698
  eventStart,
692
- control,
699
+ control: control || mode === 'ordinary-authorize',
693
700
  })
694
701
  : { incomplete: `unknown signInHold mode ${mode}` };
695
702