@omniaibot/win-x64 1.1.6 → 1.3.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/bin/omnibot-windows-x64/81d243bd2c585b0f4821__mypyc.pyd +0 -0
- package/bin/omnibot-windows-x64/VERSION +1 -1
- package/bin/omnibot-windows-x64/_asyncio.pyd +0 -0
- package/bin/omnibot-windows-x64/_bz2.pyd +0 -0
- package/bin/omnibot-windows-x64/_cffi_backend.pyd +0 -0
- package/bin/omnibot-windows-x64/_ctypes.pyd +0 -0
- package/bin/omnibot-windows-x64/_decimal.pyd +0 -0
- package/bin/omnibot-windows-x64/_hashlib.pyd +0 -0
- package/bin/omnibot-windows-x64/_lzma.pyd +0 -0
- package/bin/omnibot-windows-x64/_multiprocessing.pyd +0 -0
- package/bin/omnibot-windows-x64/_overlapped.pyd +0 -0
- package/bin/omnibot-windows-x64/_queue.pyd +0 -0
- package/bin/omnibot-windows-x64/_socket.pyd +0 -0
- package/bin/omnibot-windows-x64/_ssl.pyd +0 -0
- package/bin/omnibot-windows-x64/_uuid.pyd +0 -0
- package/bin/omnibot-windows-x64/_wmi.pyd +0 -0
- package/bin/omnibot-windows-x64/charset_normalizer/cd.pyd +0 -0
- package/bin/omnibot-windows-x64/charset_normalizer/md.pyd +0 -0
- package/bin/omnibot-windows-x64/{libcrypto-3-x64.dll → libcrypto-3.dll} +0 -0
- package/bin/omnibot-windows-x64/libffi-8.dll +0 -0
- package/bin/omnibot-windows-x64/libssl-3.dll +0 -0
- package/bin/omnibot-windows-x64/omnibot/skills/omnibot/SKILL.md +16 -9
- package/bin/omnibot-windows-x64/omnibot/skills/omnibot/references/command-reference.md +44 -29
- package/bin/omnibot-windows-x64/omnibot/skills/omnibot/references/css-only-dropdown-js.md +50 -0
- package/bin/omnibot-windows-x64/omnibot/skills/omnibot/references/debugging-and-evidence.md +23 -21
- package/bin/omnibot-windows-x64/omnibot/skills/omnibot/references/fallback-operations.md +7 -52
- package/bin/omnibot-windows-x64/omnibot/skills/omnibot/references/operation-patterns.md +12 -13
- package/bin/omnibot-windows-x64/omnibot/skills/omnibot/references/session-and-tabs.md +14 -14
- package/bin/omnibot-windows-x64/omnibot-windows-x64.exe +0 -0
- package/bin/omnibot-windows-x64/pyexpat.pyd +0 -0
- package/bin/omnibot-windows-x64/python3.dll +0 -0
- package/bin/omnibot-windows-x64/python312.dll +0 -0
- package/bin/omnibot-windows-x64/select.pyd +0 -0
- package/bin/omnibot-windows-x64/unicodedata.pyd +0 -0
- package/bin/omnibot-windows-x64/vcruntime140.dll +0 -0
- package/bin/omnibot-windows-x64/vcruntime140_1.dll +0 -0
- package/package.json +29 -29
- package/bin/omnibot-windows-x64/ffi.dll +0 -0
- package/bin/omnibot-windows-x64/libbz2.dll +0 -0
- package/bin/omnibot-windows-x64/libexpat.dll +0 -0
- package/bin/omnibot-windows-x64/liblzma.dll +0 -0
- package/bin/omnibot-windows-x64/libmpdec-4.dll +0 -0
- package/bin/omnibot-windows-x64/libssl-3-x64.dll +0 -0
- package/bin/omnibot-windows-x64/omnibot/SKILL.md +0 -189
- package/bin/omnibot-windows-x64/omnibot/references/anti-patterns.md +0 -37
- package/bin/omnibot-windows-x64/omnibot/references/command-reference.md +0 -605
- package/bin/omnibot-windows-x64/omnibot/references/debugging-and-evidence.md +0 -95
- package/bin/omnibot-windows-x64/omnibot/references/fallback-operations.md +0 -216
- package/bin/omnibot-windows-x64/omnibot/references/operation-patterns.md +0 -385
- package/bin/omnibot-windows-x64/omnibot/references/runtime-and-status.md +0 -111
- package/bin/omnibot-windows-x64/omnibot/references/session-and-tabs.md +0 -164
- package/bin/omnibot-windows-x64/python313.dll +0 -0
- package/bin/omnibot-windows-x64/zlib.dll +0 -0
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
v1.3.0
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -5,7 +5,7 @@ compatibility: Requires omnibot v2 CLI daemon and the omnibot Chromium extension
|
|
|
5
5
|
allowed-tools: Bash
|
|
6
6
|
metadata:
|
|
7
7
|
author: omnibot
|
|
8
|
-
version: "2.
|
|
8
|
+
version: "2.2.0"
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
# Omnibot
|
|
@@ -19,7 +19,7 @@ This skill is an execution specification for agents. It is not a human command m
|
|
|
19
19
|
## When to Use
|
|
20
20
|
|
|
21
21
|
- Use Omnibot when browser runtime state matters: login, cookies, storage, client-side rendering, extensions, or visible user tabs.
|
|
22
|
-
- Use Omnibot when an agent must read rendered pages, click controls, fill forms,
|
|
22
|
+
- Use Omnibot when an agent must read rendered pages, click controls, fill forms, navigate, extract content, or collect evidence.
|
|
23
23
|
- Do not use Omnibot when static files or plain HTTP content already answer the task.
|
|
24
24
|
|
|
25
25
|
## Core Rules
|
|
@@ -35,16 +35,16 @@ This skill is an execution specification for agents. It is not a human command m
|
|
|
35
35
|
- Parse JSON output from commands that return JSON.
|
|
36
36
|
- Do not claim success without verification evidence.
|
|
37
37
|
|
|
38
|
-
##
|
|
38
|
+
## Workflow Context + Tab Target
|
|
39
39
|
|
|
40
40
|
Every page-state workflow must use both controls:
|
|
41
41
|
|
|
42
42
|
- `OMNIBOT_SESSION_TOKEN=<workflow-name>` for workflow isolation.
|
|
43
43
|
- `--tab-id <TAB_ID>` for page targeting.
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
OMNIBOT_SESSION_TOKEN is a workflow/context token, not a browser session and not a tab target. It isolates agent state such as refs, trace, recording, aliases, and temporary resources. Tab ID controls which page receives the command.
|
|
46
46
|
|
|
47
|
-
Do not rely on default tab, active tab, current tab, or prior targeting state. Every page command requires explicit `--tab-id
|
|
47
|
+
Do not rely on default tab, active tab, current tab, or prior targeting state. Every page-state command requires explicit `--tab-id` except when the command is only discovering or creating a tab.
|
|
48
48
|
|
|
49
49
|
Use the same token inside one workflow. Use different tokens for independent workflows.
|
|
50
50
|
|
|
@@ -56,7 +56,7 @@ OMNIBOT_SESSION_TOKEN=research omnibot click --tab-id <TAB_ID> @e4
|
|
|
56
56
|
OMNIBOT_SESSION_TOKEN=research omnibot snapshot -i --tab-id <TAB_ID>
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
`@eN` refs are tab-scoped. never reuse `@eN` refs across tabs.
|
|
59
|
+
`@eN` refs are tab-scoped. Refs rule: never reuse `@eN` refs across tabs.
|
|
60
60
|
|
|
61
61
|
The agent dispatch pattern is token + tab-id:
|
|
62
62
|
|
|
@@ -75,6 +75,14 @@ OMNIBOT_SESSION_TOKEN=checkout omnibot dom dblclick n1 --tab-id <TAB_ID>
|
|
|
75
75
|
OMNIBOT_SESSION_TOKEN=checkout omnibot clipboard read --tab-id <TAB_ID>
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
+
Targeting categories:
|
|
79
|
+
|
|
80
|
+
| Command category | Rule |
|
|
81
|
+
| --- | --- |
|
|
82
|
+
| Page-state commands: `snapshot`, `click`, `fill`, `type`, `get`, `is`, `wait`, `screenshot`, `console`, `network`, `execute-js`, `dom`, `mouse`, `clipboard`, `viewport`, `assets`, `goto`, same-tab `navigate` | Require `--tab-id <TAB_ID>`. |
|
|
83
|
+
| Discovery or tab creation: `tabs`, `tab list`, `tab new <URL>`, `open <URL>`, `navigate <URL>` | Return or discover the tab id; save it for later page-state commands. |
|
|
84
|
+
| Read URL exception: `read <URL>` | Opens a temporary read tab and does not need `--tab-id`; reading an existing tab still requires `read --tab-id <TAB_ID>`. |
|
|
85
|
+
|
|
78
86
|
## Observe -> Act -> Verify
|
|
79
87
|
|
|
80
88
|
All page operations must follow this loop:
|
|
@@ -104,7 +112,7 @@ If verification fails, do not repeat blindly. Re-observe, choose the next fallba
|
|
|
104
112
|
|
|
105
113
|
## Pattern > Command
|
|
106
114
|
|
|
107
|
-
Start from the task, not the command name. Use operation patterns for read, click, fill, select/check, navigation, wait, extraction,
|
|
115
|
+
Start from the task, not the command name. Use operation patterns for read, click, fill, select/check, navigation, wait, extraction, and batch.
|
|
108
116
|
|
|
109
117
|
Use fallback tiers only after standard patterns fail. Collect evidence separately from fallback execution. The command reference is only a lookup table; it must not decide behavior.
|
|
110
118
|
|
|
@@ -133,7 +141,6 @@ Do not use `read` as the first step for click/fill workflows unless the user exp
|
|
|
133
141
|
| Navigation | `references/operation-patterns.md#navigation` |
|
|
134
142
|
| Waiting | `references/operation-patterns.md#wait` |
|
|
135
143
|
| Extraction | `references/operation-patterns.md#extraction` |
|
|
136
|
-
| Upload | `references/operation-patterns.md#upload` |
|
|
137
144
|
| Batch | `references/operation-patterns.md#batch` |
|
|
138
145
|
| Fallback | `references/fallback-operations.md` |
|
|
139
146
|
| Tabs and sessions | `references/session-and-tabs.md` |
|
|
@@ -182,7 +189,7 @@ Use screenshots, annotated screenshots, console logs, network logs, trace, recor
|
|
|
182
189
|
- Missing `OMNIBOT_SESSION_TOKEN` or missing `--tab-id` on page-state commands.
|
|
183
190
|
- Acting without verify or claiming success without evidence.
|
|
184
191
|
- Using `execute-js` first, raw CSS before semantic find, `@eN` across tabs, implicit tab targeting, or shell sleep instead of `omnibot wait`.
|
|
185
|
-
- Using removed commands: `switch-tab`, `focus-tab`, `tab switch`. These are no longer available.
|
|
192
|
+
- Using removed commands: `switch-tab`, `focus-tab`, `tab switch`, `tab focus`. These are no longer available.
|
|
186
193
|
- Using `tabs[0]` or the first tab as a target. The first tab is often a user tab or transport tab.
|
|
187
194
|
- Closing user tabs discovered during cleanup. Only close tabs created by the current workflow.
|
|
188
195
|
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
This is a lookup table, not a behavior guide. Choose behavior from `operation-patterns.md`, use `session-and-tabs.md` for targeting, and use `fallback-operations.md` before dropping to lower tiers.
|
|
4
4
|
|
|
5
|
+
Unless marked as discovery, runtime, or tab creation, page-state examples assume `OMNIBOT_SESSION_TOKEN=<workflow>` and `--tab-id <TAB_ID>`.
|
|
6
|
+
|
|
5
7
|
## Runtime & Status
|
|
6
8
|
|
|
7
9
|
### doctor
|
|
@@ -270,14 +272,28 @@ Fallback relation: Mouse drag is Tier 5 if element drag fails.
|
|
|
270
272
|
|
|
271
273
|
### upload
|
|
272
274
|
|
|
273
|
-
Purpose:
|
|
275
|
+
Purpose: Reserved command for local file upload. Native upload is currently unavailable in the extension transport.
|
|
274
276
|
|
|
275
277
|
```bash
|
|
276
|
-
|
|
278
|
+
# Do not use in agent workflows until file chooser support is implemented.
|
|
277
279
|
```
|
|
278
280
|
|
|
279
281
|
Preferred pattern: See `operation-patterns.md#upload`.
|
|
280
|
-
Fallback relation:
|
|
282
|
+
Fallback relation: Do not treat JavaScript as a normal upload fallback.
|
|
283
|
+
|
|
284
|
+
### keyboard / keydown / keyup
|
|
285
|
+
|
|
286
|
+
Purpose: Send keyboard text or key state to the target tab when element-specific `type` or `press` is insufficient.
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
OMNIBOT_SESSION_TOKEN=form omnibot keyboard type "hello" --tab-id <TAB_ID>
|
|
290
|
+
OMNIBOT_SESSION_TOKEN=form omnibot keyboard inserttext "hello" --tab-id <TAB_ID>
|
|
291
|
+
OMNIBOT_SESSION_TOKEN=form omnibot keydown Shift --tab-id <TAB_ID>
|
|
292
|
+
OMNIBOT_SESSION_TOKEN=form omnibot keyup Shift --tab-id <TAB_ID>
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
Preferred pattern: Prefer `fill`, `type`, and `press` first.
|
|
296
|
+
Fallback relation: Keyboard commands are a focused fallback before mouse or JavaScript.
|
|
281
297
|
|
|
282
298
|
## Semantic Find
|
|
283
299
|
|
|
@@ -347,8 +363,8 @@ Purpose: Send raw Chrome DevTools Protocol commands.
|
|
|
347
363
|
Usage tier: Tier 7 fallback and inspection only.
|
|
348
364
|
|
|
349
365
|
```bash
|
|
350
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot cdp Runtime.evaluate '{"expression":"document.title"}' --tab-id <TAB_ID>
|
|
351
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot cdp DOM.getDocument '{"depth":1}' --tab-id <TAB_ID>
|
|
366
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot cdp Runtime.evaluate '{"expression":"document.title"}' --tab-id <TAB_ID>
|
|
367
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot cdp DOM.getDocument '{"depth":1}' --tab-id <TAB_ID>
|
|
352
368
|
```
|
|
353
369
|
|
|
354
370
|
Preferred pattern: See `fallback-operations.md#raw-cdp-fallback` and `debugging-and-evidence.md#cdp-inspection`.
|
|
@@ -358,13 +374,13 @@ Fallback relation: Last resort.
|
|
|
358
374
|
|
|
359
375
|
### navigate / open / goto
|
|
360
376
|
|
|
361
|
-
Purpose: Navigate or open pages.
|
|
377
|
+
Purpose: Navigate or open pages. New-tab forms return a tab id. Same-tab navigation requires an explicit target tab id. There is no CLI current-tab state.
|
|
362
378
|
|
|
363
379
|
```bash
|
|
364
380
|
OMNIBOT_SESSION_TOKEN=research omnibot navigate https://example.com
|
|
365
|
-
OMNIBOT_SESSION_TOKEN=research omnibot navigate --same-tab
|
|
381
|
+
OMNIBOT_SESSION_TOKEN=research omnibot navigate https://example.com --same-tab --tab-id <TAB_ID>
|
|
366
382
|
OMNIBOT_SESSION_TOKEN=research omnibot open https://example.com
|
|
367
|
-
OMNIBOT_SESSION_TOKEN=research omnibot goto https://example.com
|
|
383
|
+
OMNIBOT_SESSION_TOKEN=research omnibot goto https://example.com --tab-id <TAB_ID>
|
|
368
384
|
```
|
|
369
385
|
|
|
370
386
|
Preferred pattern: See `operation-patterns.md#navigation` and `session-and-tabs.md#tab-explicit`.
|
|
@@ -414,7 +430,6 @@ OMNIBOT_SESSION_TOKEN=research omnibot frame main
|
|
|
414
430
|
Purpose: Wait for time, selector, text, URL, load state, or JavaScript condition.
|
|
415
431
|
|
|
416
432
|
```bash
|
|
417
|
-
OMNIBOT_SESSION_TOKEN=checkout omnibot wait 500 --tab-id <TAB_ID>
|
|
418
433
|
OMNIBOT_SESSION_TOKEN=checkout omnibot wait "#ready" --tab-id <TAB_ID>
|
|
419
434
|
OMNIBOT_SESSION_TOKEN=checkout omnibot wait "#spinner" --state hidden --tab-id <TAB_ID>
|
|
420
435
|
OMNIBOT_SESSION_TOKEN=checkout omnibot wait --text "Welcome" --tab-id <TAB_ID>
|
|
@@ -422,17 +437,18 @@ OMNIBOT_SESSION_TOKEN=checkout omnibot wait --url "/dashboard" --tab-id <TAB_ID>
|
|
|
422
437
|
OMNIBOT_SESSION_TOKEN=checkout omnibot wait --load domcontentloaded --tab-id <TAB_ID>
|
|
423
438
|
OMNIBOT_SESSION_TOKEN=checkout omnibot wait --load networkidle --tab-id <TAB_ID>
|
|
424
439
|
OMNIBOT_SESSION_TOKEN=checkout omnibot wait --fn "window.appReady === true" --tab-id <TAB_ID>
|
|
440
|
+
OMNIBOT_SESSION_TOKEN=checkout omnibot wait 500 --tab-id <TAB_ID>
|
|
425
441
|
```
|
|
426
442
|
|
|
427
443
|
Preferred pattern: See `operation-patterns.md#wait`.
|
|
428
|
-
Fallback relation: Prefer over shell sleep.
|
|
444
|
+
Fallback relation: Prefer condition waits over shell sleep. Fixed-time waits like `wait 500` are diagnostic or last resort only.
|
|
429
445
|
|
|
430
446
|
### batch
|
|
431
447
|
|
|
432
|
-
Purpose: Send short command arrays as JSON or from a file.
|
|
448
|
+
Purpose: Send short extension/CDP command arrays as JSON or from a file. Batch is not a wrapper for normal CLI commands such as `snapshot` or `click`.
|
|
433
449
|
|
|
434
450
|
```bash
|
|
435
|
-
OMNIBOT_SESSION_TOKEN=research omnibot batch '[{"cmd":"
|
|
451
|
+
OMNIBOT_SESSION_TOKEN=research omnibot batch '[{"cmd":"cdp","method":"Runtime.evaluate","params":{"expression":"document.title","returnByValue":true}}]' --tab-id <TAB_ID>
|
|
436
452
|
OMNIBOT_SESSION_TOKEN=research omnibot batch --file /tmp/omnibot-batch.json --tab-id <TAB_ID>
|
|
437
453
|
```
|
|
438
454
|
|
|
@@ -446,8 +462,8 @@ Fallback relation: Not a substitute for verification.
|
|
|
446
462
|
Purpose: Capture visual evidence from a browser tab.
|
|
447
463
|
|
|
448
464
|
```bash
|
|
449
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot screenshot --tab-id <TAB_ID> -o /tmp/omni-shot.png
|
|
450
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot screenshot --annotate --tab-id <TAB_ID> -o /tmp/omni-annotated.png
|
|
465
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot screenshot --tab-id <TAB_ID> -o /tmp/omni-shot.png
|
|
466
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot screenshot --annotate --tab-id <TAB_ID> -o /tmp/omni-annotated.png
|
|
451
467
|
```
|
|
452
468
|
|
|
453
469
|
Preferred pattern: See `debugging-and-evidence.md#screenshot`.
|
|
@@ -458,21 +474,21 @@ Fallback relation: Evidence collection, not operation fallback.
|
|
|
458
474
|
Purpose: Read or clear browser console evidence.
|
|
459
475
|
|
|
460
476
|
```bash
|
|
461
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot console logs --tab-id <TAB_ID>
|
|
462
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot console errors --tab-id <TAB_ID>
|
|
463
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot console clear --tab-id <TAB_ID>
|
|
477
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot console logs --tab-id <TAB_ID>
|
|
478
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot console errors --tab-id <TAB_ID>
|
|
479
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot console clear --tab-id <TAB_ID>
|
|
464
480
|
```
|
|
465
481
|
|
|
466
482
|
Preferred pattern: See `debugging-and-evidence.md#console`.
|
|
467
|
-
Fallback relation: Evidence collection, not operation fallback.
|
|
483
|
+
Fallback relation: Evidence collection, not operation fallback. `console errors` currently uses the console log collection path; verify level filtering in output before treating it as error-only evidence.
|
|
468
484
|
|
|
469
485
|
### network
|
|
470
486
|
|
|
471
487
|
Purpose: Read browser network evidence.
|
|
472
488
|
|
|
473
489
|
```bash
|
|
474
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot network logs --tab-id <TAB_ID>
|
|
475
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot network summary --tab-id <TAB_ID>
|
|
490
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot network logs --tab-id <TAB_ID>
|
|
491
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot network summary --tab-id <TAB_ID>
|
|
476
492
|
```
|
|
477
493
|
|
|
478
494
|
Preferred pattern: See `debugging-and-evidence.md#network`.
|
|
@@ -520,18 +536,17 @@ Fallback relation: Use after page content indicates assets are needed.
|
|
|
520
536
|
|
|
521
537
|
### visibility
|
|
522
538
|
|
|
523
|
-
Purpose: Inspect
|
|
539
|
+
Purpose: Inspect or set automation browser visibility mode. `visibility launch` currently reports planned configuration only; it does not launch a browser.
|
|
524
540
|
|
|
525
541
|
```bash
|
|
526
542
|
omnibot visibility status
|
|
527
543
|
omnibot visibility set background
|
|
528
544
|
omnibot visibility set visible
|
|
529
|
-
omnibot visibility set headless --user-data-dir /tmp/omnibot-headless
|
|
530
545
|
omnibot visibility launch headless --user-data-dir /tmp/omnibot-headless
|
|
531
546
|
```
|
|
532
547
|
|
|
533
548
|
Preferred pattern: See `session-and-tabs.md#visibility`.
|
|
534
|
-
Fallback relation: Headless does not inherit existing user login state.
|
|
549
|
+
Fallback relation: Headless does not inherit existing user login state. Treat `visibility launch` status `planned` as not launched.
|
|
535
550
|
|
|
536
551
|
### browser
|
|
537
552
|
|
|
@@ -549,7 +564,7 @@ Fallback relation: Use in multi-browser or multi-runtime scenarios.
|
|
|
549
564
|
|
|
550
565
|
### session
|
|
551
566
|
|
|
552
|
-
Purpose: Name or list
|
|
567
|
+
Purpose: Name or list Omnibot workflow context state for the current `OMNIBOT_SESSION_TOKEN`. This does not switch tabs, preserve login, or replace `--tab-id`.
|
|
553
568
|
|
|
554
569
|
```bash
|
|
555
570
|
OMNIBOT_SESSION_TOKEN=checkout omnibot session name "checkout"
|
|
@@ -566,11 +581,11 @@ Fallback relation: Not a fallback command.
|
|
|
566
581
|
Purpose: Capture, replay, or trace workflows for evidence.
|
|
567
582
|
|
|
568
583
|
```bash
|
|
569
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot record start
|
|
570
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot record stop -o flow.json
|
|
571
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot replay flow.json
|
|
572
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot trace start
|
|
573
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot trace stop -o trace.zip
|
|
584
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot record start
|
|
585
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot record stop -o flow.json
|
|
586
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot replay flow.json
|
|
587
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot trace start
|
|
588
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot trace stop -o trace.zip
|
|
574
589
|
```
|
|
575
590
|
|
|
576
591
|
Preferred pattern: See `debugging-and-evidence.md#record-and-replay` and `debugging-and-evidence.md#trace`.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# CSS-Only Dropdown JavaScript Recipe
|
|
2
|
+
|
|
3
|
+
Use only after semantic find, refs, selectors, DOM, and mouse fallback cannot expose or select the dropdown option.
|
|
4
|
+
|
|
5
|
+
Example for a visible trigger like `按留言时间排序` and a target option text:
|
|
6
|
+
|
|
7
|
+
```js
|
|
8
|
+
const triggerText = '按留言时间排序';
|
|
9
|
+
const optionText = '目标选项文本';
|
|
10
|
+
|
|
11
|
+
const visibleElements = [...document.querySelectorAll('button, [role="button"], [aria-haspopup], div, span, li')]
|
|
12
|
+
.filter((el) => {
|
|
13
|
+
const style = getComputedStyle(el);
|
|
14
|
+
const box = el.getBoundingClientRect();
|
|
15
|
+
return style.display !== 'none' && style.visibility !== 'hidden' && box.width > 0 && box.height > 0;
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const byExactText = (text) => visibleElements.find((el) => el.textContent?.trim() === text);
|
|
19
|
+
const trigger = byExactText(triggerText);
|
|
20
|
+
if (!trigger) {
|
|
21
|
+
return { ok: false, reason: 'trigger-not-found', triggerText, optionText };
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
trigger.click();
|
|
25
|
+
await new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve)));
|
|
26
|
+
|
|
27
|
+
const option = [...document.querySelectorAll('div, span, li, button, [role="option"], [role="menuitem"]')]
|
|
28
|
+
.filter((el) => {
|
|
29
|
+
const style = getComputedStyle(el);
|
|
30
|
+
const box = el.getBoundingClientRect();
|
|
31
|
+
return style.display !== 'none' && style.visibility !== 'hidden' && box.width > 0 && box.height > 0;
|
|
32
|
+
})
|
|
33
|
+
.find((el) => el.textContent?.trim() === optionText);
|
|
34
|
+
|
|
35
|
+
if (!option) {
|
|
36
|
+
return { ok: false, reason: 'option-not-found-after-trigger-click', triggerText, optionText };
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
option.click();
|
|
40
|
+
await new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve)));
|
|
41
|
+
|
|
42
|
+
return {
|
|
43
|
+
ok: true,
|
|
44
|
+
triggerText,
|
|
45
|
+
optionText,
|
|
46
|
+
selectedText: trigger.textContent?.trim(),
|
|
47
|
+
};
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Verify with page state after running the script: selected label, sorted result order, result count, URL/query state, or another user-visible condition.
|
|
@@ -4,13 +4,15 @@ Debugging is for evidence. Fallback is for completing operations.
|
|
|
4
4
|
|
|
5
5
|
Use this file when you need to prove browser state, explain a failure, or collect artifacts for review. Do not use `execute-js` as the first debug tool.
|
|
6
6
|
|
|
7
|
+
Use a unique workflow/debug token per task, such as `debug-checkout` or `debug-research`. Do not share one global `debug` token across independent agents.
|
|
8
|
+
|
|
7
9
|
## Screenshot
|
|
8
10
|
|
|
9
11
|
Use screenshots when visual layout, canvas, dialogs, or visual regressions matter.
|
|
10
12
|
|
|
11
13
|
```bash
|
|
12
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot screenshot --tab-id <TAB_ID> -o /tmp/omni-shot.png
|
|
13
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot screenshot --annotate --tab-id <TAB_ID> -o /tmp/omni-annotated.png
|
|
14
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot screenshot --tab-id <TAB_ID> -o /tmp/omni-shot.png
|
|
15
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot screenshot --annotate --tab-id <TAB_ID> -o /tmp/omni-annotated.png
|
|
14
16
|
```
|
|
15
17
|
|
|
16
18
|
Prefer text extraction when text is enough. Screenshot is evidence, not extraction.
|
|
@@ -20,26 +22,26 @@ Prefer text extraction when text is enough. Screenshot is evidence, not extracti
|
|
|
20
22
|
Use console logs for runtime JavaScript errors, frontend warnings, or app-level diagnostics.
|
|
21
23
|
|
|
22
24
|
```bash
|
|
23
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot console errors --tab-id <TAB_ID>
|
|
24
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot console logs --tab-id <TAB_ID>
|
|
25
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot console clear --tab-id <TAB_ID>
|
|
25
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot console errors --tab-id <TAB_ID>
|
|
26
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot console logs --tab-id <TAB_ID>
|
|
27
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot console clear --tab-id <TAB_ID>
|
|
26
28
|
```
|
|
27
29
|
|
|
28
|
-
Collect console
|
|
30
|
+
Collect console diagnostics before and after the action when debugging regressions. `console errors` currently uses the console log collection path; verify level filtering in output before treating it as error-only evidence.
|
|
29
31
|
|
|
30
32
|
## Network
|
|
31
33
|
|
|
32
34
|
Use network logs for failed requests, redirects, blocked assets, API errors, or loading stalls.
|
|
33
35
|
|
|
34
36
|
```bash
|
|
35
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot network summary --tab-id <TAB_ID>
|
|
36
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot network logs --tab-id <TAB_ID>
|
|
37
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot network summary --tab-id <TAB_ID>
|
|
38
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot network logs --tab-id <TAB_ID>
|
|
37
39
|
```
|
|
38
40
|
|
|
39
41
|
Pair network evidence with page verification:
|
|
40
42
|
|
|
41
43
|
```bash
|
|
42
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot get text "#main" --tab-id <TAB_ID>
|
|
44
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot get text "#main" --tab-id <TAB_ID>
|
|
43
45
|
```
|
|
44
46
|
|
|
45
47
|
## Trace
|
|
@@ -47,10 +49,10 @@ OMNIBOT_SESSION_TOKEN=debug omnibot get text "#main" --tab-id <TAB_ID>
|
|
|
47
49
|
Use trace for a reproducible artifact around a failing workflow.
|
|
48
50
|
|
|
49
51
|
```bash
|
|
50
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot trace start
|
|
51
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot click --tab-id <TAB_ID> @e4
|
|
52
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot snapshot -i --tab-id <TAB_ID>
|
|
53
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot trace stop -o trace.zip
|
|
52
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot trace start
|
|
53
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot click --tab-id <TAB_ID> @e4
|
|
54
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot snapshot -i --tab-id <TAB_ID>
|
|
55
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot trace stop -o trace.zip
|
|
54
56
|
```
|
|
55
57
|
|
|
56
58
|
Trace is evidence. It does not replace operation verification.
|
|
@@ -60,17 +62,17 @@ Trace is evidence. It does not replace operation verification.
|
|
|
60
62
|
Use record/replay when a flow must be captured or reproduced.
|
|
61
63
|
|
|
62
64
|
```bash
|
|
63
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot record start
|
|
64
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot click --tab-id <TAB_ID> @e4
|
|
65
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot snapshot -i --tab-id <TAB_ID>
|
|
66
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot record stop -o flow.json
|
|
67
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot replay flow.json
|
|
65
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot record start
|
|
66
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot click --tab-id <TAB_ID> @e4
|
|
67
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot snapshot -i --tab-id <TAB_ID>
|
|
68
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot record stop -o flow.json
|
|
69
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot replay flow.json
|
|
68
70
|
```
|
|
69
71
|
|
|
70
72
|
After replay, verify final state:
|
|
71
73
|
|
|
72
74
|
```bash
|
|
73
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot get url --tab-id <TAB_ID>
|
|
75
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot get url --tab-id <TAB_ID>
|
|
74
76
|
```
|
|
75
77
|
|
|
76
78
|
## CDP Inspection
|
|
@@ -78,8 +80,8 @@ OMNIBOT_SESSION_TOKEN=debug omnibot get url --tab-id <TAB_ID>
|
|
|
78
80
|
Use CDP for low-level inspection when normal evidence is insufficient.
|
|
79
81
|
|
|
80
82
|
```bash
|
|
81
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot cdp Runtime.evaluate '{"expression":"document.title"}' --tab-id <TAB_ID>
|
|
82
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot cdp DOM.getDocument '{"depth":1}' --tab-id <TAB_ID>
|
|
83
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot cdp Runtime.evaluate '{"expression":"document.title"}' --tab-id <TAB_ID>
|
|
84
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot cdp DOM.getDocument '{"depth":1}' --tab-id <TAB_ID>
|
|
83
85
|
```
|
|
84
86
|
|
|
85
87
|
CDP inspection is not a first-choice operation path. If CDP changes state, it becomes Tier 7 fallback and must follow `fallback-operations.md#raw-cdp-fallback`.
|
|
@@ -134,60 +134,15 @@ OMNIBOT_SESSION_TOKEN=repair omnibot wait --url "/dashboard" --tab-id <TAB_ID>
|
|
|
134
134
|
|
|
135
135
|
Use this only after the trigger is known and higher tiers failed: semantic `find` clicked the trigger or found the text, `snapshot -i` could not expose option refs, selector/DOM/mouse could not complete the two-step interaction, and verification showed the selection did not change.
|
|
136
136
|
|
|
137
|
-
|
|
137
|
+
Use a short `execute-js --file` script and verify the user-visible result, not just `{ ok: true }`: selected label, sorted result order, result count, URL/query state, or another page-specific condition.
|
|
138
|
+
|
|
139
|
+
Detailed recipe: `css-only-dropdown-js.md`.
|
|
138
140
|
|
|
139
141
|
```bash
|
|
140
142
|
OMNIBOT_SESSION_TOKEN=repair omnibot execute-js --file /tmp/omnibot-css-dropdown.js --tab-id <TAB_ID>
|
|
141
143
|
OMNIBOT_SESSION_TOKEN=repair omnibot snapshot -i --tab-id <TAB_ID>
|
|
142
144
|
```
|
|
143
145
|
|
|
144
|
-
`/tmp/omnibot-css-dropdown.js`:
|
|
145
|
-
|
|
146
|
-
```js
|
|
147
|
-
const triggerText = '按留言时间排序';
|
|
148
|
-
const optionText = '目标选项文本';
|
|
149
|
-
|
|
150
|
-
const visibleElements = [...document.querySelectorAll('button, [role="button"], [aria-haspopup], div, span, li')]
|
|
151
|
-
.filter((el) => {
|
|
152
|
-
const style = getComputedStyle(el);
|
|
153
|
-
const box = el.getBoundingClientRect();
|
|
154
|
-
return style.display !== 'none' && style.visibility !== 'hidden' && box.width > 0 && box.height > 0;
|
|
155
|
-
});
|
|
156
|
-
|
|
157
|
-
const byExactText = (text) => visibleElements.find((el) => el.textContent?.trim() === text);
|
|
158
|
-
const trigger = byExactText(triggerText);
|
|
159
|
-
if (!trigger) {
|
|
160
|
-
return { ok: false, reason: 'trigger-not-found', triggerText, optionText };
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
trigger.click();
|
|
164
|
-
await new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve)));
|
|
165
|
-
|
|
166
|
-
const option = [...document.querySelectorAll('div, span, li, button, [role="option"], [role="menuitem"]')]
|
|
167
|
-
.filter((el) => {
|
|
168
|
-
const style = getComputedStyle(el);
|
|
169
|
-
const box = el.getBoundingClientRect();
|
|
170
|
-
return style.display !== 'none' && style.visibility !== 'hidden' && box.width > 0 && box.height > 0;
|
|
171
|
-
})
|
|
172
|
-
.find((el) => el.textContent?.trim() === optionText);
|
|
173
|
-
|
|
174
|
-
if (!option) {
|
|
175
|
-
return { ok: false, reason: 'option-not-found-after-trigger-click', triggerText, optionText };
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
option.click();
|
|
179
|
-
await new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve)));
|
|
180
|
-
|
|
181
|
-
return {
|
|
182
|
-
ok: true,
|
|
183
|
-
triggerText,
|
|
184
|
-
optionText,
|
|
185
|
-
selectedText: trigger.textContent?.trim(),
|
|
186
|
-
};
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
Verify with the user-visible result, not just `{ ok: true }`: selected label, sorted result order, result count, URL/query state, or another page-specific condition.
|
|
190
|
-
|
|
191
146
|
Prefer `--file` for longer scripts:
|
|
192
147
|
|
|
193
148
|
```bash
|
|
@@ -202,15 +157,15 @@ OMNIBOT_SESSION_TOKEN=repair omnibot snapshot -i --tab-id <TAB_ID>
|
|
|
202
157
|
Raw CDP is the last resort. Use it only when standard commands and JavaScript fallback cannot complete or inspect the task.
|
|
203
158
|
|
|
204
159
|
```bash
|
|
205
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot cdp Runtime.evaluate '{"expression":"document.title"}' --tab-id <TAB_ID>
|
|
206
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot cdp DOM.getDocument '{"depth":1}' --tab-id <TAB_ID>
|
|
160
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot cdp Runtime.evaluate '{"expression":"document.title"}' --tab-id <TAB_ID>
|
|
161
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot cdp DOM.getDocument '{"depth":1}' --tab-id <TAB_ID>
|
|
207
162
|
```
|
|
208
163
|
|
|
209
164
|
After CDP fallback, verify using normal Omnibot reads whenever possible:
|
|
210
165
|
|
|
211
166
|
```bash
|
|
212
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot get title --tab-id <TAB_ID>
|
|
213
|
-
OMNIBOT_SESSION_TOKEN=debug omnibot snapshot -i --tab-id <TAB_ID>
|
|
167
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot get title --tab-id <TAB_ID>
|
|
168
|
+
OMNIBOT_SESSION_TOKEN=debug-checkout omnibot snapshot -i --tab-id <TAB_ID>
|
|
214
169
|
```
|
|
215
170
|
|
|
216
171
|
CDP can bypass application-level event semantics. Treat it as expert-only infrastructure access.
|
|
@@ -214,9 +214,9 @@ Other navigation commands:
|
|
|
214
214
|
|
|
215
215
|
```bash
|
|
216
216
|
OMNIBOT_SESSION_TOKEN=research omnibot navigate https://example.com
|
|
217
|
-
OMNIBOT_SESSION_TOKEN=research omnibot navigate --same-tab
|
|
217
|
+
OMNIBOT_SESSION_TOKEN=research omnibot navigate https://example.com --same-tab --tab-id <TAB_ID>
|
|
218
218
|
OMNIBOT_SESSION_TOKEN=research omnibot open https://example.com
|
|
219
|
-
OMNIBOT_SESSION_TOKEN=research omnibot goto https://example.com
|
|
219
|
+
OMNIBOT_SESSION_TOKEN=research omnibot goto https://example.com --tab-id <TAB_ID>
|
|
220
220
|
OMNIBOT_SESSION_TOKEN=research omnibot pushstate /dashboard --tab-id <TAB_ID>
|
|
221
221
|
OMNIBOT_SESSION_TOKEN=research omnibot close <TAB_ID>
|
|
222
222
|
OMNIBOT_SESSION_TOKEN=research omnibot tab list
|
|
@@ -321,25 +321,24 @@ If content exists only in runtime objects, use `fallback-operations.md#javascrip
|
|
|
321
321
|
|
|
322
322
|
### When to use
|
|
323
323
|
|
|
324
|
-
|
|
324
|
+
Native upload is currently unavailable in the extension transport. Do not use `omnibot upload` as an agent workflow step until file chooser support is implemented.
|
|
325
325
|
|
|
326
326
|
### Preferred sequence
|
|
327
327
|
|
|
328
|
-
1. Observe the
|
|
329
|
-
2.
|
|
330
|
-
3.
|
|
328
|
+
1. Observe the upload UI and confirm the task requires a local file.
|
|
329
|
+
2. Report that native upload is currently unavailable.
|
|
330
|
+
3. If the user still wants a workaround, ask for approval before using page-specific JavaScript or manual browser interaction.
|
|
331
331
|
|
|
332
332
|
### Example
|
|
333
333
|
|
|
334
334
|
```bash
|
|
335
335
|
OMNIBOT_SESSION_TOKEN=form omnibot snapshot -i --tab-id <TAB_ID>
|
|
336
|
-
|
|
337
|
-
OMNIBOT_SESSION_TOKEN=form omnibot wait --text "file.png" --tab-id <TAB_ID>
|
|
336
|
+
# upload is currently unavailable; do not run omnibot upload here.
|
|
338
337
|
```
|
|
339
338
|
|
|
340
339
|
### Verification
|
|
341
340
|
|
|
342
|
-
|
|
341
|
+
If upload support is implemented later, verify with visible filename, count, enabled submit state, or application-specific confirmation:
|
|
343
342
|
|
|
344
343
|
```bash
|
|
345
344
|
OMNIBOT_SESSION_TOKEN=form omnibot is enabled "button[type=submit]" --tab-id <TAB_ID>
|
|
@@ -347,13 +346,13 @@ OMNIBOT_SESSION_TOKEN=form omnibot is enabled "button[type=submit]" --tab-id <TA
|
|
|
347
346
|
|
|
348
347
|
### Fallback entry point
|
|
349
348
|
|
|
350
|
-
|
|
349
|
+
Do not treat JavaScript as a normal upload fallback. File inputs and browser file chooser behavior are security-sensitive and page-specific.
|
|
351
350
|
|
|
352
351
|
## Batch
|
|
353
352
|
|
|
354
353
|
### When to use
|
|
355
354
|
|
|
356
|
-
Use Batch for short, known-safe command chains where the target tab and verification are already explicit.
|
|
355
|
+
Use Batch for short, known-safe extension/CDP command chains where the target tab and verification are already explicit. Batch is not a wrapper for normal CLI commands such as `snapshot` or `click`.
|
|
357
356
|
|
|
358
357
|
### Preferred sequence
|
|
359
358
|
|
|
@@ -365,8 +364,8 @@ Use Batch for short, known-safe command chains where the target tab and verifica
|
|
|
365
364
|
### Example
|
|
366
365
|
|
|
367
366
|
```bash
|
|
368
|
-
OMNIBOT_SESSION_TOKEN=research omnibot batch '[{"cmd":"
|
|
369
|
-
OMNIBOT_SESSION_TOKEN=research omnibot
|
|
367
|
+
OMNIBOT_SESSION_TOKEN=research omnibot batch '[{"cmd":"cdp","method":"Runtime.evaluate","params":{"expression":"document.title","returnByValue":true}}]' --tab-id <TAB_ID>
|
|
368
|
+
OMNIBOT_SESSION_TOKEN=research omnibot get title --tab-id <TAB_ID>
|
|
370
369
|
```
|
|
371
370
|
|
|
372
371
|
File example:
|