oh-my-opencode 5.0.0-beta.60 → 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.
- package/THIRD-PARTY-NOTICES.md +8 -6
- package/dist/cli/doctor/checks/browser-provider.d.ts +2 -0
- package/dist/cli/index.js +465 -348
- package/dist/cli-node/index.js +465 -348
- package/dist/config/schema/agent-names.d.ts +0 -1
- package/dist/config/schema/browser-automation.d.ts +0 -2
- package/dist/config/schema/oh-my-opencode-config.d.ts +0 -1
- package/dist/hooks/comment-checker/__fixtures__/download-probe.fixture.d.ts +1 -0
- package/dist/index.js +61 -535
- package/dist/oh-my-opencode.schema.json +0 -1
- package/dist/skills/ast-grep/SKILL.md +12 -0
- package/dist/skills/debugging/references/tools/playwright-cli.md +79 -161
- package/dist/skills/frontend/SKILL.md +1 -1
- package/dist/skills/frontend/references/design/aside.md +1 -1
- package/dist/skills/frontend/references/design/clone-from-url.md +1 -1
- package/dist/skills/frontend/scripts/perfection/lighthouse-audit.py +2 -2
- package/dist/skills/review-work/SKILL.md +1 -1
- package/dist/skills/ultimate-browsing/ATTRIBUTION.md +1 -82
- package/dist/skills/ultimate-browsing/SKILL.md +17 -29
- package/dist/skills/ultimate-browsing/engine/AGENTS.md +2 -1
- package/dist/skills/ultimate-browsing/engine/templates/package.json +2 -2
- package/dist/skills/ultimate-browsing/engine/templates/playwright_mobile_chrome.js +5 -2
- package/dist/skills/ultimate-browsing/engine/templates/playwright_real_chrome.js +8 -6
- package/dist/skills/ultimate-browsing/engine/tests/test_playwright_stealth.py +86 -0
- package/dist/skills/ultimate-browsing/engine/tests/test_playwright_templates.py +4 -7
- package/dist/skills/ultimate-browsing/references/chrome-stealth.md +86 -100
- package/dist/skills/ultimate-browsing/references/insane-search/README.md +9 -3
- package/dist/skills/ultimate-browsing/references/insane-search/playwright.md +16 -13
- package/dist/skills/ultimate-browsing/scripts/extract_cookies.py +3 -3
- package/dist/skills/ulw-execute/SKILL.md +1 -1
- package/dist/skills/ulw-plan/scripts/scaffold-plan.mjs +1 -1
- package/dist/skills/ulw-research/SKILL.md +3 -3
- package/dist/skills/visual-qa/AGENTS.md +1 -1
- package/dist/skills/visual-qa/SKILL.md +1 -1
- package/dist/skills/visual-qa/references/browser-setup.md +75 -0
- package/dist/tui.js +12 -5
- package/package.json +16 -23
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +6887 -249
- package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/src/setup.ts +7 -1
- package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
- package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
- package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/plan.toml +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/dist/cli.js +25 -15
- package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/src/directive-content.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/directive.md +1 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/CHANGELOG.md +15 -0
- package/packages/omo-codex/plugin/components/ulw-loop/directive.md +25 -15
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint.js +5 -4
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +640 -327
- package/packages/omo-codex/plugin/components/ulw-loop/dist/domain-types.d.ts +5 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/evidence.js +16 -12
- package/packages/omo-codex/plugin/components/ulw-loop/dist/ledger.d.ts +4 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/ledger.js +34 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-commit.d.ts +19 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-commit.js +107 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.d.ts +2 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.js +48 -22
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.d.ts +9 -7
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.js +105 -114
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-log.d.ts +15 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-log.js +86 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-missing-recovery.d.ts +5 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-missing-recovery.js +15 -3
- package/packages/omo-codex/plugin/components/ulw-loop/dist/review-blockers.js +3 -4
- package/packages/omo-codex/plugin/components/ulw-loop/dist/sdk/factory.js +29 -6
- package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-budget-io.d.ts +5 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-budget-io.js +67 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-guard.d.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-guard.js +29 -66
- package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-role-guard.d.ts +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-role-guard.js +22 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/state-lock.d.ts +11 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/state-lock.js +120 -88
- package/packages/omo-codex/plugin/components/ulw-loop/dist/status-next-actions.d.ts +3 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/status-next-actions.js +18 -10
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-batch.js +4 -4
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering.js +5 -5
- package/packages/omo-codex/plugin/components/ulw-loop/dist/stop-resume-hook.js +8 -17
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +7 -7
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +2 -2
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint.ts +5 -4
- package/packages/omo-codex/plugin/components/ulw-loop/src/domain-types.ts +5 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/evidence.ts +16 -16
- package/packages/omo-codex/plugin/components/ulw-loop/src/ledger.ts +33 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-commit.ts +124 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-crud.ts +58 -51
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-io.ts +126 -140
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-log.ts +84 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-missing-recovery.ts +26 -3
- package/packages/omo-codex/plugin/components/ulw-loop/src/review-blockers.ts +3 -3
- package/packages/omo-codex/plugin/components/ulw-loop/src/sdk/factory.ts +55 -6
- package/packages/omo-codex/plugin/components/ulw-loop/src/spawn-budget-io.ts +59 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/spawn-guard.ts +29 -62
- package/packages/omo-codex/plugin/components/ulw-loop/src/spawn-role-guard.ts +22 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/state-lock.ts +129 -111
- package/packages/omo-codex/plugin/components/ulw-loop/src/status-next-actions.ts +19 -10
- package/packages/omo-codex/plugin/components/ulw-loop/src/steering-batch.ts +4 -4
- package/packages/omo-codex/plugin/components/ulw-loop/src/steering.ts +5 -4
- package/packages/omo-codex/plugin/components/ulw-loop/src/stop-resume-hook.ts +8 -16
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/barrier.ts +13 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/commit-child.ts +65 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/commit-cli-qa.mjs +76 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/commit-crash.ts +23 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/commit-mutations.mjs +58 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/commit-writer.ts +65 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/lease-clock.ts +23 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/plan-commit-log.test.ts +252 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/plan-commit-recovery.test.ts +190 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/plan-io.test.ts +50 -35
- package/packages/omo-codex/plugin/components/ulw-loop/test/plan-log-newest.test.ts +72 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/sdk-completed-plan.test.ts +43 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/sdk-driver-states.test.ts +145 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/sdk-session-context.test.ts +21 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/spawn-guard.test.ts +7 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/spawn-role-matrix.test.ts +113 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/state-lock.test.ts +92 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/status-next-actions-surface.test.ts +133 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/steering-batch.test.ts +12 -12
- package/packages/omo-codex/plugin/components/ulw-loop/test/steering.test.ts +4 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-recording-spawn-admission.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/package-lock.json +12 -12
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/scripts/sync-skills.d.mts +4 -0
- package/packages/omo-codex/plugin/scripts/sync-skills.mjs +18 -10
- package/packages/omo-codex/plugin/skills/ast-grep/SKILL.md +12 -0
- package/packages/omo-codex/plugin/skills/debugging/references/tools/playwright-cli.md +79 -161
- package/packages/omo-codex/plugin/skills/frontend/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/frontend/references/design/aside.md +1 -1
- package/packages/omo-codex/plugin/skills/frontend/references/design/clone-from-url.md +1 -1
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/lighthouse-audit.py +2 -2
- package/packages/omo-codex/plugin/skills/init-deep/SKILL.md +3 -3
- package/packages/omo-codex/plugin/skills/refactor/SKILL.md +3 -3
- package/packages/omo-codex/plugin/skills/remove-ai-slops/SKILL.md +3 -3
- package/packages/omo-codex/plugin/skills/review-work/SKILL.md +4 -4
- package/packages/omo-codex/plugin/skills/ultimate-browsing/ATTRIBUTION.md +1 -82
- package/packages/omo-codex/plugin/skills/ultimate-browsing/SKILL.md +17 -29
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/AGENTS.md +2 -1
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/templates/package.json +2 -2
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/templates/playwright_mobile_chrome.js +5 -2
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/templates/playwright_real_chrome.js +8 -6
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/test_playwright_stealth.py +86 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/test_playwright_templates.py +4 -7
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/chrome-stealth.md +86 -100
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/README.md +9 -3
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/playwright.md +16 -13
- package/packages/omo-codex/plugin/skills/ultimate-browsing/scripts/extract_cookies.py +3 -3
- package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +25 -15
- package/packages/omo-codex/plugin/skills/ulw-execute/SKILL.md +4 -4
- package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +3 -3
- package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +2 -2
- package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +6 -6
- package/packages/omo-codex/plugin/skills/visual-qa/AGENTS.md +1 -1
- package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +4 -4
- package/packages/omo-codex/plugin/skills/visual-qa/references/browser-setup.md +75 -0
- package/packages/omo-codex/plugin/test/bootstrap-default-role.test.mjs +66 -0
- package/packages/omo-codex/plugin/test/component-hook-contract-cases.mjs +13 -1
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +7060 -417
- package/packages/prompts-core/prompts/ultrawork/codex.md +25 -15
- package/packages/shared-skills/skills/ast-grep/SKILL.md +12 -0
- package/packages/shared-skills/skills/debugging/references/tools/playwright-cli.md +79 -161
- package/packages/shared-skills/skills/frontend/SKILL.md +1 -1
- package/packages/shared-skills/skills/frontend/references/design/aside.md +1 -1
- package/packages/shared-skills/skills/frontend/references/design/clone-from-url.md +1 -1
- package/packages/shared-skills/skills/frontend/scripts/perfection/lighthouse-audit.py +2 -2
- package/packages/shared-skills/skills/review-work/SKILL.md +1 -1
- package/packages/shared-skills/skills/ultimate-browsing/ATTRIBUTION.md +1 -82
- package/packages/shared-skills/skills/ultimate-browsing/SKILL.md +17 -29
- package/packages/shared-skills/skills/ultimate-browsing/engine/AGENTS.md +2 -1
- package/packages/shared-skills/skills/ultimate-browsing/engine/templates/package.json +2 -2
- package/packages/shared-skills/skills/ultimate-browsing/engine/templates/playwright_mobile_chrome.js +5 -2
- package/packages/shared-skills/skills/ultimate-browsing/engine/templates/playwright_real_chrome.js +8 -6
- package/packages/shared-skills/skills/ultimate-browsing/engine/tests/test_playwright_stealth.py +86 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/tests/test_playwright_templates.py +4 -7
- package/packages/shared-skills/skills/ultimate-browsing/references/chrome-stealth.md +86 -100
- package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/README.md +9 -3
- package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/playwright.md +16 -13
- package/packages/shared-skills/skills/ultimate-browsing/scripts/extract_cookies.py +3 -3
- package/packages/shared-skills/skills/ulw-execute/SKILL.md +1 -1
- package/packages/shared-skills/skills/ulw-plan/scripts/scaffold-plan.mjs +1 -1
- package/packages/shared-skills/skills/ulw-research/SKILL.md +3 -3
- package/packages/shared-skills/skills/visual-qa/AGENTS.md +1 -1
- package/packages/shared-skills/skills/visual-qa/SKILL.md +1 -1
- package/packages/shared-skills/skills/visual-qa/references/browser-setup.md +75 -0
- package/dist/skills/visual-qa/references/agent-browser-setup.md +0 -45
- package/packages/omo-codex/plugin/skills/visual-qa/references/agent-browser-setup.md +0 -45
- package/packages/shared-skills/skills/visual-qa/references/agent-browser-setup.md +0 -45
|
@@ -11,6 +11,18 @@ This skill ships a Python wrapper at `scripts/ast_grep_helper.py` and platform i
|
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
+
## OmO native: the ast-grep MCP tools (fastest path, no CLI needed)
|
|
15
|
+
|
|
16
|
+
OmO native also registers a bundled ast-grep MCP server. Its three tools are **deferred**: they are absent from the resident tool list and activate automatically the first time you call them by name — no `tool_search` round trip needed.
|
|
17
|
+
|
|
18
|
+
- `mcp__ast_grep_search({ pattern, language, paths })` — AST-shape search, the MCP equivalent of `sg run -p`. Prefer this over shelling out to `sg` for one-off lookups: no install, no PATH issues.
|
|
19
|
+
- `mcp__ast_grep_rewrite({ pattern, rewrite, language, paths, apply })` — preview matches (`apply: false`, the default) or apply the rewrite (`apply: true`). Same two-pass discipline as `sg run -r`: preview first, then apply.
|
|
20
|
+
- `mcp__ast_grep_scan({ paths })` — run project YAML rules (`sgconfig.yml`, `rules/`), the MCP equivalent of `sg scan`.
|
|
21
|
+
|
|
22
|
+
Same pattern language as the CLI: `$VAR` matches one AST node, `$$$VAR` matches zero or more, and the pattern is code, not regex. `paths` accepts a file or directory list; `language` is required for patterns that are ambiguous across languages.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
14
26
|
## When to use this skill
|
|
15
27
|
|
|
16
28
|
Use it whenever the user's question is about **code structure**, not bytes:
|
|
@@ -1,194 +1,112 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Browser QA — Scripts from js eval
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
> Note: `microsoft/playwright-cli` is the legacy repo; the current tooling lives in `@playwright/test` (npm) and `playwright` (pip), which include the `playwright` CLI. Use those — the legacy `playwright-cli` package is deprecated.
|
|
10
|
-
|
|
11
|
-
---
|
|
3
|
+
A browser UI bug needs a rendered browser, not curl. Use two tiers from the
|
|
4
|
+
js-eval kernel: `new Bun.WebView()` on Bun >= 1.4 for ordinary captures (macOS
|
|
5
|
+
uses WebKit; Linux/Windows need installed Chrome/Chromium/Edge), otherwise a
|
|
6
|
+
written `playwright-core` script against local Chrome. Use the script tier for
|
|
7
|
+
Chrome semantics, stealth, traces, keyboard events, or authenticated profiles.
|
|
8
|
+
In Codex, prefer `browser:control-in-app-browser` for ordinary page control.
|
|
12
9
|
|
|
13
10
|
## When to reach for Playwright
|
|
14
11
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
| CSS looks wrong at a specific width | ✅ — use `--viewport-size` |
|
|
20
|
-
| Click doesn't fire / wrong handler | ✅ — Playwright fires real DOM events |
|
|
21
|
-
| Flash of unstyled content / loading glitch | ✅ — use trace viewer to see frames |
|
|
22
|
-
| API returns wrong data | ❌ — use curl, this isn't a browser bug |
|
|
23
|
-
| Backend returns wrong status code | ❌ — use curl |
|
|
24
|
-
| Client hits a URL that returns 500 | ✅ but also ❌ — Playwright shows the call + response + failure effect on UI |
|
|
25
|
-
|
|
26
|
-
---
|
|
12
|
+
Use the script tier for forms, hydration, responsive CSS, cookie/session flows,
|
|
13
|
+
service workers, or client-side navigation. For a backend-only status/body bug,
|
|
14
|
+
use HTTP. WebView is headless, WebKit has no CDP, and `type()` emits no keyboard
|
|
15
|
+
events; choose real Chrome when these distinctions affect the reproduction.
|
|
27
16
|
|
|
28
17
|
## Install (per-project)
|
|
29
18
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
npm init playwright@latest # interactive; picks TS/JS + browsers + config
|
|
35
|
-
# Or if Playwright is already a dep:
|
|
36
|
-
npx playwright install # downloads browsers
|
|
37
|
-
npx playwright install chromium # just chromium
|
|
38
|
-
npx playwright install --with-deps # also installs OS deps (Linux)
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
Python:
|
|
42
|
-
```bash
|
|
43
|
-
pip install playwright
|
|
44
|
-
playwright install
|
|
45
|
-
```
|
|
19
|
+
Reuse installed `playwright-core`. If absent, the user can install the script
|
|
20
|
+
dependency once with `bun add playwright-core`. Chrome must already be installed;
|
|
21
|
+
report an absent executable rather than downloading a managed browser. Write the
|
|
22
|
+
script beside the dependency so normal module resolution works.
|
|
46
23
|
|
|
47
|
-
|
|
24
|
+
For stealth, use the ultimate-browsing reference `references/chrome-stealth.md`:
|
|
25
|
+
its optional plugins are user-installed once in the engine directory and executed
|
|
26
|
+
as a script, not injected into WebView.
|
|
48
27
|
|
|
49
28
|
## The four things you'll actually use
|
|
50
29
|
|
|
51
|
-
### 1.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
await
|
|
80
|
-
|
|
81
|
-
// Capture evidence
|
|
82
|
-
await page.screenshot({ path: '/tmp/debug-after-fix.png', fullPage: true });
|
|
83
|
-
console.log(await response.textContent());
|
|
84
|
-
});
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
Run it with tracing enabled for rich post-mortem:
|
|
88
|
-
|
|
89
|
-
```bash
|
|
90
|
-
npx playwright test /tmp/debug-repro.spec.ts --trace on --headed
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
### 3. `PWDEBUG=1` — step through the script with Playwright Inspector
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
PWDEBUG=1 npx playwright test /tmp/debug-repro.spec.ts
|
|
30
|
+
### 1. Write a reproduction script
|
|
31
|
+
|
|
32
|
+
Record the exact URL, inputs, viewport, expected UI state, and output artifact.
|
|
33
|
+
For auth, CLONE the user-data directory and use `launchPersistentContext` on the
|
|
34
|
+
clone. NEVER launch against or clear data from the live profile.
|
|
35
|
+
|
|
36
|
+
### 2. Reproduce + capture
|
|
37
|
+
|
|
38
|
+
```js
|
|
39
|
+
// debug-repro.mjs
|
|
40
|
+
import { chromium } from 'playwright-core';
|
|
41
|
+
const [url, pngPath, tracePath] = process.argv.slice(2);
|
|
42
|
+
const browser = await chromium.launch({ channel: 'chrome', headless: true });
|
|
43
|
+
try {
|
|
44
|
+
const context = await browser.newContext({ viewport: { width: 1280, height: 720 } });
|
|
45
|
+
await context.tracing.start({ screenshots: true, snapshots: true });
|
|
46
|
+
try {
|
|
47
|
+
const page = await context.newPage();
|
|
48
|
+
page.on('pageerror', error => console.error(error));
|
|
49
|
+
await page.goto(url, { waitUntil: 'load', timeout: 30000 });
|
|
50
|
+
// Add the scenario's actions and locator/state assertions here.
|
|
51
|
+
await page.screenshot({ path: pngPath });
|
|
52
|
+
console.log(pngPath);
|
|
53
|
+
} finally {
|
|
54
|
+
await context.tracing.stop({ path: tracePath });
|
|
55
|
+
await context.close();
|
|
56
|
+
}
|
|
57
|
+
} finally {
|
|
58
|
+
await browser.close();
|
|
59
|
+
}
|
|
97
60
|
```
|
|
98
61
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
Use this when the script doesn't reproduce cleanly and you need to watch it run.
|
|
62
|
+
A screenshot alone is not a reproduction assertion. Use locators for the exact
|
|
63
|
+
observable state; fail the script when that state is absent.
|
|
102
64
|
|
|
103
|
-
###
|
|
65
|
+
### 3. Run from the js-eval kernel
|
|
104
66
|
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
67
|
+
```js
|
|
68
|
+
const { promisify } = await import('node:util')
|
|
69
|
+
const { execFile } = await import('node:child_process')
|
|
70
|
+
const result = await promisify(execFile)('node', [scriptPath, url, pngPath, tracePath], { timeout: 60000 })
|
|
71
|
+
console.log(result.stdout)
|
|
109
72
|
```
|
|
110
73
|
|
|
111
|
-
|
|
74
|
+
### 4. Inspect the trace
|
|
112
75
|
|
|
113
|
-
|
|
76
|
+
Retain the trace ZIP for the project's existing trace viewer and inspect the PNG.
|
|
77
|
+
Trace snapshots, network events, and screenshots identify where the UI diverged.
|
|
78
|
+
Keep auth-bearing traces private; do not upload them to public viewers.
|
|
114
79
|
|
|
115
80
|
## Headless vs headed during debugging
|
|
116
81
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
npx playwright test --headed
|
|
121
|
-
npx playwright test --headed --project=chromium # pin the browser
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
---
|
|
82
|
+
Use `headless: false` with an available display when reproducing headed-only
|
|
83
|
+
behavior. State which mode produced the evidence; do not claim a headless capture
|
|
84
|
+
proves desktop-browser permissions or window behavior.
|
|
125
85
|
|
|
126
86
|
## Catching the silent-failure patterns Playwright is good at
|
|
127
87
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
// Unhandled page errors (uncaught exceptions in the page JS)
|
|
133
|
-
page.on('pageerror', err => console.error('[page error]', err));
|
|
134
|
-
|
|
135
|
-
// Network failures — e.g., backend returned 500 but UI shows nothing
|
|
136
|
-
page.on('response', async resp => {
|
|
137
|
-
if (!resp.ok()) {
|
|
138
|
-
console.warn(`[network ${resp.status()}] ${resp.url()} — ${await resp.text()}`);
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
|
|
142
|
-
// Request that never came back
|
|
143
|
-
page.on('requestfailed', req => {
|
|
144
|
-
console.error('[request failed]', req.url(), req.failure()?.errorText);
|
|
145
|
-
});
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
Add these listeners to the top of the debug script. They surface a lot of the "UI showed nothing" class of bug.
|
|
149
|
-
|
|
150
|
-
---
|
|
88
|
+
Subscribe before triggering the action: `page.on('pageerror', ...)`,
|
|
89
|
+
`page.on('requestfailed', ...)`, or a bounded `page.waitForResponse(...)` promise.
|
|
90
|
+
Await that specific response/state rather than sleeping or waiting for generic
|
|
91
|
+
network idleness. Propagate failed assertions and process exit codes.
|
|
151
92
|
|
|
152
93
|
## Viewport and device emulation
|
|
153
94
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
// At test level
|
|
158
|
-
test.use({ viewport: { width: 375, height: 667 } });
|
|
159
|
-
|
|
160
|
-
// Per-page
|
|
161
|
-
await page.setViewportSize({ width: 375, height: 667 });
|
|
162
|
-
|
|
163
|
-
// Predefined devices
|
|
164
|
-
import { devices } from '@playwright/test';
|
|
165
|
-
test.use({ ...devices['iPhone 14'] });
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
---
|
|
95
|
+
Use `page.setViewportSize({ width: 375, height: 667 })` for a narrow capture.
|
|
96
|
+
`devices` comes from `playwright-core`; apply the desired preset when creating
|
|
97
|
+
a context. Match the reference's pixel scale as well as its viewport.
|
|
169
98
|
|
|
170
99
|
## Gotchas
|
|
171
100
|
|
|
172
|
-
-
|
|
173
|
-
-
|
|
174
|
-
-
|
|
175
|
-
-
|
|
176
|
-
-
|
|
177
|
-
|
|
178
|
-
---
|
|
101
|
+
- Wait for state, not time: locator visibility or the exact response is the signal.
|
|
102
|
+
- Locators re-resolve after UI changes; stale element handles do not.
|
|
103
|
+
- Fresh task-owned contexts avoid cached state leaking between runs.
|
|
104
|
+
- Auth belongs in a private clone, never the live browser profile.
|
|
105
|
+
- Give every run its own output directory and bounded process lifetime.
|
|
179
106
|
|
|
180
107
|
## Phase 9 cleanup specifics
|
|
181
108
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
# Remove debug spec files from /tmp
|
|
187
|
-
rm -f /tmp/debug-*.spec.ts
|
|
188
|
-
|
|
189
|
-
# Remove screenshot captures
|
|
190
|
-
rm -f /tmp/debug-*.png
|
|
191
|
-
|
|
192
|
-
# If you installed browsers just for this session (rare):
|
|
193
|
-
# Don't remove them — they're useful for future sessions. They live in ~/Library/Caches/ms-playwright (macOS) or ~/.cache/ms-playwright (Linux).
|
|
194
|
-
```
|
|
109
|
+
Close WebView/browser contexts even on failure, stop the fixture server, and remove
|
|
110
|
+
only this run's temporary scripts and profile clone. Preserve requested PNG/trace
|
|
111
|
+
artifacts, then record the cleanup receipt. Do not kill unrelated browsers or
|
|
112
|
+
remove a user's installed Chrome.
|
|
@@ -146,7 +146,7 @@ Domains: `product` `style` `typography` `color` `landing` `chart` `ux` `react` `
|
|
|
146
146
|
| Situation | Load |
|
|
147
147
|
|---|---|
|
|
148
148
|
| Brand/style not among the 70 in `references/design/`, or the user says "Open Design" | `open-design` skill — the local nexu-io/open-design library (137+ design skills, 150+ design systems) |
|
|
149
|
-
| Driving a browser for the Design QA phase | `
|
|
149
|
+
| Driving a browser for the Design QA phase | `visual-qa` skill: Bun.WebView / local-Chrome `playwright-core` scripts from js eval; Codex in-app browser |
|
|
150
150
|
| Pure TypeScript/logic work with zero visual surface | `programming` skill alone — this skill adds nothing there |
|
|
151
151
|
|
|
152
152
|
## Activation
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Design System Inspired by Aside
|
|
2
2
|
|
|
3
3
|
> Category: Developer Tools & IDEs
|
|
4
|
-
> AI browser agent. Bright product-app marketing, custom display type, soft squircle controls,
|
|
4
|
+
> AI browser agent. Bright product-app marketing, custom display type, soft squircle controls, browser-product framing.
|
|
5
5
|
|
|
6
6
|
## Provenance
|
|
7
7
|
|
|
@@ -8,7 +8,7 @@ A `DESIGN.md` whose every token, interaction state, and motion value was read fr
|
|
|
8
8
|
|
|
9
9
|
## Phase 1 — Extract the runtime truth (never guess a value)
|
|
10
10
|
|
|
11
|
-
Drive a real browser
|
|
11
|
+
Drive a real browser from js eval: `new Bun.WebView()` on Bun >= 1.4 (macOS default; Linux/Windows need installed Chrome/Chromium/Edge), otherwise write and run a `playwright-core` script against local Chrome (`channel: "chrome"`). Use that script lane for Chrome semantics, stealth, trace, or auth, with persistent contexts on CLONED profiles only. Codex: `browser:control-in-app-browser`. Do NOT parse CSS files — minification, CORS, CSS-in-JS, and Tailwind utilities make source unreliable. `getComputedStyle` returns what the browser ACTUALLY rendered, so it is the only source of truth.
|
|
12
12
|
|
|
13
13
|
Sweep the page and read, for every meaningful element and every repeated pattern:
|
|
14
14
|
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
# ─── How to run ───
|
|
12
12
|
# 1. Install uv (if not installed):
|
|
13
13
|
# curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
14
|
-
# 2.
|
|
15
|
-
#
|
|
14
|
+
# 2. Chrome must already be installed locally:
|
|
15
|
+
# The script uses channel="chrome"; it downloads no browser.
|
|
16
16
|
# 3. Run:
|
|
17
17
|
# uv run lighthouse-audit.py https://example.com
|
|
18
18
|
# uv run lighthouse-audit.py https://example.com --desktop-only
|
|
@@ -127,7 +127,7 @@ You are the QA lane. Do not delegate hands-on QA to a sub-agent: the orchestrato
|
|
|
127
127
|
2. **Pick the channel that faithfully exercises the surface** and capture the artifact:
|
|
128
128
|
- HTTP: `curl -i` (or an API request context) - status line, headers, body.
|
|
129
129
|
- CLI / TUI: a real pty - drive the command and keep the transcript; for color or layout evidence render through a browser-based terminal, never a `tmux capture-pane` dump.
|
|
130
|
-
- Web:
|
|
130
|
+
- Web: 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`. Capture action log plus screenshot.
|
|
131
131
|
- Desktop / GUI: OS-level automation against the running app - action log plus screenshot.
|
|
132
132
|
- Library / SDK: a script that imports and exercises the public API - transcript.
|
|
133
133
|
- Data-shaped work (migrations, configs, generated files): the resulting artifact itself, diffed or dumped.
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
# ATTRIBUTION / NOTICE
|
|
2
2
|
|
|
3
3
|
This skill (`ultimate-browsing`, part of `@oh-my-opencode/shared-skills`) ships
|
|
4
|
-
project-original content
|
|
5
|
-
third-party tools that it installs at runtime (it does NOT vendor their source).
|
|
4
|
+
project-original content and one vendored-and-modified upstream engine.
|
|
6
5
|
Each component's provenance, license, and required notices are reproduced below.
|
|
7
6
|
|
|
8
7
|
---
|
|
@@ -50,83 +49,3 @@ license obligation:
|
|
|
50
49
|
These reference platform-native CLIs and public APIs by name (e.g. `xhs`, `yt-dlp`,
|
|
51
50
|
`agent-reach`, `mcporter`, Jina Reader, V2EX public API). Those are external tools the
|
|
52
51
|
user installs separately; this skill includes none of their source.
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
## 3. CloakBrowser (CloakHQ) — Tier-2 stealth Chromium (runtime dependency)
|
|
57
|
-
|
|
58
|
-
The Tier-2 stealth browser is **CloakBrowser**, installed at runtime via `pip`
|
|
59
|
-
(`pip install cloakbrowser`). No CloakBrowser source is vendored in this repository.
|
|
60
|
-
|
|
61
|
-
- Source: https://github.com/CloakHQ/CloakBrowser
|
|
62
|
-
- Pinned runtime version: **0.5.7** (documented in `references/chrome-stealth.md`;
|
|
63
|
-
this is a documented version string, not an automated drift check).
|
|
64
|
-
- Wrapper source license: MIT License.
|
|
65
|
-
- Binary license: the compiled CloakBrowser Chromium binary downloaded by
|
|
66
|
-
`cloakbrowser.ensure_binary()` is governed by the separate CloakBrowser
|
|
67
|
-
Binary License:
|
|
68
|
-
https://github.com/CloakHQ/CloakBrowser/blob/main/BINARY-LICENSE.md
|
|
69
|
-
- Redistribution note: this npm package does not redistribute the CloakBrowser
|
|
70
|
-
binary, does not repackage it, and does not include it in `skills/` or
|
|
71
|
-
`dist/skills`. Users who run the Tier-2 setup download the binary directly
|
|
72
|
-
from CloakHQ's official distribution channels and must comply with that
|
|
73
|
-
binary license.
|
|
74
|
-
|
|
75
|
-
MIT wrapper source license:
|
|
76
|
-
|
|
77
|
-
```
|
|
78
|
-
MIT License
|
|
79
|
-
|
|
80
|
-
Copyright (c) 2026 CloakHQ
|
|
81
|
-
|
|
82
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
83
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
84
|
-
in the Software without restriction, including without limitation the rights
|
|
85
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
86
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
87
|
-
furnished to do so, subject to the following conditions:
|
|
88
|
-
|
|
89
|
-
The above copyright notice and this permission notice shall be included in all
|
|
90
|
-
copies or substantial portions of the Software.
|
|
91
|
-
|
|
92
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
93
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
94
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
95
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
96
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
97
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
98
|
-
SOFTWARE.
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
---
|
|
102
|
-
|
|
103
|
-
## 4. agent-browser (vercel-labs) — Tier-2 CDP automation CLI (runtime dependency)
|
|
104
|
-
|
|
105
|
-
The Tier-2 automation CLI is **agent-browser**, installed at runtime via `npm`
|
|
106
|
-
(`bun add -g agent-browser`). No agent-browser source is vendored in this repository.
|
|
107
|
-
|
|
108
|
-
- Source: https://github.com/vercel-labs/agent-browser
|
|
109
|
-
- Pinned runtime version: **0.34.0** (documented in `references/chrome-stealth.md`;
|
|
110
|
-
documented version string, no automated drift check).
|
|
111
|
-
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
112
|
-
these files except in compliance with the License. You may obtain a copy of the
|
|
113
|
-
License at:
|
|
114
|
-
|
|
115
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
116
|
-
|
|
117
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
118
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
119
|
-
KIND, either express or implied. See the License for the specific language governing
|
|
120
|
-
permissions and limitations under the License.
|
|
121
|
-
|
|
122
|
-
- **Changes (Apache-2.0 §4(b)):** none. agent-browser is installed unmodified at
|
|
123
|
-
runtime; no agent-browser source file is copied, modified, or redistributed by this
|
|
124
|
-
skill. This skill only documents how to invoke the upstream CLI.
|
|
125
|
-
|
|
126
|
-
- **NOTICE:** the upstream agent-browser distribution may include a `NOTICE` file. As
|
|
127
|
-
this skill redistributes no agent-browser source, no upstream NOTICE content is
|
|
128
|
-
bundled here; consult the upstream repository for its `NOTICE` file when present.
|
|
129
|
-
|
|
130
|
-
- **Trademark notice:** "agent-browser" and "Vercel" are referenced by name for
|
|
131
|
-
identification only. No trademark license is granted under the Apache License 2.0
|
|
132
|
-
(Section 6).
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ultimate-browsing
|
|
3
|
-
description: "
|
|
3
|
+
description: "Renders, drives, and screenshots web pages: JS-rendered sources, clicks and forms, persistent logins, WAF-blocked hosts (platform-native readers, stealth Chrome), and the browsing lane of a research run, with screenshots as provenance. Not for plain search or unblocked static fetch."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Ultimate Browsing
|
|
7
7
|
|
|
8
8
|
Web access for everything a plain fetch cannot finish: a page that renders in JS, a click or a form, a screenshot, a login that must persist across pages, or a host that blocks generic fetchers (WAF / 403 / Cloudflare). Start at the cheapest tier that can do the job and climb only when it cannot:
|
|
9
9
|
|
|
10
|
-
**Tier 1 — insane-search** (headless extraction + WAF bypass) -> **Tier 1.5 — agent-reach** (platform-native APIs, esp. Chinese platforms) -> **Tier 2 — a real browser**: 2a a
|
|
10
|
+
**Tier 1 — insane-search** (headless extraction + WAF bypass) -> **Tier 1.5 — agent-reach** (platform-native APIs, esp. Chinese platforms) -> **Tier 2 — a real browser**: 2a Bun.WebView, 2b a local-Chrome `playwright-core` script from js eval for Chrome semantics, stealth, trace, or auth.
|
|
11
11
|
|
|
12
12
|
## PHASE 0 — ROUTE FIRST (MANDATORY)
|
|
13
13
|
|
|
@@ -86,33 +86,26 @@ Routing table, per-platform auth (set `TWITTER_*` env vars, `gh auth login`, a t
|
|
|
86
86
|
|
|
87
87
|
### Tier 2a — kernel browser (default)
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
Use `new Bun.WebView()` from the js-eval kernel on Bun >= 1.4: macOS defaults to system WebKit; Linux/Windows need installed Chrome/Chromium/Edge. WebView is headless, WebKit has no CDP, and `type()` emits no keyboard events. For other kernels or when those differences matter, use 2b.
|
|
90
90
|
|
|
91
91
|
```js
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
await view.
|
|
92
|
+
const view = new Bun.WebView({ width: 1280, height: 800 })
|
|
93
|
+
try {
|
|
94
|
+
await view.navigate(url)
|
|
95
|
+
const title = await view.evaluate("document.title")
|
|
96
|
+
await Bun.write(pngPath, await view.screenshot())
|
|
97
|
+
} finally {
|
|
98
|
+
view[Symbol.dispose]()
|
|
99
|
+
}
|
|
96
100
|
```
|
|
97
101
|
|
|
98
|
-
|
|
102
|
+
Use 2b for real-Chrome semantics, stealth, trace, authenticated profiles, or a page the kernel browser cannot reach.
|
|
99
103
|
|
|
100
104
|
### Tier 2b — Chrome stealth (blocked or logged-in pages)
|
|
101
105
|
|
|
102
|
-
|
|
106
|
+
WRITE a `playwright-core` script and run it from js eval against installed local Chrome: `chromium.launch({ channel: "chrome" })`, or `launchPersistentContext` on a task-owned profile. For authenticated state, CLONE the user's profile first (`rsync -a <profile>/ <tmp-clone>/`); NEVER launch against or clear cookies/cache/site data from the live profile. Codex: prefer `browser:control-in-app-browser` for ordinary page control.
|
|
103
107
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
```bash
|
|
107
|
-
# 1. Launch CloakBrowser with CDP on :9242 (see chrome-stealth.md for install + venv).
|
|
108
|
-
# 2. CloakBrowser launches tabless — open the first tab via CDP before any agent-browser command:
|
|
109
|
-
curl -s -X PUT "http://127.0.0.1:9242/json/new?https://example.com"
|
|
110
|
-
# 3. Drive it with agent-browser over CDP:
|
|
111
|
-
agent-browser --cdp 9242 snapshot -i # interactive elements (@eN refs)
|
|
112
|
-
agent-browser --cdp 9242 click @e3
|
|
113
|
-
agent-browser --cdp 9242 screenshot out.png
|
|
114
|
-
agent-browser --cdp 9242 close
|
|
115
|
-
```
|
|
108
|
+
Keep the engine's Playwright templates for script-based extraction. Stealth is optional: the user installs `playwright-extra` + `puppeteer-extra-plugin-stealth` once in the engine directory and the script wraps the `playwright-core` browser type. Setup, persistent-context arguments, screenshots, and cleanup are in [references/chrome-stealth.md](references/chrome-stealth.md). A stealth flag is not proof of access: inspect the rendered result and report challenges that remain.
|
|
116
109
|
|
|
117
110
|
### Cookie login (cross-platform)
|
|
118
111
|
|
|
@@ -134,14 +127,11 @@ Cookie export files are written with owner-only `0600` permissions. Do not place
|
|
|
134
127
|
|------|-------------|
|
|
135
128
|
| [references/insane-search/README.md](references/insane-search/README.md) | Tier-1 engine harness (R1-R7, Phase 0 API index, no-site-name rule) + its `*.md` deep-dives |
|
|
136
129
|
| [references/agent-reach/README.md](references/agent-reach/README.md) | Tier-1.5 routing table, platform auth, per-category `*.md` |
|
|
137
|
-
| [references/chrome-stealth.md](references/chrome-stealth.md) | Tier-2
|
|
130
|
+
| [references/chrome-stealth.md](references/chrome-stealth.md) | Tier-2 playwright-core scripts, optional stealth setup, cloned profiles, cookie login |
|
|
138
131
|
|
|
139
132
|
## Environment variables
|
|
140
133
|
|
|
141
134
|
```bash
|
|
142
|
-
CLOAK_CDP_PORT=9242 # CloakBrowser CDP port (default 9242)
|
|
143
|
-
AGENT_BROWSER_USER_AGENT="..." # override UA to hide HeadlessChrome
|
|
144
|
-
AGENT_BROWSER_HEADED=1 # show the browser window
|
|
145
135
|
# agent-reach auth: set the channel-specific env vars from each tool's docs only if you have access
|
|
146
136
|
# insane-search needs no env vars — it auto-installs deps on first run
|
|
147
137
|
```
|
|
@@ -149,9 +139,7 @@ AGENT_BROWSER_HEADED=1 # show the browser window
|
|
|
149
139
|
## Anti-patterns
|
|
150
140
|
|
|
151
141
|
- Do NOT launch Chrome stealth for plain text extraction — use Tier 1.
|
|
152
|
-
-
|
|
153
|
-
-
|
|
154
|
-
- Do NOT use vanilla Chrome when stealth is needed — always CloakBrowser.
|
|
155
|
-
- Do NOT forget to `close` the session when done.
|
|
142
|
+
- Use stealth plugins only in an explicitly installed script environment, not injected into WebView.
|
|
143
|
+
- Close every WebView/browser context when done and remove only task-owned profile clones.
|
|
156
144
|
- Do NOT inject cookies without reloading the page.
|
|
157
145
|
- Do NOT hardcode site domains/selectors into `engine/**` or `waf_profiles.yaml` — runtime hints only (see the no-site-name rule in the insane-search reference).
|
|
@@ -65,7 +65,8 @@ is a regression, not an upgrade:
|
|
|
65
65
|
- **De-personalization** — no personal absolute paths, no personal auth token literals,
|
|
66
66
|
no personal browser choice; enforced by `depersonalization-gate.test.ts`.
|
|
67
67
|
- **Skill-level layering** — the engine is Tier 1 under a router that also owns Tier 1.5
|
|
68
|
-
(agent-reach) and Tier 2 (
|
|
68
|
+
(agent-reach) and Tier 2 (Bun.WebView / local-Chrome playwright-core scripts from js eval).
|
|
69
|
+
Upstream has no such tiering.
|
|
69
70
|
|
|
70
71
|
### WANT — upstream improvements worth porting forward
|
|
71
72
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"name": "insane-search-templates",
|
|
3
3
|
"version": "0.1.0",
|
|
4
4
|
"private": true,
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Script-only dependencies for local Chrome templates driven from js eval; Chrome must already be installed.",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"playwright": "^1.62.1",
|
|
7
|
+
"playwright-core": "^1.62.1",
|
|
8
8
|
"playwright-extra": "^4.3.6",
|
|
9
9
|
"puppeteer-extra-plugin-stealth": "^2.11.2"
|
|
10
10
|
}
|
|
@@ -76,11 +76,12 @@ async function main() {
|
|
|
76
76
|
const playwrightExtra = requireOptionalModule('playwright-extra');
|
|
77
77
|
const stealthPlugin = playwrightExtra ? requireOptionalModule('puppeteer-extra-plugin-stealth') : null;
|
|
78
78
|
if (playwrightExtra && stealthPlugin) {
|
|
79
|
-
({
|
|
79
|
+
({ devices } = require('playwright-core'));
|
|
80
|
+
chromium = playwrightExtra.addExtra(require('playwright-core').chromium);
|
|
80
81
|
const stealth = stealthPlugin();
|
|
81
82
|
chromium.use(stealth);
|
|
82
83
|
} else {
|
|
83
|
-
({ chromium, devices } = require('playwright'));
|
|
84
|
+
({ chromium, devices } = require('playwright-core'));
|
|
84
85
|
}
|
|
85
86
|
|
|
86
87
|
const dev = devices[deviceName];
|
|
@@ -94,6 +95,8 @@ async function main() {
|
|
|
94
95
|
try {
|
|
95
96
|
ctx = await chromium.launchPersistentContext(profileDir, {
|
|
96
97
|
channel: 'chrome',
|
|
98
|
+
args: ['--disable-blink-features=AutomationControlled'],
|
|
99
|
+
ignoreDefaultArgs: ['--enable-automation'],
|
|
97
100
|
headless,
|
|
98
101
|
...dev,
|
|
99
102
|
});
|