@pasko70/pibo 1.4.1 → 1.4.2

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.
Files changed (129) hide show
  1. package/README.md +183 -183
  2. package/context/codex-base-prompt.md +148 -148
  3. package/context/compute-worker.md +23 -23
  4. package/context/pibo-compaction-prompt.md +100 -100
  5. package/context/pibo-native-tooling.md +18 -18
  6. package/context/pibo-system-prompt.md +77 -77
  7. package/dist/apps/chat/agent-store.js +82 -82
  8. package/dist/apps/chat/data/project-service.js +166 -166
  9. package/dist/apps/chat/data/read-state-service.js +18 -18
  10. package/dist/apps/chat/data/timeline-query-service.js +8 -8
  11. package/dist/apps/chat/model-catalog.js +5 -1
  12. package/dist/apps/chat/static-assets.js +853 -853
  13. package/dist/apps/chat/workflow-persistence.js +255 -255
  14. package/dist/apps/chat-ui/assets/{dist-7YaJd19a.js → dist-B2BEpL7n.js} +1 -1
  15. package/dist/apps/chat-ui/assets/{dist-CiYeO8nN.js → dist-BAGS_xkV.js} +1 -1
  16. package/dist/apps/chat-ui/assets/{dist-BIvPnn_C.js → dist-BAXNalar.js} +1 -1
  17. package/dist/apps/chat-ui/assets/{dist-CjSI6y5z.js → dist-BwUvs6Ph.js} +1 -1
  18. package/dist/apps/chat-ui/assets/{dist-Ubstha8t.js → dist-C0zsJ8II.js} +1 -1
  19. package/dist/apps/chat-ui/assets/{dist-KXCMNKIL.js → dist-C3PnEkhb.js} +1 -1
  20. package/dist/apps/chat-ui/assets/{dist-CVQU42Fn.js → dist-CYPL-B2Z.js} +1 -1
  21. package/dist/apps/chat-ui/assets/{dist-BbNE72h8.js → dist-CiDSXgtg.js} +1 -1
  22. package/dist/apps/chat-ui/assets/{dist-D7TCkoFT.js → dist-DnACFKyO.js} +1 -1
  23. package/dist/apps/chat-ui/assets/{dist-ChSZNqKE.js → dist-ZB1-ui2y.js} +1 -1
  24. package/dist/apps/chat-ui/assets/{dist-8Noo5eCN.js → dist-vKlxFkTa.js} +1 -1
  25. package/dist/apps/chat-ui/assets/{index-CmxtUVG1.js → index-0x7tuTNX.js} +3 -3
  26. package/dist/apps/chat-ui/assets/{index-C25VYnyb.css → index-B-qaya1G.css} +1 -1
  27. package/dist/apps/chat-ui/index.html +18 -18
  28. package/dist/apps/chat-ui/manifest.webmanifest +25 -25
  29. package/dist/apps/chat-ui/sw.js +41 -41
  30. package/dist/apps/chat-vscode-web/index.html +12 -12
  31. package/dist/apps/cli-ui/cliSessionsCommand.js +23 -23
  32. package/dist/apps/context-files-ui/index.html +11 -11
  33. package/dist/apps/vscode-artifacts/latest.vsix +0 -0
  34. package/dist/apps/vscode-artifacts/{pibo-vscode-ext-1.4.1.vsix → pibo-vscode-ext-1.4.2.vsix} +0 -0
  35. package/dist/bin/pibo.js +0 -0
  36. package/dist/bin/rg.js +0 -0
  37. package/dist/cli.js +35 -35
  38. package/dist/compute/cli.js +54 -54
  39. package/dist/core/runtime.js +2 -0
  40. package/dist/core/session-router.js +1 -0
  41. package/dist/cron/cli.js +15 -15
  42. package/dist/cron/store.js +49 -49
  43. package/dist/data/cli.js +23 -23
  44. package/dist/data/event-log.js +23 -23
  45. package/dist/data/message-store.js +20 -20
  46. package/dist/data/navigation-store.js +9 -9
  47. package/dist/data/observation-store.js +4 -4
  48. package/dist/data/payload-store.js +17 -17
  49. package/dist/data/schema.js +429 -429
  50. package/dist/data/session-store.js +4 -4
  51. package/dist/data/telemetry-queries.js +54 -54
  52. package/dist/data/telemetry.js +156 -156
  53. package/dist/debug/events.js +12 -12
  54. package/dist/debug/failures.js +6 -6
  55. package/dist/debug/index.js +207 -207
  56. package/dist/debug/messages.js +6 -6
  57. package/dist/debug/pty.js +124 -124
  58. package/dist/debug/session.js +29 -29
  59. package/dist/debug/tools.js +5 -5
  60. package/dist/debug/web-snapshot-browser-scripts.js +294 -294
  61. package/dist/debug/web-streaming-browser-library.js +925 -925
  62. package/dist/debug/web-streaming-browser-scripts.js +232 -232
  63. package/dist/debug/web-streaming-provider-telemetry.js +4 -4
  64. package/dist/debug/web.js +93 -93
  65. package/dist/gateway/cli.js +19 -19
  66. package/dist/mcp/config-command.js +53 -53
  67. package/dist/mcp/index.js +21 -21
  68. package/dist/mcp/registry.js +11 -11
  69. package/dist/pi-packages/cli.js +11 -11
  70. package/dist/plugins/context-files-store.js +110 -110
  71. package/dist/plugins/context-files.js +4 -4
  72. package/dist/providers/glm.js +59 -0
  73. package/dist/ralph/cli.js +18 -18
  74. package/dist/ralph/templates.js +140 -140
  75. package/dist/reliability/store.js +226 -226
  76. package/dist/sessions/pibo-data-store.js +16 -16
  77. package/dist/sessions/sqlite-store.js +53 -53
  78. package/dist/setup/cli.js +58 -58
  79. package/dist/tools/agent-browser-wrapper.js +80 -80
  80. package/dist/tools/browser-use-cdp.js +12 -12
  81. package/dist/tools/browser-use-wrapper.js +762 -762
  82. package/dist/tools/guides.js +455 -455
  83. package/dist/tools/index.js +99 -99
  84. package/dist/tools/runtime/node-worker-source.js +205 -205
  85. package/dist/tools/runtime/python-worker-source.js +177 -177
  86. package/dist/vscode/cli.js +9 -9
  87. package/dist/web-annotations/cdp.js +900 -900
  88. package/dist/web-annotations/store.js +96 -96
  89. package/docs/README.md +23 -23
  90. package/docs/ops/install-developer-host.md +112 -112
  91. package/docs/ops/install-user-host.md +96 -96
  92. package/docs/ops/upgrade-user-to-developer-host.md +69 -69
  93. package/docs/ops/vscode-extension-release.md +160 -160
  94. package/package.json +1 -1
  95. package/skills/builtin/pi-agent-harness/SKILL.md +319 -319
  96. package/skills/builtin/pi-agent-harness/agents/openai.yaml +4 -4
  97. package/skills/builtin/pibo-docker-system/SKILL.md +170 -170
  98. package/skills/builtin/pibo-spec-writing/SKILL.md +330 -330
  99. package/skills/builtin/prd/SKILL.md +143 -143
  100. package/skills/builtin/ralph-loop/SKILL.md +359 -359
  101. package/skills/builtin/ralph-prd-json/SKILL.md +123 -123
  102. package/skills/builtin/skill-creator/LICENSE.txt +201 -201
  103. package/skills/builtin/skill-creator/SKILL.md +513 -513
  104. package/skills/builtin/skill-creator/agents/analyzer.md +274 -274
  105. package/skills/builtin/skill-creator/agents/comparator.md +202 -202
  106. package/skills/builtin/skill-creator/agents/grader.md +223 -223
  107. package/skills/builtin/skill-creator/assets/eval_review.html +146 -146
  108. package/skills/builtin/skill-creator/eval-viewer/generate_review.py +471 -471
  109. package/skills/builtin/skill-creator/eval-viewer/viewer.html +1325 -1325
  110. package/skills/builtin/skill-creator/references/schemas.md +430 -430
  111. package/skills/builtin/skill-creator/scripts/aggregate_benchmark.py +401 -401
  112. package/skills/builtin/skill-creator/scripts/generate_report.py +326 -326
  113. package/skills/builtin/skill-creator/scripts/improve_description.py +247 -247
  114. package/skills/builtin/skill-creator/scripts/package_skill.py +136 -136
  115. package/skills/builtin/skill-creator/scripts/quick_validate.py +102 -102
  116. package/skills/builtin/skill-creator/scripts/run_eval.py +310 -310
  117. package/skills/builtin/skill-creator/scripts/run_loop.py +328 -328
  118. package/skills/builtin/skill-creator/scripts/utils.py +47 -47
  119. package/skills/builtin/web-annotations/SKILL.md +93 -93
  120. package/src/mcp/LICENSE.mcp-cli +21 -21
  121. package/dist/apps/vscode-artifacts/pibo-vscode-1.3.0.vsix +0 -0
  122. package/dist/apps/vscode-artifacts/pibo-vscode-ext-1.3.3.vsix +0 -0
  123. package/dist/apps/vscode-artifacts/pibo-vscode-ext-1.3.4.vsix +0 -0
  124. package/dist/apps/vscode-artifacts/pibo-vscode-ext-1.3.5.vsix +0 -0
  125. package/dist/core/shared-app.js +0 -17
  126. package/dist/data/final-app-space-cutover-migration.js +0 -728
  127. package/dist/data/shared-app-migration.js +0 -757
  128. package/dist/session-ui/ownerViewModel.js +0 -27
  129. package/dist/shared-app.js +0 -4
