oh-my-opencode 5.0.0-beta.62 → 5.0.0-beta.63

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 (213) hide show
  1. package/THIRD-PARTY-NOTICES.md +8 -6
  2. package/dist/cli/doctor/checks/browser-provider.d.ts +2 -0
  3. package/dist/cli/index.js +64 -35
  4. package/dist/cli-node/index.js +64 -35
  5. package/dist/config/schema/agent-names.d.ts +0 -1
  6. package/dist/config/schema/browser-automation.d.ts +0 -2
  7. package/dist/config/schema/oh-my-opencode-config.d.ts +0 -1
  8. package/dist/hooks/comment-checker/__fixtures__/download-probe.fixture.d.ts +1 -0
  9. package/dist/index.js +61 -535
  10. package/dist/oh-my-opencode.schema.json +0 -1
  11. package/dist/skills/ast-grep/SKILL.md +12 -0
  12. package/dist/skills/debugging/references/tools/playwright-cli.md +79 -161
  13. package/dist/skills/frontend/SKILL.md +1 -1
  14. package/dist/skills/frontend/references/design/aside.md +1 -1
  15. package/dist/skills/frontend/references/design/clone-from-url.md +1 -1
  16. package/dist/skills/frontend/scripts/perfection/lighthouse-audit.py +2 -2
  17. package/dist/skills/review-work/SKILL.md +1 -1
  18. package/dist/skills/ultimate-browsing/ATTRIBUTION.md +1 -82
  19. package/dist/skills/ultimate-browsing/SKILL.md +17 -29
  20. package/dist/skills/ultimate-browsing/engine/AGENTS.md +2 -1
  21. package/dist/skills/ultimate-browsing/engine/templates/package.json +2 -2
  22. package/dist/skills/ultimate-browsing/engine/templates/playwright_mobile_chrome.js +5 -2
  23. package/dist/skills/ultimate-browsing/engine/templates/playwright_real_chrome.js +8 -6
  24. package/dist/skills/ultimate-browsing/engine/tests/test_playwright_stealth.py +86 -0
  25. package/dist/skills/ultimate-browsing/engine/tests/test_playwright_templates.py +4 -7
  26. package/dist/skills/ultimate-browsing/references/chrome-stealth.md +86 -100
  27. package/dist/skills/ultimate-browsing/references/insane-search/README.md +9 -3
  28. package/dist/skills/ultimate-browsing/references/insane-search/playwright.md +16 -13
  29. package/dist/skills/ultimate-browsing/scripts/extract_cookies.py +3 -3
  30. package/dist/skills/ulw-execute/SKILL.md +1 -1
  31. package/dist/skills/ulw-plan/scripts/scaffold-plan.mjs +1 -1
  32. package/dist/skills/ulw-research/SKILL.md +3 -3
  33. package/dist/skills/visual-qa/AGENTS.md +1 -1
  34. package/dist/skills/visual-qa/SKILL.md +1 -1
  35. package/dist/skills/visual-qa/references/browser-setup.md +75 -0
  36. package/dist/tui.js +12 -5
  37. package/package.json +16 -23
  38. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  39. package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +2 -0
  40. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  41. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  42. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  43. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  44. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  45. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  46. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  47. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  48. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +2 -2
  49. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  50. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  51. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  52. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  53. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  54. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  55. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  56. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  57. package/packages/omo-codex/plugin/components/ultrawork/agents/plan.toml +2 -2
  58. package/packages/omo-codex/plugin/components/ultrawork/dist/cli.js +5 -4
  59. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  60. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  61. package/packages/omo-codex/plugin/components/ultrawork/src/directive-content.ts +1 -1
  62. package/packages/omo-codex/plugin/components/ulw-execute-continuation/directive.md +1 -1
  63. package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +1 -1
  64. package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
  65. package/packages/omo-codex/plugin/components/ulw-loop/CHANGELOG.md +13 -0
  66. package/packages/omo-codex/plugin/components/ulw-loop/directive.md +5 -4
  67. package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint.js +5 -4
  68. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +582 -322
  69. package/packages/omo-codex/plugin/components/ulw-loop/dist/domain-types.d.ts +5 -0
  70. package/packages/omo-codex/plugin/components/ulw-loop/dist/evidence.js +16 -12
  71. package/packages/omo-codex/plugin/components/ulw-loop/dist/ledger.d.ts +4 -0
  72. package/packages/omo-codex/plugin/components/ulw-loop/dist/ledger.js +34 -0
  73. package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-commit.d.ts +19 -0
  74. package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-commit.js +107 -0
  75. package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.d.ts +2 -1
  76. package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.js +48 -22
  77. package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.d.ts +9 -7
  78. package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.js +105 -114
  79. package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-log.d.ts +15 -0
  80. package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-log.js +86 -0
  81. package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-missing-recovery.d.ts +5 -1
  82. package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-missing-recovery.js +15 -3
  83. package/packages/omo-codex/plugin/components/ulw-loop/dist/review-blockers.js +3 -4
  84. package/packages/omo-codex/plugin/components/ulw-loop/dist/sdk/factory.js +12 -5
  85. package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-budget-io.d.ts +5 -0
  86. package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-budget-io.js +67 -0
  87. package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-guard.js +8 -62
  88. package/packages/omo-codex/plugin/components/ulw-loop/dist/state-lock.d.ts +11 -1
  89. package/packages/omo-codex/plugin/components/ulw-loop/dist/state-lock.js +120 -88
  90. package/packages/omo-codex/plugin/components/ulw-loop/dist/status-next-actions.d.ts +3 -2
  91. package/packages/omo-codex/plugin/components/ulw-loop/dist/status-next-actions.js +18 -10
  92. package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-batch.js +4 -4
  93. package/packages/omo-codex/plugin/components/ulw-loop/dist/steering.js +5 -5
  94. package/packages/omo-codex/plugin/components/ulw-loop/dist/stop-resume-hook.js +8 -17
  95. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +5 -5
  96. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  97. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +2 -2
  98. package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint.ts +5 -4
  99. package/packages/omo-codex/plugin/components/ulw-loop/src/domain-types.ts +5 -0
  100. package/packages/omo-codex/plugin/components/ulw-loop/src/evidence.ts +16 -16
  101. package/packages/omo-codex/plugin/components/ulw-loop/src/ledger.ts +33 -0
  102. package/packages/omo-codex/plugin/components/ulw-loop/src/plan-commit.ts +124 -0
  103. package/packages/omo-codex/plugin/components/ulw-loop/src/plan-crud.ts +58 -51
  104. package/packages/omo-codex/plugin/components/ulw-loop/src/plan-io.ts +126 -140
  105. package/packages/omo-codex/plugin/components/ulw-loop/src/plan-log.ts +84 -0
  106. package/packages/omo-codex/plugin/components/ulw-loop/src/plan-missing-recovery.ts +26 -3
  107. package/packages/omo-codex/plugin/components/ulw-loop/src/review-blockers.ts +3 -3
  108. package/packages/omo-codex/plugin/components/ulw-loop/src/sdk/factory.ts +30 -5
  109. package/packages/omo-codex/plugin/components/ulw-loop/src/spawn-budget-io.ts +59 -0
  110. package/packages/omo-codex/plugin/components/ulw-loop/src/spawn-guard.ts +8 -59
  111. package/packages/omo-codex/plugin/components/ulw-loop/src/state-lock.ts +129 -111
  112. package/packages/omo-codex/plugin/components/ulw-loop/src/status-next-actions.ts +19 -10
  113. package/packages/omo-codex/plugin/components/ulw-loop/src/steering-batch.ts +4 -4
  114. package/packages/omo-codex/plugin/components/ulw-loop/src/steering.ts +5 -4
  115. package/packages/omo-codex/plugin/components/ulw-loop/src/stop-resume-hook.ts +8 -16
  116. package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/barrier.ts +13 -0
  117. package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/commit-child.ts +65 -0
  118. package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/commit-cli-qa.mjs +76 -0
  119. package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/commit-crash.ts +23 -0
  120. package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/commit-mutations.mjs +58 -0
  121. package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/commit-writer.ts +65 -0
  122. package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/lease-clock.ts +23 -0
  123. package/packages/omo-codex/plugin/components/ulw-loop/test/plan-commit-log.test.ts +252 -0
  124. package/packages/omo-codex/plugin/components/ulw-loop/test/plan-commit-recovery.test.ts +190 -0
  125. package/packages/omo-codex/plugin/components/ulw-loop/test/plan-io.test.ts +50 -35
  126. package/packages/omo-codex/plugin/components/ulw-loop/test/plan-log-newest.test.ts +72 -0
  127. package/packages/omo-codex/plugin/components/ulw-loop/test/sdk-completed-plan.test.ts +43 -0
  128. package/packages/omo-codex/plugin/components/ulw-loop/test/sdk-session-context.test.ts +21 -0
  129. package/packages/omo-codex/plugin/components/ulw-loop/test/state-lock.test.ts +92 -0
  130. package/packages/omo-codex/plugin/components/ulw-loop/test/status-next-actions-surface.test.ts +133 -0
  131. package/packages/omo-codex/plugin/components/ulw-loop/test/steering-batch.test.ts +12 -12
  132. package/packages/omo-codex/plugin/components/ulw-loop/test/steering.test.ts +4 -1
  133. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  134. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  135. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  136. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  137. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  138. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  139. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  140. package/packages/omo-codex/plugin/hooks/post-tool-use-recording-spawn-admission.json +1 -1
  141. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  142. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  143. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  144. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  145. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  146. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  147. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  148. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
  149. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  150. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  151. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  152. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  153. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  154. package/packages/omo-codex/plugin/package-lock.json +12 -12
  155. package/packages/omo-codex/plugin/package.json +1 -1
  156. package/packages/omo-codex/plugin/scripts/sync-skills.d.mts +4 -0
  157. package/packages/omo-codex/plugin/scripts/sync-skills.mjs +15 -7
  158. package/packages/omo-codex/plugin/skills/ast-grep/SKILL.md +12 -0
  159. package/packages/omo-codex/plugin/skills/debugging/references/tools/playwright-cli.md +79 -161
  160. package/packages/omo-codex/plugin/skills/frontend/SKILL.md +1 -1
  161. package/packages/omo-codex/plugin/skills/frontend/references/design/aside.md +1 -1
  162. package/packages/omo-codex/plugin/skills/frontend/references/design/clone-from-url.md +1 -1
  163. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/lighthouse-audit.py +2 -2
  164. package/packages/omo-codex/plugin/skills/review-work/SKILL.md +1 -1
  165. package/packages/omo-codex/plugin/skills/ultimate-browsing/ATTRIBUTION.md +1 -82
  166. package/packages/omo-codex/plugin/skills/ultimate-browsing/SKILL.md +17 -29
  167. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/AGENTS.md +2 -1
  168. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/templates/package.json +2 -2
  169. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/templates/playwright_mobile_chrome.js +5 -2
  170. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/templates/playwright_real_chrome.js +8 -6
  171. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/test_playwright_stealth.py +86 -0
  172. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/test_playwright_templates.py +4 -7
  173. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/chrome-stealth.md +86 -100
  174. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/README.md +9 -3
  175. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/playwright.md +16 -13
  176. package/packages/omo-codex/plugin/skills/ultimate-browsing/scripts/extract_cookies.py +3 -3
  177. package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +5 -4
  178. package/packages/omo-codex/plugin/skills/ulw-execute/SKILL.md +1 -1
  179. package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +2 -2
  180. package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +3 -3
  181. package/packages/omo-codex/plugin/skills/visual-qa/AGENTS.md +1 -1
  182. package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +1 -1
  183. package/packages/omo-codex/plugin/skills/visual-qa/references/browser-setup.md +75 -0
  184. package/packages/omo-codex/scripts/install-dist/install-local.mjs +4 -2
  185. package/packages/prompts-core/prompts/ultrawork/codex.md +5 -4
  186. package/packages/shared-skills/skills/ast-grep/SKILL.md +12 -0
  187. package/packages/shared-skills/skills/debugging/references/tools/playwright-cli.md +79 -161
  188. package/packages/shared-skills/skills/frontend/SKILL.md +1 -1
  189. package/packages/shared-skills/skills/frontend/references/design/aside.md +1 -1
  190. package/packages/shared-skills/skills/frontend/references/design/clone-from-url.md +1 -1
  191. package/packages/shared-skills/skills/frontend/scripts/perfection/lighthouse-audit.py +2 -2
  192. package/packages/shared-skills/skills/review-work/SKILL.md +1 -1
  193. package/packages/shared-skills/skills/ultimate-browsing/ATTRIBUTION.md +1 -82
  194. package/packages/shared-skills/skills/ultimate-browsing/SKILL.md +17 -29
  195. package/packages/shared-skills/skills/ultimate-browsing/engine/AGENTS.md +2 -1
  196. package/packages/shared-skills/skills/ultimate-browsing/engine/templates/package.json +2 -2
  197. package/packages/shared-skills/skills/ultimate-browsing/engine/templates/playwright_mobile_chrome.js +5 -2
  198. package/packages/shared-skills/skills/ultimate-browsing/engine/templates/playwright_real_chrome.js +8 -6
  199. package/packages/shared-skills/skills/ultimate-browsing/engine/tests/test_playwright_stealth.py +86 -0
  200. package/packages/shared-skills/skills/ultimate-browsing/engine/tests/test_playwright_templates.py +4 -7
  201. package/packages/shared-skills/skills/ultimate-browsing/references/chrome-stealth.md +86 -100
  202. package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/README.md +9 -3
  203. package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/playwright.md +16 -13
  204. package/packages/shared-skills/skills/ultimate-browsing/scripts/extract_cookies.py +3 -3
  205. package/packages/shared-skills/skills/ulw-execute/SKILL.md +1 -1
  206. package/packages/shared-skills/skills/ulw-plan/scripts/scaffold-plan.mjs +1 -1
  207. package/packages/shared-skills/skills/ulw-research/SKILL.md +3 -3
  208. package/packages/shared-skills/skills/visual-qa/AGENTS.md +1 -1
  209. package/packages/shared-skills/skills/visual-qa/SKILL.md +1 -1
  210. package/packages/shared-skills/skills/visual-qa/references/browser-setup.md +75 -0
  211. package/dist/skills/visual-qa/references/agent-browser-setup.md +0 -45
  212. package/packages/omo-codex/plugin/skills/visual-qa/references/agent-browser-setup.md +0 -45
  213. package/packages/shared-skills/skills/visual-qa/references/agent-browser-setup.md +0 -45
