pi-agent-browser-native 0.2.24 → 0.2.26

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.
@@ -4,6 +4,7 @@
4
4
  * Scope: Versioned capability metadata only; it does not execute agent-browser or validate documentation by itself.
5
5
  * Usage: Imported by command-reference verifier, generated docs checker, and tests when upstream agent-browser is re-baselined.
6
6
  * Invariants/Assumptions: This package targets the current installed upstream agent-browser only and does not keep compatibility shims for older versions.
7
+ * Related: `docs/SUPPORT_MATRIX.md` maps `CAPABILITY_BASELINE.inventorySections` to human docs, runtime behavior, tests, and verification gates; refresh that matrix whenever this baseline changes.
7
8
  */
8
9
 
9
10
  export const CAPABILITY_BASELINE_SOURCE = "scripts/agent-browser-capability-baseline.mjs";
@@ -11,118 +12,506 @@ export const COMMAND_REFERENCE_DOC_PATH = "docs/COMMAND_REFERENCE.md";
11
12
  export const CAPABILITY_BASELINE_BLOCK_MARKER_PREFIX = "agent-browser-capability-baseline";
12
13
  export const COMMAND_REFERENCE_BASELINE_BLOCK_IDS = Object.freeze(["upstream-baseline", "capability-token-baseline"]);
13
14
 