@@ -1,475 +1,475 @@
1
1
  export const RALPH_GUIDE = {
2
2
  name: 'ralph',
3
3
  description: 'Create, inspect, and control Pibo Ralph jobs from the CLI.',
4
- content: `---
5
- name: ralph
6
- description: Creates and controls continuous Pibo agent jobs for implementation loops, bug fixing, validation, and PRD/story execution.
7
- allowed-tools: Bash(pibo:*), Bash(npm:*)
8
- ---
9
-
10
- # Ralph CLI Tool
11
-
12
- Ralph runs repeatable Pibo agent jobs. Use it when the user wants an implementation loop, PRD/story execution, bug fixing, validation, or a background job that can be started, stopped, inspected, and resumed.
13
-
14
- ## Required Context
15
-
16
- Ralph jobs are app-global. Choose either:
17
-
18
- - room target: \`--room <current-room-id>\`
19
- - shared default target: \`--default-chat\`
20
-
21
- Inside the Pibo source repo, use \`npm run --silent dev -- ralph ...\` for uninstalled local changes. For the installed CLI, use \`pibo ralph ...\`.
22
-
23
- ## Discover Templates
24
-
25
- \`\`\`bash
26
- pibo ralph templates
27
- pibo ralph templates --json
28
- pibo tools guide ralph ralph
29
- \`\`\`
30
-
31
- Good defaults:
32
-
33
- - \`prd-single-story-standard\`: one failing PRD story per run; promise-complete stop policy.
34
- - \`prd-batch-stories\`: multiple PRD stories in priority order; commit after each story.
35
- - \`single-run-objective\`: one focused non-PRD objective; stops after one completed run attempt.
36
-
37
- ## Create Jobs
38
-
39
- Create stopped, inspect, then start:
40
-
41
- \`\`\`bash
42
- pibo ralph add \\
43
- --room "<room-id>" \\
44
- --template prd-single-story-standard \\
45
- --name "Implement story X" \\
46
- --prompt "Implement exactly one failing PRD story, test it, and commit." \\
47
- --json
48
-
49
- pibo ralph start <job-id>
50
- \`\`\`
51
-
52
- Create and start immediately:
53
-
54
- \`\`\`bash
55
- pibo ralph add \\
56
- --room "<room-id>" \\
57
- --template single-run-objective \\
58
- --name "Fix bug Y" \\
59
- --prompt "Reproduce and fix bug Y, then run focused tests." \\
60
- --start \\
61
- --json
62
- \`\`\`
63
-
64
- Explicit options override template fields.
65
-
66
- ## Inspect and Debug
67
-
68
- \`\`\`bash
69
- pibo ralph status --json
70
- pibo ralph list --all --json
71
- pibo ralph runs --job <job-id> --json
72
- pibo ralph policy show <job-id> --json
73
- \`\`\`
74
-
75
- Use \`runs --json\` to debug failures, session ids, completion state, and recent activity. Prefer bounded JSON output when another agent will parse it.
76
-
77
- ## Control Jobs
78
-
79
- \`\`\`bash
80
- pibo ralph stop <job-id> # finish current session, then stop
81
- pibo ralph cancel <job-id> # abort current session and stop
82
- pibo ralph edit <job-id> --prompt "Updated objective" --json
83
- pibo ralph remove <job-id>
84
- \`\`\`
85
-
86
- Prefer \`stop\` for normal shutdown and \`cancel\` only when the active run is stuck or unsafe.
87
-
88
- ## Safety
89
-
90
- 1. Do not start many Ralph jobs unless the user asked for parallel work.
91
- 2. Use templates first; avoid ad-hoc long prompts when a preset fits.
92
- 3. Inspect with \`list --json\` and \`runs --json\` before editing or canceling an unknown job.
93
- 4. If working in the source repo before install, use \`npm run --silent dev -- ralph ...\`.
4
+ content: `---
5
+ name: ralph
6
+ description: Creates and controls continuous Pibo agent jobs for implementation loops, bug fixing, validation, and PRD/story execution.
7
+ allowed-tools: Bash(pibo:*), Bash(npm:*)
8
+ ---
9
+
10
+ # Ralph CLI Tool
11
+
12
+ Ralph runs repeatable Pibo agent jobs. Use it when the user wants an implementation loop, PRD/story execution, bug fixing, validation, or a background job that can be started, stopped, inspected, and resumed.
13
+
14
+ ## Required Context
15
+
16
+ Ralph jobs are app-global. Choose either:
17
+
18
+ - room target: \`--room <current-room-id>\`
19
+ - shared default target: \`--default-chat\`
20
+
21
+ Inside the Pibo source repo, use \`npm run --silent dev -- ralph ...\` for uninstalled local changes. For the installed CLI, use \`pibo ralph ...\`.
22
+
23
+ ## Discover Templates
24
+
25
+ \`\`\`bash
26
+ pibo ralph templates
27
+ pibo ralph templates --json
28
+ pibo tools guide ralph ralph
29
+ \`\`\`
30
+
31
+ Good defaults:
32
+
33
+ - \`prd-single-story-standard\`: one failing PRD story per run; promise-complete stop policy.
34
+ - \`prd-batch-stories\`: multiple PRD stories in priority order; commit after each story.
35
+ - \`single-run-objective\`: one focused non-PRD objective; stops after one completed run attempt.
36
+
37
+ ## Create Jobs
38
+
39
+ Create stopped, inspect, then start:
40
+
41
+ \`\`\`bash
42
+ pibo ralph add \\
43
+ --room "<room-id>" \\
44
+ --template prd-single-story-standard \\
45
+ --name "Implement story X" \\
46
+ --prompt "Implement exactly one failing PRD story, test it, and commit." \\
47
+ --json
48
+
49
+ pibo ralph start <job-id>
50
+ \`\`\`
51
+
52
+ Create and start immediately:
53
+
54
+ \`\`\`bash
55
+ pibo ralph add \\
56
+ --room "<room-id>" \\
57
+ --template single-run-objective \\
58
+ --name "Fix bug Y" \\
59
+ --prompt "Reproduce and fix bug Y, then run focused tests." \\
60
+ --start \\
61
+ --json
62
+ \`\`\`
63
+
64
+ Explicit options override template fields.
65
+
66
+ ## Inspect and Debug
67
+
68
+ \`\`\`bash
69
+ pibo ralph status --json
70
+ pibo ralph list --all --json
71
+ pibo ralph runs --job <job-id> --json
72
+ pibo ralph policy show <job-id> --json
73
+ \`\`\`
74
+
75
+ Use \`runs --json\` to debug failures, session ids, completion state, and recent activity. Prefer bounded JSON output when another agent will parse it.
76
+
77
+ ## Control Jobs
78
+
79
+ \`\`\`bash
80
+ pibo ralph stop <job-id> # finish current session, then stop
81
+ pibo ralph cancel <job-id> # abort current session and stop
82
+ pibo ralph edit <job-id> --prompt "Updated objective" --json
83
+ pibo ralph remove <job-id>
84
+ \`\`\`
85
+
86
+ Prefer \`stop\` for normal shutdown and \`cancel\` only when the active run is stuck or unsafe.
87
+
88
+ ## Safety
89
+
90
+ 1. Do not start many Ralph jobs unless the user asked for parallel work.
91
+ 2. Use templates first; avoid ad-hoc long prompts when a preset fits.
92
+ 3. Inspect with \`list --json\` and \`runs --json\` before editing or canceling an unknown job.
93
+ 4. If working in the source repo before install, use \`npm run --silent dev -- ralph ...\`.
94
94
  `,
95
95
  };
