@pasko70/pibo 1.9.2 → 1.9.4

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 (120) 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 +248 -248
  8. package/dist/apps/chat/data/project-service.js +168 -168
  9. package/dist/apps/chat/data/read-state-service.js +18 -18
  10. package/dist/apps/chat/data/session-query-service.js +25 -25
  11. package/dist/apps/chat/data/timeline-query-service.js +14 -14
  12. package/dist/apps/chat/static-assets.js +854 -854
  13. package/dist/apps/chat/workflow-persistence.js +255 -255
  14. package/dist/apps/chat-ui/assets/{dist-CjYtD7ZT.js → dist-9a5adSX0.js} +1 -1
  15. package/dist/apps/chat-ui/assets/{dist-9lsp1UpA.js → dist-BJftG-mN.js} +1 -1
  16. package/dist/apps/chat-ui/assets/{dist-2KdPXbMT.js → dist-BmIDFlGO.js} +1 -1
  17. package/dist/apps/chat-ui/assets/{dist-BWbWIOcD.js → dist-CCNYUBAQ.js} +1 -1
  18. package/dist/apps/chat-ui/assets/{dist-Cge8JklW.js → dist-Cmr0ZAV7.js} +1 -1
  19. package/dist/apps/chat-ui/assets/{dist-DFhhiR8M.js → dist-Crc-B1sZ.js} +1 -1
  20. package/dist/apps/chat-ui/assets/{dist-5GM30SQK.js → dist-DHPwmWcR.js} +1 -1
  21. package/dist/apps/chat-ui/assets/{dist-C-5u2QIS.js → dist-U3lqQ0aI.js} +1 -1
  22. package/dist/apps/chat-ui/assets/{dist-Idz5kzy8.js → dist-_poCjCWK.js} +1 -1
  23. package/dist/apps/chat-ui/assets/{dist-Etxmpyxg.js → dist-ffW7mw39.js} +1 -1
  24. package/dist/apps/chat-ui/assets/{dist-BYKMZlI0.js → dist-w2d_3LSu.js} +1 -1
  25. package/dist/apps/chat-ui/assets/{index-BqD_bm7z.js → index-rXMhSu4U.js} +9 -9
  26. package/dist/apps/chat-ui/index.html +17 -17
  27. package/dist/apps/chat-ui/manifest.webmanifest +25 -25
  28. package/dist/apps/chat-ui/sw.js +47 -47
  29. package/dist/apps/chat-vscode-web/assets/index-BAMxIaI_.js +41 -0
  30. package/dist/apps/chat-vscode-web/index.html +13 -13
  31. package/dist/apps/cli-ui/cliSessionsCommand.js +23 -23
  32. package/dist/apps/context-files-ui/index.html +11 -11
  33. package/dist/cli.js +39 -39
  34. package/dist/compute/cli.js +54 -54
  35. package/dist/core/session-router.js +5 -2
  36. package/dist/cron/cli.js +15 -15
  37. package/dist/cron/store.js +49 -49
  38. package/dist/data/cli.js +23 -23
  39. package/dist/data/event-log.js +23 -23
  40. package/dist/data/message-store.js +20 -20
  41. package/dist/data/navigation-store.js +9 -9
  42. package/dist/data/observation-store.js +4 -4
  43. package/dist/data/payload-store.js +17 -17
  44. package/dist/data/schema.js +431 -431
  45. package/dist/data/session-store.js +4 -4
  46. package/dist/data/telemetry-queries.js +54 -54
  47. package/dist/data/telemetry.js +197 -197
  48. package/dist/debug/events.js +12 -12
  49. package/dist/debug/failures.js +6 -6
  50. package/dist/debug/index.js +227 -227
  51. package/dist/debug/messages.js +6 -6
  52. package/dist/debug/pty.js +124 -124
  53. package/dist/debug/session.js +29 -29
  54. package/dist/debug/tools.js +5 -5
  55. package/dist/debug/web-snapshot-browser-scripts.js +294 -294
  56. package/dist/debug/web-streaming-browser-library.js +925 -925
  57. package/dist/debug/web-streaming-browser-scripts.js +232 -232
  58. package/dist/debug/web-streaming-provider-telemetry.js +4 -4
  59. package/dist/debug/web.js +93 -93
  60. package/dist/gateway/cli.js +19 -19
  61. package/dist/mcp/config-command.js +53 -53
  62. package/dist/mcp/index.js +21 -21
  63. package/dist/mcp/registry.js +11 -11
  64. package/dist/pi-packages/cli.js +11 -11
  65. package/dist/plugins/context-files-store.js +110 -110
  66. package/dist/plugins/context-files.js +4 -4
  67. package/dist/ralph/cli.js +18 -18
  68. package/dist/ralph/templates.js +140 -140
  69. package/dist/reliability/store.js +226 -226
  70. package/dist/session-ui/sessionActivity.js +30 -0
  71. package/dist/sessions/pibo-data-store.js +16 -16
  72. package/dist/sessions/sqlite-store.js +53 -53
  73. package/dist/setup/cli.js +58 -58
  74. package/dist/signals/projector.js +26 -11
  75. package/dist/signals/registry.js +41 -0
  76. package/dist/tools/agent-browser-wrapper.js +80 -80
  77. package/dist/tools/browser-use-cdp.js +12 -12
  78. package/dist/tools/browser-use-wrapper.js +762 -762
  79. package/dist/tools/guides.js +538 -538
  80. package/dist/tools/index.js +99 -99
  81. package/dist/tools/runtime/node-worker-source.js +205 -205
  82. package/dist/tools/runtime/python-worker-source.js +177 -177
  83. package/dist/vscode/cli.js +9 -9
  84. package/dist/web-annotations/cdp.js +900 -900
  85. package/dist/web-annotations/store.js +96 -96
  86. package/docs/README.md +23 -23
  87. package/docs/ops/install-developer-host.md +112 -112
  88. package/docs/ops/install-user-host.md +96 -96
  89. package/docs/ops/upgrade-user-to-developer-host.md +69 -69
  90. package/docs/ops/vscode-extension-release.md +160 -160
  91. package/package.json +95 -95
  92. package/skills/builtin/graphify/SKILL.md +52 -52
  93. package/skills/builtin/pi-agent-harness/SKILL.md +319 -319
  94. package/skills/builtin/pi-agent-harness/agents/openai.yaml +4 -4
  95. package/skills/builtin/pibo-docker-system/SKILL.md +170 -170
  96. package/skills/builtin/pibo-spec-writing/SKILL.md +330 -330
  97. package/skills/builtin/prd/SKILL.md +143 -143
  98. package/skills/builtin/ralph-loop/SKILL.md +359 -359
  99. package/skills/builtin/ralph-prd-json/SKILL.md +123 -123
  100. package/skills/builtin/skill-creator/LICENSE.txt +201 -201
  101. package/skills/builtin/skill-creator/SKILL.md +513 -513
  102. package/skills/builtin/skill-creator/agents/analyzer.md +274 -274
  103. package/skills/builtin/skill-creator/agents/comparator.md +202 -202
  104. package/skills/builtin/skill-creator/agents/grader.md +223 -223
  105. package/skills/builtin/skill-creator/assets/eval_review.html +146 -146
  106. package/skills/builtin/skill-creator/eval-viewer/generate_review.py +471 -471
  107. package/skills/builtin/skill-creator/eval-viewer/viewer.html +1325 -1325
  108. package/skills/builtin/skill-creator/references/schemas.md +430 -430
  109. package/skills/builtin/skill-creator/scripts/aggregate_benchmark.py +401 -401
  110. package/skills/builtin/skill-creator/scripts/generate_report.py +326 -326
  111. package/skills/builtin/skill-creator/scripts/improve_description.py +247 -247
  112. package/skills/builtin/skill-creator/scripts/package_skill.py +136 -136
  113. package/skills/builtin/skill-creator/scripts/quick_validate.py +102 -102
  114. package/skills/builtin/skill-creator/scripts/run_eval.py +310 -310
  115. package/skills/builtin/skill-creator/scripts/run_loop.py +328 -328
  116. package/skills/builtin/skill-creator/scripts/utils.py +47 -47
  117. package/skills/builtin/web-annotations/SKILL.md +93 -93
  118. package/src/mcp/LICENSE.mcp-cli +21 -21
  119. package/dist/apps/chat-vscode-web/assets/index-Cst9OUkC.js +0 -41
  120. package/dist/session-ui/activeTurn.js +0 -126
