@omniaibot/win-x64 1.1.0 → 1.1.6
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/VERSION +1 -1
- package/bin/omnibot-windows-x64/omnibot/SKILL.md +189 -0
- package/bin/omnibot-windows-x64/omnibot/references/anti-patterns.md +37 -0
- package/bin/omnibot-windows-x64/omnibot/references/command-reference.md +605 -0
- package/bin/omnibot-windows-x64/omnibot/references/debugging-and-evidence.md +95 -0
- package/bin/omnibot-windows-x64/omnibot/references/fallback-operations.md +216 -0
- package/bin/omnibot-windows-x64/omnibot/references/operation-patterns.md +385 -0
- package/bin/omnibot-windows-x64/omnibot/references/runtime-and-status.md +111 -0
- package/bin/omnibot-windows-x64/omnibot/references/session-and-tabs.md +164 -0
- package/bin/omnibot-windows-x64/omnibot/skills/omnibot/SKILL.md +19 -3
- package/bin/omnibot-windows-x64/omnibot/skills/omnibot/references/anti-patterns.md +12 -4
- package/bin/omnibot-windows-x64/omnibot/skills/omnibot/references/command-reference.md +54 -28
- package/bin/omnibot-windows-x64/omnibot/skills/omnibot/references/debugging-and-evidence.md +1 -1
- package/bin/omnibot-windows-x64/omnibot/skills/omnibot/references/fallback-operations.md +60 -1
- package/bin/omnibot-windows-x64/omnibot/skills/omnibot/references/operation-patterns.md +37 -21
- package/bin/omnibot-windows-x64/omnibot/skills/omnibot/references/runtime-and-status.md +22 -0
- package/bin/omnibot-windows-x64/omnibot/skills/omnibot/references/session-and-tabs.md +44 -28
- package/bin/omnibot-windows-x64/omnibot-windows-x64.exe +0 -0
- package/package.json +2 -2
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Runtime and Status
|
|
2
|
+
|
|
3
|
+
Use this file before troubleshooting. Runtime checks establish whether the daemon, extension, browser, visibility mode, license, and packaged skills are healthy.
|
|
4
|
+
|
|
5
|
+
## Startup Check
|
|
6
|
+
|
|
7
|
+
Run this sequence before diagnosing browser failures:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
omnibot doctor
|
|
11
|
+
omnibot status
|
|
12
|
+
omnibot tabs
|
|
13
|
+
omnibot visibility status
|
|
14
|
+
omnibot browser current
|
|
15
|
+
omnibot license status
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Interpretation:
|
|
19
|
+
|
|
20
|
+
- `doctor` checks daemon and extension health.
|
|
21
|
+
- `status` checks daemon status only (lighter than `doctor`).
|
|
22
|
+
- `tabs` proves connected tabs are visible and provides tab ids.
|
|
23
|
+
- `visibility status` shows whether automation is visible, background, dedicated-profile, or headless.
|
|
24
|
+
- `browser current` shows current browser runtime ownership.
|
|
25
|
+
- `license status` verifies license state.
|
|
26
|
+
|
|
27
|
+
If the extension is not connected, open Chrome or Edge with the omnibot extension loaded and keep an HTTP/HTTPS page open.
|
|
28
|
+
|
|
29
|
+
## Daemon Lifecycle
|
|
30
|
+
|
|
31
|
+
Top-level shortcuts:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
omnibot status # Show daemon status
|
|
35
|
+
omnibot start # Start the daemon
|
|
36
|
+
omnibot stop # Stop the daemon
|
|
37
|
+
omnibot run # Run daemon in foreground
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Full form (also supported):
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
omnibot daemon run
|
|
44
|
+
omnibot daemon start
|
|
45
|
+
omnibot daemon stop
|
|
46
|
+
omnibot daemon status
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## doctor
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
omnibot doctor
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Use `doctor` first when commands fail, tabs are empty, screenshots fail, or the agent cannot reach the browser.
|
|
56
|
+
|
|
57
|
+
## tabs
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
omnibot tabs
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Use `tabs` to discover tab ids. Save the target tab id and use it on every page-state command:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
OMNIBOT_SESSION_TOKEN=research omnibot snapshot -i --tab-id <TAB_ID>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## browser list/current
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
omnibot browser list
|
|
73
|
+
omnibot browser current
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Use browser status when multiple browser runtimes or agents may be active.
|
|
77
|
+
|
|
78
|
+
## visibility status
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
omnibot visibility status
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Use visibility status to confirm whether automation should share the user's visible browser state. Headless and dedicated-profile modes do not automatically inherit user login.
|
|
85
|
+
|
|
86
|
+
## license status
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
omnibot license status
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Use license status when runtime checks pass but features appear unavailable.
|
|
93
|
+
|
|
94
|
+
## skills path
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
omnibot skills path
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Use skills path to locate packaged skills for installation or inspection.
|
|
101
|
+
|
|
102
|
+
## Skills Install
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
omnibot skills install --agent hermes --profile nuwa
|
|
106
|
+
omnibot skills install --agent opencode
|
|
107
|
+
omnibot skills install --agent claude
|
|
108
|
+
omnibot skills install --agent codex
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Install only when setting up or repairing an agent integration. It is not part of normal page operations.
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# Sessions and Tabs
|
|
2
|
+
|
|
3
|
+
Sessions and tabs are core reliability concepts, not advanced usage.
|
|
4
|
+
|
|
5
|
+
## Session First
|
|
6
|
+
|
|
7
|
+
`OMNIBOT_SESSION_TOKEN` is mandatory for every workflow.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
OMNIBOT_SESSION_TOKEN=research omnibot tabs
|
|
11
|
+
OMNIBOT_SESSION_TOKEN=research omnibot snapshot -i --tab-id <TAB_ID>
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The same token keeps one workflow isolated. Different tokens prevent independent agents from sharing default state.
|
|
15
|
+
|
|
16
|
+
## Tab Explicit
|
|
17
|
+
|
|
18
|
+
`--tab-id <TAB_ID>` is mandatory for every page-state command.
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
OMNIBOT_SESSION_TOKEN=checkout omnibot get url --tab-id <TAB_ID>
|
|
22
|
+
OMNIBOT_SESSION_TOKEN=checkout omnibot click --tab-id <TAB_ID> @e4
|
|
23
|
+
OMNIBOT_SESSION_TOKEN=checkout omnibot get url --tab-id <TAB_ID>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Do not rely on default tab, active tab, current tab, or previous targeting state.
|
|
27
|
+
|
|
28
|
+
## Explicit Targeting Model
|
|
29
|
+
|
|
30
|
+
Page-state commands never infer a target tab. Always pass `--tab-id <TAB_ID>` for commands that read or mutate page state.
|
|
31
|
+
|
|
32
|
+
Transport selection is internal. Omnibot may use any connected extension WebSocket to deliver extension-level commands, but that transport tab is never the page target.
|
|
33
|
+
|
|
34
|
+
Do not use the first returned tab, `tabs[0]`, browser active tab, newest tab, or prior command state as a target.
|
|
35
|
+
|
|
36
|
+
## Transport Is Not Target
|
|
37
|
+
|
|
38
|
+
Omnibot can send extension commands through any connected extension WebSocket tab. That transport tab is not the page target. The target is only the tab id passed in the command, for example `--tab-id edge-client:123`.
|
|
39
|
+
|
|
40
|
+
Safe sequence:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
OMNIBOT_SESSION_TOKEN=research omnibot navigate https://example.com
|
|
44
|
+
OMNIBOT_SESSION_TOKEN=research omnibot snapshot -i --tab-id edge-client:123
|
|
45
|
+
OMNIBOT_SESSION_TOKEN=research omnibot click --tab-id edge-client:123 @e4
|
|
46
|
+
OMNIBOT_SESSION_TOKEN=research omnibot wait --text "Saved" --tab-id edge-client:123
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Unsafe sequence:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
OMNIBOT_SESSION_TOKEN=research omnibot tabs
|
|
53
|
+
OMNIBOT_SESSION_TOKEN=research omnibot snapshot -i
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
The unsafe sequence has no target. Do not infer target from first tab, active tab, or prior operation.
|
|
57
|
+
|
|
58
|
+
## Safe Browser Test Cleanup
|
|
59
|
+
|
|
60
|
+
Browser integration tests must only close tabs they created:
|
|
61
|
+
|
|
62
|
+
1. Record the list of existing tabs before creating fixtures.
|
|
63
|
+
2. Create a unique fixture tab per case.
|
|
64
|
+
3. Store the returned full tab id.
|
|
65
|
+
4. Pass that id to every page-state command.
|
|
66
|
+
5. Close only stored fixture ids in cleanup.
|
|
67
|
+
6. Verify user tabs remain present after the test.
|
|
68
|
+
|
|
69
|
+
## Why Both
|
|
70
|
+
|
|
71
|
+
- Session = workflow isolation.
|
|
72
|
+
- Tab ID = page targeting.
|
|
73
|
+
|
|
74
|
+
Session alone does not prove which page receives a command. Tab ID alone does not isolate concurrent agents. Use both.
|
|
75
|
+
|
|
76
|
+
## Ref Scope
|
|
77
|
+
|
|
78
|
+
`@eN` refs are tab-scoped.
|
|
79
|
+
|
|
80
|
+
Never reuse `@eN` across tabs. Never assume a ref remains valid after navigation, reload, major DOM changes, or a different snapshot.
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
OMNIBOT_SESSION_TOKEN=checkout omnibot snapshot -i --tab-id <TAB_ID>
|
|
84
|
+
OMNIBOT_SESSION_TOKEN=checkout omnibot click --tab-id <TAB_ID> @e4
|
|
85
|
+
OMNIBOT_SESSION_TOKEN=checkout omnibot snapshot -i --tab-id <TAB_ID>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Multi-Agent Pattern
|
|
89
|
+
|
|
90
|
+
Agent A:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
OMNIBOT_SESSION_TOKEN=research
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Agent B:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
OMNIBOT_SESSION_TOKEN=checkout
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Agent C:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
OMNIBOT_SESSION_TOKEN=debug
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Each agent must:
|
|
109
|
+
|
|
110
|
+
1. Set a stable token.
|
|
111
|
+
2. Discover or create a tab.
|
|
112
|
+
3. Save the tab id.
|
|
113
|
+
4. Pass `--tab-id <TAB_ID>` on every page-state command.
|
|
114
|
+
5. Run `snapshot` -> action -> verify, or `get/is` -> action -> `get/is`.
|
|
115
|
+
|
|
116
|
+
Example:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
OMNIBOT_SESSION_TOKEN=research omnibot tab new https://example.com --label research
|
|
120
|
+
OMNIBOT_SESSION_TOKEN=research omnibot get url --tab-id <TAB_ID>
|
|
121
|
+
OMNIBOT_SESSION_TOKEN=research omnibot snapshot -i --tab-id <TAB_ID>
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## No Implicit Targeting
|
|
125
|
+
|
|
126
|
+
Omnibot does not provide a workflow-level current tab command. Every command that reads or changes page state must receive `--tab-id <TAB_ID>` in that command invocation.
|
|
127
|
+
|
|
128
|
+
This prevents stale target state and cross-agent tab confusion.
|
|
129
|
+
|
|
130
|
+
## browser claim/release
|
|
131
|
+
|
|
132
|
+
Use `browser claim` and `browser release` in multi-browser or multi-runtime scenarios where an agent must explicitly own or release a browser tab.
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
OMNIBOT_SESSION_TOKEN=research omnibot browser list
|
|
136
|
+
OMNIBOT_SESSION_TOKEN=research omnibot browser current
|
|
137
|
+
OMNIBOT_SESSION_TOKEN=research omnibot browser claim 123
|
|
138
|
+
OMNIBOT_SESSION_TOKEN=research omnibot snapshot -i --tab-id 123
|
|
139
|
+
OMNIBOT_SESSION_TOKEN=research omnibot browser release 123
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Claiming does not replace `--tab-id`. It only documents or coordinates ownership.
|
|
143
|
+
|
|
144
|
+
## visibility
|
|
145
|
+
|
|
146
|
+
Visibility controls where automation runs:
|
|
147
|
+
|
|
148
|
+
- `visible`: controls the user's already-open real browser tabs and preserves visible session state.
|
|
149
|
+
- `background`: avoids foregrounding tabs unless requested.
|
|
150
|
+
- `dedicated-profile`: launches or uses a separate profile.
|
|
151
|
+
- `headless`: uses a headless browser context.
|
|
152
|
+
- `launch`: starts a dedicated-profile or headless browser with an explicit user data dir.
|
|
153
|
+
|
|
154
|
+
Examples:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
omnibot visibility status
|
|
158
|
+
omnibot visibility set visible
|
|
159
|
+
omnibot visibility set background
|
|
160
|
+
omnibot visibility set headless --user-data-dir /tmp/omnibot-headless
|
|
161
|
+
omnibot visibility launch headless --user-data-dir /tmp/omnibot-headless
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Headless and dedicated-profile modes do not automatically share the user's current tabs or login state. Verify login state before assuming access.
|
|
@@ -12,7 +12,7 @@ metadata:
|
|
|
12
12
|
|
|
13
13
|
Omnibot is Browser Infrastructure for AI Agents.
|
|
14
14
|
|
|
15
|
-
It connects Hermes, Claude Code, Codex, OpenCode,
|
|
15
|
+
It connects Hermes, Claude Code, Codex, OpenCode, and other agent systems to a real Chromium browser through the local omnibot daemon and CLI.
|
|
16
16
|
|
|
17
17
|
This skill is an execution specification for agents. It is not a human command manual.
|
|
18
18
|
|
|
@@ -44,7 +44,7 @@ Every page-state workflow must use both controls:
|
|
|
44
44
|
|
|
45
45
|
They are not substitutes. Session controls which workflow owns state. Tab ID controls which page receives the command.
|
|
46
46
|
|
|
47
|
-
Do not rely on
|
|
47
|
+
Do not rely on default tab, active tab, current tab, or prior targeting state. Every page command requires explicit `--tab-id`.
|
|
48
48
|
|
|
49
49
|
Use the same token inside one workflow. Use different tokens for independent workflows.
|
|
50
50
|
|
|
@@ -108,6 +108,19 @@ Start from the task, not the command name. Use operation patterns for read, clic
|
|
|
108
108
|
|
|
109
109
|
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
110
|
|
|
111
|
+
## Read vs Snapshot Routing
|
|
112
|
+
|
|
113
|
+
Choose by intent before choosing by command name:
|
|
114
|
+
|
|
115
|
+
| Intent | Prefer | Why |
|
|
116
|
+
| --- | --- | --- |
|
|
117
|
+
| Summarize or extract page content, article text, search results, feeds, or long/lazy pages | `read` | Returns clean text/Markdown for agent reasoning. |
|
|
118
|
+
| Quickly observe current visible UI structure before deciding what to do next | `snapshot -i` | Returns actionable refs and page structure for routing. |
|
|
119
|
+
| Find buttons, links, inputs, or refs for a later action | `find` or `snapshot -i` | Produces actionable targets; `read` does not. |
|
|
120
|
+
| Verify one concrete condition | `get`, `is`, or `wait` | Narrow evidence is more reliable than dumping a page. |
|
|
121
|
+
|
|
122
|
+
Do not use `read` as the first step for click/fill workflows unless the user explicitly asked for page content first.
|
|
123
|
+
|
|
111
124
|
## Quick Routing
|
|
112
125
|
|
|
113
126
|
| Need | Read |
|
|
@@ -168,6 +181,9 @@ Use screenshots, annotated screenshots, console logs, network logs, trace, recor
|
|
|
168
181
|
|
|
169
182
|
- Missing `OMNIBOT_SESSION_TOKEN` or missing `--tab-id` on page-state commands.
|
|
170
183
|
- Acting without verify or claiming success without evidence.
|
|
171
|
-
- Using `execute-js` first, raw CSS before semantic find, `@eN` across tabs,
|
|
184
|
+
- 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.
|
|
186
|
+
- Using `tabs[0]` or the first tab as a target. The first tab is often a user tab or transport tab.
|
|
187
|
+
- Closing user tabs discovered during cleanup. Only close tabs created by the current workflow.
|
|
172
188
|
|
|
173
189
|
See `references/anti-patterns.md` before using shortcuts.
|
|
@@ -4,18 +4,23 @@
|
|
|
4
4
|
| --- | --- | --- |
|
|
5
5
|
| Missing `OMNIBOT_SESSION_TOKEN` | Workflows can share implicit state across agents. | `OMNIBOT_SESSION_TOKEN=research omnibot snapshot -i --tab-id <TAB_ID>` |
|
|
6
6
|
| Missing `--tab-id` | The command may target the wrong page. | Pass `--tab-id <TAB_ID>` on every page-state command. |
|
|
7
|
-
| `execute-js` first | JavaScript bypasses standard browser interaction and hides better evidence. | Try semantic find, snapshot refs, selectors, DOM, and mouse first. |
|
|
7
|
+
| `execute-js` first | JavaScript bypasses standard browser interaction and hides better evidence. | Try semantic find, snapshot refs, selectors, DOM, and mouse first. For CSS-only dropdowns, use JavaScript only after the trigger clicked, options remain absent from `snapshot -i`, and higher tiers cannot complete open-then-select. |
|
|
8
8
|
| Reusing `@eN` across tabs | Refs are tab-scoped and may point to a different element elsewhere. | Take a fresh `snapshot -i --tab-id <TAB_ID>` per tab. |
|
|
9
|
-
| Relying on
|
|
9
|
+
| Relying on implicit tab targeting | It is unavailable and unsafe for concurrent workflows. | Use explicit `--tab-id` on every page-state command. |
|
|
10
10
|
| Using sleep instead of wait | Fixed sleeps are flaky and either too short or too slow. | Use `omnibot wait --text`, `--url`, selector state, load state, or `--fn`. |
|
|
11
11
|
| Acting without verify | Command success is not task success. | Run `snapshot`, `get`, `is`, or `wait` after every action. |
|
|
12
12
|
| Claiming success without evidence | The browser may not have changed as expected. | Cite verified URL, text, element state, screenshot, console, or network evidence. |
|
|
13
13
|
| Raw CSS before semantic find | CSS is more brittle and less tied to user intent. | Start with `find role/text/label/placeholder/testid`. |
|
|
14
|
-
| Screenshot when text extraction is enough | Screenshots cost more and are harder to parse. | Use `
|
|
14
|
+
| Screenshot when text extraction is enough | Screenshots cost more and are harder to parse. | Use `read` for page content or `get text` for a selector. |
|
|
15
|
+
| Using `read` before an action workflow | `read` returns text, not stable action targets. | Use `find`, `snapshot -i`, `get`, or `is` for click/fill/verify workflows. |
|
|
15
16
|
| Headless expecting existing user login | Headless does not automatically share the user's visible browser session. | Use visible/background mode for existing login or explicitly log in headless. |
|
|
16
17
|
| Mixing multiple workflows in one session token | Agents can overwrite each other's default state. | Use different tokens: `research`, `checkout`, `debug`. |
|
|
17
|
-
| Using default tab state in concurrent agents |
|
|
18
|
+
| Using default tab state in concurrent agents | There is no default tab. Every page command requires explicit `--tab-id`. | Discover or create a tab, save its id, and pass `--tab-id`. |
|
|
18
19
|
| Not checking doctor/tabs before troubleshooting | You may debug page logic when the runtime is disconnected. | Run `omnibot doctor` and `omnibot tabs` first. |
|
|
20
|
+
| Using `tabs[0]` or the first tab | The first tab is often a user tab or the transport tab, not the workflow target. | Create or identify the intended tab and store its full id. |
|
|
21
|
+
| Treating transport as target | Extension routing may use a different tab than the page being acted on. | Always pass `--tab-id <TAB_ID>` and verify with `get url --tab-id <TAB_ID>`. |
|
|
22
|
+
| Closing discovered user tabs | Cleanup can destroy the user's real work. | Track only tool-created tabs and close only those ids. |
|
|
23
|
+
| Leaving worker-token tabs untracked | Cross-token test tabs can remain open or auto-close later. | Add every worker-created tab id to cleanup tracking. |
|
|
19
24
|
|
|
20
25
|
## Red Flags
|
|
21
26
|
|
|
@@ -25,5 +30,8 @@
|
|
|
25
30
|
- "The ref probably still points to the same element."
|
|
26
31
|
- "A screenshot is enough even though I need text."
|
|
27
32
|
- "Sleep should be fine."
|
|
33
|
+
- "The trigger clicked, so another `find text` should eventually select the option."
|
|
34
|
+
- "`snapshot -i` cannot see the option, so the element must not exist."
|
|
35
|
+
- "This dropdown is custom, so I can start with JavaScript."
|
|
28
36
|
|
|
29
37
|
All of these mean: stop, re-enter the standard pattern, and make state explicit.
|
|
@@ -15,6 +15,47 @@ omnibot doctor
|
|
|
15
15
|
Preferred pattern: See `runtime-and-status.md#startup-check`.
|
|
16
16
|
Fallback relation: Not a fallback command.
|
|
17
17
|
|
|
18
|
+
### status
|
|
19
|
+
|
|
20
|
+
Purpose: Show daemon status only (lighter than `doctor`).
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
omnibot status
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Preferred pattern: See `runtime-and-status.md#daemon-lifecycle`.
|
|
27
|
+
Fallback relation: Not a fallback command.
|
|
28
|
+
|
|
29
|
+
### start
|
|
30
|
+
|
|
31
|
+
Purpose: Start the daemon in the background.
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
omnibot start
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Equivalent to: `omnibot daemon start`
|
|
38
|
+
|
|
39
|
+
### stop
|
|
40
|
+
|
|
41
|
+
Purpose: Stop the running daemon.
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
omnibot stop
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Equivalent to: `omnibot daemon stop`
|
|
48
|
+
|
|
49
|
+
### run
|
|
50
|
+
|
|
51
|
+
Purpose: Run the daemon in the foreground.
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
omnibot run
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Equivalent to: `omnibot daemon run`
|
|
58
|
+
|
|
18
59
|
### tabs
|
|
19
60
|
|
|
20
61
|
Purpose: List connected browser tabs and discover tab ids.
|
|
@@ -39,28 +80,19 @@ Fallback relation: Not a fallback command.
|
|
|
39
80
|
|
|
40
81
|
## Reading
|
|
41
82
|
|
|
42
|
-
###
|
|
83
|
+
### read
|
|
43
84
|
|
|
44
|
-
Purpose: Read
|
|
85
|
+
Purpose: Read clean rendered page text/Markdown from an existing tab or a temporary URL tab.
|
|
45
86
|
|
|
46
87
|
```bash
|
|
47
|
-
OMNIBOT_SESSION_TOKEN=research omnibot
|
|
48
|
-
OMNIBOT_SESSION_TOKEN=research omnibot
|
|
88
|
+
OMNIBOT_SESSION_TOKEN=research omnibot read --screens 5 --tab-id <TAB_ID>
|
|
89
|
+
OMNIBOT_SESSION_TOKEN=research omnibot read --screens 5 --timeout 120 --tab-id <TAB_ID>
|
|
90
|
+
OMNIBOT_SESSION_TOKEN=research omnibot read --screens 3 https://example.com/article
|
|
91
|
+
OMNIBOT_SESSION_TOKEN=research omnibot read --json --screens 5 --tab-id <TAB_ID>
|
|
49
92
|
```
|
|
50
93
|
|
|
51
94
|
Preferred pattern: See `operation-patterns.md#read` and `operation-patterns.md#extraction`.
|
|
52
|
-
Fallback relation:
|
|
53
|
-
|
|
54
|
-
### full-scan
|
|
55
|
-
|
|
56
|
-
Purpose: Scroll and read more page content, including lazy-loaded content.
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
OMNIBOT_SESSION_TOKEN=research omnibot full-scan --duration 5 --text-only --tab-id <TAB_ID>
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Preferred pattern: See `operation-patterns.md#read` and `operation-patterns.md#extraction`.
|
|
63
|
-
Fallback relation: Use after targeted `get`, `is`, or `scan` are insufficient.
|
|
95
|
+
Fallback relation: Prefer for page content. Use `snapshot -i` when the next step is action planning, and `get`/`is`/`wait` for narrow state verification.
|
|
64
96
|
|
|
65
97
|
### snapshot -i
|
|
66
98
|
|
|
@@ -198,7 +230,7 @@ OMNIBOT_SESSION_TOKEN=form omnibot select @e5 "US" --tab-id <TAB_ID>
|
|
|
198
230
|
```
|
|
199
231
|
|
|
200
232
|
Preferred pattern: See `operation-patterns.md#select--check`.
|
|
201
|
-
Fallback relation: Prefer refs/selectors before JavaScript value changes.
|
|
233
|
+
Fallback relation: Prefer refs/selectors before JavaScript value changes. For CSS-only dropdowns whose options are absent from `snapshot -i`, see `fallback-operations.md#css-only-dropdown-javascript-fallback`.
|
|
202
234
|
|
|
203
235
|
### check / uncheck
|
|
204
236
|
|
|
@@ -307,7 +339,7 @@ OMNIBOT_SESSION_TOKEN=repair omnibot execute-js --file /tmp/repair.js --tab-id <
|
|
|
307
339
|
```
|
|
308
340
|
|
|
309
341
|
Preferred pattern: See `fallback-operations.md#javascript-fallback`.
|
|
310
|
-
Fallback relation: After semantic, refs, selector, DOM, and mouse are insufficient.
|
|
342
|
+
Fallback relation: After semantic, refs, selector, DOM, and mouse are insufficient. Valid examples include CSS-only dropdowns where the trigger exists but option refs are absent from `snapshot -i`.
|
|
311
343
|
|
|
312
344
|
### cdp
|
|
313
345
|
|
|
@@ -360,27 +392,21 @@ Purpose: Manage browser tabs.
|
|
|
360
392
|
```bash
|
|
361
393
|
OMNIBOT_SESSION_TOKEN=research omnibot tab list
|
|
362
394
|
OMNIBOT_SESSION_TOKEN=research omnibot tab new https://docs.example.com --label docs
|
|
363
|
-
OMNIBOT_SESSION_TOKEN=research omnibot tab switch docs
|
|
364
395
|
OMNIBOT_SESSION_TOKEN=research omnibot tab close docs
|
|
365
396
|
```
|
|
366
397
|
|
|
367
398
|
Preferred pattern: See `session-and-tabs.md#tab-explicit`.
|
|
368
|
-
|
|
399
|
+
Removed: `tab switch` and `tab focus` are no longer available. Use explicit `--tab-id` on every page-state command.
|
|
369
400
|
|
|
370
|
-
### window / frame
|
|
401
|
+
### window / frame
|
|
371
402
|
|
|
372
|
-
Purpose: Manage windows
|
|
403
|
+
Purpose: Manage windows and frames.
|
|
373
404
|
|
|
374
405
|
```bash
|
|
375
406
|
OMNIBOT_SESSION_TOKEN=research omnibot window new
|
|
376
407
|
OMNIBOT_SESSION_TOKEN=research omnibot frame main
|
|
377
|
-
OMNIBOT_SESSION_TOKEN=research omnibot switch-tab 123
|
|
378
|
-
OMNIBOT_SESSION_TOKEN=research omnibot focus-tab 123
|
|
379
408
|
```
|
|
380
409
|
|
|
381
|
-
Preferred pattern: See `session-and-tabs.md#switch-tab` and `session-and-tabs.md#focus-tab`.
|
|
382
|
-
Fallback relation: `focus-tab` is for user-visible UI, not targeting reliability.
|
|
383
|
-
|
|
384
410
|
## Waiting & Batch
|
|
385
411
|
|
|
386
412
|
### wait
|
|
@@ -406,7 +432,7 @@ Fallback relation: Prefer over shell sleep.
|
|
|
406
432
|
Purpose: Send short command arrays as JSON or from a file.
|
|
407
433
|
|
|
408
434
|
```bash
|
|
409
|
-
OMNIBOT_SESSION_TOKEN=research omnibot batch '[{"cmd":"
|
|
435
|
+
OMNIBOT_SESSION_TOKEN=research omnibot batch '[{"cmd":"snapshot","interactive":true}]' --tab-id <TAB_ID>
|
|
410
436
|
OMNIBOT_SESSION_TOKEN=research omnibot batch --file /tmp/omnibot-batch.json --tab-id <TAB_ID>
|
|
411
437
|
```
|
|
412
438
|
|
|
@@ -89,7 +89,7 @@ CDP inspection is not a first-choice operation path. If CDP changes state, it be
|
|
|
89
89
|
Before reporting a browser issue, collect the smallest evidence set that explains it:
|
|
90
90
|
|
|
91
91
|
- Runtime: `doctor`, `tabs`, `visibility status`.
|
|
92
|
-
- Page state: `get`, `is`, `
|
|
92
|
+
- Page state: `get`, `is`, `snapshot`, or `wait`.
|
|
93
93
|
- Visual proof: `screenshot --annotate` only if visual state matters.
|
|
94
94
|
- Browser diagnostics: `console errors` and `network summary`.
|
|
95
95
|
- Reproduction artifact: `trace` or `record` when the flow is unstable.
|
|
@@ -106,7 +106,8 @@ Use `execute-js` only when:
|
|
|
106
106
|
- CSS selector operation fails.
|
|
107
107
|
- DOM fallback fails.
|
|
108
108
|
- A complex frontend event must be triggered.
|
|
109
|
-
-
|
|
109
|
+
- A CSS-only dropdown or hover menu requires an atomic open-then-select sequence, and `snapshot -i` confirms the option nodes are absent from the accessibility tree.
|
|
110
|
+
- Runtime state cannot be read through `read`, `snapshot`, `get`, or `is`.
|
|
110
111
|
|
|
111
112
|
Read-only JavaScript fallback:
|
|
112
113
|
|
|
@@ -129,6 +130,64 @@ OMNIBOT_SESSION_TOKEN=repair omnibot execute-js "document.querySelector('button[
|
|
|
129
130
|
OMNIBOT_SESSION_TOKEN=repair omnibot wait --url "/dashboard" --tab-id <TAB_ID>
|
|
130
131
|
```
|
|
131
132
|
|
|
133
|
+
### CSS-only dropdown JavaScript fallback
|
|
134
|
+
|
|
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
|
+
|
|
137
|
+
Example for a visible trigger like `按留言时间排序` and a target option text:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
OMNIBOT_SESSION_TOKEN=repair omnibot execute-js --file /tmp/omnibot-css-dropdown.js --tab-id <TAB_ID>
|
|
141
|
+
OMNIBOT_SESSION_TOKEN=repair omnibot snapshot -i --tab-id <TAB_ID>
|
|
142
|
+
```
|
|
143
|
+
|
|
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
|
+
|
|
132
191
|
Prefer `--file` for longer scripts:
|
|
133
192
|
|
|
134
193
|
```bash
|