96
96
  export const AGENT_BROWSER_GUIDE = {
97
97
  name: 'agent-browser',
98
98
  description: 'Ref-based browser automation with the Agent Browser CLI.',
99
- content: `---
100
- name: agent-browser
101
- description: Fast native browser automation CLI for AI agents. Use when you need to open pages, inspect snapshots, click refs, fill fields, and keep browser state under a Pibo-owned tool home.
102
- allowed-tools: Bash(agent-browser:*)
103
- ---
104
-
105
- # Browser Automation with Agent Browser
106
-
107
- Agent Browser uses refs from interactive snapshots. Inspect first, act on refs, then inspect again after navigation or DOM changes.
108
-
109
- ## Prerequisites
110
-
111
- Initialize one shell with the Pibo tool environment:
112
-
113
- \`\`\`bash
114
- eval "$(pibo tools env agent-browser)"
115
- agent-browser doctor --offline --quick
116
- \`\`\`
117
-
118
- Inside the Pibo source repo, use \`eval "$(npm run --silent dev -- tools env agent-browser)"\`. The Pibo wrapper comes first on \`PATH\` and keeps state under \`AGENT_BROWSER_HOME\`, normally \`$PIBO_HOME/tools/agent-browser/home\`. For \`agent-browser@0.27.0\`, the wrapper also redirects \`HOME\` there by default so \`~/.agent-browser\` stays inside the tool home.
119
-
120
- ## Core Workflow
121
-
122
- \`\`\`bash
123
- agent-browser open <url>
124
- agent-browser snapshot -i
125
- agent-browser click @e1
126
- agent-browser fill @e2 "text"
127
- agent-browser snapshot -i
128
- agent-browser get title
129
- agent-browser close --all
130
- \`\`\`
131
-
132
- Re-run \`snapshot -i\` after navigation, submit, scroll, animation, or any DOM-changing action. Do not reuse stale refs.
133
-
134
- ## Sessions
135
-
136
- Use sessions for separate browser tasks:
137
-
138
- \`\`\`bash
139
- agent-browser --session pibo-check open https://example.com
140
- AGENT_BROWSER_SESSION=pibo-check agent-browser snapshot -i
141
- agent-browser session list
142
- \`\`\`
143
-
144
- Keep mutating commands against the same session serial. Avoid parallel \`click\`, \`fill\`, \`open\`, or \`snapshot\` calls for one session.
145
-
146
- ## State and Profiles
147
-
148
- The wrapper defaults browser-launching commands to a persistent Pibo profile:
149
-
150
- \`\`\`bash
151
- agent-browser open https://example.com
152
- \`\`\`
153
-
154
- Opt out when needed:
155
-
156
- \`\`\`bash
157
- agent-browser --fresh-profile open https://example.com
158
- agent-browser --profile /path/to/profile open https://example.com
159
- agent-browser --session-name saved-check open https://example.com
160
- \`\`\`
161
-
162
- Treat profiles, saved states, auth vaults, cookies, and headers as secrets. Do not print or copy their contents into chat.
163
-
164
- ## Authenticated Chat Web Work
165
-
166
- Prefer isolated leases when more than one agent may use authenticated Chat Web:
167
-
168
- \`\`\`bash
169
- eval "$(pibo tools agent-browser lease acquire --app pibo-chat --holder "$USER")"
170
- agent-browser open http://4788.192.168.0.204.sslip.io/apps/chat
171
- agent-browser snapshot -i
172
- \`\`\`
173
-
174
- To prepare the reusable template profile:
175
-
176
- \`\`\`bash
177
- eval "$(pibo tools agent-browser auth-template env --app pibo-chat)"
178
- agent-browser open http://4788.192.168.0.204.sslip.io/apps/chat
179
- \`\`\`
180
-
181
- Sign in once, close the browser, then acquire leases from the template.
182
-
183
- For an already-open browser, inspect CDP targets:
184
-
185
- \`\`\`bash
186
- pibo tools agent-browser targets
187
- pibo tools agent-browser attach-chat
188
- \`\`\`
189
-
190
- ## Upstream Skills
191
-
192
- Pibo keeps the full upstream skill out of default runtime context. Fetch it only when needed:
193
-
194
- \`\`\`bash
195
- agent-browser skills get core --full
196
- \`\`\`
99
+ content: `---
100
+ name: agent-browser
101
+ description: Fast native browser automation CLI for AI agents. Use when you need to open pages, inspect snapshots, click refs, fill fields, and keep browser state under a Pibo-owned tool home.
102
+ allowed-tools: Bash(agent-browser:*)
103
+ ---
104
+
105
+ # Browser Automation with Agent Browser
106
+
107
+ Agent Browser uses refs from interactive snapshots. Inspect first, act on refs, then inspect again after navigation or DOM changes.
108
+
109
+ ## Prerequisites
110
+
111
+ Initialize one shell with the Pibo tool environment:
112
+
113
+ \`\`\`bash
114
+ eval "$(pibo tools env agent-browser)"
115
+ agent-browser doctor --offline --quick
116
+ \`\`\`
117
+
118
+ Inside the Pibo source repo, use \`eval "$(npm run --silent dev -- tools env agent-browser)"\`. The Pibo wrapper comes first on \`PATH\` and keeps state under \`AGENT_BROWSER_HOME\`, normally \`$PIBO_HOME/tools/agent-browser/home\`. For \`agent-browser@0.27.0\`, the wrapper also redirects \`HOME\` there by default so \`~/.agent-browser\` stays inside the tool home.
119
+
120
+ ## Core Workflow
121
+
122
+ \`\`\`bash
123
+ agent-browser open <url>
124
+ agent-browser snapshot -i
125
+ agent-browser click @e1
126
+ agent-browser fill @e2 "text"
127
+ agent-browser snapshot -i
128
+ agent-browser get title
129
+ agent-browser close --all
130
+ \`\`\`
131
+
132
+ Re-run \`snapshot -i\` after navigation, submit, scroll, animation, or any DOM-changing action. Do not reuse stale refs.
133
+
134
+ ## Sessions
135
+
136
+ Use sessions for separate browser tasks:
137
+
138
+ \`\`\`bash
139
+ agent-browser --session pibo-check open https://example.com
140
+ AGENT_BROWSER_SESSION=pibo-check agent-browser snapshot -i
141
+ agent-browser session list
142
+ \`\`\`
143
+
144
+ Keep mutating commands against the same session serial. Avoid parallel \`click\`, \`fill\`, \`open\`, or \`snapshot\` calls for one session.
145
+
146
+ ## State and Profiles
147
+
148
+ The wrapper defaults browser-launching commands to a persistent Pibo profile:
149
+
150
+ \`\`\`bash
151
+ agent-browser open https://example.com
152
+ \`\`\`
153
+
154
+ Opt out when needed:
155
+
156
+ \`\`\`bash
157
+ agent-browser --fresh-profile open https://example.com
158
+ agent-browser --profile /path/to/profile open https://example.com
159
+ agent-browser --session-name saved-check open https://example.com
160
+ \`\`\`
161
+
162
+ Treat profiles, saved states, auth vaults, cookies, and headers as secrets. Do not print or copy their contents into chat.
163
+
164
+ ## Authenticated Chat Web Work
165
+
166
+ Prefer isolated leases when more than one agent may use authenticated Chat Web:
167
+
168
+ \`\`\`bash
169
+ eval "$(pibo tools agent-browser lease acquire --app pibo-chat --holder "$USER")"
170
+ agent-browser open http://4788.192.168.0.204.sslip.io/apps/chat
171
+ agent-browser snapshot -i
172
+ \`\`\`
173
+
174
+ To prepare the reusable template profile:
175
+
176
+ \`\`\`bash
177
+ eval "$(pibo tools agent-browser auth-template env --app pibo-chat)"
178
+ agent-browser open http://4788.192.168.0.204.sslip.io/apps/chat
179
+ \`\`\`
180
+
181
+ Sign in once, close the browser, then acquire leases from the template.
182
+
183
+ For an already-open browser, inspect CDP targets:
184
+
185
+ \`\`\`bash
186
+ pibo tools agent-browser targets
187
+ pibo tools agent-browser attach-chat
188
+ \`\`\`
189
+
190
+ ## Upstream Skills
191
+
192
+ Pibo keeps the full upstream skill out of default runtime context. Fetch it only when needed:
193
+
194
+ \`\`\`bash
195
+ agent-browser skills get core --full
196
+ \`\`\`
197
197
  `,
198
198
  };