@@ -1,563 +1,563 @@
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
- Runtime overrides are optional and apply to sessions created by the job:
67
-
68
- \`\`\`bash
69
- pibo ralph add \\
70
- --room "<room-id>" \\
71
- --prompt "Use a specific runtime." \\
72
- --model openai/gpt-5 \\
73
- --thinking high \\
74
- --fast \\
75
- --json
76
-
77
- pibo ralph edit <job-id> --model openai/gpt-5 --thinking medium --no-fast --json
78
- pibo ralph edit <job-id> --clear-model --clear-thinking --clear-fast --json
79
- \`\`\`
80
-
81
- Use \`--model <provider/model>\`, \`--thinking off|minimal|low|medium|high|xhigh|max\`, and \`--fast\`/\`--no-fast\` to set runtime options. Use the \`--clear-*\` flags on \`edit\` to return to profile/default runtime behavior.
82
-
83
- ## Inspect and Debug
84
-
85
- \`\`\`bash
86
- pibo ralph status --json
87
- pibo ralph list --all --json
88
- pibo ralph runs --job <job-id> --json
89
- pibo ralph policy show <job-id> --json
90
- \`\`\`
91
-
92
- Use \`runs --json\` to debug failures, session ids, completion state, and recent activity. Prefer bounded JSON output when another agent will parse it.
93
-
94
- ## Control Jobs
95
-
96
- \`\`\`bash
97
- pibo ralph stop <job-id> # finish current session, then stop
98
- pibo ralph cancel <job-id> # abort current session and stop
99
- pibo ralph edit <job-id> --prompt "Updated objective" --json
100
- pibo ralph remove <job-id>
101
- \`\`\`
102
-
103
- Prefer \`stop\` for normal shutdown and \`cancel\` only when the active run is stuck or unsafe.
104
-
105
- ## Safety
106
-
107
- 1. Do not start many Ralph jobs unless the user asked for parallel work.
108
- 2. Use templates first; avoid ad-hoc long prompts when a preset fits.
109
- 3. Inspect with \`list --json\` and \`runs --json\` before editing or canceling an unknown job.
110
- 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
+ Runtime overrides are optional and apply to sessions created by the job:
67
+
68
+ \`\`\`bash
69
+ pibo ralph add \\
70
+ --room "<room-id>" \\
71
+ --prompt "Use a specific runtime." \\
72
+ --model openai/gpt-5 \\
73
+ --thinking high \\
74
+ --fast \\
75
+ --json
76
+
77
+ pibo ralph edit <job-id> --model openai/gpt-5 --thinking medium --no-fast --json
78
+ pibo ralph edit <job-id> --clear-model --clear-thinking --clear-fast --json
79
+ \`\`\`
80
+
81
+ Use \`--model <provider/model>\`, \`--thinking off|minimal|low|medium|high|xhigh|max\`, and \`--fast\`/\`--no-fast\` to set runtime options. Use the \`--clear-*\` flags on \`edit\` to return to profile/default runtime behavior.
82
+
83
+ ## Inspect and Debug
84
+
85
+ \`\`\`bash
86
+ pibo ralph status --json
87
+ pibo ralph list --all --json
88
+ pibo ralph runs --job <job-id> --json
89
+ pibo ralph policy show <job-id> --json
90
+ \`\`\`
91
+
92
+ Use \`runs --json\` to debug failures, session ids, completion state, and recent activity. Prefer bounded JSON output when another agent will parse it.
93
+
94
+ ## Control Jobs
95
+
96
+ \`\`\`bash
97
+ pibo ralph stop <job-id> # finish current session, then stop
98
+ pibo ralph cancel <job-id> # abort current session and stop
99
+ pibo ralph edit <job-id> --prompt "Updated objective" --json
100
+ pibo ralph remove <job-id>
101
+ \`\`\`
102
+
103
+ Prefer \`stop\` for normal shutdown and \`cancel\` only when the active run is stuck or unsafe.
104
+
105
+ ## Safety
106
+
107
+ 1. Do not start many Ralph jobs unless the user asked for parallel work.
108
+ 2. Use templates first; avoid ad-hoc long prompts when a preset fits.
109
+ 3. Inspect with \`list --json\` and \`runs --json\` before editing or canceling an unknown job.
110
+ 4. If working in the source repo before install, use \`npm run --silent dev -- ralph ...\`.
111
111
  `,
