Skip to content

Commit ad17a0c

Browse files
rishabhraj36beubax
andauthored
docs(skills): refine snapshot diff and QuickJS guidance (#350)
* benchmakrs added * fix: removed missing refs from readme * feat(benchmarks): support OpenAI as judge provider * fix: screenshot upload * feat: added cost support * docs: design benchmark-specific judge prompts * feat(benchmarks): split general and stealth judge prompts * Delete docs/superpowers/specs directory * chore: bump version metadata for 0.7.0 release * Revert "chore: bump version metadata for 0.7.0 release" This reverts commit c69011f. * feat(benchmarks): expose full Webcmd skill pack to Codex evals * feat(benchmarks): clarify stealth captcha handling * fix: added support for webcmd browser skills only * feat(benchmarks): run eval attempts in parallel * fix(benchmarks): isolate parallel webcmd sessions * test(benchmarks): cover parallel webcmd sessions * pi support (#313) * chore(benchmarks): pin webcmd 0.7.1 * refactor: disable concurrency in benchmark evaluation and remove integration tests * feat(benchmarks): support Codex subscription evals * docs(skills): improve browser diff and form guidance * docs(skills): sync browser skill sources * docs(skills): refine snapshot diff and QuickJS guidance --------- Co-authored-by: beubax <tejasr@bu.edu> Co-authored-by: Tejas <48682479+beubax@users.noreply.github.com>
1 parent 5d42052 commit ad17a0c

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

skill-src/webcmd-browser/SKILL.src.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,13 @@ For CAPTCHA or raw user takeover, stop automation, give the user any viewer URL
184184

185185
For native controls, inspect structure first, then use Playwright's normal form APIs inside `run`. Do not guess date formats, option labels, or file constraints from memory; read them from the DOM.
186186

187-
`browser run` uses QuickJS, not Node.js: `Buffer` and `TextEncoder` are unavailable. For an in-memory upload, pass bytes directly:
187+
`browser run` uses QuickJS, not Node.js: `Buffer` is unavailable. For an in-memory upload, pass a `Uint8Array`; encode text with the supported `TextEncoder`:
188188

189189
```js
190190
await page.locator('input[type="file"]').setInputFiles({
191191
name: 'evidence.txt',
192192
mimeType: 'text/plain',
193-
buffer: new Uint8Array([102, 105, 108, 101]),
193+
buffer: new TextEncoder().encode('file'),
194194
});
195195
```
196196

skills/webcmd-browser/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,13 @@ For CAPTCHA or raw user takeover, stop automation, give the user any viewer URL
184184

185185
For native controls, inspect structure first, then use Playwright's normal form APIs inside `run`. Do not guess date formats, option labels, or file constraints from memory; read them from the DOM.
186186

187-
`browser run` uses QuickJS, not Node.js: `Buffer` and `TextEncoder` are unavailable. For an in-memory upload, pass bytes directly:
187+
`browser run` uses QuickJS, not Node.js: `Buffer` is unavailable. For an in-memory upload, pass a `Uint8Array`; encode text with the supported `TextEncoder`:
188188

189189
```js
190190
await page.locator('input[type="file"]').setInputFiles({
191191
name: 'evidence.txt',
192192
mimeType: 'text/plain',
193-
buffer: new Uint8Array([102, 105, 108, 101]),
193+
buffer: new TextEncoder().encode('file'),
194194
});
195195
```
196196

src/browser/run/runner.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
} from 'playwright-core';
2121
import { LocalBrowserRunArtifactSink } from './artifacts.js';
2222
import { MemorySnapshotBaselineStore } from '../snapshot/index.js';
23+
import { MemorySnapshotBaselineStore } from '../snapshot/index.js';
2324
import { unsupportedApiMessage } from './playwright-transport.js';
2425
import { QuickJSHost } from './quickjs-host.js';
2526
import { runBrowserProgram } from './runner.js';

0 commit comments

Comments
 (0)