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
|
@@ -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
|
|
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).
|
|
@@ -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).
|