112
112
  };
113
113
  export const AGENT_BROWSER_GUIDE = {
114
114
  name: 'agent-browser',
115
115
  description: 'Ref-based browser automation with the Agent Browser CLI.',
116
- content: `---
117
- name: agent-browser
118
- 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.
119
- allowed-tools: Bash(agent-browser:*)
120
- ---
121
-
122
- # Browser Automation with Agent Browser
123
-
124
- Agent Browser uses refs from interactive snapshots. Inspect first, act on refs, then inspect again after navigation or DOM changes.
125
-
126
- ## Prerequisites
127
-
128
- Initialize one shell with the Pibo tool environment:
129
-
130
- \`\`\`bash
131
- eval "$(pibo tools env agent-browser)"
132
- agent-browser doctor --offline --quick
133
- \`\`\`
134
-
135
- 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.
136
-
137
- ## Core Workflow
138
-
139
- \`\`\`bash
140
- agent-browser open <url>
141
- agent-browser snapshot -i
142
- agent-browser click @e1
143
- agent-browser fill @e2 "text"
144
- agent-browser snapshot -i
145
- agent-browser get title
146
- agent-browser close --all
147
- \`\`\`
148
-
149
- Re-run \`snapshot -i\` after navigation, submit, scroll, animation, or any DOM-changing action. Do not reuse stale refs.
150
-
151
- ## Sessions
152
-
153
- Use sessions for separate browser tasks:
154
-
155
- \`\`\`bash
156
- agent-browser --session pibo-check open https://example.com
157
- AGENT_BROWSER_SESSION=pibo-check agent-browser snapshot -i
158
- agent-browser session list
159
- \`\`\`
160
-
161
- Keep mutating commands against the same session serial. Avoid parallel \`click\`, \`fill\`, \`open\`, or \`snapshot\` calls for one session.
162
-
163
- ## State and Profiles
164
-
165
- The wrapper defaults browser-launching commands to a persistent Pibo profile:
166
-
167
- \`\`\`bash
168
- agent-browser open https://example.com
169
- \`\`\`
170
-
171
- Opt out when needed:
172
-
173
- \`\`\`bash
174
- agent-browser --fresh-profile open https://example.com
175
- agent-browser --profile /path/to/profile open https://example.com
176
- agent-browser --session-name saved-check open https://example.com
177
- \`\`\`
178
-
179
- Treat profiles, saved states, auth vaults, cookies, and headers as secrets. Do not print or copy their contents into chat.
180
-
181
- ## Authenticated Chat Web Work
182
-
183
- Prefer isolated leases when more than one agent may use authenticated Chat Web:
184
-
185
- \`\`\`bash
186
- eval "$(pibo tools agent-browser lease acquire --app pibo-chat --holder "$USER")"
187
- agent-browser open http://4788.192.168.0.204.sslip.io/apps/chat
188
- agent-browser snapshot -i
189
- \`\`\`
190
-
191
- To prepare the reusable template profile:
192
-
193
- \`\`\`bash
194
- eval "$(pibo tools agent-browser auth-template env --app pibo-chat)"
195
- agent-browser open http://4788.192.168.0.204.sslip.io/apps/chat
196
- \`\`\`
197
-
198
- Sign in once, close the browser, then acquire leases from the template.
199
-
200
- For an already-open browser, inspect CDP targets:
201
-
202
- \`\`\`bash
203
- pibo tools agent-browser targets
204
- pibo tools agent-browser attach-chat
205
- \`\`\`
206
-
207
- ## Upstream Skills
208
-
209
- Pibo keeps the full upstream skill out of default runtime context. Fetch it only when needed:
210
-
211
- \`\`\`bash
212
- agent-browser skills get core --full
213
- \`\`\`
116
+ content: `---
117
+ name: agent-browser
118
+ 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.
119
+ allowed-tools: Bash(agent-browser:*)
120
+ ---
121
+
122
+ # Browser Automation with Agent Browser
123
+
124
+ Agent Browser uses refs from interactive snapshots. Inspect first, act on refs, then inspect again after navigation or DOM changes.
125
+
126
+ ## Prerequisites
127
+
128
+ Initialize one shell with the Pibo tool environment:
129
+
130
+ \`\`\`bash
131
+ eval "$(pibo tools env agent-browser)"
132
+ agent-browser doctor --offline --quick
133
+ \`\`\`
134
+
135
+ 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.
136
+
137
+ ## Core Workflow
138
+
139
+ \`\`\`bash
140
+ agent-browser open <url>
141
+ agent-browser snapshot -i
142
+ agent-browser click @e1
143
+ agent-browser fill @e2 "text"
144
+ agent-browser snapshot -i
145
+ agent-browser get title
146
+ agent-browser close --all
147
+ \`\`\`
148
+
149
+ Re-run \`snapshot -i\` after navigation, submit, scroll, animation, or any DOM-changing action. Do not reuse stale refs.
150
+
151
+ ## Sessions
152
+
153
+ Use sessions for separate browser tasks:
154
+
155
+ \`\`\`bash
156
+ agent-browser --session pibo-check open https://example.com
157
+ AGENT_BROWSER_SESSION=pibo-check agent-browser snapshot -i
158
+ agent-browser session list
159
+ \`\`\`
160
+
161
+ Keep mutating commands against the same session serial. Avoid parallel \`click\`, \`fill\`, \`open\`, or \`snapshot\` calls for one session.
162
+
163
+ ## State and Profiles
164
+
165
+ The wrapper defaults browser-launching commands to a persistent Pibo profile:
166
+
167
+ \`\`\`bash
168
+ agent-browser open https://example.com
169
+ \`\`\`
170
+
171
+ Opt out when needed:
172
+
173
+ \`\`\`bash
174
+ agent-browser --fresh-profile open https://example.com
175
+ agent-browser --profile /path/to/profile open https://example.com
176
+ agent-browser --session-name saved-check open https://example.com
177
+ \`\`\`
178
+
179
+ Treat profiles, saved states, auth vaults, cookies, and headers as secrets. Do not print or copy their contents into chat.
180
+
181
+ ## Authenticated Chat Web Work
182
+
183
+ Prefer isolated leases when more than one agent may use authenticated Chat Web:
184
+
185
+ \`\`\`bash
186
+ eval "$(pibo tools agent-browser lease acquire --app pibo-chat --holder "$USER")"
187
+ agent-browser open http://4788.192.168.0.204.sslip.io/apps/chat
188
+ agent-browser snapshot -i
189
+ \`\`\`
190
+
191
+ To prepare the reusable template profile:
192
+
193
+ \`\`\`bash
194
+ eval "$(pibo tools agent-browser auth-template env --app pibo-chat)"
195
+ agent-browser open http://4788.192.168.0.204.sslip.io/apps/chat
196
+ \`\`\`
197
+
198
+ Sign in once, close the browser, then acquire leases from the template.
199
+
200
+ For an already-open browser, inspect CDP targets:
201
+
202
+ \`\`\`bash
203
+ pibo tools agent-browser targets
204
+ pibo tools agent-browser attach-chat
205
+ \`\`\`
206
+
207
+ ## Upstream Skills
208
+
209
+ Pibo keeps the full upstream skill out of default runtime context. Fetch it only when needed:
210
+
211
+ \`\`\`bash
212
+ agent-browser skills get core --full
213
+ \`\`\`
214
214
  `,
215
215
  };
