@vmz/test 0.0.2 → 0.0.3

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 CHANGED
@@ -26,24 +26,29 @@ safe server boundaries, SSR that does not needlessly replay, and application beh
26
26
 
27
27
  ## One scenario, several kinds of evidence
28
28
 
29
- | Surface | Evidence VMZ can collect |
30
- |---|---|
31
- | Compile | Diagnostics, graph identities, and generated boundaries |
32
- | Logic | State transitions, derived work, and cancellation |
33
- | Browser | Real input, semantic locators, DOM, accessibility, and screenshots |
34
- | Router | Matched RouteId, layout retention, loading, errors, and disposal |
35
- | SSR / Resume | HTML, serialized state, event entries, and replay avoidance |
36
- | Deployment | Client/server reachability, capabilities, artifacts, and traces |
29
+ | Surface | Evidence VMZ can collect |
30
+ |--------------|--------------------------------------------------------------------|
31
+ | Compile | Diagnostics, graph identities, and generated boundaries |
32
+ | Logic | State transitions, derived work, and cancellation |
33
+ | Browser | Real input, semantic locators, DOM, accessibility, and screenshots |
34
+ | Router | Matched RouteId, layout retention, loading, errors, and disposal |
35
+ | SSR / Resume | HTML, serialized state, event entries, and replay avoidance |
36
+ | Deployment | Client/server reachability, capabilities, artifacts, and traces |
37
37
 
38
38
  ### UI automation without a borrowed worldview
39
39
 
40
- VMZ can use a real browser protocol as transport while owning locator, action, waiting, and expectation semantics. Tests can find elements by role, label, text, RouteId, or stable test identity; CSS remains an escape hatch rather than the default contract.
40
+ VMZ can use a real browser protocol as transport while owning locator, action, waiting, and expectation semantics. Tests
41
+ can find elements by role, label, text, RouteId, or stable test identity; CSS remains an escape hatch rather than the
42
+ default contract.
41
43
 
42
- Auto-waiting can observe navigation, pending work, region commits, and server activity instead of guessing with arbitrary delays. A failure can connect the visible symptom to the application work that produced it.
44
+ Auto-waiting can observe navigation, pending work, region commits, and server activity instead of guessing with
45
+ arbitrary delays. A failure can connect the visible symptom to the application work that produced it.
43
46
 
44
47
  ### Precision is testable
45
48
 
46
- A fine-grained compiler should prove that nothing unrelated ran. VMZ tests can check that the intended binding changed, unrelated computations stayed idle, an obsolete generation was cancelled, and a disposed owner received no late write. That turns testing into a competitive feature rather than a bundled convenience.
49
+ A fine-grained compiler should prove that nothing unrelated ran. VMZ tests can check that the intended binding changed,
50
+ unrelated computations stayed idle, an obsolete generation was cancelled, and a disposed owner received no late write.
51
+ That turns testing into a competitive feature rather than a bundled convenience.
47
52
 
48
53
  ## License
49
54
 
package/dist/browser.d.ts CHANGED
@@ -1,12 +1,11 @@
1
1
  /**
2
- * Browser Host for `vmz test --mode browser` (T2 close slice).
2
+ * Browser Host for `vmz test --mode browser` ( close slice).
3
3
  *
4
4
  * Real Chromium/Chrome via CDP. Transport may use puppeteer-core as a CDP
5
5
  * client — that is NOT the Playwright/Puppeteer *test model*. Manifest actions
6
6
  * and assertions remain the VMZ Browser Host protocol; same Direct schedule as
7
7
  * production (`__vmzCreate` in a real document).
8
8
  *
9
- * Design: 规划设计/vmz/16 §T2 · §5 浏览器连接
10
9
  */