@@ -1,127 +1,113 @@
1
- # Tier 2 — Chrome stealth (CloakBrowser + agent-browser)
1
+ # Tier 2 — Chrome stealth through playwright-core scripts
2
2
 
3
- Real interaction (clicks, forms, screenshots, video, persistent login) for pages that defeat Tier 1/1.5. Two runtime tools, both installed on demand — neither is vendored in this skill:
4
-
5
- - **CloakBrowser** (`pip`) — stealth Chromium with source-level C++ fingerprint patches. The Python wrapper source is MIT; the downloaded Chromium binary is covered by CloakBrowser's separate binary license and is not redistributed by this package. Passes Cloudflare Turnstile, FingerprintJS, BrowserScan, and 30+ detectors. Pin **0.5.7**.
6
- - **agent-browser** (`npm`, Apache-2.0) — native CDP automation CLI that drives CloakBrowser. AX-tree snapshots, `@eN` refs, click/fill/type/scroll, screenshots, video, cookie/state/session management. Pin **0.34.0**.
7
-
8
- ```
9
- CloakBrowser (stealth Chromium) <- CDP port 9242 -> agent-browser CLI
10
- - 57 C++ fingerprint patches - AX-tree snapshots, @eN refs
11
- - Canvas/WebGL consistency - click / fill / type / scroll
12
- - navigator.webdriver = false at C++ source - screenshot, video record
13
- - Humanize mode (mouse curves, timing) - cookie / state / session mgmt
14
- ```
3
+ For real-Chrome semantics, stealth, traces, or authenticated sessions, WRITE a
4
+ script and run it from the js-eval kernel. Use installed local Chrome, not a
5
+ managed browser download. Ordinary macOS captures on a Bun >= 1.4 kernel use
6
+ `new Bun.WebView()`; Linux/Windows WebView needs installed Chrome/Chromium/Edge.
7
+ Codex's ordinary browser surface is `browser:control-in-app-browser`.
15
8
 
