@crouton-kit/capture 1.4.10 → 1.4.11

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 (3) hide show
  1. package/README.md +15 -6
  2. package/bin/capture +3 -3
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -36,8 +36,13 @@ Both ship a JavaScript escape hatch, so much of this is *reachable* in either on
36
36
  | Per-frame geometry of one element through an animation | ✅ | ❌ Video file only | ❌ Must use raw JS |
37
37
  | Changed pixel regions attributed to elements | ✅ | ❌ Must use raw JS | ❌ Must use raw JS |
38
38
  | A whole interaction as one image | ✅ | ❌ | ❌ |
39
+ | Stub network responses from ordered rules | ✅ `tab mock` | ✅ `browser_route` | ❌ No interception tools |
40
+ | Core Web Vitals with subparts and attribution | ✅ `perf vitals` | ❌ Trace file for the Trace Viewer | ✅ Trace insights |
41
+ | DevTools insight set — render-blocking, forced reflow, shift culprits | ✅ `perf insights` | ❌ | ✅ |
42
+ | Lighthouse, failing nodes in the reply | ✅ Per-node DOM path, selector, snippet | ❌ | ❌ Scores and counts; findings in the report file |
43
+ | Heap census, retaining paths, snapshot diff | ✅ `heap` | ❌ | ✅ Behind `--memoryDebugging` |
39
44
 
40
- Both do things capture does not. Playwright MCP is cross-browser and can mock network responses; Chrome DevTools MCP has Core Web Vitals, real Lighthouse, DevTools performance tracing and heap profiling. capture is Chromium-only and points at one question — what is this page actually doing, in numbers.
45
+ Both still do things capture does not. Playwright MCP is cross-browser — the sharpest structural gap — and has storage-state save/restore, test-code generation, device presets, PDF export, and richer input verbs (hover, drag, file upload). Chrome DevTools MCP automates Chrome extensions and PWAs and has CPU-throttling presets. capture is Chromium-only and points at one question — what is this page actually doing, in numbers.
41
46
 
42
47
  ## See it
43
48
 
@@ -137,15 +142,18 @@ Add `--gate` to `check` or `diff` and it exits nonzero on findings, so the same
137
142
 
138
143
  ## The command surface
139
144
 
140
- Seven roots. Every leaf renders prose by default and mirrors the same result under `--json`.
145
+ Ten roots. Every leaf renders prose by default and mirrors the same result under `--json`.
141
146
 
142
147
  | root | what it owns |
143
148
  |---|---|
144
149
  | `session` | the artifact container — records HAR, bundles artifacts, sets the active context |
145
- | `page` | verbs against the live tab — `click`, `type`, `scroll`, `navigate`, `exec`, `shot`, `elements` |
146
- | `tab` | browser and tab plumbing — `launch`, `list`, `open`, `close`, `reset`, `network` |
147
- | `measure` | settled-snapshot substrate plus read-only queries — `snap`, `check`, `diff`, `explain`, `sweep`, `census`, `map` |
150
+ | `page` | verbs against the live tab — `click`, `type`, `scroll`, `navigate`, `exec`, `repeat`, `shot`, `elements`, `inspect` |
151
+ | `tab` | browser and tab plumbing — `launch`, `quit`, `list`, `open`, `close`, `reset`, `network`, `mock` |
152
+ | `measure` | settled-snapshot substrate plus read-only queries — `snap`, `check`, `diff`, `explain`, `sweep`, `census`, `map`, `text` |
148
153
  | `motion` | recorder lifecycle plus queries over a recording — `rec`, `mask`, `timeline`, `response`, `jank` |
154
+ | `perf` | performance-trace substrate — `trace` records, `vitals` and `insights` read it |
155
+ | `heap` | V8 heap-snapshot substrate — `snapshot`, `census`, `objects`, `retainers`, `diff` |
156
+ | `lighthouse` | runs Lighthouse against a URL and stores its report unmodified |
149
157
  | `cdp` | raw Chrome DevTools Protocol escape hatch |
150
158
  | `lib` | vault-lib introspection, for running forked libs in the tab |
151
159
 
@@ -153,11 +161,12 @@ Run any of them bare for the subcommand list, or `capture <root> <leaf> -h` for
153
161
 
154
162
  ## How it fits together
155
163
 
156
- Three artifact kinds, and the split matters because it is what keeps queries cheap.
164
+ A session is the container; recorded substrates are what keep queries cheap.
157
165
 
158
166
  - **A session** is the container. It opens or adopts a tab, records HAR while it is active, and writes a bundle manifest when it stops. Everything produced while it runs lands in one directory.
159
167
  - **A snapshot** (`measure snap`) drives the page once and writes a settled substrate — geometry, styles, accessibility, layers, hit testing, text, forms, screenshot. Every other `measure` leaf is a cheap read over that artifact and never re-drives the browser.
160
168
  - **A recording** (`motion rec`) captures an interaction, one-shot or composed across several commands. Every other `motion` leaf reads the finalized recording.
169
+ - **A performance trace** (`perf trace`) and **a heap snapshot** (`heap snapshot`) work the same way: record once, then `vitals`/`insights` and `census`/`objects`/`retainers`/`diff` are read-only queries over the artifact.
161
170
 
162
171
  Findings exit 0 — they are a report, not a crash. Only `check` and `diff` accept `--gate`, which turns findings into exit 2.
163
172
 
package/bin/capture CHANGED
@@ -10512,7 +10512,7 @@ function validateHarAppendBatch(value, source) {
10512
10512
  return { entries, incompleteLifecycles };
10513
10513
  }
10514
10514
  function captureVersion() {
10515
- const version = "1.4.10";
10515
+ const version = "1.4.11";
10516
10516
  return typeof version === "string" && version.length > 0 ? version : "development";
10517
10517
  }
10518
10518
  function token() {
@@ -12614,7 +12614,7 @@ function wallTime(value) {
12614
12614
  }
12615
12615
  }
12616
12616
  function captureVersion2() {
12617
- const version = "1.4.10";
12617
+ const version = "1.4.11";
12618
12618
  return typeof version === "string" && version.length > 0 ? version : "development";
12619
12619
  }
12620
12620
  function deepFreeze(value) {
@@ -267296,7 +267296,7 @@ I/O contract: flags and positionals on input; one rendered prose block on stdout
267296
267296
  A CDP-enabled browser must be running; \`capture tab list\` is the probe, and \`capture tab launch\` starts one capture owns and reaps when nothing is (never hand-roll a detached browser \u2014 nothing reaps that). Capture never signals a browser it did not start, so attaching to your own with --port is unchanged. CDP_PORT / CDP_TARGET pin the browser + tab for target-selecting commands \u2014 precedence: explicit flag > active session > env. \`session start\` adopts only an explicit --target.`;
267297
267297
  }
267298
267298
  function printVersion() {
267299
- const declared = "1.4.10";
267299
+ const declared = "1.4.11";
267300
267300
  if (declared) {
267301
267301
  console.log(declared);
267302
267302
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crouton-kit/capture",
3
- "version": "1.4.10",
3
+ "version": "1.4.11",
4
4
  "description": "Browser automation and UI validation via CDP — session-based screenshots, HAR, a11y, click/type, and JS exec",
5
5
  "bin": {
6
6
  "capture": "./bin/capture"