ptywright 0.4.0 → 0.6.0
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/README.md +38 -31
- package/dist/agent.mjs +2 -2
- package/dist/bin/ptywright.mjs +1 -1
- package/dist/{cli-C40H_ElC.mjs → cli-IXmvK56U.mjs} +2519 -2472
- package/dist/cli.mjs +1 -1
- package/dist/config.mjs +1 -1
- package/dist/data-sdbf3IDh.mjs +18 -0
- package/dist/env-DPYHo-zH.mjs +36 -0
- package/dist/index.mjs +1 -1
- package/dist/manifest_files-DW80c1H7.mjs +77 -0
- package/dist/mcp.mjs +1 -1
- package/dist/pty-cassette.mjs +2 -1
- package/dist/{pty_like-DqCo7XdB.mjs → pty_like-DWIlWGgA.mjs} +4 -20
- package/dist/{runner-zApMYWZx.mjs → runner-BHXXwxYp.mjs} +1578 -1423
- package/dist/{runner-CembqDgJ.mjs → runner-GIEf0C6d.mjs} +2434 -1134
- package/dist/script.mjs +1 -1
- package/dist/{server-h--2U0Ic.mjs → server-ceZ1-s_J.mjs} +2643 -2527
- package/dist/session.mjs +1 -1
- package/dist/style-BtIUv5H0.mjs +65 -0
- package/dist/{terminal_session-DopC7Xg6.mjs → terminal_session-MX_vWpRG.mjs} +322 -364
- package/package.json +2 -1
- package/dist/{config-B0r-JCFI.mjs → config-bGg636EW.mjs} +1 -1
package/README.md
CHANGED
|
@@ -315,64 +315,71 @@ expose the terminal root as `[data-terminal-root]`.
|
|
|
315
315
|
|
|
316
316
|
```bash
|
|
317
317
|
# First run records snapshots, screenshots, replay metadata, and report.
|
|
318
|
-
bun run
|
|
318
|
+
bun run src/cli.ts agent run examples/agent_deterministic.json --update-snapshots
|
|
319
319
|
|
|
320
320
|
# Later runs compare terminal + DOM snapshots like a test snapshot.
|
|
321
|
-
bun run
|
|
321
|
+
bun run src/cli.ts agent run examples/agent_deterministic.json
|
|
322
322
|
|
|
323
323
|
# Replay does not need AI; it uses the recorded flow artifact.
|
|
324
|
-
bun run
|
|
324
|
+
bun run src/cli.ts agent replay .tmp/agent/agent_deterministic/agent_deterministic.agent-run.json
|
|
325
325
|
|
|
326
326
|
# Cassette files are also directly replayable.
|
|
327
|
-
bun run
|
|
327
|
+
bun run src/cli.ts agent replay .tmp/agent/agent_deterministic/agent_deterministic.cassette.json
|
|
328
328
|
|
|
329
329
|
# Promote a live run/cassette into the committed non-AI regression suite.
|
|
330
|
-
bun run
|
|
330
|
+
bun run src/cli.ts agent promote \
|
|
331
331
|
.tmp/agent/agent_deterministic/agent_deterministic.cassette.json \
|
|
332
332
|
--update-snapshots
|
|
333
333
|
|
|
334
334
|
# Batch replay committed cassettes/run records as a regression suite.
|
|
335
|
-
bun run
|
|
335
|
+
bun run src/cli.ts agent replay-all .tmp/agent --artifacts-root .tmp/agent-replay-all
|
|
336
336
|
|
|
337
337
|
# Rerun directly from a generated summary artifact.
|
|
338
|
-
bun run
|
|
339
|
-
bun run
|
|
340
|
-
bun run
|
|
338
|
+
bun run src/cli.ts agent rerun .tmp/agent-promote/agent_deterministic/agent-promote.summary.json
|
|
339
|
+
bun run src/cli.ts agent rerun .tmp/agent-check/agent-check.summary.json
|
|
340
|
+
bun run src/cli.ts agent rerun .tmp/agent-check/agent-replay.summary.json --update-snapshots
|
|
341
341
|
|
|
342
342
|
# Read reusable commands from any supported agent artifact.
|
|
343
|
-
bun run
|
|
344
|
-
bun run
|
|
345
|
-
bun run
|
|
346
|
-
bun run
|
|
347
|
-
bun run
|
|
348
|
-
bun run
|
|
349
|
-
bun run
|
|
350
|
-
bun run
|
|
351
|
-
bun run
|
|
352
|
-
bun run
|
|
343
|
+
bun run src/cli.ts agent commands .tmp/agent-check/agent-check.summary.json --json
|
|
344
|
+
bun run src/cli.ts agent commands .tmp/agent-check/agent-check.summary.json --command rerun
|
|
345
|
+
bun run src/cli.ts agent commands .tmp/agent-check --json
|
|
346
|
+
bun run src/cli.ts agent inspect .tmp/agent-check
|
|
347
|
+
bun run src/cli.ts agent inspect .tmp/agent-check --json
|
|
348
|
+
bun run src/cli.ts agent validate .tmp/agent-check
|
|
349
|
+
bun run src/cli.ts agent exec .tmp/agent-check --command rerun
|
|
350
|
+
bun run src/cli.ts agent exec .tmp/agent-check --command updateSnapshots
|
|
351
|
+
bun run src/cli.ts agent exec .tmp/agent-check/agent-check.summary.json --command rerun
|
|
352
|
+
bun run src/cli.ts agent exec .tmp/agent-check/agent-check.summary.json --command updateSnapshots
|
|
353
353
|
|
|
354
354
|
# Validate flow/cassette/run-record/summary artifacts before committing.
|
|
355
|
-
bun run
|
|
355
|
+
bun run src/cli.ts agent validate .tmp/agent-replay-all
|
|
356
356
|
|
|
357
357
|
# Run committed cassette replay regression without launching live agents.
|
|
358
|
-
bun run
|
|
359
|
-
bun run
|
|
358
|
+
bun run src/cli.ts agent check
|
|
359
|
+
bun run src/cli.ts agent check --json
|
|
360
360
|
|
|
361
361
|
# Update terminal/DOM baselines from committed cassettes intentionally.
|
|
362
|
-
bun run
|
|
362
|
+
bun run src/cli.ts agent replay-all tests/agent-cassettes --update-snapshots
|
|
363
363
|
|
|
364
364
|
# Record browser interactions into a replayable flow spec.
|
|
365
|
-
bun run
|
|
365
|
+
bun run src/cli.ts agent record examples/agents/codex_browser_smoke.json \
|
|
366
366
|
--out scripts/agents/codex_recorded.flow.json \
|
|
367
367
|
--duration-ms 60000 \
|
|
368
368
|
--headed
|
|
369
369
|
|
|
370
370
|
# Generate starter specs for real agents.
|
|
371
|
-
bun run
|
|
372
|
-
bun run
|
|
373
|
-
bun run
|
|
371
|
+
bun run src/cli.ts agent init codex examples/agents/codex_browser_smoke.json
|
|
372
|
+
bun run src/cli.ts agent init claude examples/agents/claude_browser_smoke.json
|
|
373
|
+
bun run src/cli.ts agent init droidx examples/agents/droidx_browser_smoke.json
|
|
374
374
|
```
|
|
375
375
|
|
|
376
|
+
DOM artifact viewers use `@aitty/snapshot` as the report renderer. ptywright
|
|
377
|
+
copies `@aitty/snapshot/style.css` and the classic
|
|
378
|
+
`@aitty/snapshot/web-component.global.js` bundle into the report artifacts, then
|
|
379
|
+
renders snapshots through `<aitty-snapshot>`. Terminal internals such as wterm
|
|
380
|
+
rows, ANSI styling, termvision, and viewport-pan come from `@aitty/snapshot`;
|
|
381
|
+
ptywright only supplies the report frame and copied assets.
|
|
382
|
+
|
|
376
383
|
Artifacts are split intentionally:
|
|
377
384
|
- `.tmp/agent/<name>/` contains run output, screenshots, `*.flow.json`,
|
|
378
385
|
`*.agent-run.json`, `*.cassette.json`, `index.html`, and
|
|
@@ -567,7 +574,7 @@ details.
|
|
|
567
574
|
bun install
|
|
568
575
|
|
|
569
576
|
# Start MCP server
|
|
570
|
-
bun run
|
|
577
|
+
bun run src/cli.ts mcp
|
|
571
578
|
|
|
572
579
|
# Run tests
|
|
573
580
|
bun run test
|
|
@@ -581,11 +588,11 @@ bun run lint
|
|
|
581
588
|
bun run format:check
|
|
582
589
|
|
|
583
590
|
# Run scripts
|
|
584
|
-
bun run
|
|
585
|
-
bun run
|
|
591
|
+
bun run src/cli.ts run scripts/m5_mask_demo.json
|
|
592
|
+
bun run src/cli.ts run-all
|
|
586
593
|
|
|
587
594
|
# Run browser agent regression
|
|
588
|
-
bun run
|
|
595
|
+
bun run src/cli.ts agent run examples/agent_deterministic.json --update-snapshots
|
|
589
596
|
```
|
|
590
597
|
|
|
591
598
|
## Environment Variables
|
package/dist/agent.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { defaultSpecNameForPath,
|
|
1
|
+
import { a as formatAgentLaunchPlan, i as runAgentSpecPath, n as replayAgentRecordPath, r as runAgentSpec, t as defaultSpecNameForPath } from "./runner-GIEf0C6d.mjs";
|
|
2
|
+
export { defaultSpecNameForPath, formatAgentLaunchPlan, replayAgentRecordPath, runAgentSpec, runAgentSpecPath };
|
package/dist/bin/ptywright.mjs
CHANGED