16
9
  ## Install (one-time)
17
10
 
18
- CloakBrowser runs in a dedicated Python venv. Cross-platform: macOS, Linux, and Windows all supported by both tools (use the venv path convention for your OS).
19
-
20
- The venv lives at a fixed path so every session reuses one stealth-Chromium download instead of creating a new venv per working directory, and every command below calls its interpreter by absolute path — no `activate` step to forget.
21
-
22
- ```bash
23
- # CloakBrowser (MIT wrapper source; separate binary license, pin 0.5.7):
24
- VENV="$HOME/.agents/cloak-venv" # Windows: %USERPROFILE%\.agents\cloak-venv
25
- uv venv "$VENV" --python 3.13
26
- uv pip install --python "$VENV/bin/python" "cloakbrowser==0.5.7"
27
- "$VENV/bin/python" -c "import cloakbrowser; cloakbrowser.ensure_binary()" # downloads stealth Chromium on first import
11
+ Only the user installs these script dependencies, once in the skill's engine
12
+ directory. Stealth plugins run inside scripts, never inside WebView:
28
13
 
29
- # agent-browser (Apache-2.0, pin 0.34.0):
30
- bun add -g agent-browser@0.34.0 && agent-browser install
31
- agent-browser --version # 0.34.0
14
+ ```sh
15
+ cd "$SKILL_DIR/engine"
16
+ test -f package.json || cp templates/package.json package.json
17
+ bun add playwright-core@1.62.1 playwright-extra@4.3.6 puppeteer-extra-plugin-stealth@2.11.2
32
18
  ```
33
19
 
34
- Verify CloakBrowser:
35
-
36
- ```bash
37
- "$VENV/bin/python" -c "import cloakbrowser; print(cloakbrowser.__version__, cloakbrowser.CHROMIUM_VERSION, cloakbrowser.binary_info()['installed'])"
38
- # -> 0.5.7 <chromium-version> True
39
- ```
20
+ Chrome must already be installed. The bundled `templates/playwright_real_chrome.js`
21
+ and `templates/playwright_mobile_chrome.js` resolve these dependencies from their
22
+ parent engine directory. Without optional plugins, templates report the fallback
23
+ and use plain `playwright-core`; do not call that fallback stealth.
40
24
 
41
25
  ## Launch + drive
42
26
 
43
- NEVER clear cookies, cache, or site data (`Network.clearBrowserCookies`, `Storage.clearCookies`, `chrome.browsingData.remove`, "clear browsing data") on the user's real/main browser profile — it wipes their logged-in state everywhere. If you need that profile's login state, clone it first (`rsync -a <profile>/ <tmp-clone>/`) and launch with the clone as the user-data-dir; run any clearing on the clone only.
44
-
45
- ```bash
46
- # 1. Launch CloakBrowser with CDP on :9242 (background). cloakbrowser lives only in the venv,
47
- # so call its interpreter by absolute path — this works in any shell, activated or not:
48
- "$HOME/.agents/cloak-venv/bin/python" -c "import asyncio,cloakbrowser; asyncio.run(cloakbrowser.launch_async(headless=False, stealth_args=True, args=['--remote-debugging-port=9242']))" &
49
-
50
- # 2. CloakBrowser launches tabless -> agent-browser would say "No page found".
51
- # Open the first tab via CDP before any agent-browser command:
52
- curl -s -X PUT "http://127.0.0.1:9242/json/new?https://example.com"
53
-
54
- # 3. Connect agent-browser. CloakBrowser already patches navigator.webdriver=false at the
55
- # C++ source, so NO --init-script is required — only --user-agent to hide HeadlessChrome:
56
- agent-browser --cdp 9242 \
57
- --user-agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.7680.177 Safari/537.36" \
58
- open https://example.com
59
-
60
- # 4. Interact:
61
- agent-browser --cdp 9242 snapshot -i # interactive elements (@eN refs)
62
- agent-browser --cdp 9242 click @e3
63
- agent-browser --cdp 9242 screenshot out.png
64
-
65
- # 5. Close when done:
66
- agent-browser --cdp 9242 close
27
+ Close the source browser before cloning its user-data directory for a consistent
28
+ copy. Preserve its `Local State` alongside the selected profile. Use a private,
29
+ task-owned clone, never the live user-data-dir. NEVER clear the live profile's
30
+ cookies, cache, or site data. For unauthenticated QA, use a fresh task-owned profile.
31
+
32
+ Write `capture.cjs` in the engine directory. `clonePath`, URL, and output path are
33
+ arguments owned by this QA run; keep cookie values out of argv and logs:
34
+
35
+ ```js
36
+ const { chromium: core } = require('playwright-core');
37
+ const { addExtra } = require('playwright-extra');
38
+ const stealth = require('puppeteer-extra-plugin-stealth');
39
+ const [clonePath, url, pngPath] = process.argv.slice(2);
40
+ const chromium = addExtra(core);
41
+ chromium.use(stealth());
42
+
43
+ async function capture() {
44
+ const context = await chromium.launchPersistentContext(clonePath, {
45
+ channel: 'chrome',
46
+ headless: true,
47
+ args: ['--disable-blink-features=AutomationControlled'],
48
+ ignoreDefaultArgs: ['--enable-automation'],
49
+ viewport: { width: 1280, height: 720 },
50
+ });
51
+ try {
52
+ const page = await context.newPage();
53
+ await page.goto(url, { waitUntil: 'load', timeout: 30000 });
54
+ await page.screenshot({ path: pngPath });
55
+ console.log(JSON.stringify({ pngPath, webdriver: await page.evaluate(() => navigator.webdriver) }));
56
+ } finally {
57
+ await context.close();
58
+ }
59
+ }
60
+ capture().catch((error) => { console.error(error); process.exitCode = 1; });
67
61
  ```