216
216
  export const BROWSER_USE_GUIDE = {
217
217
  name: 'browser-use',
218
218
  description: 'Local browser automation with the browser-use CLI.',
219
- content: `---
220
- name: browser-use
221
- 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.
222
- allowed-tools: Bash(browser-use:*)
223
- ---
224
-
225
- # Browser Automation with browser-use CLI
226
-
227
- The browser-use command provides persistent browser automation. A background daemon keeps the browser open across commands, so repeated commands are fast.
228
-
229
- ## Prerequisites
230
-
231
- Initialize one persistent browser-use shell by applying the Pibo tool environment once:
232
-
233
- \`\`\`bash
234
- eval "$(pibo tools env browser-use)"
235
- browser-use doctor
236
- \`\`\`
237
-
238
- 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.
239
-
240
- 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.
241
-
242
- ## Core Workflow
243
-
244
- 1. Navigate: \`browser-use --headed --session NAME open <url>\` when a desktop is available; otherwise use \`browser-use --session NAME open <url>\`
245
- 2. Inspect: \`browser-use state\`
246
- 3. Interact with indices from state: \`browser-use click 5\`, \`browser-use input 3 "text"\`
247
- 4. Verify: \`browser-use state\`, \`browser-use get value <index>\`, \`browser-use eval "js"\`, or \`browser-use screenshot\`
248
- 5. Repeat while the browser stays open
249
-
250
- 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.
251
-
252
- If a command fails, run \`browser-use close\` first to clear the session, then retry.
253
-
254
- After navigation, submit, keypress navigation, major DOM changes, or scroll on complex pages, run \`state\` again before reusing element indices.
255
-
256
- ## Browser Modes
257
-
258
- \`\`\`bash
259
- browser-use --headed open <url> # Starts Pibo-managed persistent PIBo Chrome via CDP
260
- browser-use --fresh-profile open <url> # Starts a fresh temporary browser profile
261
- browser-use --connect open <url> # Connect to local Chrome via CDP (requires --remote-debugging-port)
262
- browser-use --profile "Default" open <url> # Upstream profile mode; Browser Use may copy it to a temp dir
263
- \`\`\`
264
-
265
- ## Commands
266
-
267
- \`\`\`bash
268
- # Navigation
269
- browser-use open <url>
270
- browser-use back
271
- browser-use scroll down
272
- browser-use scroll up
273
- browser-use switch <index>
274
- browser-use close-tab [index]
275
-
276
- # Page state
277
- browser-use state
278
- browser-use screenshot [path.png]
279
- browser-use screenshot --full path.png
280
-
281
- # Interactions
282
- browser-use click <index>
283
- browser-use click <x> <y>
284
- browser-use type "text"
285
- browser-use input <index> "text"
286
- browser-use input <index> ""
287
- browser-use keys "Enter"
288
- browser-use keys "Control+a"
289
- browser-use select <index> "option"
290
- browser-use upload <index> <path>
291
- browser-use hover <index>
292
- browser-use dblclick <index>
293
- browser-use rightclick <index>
294
-
295
- # Data extraction
296
- browser-use eval "js code"
297
- browser-use get title
298
- browser-use get html
299
- browser-use get html --selector "h1"
300
- browser-use get text <index>
301
- browser-use get value <index>
302
- browser-use get attributes <index>
303
- browser-use get bbox <index>
304
-
305
- # Wait
306
- browser-use wait selector "css"
307
- browser-use wait text "Success"
308
-
309
- # Cookies
310
- browser-use cookies get
311
- browser-use cookies get --url <url>
312
- browser-use cookies set <name> <value>
313
- browser-use cookies clear
314
- browser-use cookies export <file>
315
- browser-use cookies import <file>
316
-
317
- # Session
318
- browser-use close
319
- browser-use sessions
320
- browser-use close --all
321
- \`\`\`
322
-
323
- ## Authenticated Browsing
324
-
325
- For the Pibo Chat Web App, prefer an isolated authenticated lease when multiple agents may use the browser at the same time:
326
-
327
- \`\`\`bash
328
- eval "$(pibo tools browser-use lease acquire --app pibo-chat --holder "$USER")"
329
- browser-use state
330
- \`\`\`
331
-
332
- 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.
333
-
334
- Before acquiring leases, prepare one authenticated template profile:
335
-
336
- \`\`\`bash
337
- eval "$(pibo tools browser-use auth-template env)"
338
- browser-use --headed open http://4788.192.168.0.204.sslip.io/apps/chat
339
- \`\`\`
340
-
341
- Sign in once in that template browser, then close it before agents acquire leases. Inspect and clean up leases with:
342
-
343
- \`\`\`bash
344
- pibo tools browser-use lease list
345
- pibo tools browser-use lease release <lease-id>
346
- pibo tools browser-use lease reap-stale
347
- \`\`\`
348
-
349
- If a shared legacy session is already available, inspect it before navigating:
350
-
351
- \`\`\`bash
352
- browser-use --session pibo-auth state
353
- \`\`\`
354
-
355
- If \`pibo-auth\` is unavailable and must be recreated, the default wrapper behavior is enough:
356
-
357
- \`\`\`bash
358
- browser-use --headed --session pibo-auth open http://4788.192.168.0.204.sslip.io/apps/chat
359
- \`\`\`
360
-
361
- For low-level Chat Web debugging, prefer an already-open authenticated browser over launching a new profile. Start by listing CDP targets:
362
-
363
- \`\`\`bash
364
- npm run dev -- tools browser-use targets
365
- npm run dev -- tools browser-use attach-chat
366
- curl -s http://127.0.0.1:56663/json/list
367
- \`\`\`
368
-
369
- 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.
370
-
371
- For authenticated sites, the default Pibo wrapper path is the persistent path. Use \`profile list\` only to inspect available Chrome profiles:
372
-
373
- \`\`\`bash
374
- browser-use profile list
375
- \`\`\`
376
-
377
- 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.
378
-
379
- 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.
380
-
381
- ## Tips
382
-
383
- 1. Apply \`eval "$(pibo tools env browser-use)"\` once per persistent shell before using the CLI from Pibo, then reuse that shell.
384
- 2. Always run \`state\` before using element indices.
385
- 3. Re-run \`state\` after navigation or large DOM changes because element indices can change.
386
- 4. For forms, verify inputs with \`get value <index>\`; \`state\` does not always show current text values.
387
- 5. For large pages, prefer \`get html --selector\`, \`get text <index>\`, or \`eval\` over dumping the full page with \`state\`.
388
- 6. Use \`--headed\` when debugging browser behavior if the env output includes a display.
389
- 7. Sessions persist until \`browser-use close\`.
390
- 8. Use \`--session NAME\` for separate browser sessions.
391
- 9. Wrap long waits or JavaScript-heavy mutations with an external timeout, for example \`timeout 30s browser-use --session NAME wait text "Success"\`.
392
- 10. Prefer \`--json\` for machine-readable \`get\` and \`sessions\` results.
393
- 11. \`select\` confirms the visible option text, while \`get value\` returns the underlying option value.
394
- 12. Avoid \`browser-use --version\`; this CLI does not support it.
395
- 13. Avoid \`extract\`; it is listed by the CLI but is not implemented in this version.
396
- 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.
219
+ content: `---
220
+ name: browser-use
221
+ 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.
222
+ allowed-tools: Bash(browser-use:*)
223
+ ---
224
+
225
+ # Browser Automation with browser-use CLI
226
+
227
+ The browser-use command provides persistent browser automation. A background daemon keeps the browser open across commands, so repeated commands are fast.
228
+
229
+ ## Prerequisites
230
+
231
+ Initialize one persistent browser-use shell by applying the Pibo tool environment once:
232
+
233
+ \`\`\`bash
234
+ eval "$(pibo tools env browser-use)"
235
+ browser-use doctor
236
+ \`\`\`
237
+
238
+ 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.
239
+
240
+ 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.
241
+
242
+ ## Core Workflow
243
+
244
+ 1. Navigate: \`browser-use --headed --session NAME open <url>\` when a desktop is available; otherwise use \`browser-use --session NAME open <url>\`
245
+ 2. Inspect: \`browser-use state\`
246
+ 3. Interact with indices from state: \`browser-use click 5\`, \`browser-use input 3 "text"\`
247
+ 4. Verify: \`browser-use state\`, \`browser-use get value <index>\`, \`browser-use eval "js"\`, or \`browser-use screenshot\`
248
+ 5. Repeat while the browser stays open
249
+
250
+ 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.
251
+
252
+ If a command fails, run \`browser-use close\` first to clear the session, then retry.
253
+
254
+ After navigation, submit, keypress navigation, major DOM changes, or scroll on complex pages, run \`state\` again before reusing element indices.
255
+
256
+ ## Browser Modes
257
+
258
+ \`\`\`bash
259
+ browser-use --headed open <url> # Starts Pibo-managed persistent PIBo Chrome via CDP
260
+ browser-use --fresh-profile open <url> # Starts a fresh temporary browser profile
261
+ browser-use --connect open <url> # Connect to local Chrome via CDP (requires --remote-debugging-port)
262
+ browser-use --profile "Default" open <url> # Upstream profile mode; Browser Use may copy it to a temp dir
263
+ \`\`\`
264
+
265
+ ## Commands
266
+
267
+ \`\`\`bash
268
+ # Navigation
269
+ browser-use open <url>
270
+ browser-use back
271
+ browser-use scroll down
272
+ browser-use scroll up
273
+ browser-use switch <index>
274
+ browser-use close-tab [index]
275
+
276
+ # Page state
277
+ browser-use state
278
+ browser-use screenshot [path.png]
279
+ browser-use screenshot --full path.png
280
+
281
+ # Interactions
282
+ browser-use click <index>
283
+ browser-use click <x> <y>
284
+ browser-use type "text"
285
+ browser-use input <index> "text"
286
+ browser-use input <index> ""
287
+ browser-use keys "Enter"
288
+ browser-use keys "Control+a"
289
+ browser-use select <index> "option"
290
+ browser-use upload <index> <path>
291
+ browser-use hover <index>
292
+ browser-use dblclick <index>
293
+ browser-use rightclick <index>
294
+
295
+ # Data extraction
296
+ browser-use eval "js code"
297
+ browser-use get title
298
+ browser-use get html
299
+ browser-use get html --selector "h1"
300
+ browser-use get text <index>
301
+ browser-use get value <index>
302
+ browser-use get attributes <index>
303
+ browser-use get bbox <index>
304
+
305
+ # Wait
306
+ browser-use wait selector "css"
307
+ browser-use wait text "Success"
308
+
309
+ # Cookies
310
+ browser-use cookies get
311
+ browser-use cookies get --url <url>
312
+ browser-use cookies set <name> <value>
313
+ browser-use cookies clear
314
+ browser-use cookies export <file>
315
+ browser-use cookies import <file>
316
+
317
+ # Session
318
+ browser-use close
319
+ browser-use sessions
320
+ browser-use close --all
321
+ \`\`\`
322
+
323
+ ## Authenticated Browsing
324
+
325
+ For the Pibo Chat Web App, prefer an isolated authenticated lease when multiple agents may use the browser at the same time:
326
+
327
+ \`\`\`bash
328
+ eval "$(pibo tools browser-use lease acquire --app pibo-chat --holder "$USER")"
329
+ browser-use state
330
+ \`\`\`
331
+
332
+ 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.
333
+
334
+ Before acquiring leases, prepare one authenticated template profile:
335
+
336
+ \`\`\`bash
337
+ eval "$(pibo tools browser-use auth-template env)"
338
+ browser-use --headed open http://4788.192.168.0.204.sslip.io/apps/chat
339
+ \`\`\`
340
+
341
+ Sign in once in that template browser, then close it before agents acquire leases. Inspect and clean up leases with:
342
+
343
+ \`\`\`bash
344
+ pibo tools browser-use lease list
345
+ pibo tools browser-use lease release <lease-id>
346
+ pibo tools browser-use lease reap-stale
347
+ \`\`\`
348
+
349
+ If a shared legacy session is already available, inspect it before navigating:
350
+
351
+ \`\`\`bash
352
+ browser-use --session pibo-auth state
353
+ \`\`\`
354
+
355
+ If \`pibo-auth\` is unavailable and must be recreated, the default wrapper behavior is enough:
356
+
357
+ \`\`\`bash
358
+ browser-use --headed --session pibo-auth open http://4788.192.168.0.204.sslip.io/apps/chat
359
+ \`\`\`
360
+
361
+ For low-level Chat Web debugging, prefer an already-open authenticated browser over launching a new profile. Start by listing CDP targets:
362
+
363
+ \`\`\`bash
364
+ npm run dev -- tools browser-use targets
365
+ npm run dev -- tools browser-use attach-chat
366
+ curl -s http://127.0.0.1:56663/json/list
367
+ \`\`\`
368
+
369
+ 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.
370
+
371
+ For authenticated sites, the default Pibo wrapper path is the persistent path. Use \`profile list\` only to inspect available Chrome profiles:
372
+
373
+ \`\`\`bash
374
+ browser-use profile list
375
+ \`\`\`
376
+
377
+ 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.
378
+
379
+ 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.
380
+
381
+ ## Tips
382
+
383
+ 1. Apply \`eval "$(pibo tools env browser-use)"\` once per persistent shell before using the CLI from Pibo, then reuse that shell.
384
+ 2. Always run \`state\` before using element indices.
385
+ 3. Re-run \`state\` after navigation or large DOM changes because element indices can change.
386
+ 4. For forms, verify inputs with \`get value <index>\`; \`state\` does not always show current text values.
387
+ 5. For large pages, prefer \`get html --selector\`, \`get text <index>\`, or \`eval\` over dumping the full page with \`state\`.
388
+ 6. Use \`--headed\` when debugging browser behavior if the env output includes a display.
389
+ 7. Sessions persist until \`browser-use close\`.
390
+ 8. Use \`--session NAME\` for separate browser sessions.
391
+ 9. Wrap long waits or JavaScript-heavy mutations with an external timeout, for example \`timeout 30s browser-use --session NAME wait text "Success"\`.
392
+ 10. Prefer \`--json\` for machine-readable \`get\` and \`sessions\` results.
393
+ 11. \`select\` confirms the visible option text, while \`get value\` returns the underlying option value.
394
+ 12. Avoid \`browser-use --version\`; this CLI does not support it.
395
+ 13. Avoid \`extract\`; it is listed by the CLI but is not implemented in this version.
396
+ 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.
397
397
  `,
398
398
  };