199
199
  export const BROWSER_USE_GUIDE = {
200
200
  name: 'browser-use',
201
201
  description: 'Local browser automation with the browser-use CLI.',
202
- content: `---
203
- name: browser-use
204
- description: Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, or extract information from web pages.
205
- allowed-tools: Bash(browser-use:*)
206
- ---
207
-
208
- # Browser Automation with browser-use CLI
209
-
210
- The browser-use command provides persistent browser automation. A background daemon keeps the browser open across commands, so repeated commands are fast.
211
-
212
- ## Prerequisites
213
-
214
- Initialize one persistent browser-use shell by applying the Pibo tool environment once:
215
-
216
- \`\`\`bash
217
- eval "$(pibo tools env browser-use)"
218
- browser-use doctor
219
- \`\`\`
220
-
221
- Inside the Pibo source repo, use \`eval "$(npm run --silent dev -- tools env browser-use)"\` instead. Keep running later \`browser-use\` commands in that same shell; a new shell needs the one-time initialization again. If command substitution is not available, run the env command and apply the printed exports manually. On Linux, it includes detected desktop variables such as \`DISPLAY\`, \`WAYLAND_DISPLAY\`, and \`XAUTHORITY\` when a local desktop is available.
222
-
223
- The Pibo tool environment wraps \`browser-use\`: when a new browser daemon session is started, it starts a Pibo-managed persistent Chrome profile named \`PIBo\` with CDP and connects Browser Use to it. This avoids Browser Use's normal temporary profile copy, so sign-ins made in that profile stay on disk. Pass \`--fresh-profile\` to start a fresh temporary browser profile instead.
224
-
225
- ## Core Workflow
226
-
227
- 1. Navigate: \`browser-use --headed --session NAME open <url>\` when a desktop is available; otherwise use \`browser-use --session NAME open <url>\`
228
- 2. Inspect: \`browser-use state\`
229
- 3. Interact with indices from state: \`browser-use click 5\`, \`browser-use input 3 "text"\`
230
- 4. Verify: \`browser-use state\`, \`browser-use get value <index>\`, \`browser-use eval "js"\`, or \`browser-use screenshot\`
231
- 5. Repeat while the browser stays open
232
-
233
- Run browser-mutating commands one at a time per session. Do not issue parallel \`click\`, \`input\`, \`open\`, \`eval\`, or \`screenshot\` calls against the same session.
234
-
235
- If a command fails, run \`browser-use close\` first to clear the session, then retry.
236
-
237
- After navigation, submit, keypress navigation, major DOM changes, or scroll on complex pages, run \`state\` again before reusing element indices.
238
-
239
- ## Browser Modes
240
-
241
- \`\`\`bash
242
- browser-use --headed open <url> # Starts Pibo-managed persistent PIBo Chrome via CDP
243
- browser-use --fresh-profile open <url> # Starts a fresh temporary browser profile
244
- browser-use --connect open <url> # Connect to local Chrome via CDP (requires --remote-debugging-port)
245
- browser-use --profile "Default" open <url> # Upstream profile mode; Browser Use may copy it to a temp dir
246
- \`\`\`
247
-
248
- ## Commands
249
-
250
- \`\`\`bash
251
- # Navigation
252
- browser-use open <url>
253
- browser-use back
254
- browser-use scroll down
255
- browser-use scroll up
256
- browser-use switch <index>
257
- browser-use close-tab [index]
258
-
259
- # Page state
260
- browser-use state
261
- browser-use screenshot [path.png]
262
- browser-use screenshot --full path.png
263
-
264
- # Interactions
265
- browser-use click <index>
266
- browser-use click <x> <y>
267
- browser-use type "text"
268
- browser-use input <index> "text"
269
- browser-use input <index> ""
270
- browser-use keys "Enter"
271
- browser-use keys "Control+a"
272
- browser-use select <index> "option"
273
- browser-use upload <index> <path>
274
- browser-use hover <index>
275
- browser-use dblclick <index>
276
- browser-use rightclick <index>
277
-
278
- # Data extraction
279
- browser-use eval "js code"
280
- browser-use get title
281
- browser-use get html
282
- browser-use get html --selector "h1"
283
- browser-use get text <index>
284
- browser-use get value <index>
285
- browser-use get attributes <index>
286
- browser-use get bbox <index>
287
-
288
- # Wait
289
- browser-use wait selector "css"
290
- browser-use wait text "Success"
291
-
292
- # Cookies
293
- browser-use cookies get
294
- browser-use cookies get --url <url>
295
- browser-use cookies set <name> <value>
296
- browser-use cookies clear
297
- browser-use cookies export <file>
298
- browser-use cookies import <file>
299
-
300
- # Session
301
- browser-use close
302
- browser-use sessions
303
- browser-use close --all
304
- \`\`\`
305
-
306
- ## Authenticated Browsing
307
-
308
- For the Pibo Chat Web App, prefer an isolated authenticated lease when multiple agents may use the browser at the same time:
309
-
310
- \`\`\`bash
311
- eval "$(pibo tools browser-use lease acquire --app pibo-chat --holder "$USER")"
312
- browser-use state
313
- \`\`\`
314
-
315
- The lease exports \`BROWSER_USE_HOME\`, \`PIBO_BROWSER_USE_SESSION\`, \`PIBO_BROWSER_USE_CHROME_USER_DATA_DIR\`, and \`PIBO_BROWSER_USE_DEFAULT_PROFILE\`. The Pibo browser-use wrapper uses \`PIBO_BROWSER_USE_SESSION\` as the default session, so later commands can omit \`--session\` in that shell.
316
-
317
- Before acquiring leases, prepare one authenticated template profile:
318
-
319
- \`\`\`bash
320
- eval "$(pibo tools browser-use auth-template env)"
321
- browser-use --headed open http://4788.192.168.0.204.sslip.io/apps/chat
322
- \`\`\`
323
-
324
- Sign in once in that template browser, then close it before agents acquire leases. Inspect and clean up leases with:
325
-
326
- \`\`\`bash
327
- pibo tools browser-use lease list
328
- pibo tools browser-use lease release <lease-id>
329
- pibo tools browser-use lease reap-stale
330
- \`\`\`
331
-
332
- If a shared legacy session is already available, inspect it before navigating:
333
-
334
- \`\`\`bash
335
- browser-use --session pibo-auth state
336
- \`\`\`
337
-
338
- If \`pibo-auth\` is unavailable and must be recreated, the default wrapper behavior is enough:
339
-
340
- \`\`\`bash
341
- browser-use --headed --session pibo-auth open http://4788.192.168.0.204.sslip.io/apps/chat
342
- \`\`\`
343
-
344
- For low-level Chat Web debugging, prefer an already-open authenticated browser over launching a new profile. Start by listing CDP targets:
345
-
346
- \`\`\`bash
347
- npm run dev -- tools browser-use targets
348
- npm run dev -- tools browser-use attach-chat
349
- curl -s http://127.0.0.1:56663/json/list
350
- \`\`\`
351
-
352
- Inspect Chat Web targets and pick the one that is authenticated and has a composer textarea. \`attach-chat\` prints shell exports for the best existing authenticated Chat target. If Browser Use cannot attach cleanly or MCP resources are unavailable, use the target \`webSocketDebuggerUrl\` from \`targets\`, \`attach-chat\`, or \`/json/list\` and direct CDP \`Runtime.evaluate\`, \`Network\`, and DOM inspection.
353
-
354
- For authenticated sites, the default Pibo wrapper path is the persistent path. Use \`profile list\` only to inspect available Chrome profiles:
355
-
356
- \`\`\`bash
357
- browser-use profile list
358
- \`\`\`
359
-
360
- To intentionally use a real local Chrome user data directory instead of the Pibo-managed one, set \`PIBO_BROWSER_USE_CHROME_USER_DATA_DIR\` before starting the session.
361
-
362
- If \`browser-use --connect\` cannot find Chrome, ask the user whether they want to relaunch Chrome with remote debugging or use a managed Chromium profile.
363
-
364
- ## Tips
365
-
366
- 1. Apply \`eval "$(pibo tools env browser-use)"\` once per persistent shell before using the CLI from Pibo, then reuse that shell.
367
- 2. Always run \`state\` before using element indices.
368
- 3. Re-run \`state\` after navigation or large DOM changes because element indices can change.
369
- 4. For forms, verify inputs with \`get value <index>\`; \`state\` does not always show current text values.
370
- 5. For large pages, prefer \`get html --selector\`, \`get text <index>\`, or \`eval\` over dumping the full page with \`state\`.
371
- 6. Use \`--headed\` when debugging browser behavior if the env output includes a display.
372
- 7. Sessions persist until \`browser-use close\`.
373
- 8. Use \`--session NAME\` for separate browser sessions.
374
- 9. Wrap long waits or JavaScript-heavy mutations with an external timeout, for example \`timeout 30s browser-use --session NAME wait text "Success"\`.
375
- 10. Prefer \`--json\` for machine-readable \`get\` and \`sessions\` results.
376
- 11. \`select\` confirms the visible option text, while \`get value\` returns the underlying option value.
377
- 12. Avoid \`browser-use --version\`; this CLI does not support it.
378
- 13. Avoid \`extract\`; it is listed by the CLI but is not implemented in this version.
379
- 14. If Chrome fails to start with a "SingletonLock" error, the wrapper auto-detects and terminates stale Chrome processes holding the lock. Retry your command.
202
+ content: `---
203
+ name: browser-use
204
+ description: Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, or extract information from web pages.
205
+ allowed-tools: Bash(browser-use:*)
206
+ ---
207
+
208
+ # Browser Automation with browser-use CLI
209
+
210
+ The browser-use command provides persistent browser automation. A background daemon keeps the browser open across commands, so repeated commands are fast.
211
+
212
+ ## Prerequisites
213
+
214
+ Initialize one persistent browser-use shell by applying the Pibo tool environment once:
215
+
216
+ \`\`\`bash
217
+ eval "$(pibo tools env browser-use)"
218
+ browser-use doctor
219
+ \`\`\`
220
+
221
+ Inside the Pibo source repo, use \`eval "$(npm run --silent dev -- tools env browser-use)"\` instead. Keep running later \`browser-use\` commands in that same shell; a new shell needs the one-time initialization again. If command substitution is not available, run the env command and apply the printed exports manually. On Linux, it includes detected desktop variables such as \`DISPLAY\`, \`WAYLAND_DISPLAY\`, and \`XAUTHORITY\` when a local desktop is available.
222
+
223
+ The Pibo tool environment wraps \`browser-use\`: when a new browser daemon session is started, it starts a Pibo-managed persistent Chrome profile named \`PIBo\` with CDP and connects Browser Use to it. This avoids Browser Use's normal temporary profile copy, so sign-ins made in that profile stay on disk. Pass \`--fresh-profile\` to start a fresh temporary browser profile instead.
224
+
225
+ ## Core Workflow
226
+
227
+ 1. Navigate: \`browser-use --headed --session NAME open <url>\` when a desktop is available; otherwise use \`browser-use --session NAME open <url>\`
228
+ 2. Inspect: \`browser-use state\`
229
+ 3. Interact with indices from state: \`browser-use click 5\`, \`browser-use input 3 "text"\`
230
+ 4. Verify: \`browser-use state\`, \`browser-use get value <index>\`, \`browser-use eval "js"\`, or \`browser-use screenshot\`
231
+ 5. Repeat while the browser stays open
232
+
233
+ Run browser-mutating commands one at a time per session. Do not issue parallel \`click\`, \`input\`, \`open\`, \`eval\`, or \`screenshot\` calls against the same session.
234
+
235
+ If a command fails, run \`browser-use close\` first to clear the session, then retry.
236
+
237
+ After navigation, submit, keypress navigation, major DOM changes, or scroll on complex pages, run \`state\` again before reusing element indices.
238
+
239
+ ## Browser Modes
240
+
241
+ \`\`\`bash
242
+ browser-use --headed open <url> # Starts Pibo-managed persistent PIBo Chrome via CDP
243
+ browser-use --fresh-profile open <url> # Starts a fresh temporary browser profile
244
+ browser-use --connect open <url> # Connect to local Chrome via CDP (requires --remote-debugging-port)
245
+ browser-use --profile "Default" open <url> # Upstream profile mode; Browser Use may copy it to a temp dir
246
+ \`\`\`
247
+
248
+ ## Commands
249
+
250
+ \`\`\`bash
251
+ # Navigation
252
+ browser-use open <url>
253
+ browser-use back
254
+ browser-use scroll down
255
+ browser-use scroll up
256
+ browser-use switch <index>
257
+ browser-use close-tab [index]
258
+
259
+ # Page state
260
+ browser-use state
261
+ browser-use screenshot [path.png]
262
+ browser-use screenshot --full path.png
263
+
264
+ # Interactions
265
+ browser-use click <index>
266
+ browser-use click <x> <y>
267
+ browser-use type "text"
268
+ browser-use input <index> "text"
269
+ browser-use input <index> ""
270
+ browser-use keys "Enter"
271
+ browser-use keys "Control+a"
272
+ browser-use select <index> "option"
273
+ browser-use upload <index> <path>
274
+ browser-use hover <index>
275
+ browser-use dblclick <index>
276
+ browser-use rightclick <index>
277
+
278
+ # Data extraction
279
+ browser-use eval "js code"
280
+ browser-use get title
281
+ browser-use get html
282
+ browser-use get html --selector "h1"
283
+ browser-use get text <index>
284
+ browser-use get value <index>
285
+ browser-use get attributes <index>
286
+ browser-use get bbox <index>
287
+
288
+ # Wait
289
+ browser-use wait selector "css"
290
+ browser-use wait text "Success"
291
+
292
+ # Cookies
293
+ browser-use cookies get
294
+ browser-use cookies get --url <url>
295
+ browser-use cookies set <name> <value>
296
+ browser-use cookies clear
297
+ browser-use cookies export <file>
298
+ browser-use cookies import <file>
299
+
300
+ # Session
301
+ browser-use close
302
+ browser-use sessions
303
+ browser-use close --all
304
+ \`\`\`
305
+
306
+ ## Authenticated Browsing
307
+
308
+ For the Pibo Chat Web App, prefer an isolated authenticated lease when multiple agents may use the browser at the same time:
309
+
310
+ \`\`\`bash
311
+ eval "$(pibo tools browser-use lease acquire --app pibo-chat --holder "$USER")"
312
+ browser-use state
313
+ \`\`\`
314
+
315
+ The lease exports \`BROWSER_USE_HOME\`, \`PIBO_BROWSER_USE_SESSION\`, \`PIBO_BROWSER_USE_CHROME_USER_DATA_DIR\`, and \`PIBO_BROWSER_USE_DEFAULT_PROFILE\`. The Pibo browser-use wrapper uses \`PIBO_BROWSER_USE_SESSION\` as the default session, so later commands can omit \`--session\` in that shell.
316
+
317
+ Before acquiring leases, prepare one authenticated template profile:
318
+
319
+ \`\`\`bash
320
+ eval "$(pibo tools browser-use auth-template env)"
321
+ browser-use --headed open http://4788.192.168.0.204.sslip.io/apps/chat
322
+ \`\`\`
323
+
324
+ Sign in once in that template browser, then close it before agents acquire leases. Inspect and clean up leases with:
325
+
326
+ \`\`\`bash
327
+ pibo tools browser-use lease list
328
+ pibo tools browser-use lease release <lease-id>
329
+ pibo tools browser-use lease reap-stale
330
+ \`\`\`
331
+
332
+ If a shared legacy session is already available, inspect it before navigating:
333
+
334
+ \`\`\`bash
335
+ browser-use --session pibo-auth state
336
+ \`\`\`
337
+
338
+ If \`pibo-auth\` is unavailable and must be recreated, the default wrapper behavior is enough:
339
+
340
+ \`\`\`bash
341
+ browser-use --headed --session pibo-auth open http://4788.192.168.0.204.sslip.io/apps/chat
342
+ \`\`\`
343
+
344
+ For low-level Chat Web debugging, prefer an already-open authenticated browser over launching a new profile. Start by listing CDP targets:
345
+
346
+ \`\`\`bash
347
+ npm run dev -- tools browser-use targets
348
+ npm run dev -- tools browser-use attach-chat
349
+ curl -s http://127.0.0.1:56663/json/list
350
+ \`\`\`
351
+
352
+ Inspect Chat Web targets and pick the one that is authenticated and has a composer textarea. \`attach-chat\` prints shell exports for the best existing authenticated Chat target. If Browser Use cannot attach cleanly or MCP resources are unavailable, use the target \`webSocketDebuggerUrl\` from \`targets\`, \`attach-chat\`, or \`/json/list\` and direct CDP \`Runtime.evaluate\`, \`Network\`, and DOM inspection.
353
+
354
+ For authenticated sites, the default Pibo wrapper path is the persistent path. Use \`profile list\` only to inspect available Chrome profiles:
355
+
356
+ \`\`\`bash
357
+ browser-use profile list
358
+ \`\`\`
359
+
360
+ To intentionally use a real local Chrome user data directory instead of the Pibo-managed one, set \`PIBO_BROWSER_USE_CHROME_USER_DATA_DIR\` before starting the session.
361
+
362
+ If \`browser-use --connect\` cannot find Chrome, ask the user whether they want to relaunch Chrome with remote debugging or use a managed Chromium profile.
363
+
364
+ ## Tips
365
+
366
+ 1. Apply \`eval "$(pibo tools env browser-use)"\` once per persistent shell before using the CLI from Pibo, then reuse that shell.
367
+ 2. Always run \`state\` before using element indices.
368
+ 3. Re-run \`state\` after navigation or large DOM changes because element indices can change.
369
+ 4. For forms, verify inputs with \`get value <index>\`; \`state\` does not always show current text values.
370
+ 5. For large pages, prefer \`get html --selector\`, \`get text <index>\`, or \`eval\` over dumping the full page with \`state\`.
371
+ 6. Use \`--headed\` when debugging browser behavior if the env output includes a display.
372
+ 7. Sessions persist until \`browser-use close\`.
373
+ 8. Use \`--session NAME\` for separate browser sessions.
374
+ 9. Wrap long waits or JavaScript-heavy mutations with an external timeout, for example \`timeout 30s browser-use --session NAME wait text "Success"\`.
375
+ 10. Prefer \`--json\` for machine-readable \`get\` and \`sessions\` results.
376
+ 11. \`select\` confirms the visible option text, while \`get value\` returns the underlying option value.
377
+ 12. Avoid \`browser-use --version\`; this CLI does not support it.
378
+ 13. Avoid \`extract\`; it is listed by the CLI but is not implemented in this version.
379
+ 14. If Chrome fails to start with a "SingletonLock" error, the wrapper auto-detects and terminates stale Chrome processes holding the lock. Retry your command.
380
380
  `,
381
381
  };