68
62
 
69
- agent-browser ships its own always-version-matched usage guide — load it instead of guessing flags:
63
+ Run the script from js eval with a bounded process lifetime:
70
64
 
71
- ```bash
72
- agent-browser skills get core # core workflows, patterns, troubleshooting
73
- agent-browser skills get core --full # + full command reference and templates
74
- agent-browser skills get electron # Electron apps (VS Code, Slack, Discord, Figma, ...)
75
- agent-browser skills list # everything available on the installed version
65
+ ```js
66
+ const { promisify } = await import('node:util')
67
+ const { execFile } = await import('node:child_process')
68
+ const result = await promisify(execFile)('node', [scriptPath, clonePath, url, pngPath], { timeout: 45000 })
69
+ console.log(result.stdout)
76
70
  ```
77
71
 
78
- ## Verify stealth
79
-
80
- ```bash
81
- agent-browser --cdp 9242 eval 'navigator.webdriver' # must print false
82
- ```
72
+ For extraction, run a bundled template the same way, supplying its JSON input on
73
+ stdin (`url`, `profileDir: clonePath`, `waitSelector`, `headless`). The template
74
+ returns HTML on stdout. For traces, use `context.tracing.start()` before navigation
75
+ and `context.tracing.stop({ path: tracePath })` before closing. Use `headless: false`
76
+ only with an available display when headed behavior is the criterion.
83
77
 
84
- Verified 2026-07 with CloakBrowser 0.5.7 + agent-browser 0.34.0: `navigator.webdriver` reads the boolean false with no init-script, bot.sannysoft.com all-green, browserscan.net "Normal" (15/15), nowsecure.nl Turnstile bypassed.
78
+ ## Verify stealth
85
79
 
86
- > **agent-browser 0.33.x behavior note:** the daemon now defaults to a 1-hour idle timeout (saves restore state, closes the browser, exits after 1 h of no commands). Set `AGENT_BROWSER_IDLE_TIMEOUT_MS=0` to restore the old always-persist behavior. External WebSocket stream consumers see latest-wins frame delivery; `record` (CDP) and the dashboard are unaffected.
80
+ Inspect the page, screenshot, and requested content. `navigator.webdriver === false`
81
+ checks one browser property, NOT a promise to pass a detector or challenge.
82
+ Persistent challenge pages or missing content are failures, even if the script
83
+ exits zero. Do not keep retrying or silently swap browser tooling.
87
84
 
88
85
  ## Cookie login (cross-platform)
89
86
 
90
- `scripts/extract_cookies.py` reads cookies from a local browser profile and optionally injects them into the running CDP session. Profile-path resolution and value decryption are per-OS:
87
+ `scripts/extract_cookies.py` exports local-browser cookies with owner-only `0600`
88
+ permissions. Keep exports private and never commit them. For a persistent context,
89
+ load the exported cookies with `context.addCookies(...)`, then navigate/reload.
90
+ Browser- or device-bound login tokens may not transfer to a clone.
91
91
 
92
- | OS | Profile location | Cookie value decryption |
93
- |----|------------------|--------------------------|
94
- | macOS | `~/Library/Application Support/<app>/` | Keychain (AES-128-CBC, PBKDF2 salt `saltysalt`) |
95
- | Linux | `~/.config/<app>/` (Chromium), `~/.mozilla/firefox/` (Firefox) | libsecret/SecretService, then PBKDF2 + AES-128-CBC |
96
- | Windows | `%LOCALAPPDATA%\<app>\User Data\` | DPAPI (`CryptUnprotectData`) + AES-256-GCM (`os_crypt` key) |
97
-
98
- ```bash
99
- # Extract to a file:
100
- mkdir -p ~/.local/state/omo-cookies
101
- python3 ../scripts/extract_cookies.py --browser chrome --domain youtube.com --output ~/.local/state/omo-cookies/youtube.cookies.json
102
- # Extract and inject into the running CDP session:
103
- python3 ../scripts/extract_cookies.py --browser chrome --domain youtube.com --inject --cdp 9242
104
- ```
105
-
106
- Cookie export files are written with owner-only `0600` permissions. Do not place live auth cookies in shared temp directories or commit them to a repo. Cookie injection sends values to CDP over stdin rather than argv, so live cookie values do not appear in process listings. Cookies apply on next navigation — reload after injecting. Google services use fingerprint-bound tokens (SIDTS) that may not transfer across browser profiles. Firefox-family profiles store cookies unencrypted; Chromium-family profiles trigger a one-time OS-keyring prompt on macOS/Linux.
92
+ The helper's `--inject --cdp <port>` targets a task-owned local Chrome CDP endpoint,
93
+ which a script can also use via `chromium.connectOverCDP(...)`. Expose CDP on
94
+ loopback only, never against the live profile. Values travel on stdin, not argv.
107
95
 
108
96
  ## Anti-patterns
109
97
 
110
- - Do NOT launch CloakBrowser for plain text extraction — use Tier 1.
111
- - Do NOT pass an `--init-script` for the webdriver flag — CloakBrowser already patches it at source; the only required override is `--user-agent`.
112
- - Do NOT run agent-browser before creating the first tab via `curl -X PUT .../json/new` — CloakBrowser launches tabless.
113
- - Do NOT use vanilla Chrome when stealth is needed — always CloakBrowser.
114
- - Do NOT forget to `close` the session when done.
115
- - Do NOT inject cookies without reloading the page.
98
+ - Plain text extraction does not need a stealth browser: use the extraction lane.
99
+ - Never launch against, clear, or delete the user's live profile.
100
+ - Never claim stealth from successful startup alone; validate rendered content.
101
+ - Never run plugins without explicit user-installed script dependencies.
116
102
 
117
103
  ## Troubleshooting
118
104
 
119
- ```bash
120
- # Port 9242 already in use (macOS/Linux):
121
- lsof -ti:9242 | xargs kill -9
122
- # agent-browser can't connect:
123
- curl -s http://127.0.0.1:9242/json/version | head -5 # empty -> CloakBrowser not running
124
- # Update either tool:
125
- uv pip install --python "$HOME/.agents/cloak-venv/bin/python" --upgrade "cloakbrowser==0.5.7" && "$HOME/.agents/cloak-venv/bin/python" -c "import cloakbrowser; cloakbrowser.ensure_binary()"
126
- bun add -g agent-browser@0.34.0
127
- ```
105
+ A missing Chrome executable is a prerequisite failure: report it, do not download
106
+ a replacement. Missing plugins require the one-time setup above; module errors
107
+ inside installed plugins are real failures, not optional-dependency misses.
108
+ A locked profile usually means the source was not cloned or another run owns the
109
+ clone. Use a new task-owned clone instead of killing unrelated browsers.
110
+
111
+ Always close contexts in `finally`, stop the fixture server, and remove only this
112
+ run's clone and temporary scripts. Preserve requested PNG/trace evidence and record
113
+ the cleanup receipt, including failures.
@@ -223,11 +223,17 @@ result = fetch(
223
223
  python3 -c "import curl_cffi, bs4, yaml" 2>/dev/null || pip install curl_cffi beautifulsoup4 pyyaml -q
224
224
  ```