399
399
  export const GRAPHIFY_GUIDE = {
400
400
  name: 'graphify',
401
401
  description: 'Generate codebase knowledge graphs with the Graphify CLI.',
402
- content: `---
403
- name: graphify
404
- description: Generates interactive codebase knowledge graphs and markdown reports from a workspace folder.
405
- allowed-tools: Bash(graphify:*)
406
- ---
407
-
408
- # Codebase Visualization with Graphify
409
-
410
- Graphify turns a folder into derived artifacts under \`graphify-out/\`:
411
-
412
- - \`graphify-out/graph.html\` — an interactive clickable graph;
413
- - \`graphify-out/graph.json\` — machine-readable graph data;
414
- - \`graphify-out/GRAPH_REPORT.md\` — a markdown summary with key concepts and suggested questions.
415
-
416
- Use it when a user asks to graph, map, visualize, or quickly understand a repo/workspace shape.
417
-
418
- ## Prerequisites
419
-
420
- Install and apply the Pibo tool environment:
421
-
422
- \`\`\`bash
423
- pibo tools install graphify
424
- eval "$(pibo tools env graphify)"
425
- graphify --help
426
- \`\`\`
427
-
428
- Inside the Pibo source repo, use \`npm run --silent dev -- tools ...\` while testing local changes:
429
-
430
- \`\`\`bash
431
- npm run --silent dev -- tools install graphify
432
- eval "$(npm run --silent dev -- tools env graphify)"
433
- \`\`\`
434
-
435
- The installer uses the PyPI package \`graphifyy\` and runs \`graphify install --platform pi\` so the CLI is ready for Pi/Pibo workflows.
436
-
437
- ## Core Workflow
438
-
439
- 1. Choose the workspace path. Prefer the active Pibo Room or session workspace boundary when known.
440
- 2. Run Graphify from that folder or pass the target path explicitly. With \`graphifyy==0.9.x\`, \`graphify .\` writes extraction output under \`graphify-out/\`.
441
- 3. For a code-only workspace without an LLM key, run \`graphify cluster-only . --no-label\` after extraction to produce the HTML graph and markdown report.
442
- 4. Put generated artifacts in an ignored room/session artifact directory when possible; do not commit them unless the user explicitly asks.
443
- 5. Read \`graphify-out/GRAPH_REPORT.md\` first, then open \`graphify-out/graph.html\` when an interactive view is useful.
444
-
445
- \`\`\`bash
446
- cd /path/to/workspace
447
- graphify .
448
- graphify cluster-only . --no-label
449
- ls graphify-out/graph.html graphify-out/graph.json graphify-out/GRAPH_REPORT.md
450
- \`\`\`
451
-
452
- ## Pibo Usage Notes
453
-
454
- - For Room-bound work, graph the Room workspace rather than the agent harness checkout unless the user asks otherwise.
455
- - If generating inside a Git repo, check \`git status --short\` before and after so graph artifacts are not accidentally included in unrelated commits.
456
- - Code-only extraction can run without an LLM API key. Including docs, README files, papers, images, or semantic-labeling steps may require a configured Graphify backend/API key; if no key is available, graph a code-only subdirectory or skip semantic labels with \`cluster-only . --no-label\`.
457
- - For large monorepos, start with a subdirectory such as \`src/\`, a code package, or a docs folder only when the needed LLM backend is configured.
458
- - Treat graph output as derived data. Recompute on demand when the branch or workspace changes.
459
-
460
- ## Next Commands
461
-
462
- \`\`\`bash
463
- pibo tools show graphify
464
- pibo tools guide graphify graphify
465
- pibo tools path graphify
466
- pibo tools doctor graphify
467
- \`\`\`
402
+ content: `---
403
+ name: graphify
404
+ description: Generates interactive codebase knowledge graphs and markdown reports from a workspace folder.
405
+ allowed-tools: Bash(graphify:*)
406
+ ---
407
+
408
+ # Codebase Visualization with Graphify
409
+
410
+ Graphify turns a folder into derived artifacts under \`graphify-out/\`:
411
+
412
+ - \`graphify-out/graph.html\` — an interactive clickable graph;
413
+ - \`graphify-out/graph.json\` — machine-readable graph data;
414
+ - \`graphify-out/GRAPH_REPORT.md\` — a markdown summary with key concepts and suggested questions.
415
+
416
+ Use it when a user asks to graph, map, visualize, or quickly understand a repo/workspace shape.
417
+
418
+ ## Prerequisites
419
+
420
+ Install and apply the Pibo tool environment:
421
+
422
+ \`\`\`bash
423
+ pibo tools install graphify
424
+ eval "$(pibo tools env graphify)"
425
+ graphify --help
426
+ \`\`\`
427
+
428
+ Inside the Pibo source repo, use \`npm run --silent dev -- tools ...\` while testing local changes:
429
+
430
+ \`\`\`bash
431
+ npm run --silent dev -- tools install graphify
432
+ eval "$(npm run --silent dev -- tools env graphify)"
433
+ \`\`\`
434
+
435
+ The installer uses the PyPI package \`graphifyy\` and runs \`graphify install --platform pi\` so the CLI is ready for Pi/Pibo workflows.
436
+
437
+ ## Core Workflow
438
+
439
+ 1. Choose the workspace path. Prefer the active Pibo Room or session workspace boundary when known.
440
+ 2. Run Graphify from that folder or pass the target path explicitly. With \`graphifyy==0.9.x\`, \`graphify .\` writes extraction output under \`graphify-out/\`.
441
+ 3. For a code-only workspace without an LLM key, run \`graphify cluster-only . --no-label\` after extraction to produce the HTML graph and markdown report.
442
+ 4. Put generated artifacts in an ignored room/session artifact directory when possible; do not commit them unless the user explicitly asks.
443
+ 5. Read \`graphify-out/GRAPH_REPORT.md\` first, then open \`graphify-out/graph.html\` when an interactive view is useful.
444
+
445
+ \`\`\`bash
446
+ cd /path/to/workspace
447
+ graphify .
448
+ graphify cluster-only . --no-label
449
+ ls graphify-out/graph.html graphify-out/graph.json graphify-out/GRAPH_REPORT.md
450
+ \`\`\`
451
+
452
+ ## Pibo Usage Notes
453
+
454
+ - For Room-bound work, graph the Room workspace rather than the agent harness checkout unless the user asks otherwise.
455
+ - If generating inside a Git repo, check \`git status --short\` before and after so graph artifacts are not accidentally included in unrelated commits.
456
+ - Code-only extraction can run without an LLM API key. Including docs, README files, papers, images, or semantic-labeling steps may require a configured Graphify backend/API key; if no key is available, graph a code-only subdirectory or skip semantic labels with \`cluster-only . --no-label\`.
457
+ - For large monorepos, start with a subdirectory such as \`src/\`, a code package, or a docs folder only when the needed LLM backend is configured.
458
+ - Treat graph output as derived data. Recompute on demand when the branch or workspace changes.
459
+
460
+ ## Next Commands
461
+
462
+ \`\`\`bash
463
+ pibo tools show graphify
464
+ pibo tools guide graphify graphify
465
+ pibo tools path graphify
466
+ pibo tools doctor graphify
467
+ \`\`\`
468
468
  `,
469
469
  };