15
+ const helpCommand = (label, args) => Object.freeze({ label, args: Object.freeze(args) });
16
+ const expectation = (help, token) => Object.freeze({ help, token });
17
+ const section = (id, title, docTokens, upstreamExpectations = []) =>
18
+ Object.freeze({
19
+ id,
20
+ title,
21
+ docTokens: Object.freeze(docTokens),
22
+ upstreamExpectations: Object.freeze(upstreamExpectations.map(([help, token]) => expectation(help, token))),
23
+ });
24
+ const root = (token) => ["root help", token];
25
+
26
+ const helpCommands = Object.freeze([
27
+ helpCommand("root help", ["--help"]),
28
+ helpCommand("skills help", ["skills", "--help"]),
29
+ helpCommand("skills list", ["skills", "list"]),
30
+ helpCommand("core skill full", ["skills", "get", "core", "--full"]),
31
+ helpCommand("tab help", ["tab", "--help"]),
32
+ helpCommand("snapshot help", ["snapshot", "--help"]),
33
+ helpCommand("wait help", ["wait", "--help"]),
34
+ helpCommand("screenshot help", ["screenshot", "--help"]),
35
+ helpCommand("find help", ["find", "--help"]),
36
+ helpCommand("network help", ["network", "--help"]),
37
+ helpCommand("cookies help", ["cookies", "--help"]),
38
+ helpCommand("storage help", ["storage", "--help"]),
39
+ helpCommand("state help", ["state", "--help"]),
40
+ helpCommand("frame help", ["frame", "--help"]),
41
+ helpCommand("dialog help", ["dialog", "--help"]),
42
+ helpCommand("window help", ["window", "--help"]),
43
+ helpCommand("keyboard help", ["keyboard", "--help"]),
44
+ helpCommand("batch help", ["batch", "--help"]),
45
+ helpCommand("auth help", ["auth", "--help"]),
46
+ helpCommand("stream help", ["stream", "--help"]),
47
+ helpCommand("dashboard help", ["dashboard", "--help"]),
48
+ helpCommand("chat help", ["chat", "--help"]),
49
+ helpCommand("doctor help", ["doctor", "--help"]),
50
+ helpCommand("diff help", ["diff", "--help"]),
51
+ helpCommand("trace help", ["trace", "--help"]),
52
+ helpCommand("profiler help", ["profiler", "--help"]),
53
+ helpCommand("record help", ["record", "--help"]),
54
+ ]);
55
+
56
+ const inventorySections = Object.freeze([
57
+ section(
58
+ "skills",
59
+ "Built-in skills",
60
+ [
61
+ "skills list",
62
+ "skills get core",
63
+ "skills get core --full",
64
+ "skills get <name>",
65
+ "skills get electron",
66
+ "skills get slack",
67
+ "skills get dogfood",
68
+ "skills get vercel-sandbox",
69
+ "skills get agentcore",
70
+ "skills path [name]",
71
+ ],
72
+ [
73
+ root("skills get core --full"),
74
+ ["skills help", "get <name> --full"],
75
+ ["skills list", "core"],
76
+ ["skills list", "electron"],
77
+ ["skills list", "slack"],
78
+ ["skills list", "dogfood"],
79
+ ["skills list", "vercel-sandbox"],
80
+ ["skills list", "agentcore"],
81
+ ["core skill full", "agent-browser frame @e3"],
82
+ ["core skill full", "agent-browser dialog accept"],
83
+ ["core skill full", "agent-browser state save ./auth.json"],
84
+ ],
85
+ ),
86
+ section(
87
+ "core-commands",
88
+ "Core page, element, navigation, and extraction commands",
89
+ [
90
+ "open <url>",
91
+ "click <sel>",
92
+ "dblclick <sel>",
93
+ "type <sel> <text>",
94
+ "fill <sel> <text>",
95
+ "press <key>",
96
+ "keyboard type <text>",
97
+ "keyboard inserttext <text>",
98
+ "keydown Shift",
99
+ "keyup Shift",
100
+ "hover <sel>",
101
+ "focus <sel>",
102
+ "check <sel>",
103
+ "uncheck <sel>",
104
+ "select <sel> <val...>",
105
+ "drag <src> <dst>",
106
+ "upload <sel> <files...>",
107
+ "download <sel> <path>",
108
+ "scroll <dir> [px]",
109
+ "scrollintoview <sel>",
110
+ "wait <sel|ms>",
111
+ "screenshot [path]",
112
+ "screenshot --full",
113
+ "screenshot --annotate",
114
+ "pdf <path>",
115
+ "snapshot",
116
+ "eval <js>",
117
+ "connect <port|url>",
118
+ "close [--all]",
119
+ "back",
120
+ "forward",
121
+ "reload",
122
+ "pushstate <url>",
123
+ "get <what> [selector]",
124
+ "is <what> <selector>",
125
+ "find <locator> <value> <action>",
126
+ "mouse <action> [args]",
127
+ "set <setting> [value]",
128
+ ],
129
+ [
130
+ root("open <url>"),
131
+ root("click <sel>"),
132
+ root("dblclick <sel>"),
133
+ root("type <sel> <text>"),
134
+ root("fill <sel> <text>"),
135
+ root("press <key>"),
136
+ root("keyboard type <text>"),
137
+ root("keyboard inserttext <text>"),
138
+ root("hover <sel>"),
139
+ root("focus <sel>"),
140
+ root("check <sel>"),
141
+ root("uncheck <sel>"),
142
+ root("select <sel> <val...>"),
143
+ root("drag <src> <dst>"),
144
+ root("upload <sel> <files...>"),
145
+ root("download <sel> <path>"),
146
+ root("scroll <dir> [px]"),
147
+ root("scrollintoview <sel>"),
148
+ root("wait <sel|ms>"),
149
+ root("screenshot [path]"),
150
+ root("pdf <path>"),
151
+ root("snapshot"),
152
+ root("eval <js>"),
153
+ root("connect <port|url>"),
154
+ root("close [--all]"),
155
+ root("back"),
156
+ root("forward"),
157
+ root("reload"),
158
+ root("pushstate <url>"),
159
+ root("Get Info: agent-browser get <what> [selector]"),
160
+ root("Check State: agent-browser is <what> <selector>"),
161
+ root("Find Elements: agent-browser find <locator> <value> <action> [text]"),
162
+ root("Mouse: agent-browser mouse <action> [args]"),
163
+ root("Browser Settings: agent-browser set <setting> [value]"),
164
+ ["keyboard help", "type <text>"],
165
+ ["keyboard help", "inserttext <text>"],
166
+ ["screenshot help", "--full, -f"],
167
+ ["screenshot help", "--annotate"],
168
+ ["find help", "role <role>"],
169
+ ["find help", "testid <id>"],
170
+ ],
171
+ ),
172
+ section(
173
+ "state-tabs-frames-dialogs",
174
+ "Sessions, state, tabs, frames, dialogs, and windows",
175
+ [
176
+ "session",
177
+ "session list",
178
+ "state save <path>",
179
+ "state load <path>",
180
+ "tab list",
181
+ "tab new --label <name> [url]",
182
+ "tab <t<N>|label>",
183
+ "frame <selector|main>",
184
+ "dialog accept [text]",
185
+ "dialog dismiss",
186
+ "dialog status",
187
+ "window new",
188
+ ],
189
+ [
190
+ root("session list"),
191
+ ["state help", "save <path>"],
192
+ ["state help", "load <path>"],
193
+ ["tab help", "new --label <name> [url]"],
194
+ ["tab help", "Stable tab ids"],
195
+ ["frame help", "frame <selector|main>"],
196
+ ["dialog help", "dialog <accept|dismiss|status> [text]"],
197
+ ["window help", "window <operation>"],
198
+ ],
199
+ ),
200
+ section(
201
+ "network-storage-artifacts-diagnostics",
202
+ "Network, storage, artifacts, diagnostics, and performance",
203
+ [
204
+ "network <action>",
205
+ "network route <url> [--abort|--body <json>] [--resource-type <csv>]",
206
+ "network request <requestId>",
207
+ "cookies [get|set|clear]",
208
+ "cookies set --curl <file>",
209
+ "storage <local|session>",
210
+ "diff snapshot",
211
+ "diff screenshot --baseline",
212
+ "diff url <u1> <u2>",
213
+ "trace start|stop [path]",
214
+ "profiler start|stop [path]",
215
+ "record start <path> [url]",
216
+ "record restart <path> [url]",
217
+ "record stop",
218
+ "console [--clear]",
219
+ "errors [--clear]",
220
+ "highlight <sel>",
221
+ "inspect",
222
+ "clipboard <op> [text]",
223
+ "stream enable [--port <n>]",
224
+ "stream disable",
225
+ "stream status",
226
+ "react tree",
227
+ "react inspect <id>",
228
+ "react renders start",
229
+ "react renders stop [--json]",
230
+ "react suspense [--only-dynamic] [--json]",
231
+ "vitals [url] [--json]",
232
+ "removeinitscript <id>",
233
+ ],
234
+ [
235
+ root("network <action>"),
236
+ root("--resource-type <csv>"),
237
+ root("cookies [get|set|clear]"),
238
+ root("cookies set --curl <file>"),
239
+ root("storage <local|session>"),
240
+ root("diff snapshot"),
241
+ root("diff screenshot --baseline"),
242
+ root("trace start|stop [path]"),
243
+ root("profiler start|stop [path]"),
244
+ root("record start <path> [url]"),
245
+ root("record stop"),
246
+ root("console [--clear]"),
247
+ root("errors [--clear]"),
248
+ root("highlight <sel>"),
249
+ root("inspect"),
250
+ root("clipboard <op> [text]"),
251
+ root("stream enable [--port <n>]"),
252
+ root("stream disable"),
253
+ root("stream status"),
254
+ root("react tree"),
255
+ root("react inspect <id>"),
256
+ root("react renders start"),
257
+ root("react renders stop [--json]"),
258
+ root("react suspense [--only-dynamic] [--json]"),
259
+ root("vitals [url] [--json]"),
260
+ root("removeinitscript <id>"),
261
+ ["network help", "request <requestId>"],
262
+ ["network help", "har <start|stop>"],
263
+ ["storage help", "set <key> <value>"],
264
+ ["diff help", "diff screenshot --baseline <f>"],
265
+ ["trace help", "trace <operation> [path]"],
266
+ ["profiler help", "--categories <list>"],
267
+ ["record help", "record restart <path.webm> [url]"],
268
+ ],
269
+ ),
270
+ section(
271
+ "batch-auth-setup-ai",
272
+ "Batch, auth, confirmations, setup, dashboard, and AI commands",
273
+ [
274
+ "batch [--bail]",
275
+ "auth save <name>",
276
+ "auth save <name> --password-stdin",
277
+ "auth login <name>",
278
+ "auth list",
279
+ "auth show <name>",
280
+ "auth delete <name>",
281
+ "confirm <id>",
282
+ "deny <id>",
283
+ "chat <message>",
284
+ "dashboard start --port <n>",
285
+ "dashboard stop",
286
+ "install",
287
+ "install --with-deps",
288
+ "upgrade",
289
+ "doctor [--fix]",
290
+ "doctor --offline --quick",
291
+ "doctor --json",
292
+ "profiles",
293
+ ],
294
+ [
295
+ root("batch [--bail]"),
296
+ root("auth save <name>"),
297
+ root("auth login <name>"),
298
+ root("confirm <id>"),
299
+ root("deny <id>"),
300
+ root("chat <message>"),
301
+ root("dashboard start --port <n>"),
302
+ root("install --with-deps"),
303
+ root("upgrade"),
304
+ root("doctor [--fix]"),
305
+ root("profiles"),
306
+ ["batch help", "--bail"],
307
+ ["auth help", "--password-stdin"],
308
+ ["dashboard help", "dashboard [start|stop] [options]"],
309
+ ["chat help", "chat <message>"],
310
+ ["doctor help", "--offline"],
311
+ ["doctor help", "--json"],
312
+ ],
313
+ ),
314
+ section(
315
+ "options-and-env",
316
+ "Global flags, config, providers, policy, and environment",
317
+ [
318
+ "--profile <name|path>",
319
+ "AGENT_BROWSER_PROFILE",
320
+ "--session <name>",
321
+ "AGENT_BROWSER_SESSION",
322
+ "--session-name <name>",
323
+ "AGENT_BROWSER_SESSION_NAME",
324
+ "--state <path>",
325
+ "AGENT_BROWSER_STATE",
326
+ "--auto-connect",
327
+ "AGENT_BROWSER_AUTO_CONNECT",
328
+ "--headers <json>",
329
+ "--init-script <path>",
330
+ "AGENT_BROWSER_INIT_SCRIPTS",
331
+ "--enable <feature>",
332
+ "AGENT_BROWSER_ENABLE",
333
+ "--executable-path <path>",
334
+ "AGENT_BROWSER_EXECUTABLE_PATH",
335
+ "--extension <path>",
336
+ "AGENT_BROWSER_EXTENSIONS",
337
+ "--args <args>",
338
+ "AGENT_BROWSER_ARGS",
339
+ "--user-agent <ua>",
340
+ "AGENT_BROWSER_USER_AGENT",
341
+ "--proxy <server>",
342
+ "AGENT_BROWSER_PROXY",
343
+ "HTTP_PROXY",
344
+ "HTTPS_PROXY",
345
+ "ALL_PROXY",
346
+ "--proxy-bypass <hosts>",
347
+ "AGENT_BROWSER_PROXY_BYPASS",
348
+ "NO_PROXY",
349
+ "--ignore-https-errors",
350
+ "AGENT_BROWSER_IGNORE_HTTPS_ERRORS",
351
+ "--allow-file-access",
352
+ "AGENT_BROWSER_ALLOW_FILE_ACCESS",
353
+ "--headed",
354
+ "AGENT_BROWSER_HEADED",
355
+ "--cdp <port>",
356
+ "--color-scheme <scheme>",
357
+ "AGENT_BROWSER_COLOR_SCHEME",
358
+ "--download-path <path>",
359
+ "AGENT_BROWSER_DOWNLOAD_PATH",
360
+ "--engine <name>",
361
+ "AGENT_BROWSER_ENGINE",
362
+ "--no-auto-dialog",
363
+ "AGENT_BROWSER_NO_AUTO_DIALOG",
364
+ "--json",
365
+ "AGENT_BROWSER_JSON",
366
+ "--annotate",
367
+ "AGENT_BROWSER_ANNOTATE",
368
+ "--screenshot-dir <path>",
369
+ "AGENT_BROWSER_SCREENSHOT_DIR",
370
+ "--screenshot-quality <n>",
371
+ "AGENT_BROWSER_SCREENSHOT_QUALITY",
372
+ "--screenshot-format <fmt>",
373
+ "AGENT_BROWSER_SCREENSHOT_FORMAT",
374
+ "--content-boundaries",
375
+ "AGENT_BROWSER_CONTENT_BOUNDARIES",
376
+ "--max-output <chars>",
377
+ "AGENT_BROWSER_MAX_OUTPUT",
378
+ "--allowed-domains <list>",
379
+ "AGENT_BROWSER_ALLOWED_DOMAINS",
380
+ "--action-policy <path>",
381
+ "AGENT_BROWSER_ACTION_POLICY",
382
+ "--confirm-actions <list>",
383
+ "AGENT_BROWSER_CONFIRM_ACTIONS",
384
+ "--confirm-interactive",
385
+ "AGENT_BROWSER_CONFIRM_INTERACTIVE",
386
+ "-p, --provider <name>",
387
+ "AGENT_BROWSER_PROVIDER",
388
+ "browserbase",
389
+ "kernel",
390
+ "browseruse",
391
+ "browserless",
392
+ "agentcore",
393
+ "--device <name>",
394
+ "AGENT_BROWSER_IOS_DEVICE",
395
+ "agent-browser -p ios device list",
396
+ "agent-browser -p ios swipe up",
397
+ "agent-browser -p ios tap @e1",
398
+ "--model <name>",
399
+ "AI_GATEWAY_MODEL",
400
+ "-v, --verbose",
401
+ "-q, --quiet",
402
+ "--debug",
403
+ "AGENT_BROWSER_DEBUG",
404
+ "AGENT_BROWSER_CONFIG",
405
+ "AGENT_BROWSER_DEFAULT_TIMEOUT",
406
+ "AGENT_BROWSER_STREAM_PORT",
407
+ "AGENT_BROWSER_IDLE_TIMEOUT_MS",
408
+ "AGENT_BROWSER_ENCRYPTION_KEY",
409
+ "AGENT_BROWSER_STATE_EXPIRE_DAYS",
410
+ "AGENT_BROWSER_IOS_UDID",
411
+ "AI_GATEWAY_URL",
412
+ "AI_GATEWAY_API_KEY",
413
+ ],
414
+ [
415
+ root("--profile <name|path>"),
416
+ root("AGENT_BROWSER_PROFILE"),
417
+ root("--session <name>"),
418
+ root("AGENT_BROWSER_SESSION"),
419
+ root("--session-name <name>"),
420
+ root("AGENT_BROWSER_SESSION_NAME"),
421
+ root("--state <path>"),
422
+ root("AGENT_BROWSER_STATE"),
423
+ root("--auto-connect"),
424
+ root("AGENT_BROWSER_AUTO_CONNECT"),
425
+ root("--headers <json>"),
426
+ root("--init-script <path>"),
427
+ root("AGENT_BROWSER_INIT_SCRIPTS"),
428
+ root("--enable <feature>"),
429
+ root("AGENT_BROWSER_ENABLE"),
430
+ root("--executable-path <path>"),
431
+ root("AGENT_BROWSER_EXECUTABLE_PATH"),
432
+ root("--extension <path>"),
433
+ root("AGENT_BROWSER_EXTENSIONS"),
434
+ root("--args <args>"),
435
+ root("AGENT_BROWSER_ARGS"),
436
+ root("--user-agent <ua>"),
437
+ root("AGENT_BROWSER_USER_AGENT"),
438
+ root("--proxy <server>"),
439
+ root("AGENT_BROWSER_PROXY"),
440
+ root("HTTP_PROXY / HTTPS_PROXY"),
441
+ root("ALL_PROXY"),
442
+ root("--proxy-bypass <hosts>"),
443
+ root("AGENT_BROWSER_PROXY_BYPASS"),
444
+ root("NO_PROXY"),
445
+ root("--ignore-https-errors"),
446
+ root("AGENT_BROWSER_IGNORE_HTTPS_ERRORS"),
447
+ root("--allow-file-access"),
448
+ root("AGENT_BROWSER_ALLOW_FILE_ACCESS"),
449
+ root("--headed"),
450
+ root("AGENT_BROWSER_HEADED"),
451
+ root("--cdp <port>"),
452
+ root("--color-scheme <scheme>"),
453
+ root("AGENT_BROWSER_COLOR_SCHEME"),
454
+ root("--download-path <path>"),
455
+ root("AGENT_BROWSER_DOWNLOAD_PATH"),
456
+ root("--engine <name>"),
457
+ root("AGENT_BROWSER_ENGINE"),
458
+ root("--no-auto-dialog"),
459
+ root("AGENT_BROWSER_NO_AUTO_DIALOG"),
460
+ root("--json"),
461
+ root("AGENT_BROWSER_JSON"),
462
+ root("--annotate"),
463
+ root("AGENT_BROWSER_ANNOTATE"),
464
+ root("--screenshot-dir <path>"),
465
+ root("AGENT_BROWSER_SCREENSHOT_DIR"),
466
+ root("--screenshot-quality <n>"),
467
+ root("AGENT_BROWSER_SCREENSHOT_QUALITY"),
468
+ root("--screenshot-format <fmt>"),
469
+ root("AGENT_BROWSER_SCREENSHOT_FORMAT"),
470
+ root("--content-boundaries"),
471
+ root("AGENT_BROWSER_CONTENT_BOUNDARIES"),
472
+ root("--max-output <chars>"),
473
+ root("AGENT_BROWSER_MAX_OUTPUT"),
474
+ root("--allowed-domains <list>"),
475
+ root("AGENT_BROWSER_ALLOWED_DOMAINS"),
476
+ root("--action-policy <path>"),
477
+ root("AGENT_BROWSER_ACTION_POLICY"),
478
+ root("--confirm-actions <list>"),
479
+ root("AGENT_BROWSER_CONFIRM_ACTIONS"),
480
+ root("--confirm-interactive"),
481
+ root("AGENT_BROWSER_CONFIRM_INTERACTIVE"),
482
+ root("--provider <name>"),
483
+ root("AGENT_BROWSER_PROVIDER"),
484
+ root("agent-browser -p ios device list"),
485
+ root("agent-browser -p ios swipe up"),
486
+ root("agent-browser -p ios tap @e1"),
487
+ root("--device <name>"),
488
+ root("AGENT_BROWSER_IOS_DEVICE"),
489
+ root("--model <name>"),
490
+ root("AI_GATEWAY_MODEL"),
491
+ root("--verbose"),
492
+ root("--quiet"),
493
+ root("--debug"),
494
+ root("AGENT_BROWSER_DEBUG"),
495
+ root("--config <path>"),
496
+ root("AGENT_BROWSER_CONFIG"),
497
+ root("AGENT_BROWSER_DEFAULT_TIMEOUT"),
498
+ root("AGENT_BROWSER_STREAM_PORT"),
499
+ root("AGENT_BROWSER_IDLE_TIMEOUT_MS"),
500
+ root("AGENT_BROWSER_ENCRYPTION_KEY"),
501
+ root("AGENT_BROWSER_STATE_EXPIRE_DAYS"),
502
+ root("AGENT_BROWSER_IOS_UDID"),
503
+ root("AI_GATEWAY_URL"),
504
+ root("AI_GATEWAY_API_KEY"),
505
+ ],
506
+ ),
507
+ ]);
508
+
14
509
  export const CAPABILITY_BASELINE = Object.freeze({
15
510
  targetVersion: "0.27.0",
16
- helpCommands: Object.freeze([
17
- Object.freeze({ label: "root help", args: Object.freeze(["--help"]) }),
18
- Object.freeze({ label: "tab help", args: Object.freeze(["tab", "--help"]) }),
19
- Object.freeze({ label: "snapshot help", args: Object.freeze(["snapshot", "--help"]) }),
20
- Object.freeze({ label: "wait help", args: Object.freeze(["wait", "--help"]) }),
21
- ]),
22
- docRequiredTokens: Object.freeze([
23
- "skills list",
24
- "skills get core --full",
25
- "keyboard type <text>",
26
- "scroll <dir> [px]",
27
- "scrollintoview <sel>",
28
- "connect <port|url>",
29
- "is <what> <selector>",
30
- "find <locator> <value> <action>",
31
- "mouse <action> [args]",
32
- "set <setting> [value]",
33
- "network <action>",
34
- "cookies [get|set|clear]",
35
- "storage <local|session>",
36
- "diff snapshot",
37
- "trace start|stop [path]",
38
- "profiler start|stop [path]",
39
- "record start <path> [url]",
40
- "console [--clear]",
41
- "errors [--clear]",
42
- "highlight <sel>",
43
- "inspect",
44
- "clipboard <op> [text]",
45
- "stream enable [--port <n>]",
46
- "react tree",
47
- "react inspect <id>",
48
- "react renders start",
49
- "react renders stop [--json]",
50
- "react suspense [--only-dynamic] [--json]",
51
- "vitals [url] [--json]",
52
- "pushstate <url>",
53
- "removeinitscript <id>",
54
- "--init-script <path>",
55
- "--enable <feature>",
56
- "AGENT_BROWSER_INIT_SCRIPTS",
57
- "AGENT_BROWSER_ENABLE",
58
- "network route <url> [--abort|--body <json>] [--resource-type <csv>]",
59
- "cookies set --curl <file>",
60
- "auth save <name>",
61
- "confirm <id>",
62
- "deny <id>",
63
- "chat <message>",
64
- "dashboard start --port <n>",
65
- "install --with-deps",
66
- "upgrade",
67
- "doctor [--fix]",
68
- "profiles",
69
- "snapshot -i --urls",
70
- "snapshot --urls",
71
- "wait --download [path]",
72
- "tab new --label <name> [url]",
73
- "--action-policy <path>",
74
- "--confirm-actions <list>",
75
- "--engine <name>",
76
- "AGENT_BROWSER_CONFIG",
77
- ]),
78
- upstreamExpectations: Object.freeze([
79
- Object.freeze({ token: "skills", help: "root help" }),
80
- Object.freeze({ token: "keyboard", help: "root help" }),
81
- Object.freeze({ token: "scroll", help: "root help" }),
82
- Object.freeze({ token: "scrollintoview", help: "root help" }),
83
- Object.freeze({ token: "connect", help: "root help" }),
84
- Object.freeze({ token: "is", help: "root help" }),
85
- Object.freeze({ token: "find", help: "root help" }),
86
- Object.freeze({ token: "mouse", help: "root help" }),
87
- Object.freeze({ token: "set", help: "root help" }),
88
- Object.freeze({ token: "network", help: "root help" }),
89
- Object.freeze({ token: "cookies [get|set|clear]", help: "root help" }),
90
- Object.freeze({ token: "storage", help: "root help" }),
91
- Object.freeze({ token: "diff snapshot", help: "root help" }),
92
- Object.freeze({ token: "trace start|stop [path]", help: "root help" }),
93
- Object.freeze({ token: "profiler start|stop [path]", help: "root help" }),
94
- Object.freeze({ token: "record start <path> [url]", help: "root help" }),
95
- Object.freeze({ token: "console [--clear]", help: "root help" }),
96
- Object.freeze({ token: "errors [--clear]", help: "root help" }),
97
- Object.freeze({ token: "highlight <sel>", help: "root help" }),
98
- Object.freeze({ token: "inspect", help: "root help" }),
99
- Object.freeze({ token: "clipboard <op> [text]", help: "root help" }),
100
- Object.freeze({ token: "stream enable [--port <n>]", help: "root help" }),
101
- Object.freeze({ token: "react tree", help: "root help" }),
102
- Object.freeze({ token: "react inspect <id>", help: "root help" }),
103
- Object.freeze({ token: "react renders start", help: "root help" }),
104
- Object.freeze({ token: "react renders stop [--json]", help: "root help" }),
105
- Object.freeze({ token: "react suspense [--only-dynamic] [--json]", help: "root help" }),
106
- Object.freeze({ token: "vitals [url] [--json]", help: "root help" }),
107
- Object.freeze({ token: "pushstate <url>", help: "root help" }),
108
- Object.freeze({ token: "removeinitscript <id>", help: "root help" }),
109
- Object.freeze({ token: "--init-script <path>", help: "root help" }),
110
- Object.freeze({ token: "--enable <feature>", help: "root help" }),
111
- Object.freeze({ token: "--resource-type <csv>", help: "root help" }),
112
- Object.freeze({ token: "cookies set --curl <file>", help: "root help" }),
113
- Object.freeze({ token: "auth save <name>", help: "root help" }),
114
- Object.freeze({ token: "confirm <id>", help: "root help" }),
115
- Object.freeze({ token: "deny <id>", help: "root help" }),
116
- Object.freeze({ token: "chat <message>", help: "root help" }),
117
- Object.freeze({ token: "dashboard start --port <n>", help: "root help" }),
118
- Object.freeze({ token: "install --with-deps", help: "root help" }),
119
- Object.freeze({ token: "upgrade", help: "root help" }),
120
- Object.freeze({ token: "doctor [--fix]", help: "root help" }),
121
- Object.freeze({ token: "profiles", help: "root help" }),
122
- Object.freeze({ token: "-u, --urls", help: "snapshot help" }),
123
- Object.freeze({ token: "--download [path]", help: "wait help" }),
124
- Object.freeze({ token: "new --label <name> [url]", help: "tab help" }),
125
- ]),
511
+ helpCommands,
512
+ inventorySections,
513
+ docRequiredTokens: Object.freeze(inventorySections.flatMap((entry) => entry.docTokens)),
514
+ upstreamExpectations: Object.freeze(inventorySections.flatMap((entry) => entry.upstreamExpectations)),
126
515
  });
127
516
 
128
517
  export function expectedVersionLabel() {
@@ -280,7 +280,7 @@ async function checkAgentBrowserVersion({ runAgentBrowser }) {
280
280
  title: `agent-browser version drift: expected ${EXPECTED_VERSION}, found ${version || "<empty>"}.`,
281
281
  lines: [
282
282
  `This wrapper targets the current baseline from ${CAPABILITY_BASELINE_SOURCE} and does not provide backwards-compatibility shims.`,
283
- `Update upstream agent-browser to ${EXPECTED_VERSION}, or if you intentionally re-baselined upstream, update ${CAPABILITY_BASELINE_SOURCE} and refresh docs.`,
283
+ `Update upstream agent-browser to ${EXPECTED_VERSION}, or if you intentionally re-baselined upstream, update ${CAPABILITY_BASELINE_SOURCE}, run \`npm run docs -- command-reference write\`, refresh docs/COMMAND_REFERENCE.md, and rerun \`npm run verify -- command-reference\` plus \`npm run verify -- real-upstream\` with test/fixtures/agent-browser-real-output-shapes.json aligned to the new target version.`,
284
284
  ],
285
285
  };
286
286
  }