225
225
 
226
- Playwright 로컬 경로 사용 시 Node가 필요:
226
+ 브라우저를 직접 제어할 때는 js eval에서 Bun >= 1.4의 `new Bun.WebView()`를
227
+ 사용한다(macOS 기본; Linux/Windows는 설치된 Chrome/Chromium/Edge 필요).
228
+ 그 외 또는 Chrome 동작·stealth·trace·인증이 필요하면 `playwright-core` 스크립트를
229
+ 작성해 js eval에서 로컬 Chrome(`channel: "chrome"`)으로 실행한다.
230
+ 사용자가 엔진 디렉터리에서 한 번 설치할 스크립트 의존성:
227
231
  ```bash
228
- npm i -g playwright playwright-extra puppeteer-extra-plugin-stealth
229
- npx playwright install chrome
232
+ cd "$SKILL_DIR/engine"
233
+ test -f package.json || cp templates/package.json package.json
234
+ bun add playwright-core@1.62.1 playwright-extra@4.3.6 puppeteer-extra-plugin-stealth@2.11.2
230
235
  ```
236
+ Chrome은 이미 설치되어 있어야 한다. 인증 프로필은 먼저 복제하고 복제본만 사용한다.
231
237
 
232
238
  ## 빠른 참조 — Phase 0 명령어
233
239
 
@@ -16,10 +16,10 @@
16
16
 
17
17
  ### 의존성
18
18
 
19
- ```bash
20
- claude mcp list 2>/dev/null | grep -q playwright && echo "OK" || echo "NOT CONNECTED"
21
- claude mcp add playwright -- npx @playwright/mcp@latest
22
- ```
19
+ 이 항목은 이미 연결된 MCP를 사용하는 엔진 어댑터의 설명이다.
20
+ 새 브라우저 세션은 js eval의 Bun.WebView(Bun >= 1.4, macOS 기본;
21
+ Linux/Windows는 설치된 Chrome/Chromium/Edge 필요), 그 외 또는 Chrome 동작·stealth·trace·인증은
22
+ 로컬 Chrome을 제어하는 `playwright-core` 스크립트로 실행한다. MCP를 새로 설치하지 않는다.
23
23
 
24
24
  ### 기본 워크플로
25
25
 
@@ -56,11 +56,11 @@ claude mcp add playwright -- npx @playwright/mcp@latest
56
56
  # Node (시스템 설치)
57
57
  node -v # v18+ 권장
58
58
 
59
- # Playwright + stealth 플러그인
60
- npm i -g playwright playwright-extra puppeteer-extra-plugin-stealth
61
-
62
- # 시스템 Chrome 바이너리 (번들 Chromium 아님)
63
- npx playwright install chrome
59
+ # 사용자가 엔진 디렉터리에서 한 번 설치하는 스크립트 의존성
60
+ cd "$SKILL_DIR/engine"
61
+ test -f package.json || cp templates/package.json package.json
62
+ bun add playwright-core@1.62.1 playwright-extra@4.3.6 puppeteer-extra-plugin-stealth@2.11.2
63
+ # Chrome은 이미 시스템에 설치되어 있어야 한다. 브라우저 다운로드 명령은 없다.
64
64
  ```
65
65
 
66
66
  ### 호출 (engine 내부)
@@ -81,7 +81,8 @@ attempt, html = run_playwright_fallback(
81
81
  ### 데스크톱 템플릿 (`playwright_real_chrome.js`)
82
82
 
83
83
  ```js
84
- const { chromium } = require('playwright-extra');
84
+ const { addExtra } = require('playwright-extra');
85
+ const chromium = addExtra(require('playwright-core').chromium);
85
86
  const stealth = require('puppeteer-extra-plugin-stealth')();
86
87
  chromium.use(stealth);
87
88
 