382
382
  export const REMOTE_BROWSER_GUIDE = {
383
383
  name: 'remote-browser',
384
384
  description: 'Browser automation workflow for sandboxed or remote agents.',
385
- content: `---
386
- name: remote-browser
387
- description: Controls a browser from a sandboxed or remote machine. Use when the agent has no local GUI and needs to navigate websites, interact with web pages, take screenshots, or expose local dev servers via tunnels.
388
- allowed-tools: Bash(browser-use:*)
389
- ---
390
-
391
- # Browser Automation for Sandboxed Agents
392
-
393
- This guide is for agents running in a sandbox, CI, cloud VM, or remote coding environment.
394
-
395
- ## Prerequisites
396
-
397
- Initialize one persistent browser-use shell by applying the Pibo tool environment once:
398
-
399
- \`\`\`bash
400
- eval "$(pibo tools env browser-use)"
401
- browser-use doctor
402
- \`\`\`
403
-
404
- Inside the Pibo source repo, use \`eval "$(npm run --silent dev -- tools env browser-use)"\` instead. Keep running later \`browser-use\` commands in that same shell; a new shell needs the one-time initialization again. If command substitution is not available, run the env command and apply the printed exports manually. On Linux, this lets Browser Use see a local desktop session when one exists.
405
-
406
- ## Core Workflow
407
-
408
- 1. Navigate: \`browser-use --headed --session NAME open <url>\` when a desktop is available; otherwise use \`browser-use --session NAME open <url>\`
409
- 2. Inspect: \`browser-use state\`
410
- 3. Interact with indices from state: \`browser-use click 5\`, \`browser-use input 3 "text"\`
411
- 4. Verify: \`browser-use state\`, \`browser-use get value <index>\`, \`browser-use eval "js"\`, or \`browser-use screenshot\`
412
- 5. Cleanup: \`browser-use close\`
413
-
414
- Run browser-mutating commands one at a time per session. Use separate session names for parallel workflows.
415
- After navigation, submit, keypress navigation, major DOM changes, or scroll on complex pages, run \`state\` again before reusing element indices.
416
-
417
- ## Browser Modes
418
-
419
- \`\`\`bash
420
- browser-use open <url>
421
- browser-use --headed open <url>
422
- browser-use --connect open <url>
423
- browser-use --cdp-url ws://localhost:9222/devtools/browser/... open <url>
424
- \`\`\`
425
-
426
- ## Commands
427
-
428
- \`\`\`bash
429
- browser-use open <url>
430
- browser-use back
431
- browser-use state
432
- browser-use screenshot [path.png]
433
- browser-use click <index>
434
- browser-use input <index> "text"
435
- browser-use keys "Enter"
436
- browser-use wait selector "css"
437
- browser-use wait text "Success"
438
- browser-use get html
439
- browser-use eval "document.title"
440
- browser-use switch <index>
441
- browser-use close-tab [index]
442
- browser-use close
443
- \`\`\`
444
-
445
- ## Exposing Local Dev Servers
446
-
447
- \`\`\`bash
448
- browser-use tunnel <port>
449
- browser-use tunnel list
450
- browser-use open <tunnel-url>
451
- browser-use tunnel stop <port>
452
- \`\`\`
453
-
454
- Tunnels are independent from browser sessions and can persist after \`browser-use close\`.
455
-
456
- ## Multiple Sessions
457
-
458
- \`\`\`bash
459
- browser-use --session agent-a open https://example.com
460
- browser-use --session agent-b open https://example.org
461
- \`\`\`
462
-
463
- Use named sessions when multiple agents or workflows need separate browsers.
464
-
465
- ## Troubleshooting
466
-
467
- - Browser will not start: run \`browser-use close\`, then retry.
468
- - Element not found: run \`browser-use scroll down\`, then \`browser-use state\`.
469
- - Form value unclear: use \`browser-use get value <index>\`.
470
- - Large page state is noisy: use \`get html --selector\`, \`get text <index>\`, or \`eval\`.
471
- - Need to debug visually: use \`--headed\`.
472
- - Long wait hangs: wrap the command with \`timeout 30s\`.
473
- - Tunnel not working: run \`browser-use tunnel list\`.
385
+ content: `---
386
+ name: remote-browser
387
+ description: Controls a browser from a sandboxed or remote machine. Use when the agent has no local GUI and needs to navigate websites, interact with web pages, take screenshots, or expose local dev servers via tunnels.
388
+ allowed-tools: Bash(browser-use:*)
389
+ ---
390
+
391
+ # Browser Automation for Sandboxed Agents
392
+
393
+ This guide is for agents running in a sandbox, CI, cloud VM, or remote coding environment.
394
+
395
+ ## Prerequisites
396
+
397
+ Initialize one persistent browser-use shell by applying the Pibo tool environment once:
398
+
399
+ \`\`\`bash
400
+ eval "$(pibo tools env browser-use)"
401
+ browser-use doctor
402
+ \`\`\`
403
+
404
+ Inside the Pibo source repo, use \`eval "$(npm run --silent dev -- tools env browser-use)"\` instead. Keep running later \`browser-use\` commands in that same shell; a new shell needs the one-time initialization again. If command substitution is not available, run the env command and apply the printed exports manually. On Linux, this lets Browser Use see a local desktop session when one exists.
405
+
406
+ ## Core Workflow
407
+
408
+ 1. Navigate: \`browser-use --headed --session NAME open <url>\` when a desktop is available; otherwise use \`browser-use --session NAME open <url>\`
409
+ 2. Inspect: \`browser-use state\`
410
+ 3. Interact with indices from state: \`browser-use click 5\`, \`browser-use input 3 "text"\`
411
+ 4. Verify: \`browser-use state\`, \`browser-use get value <index>\`, \`browser-use eval "js"\`, or \`browser-use screenshot\`
412
+ 5. Cleanup: \`browser-use close\`
413
+
414
+ Run browser-mutating commands one at a time per session. Use separate session names for parallel workflows.
415
+ After navigation, submit, keypress navigation, major DOM changes, or scroll on complex pages, run \`state\` again before reusing element indices.
416
+
417
+ ## Browser Modes
418
+
419
+ \`\`\`bash
420
+ browser-use open <url>
421
+ browser-use --headed open <url>
422
+ browser-use --connect open <url>
423
+ browser-use --cdp-url ws://localhost:9222/devtools/browser/... open <url>
424
+ \`\`\`
425
+
426
+ ## Commands
427
+
428
+ \`\`\`bash
429
+ browser-use open <url>
430
+ browser-use back
431
+ browser-use state
432
+ browser-use screenshot [path.png]
433
+ browser-use click <index>
434
+ browser-use input <index> "text"
435
+ browser-use keys "Enter"
436
+ browser-use wait selector "css"
437
+ browser-use wait text "Success"
438
+ browser-use get html
439
+ browser-use eval "document.title"
440
+ browser-use switch <index>
441
+ browser-use close-tab [index]
442
+ browser-use close
443
+ \`\`\`
444
+
445
+ ## Exposing Local Dev Servers
446
+
447
+ \`\`\`bash
448
+ browser-use tunnel <port>
449
+ browser-use tunnel list
450
+ browser-use open <tunnel-url>
451
+ browser-use tunnel stop <port>
452
+ \`\`\`
453
+
454
+ Tunnels are independent from browser sessions and can persist after \`browser-use close\`.
455
+
456
+ ## Multiple Sessions
457
+
458
+ \`\`\`bash
459
+ browser-use --session agent-a open https://example.com
460
+ browser-use --session agent-b open https://example.org
461
+ \`\`\`
462
+
463
+ Use named sessions when multiple agents or workflows need separate browsers.
464
+
465
+ ## Troubleshooting
466
+
467
+ - Browser will not start: run \`browser-use close\`, then retry.
468
+ - Element not found: run \`browser-use scroll down\`, then \`browser-use state\`.
469
+ - Form value unclear: use \`browser-use get value <index>\`.
470
+ - Large page state is noisy: use \`get html --selector\`, \`get text <index>\`, or \`eval\`.
471
+ - Need to debug visually: use \`--headed\`.
472
+ - Long wait hangs: wrap the command with \`timeout 30s\`.
473
+ - Tunnel not working: run \`browser-use tunnel list\`.
474
474
  `,
475
475
  };