470
470
  export const REMOTE_BROWSER_GUIDE = {
471
471
  name: 'remote-browser',
472
472
  description: 'Browser automation workflow for sandboxed or remote agents.',
473
- content: `---
474
- name: remote-browser
475
- 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.
476
- allowed-tools: Bash(browser-use:*)
477
- ---
478
-
479
- # Browser Automation for Sandboxed Agents
480
-
481
- This guide is for agents running in a sandbox, CI, cloud VM, or remote coding environment.
482
-
483
- ## Prerequisites
484
-
485
- Initialize one persistent browser-use shell by applying the Pibo tool environment once:
486
-
487
- \`\`\`bash
488
- eval "$(pibo tools env browser-use)"
489
- browser-use doctor
490
- \`\`\`
491
-
492
- 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.
493
-
494
- ## Core Workflow
495
-
496
- 1. Navigate: \`browser-use --headed --session NAME open <url>\` when a desktop is available; otherwise use \`browser-use --session NAME open <url>\`
497
- 2. Inspect: \`browser-use state\`
498
- 3. Interact with indices from state: \`browser-use click 5\`, \`browser-use input 3 "text"\`
499
- 4. Verify: \`browser-use state\`, \`browser-use get value <index>\`, \`browser-use eval "js"\`, or \`browser-use screenshot\`
500
- 5. Cleanup: \`browser-use close\`
501
-
502
- Run browser-mutating commands one at a time per session. Use separate session names for parallel workflows.
503
- After navigation, submit, keypress navigation, major DOM changes, or scroll on complex pages, run \`state\` again before reusing element indices.
504
-
505
- ## Browser Modes
506
-
507
- \`\`\`bash
508
- browser-use open <url>
509
- browser-use --headed open <url>
510
- browser-use --connect open <url>
511
- browser-use --cdp-url ws://localhost:9222/devtools/browser/... open <url>
512
- \`\`\`
513
-
514
- ## Commands
515
-
516
- \`\`\`bash
517
- browser-use open <url>
518
- browser-use back
519
- browser-use state
520
- browser-use screenshot [path.png]
521
- browser-use click <index>
522
- browser-use input <index> "text"
523
- browser-use keys "Enter"
524
- browser-use wait selector "css"
525
- browser-use wait text "Success"
526
- browser-use get html
527
- browser-use eval "document.title"
528
- browser-use switch <index>
529
- browser-use close-tab [index]
530
- browser-use close
531
- \`\`\`
532
-
533
- ## Exposing Local Dev Servers
534
-
535
- \`\`\`bash
536
- browser-use tunnel <port>
537
- browser-use tunnel list
538
- browser-use open <tunnel-url>
539
- browser-use tunnel stop <port>
540
- \`\`\`
541
-
542
- Tunnels are independent from browser sessions and can persist after \`browser-use close\`.
543
-
544
- ## Multiple Sessions
545
-
546
- \`\`\`bash
547
- browser-use --session agent-a open https://example.com
548
- browser-use --session agent-b open https://example.org
549
- \`\`\`
550
-
551
- Use named sessions when multiple agents or workflows need separate browsers.
552
-
553
- ## Troubleshooting
554
-
555
- - Browser will not start: run \`browser-use close\`, then retry.
556
- - Element not found: run \`browser-use scroll down\`, then \`browser-use state\`.
557
- - Form value unclear: use \`browser-use get value <index>\`.
558
- - Large page state is noisy: use \`get html --selector\`, \`get text <index>\`, or \`eval\`.
559
- - Need to debug visually: use \`--headed\`.
560
- - Long wait hangs: wrap the command with \`timeout 30s\`.
561
- - Tunnel not working: run \`browser-use tunnel list\`.
473
+ content: `---
474
+ name: remote-browser
475
+ 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.
476
+ allowed-tools: Bash(browser-use:*)
477
+ ---
478
+
479
+ # Browser Automation for Sandboxed Agents
480
+
481
+ This guide is for agents running in a sandbox, CI, cloud VM, or remote coding environment.
482
+
483
+ ## Prerequisites
484
+
485
+ Initialize one persistent browser-use shell by applying the Pibo tool environment once:
486
+
487
+ \`\`\`bash
488
+ eval "$(pibo tools env browser-use)"
489
+ browser-use doctor
490
+ \`\`\`
491
+
492
+ 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.
493
+
494
+ ## Core Workflow
495
+
496
+ 1. Navigate: \`browser-use --headed --session NAME open <url>\` when a desktop is available; otherwise use \`browser-use --session NAME open <url>\`
497
+ 2. Inspect: \`browser-use state\`
498
+ 3. Interact with indices from state: \`browser-use click 5\`, \`browser-use input 3 "text"\`
499
+ 4. Verify: \`browser-use state\`, \`browser-use get value <index>\`, \`browser-use eval "js"\`, or \`browser-use screenshot\`
500
+ 5. Cleanup: \`browser-use close\`
501
+
502
+ Run browser-mutating commands one at a time per session. Use separate session names for parallel workflows.
503
+ After navigation, submit, keypress navigation, major DOM changes, or scroll on complex pages, run \`state\` again before reusing element indices.
504
+
505
+ ## Browser Modes
506
+
507
+ \`\`\`bash
508
+ browser-use open <url>
509
+ browser-use --headed open <url>
510
+ browser-use --connect open <url>
511
+ browser-use --cdp-url ws://localhost:9222/devtools/browser/... open <url>
512
+ \`\`\`
513
+
514
+ ## Commands
515
+
516
+ \`\`\`bash
517
+ browser-use open <url>
518
+ browser-use back
519
+ browser-use state
520
+ browser-use screenshot [path.png]
521
+ browser-use click <index>
522
+ browser-use input <index> "text"
523
+ browser-use keys "Enter"
524
+ browser-use wait selector "css"
525
+ browser-use wait text "Success"
526
+ browser-use get html
527
+ browser-use eval "document.title"
528
+ browser-use switch <index>
529
+ browser-use close-tab [index]
530
+ browser-use close
531
+ \`\`\`
532
+
533
+ ## Exposing Local Dev Servers
534
+
535
+ \`\`\`bash
536
+ browser-use tunnel <port>
537
+ browser-use tunnel list
538
+ browser-use open <tunnel-url>
539
+ browser-use tunnel stop <port>
540
+ \`\`\`
541
+
542
+ Tunnels are independent from browser sessions and can persist after \`browser-use close\`.
543
+
544
+ ## Multiple Sessions
545
+
546
+ \`\`\`bash
547
+ browser-use --session agent-a open https://example.com
548
+ browser-use --session agent-b open https://example.org
549
+ \`\`\`
550
+
551
+ Use named sessions when multiple agents or workflows need separate browsers.
552
+
553
+ ## Troubleshooting
554
+
555
+ - Browser will not start: run \`browser-use close\`, then retry.
556
+ - Element not found: run \`browser-use scroll down\`, then \`browser-use state\`.
557
+ - Form value unclear: use \`browser-use get value <index>\`.
558
+ - Large page state is noisy: use \`get html --selector\`, \`get text <index>\`, or \`eval\`.
559
+ - Need to debug visually: use \`--headed\`.
560
+ - Long wait hangs: wrap the command with \`timeout 30s\`.
561
+ - Tunnel not working: run \`browser-use tunnel list\`.
562
562
  `,
563
563
  };