@@ -95,7 +96,9 @@ const ctx = await chromium.launchPersistentContext(profileDir, {
95
96
  ### 모바일 템플릿 (`playwright_mobile_chrome.js`)
96
97
 
97
98
  ```js
98
- const { chromium, devices } = require('playwright-extra');
99
+ const { devices } = require('playwright-core');
100
+ const { addExtra } = require('playwright-extra');
101
+ const chromium = addExtra(require('playwright-core').chromium);
99
102
  const iPhone = devices['iPhone 13 Pro'];
100
103
 
101
104
  const ctx = await chromium.launchPersistentContext(profileDir, {
@@ -126,8 +129,8 @@ const ctx = await chromium.launchPersistentContext(profileDir, {
126
129
 
127
130
  ## 디버깅 팁
128
131
 
129
- - `profileDir`를 고정 경로로 두면 세션·쿠키가 유지되어 재시도 빠름 (`/tmp/.insane_pw_profile`)
130
- - Akamai 재시도가 잦으면 `profileDir`를 삭제해 fresh 상태로 리셋
132
+ - 템플릿은 js eval에서 스크립트로 실행한다. `profileDir`는 작업 전용 경로나 사용자 프로필의 복제본만 사용한다.
133
+ - 사용자의 실제 프로필을 실행·초기화·삭제하지 않는다. 작업 종료 시 컨텍스트를 닫고 작업 전용 복제본만 정리한다.
131
134
  - 실패 시 `result.trace`의 `error` 필드에 Node stderr 200자가 포함됨
132
135
 
133
136
  ## 사이트 예시 (독자 이해용, 코드 분기 근거 아님)
@@ -4,7 +4,7 @@
4
4
  The OS-keyring lookup is an injected boundary: cookie_paths resolves profile
5
5
  paths and cookie_crypto derives keys + decrypts values, both pure and testable
6
6
  with synthetic fixtures on any OS. This module wires them to a real browser DB
7
- and the agent-browser CDP session.
7
+ and a local Chrome CDP session controlled by playwright-core scripts.
8
8
 
9
9
  Usage:
10
10
  python extract_cookies.py --browser chrome --domain youtube.com --output /tmp/cookies.json
@@ -255,7 +255,7 @@ def inject_cookies(cookies: list[CookieRecord], cdp_port: int) -> None:
255
255
  if proc.returncode != 0:
256
256
  raise RuntimeError((proc.stderr or "CDP cookie injection failed").strip())
257
257
  ok = int((proc.stdout or "0").strip() or "0")
258
- print(f"Injected {ok}/{len(filtered)} cookies into agent-browser (CDP {cdp_port})")
258
+ print(f"Injected {ok}/{len(filtered)} cookies into local Chrome (playwright-core CDP {cdp_port})")
259
259
 
260
260
 
261
261
  def main() -> None:
@@ -263,7 +263,7 @@ def main() -> None:
263
263
  parser.add_argument("--browser", required=True, choices=sorted(BROWSERS.keys()))
264
264
  parser.add_argument("--domain", required=True, action="append", dest="domains")
265
265
  parser.add_argument("--output", help="Write cookies JSON to file")
266
- parser.add_argument("--inject", action="store_true", help="Inject into agent-browser")
266
+ parser.add_argument("--inject", action="store_true", help="Inject into the local Chrome CDP endpoint used by a playwright-core script")
267
267
  parser.add_argument("--cdp", type=int, default=9242, help="CDP port (default 9242)")
268
268
  args = parser.parse_args()
269
269
 
@@ -160,7 +160,7 @@ Each sub-task message must include:
160
160
  5. One Manual-QA channel, named with the exact tool and exact invocation (the literal `curl`, `send-keys`, `browser:control-in-app-browser` action, `page.click`, payload, selectors, and the binary observable that decides PASS/FAIL), not "verify it works". A LIGHT checkbox needs one real-surface proof of its deliverable, and auxiliary surfaces (CLI stdout, DB state diff, parsed config dump) are first-class when the surface is CLI- or data-shaped:
161
161
  - HTTP call: `curl -i` against the live endpoint.
162
162
  - Terminal / TUI: drive a real pty; `tmux send-keys` is fine for a boot/behavior smoke, but color/layout/CJK evidence goes through the xterm.js web terminal below, NEVER `tmux capture-pane`.
163
- - Browser use: prefer the harness's in-app browser control when available and the scenario does not need an authenticated or persistent user browser profile; otherwise drive the real page with Chrome, or agent-browser (https://github.com/vercel-labs/agent-browser) when Chrome is unavailable.
163
+ - Browser use: from js eval, use `new Bun.WebView()` on Bun >= 1.4 (macOS default; Linux/Windows need Chrome/Chromium/Edge). Otherwise, or for Chrome semantics, stealth, trace, or auth, write and run a `playwright-core` script against local Chrome (`channel: "chrome"`; persistent context on a CLONED profile). Codex: `browser:control-in-app-browser` for ordinary page control.
164
164
  - Computer use: OS-level GUI automation against the running desktop app when the surface is not a page.
165
165
  - TUI visual evidence: when a TUI claim needs visual QA or PR proof, run `bun script/qa/web-terminal-visual-qa.mjs --command "<cmd>" --input "{Enter}" --evidence-dir <dir>` (real pty rendered through xterm.js in Chrome) and attach `terminal.png` plus `metadata.json`.
166
166
  6. The adversarial classes that apply to this sub-task (from the 9 ultraqa classes) and how each is probed.
@@ -254,7 +254,7 @@ Your next move: <fill - e.g. approve, or run a high-accuracy review>. Full execu
254
254
  ## Verification strategy
255
255
  > Zero human intervention - all verification is agent-executed.
256
256
  - Test decision: <TDD | tests-after | none> + framework
257
- - Evidence: <attemptDir>/task-<N>-${slug}.<ext> (attemptDir = currentAttemptDir from the ulw-loop status operation - the omo_agent_toolkit tool on Senpi, the omo-agent-toolkit CLI on Codex, .omo/evidence/ulw/<session>/<goalId>/a<attempt>; outside ulw-loop use .omo/evidence/)
257
+ - Evidence: <attemptDir>/task-<N>-${slug}.<ext> (attemptDir = currentAttemptDir from the ulw-loop status operation - on Senpi the eval SDK import, const { agentToolkit } = await import(\`\${env("OMO_AGENT_TOOLKIT_SDK_ROOT")}/sdk.js\`) then agentToolkit.status(), on Codex the omo-agent-toolkit CLI, .omo/evidence/ulw/<session>/<goalId>/a<attempt>; outside ulw-loop use .omo/evidence/)
258
258
 
259
259
  ## Execution strategy
260
260
  ### Parallel execution waves
@@ -175,7 +175,7 @@ Scaling floor — more angles always justify more workers:
175
175
  | Multi-faceted | 4 | 6 | 2 | 2 | 14 |
176
176
  | Full due diligence | 4 | 6 | 3 | 2 | 15 |
177
177
 
178
- The browsing column is BINDING, not advisory: when the brief says `Browsing: yes`, the roster names a browsing-worker angle before the first wave launches, and that worker is spawned in the same turn as the rest of the wave. A run that reaches wave 2 with zero browsing workers on a `Browsing: yes` brief has silently downgraded every source to what plain fetch happened to return.
178
+ The browsing column is BINDING, not advisory: when the brief says `Browsing: yes`, the roster names a browsing-worker angle, armed with the `ultimate-browsing` skill, before the first wave launches, and that worker is spawned in the same turn as the rest of the wave. A run that reaches wave 2 with zero browsing workers on a `Browsing: yes` brief has silently downgraded every source to what plain fetch happened to return.
179
179
 
180
180
  **Disambiguate before you expand.** When the topic names something that could resolve several ways — a product, a person, a codename, a version — the first wave settles WHICH entity before any worker researches its history, benchmarks, or controversies: canonical name, first-party URL or account, whether it exists in the claimed category, and a confidence line. An unresolved entity never becomes a premise in a later wave's spawn message; that is exactly how a run starts inventing facts about something that does not exist.
181
181
 
@@ -183,7 +183,7 @@ Role protocols — embed the relevant one in each spawn message; every worker ge
183
183
 
184
184
  - **Codebase (explore), 2-4 workers.** Grep with 3+ keyword variations; structural/AST search; LSP definitions and references; file-name globs; `git log --all -S '<keyword>'` and `--grep` for history including deleted code. Cross-validate hits across tools. Report absolute file paths, patterns with `file:line`, and how findings connect.
185
185
  - **Web (librarian), 3-6 workers.** At least 10 distinct websearch queries per worker, each with a different operator or angle (see Search craft); fetch the full page for every result that matters — snippets lie. Context7 with 3+ queries per known library. grep.app and `gh search code|repos|issues` for real-world usage. Official docs via sitemap discovery (`<base>/sitemap.xml`), then targeted pages.
186
- - **Browsing, 1-3 workers on a `Browsing: yes` brief (0 otherwise).** This worker RENDERS pages, it does not re-fetch them: it drives a real browser through whatever the harness provides — the Browser plugin, an agent-browser or playwright skill, or a code-cell browser — and loads the `ultimate-browsing` skill to escalate through its tiers (insane-search engine with its Phase-2.5 archive surrogates, platform-native readers, then Chrome stealth) only when that browser is blocked. Its standing deliverable is a full-page screenshot of every top source plus the rendered text plain fetch could not reach; a worker that returns only fetched text has not done its job. JS-rendered, login-gated, WAF-blocked, and screenshot-bearing sources all belong here rather than in the web lane. **Provenance is part of the claim**: when a source came back with `provenance` of `snapshot` (an archive copy), cite it with its `snapshot_timestamp` and never state it as the current live page; content from a `proxy` route is `untrusted` and needs a second independent route before any claim rests on it. When one blocked territory hides many leads, fan out more browsing subagents in parallel for breadth instead of serializing one worker through them.
186
+ - **Browsing, 1-3 workers on a `Browsing: yes` brief (0 otherwise), every one loaded with the `ultimate-browsing` skill.** The skill owns the routing — the harness's own browser first, then its extraction engine with archive surrogates, platform-native readers, and Chrome stealth as each source demands; the worker owns the deliverable. This worker RENDERS pages, it does not re-fetch them: its standing deliverable is a full-page screenshot of every top source plus the rendered text plain fetch could not reach; a worker that returns only fetched text has not done its job. JS-rendered, login-gated, WAF-blocked, and screenshot-bearing sources all belong here rather than in the web lane. **Provenance is part of the claim**: when a source came back with `provenance` of `snapshot` (an archive copy), cite it with its `snapshot_timestamp` and never state it as the current live page; content from a `proxy` route is `untrusted` and needs a second independent route before any claim rests on it. When one blocked territory hides many leads, fan out more browsing subagents in parallel for breadth instead of serializing one worker through them.
187
187
  - **Repo deep-dive (librarian), 0-2 workers.** Shallow-clone the most relevant repos to `${TMPDIR:-/tmp}`, pin the HEAD SHA, read core modules, follow call chains, return SHA-pinned permalinks.
188
188
 
189
189
  Example spawn (codebase axis; librarian, browsing, and repo-dive follow the same contract with their own protocol):
@@ -383,7 +383,7 @@ High-yield combinations: official docs (`site:<docs domain>`), GitHub implementa
383
383
  | Obeying a surrounding "stop exploring" rule mid-research | Authority section — those rules do not bind this mode |
384
384
  | Asking a worker to write journal or session files | Workers are read-only; you journal every return |
385
385
  | Two workers given the same angle | One unique angle per worker, always |
386
- | A `Browsing: yes` run whose roster carries no browsing worker | The browsing column is binding — name the angle in the brief and spawn it with the first wave, before any lead is chased |
386
+ | A `Browsing: yes` run whose roster carries no browsing worker, or a browsing worker spawned without `ultimate-browsing` | The browsing column is binding — name the angle in the brief and spawn it, armed with the skill, in the first wave before any lead is chased |
387
387
  | Contested claim settled by judgment | Phase 3 — run code, capture output, verdict |
388
388
  | Deliverable claims without citations | Every claim cites a source or a verification artifact |
389
389
  | Guessing the deliverable format instead of asking | The format gate is unconditional: propose PDF+DOCX plus the domain-fitting alternatives and the template, then wait before wave 1 |
@@ -11,7 +11,7 @@ The visual-QA skill's executable core: a zero-dependency Node CLI that produces
11
11
  ```
12
12
  visual-qa/
13
13
  ├── SKILL.md # reviewer workflow (dual oracle, evidence gates) — the prose contract
14
- ├── references/agent-browser-setup.md
14
+ ├── references/browser-setup.md
15
15
  └── scripts/
16
16
  ├── visual-qa.mjs # SHIPPED RUNTIME: bun-build bundle of cli.ts (+ embedded modules)
17
17
  ├── cli.ts # development source; dispatches image-diff / tui-check
@@ -49,7 +49,7 @@ Before any reviewer sees an image, verify each capture yourself: the file signat
49
49
  ### Web
50
50
 
51
51
  1. Capture a REFERENCE image: the user's mock/target, generated page snapshot, Figma export, source-site capture, or known-good baseline. Save as PNG. If the user provided overview text or annotations, save them next to the image and treat them as part of the reference packet.
52
- 2. Capture the ACTUAL rendered screenshot at the same viewport size, driving the browser your harness actually has. Where a code cell can reach a browser (`new Bun.WebView()` on a Bun >= 1.4 kernel, otherwise `playwright-core` against the local Chrome), capture in-process: it needs no CLI and returns the PNG path directly. In Codex, `browser:control-in-app-browser` is that in-process surface — use it first unless the page needs an authenticated user browser session. Otherwise use the project's configured browser tooling (the playwright, agent-browser, or dev-browser skill). Save as PNG. If nothing is available, install [agent-browser](https://github.com/vercel-labs/agent-browser) (`bun add -g agent-browser && agent-browser install`) and capture with it — see `$SKILL_DIR/references/agent-browser-setup.md` for the full setup, including how to shoot a fixed-viewport screenshot.
52
+ 2. Capture the ACTUAL rendered screenshot at the reference viewport. Use two browser tiers from js eval: (1) `new Bun.WebView()` on Bun >= 1.4 (macOS default; Linux/Windows need installed Chrome/Chromium/Edge); (2) otherwise, or for Chrome semantics, stealth, trace, or authenticated profiles, WRITE a `playwright-core` script and run it from the kernel against local Chrome (`chromium.launch({ channel: "chrome" })` / `launchPersistentContext` on a CLONED profile, never the live one). In Codex, prefer `browser:control-in-app-browser` for ordinary captures. Save PNG and return its path; close the browser context. See `$SKILL_DIR/references/browser-setup.md` for fixed-viewport examples and prerequisites.
53
53
  3. Run the diff and keep the JSON:
54
54
 
55
55
  ```
@@ -0,0 +1,75 @@
1
+ # Browser setup (Web capture)
2
+
3
+ Use the js-eval kernel for both tiers. In Codex, prefer
4
+ `browser:control-in-app-browser` for ordinary captures.
5
+
6
+ ## Tier 1: Bun.WebView
7
+
8
+ On a Bun >= 1.4 kernel, `new Bun.WebView()` is the macOS default (system
9
+ WebKit, no browser download). Linux/Windows require `backend: "chrome"`
10
+ and installed Chrome/Chromium/Edge. WebView is headless; WebKit has no CDP,
11
+ and `type()` emits no keyboard events. Use tier 2 when these differences matter.
12
+
13
+ ```js
14
+ // js-eval cell; url and pngPath belong to this QA run.
15
+ const view = new Bun.WebView({ width: 1280, height: 720 })
16
+ try {
17
+ await view.navigate(url)
18
+ await Bun.write(pngPath, await view.screenshot())
19
+ console.log(pngPath)
20
+ } finally {
21
+ view[Symbol.dispose]()
22
+ }
23
+ ```
24
+
25
+ ## Tier 2: playwright-core with local Chrome
26
+
27
+ For other kernels, real-Chrome semantics, stealth, traces, or authenticated
28
+ profiles, WRITE a script beside the project's installed `playwright-core`
29
+ dependency and execute it from js eval. The user installs `playwright-core`
30
+ once with `bun add playwright-core` if needed; Chrome must already exist.
31
+ No managed browser download is needed.
32
+
33
+ ```js
34
+ // capture.mjs
35
+ import { chromium } from "playwright-core"
36
+ const [url, pngPath] = process.argv.slice(2)
37
+ const browser = await chromium.launch({ channel: "chrome", headless: true })
38
+ try {
39
+ const page = await browser.newPage({ viewport: { width: 1280, height: 720 }, deviceScaleFactor: 1 })
40
+ await page.goto(url, { waitUntil: "load", timeout: 30000 })
41
+ await page.screenshot({ path: pngPath })
42
+ console.log(pngPath)
43
+ } finally {
44
+ await browser.close()
45
+ }
46
+ ```
47
+
48
+ Run from the js-eval kernel (also works on a Node kernel):
49
+
50
+ ```js
51
+ const { promisify } = await import("node:util")
52
+ const { execFile } = await import("node:child_process")
53
+ const result = await promisify(execFile)("node", [scriptPath, url, pngPath], { timeout: 45000 })
54
+ console.log(result.stdout)
55
+ ```
56
+
57
+ For auth, CLONE the user-data directory to a private task-owned directory
58
+ and use `chromium.launchPersistentContext(clonePath, { channel: "chrome" })`.
59
+ NEVER launch against or clear cookies/cache/site data from the live profile.
60
+ Close the context and remove only the clone after QA. For script-based stealth,
61
+ read the ultimate-browsing skill's `references/chrome-stealth.md`.
62
+
63
+ ## Capture a screenshot at a fixed viewport
64
+
65
+ Match CSS viewport AND PNG dimensions: WebKit follows native display scale
66
+ (a 1280x720 viewport can yield 2560x1440 pixels). Use matching reference
67
+ captures or Chrome's `deviceScaleFactor`, not resizing to force a pass.
68
+ Wait for the specific page state, not a sleep, then compare:
69
+
70
+ ```sh
71
+ node "$SKILL_DIR/scripts/visual-qa.mjs" image-diff reference.png actual.png
72
+ ```
73
+
74
+ Inspect `dimensionsMatch` and `diffRatio`, then inspect the image. Close every
75
+ WebView/browser context and the fixture server, even on a failed capture.
@@ -1,45 +0,0 @@
1
- # agent-browser setup (Web capture fallback)
2
-
3
- Use this when the project has **no** browser tooling configured or available for the Web
4
- capture path in Step 2 (no playwright / dev-browser skill, no usable headless browser).
5
- [agent-browser](https://github.com/vercel-labs/agent-browser) is a standalone CLI that
6
- drives a real Chromium and can screenshot a page at a fixed viewport — exactly what the
7
- `image-diff` evidence step needs.
8
-
9
- Repo: https://github.com/vercel-labs/agent-browser
10
-
11
- ## Install
12
-
13
- ```
14
- npm install -g agent-browser && agent-browser install
15
- ```
16
-
17
- `npm install -g agent-browser` installs the CLI globally; `agent-browser install` downloads the
18
- managed browser it drives. If Bun is already available, `bun add -g agent-browser && agent-browser install`
19
- is equivalent, but npm is the default because LazyCodex/Codex installations do not require Bun.
20
-
21
- Confirm it is ready and discover the current flags:
22
-
23
- ```
24
- agent-browser --help
25
- ```
26
-
27
- ## Capture a screenshot at a fixed viewport
28
-
29
- Set the viewport first, then screenshot — this guarantees the ACTUAL capture matches the
30
- REFERENCE viewport so `image-diff` compares like-for-like:
31
-
32
- ```
33
- agent-browser set viewport 1280 720 # width height (add a third arg, e.g. 2, for retina scale)
34
- agent-browser screenshot actual.png # add --full for full-page, --screenshot-dir ./shots for a custom dir
35
- ```
36
-
37
- Then feed the PNG into the diff exactly as in Step 2:
38
-
39
- ```
40
- node "$SKILL_DIR/scripts/visual-qa.mjs" image-diff <reference.png> actual.png
41
- ```
42
-
43
- Match the viewport numbers to whatever the reference/mock was captured at; mismatched
44
- dimensions make `dimensionsMatch` false and inflate `diffRatio`. Run `agent-browser --help`
45
- for the full command set (navigation, batch, annotate, format/quality flags).
@@ -1,45 +0,0 @@
1
- # agent-browser setup (Web capture fallback)
2
-
3
- Use this when the project has **no** browser tooling configured or available for the Web
4
- capture path in Step 2 (no playwright / dev-browser skill, no usable headless browser).
5
- [agent-browser](https://github.com/vercel-labs/agent-browser) is a standalone CLI that
6
- drives a real Chromium and can screenshot a page at a fixed viewport — exactly what the
7
- `image-diff` evidence step needs.
8
-
9
- Repo: https://github.com/vercel-labs/agent-browser
10
-
11
- ## Install
12
-
13
- ```
14
- npm install -g agent-browser && agent-browser install
15
- ```
16
-
17
- `npm install -g agent-browser` installs the CLI globally; `agent-browser install` downloads the
18
- managed browser it drives. If Bun is already available, `bun add -g agent-browser && agent-browser install`
19
- is equivalent, but npm is the default because LazyCodex/Codex installations do not require Bun.
20
-
21
- Confirm it is ready and discover the current flags:
22
-
23
- ```
24
- agent-browser --help
25
- ```
26
-
27
- ## Capture a screenshot at a fixed viewport
28
-
29
- Set the viewport first, then screenshot — this guarantees the ACTUAL capture matches the
30
- REFERENCE viewport so `image-diff` compares like-for-like:
31
-
32
- ```
33
- agent-browser set viewport 1280 720 # width height (add a third arg, e.g. 2, for retina scale)
34
- agent-browser screenshot actual.png # add --full for full-page, --screenshot-dir ./shots for a custom dir
35
- ```
36
-
37
- Then feed the PNG into the diff exactly as in Step 2:
38
-
39
- ```
40
- node "$SKILL_DIR/scripts/visual-qa.mjs" image-diff <reference.png> actual.png
41
- ```
42
-
43
- Match the viewport numbers to whatever the reference/mock was captured at; mismatched
44
- dimensions make `dimensionsMatch` false and inflate `diffRatio`. Run `agent-browser --help`
45
- for the full command set (navigation, batch, annotate, format/quality flags).