@qontinui/ui-bridge-wrapper 0.7.1 → 0.7.2

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.
@@ -17,10 +17,10 @@
17
17
  * does require the optional `@qontinui/ui-bridge-headless` peer plus a one-time
18
18
  * `npx playwright install chromium` (or `PLAYWRIGHT_BROWSERS_PATH`). See README.
19
19
  *
20
- * ui-bridge-capture-specs --out D:/qontinui-root/spec-capture
20
+ * ui-bridge-capture-specs --out ./spec-capture
21
21
  * (creds via env UIB_LOGIN_EMAIL/PASSWORD or --email/--password)
22
22
  */
23
- export declare const USAGE = "ui-bridge-capture-specs \u2014 log in and snapshot authed pages via the injected transport\n\nRequired (one of):\n --email <e> / --password <p> Credentials. Falls back to env\n UIB_LOGIN_EMAIL / UIB_LOGIN_PASSWORD.\n\nOptions:\n --out <dir> Output dir for <slug>.snapshot.json files\n (default D:/qontinui-root/spec-capture).\n --origin <url> App origin (default https://qontinui.io).\n --pages \"slug=path,slug=path\" Pages to capture (paths joined to --origin;\n absolute http(s) URLs used verbatim). Default =\n the two admin coord pages.\n --device <id> device_id query for the default trees page.\n --timeout <ms> Per-hop wait budget (default 70000).\n --quiet Suppress human-readable stderr logs (the per-page\n JSON lines still print).\n --help, -h Print this help and exit.\n\nPrerequisites (packaged bin): the optional @qontinui/ui-bridge-headless peer must\nbe installed AND Chromium available (run `npx playwright install chromium` once,\nor set PLAYWRIGHT_BROWSERS_PATH).\n\nExits non-zero if any capture bounced to login or errored.\n";
23
+ export declare const USAGE = "ui-bridge-capture-specs \u2014 log in and snapshot authed pages via the injected transport\n\nRequired (one of):\n --email <e> / --password <p> Credentials. Falls back to env\n UIB_LOGIN_EMAIL / UIB_LOGIN_PASSWORD.\n\nOptions:\n --out <dir> Output dir for <slug>.snapshot.json files\n (default ./spec-capture, relative to cwd).\n --origin <url> App origin (default https://qontinui.io).\n --pages \"slug=path,slug=path\" Pages to capture (paths joined to --origin;\n absolute http(s) URLs used verbatim). Default =\n the two admin coord pages.\n --device <id> device_id query for the default trees page.\n --timeout <ms> Per-hop wait budget (default 70000).\n --quiet Suppress human-readable stderr logs (the per-page\n JSON lines still print).\n --help, -h Print this help and exit.\n\nPrerequisites (packaged bin): the optional @qontinui/ui-bridge-headless peer must\nbe installed AND Chromium available (run `npx playwright install chromium` once,\nor set PLAYWRIGHT_BROWSERS_PATH).\n\nExits non-zero if any capture bounced to login or errored.\n";
24
24
  /** A page to capture: a display slug + the absolute URL to navigate to. */
25
25
  export interface PageTarget {
26
26
  slug: string;
@@ -1 +1 @@
1
- {"version":3,"file":"capture-specs-cli.d.ts","sourceRoot":"","sources":["../src/capture-specs-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAUH,eAAO,MAAM,KAAK,szCAwBjB,CAAC;AAOF,2EAA2E;AAC3E,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED,uCAAuC;AACvC,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,KAAK,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IAC3B,iFAAiF;IACjF,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;CACf;AAED,6EAA6E;AAC7E,qBAAa,kBAAmB,SAAQ,KAAK;gBAC/B,OAAO,EAAE,MAAM;CAI5B;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,EAAE,CAoBrE;AAED,gEAAgE;AAChE,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,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E,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,EAAE,CAK3E;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,UAAU,EAAE,EACrB,MAAM,EAAE,MAAM,GACb;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAYhD;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,cAAc,CA8CxD;AAaD,8EAA8E;AAC9E,wBAAgB,YAAY,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAKvD"}
@@ -3,10 +3,30 @@
3
3
  *
4
4
  * Tiny helper that produces a JSON-Schema-subset object from a plain
5
5
  * descriptor, matching the shape `useUIComponent` already exposes on its
6
- * `actions[].paramSchema` field. The existing SDK contract says "no
7
- * runtime validation is performed" — this helper's only job is to surface
8
- * parameter names and types on the runner's `/control/component/:id`
9
- * endpoint so callers can discover the action signature.
6
+ * `actions[].paramSchema` field. It surfaces parameter names and types on the
7
+ * runner's `/control/component/:id` endpoint so callers can discover the
8
+ * action signature.
9
+ *
10
+ * ⚠️ **The output is ENFORCED, not merely advertised.** This doc used to say
11
+ * the SDK performs "no runtime validation"; that stopped being true in Phase 2
12
+ * of plan `2026-08-20-ui-bridge-action-declaration-shape`. The invocation seam
13
+ * now checks `params` against the schema before the handler runs, and the
14
+ * object form this helper emits is exactly form 1 of the supported subset
15
+ * (`@qontinui/ui-bridge` `core/param-schema.ts`, which documents the grammar).
16
+ * Enforcement defaults to `'warn'`, so a wrong schema logs rather than breaks —
17
+ * until a deployment arms `setDefaultParamValidationMode('enforce')`, at which
18
+ * point it rejects real calls with `UB-ACTION-REJECTED`.
19
+ *
20
+ * Two consequences worth knowing before you declare one:
21
+ *
22
+ * - **`additionalProperties: false` is always emitted**, so any param not in
23
+ * the descriptor is a violation. That is the point of the helper, but it
24
+ * means a handler that quietly accepts extras must declare them.
25
+ * - **An unrecognised type name is passed through verbatim** (see `normalize`
26
+ * below). The validator treats a `type` outside the seven JSON Schema
27
+ * primitive names as expressing no constraint, so a typo like `"sting"`
28
+ * silently validates everything rather than rejecting everything. It fails
29
+ * open, not closed — but it fails.
10
30
  *
11
31
  * Accepted descriptor values:
12
32
  * - a JSON-Schema type name string (`"string"`, `"number"`, ...)
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/helpers/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAYH,KAAK,WAAW,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;AAkBvE,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,EACjE,KAAK,EAAE,CAAC,GACP,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAuBzB"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/helpers/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAYH,KAAK,WAAW,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;AAkBvE,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,EACjE,KAAK,EAAE,CAAC,GACP,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAuBzB"}