@ai-ecoverse/slicc-browsers 1.12.0 → 1.13.1

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.
@@ -75,7 +75,11 @@
75
75
  "wsOnly": { "const": true },
76
76
  "six": { "const": true },
77
77
  "sevenOpen": { "type": "boolean" },
78
- "sevenTabs": { "type": "array", "items": { "$ref": "#/$defs/tab" } },
78
+ "sevenTabs": {
79
+ "description": "Seven tabs: url and title are the origin only, never a path, query, fragment or document title.",
80
+ "type": "array",
81
+ "items": { "$ref": "#/$defs/tab" }
82
+ },
79
83
  "tabs": { "type": "array", "items": { "$ref": "#/$defs/tab" } }
80
84
  }
81
85
  },
@@ -86,7 +86,8 @@
86
86
  "browserSession",
87
87
  "browserContexts",
88
88
  "chromeUrlsAttach",
89
- "extensionWorld"
89
+ "extensionWorld",
90
+ "discovery"
90
91
  ],
91
92
  "properties": {
92
93
  "autoAttach": {
@@ -102,6 +103,7 @@
102
103
  "minLength": 1
103
104
  },
104
105
  "extensionWorld": { "type": "string", "minLength": 1 },
106
+ "discovery": { "type": "string", "minLength": 1 },
105
107
  "chromeUrlsAttach": {
106
108
  "type": "string",
107
109
  "minLength": 1
@@ -133,7 +135,8 @@
133
135
  "browserSession",
134
136
  "browserContexts",
135
137
  "chromeUrlsAttach",
136
- "extensionWorld"
138
+ "extensionWorld",
139
+ "discovery"
137
140
  ]
138
141
  },
139
142
  "requires": {
@@ -427,6 +430,15 @@
427
430
  },
428
431
  "step": {
429
432
  "oneOf": [
433
+ {
434
+ "type": "object",
435
+ "additionalProperties": false,
436
+ "required": ["redirectSecret", "as"],
437
+ "properties": {
438
+ "redirectSecret": { "enum": ["headers", "mix", "body"] },
439
+ "as": { "$ref": "#/$defs/name" }
440
+ }
441
+ },
430
442
  {
431
443
  "type": "object",
432
444
  "additionalProperties": false,
@@ -1,4 +1,5 @@
1
1
  import { outcome, owned, parseURL } from './guard-driver.mjs';
2
+ import { createObserverTarget } from './observer-target.mjs';
2
3
 
3
4
  const pause = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
4
5
  const refused = (out) => !out.ok && /^slicc: refused:/.test(out.error?.message ?? '');
@@ -151,6 +152,7 @@ export async function unparseableURLs({
151
152
  tag,
152
153
  fixture,
153
154
  browserSession,
155
+ notes = [],
154
156
  }) {
155
157
  const root = new URL(origin);
156
158
  const cookie = `seven-unparseable-${tag}`;
@@ -162,10 +164,14 @@ export async function unparseableURLs({
162
164
  cookies: [{ name: cookie, value, domain: '.sliccy.ai', path: '/', secure: false }],
163
165
  });
164
166
  const url = rootURL(root, 'exa%20mple.sliccy.ai', `/doc?n=${tag}-observer`);
165
- const { targetId: probeId } = await reader.send('Target.createTarget', {
166
- url,
167
- background: true,
168
- });
167
+ const { targetId: probeId } = await createObserverTarget(
168
+ reader,
169
+ {
170
+ url,
171
+ background: true,
172
+ },
173
+ notes
174
+ );
169
175
  targets.add(probeId);
170
176
  const ground = await document(reader, probeId, url);
171
177
  observer = (await reader.send('Target.attachToTarget', { targetId: probeId, flatten: true }))