11
10
  type Diag = {
12
11
  severity: string;
package/dist/browser.js CHANGED
@@ -1,12 +1,11 @@
1
1
  /**
2
- * Browser Host for `vmz test --mode browser` (T2 close slice).
2
+ * Browser Host for `vmz test --mode browser` ( close slice).
3
3
  *
4
4
  * Real Chromium/Chrome via CDP. Transport may use puppeteer-core as a CDP
5
5
  * client — that is NOT the Playwright/Puppeteer *test model*. Manifest actions
6
6
  * and assertions remain the VMZ Browser Host protocol; same Direct schedule as
7
7
  * production (`__vmzCreate` in a real document).
8
8
  *
9
- * Design: 规划设计/vmz/16 §T2 · §5 浏览器连接
10
9
  */
11
10
  import { spawn } from 'node:child_process';
12
11
  import fs from 'node:fs';
package/dist/compile.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Compile-mode host for `vmz test` / `@vmz/test` (T1+).
2
+ * Compile-mode host for `vmz test` / `@vmz/test` (+).
3
3
  * Builds the project and checks graph/plan/view assertions against dist artifacts.
4
4
  */
5
5
  export type CreateWorkspaceFn = (opts: {
package/dist/compile.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Compile-mode host for `vmz test` / `@vmz/test` (T1+).
2
+ * Compile-mode host for `vmz test` / `@vmz/test` (+).
3
3
  * Builds the project and checks graph/plan/view assertions against dist artifacts.
4
4
  */
5
5
  import fs from 'node:fs';
@@ -256,7 +256,7 @@ export function runCompileManifest(manifest, ctx) {
256
256
  }
257
257
  if (expect.noRender === true || expect.noRenderFallback === true) {
258
258
  if (clientJs.includes('prototype.render')) {
259
- fail('production client must not emit prototype.render (Gate 3)');
259
+ fail('production client must not emit prototype.render (production Direct emit)');
260
260
  }
261
261
  }
262
262
  if (typeof expect.includes === 'string' && !clientJs.includes(expect.includes)) {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Deployment host for `vmz test --mode deployment` (T3).
2
+ * Deployment host for `vmz test --mode deployment` .
3
3
  * Proves deployment IR + server capability isolation (client stubs vs #server body).
4
4
  */
5
5
  type Diag = {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Deployment host for `vmz test --mode deployment` (T3).
2
+ * Deployment host for `vmz test --mode deployment` .
3
3
  * Proves deployment IR + server capability isolation (client stubs vs #server body).
4
4
  */
5
5
  import fs from 'node:fs';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Discover VMZ native test manifests (T0).
2
+ * Discover VMZ native test manifests .
3
3
  */
4
4
  export declare function listManifestFiles(root: string): string[];
5
5
  export type DiscoveredManifest = Record<string, unknown> & {
package/dist/discover.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Discover VMZ native test manifests (T0).
2
+ * Discover VMZ native test manifests .
3
3
  */
4
4
  import fs from 'node:fs';
5
5
  import path from 'node:path';
package/dist/logic.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  /**
2
2
  * Logic-mode host — headless document (linkedom), same Direct __vmzCreate as production.
3
- * Design: 规划设计/vmz/16 — not Browser Host / Playwright.
4
3
  */
5
4
  export declare function installHeadlessDocument(): Document;
6
5
  export type LogicHost = {
package/dist/logic.js CHANGED
@@ -1,6 +1,5 @@
1
1
  /**
2
2
  * Logic-mode host — headless document (linkedom), same Direct __vmzCreate as production.
3
- * Design: 规划设计/vmz/16 — not Browser Host / Playwright.
4
3
  */
5
4
  import fs from 'node:fs';
6
5
  import path from 'node:path';
@@ -1,7 +1,6 @@
1
1
  /**
2
- * VMZ native test protocol (T0) — validators + report builders.
2
+ * VMZ native test protocol — validators + report builders.
3
3
  * Schema ids live in `@vmz/protocol` (mirrors Rust `vmz-protocol`).
4
- * Design: 规划设计/vmz/16 — not a Test IR; references Program Graph + Execution Plan.
5
4
  */
6
5
  export { EXECUTION_PLAN_REF_SCHEMA, PLAN_SCHEMA, TEST_ACTION_SCHEMA, TEST_ASSERTION_SCHEMA, TEST_MANIFEST_SCHEMA, TEST_PROTOCOL, TEST_REPORT_SCHEMA, testCatalog, } from '@vmz/protocol';
7
6
  export type TestMode = 'compile' | 'logic' | 'browser' | 'ssr' | 'resume' | 'deployment' | 'all';
@@ -16,7 +15,7 @@ export type ManifestValidation = {
16
15
  ok: false;
17
16
  error: string;
18
17
  };
19
- /** Validate a discovered manifest object (narrow T0 checks). */
18
+ /** Validate a discovered manifest object (narrow checks). */
20
19
  export declare function validateManifest(raw: unknown, file: string): ManifestValidation;
21
20
  export type TestReportEntryInput = {
22
21
  testId: string;
package/dist/protocol.js CHANGED
@@ -1,7 +1,6 @@
1
1
  /**
2
- * VMZ native test protocol (T0) — validators + report builders.
2
+ * VMZ native test protocol — validators + report builders.
3
3
  * Schema ids live in `@vmz/protocol` (mirrors Rust `vmz-protocol`).
4
- * Design: 规划设计/vmz/16 — not a Test IR; references Program Graph + Execution Plan.
5
4
  */
6
5
  import { EXECUTION_PLAN_REF_SCHEMA, PLAN_SCHEMA, TEST_MANIFEST_SCHEMA, TEST_REPORT_SCHEMA } from '@vmz/protocol';
7
6
  export { EXECUTION_PLAN_REF_SCHEMA, PLAN_SCHEMA, TEST_ACTION_SCHEMA, TEST_ASSERTION_SCHEMA, TEST_MANIFEST_SCHEMA, TEST_PROTOCOL, TEST_REPORT_SCHEMA, testCatalog, } from '@vmz/protocol';
@@ -26,7 +25,7 @@ export function parseModes(raw) {
26
25
  }
27
26
  return parts;
28
27
  }
29
- /** Validate a discovered manifest object (narrow T0 checks). */
28
+ /** Validate a discovered manifest object (narrow checks). */
30
29
  export function validateManifest(raw, file) {
31
30
  if (!raw || typeof raw !== 'object') {
32
31
  return { ok: false, error: `${file}: manifest must be an object` };
package/dist/resume.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Resume host for `vmz test --mode resume` (T2/T3 first slice).
2
+ * Resume host for `vmz test --mode resume` (/ first slice).
3
3
  * SSR shell → resume adopt → event patch; onMount must not run.
4
4
  */
5
5
  type Diag = {
package/dist/resume.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Resume host for `vmz test --mode resume` (T2/T3 first slice).
2
+ * Resume host for `vmz test --mode resume` (/ first slice).
3
3
  * SSR shell → resume adopt → event patch; onMount must not run.
4
4
  */
5
5
  import path from 'node:path';
@@ -138,7 +138,7 @@ export async function runResumeManifest(manifest, ctx) {
138
138
  }
139
139
  island = el;
140
140
  el.click();
141
- // EventEntry resume is async via Promise.resolve(fn()).
141
+ // EventEntry resume is async via Promise.resolve(fn).
142
142
  await Promise.resolve();
143
143
  await Promise.resolve();
144
144
  await new Promise((r) => setTimeout(r, Number(a.waitMs ?? 10)));
package/dist/ssr.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * SSR / hydrate / stream host for `vmz test --mode ssr` (T2).
2
+ * SSR / hydrate / stream host for `vmz test --mode ssr` .
3
3
  * Same Direct schedule as production via linkedom + renderToString / renderToStream / hydrate.
4
4
  */
5
5
  type Diag = {
package/dist/ssr.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * SSR / hydrate / stream host for `vmz test --mode ssr` (T2).
2
+ * SSR / hydrate / stream host for `vmz test --mode ssr` .
3
3
  * Same Direct schedule as production via linkedom + renderToString / renderToStream / hydrate.
4
4
  */
5
5
  import path from 'node:path';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vmz/test",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "type": "module",
5
5
  "description": "VMZ native test protocol + Compile/Logic/Browser/SSR/Resume/Deployment hosts",
6
6
  "main": "./dist/index.js",
@@ -21,15 +21,14 @@
21
21
  },
22
22
  "files": [
23
23
  "dist",
24
- "src",
25
24
  "README.md"
26
25
  ],
27
26
  "scripts": {
28
27
  "build": "tsc -p tsconfig.json"
29
28
  },
30
29
  "dependencies": {
31
- "@vmz/core": "0.0.2",
32
- "@vmz/protocol": "0.0.2",
30
+ "@vmz/core": "0.0.3",
31
+ "@vmz/protocol": "0.0.3",
33
32
  "linkedom": "^0.18.13",
34
33
  "puppeteer-core": "^24.11.2"
35
34
  },