@ggui-ai/ui-visual-tester 0.3.0-rc.0 → 0.4.0-rc.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/fixture/fixture-runtime.js +32 -3
- package/package.json +5 -5
|
@@ -41055,7 +41055,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
41055
41055
|
|
|
41056
41056
|
// ../protocol/dist/gadgets/stdlib-gadgets.js
|
|
41057
41057
|
var STDLIB_GADGETS_PACKAGE = "@ggui-ai/gadgets";
|
|
41058
|
-
var STDLIB_GADGETS_VERSION = "0.
|
|
41058
|
+
var STDLIB_GADGETS_VERSION = "0.4.0-rc.0";
|
|
41059
41059
|
var STDLIB_GADGETS = [
|
|
41060
41060
|
{
|
|
41061
41061
|
package: STDLIB_GADGETS_PACKAGE,
|
|
@@ -41668,6 +41668,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
41668
41668
|
kind: external_exports.enum(["full-template", "cold"]).optional().describe("full-template = a whole stored component was served; cold = freshly generated."),
|
|
41669
41669
|
reason: external_exports.string().optional().describe("Compact human-readable explanation of the cache outcome \u2014 why this render reused a stored component or generated cold. Diagnostic; default-available without the verbose env-gated trace.")
|
|
41670
41670
|
});
|
|
41671
|
+
var renderErrorCodeSchema = external_exports.enum([
|
|
41672
|
+
"PRODUCTION_FAILED",
|
|
41673
|
+
"VALIDATION_ERROR",
|
|
41674
|
+
"NO_PLATFORM_KEY",
|
|
41675
|
+
"NO_CREDENTIALS"
|
|
41676
|
+
]);
|
|
41677
|
+
var renderErrorSchema = external_exports.object({
|
|
41678
|
+
code: renderErrorCodeSchema.describe("Canonical failure class. PRODUCTION_FAILED: generation did not produce a component. VALIDATION_ERROR: a server-side precondition rejected the render before generation. NO_PLATFORM_KEY: the server's managed provider-key configuration has no key for the resolved route. NO_CREDENTIALS: no generation credentials are configured on the server."),
|
|
41679
|
+
message: external_exports.string().describe("Human-readable failure detail \u2014 fold into the next attempt or surface to the operator.")
|
|
41680
|
+
});
|
|
41671
41681
|
var renderOutputSchema = external_exports.object({
|
|
41672
41682
|
sessionId: external_exports.string(),
|
|
41673
41683
|
/**
|
|
@@ -41677,13 +41687,24 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
41677
41687
|
* tool_results (OpenAI Agents SDK, Google ADK) reach the mount URI;
|
|
41678
41688
|
* SDKs that preserve `_meta` see the same value on both fields.
|
|
41679
41689
|
* Mirrors the `resourceUri` field on `ggui_update`'s output.
|
|
41690
|
+
*
|
|
41691
|
+
* OPTIONAL — present iff the render is mountable. Absent on the
|
|
41692
|
+
* failure envelope (`error` present): a failed render commits an
|
|
41693
|
+
* error GguiSession but exposes no mount affordance.
|
|
41680
41694
|
*/
|
|
41681
|
-
resourceUri: external_exports.string(),
|
|
41695
|
+
resourceUri: external_exports.string().optional().describe("MCP-Apps mount URI (ui://ggui/render/{id}). Present iff the render is mountable; absent on a failed render."),
|
|
41682
41696
|
action: external_exports.enum(["create", "reuse", "update", "replace", "declined"]),
|
|
41683
41697
|
contractHash: external_exports.string().describe("Canonical hash of the rendered data contract (shape only \u2014 fields, types, specs). Same hash \u27FA same data flow."),
|
|
41684
41698
|
blueprintId: external_exports.string().describe("Opaque id of the materialised component for this render. On the handshake-decided reuse paths (accept a cache-origin proposal, or a variance re-aim that resolves to an existing variant) it is the stored id \u2014 equal ids across renders mean the same stored component. override.contract always generates cold and mints a fresh id, even for an identical contract."),
|
|
41685
41699
|
variantKey: external_exports.string().describe("Canonical hash of the design-time variance (persona, aesthetic, seed prompt, context). With contractHash it forms the reuse key: the same pair reuses one component; a different variant of the same contract gets its own."),
|
|
41686
41700
|
cache: renderCacheMarkerSchema.describe("Reuse outcome for this render: whether a stored component was served, its similarity, the matched component id, and how many generation calls that avoided."),
|
|
41701
|
+
/**
|
|
41702
|
+
* In-result failure marker — present iff the tool result is
|
|
41703
|
+
* `isError: true`. The structuredContent stays schema-conformant on
|
|
41704
|
+
* failures; this field carries the canonical `{code, message}`
|
|
41705
|
+
* classification. Absent on every successful render.
|
|
41706
|
+
*/
|
|
41707
|
+
error: renderErrorSchema.optional().describe("Present iff the tool result is isError \u2014 canonical {code, message} for a failed/rejected generation. Absent on success."),
|
|
41687
41708
|
/**
|
|
41688
41709
|
* Wire-shape recovery hint for the next call. Emitted ONLY when the
|
|
41689
41710
|
* rendered contract has a non-empty `actionSpec` — i.e. the agent will
|
|
@@ -41719,7 +41740,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
41719
41740
|
]);
|
|
41720
41741
|
var updateOutputSchema = external_exports.object({
|
|
41721
41742
|
sessionId: external_exports.string(),
|
|
41722
|
-
updated: external_exports.boolean()
|
|
41743
|
+
updated: external_exports.boolean(),
|
|
41744
|
+
/**
|
|
41745
|
+
* Unchanged from the initial render — the same `ui://ggui/render/{id}`
|
|
41746
|
+
* URI the mount stamped. Mirrored on the LLM-visible structuredContent
|
|
41747
|
+
* so SDKs that strip `_meta` from tool_results can still reach the
|
|
41748
|
+
* mount URI. Kept in sync with the update handler's wire shape —
|
|
41749
|
+
* this export and the handler's inline schema must not drift.
|
|
41750
|
+
*/
|
|
41751
|
+
resourceUri: external_exports.string()
|
|
41723
41752
|
});
|
|
41724
41753
|
var declareToolCatalogInputSchema = external_exports.object({
|
|
41725
41754
|
toolCatalog: external_exports.record(external_exports.string(), external_exports.object({ name: external_exports.string(), version: external_exports.string().optional() }).strict()).describe("Per-app canonical tool identities: bare tool name -> its server's initialize-declared serverInfo. Host/library-supplied; not an agent action.")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ggui-ai/ui-visual-tester",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0-rc.0",
|
|
4
4
|
"description": "Behavioral validator for ggui-generated component code. Renders a component in real Chromium via Playwright, clicks each action declared in its contract, and verifies the action actually does something — mutating bound state or dispatching to the agent. Catches buttons wired to no-op handlers that structural validators miss. Playwright is an optional peer dependency, injected by the caller.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ggui",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"react": "^19.0.0",
|
|
50
50
|
"react-dom": "^19.0.0",
|
|
51
|
-
"@ggui-ai/
|
|
52
|
-
"@ggui-ai/
|
|
53
|
-
"@ggui-ai/wire": "0.
|
|
51
|
+
"@ggui-ai/design": "0.4.0-rc.0",
|
|
52
|
+
"@ggui-ai/protocol": "0.4.0-rc.0",
|
|
53
|
+
"@ggui-ai/wire": "0.4.0-rc.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@playwright/test": "^1.60.0",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"esbuild": "^0.25.12",
|
|
61
61
|
"playwright-core": "^1.60.0",
|
|
62
62
|
"typescript": "^5.0.0",
|
|
63
|
-
"vitest": "^3.
|
|
63
|
+
"vitest": "^3.2.6"
|
|
64
64
|
},
|
|
65
65
|
"engines": {
|
|
66
66
|
"node": ">=20.0.0"
|